summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-11-19 22:09:27 -0800
committerLei Zhang <thestig@chromium.org>2015-11-19 22:09:27 -0800
commit126ba519bdd489ec6c285d1410dcae773e8ef673 (patch)
tree61390a37589c06ce01810bca631a2a7003748a91 /fpdfsdk
parent814000d7876df07a03a320f9eae8af5da7b340c5 (diff)
downloadpdfium-126ba519bdd489ec6c285d1410dcae773e8ef673.tar.xz
Add more overrides.
Using Chromium's clang + build options, there's more override warnings. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1453643002 .
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/include/fsdk_baseannot.h23
-rw-r--r--fpdfsdk/include/fxedit/fxet_edit.h19
-rw-r--r--fpdfsdk/include/fxedit/fxet_list.h45
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ComboBox.h4
4 files changed, 43 insertions, 48 deletions
diff --git a/fpdfsdk/include/fsdk_baseannot.h b/fpdfsdk/include/fsdk_baseannot.h
index c4d2a8ca32..2e54096c76 100644
--- a/fpdfsdk/include/fsdk_baseannot.h
+++ b/fpdfsdk/include/fsdk_baseannot.h
@@ -110,19 +110,16 @@ class CPDFSDK_Annot {
class CPDFSDK_BAAnnot : public CPDFSDK_Annot {
public:
CPDFSDK_BAAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPageView);
- virtual ~CPDFSDK_BAAnnot() {}
-
- virtual CFX_ByteString GetType() const;
- virtual CFX_ByteString GetSubType() const;
-
- virtual void SetRect(const CPDF_Rect& rect);
- virtual CPDF_Rect GetRect() const;
-
- virtual CPDF_Annot* GetPDFAnnot() const;
-
- virtual void Annot_OnDraw(CFX_RenderDevice* pDevice,
- CPDF_Matrix* pUser2Device,
- CPDF_RenderOptions* pOptions);
+ ~CPDFSDK_BAAnnot() override {}
+
+ CFX_ByteString GetType() const override;
+ CFX_ByteString GetSubType() const override;
+ void SetRect(const CPDF_Rect& rect) override;
+ CPDF_Rect GetRect() const override;
+ CPDF_Annot* GetPDFAnnot() const override;
+ void Annot_OnDraw(CFX_RenderDevice* pDevice,
+ CPDF_Matrix* pUser2Device,
+ CPDF_RenderOptions* pOptions) override;
CPDF_Dictionary* GetAnnotDict() const;
diff --git a/fpdfsdk/include/fxedit/fxet_edit.h b/fpdfsdk/include/fxedit/fxet_edit.h
index 21ebe6bae1..1ecb70426f 100644
--- a/fpdfsdk/include/fxedit/fxet_edit.h
+++ b/fpdfsdk/include/fxedit/fxet_edit.h
@@ -814,16 +814,21 @@ class CFX_Edit_Iterator : public IFX_Edit_Iterator {
class CFX_Edit_Provider : public IPDF_VariableText_Provider {
public:
CFX_Edit_Provider(IFX_Edit_FontMap* pFontMap);
- virtual ~CFX_Edit_Provider();
+ ~CFX_Edit_Provider() override;
IFX_Edit_FontMap* GetFontMap();
- int32_t GetCharWidth(int32_t nFontIndex, FX_WORD word, int32_t nWordStyle);
- int32_t GetTypeAscent(int32_t nFontIndex);
- int32_t GetTypeDescent(int32_t nFontIndex);
- int32_t GetWordFontIndex(FX_WORD word, int32_t charset, int32_t nFontIndex);
- int32_t GetDefaultFontIndex();
- FX_BOOL IsLatinWord(FX_WORD word);
+ // IPDF_VariableText_Provider:
+ int32_t GetCharWidth(int32_t nFontIndex,
+ FX_WORD word,
+ int32_t nWordStyle) override;
+ int32_t GetTypeAscent(int32_t nFontIndex) override;
+ int32_t GetTypeDescent(int32_t nFontIndex) override;
+ int32_t GetWordFontIndex(FX_WORD word,
+ int32_t charset,
+ int32_t nFontIndex) override;
+ int32_t GetDefaultFontIndex() override;
+ FX_BOOL IsLatinWord(FX_WORD word) override;
private:
IFX_Edit_FontMap* m_pFontMap;
diff --git a/fpdfsdk/include/fxedit/fxet_list.h b/fpdfsdk/include/fxedit/fxet_list.h
index 63c6617cba..2700b92cf0 100644
--- a/fpdfsdk/include/fxedit/fxet_list.h
+++ b/fpdfsdk/include/fxedit/fxet_list.h
@@ -208,40 +208,33 @@ class CLST_ArrayTemplate : public CFX_ArrayTemplate<TYPE> {
class CFX_List : protected CFX_ListContainer, public IFX_List {
public:
CFX_List();
- virtual ~CFX_List();
+ ~CFX_List() override;
- public:
- virtual void SetFontMap(IFX_Edit_FontMap* pFontMap);
- virtual void SetFontSize(FX_FLOAT fFontSize);
-
- virtual CPDF_Rect GetPlateRect() const;
- virtual CPDF_Rect GetContentRect() const;
-
- virtual FX_FLOAT GetFontSize() const;
- virtual IFX_Edit* GetItemEdit(int32_t nIndex) const;
- virtual int32_t GetCount() const;
- virtual FX_BOOL IsItemSelected(int32_t nIndex) const;
- virtual FX_FLOAT GetFirstHeight() const;
-
- virtual void SetMultipleSel(FX_BOOL bMultiple);
- virtual FX_BOOL IsMultipleSel() const;
- virtual FX_BOOL IsValid(int32_t nItemIndex) const;
- virtual int32_t FindNext(int32_t nIndex, FX_WCHAR nChar) const;
+ // IFX_List:
+ void SetFontMap(IFX_Edit_FontMap* pFontMap) override;
+ void SetFontSize(FX_FLOAT fFontSize) override;
+ CPDF_Rect GetPlateRect() const override;
+ CPDF_Rect GetContentRect() const override;
+ FX_FLOAT GetFontSize() const override;
+ IFX_Edit* GetItemEdit(int32_t nIndex) const override;
+ int32_t GetCount() const override;
+ FX_BOOL IsItemSelected(int32_t nIndex) const override;
+ FX_FLOAT GetFirstHeight() const override;
+ void SetMultipleSel(FX_BOOL bMultiple) override;
+ FX_BOOL IsMultipleSel() const override;
+ FX_BOOL IsValid(int32_t nItemIndex) const override;
+ int32_t FindNext(int32_t nIndex, FX_WCHAR nChar) const override;
+ void Empty() override;
+ CPDF_Rect GetItemRect(int32_t nIndex) const override;
+ int32_t GetItemIndex(const CPDF_Point& point) const override;
+ int32_t GetFirstSelected() const override;
protected:
- virtual void Empty();
-
void AddItem(const FX_WCHAR* str);
virtual void ReArrange(int32_t nItemIndex);
-
- virtual CPDF_Rect GetItemRect(int32_t nIndex) const;
CFX_WideString GetItemText(int32_t nIndex) const;
-
void SetItemSelect(int32_t nItemIndex, FX_BOOL bSelected);
void SetItemCaret(int32_t nItemIndex, FX_BOOL bCaret);
-
- virtual int32_t GetItemIndex(const CPDF_Point& point) const;
- int32_t GetFirstSelected() const;
int32_t GetLastSelected() const;
FX_WCHAR Toupper(FX_WCHAR c) const;
diff --git a/fpdfsdk/include/pdfwindow/PWL_ComboBox.h b/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
index e29752326c..be0ef0f5e1 100644
--- a/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
+++ b/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
@@ -47,11 +47,11 @@ class CPWL_CBButton : public CPWL_Wnd {
class CPWL_ComboBox : public CPWL_Wnd {
public:
CPWL_ComboBox();
- ~CPWL_ComboBox() {}
+ ~CPWL_ComboBox() override {}
operator CPWL_Edit*() { return m_pEdit; }
- // CPWL_Wnd
+ // CPWL_Wnd:
CFX_ByteString GetClassName() const override;
void OnCreate(PWL_CREATEPARAM& cp) override;
FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) override;