No real changes, just pass const wxArrayInt to wxHtmlCell::AdjustPagebreak().
AdjustPagebreak() never modifies the array passed to it, so pass it as const reference. See #13935. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70527 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -280,7 +280,7 @@ public:
|
|||||||
// Returned value : true if pagebreak was modified, false otherwise
|
// Returned value : true if pagebreak was modified, false otherwise
|
||||||
// Usage : while (container->AdjustPagebreak(&p)) {}
|
// Usage : while (container->AdjustPagebreak(&p)) {}
|
||||||
virtual bool AdjustPagebreak(int *pagebreak,
|
virtual bool AdjustPagebreak(int *pagebreak,
|
||||||
wxArrayInt& known_pagebreaks) const;
|
const wxArrayInt& known_pagebreaks) const;
|
||||||
|
|
||||||
// Sets cell's behaviour on pagebreaks (see AdjustPagebreak). Default
|
// Sets cell's behaviour on pagebreaks (see AdjustPagebreak). Default
|
||||||
// is true - the cell can be split on two pages
|
// is true - the cell can be split on two pages
|
||||||
@@ -440,7 +440,7 @@ public:
|
|||||||
virtual void DrawInvisible(wxDC& dc, int x, int y,
|
virtual void DrawInvisible(wxDC& dc, int x, int y,
|
||||||
wxHtmlRenderingInfo& info);
|
wxHtmlRenderingInfo& info);
|
||||||
/* virtual bool AdjustPagebreak(int *pagebreak, int *known_pagebreaks = NULL, int number_of_pages = 0) const;*/
|
/* virtual bool AdjustPagebreak(int *pagebreak, int *known_pagebreaks = NULL, int number_of_pages = 0) const;*/
|
||||||
virtual bool AdjustPagebreak(int *pagebreak, wxArrayInt& known_pagebreaks) const;
|
virtual bool AdjustPagebreak(int *pagebreak, const wxArrayInt& known_pagebreaks) const;
|
||||||
|
|
||||||
// insert cell at the end of m_Cells list
|
// insert cell at the end of m_Cells list
|
||||||
void InsertCell(wxHtmlCell *cell);
|
void InsertCell(wxHtmlCell *cell);
|
||||||
|
@@ -107,7 +107,7 @@ public:
|
|||||||
@endcode
|
@endcode
|
||||||
*/
|
*/
|
||||||
virtual bool AdjustPagebreak(int* pagebreak,
|
virtual bool AdjustPagebreak(int* pagebreak,
|
||||||
wxArrayInt& known_pagebreaks) const;
|
const wxArrayInt& known_pagebreaks) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Renders the cell.
|
Renders the cell.
|
||||||
|
@@ -221,7 +221,7 @@ wxCursor wxHtmlCell::GetMouseCursor(wxHtmlWindowInterface *window) const
|
|||||||
|
|
||||||
|
|
||||||
bool wxHtmlCell::AdjustPagebreak(int *pagebreak,
|
bool wxHtmlCell::AdjustPagebreak(int *pagebreak,
|
||||||
wxArrayInt& WXUNUSED(known_pagebreaks)) const
|
const wxArrayInt& WXUNUSED(known_pagebreaks)) const
|
||||||
{
|
{
|
||||||
if ((!m_CanLiveOnPagebreak) &&
|
if ((!m_CanLiveOnPagebreak) &&
|
||||||
m_PosY < *pagebreak && m_PosY + m_Height > *pagebreak)
|
m_PosY < *pagebreak && m_PosY + m_Height > *pagebreak)
|
||||||
@@ -775,7 +775,7 @@ int wxHtmlContainerCell::GetIndentUnits(int ind) const
|
|||||||
|
|
||||||
|
|
||||||
bool wxHtmlContainerCell::AdjustPagebreak(int *pagebreak,
|
bool wxHtmlContainerCell::AdjustPagebreak(int *pagebreak,
|
||||||
wxArrayInt& known_pagebreaks) const
|
const wxArrayInt& known_pagebreaks) const
|
||||||
{
|
{
|
||||||
if (!m_CanLiveOnPagebreak)
|
if (!m_CanLiveOnPagebreak)
|
||||||
return wxHtmlCell::AdjustPagebreak(pagebreak, known_pagebreaks);
|
return wxHtmlCell::AdjustPagebreak(pagebreak, known_pagebreaks);
|
||||||
|
@@ -71,7 +71,7 @@ public:
|
|||||||
wxHtmlPageBreakCell() {}
|
wxHtmlPageBreakCell() {}
|
||||||
|
|
||||||
bool AdjustPagebreak(int* pagebreak,
|
bool AdjustPagebreak(int* pagebreak,
|
||||||
wxArrayInt& known_pagebreaks) const;
|
const wxArrayInt& known_pagebreaks) const;
|
||||||
|
|
||||||
void Draw(wxDC& WXUNUSED(dc),
|
void Draw(wxDC& WXUNUSED(dc),
|
||||||
int WXUNUSED(x), int WXUNUSED(y),
|
int WXUNUSED(x), int WXUNUSED(y),
|
||||||
@@ -82,7 +82,7 @@ private:
|
|||||||
wxDECLARE_NO_COPY_CLASS(wxHtmlPageBreakCell);
|
wxDECLARE_NO_COPY_CLASS(wxHtmlPageBreakCell);
|
||||||
};
|
};
|
||||||
|
|
||||||
bool wxHtmlPageBreakCell::AdjustPagebreak(int* pagebreak, wxArrayInt& known_pagebreaks) const
|
bool wxHtmlPageBreakCell::AdjustPagebreak(int* pagebreak, const wxArrayInt& known_pagebreaks) const
|
||||||
{
|
{
|
||||||
// When we are counting pages, 'known_pagebreaks' is non-NULL.
|
// When we are counting pages, 'known_pagebreaks' is non-NULL.
|
||||||
// That's the only time we change 'pagebreak'. Otherwise, pages
|
// That's the only time we change 'pagebreak'. Otherwise, pages
|
||||||
|
Reference in New Issue
Block a user