summaryrefslogtreecommitdiff
path: root/fpdfsdk/fsdk_baseannot.cpp
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/fsdk_baseannot.cpp
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/fsdk_baseannot.cpp')
-rw-r--r--fpdfsdk/fsdk_baseannot.cpp67
1 files changed, 52 insertions, 15 deletions
diff --git a/fpdfsdk/fsdk_baseannot.cpp b/fpdfsdk/fsdk_baseannot.cpp
index 21d85500bd..9b214738d8 100644
--- a/fpdfsdk/fsdk_baseannot.cpp
+++ b/fpdfsdk/fsdk_baseannot.cpp
@@ -430,10 +430,60 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::AddSeconds(int seconds) {
CPDFSDK_Annot::CPDFSDK_Annot(CPDFSDK_PageView* pPageView)
: m_pPageView(pPageView), m_bSelected(FALSE), m_nTabOrder(-1) {}
+CPDFSDK_Annot::~CPDFSDK_Annot() {}
+
+#ifdef PDF_ENABLE_XFA
+
+FX_BOOL CPDFSDK_Annot::IsXFAField() {
+ return FALSE;
+}
+
+CXFA_FFWidget* CPDFSDK_Annot::GetXFAWidget() const {
+ return nullptr;
+}
+
+#endif // PDF_ENABLE_XFA
+
+FX_FLOAT CPDFSDK_Annot::GetMinWidth() const {
+ return kMinWidth;
+}
+
+FX_FLOAT CPDFSDK_Annot::GetMinHeight() const {
+ return kMinHeight;
+}
+
+int CPDFSDK_Annot::GetLayoutOrder() const {
+ return 5;
+}
+
+CPDF_Annot* CPDFSDK_Annot::GetPDFAnnot() const {
+ return nullptr;
+}
+
+CFX_ByteString CPDFSDK_Annot::GetType() const {
+ return "";
+}
+
+CFX_ByteString CPDFSDK_Annot::GetSubType() const {
+ return "";
+}
+
+void CPDFSDK_Annot::SetRect(const CFX_FloatRect& rect) {}
+
+CFX_FloatRect CPDFSDK_Annot::GetRect() const {
+ return CFX_FloatRect();
+}
+
+void CPDFSDK_Annot::Annot_OnDraw(CFX_RenderDevice* pDevice,
+ CFX_Matrix* pUser2Device,
+ CPDF_RenderOptions* pOptions) {}
+
CPDFSDK_BAAnnot::CPDFSDK_BAAnnot(CPDF_Annot* pAnnot,
CPDFSDK_PageView* pPageView)
: CPDFSDK_Annot(pPageView), m_pAnnot(pAnnot) {}
+CPDFSDK_BAAnnot::~CPDFSDK_BAAnnot() {}
+
CPDF_Annot* CPDFSDK_BAAnnot::GetPDFAnnot() const {
return m_pAnnot;
}
@@ -446,7 +496,6 @@ void CPDFSDK_Annot::SetSelected(FX_BOOL bSelected) {
m_bSelected = bSelected;
}
-// Tab Order
int CPDFSDK_Annot::GetTabOrder() {
return m_nTabOrder;
}
@@ -776,14 +825,6 @@ void CPDFSDK_BAAnnot::WriteAppearance(const CFX_ByteString& sAPType,
FALSE);
}
-FX_FLOAT CPDFSDK_Annot::GetMinWidth() const {
- return kMinWidth;
-}
-
-FX_FLOAT CPDFSDK_Annot::GetMinHeight() const {
- return kMinHeight;
-}
-
FX_BOOL CPDFSDK_BAAnnot::CreateFormFiller() {
return TRUE;
}
@@ -838,12 +879,6 @@ CPDF_Action CPDFSDK_BAAnnot::GetAAction(CPDF_AAction::AActionType eAAT) {
return CPDF_Action();
}
-#ifdef PDF_ENABLE_XFA
-FX_BOOL CPDFSDK_BAAnnot::IsXFAField() {
- return FALSE;
-}
-#endif // PDF_ENABLE_XFA
-
void CPDFSDK_BAAnnot::Annot_OnDraw(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device,
CPDF_RenderOptions* pOptions) {
@@ -865,7 +900,9 @@ CPDF_Page* CPDFSDK_Annot::GetPDFPage() {
}
#ifdef PDF_ENABLE_XFA
+
CPDFXFA_Page* CPDFSDK_Annot::GetPDFXFAPage() {
return m_pPageView ? m_pPageView->GetPDFXFAPage() : nullptr;
}
+
#endif // PDF_ENABLE_XFA