Add wxOVERRIDE and use it in common and wxOSX code.
Make overriding virtual methods more explicit and enable additional checks provided by C++11 compilers when "override" is used. Closes #16100. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -121,10 +121,10 @@ public:
|
||||
GetEntitiesParser()->SetEncoding(wxFONTENCODING_ISO8859_1);
|
||||
}
|
||||
|
||||
wxObject* GetProduct() { return NULL; }
|
||||
wxObject* GetProduct() wxOVERRIDE { return NULL; }
|
||||
|
||||
protected:
|
||||
virtual void AddText(const wxString& WXUNUSED(txt)) {}
|
||||
virtual void AddText(const wxString& WXUNUSED(txt)) wxOVERRIDE {}
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(HP_Parser);
|
||||
};
|
||||
@@ -158,8 +158,8 @@ class HP_TagHandler : public wxHtmlTagHandler
|
||||
m_count = 0;
|
||||
m_parentItem = NULL;
|
||||
}
|
||||
wxString GetSupportedTags() { return wxT("UL,OBJECT,PARAM"); }
|
||||
bool HandleTag(const wxHtmlTag& tag);
|
||||
wxString GetSupportedTags() wxOVERRIDE { return wxT("UL,OBJECT,PARAM"); }
|
||||
bool HandleTag(const wxHtmlTag& tag) wxOVERRIDE;
|
||||
|
||||
void Reset(wxHtmlHelpDataItems& data)
|
||||
{
|
||||
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
SetStandardFonts();
|
||||
}
|
||||
|
||||
virtual bool LoadPage(const wxString& location)
|
||||
virtual bool LoadPage(const wxString& location) wxOVERRIDE
|
||||
{
|
||||
if ( !wxHtmlWindow::LoadPage(location) )
|
||||
return false;
|
||||
|
||||
@@ -84,8 +84,8 @@ class wxHtmlFilterImage : public wxHtmlFilter
|
||||
DECLARE_DYNAMIC_CLASS(wxHtmlFilterImage)
|
||||
|
||||
public:
|
||||
virtual bool CanRead(const wxFSFile& file) const;
|
||||
virtual wxString ReadFile(const wxFSFile& file) const;
|
||||
virtual bool CanRead(const wxFSFile& file) const wxOVERRIDE;
|
||||
virtual wxString ReadFile(const wxFSFile& file) const wxOVERRIDE;
|
||||
};
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxHtmlFilterImage, wxHtmlFilter)
|
||||
@@ -191,13 +191,13 @@ class wxHtmlFilterModule : public wxModule
|
||||
DECLARE_DYNAMIC_CLASS(wxHtmlFilterModule)
|
||||
|
||||
public:
|
||||
virtual bool OnInit()
|
||||
virtual bool OnInit() wxOVERRIDE
|
||||
{
|
||||
wxHtmlWindow::AddFilter(new wxHtmlFilterHTML);
|
||||
wxHtmlWindow::AddFilter(new wxHtmlFilterImage);
|
||||
return true;
|
||||
}
|
||||
virtual void OnExit() {}
|
||||
virtual void OnExit() wxOVERRIDE {}
|
||||
};
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxHtmlFilterModule, wxModule)
|
||||
|
||||
@@ -889,10 +889,10 @@ class wxMetaTagParser : public wxHtmlParser
|
||||
public:
|
||||
wxMetaTagParser() { }
|
||||
|
||||
wxObject* GetProduct() { return NULL; }
|
||||
wxObject* GetProduct() wxOVERRIDE { return NULL; }
|
||||
|
||||
protected:
|
||||
virtual void AddText(const wxString& WXUNUSED(txt)) {}
|
||||
virtual void AddText(const wxString& WXUNUSED(txt)) wxOVERRIDE {}
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxMetaTagParser);
|
||||
};
|
||||
@@ -901,8 +901,8 @@ class wxMetaTagHandler : public wxHtmlTagHandler
|
||||
{
|
||||
public:
|
||||
wxMetaTagHandler(wxString *retval) : wxHtmlTagHandler(), m_retval(retval) {}
|
||||
wxString GetSupportedTags() { return wxT("META,BODY"); }
|
||||
bool HandleTag(const wxHtmlTag& tag);
|
||||
wxString GetSupportedTags() wxOVERRIDE { return wxT("META,BODY"); }
|
||||
bool HandleTag(const wxHtmlTag& tag) wxOVERRIDE;
|
||||
|
||||
private:
|
||||
wxString *m_retval;
|
||||
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
m_orient = orient;
|
||||
}
|
||||
|
||||
virtual void Notify();
|
||||
virtual void Notify() wxOVERRIDE;
|
||||
|
||||
private:
|
||||
wxScrolledWindow *m_win;
|
||||
@@ -1846,8 +1846,8 @@ class wxHtmlWinModule: public wxModule
|
||||
DECLARE_DYNAMIC_CLASS(wxHtmlWinModule)
|
||||
public:
|
||||
wxHtmlWinModule() : wxModule() {}
|
||||
bool OnInit() { return true; }
|
||||
void OnExit() { wxHtmlWindow::CleanUpStatics(); }
|
||||
bool OnInit() wxOVERRIDE { return true; }
|
||||
void OnExit() wxOVERRIDE { wxHtmlWindow::CleanUpStatics(); }
|
||||
};
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxHtmlWinModule, wxModule)
|
||||
|
||||
@@ -830,8 +830,8 @@ class wxHtmlPrintingModule: public wxModule
|
||||
DECLARE_DYNAMIC_CLASS(wxHtmlPrintingModule)
|
||||
public:
|
||||
wxHtmlPrintingModule() : wxModule() {}
|
||||
bool OnInit() { return true; }
|
||||
void OnExit() { wxHtmlPrintout::CleanUpStatics(); }
|
||||
bool OnInit() wxOVERRIDE { return true; }
|
||||
void OnExit() wxOVERRIDE { wxHtmlPrintout::CleanUpStatics(); }
|
||||
};
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxHtmlPrintingModule, wxModule)
|
||||
|
||||
@@ -37,8 +37,8 @@ class wxHtmlLineCell : public wxHtmlCell
|
||||
public:
|
||||
wxHtmlLineCell(int size, bool shading) : wxHtmlCell() {m_Height = size; m_HasShading = shading;}
|
||||
void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2,
|
||||
wxHtmlRenderingInfo& info);
|
||||
void Layout(int w)
|
||||
wxHtmlRenderingInfo& info) wxOVERRIDE;
|
||||
void Layout(int w) wxOVERRIDE
|
||||
{ m_Width = w; wxHtmlCell::Layout(w); }
|
||||
|
||||
private:
|
||||
|
||||
@@ -61,11 +61,11 @@ class wxHtmlImageMapAreaCell : public wxHtmlCell
|
||||
int radius;
|
||||
public:
|
||||
wxHtmlImageMapAreaCell( celltype t, wxString &coords, double pixel_scale = 1.0);
|
||||
virtual wxHtmlLinkInfo *GetLink( int x = 0, int y = 0 ) const;
|
||||
virtual wxHtmlLinkInfo *GetLink( int x = 0, int y = 0 ) const wxOVERRIDE;
|
||||
void Draw(wxDC& WXUNUSED(dc),
|
||||
int WXUNUSED(x), int WXUNUSED(y),
|
||||
int WXUNUSED(view_y1), int WXUNUSED(view_y2),
|
||||
wxHtmlRenderingInfo& WXUNUSED(info)) {}
|
||||
wxHtmlRenderingInfo& WXUNUSED(info)) wxOVERRIDE {}
|
||||
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxHtmlImageMapAreaCell);
|
||||
@@ -239,12 +239,12 @@ class wxHtmlImageMapCell : public wxHtmlCell
|
||||
protected:
|
||||
wxString m_Name;
|
||||
public:
|
||||
virtual wxHtmlLinkInfo *GetLink( int x = 0, int y = 0 ) const;
|
||||
virtual const wxHtmlCell *Find( int cond, const void *param ) const;
|
||||
virtual wxHtmlLinkInfo *GetLink( int x = 0, int y = 0 ) const wxOVERRIDE;
|
||||
virtual const wxHtmlCell *Find( int cond, const void *param ) const wxOVERRIDE;
|
||||
void Draw(wxDC& WXUNUSED(dc),
|
||||
int WXUNUSED(x), int WXUNUSED(y),
|
||||
int WXUNUSED(view_y1), int WXUNUSED(view_y2),
|
||||
wxHtmlRenderingInfo& WXUNUSED(info)) {}
|
||||
wxHtmlRenderingInfo& WXUNUSED(info)) wxOVERRIDE {}
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxHtmlImageMapCell);
|
||||
};
|
||||
@@ -293,18 +293,18 @@ public:
|
||||
const wxString& mapname = wxEmptyString);
|
||||
virtual ~wxHtmlImageCell();
|
||||
void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2,
|
||||
wxHtmlRenderingInfo& info);
|
||||
virtual wxHtmlLinkInfo *GetLink(int x = 0, int y = 0) const;
|
||||
wxHtmlRenderingInfo& info) wxOVERRIDE;
|
||||
virtual wxHtmlLinkInfo *GetLink(int x = 0, int y = 0) const wxOVERRIDE;
|
||||
|
||||
void SetImage(const wxImage& img);
|
||||
|
||||
// If "alt" text is set, it will be used when converting this cell to text.
|
||||
void SetAlt(const wxString& alt);
|
||||
virtual wxString ConvertToText(wxHtmlSelection *sel) const;
|
||||
virtual wxString ConvertToText(wxHtmlSelection *sel) const wxOVERRIDE;
|
||||
|
||||
#if wxUSE_GIF && wxUSE_TIMER
|
||||
void AdvanceAnimation(wxTimer *timer);
|
||||
virtual void Layout(int w);
|
||||
virtual void Layout(int w) wxOVERRIDE;
|
||||
#endif
|
||||
|
||||
private:
|
||||
@@ -334,7 +334,7 @@ class wxGIFTimer : public wxTimer
|
||||
{
|
||||
public:
|
||||
wxGIFTimer(wxHtmlImageCell *cell) : m_cell(cell) {}
|
||||
virtual void Notify()
|
||||
virtual void Notify() wxOVERRIDE
|
||||
{
|
||||
m_cell->AdvanceAnimation(this);
|
||||
}
|
||||
|
||||
@@ -71,12 +71,12 @@ public:
|
||||
|
||||
bool AdjustPagebreak(int* pagebreak,
|
||||
const wxArrayInt& known_pagebreaks,
|
||||
int pageHeight) const;
|
||||
int pageHeight) const wxOVERRIDE;
|
||||
|
||||
void Draw(wxDC& WXUNUSED(dc),
|
||||
int WXUNUSED(x), int WXUNUSED(y),
|
||||
int WXUNUSED(view_y1), int WXUNUSED(view_y2),
|
||||
wxHtmlRenderingInfo& WXUNUSED(info)) {}
|
||||
wxHtmlRenderingInfo& WXUNUSED(info)) wxOVERRIDE {}
|
||||
|
||||
private:
|
||||
wxDECLARE_NO_COPY_CLASS(wxHtmlPageBreakCell);
|
||||
|
||||
@@ -36,9 +36,9 @@ public:
|
||||
void Draw(wxDC& WXUNUSED(dc),
|
||||
int WXUNUSED(x), int WXUNUSED(y),
|
||||
int WXUNUSED(view_y1), int WXUNUSED(view_y2),
|
||||
wxHtmlRenderingInfo& WXUNUSED(info)) {}
|
||||
wxHtmlRenderingInfo& WXUNUSED(info)) wxOVERRIDE {}
|
||||
|
||||
virtual const wxHtmlCell* Find(int condition, const void* param) const
|
||||
virtual const wxHtmlCell* Find(int condition, const void* param) const wxOVERRIDE
|
||||
{
|
||||
if ((condition == wxHTML_COND_ISANCHOR) &&
|
||||
(m_AnchorName == (*((const wxString*)param))))
|
||||
|
||||
@@ -38,7 +38,7 @@ class wxHtmlListmarkCell : public wxHtmlCell
|
||||
public:
|
||||
wxHtmlListmarkCell(wxDC *dc, const wxColour& clr);
|
||||
void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2,
|
||||
wxHtmlRenderingInfo& info);
|
||||
wxHtmlRenderingInfo& info) wxOVERRIDE;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxHtmlListmarkCell);
|
||||
};
|
||||
@@ -90,7 +90,7 @@ class wxHtmlListCell : public wxHtmlContainerCell
|
||||
wxHtmlListCell(wxHtmlContainerCell *parent);
|
||||
virtual ~wxHtmlListCell();
|
||||
void AddRow(wxHtmlContainerCell *mark, wxHtmlContainerCell *cont);
|
||||
virtual void Layout(int w);
|
||||
virtual void Layout(int w) wxOVERRIDE;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxHtmlListCell);
|
||||
};
|
||||
@@ -205,7 +205,7 @@ class wxHtmlListcontentCell : public wxHtmlContainerCell
|
||||
{
|
||||
public:
|
||||
wxHtmlListcontentCell(wxHtmlContainerCell *p) : wxHtmlContainerCell(p) {}
|
||||
virtual void Layout(int w) {
|
||||
virtual void Layout(int w) wxOVERRIDE {
|
||||
// Reset top indentation, fixes <li><p>
|
||||
SetIndent(0, wxHTML_INDENT_TOP);
|
||||
wxHtmlContainerCell::Layout(w);
|
||||
|
||||
@@ -99,9 +99,9 @@ public:
|
||||
wxHtmlTableCell(wxHtmlContainerCell *parent, const wxHtmlTag& tag, double pixel_scale = 1.0);
|
||||
virtual ~wxHtmlTableCell();
|
||||
|
||||
virtual void RemoveExtraSpacing(bool top, bool bottom);
|
||||
virtual void RemoveExtraSpacing(bool top, bool bottom) wxOVERRIDE;
|
||||
|
||||
virtual void Layout(int w);
|
||||
virtual void Layout(int w) wxOVERRIDE;
|
||||
|
||||
void AddRow(const wxHtmlTag& tag);
|
||||
void AddCell(wxHtmlContainerCell *cell, const wxHtmlTag& tag);
|
||||
|
||||
Reference in New Issue
Block a user