summaryrefslogtreecommitdiff
path: root/fpdfsdk/fsdk_baseform.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_baseform.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_baseform.cpp')
-rw-r--r--fpdfsdk/fsdk_baseform.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/fpdfsdk/fsdk_baseform.cpp b/fpdfsdk/fsdk_baseform.cpp
index 65be7c8c5d..90ff144759 100644
--- a/fpdfsdk/fsdk_baseform.cpp
+++ b/fpdfsdk/fsdk_baseform.cpp
@@ -29,9 +29,23 @@
#ifdef PDF_ENABLE_XFA
#include "fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h"
#include "fpdfsdk/fpdfxfa/include/fpdfxfa_util.h"
+#include "xfa/fxfa/include/cxfa_eventparam.h"
+#include "xfa/fxfa/include/xfa_ffdocview.h"
#include "xfa/fxfa/include/xfa_ffwidget.h"
+#include "xfa/fxfa/include/xfa_ffwidgethandler.h"
#endif // PDF_ENABLE_XFA
+PDFSDK_FieldAction::PDFSDK_FieldAction()
+ : bModifier(FALSE),
+ bShift(FALSE),
+ nCommitKey(0),
+ bKeyDown(FALSE),
+ nSelEnd(0),
+ nSelStart(0),
+ bWillCommit(FALSE),
+ bFieldFull(FALSE),
+ bRC(TRUE) {}
+
CPDFSDK_Widget::CPDFSDK_Widget(CPDF_Annot* pAnnot,
CPDFSDK_PageView* pPageView,
CPDFSDK_InterForm* pInterForm)
@@ -485,6 +499,10 @@ FX_BOOL CPDFSDK_Widget::IsAppearanceValid() {
return CPDFSDK_BAAnnot::IsAppearanceValid();
}
+int CPDFSDK_Widget::GetLayoutOrder() const {
+ return 2;
+}
+
int CPDFSDK_Widget::GetFieldFlags() const {
CPDF_InterForm* pPDFInterForm = m_pInterForm->GetInterForm();
CPDF_FormControl* pFormControl =
@@ -1954,10 +1972,18 @@ FX_BOOL CPDFSDK_XFAWidget::IsXFAField() {
return TRUE;
}
+CXFA_FFWidget* CPDFSDK_XFAWidget::GetXFAWidget() const {
+ return m_hXFAWidget;
+}
+
CFX_ByteString CPDFSDK_XFAWidget::GetType() const {
return FSDK_XFAWIDGET_TYPENAME;
}
+CFX_ByteString CPDFSDK_XFAWidget::GetSubType() const {
+ return "";
+}
+
CFX_FloatRect CPDFSDK_XFAWidget::GetRect() const {
CFX_RectF rcBBox;
GetXFAWidget()->GetRect(rcBBox);