diff options
author | weili <weili@chromium.org> | 2016-06-14 17:21:14 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-14 17:21:14 -0700 |
commit | f4bb580add3824196dc49cd7de2f7d051019ede8 (patch) | |
tree | 15c1db6fb7000330d48c105c66acf1d468ba56bd /core/fpdfdoc/include/fpdf_doc.h | |
parent | ee2abec93f22bd10522181dc0362f24d389fc66b (diff) | |
download | pdfium-f4bb580add3824196dc49cd7de2f7d051019ede8.tar.xz |
Make code compile with clang_use_chrome_plugin (part II)
This change contains files in core directory which were not covered
in part I. This is part of the efforts to make PDFium code compilable
by Clang chromium style plugins.
The changes are mainly the following:
-- move inline constructor/destructor of complex class/struct out-of-line;
-- add constructor/destructor of complex class/struct if not
explicitly defined;
-- add explicit out-of-line copy constructor when needed;
-- move inline virtual functions out-of-line;
-- Properly mark virtual functions with 'override';
-- some minor cleanups;
BUG=pdfium:469
Review-Url: https://codereview.chromium.org/2060913003
Diffstat (limited to 'core/fpdfdoc/include/fpdf_doc.h')
-rw-r--r-- | core/fpdfdoc/include/fpdf_doc.h | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/core/fpdfdoc/include/fpdf_doc.h b/core/fpdfdoc/include/fpdf_doc.h index 2722003743..afa5a30b18 100644 --- a/core/fpdfdoc/include/fpdf_doc.h +++ b/core/fpdfdoc/include/fpdf_doc.h @@ -738,7 +738,7 @@ class CPDF_FormControl { CPDF_InterForm* GetInterForm() const { return m_pForm; } CPDF_FormField* GetField() const { return m_pField; } CPDF_Dictionary* GetWidget() const { return m_pWidgetDict; } - CFX_FloatRect GetRect() const; + CFX_FloatRect GetRect() const { return m_pWidgetDict->GetRectBy("Rect"); } void DrawControl(CFX_RenderDevice* pDevice, CFX_Matrix* pMatrix, @@ -756,9 +756,7 @@ class CPDF_FormControl { bool HasMKEntry(const CFX_ByteString& csEntry) const; int GetRotation(); - inline FX_ARGB GetBorderColor(int& iColorType) { - return GetColor(iColorType, "BC"); - } + FX_ARGB GetBorderColor(int& iColorType) { return GetColor(iColorType, "BC"); } FX_FLOAT GetOriginalBorderColor(int index) { return GetOriginalColor(index, "BC"); @@ -823,28 +821,24 @@ class CPDF_FormControl { class IPDF_FormNotify { public: - virtual ~IPDF_FormNotify() {} + virtual ~IPDF_FormNotify(); virtual int BeforeValueChange(CPDF_FormField* pField, - const CFX_WideString& csValue) { - return 0; - } - virtual void AfterValueChange(CPDF_FormField* pField) {} + const CFX_WideString& csValue); + virtual void AfterValueChange(CPDF_FormField* pField); virtual int BeforeSelectionChange(CPDF_FormField* pField, - const CFX_WideString& csValue) { - return 0; - } - virtual void AfterSelectionChange(CPDF_FormField* pField) {} - virtual void AfterCheckedStatusChange(CPDF_FormField* pField) {} - virtual int BeforeFormReset(CPDF_InterForm* pForm) { return 0; } - virtual void AfterFormReset(CPDF_InterForm* pForm) {} - virtual int BeforeFormImportData(CPDF_InterForm* pForm) { return 0; } - virtual void AfterFormImportData(CPDF_InterForm* pForm) {} + const CFX_WideString& csValue); + virtual void AfterSelectionChange(CPDF_FormField* pField); + virtual void AfterCheckedStatusChange(CPDF_FormField* pField); + virtual int BeforeFormReset(CPDF_InterForm* pForm); + virtual void AfterFormReset(CPDF_InterForm* pForm); + virtual int BeforeFormImportData(CPDF_InterForm* pForm); + virtual void AfterFormImportData(CPDF_InterForm* pForm); }; class CPDF_PageLabel { public: - explicit CPDF_PageLabel(CPDF_Document* pDocument) : m_pDocument(pDocument) {} + explicit CPDF_PageLabel(CPDF_Document* pDocument); CFX_WideString GetLabel(int nPage) const; int32_t GetPageByLabel(const CFX_ByteStringC& bsLabel) const; |