summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/fsdk_baseannot.h
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-06-15 11:21:33 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-15 11:21:33 -0700
commit625ad667d0c0c17d5bc11d505f04861d90b45078 (patch)
treeefd014e752072adf726a0e34383555399342dcb2 /fpdfsdk/include/fsdk_baseannot.h
parent29b8ad0b130ec6ed4f72ebd0c0a4f9e6a5b03467 (diff)
downloadpdfium-625ad667d0c0c17d5bc11d505f04861d90b45078.tar.xz
Make code compile with clang_use_chrome_plugin (part IV)
This change mainly contains files in fpdfsdk/ directory. 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 plus removing an unused file and splitting cxfa_eventparam out from fxfa.h BUG=pdfium:469 Review-Url: https://codereview.chromium.org/2062313002
Diffstat (limited to 'fpdfsdk/include/fsdk_baseannot.h')
-rw-r--r--fpdfsdk/include/fsdk_baseannot.h41
1 files changed, 16 insertions, 25 deletions
diff --git a/fpdfsdk/include/fsdk_baseannot.h b/fpdfsdk/include/fsdk_baseannot.h
index 752d91a903..95d49ae272 100644
--- a/fpdfsdk/include/fsdk_baseannot.h
+++ b/fpdfsdk/include/fsdk_baseannot.h
@@ -29,9 +29,9 @@ class CFX_RenderDevice;
class CPDFSDK_DateTime {
public:
CPDFSDK_DateTime();
- CPDFSDK_DateTime(const CFX_ByteString& dtStr);
+ explicit CPDFSDK_DateTime(const CFX_ByteString& dtStr);
+ explicit CPDFSDK_DateTime(const FX_SYSTEMTIME& st);
CPDFSDK_DateTime(const CPDFSDK_DateTime& datetime);
- CPDFSDK_DateTime(const FX_SYSTEMTIME& st);
CPDFSDK_DateTime& operator=(const CPDFSDK_DateTime& datetime);
CPDFSDK_DateTime& operator=(const FX_SYSTEMTIME& st);
@@ -64,32 +64,26 @@ class CPDFSDK_DateTime {
class CPDFSDK_Annot {
public:
explicit CPDFSDK_Annot(CPDFSDK_PageView* pPageView);
- virtual ~CPDFSDK_Annot() {}
+ virtual ~CPDFSDK_Annot();
#ifdef PDF_ENABLE_XFA
- virtual FX_BOOL IsXFAField() { return FALSE; }
+ virtual FX_BOOL IsXFAField();
+ virtual CXFA_FFWidget* GetXFAWidget() const;
#endif // PDF_ENABLE_XFA
virtual FX_FLOAT GetMinWidth() const;
virtual FX_FLOAT GetMinHeight() const;
// define layout order to 5.
- virtual int GetLayoutOrder() const { return 5; }
-
- virtual CPDF_Annot* GetPDFAnnot() const { return nullptr; }
-
-#ifdef PDF_ENABLE_XFA
- virtual CXFA_FFWidget* GetXFAWidget() const { return nullptr; }
-#endif // PDF_ENABLE_XFA
-
- virtual CFX_ByteString GetType() const { return ""; }
- virtual CFX_ByteString GetSubType() const { return ""; }
-
- virtual void SetRect(const CFX_FloatRect& rect) {}
- virtual CFX_FloatRect GetRect() const { return CFX_FloatRect(); }
+ virtual int GetLayoutOrder() const;
+ virtual CPDF_Annot* GetPDFAnnot() const;
+ virtual CFX_ByteString GetType() const;
+ virtual CFX_ByteString GetSubType() const;
+ virtual CFX_FloatRect GetRect() const;
+ virtual void SetRect(const CFX_FloatRect& rect);
virtual void Annot_OnDraw(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device,
- CPDF_RenderOptions* pOptions) {}
+ CPDF_RenderOptions* pOptions);
UnderlyingPageType* GetUnderlyingPage();
CPDF_Page* GetPDFPage();
@@ -97,7 +91,7 @@ class CPDFSDK_Annot {
CPDFXFA_Page* GetPDFXFAPage();
#endif // PDF_ENABLE_XFA
- void SetPage(CPDFSDK_PageView* pPageView) { m_pPageView = pPageView; }
+ void SetPage(CPDFSDK_PageView* pPageView);
CPDFSDK_PageView* GetPageView() const { return m_pPageView; }
// Tab Order
@@ -117,12 +111,9 @@ class CPDFSDK_Annot {
class CPDFSDK_BAAnnot : public CPDFSDK_Annot {
public:
CPDFSDK_BAAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPageView);
- ~CPDFSDK_BAAnnot() override {}
-
-#ifdef PDF_ENABLE_XFA
- FX_BOOL IsXFAField() override;
-#endif // PDF_ENABLE_XFA
+ ~CPDFSDK_BAAnnot() override;
+ // CPDFSDK_Annot
CFX_ByteString GetType() const override;
CFX_ByteString GetSubType() const override;
void SetRect(const CFX_FloatRect& rect) override;
@@ -173,13 +164,13 @@ class CPDFSDK_BAAnnot : public CPDFSDK_Annot {
void RemoveAAction();
virtual CPDF_Action GetAAction(CPDF_AAction::AActionType eAAT);
-
virtual FX_BOOL IsAppearanceValid();
virtual FX_BOOL IsAppearanceValid(CPDF_Annot::AppearanceMode mode);
virtual void DrawAppearance(CFX_RenderDevice* pDevice,
const CFX_Matrix* pUser2Device,
CPDF_Annot::AppearanceMode mode,
const CPDF_RenderOptions* pOptions);
+
void DrawBorder(CFX_RenderDevice* pDevice,
const CFX_Matrix* pUser2Device,
const CPDF_RenderOptions* pOptions);