summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_baseform.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2015-11-04 11:53:47 -0500
committerDan Sinclair <dsinclair@chromium.org>2015-11-04 11:53:47 -0500
commit891c22686b90f4b23e741b5f1564f21831ee111c (patch)
tree48da027a599084d8d79acabf28b279837058cac0 /fpdfsdk/src/fsdk_baseform.cpp
parent1488aac2e699a5dd31bc59c3d07fe591e2d38c20 (diff)
downloadpdfium-891c22686b90f4b23e741b5f1564f21831ee111c.tar.xz
Backport CPDFSDK_BAAnnot from XFA.
On the XFA branch the CPDFSDK_Annot class has been turned into a base class with CPDFSDK_BAAnnot serving the purpose that was served by CPDFSDK_Annot. This CL pulls those changes into master to put it more in line with the XFA branch. (This removes ~600 lines from the fpdfsdk/ diff). R=thestig@chromium.org Review URL: https://codereview.chromium.org/1408073009 .
Diffstat (limited to 'fpdfsdk/src/fsdk_baseform.cpp')
-rw-r--r--fpdfsdk/src/fsdk_baseform.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index e3536e0a19..9a20e48e84 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -26,7 +26,7 @@
CPDFSDK_Widget::CPDFSDK_Widget(CPDF_Annot* pAnnot,
CPDFSDK_PageView* pPageView,
CPDFSDK_InterForm* pInterForm)
- : CPDFSDK_Annot(pAnnot, pPageView),
+ : CPDFSDK_BAAnnot(pAnnot, pPageView),
m_pInterForm(pInterForm),
m_nAppAge(0),
m_nValueAge(0) {
@@ -80,6 +80,12 @@ int CPDFSDK_Widget::GetFieldType() const {
return pField->GetFieldType();
}
+FX_BOOL CPDFSDK_Widget::IsAppearanceValid() {
+ ASSERT(m_pPageView != NULL);
+
+ return CPDFSDK_BAAnnot::IsAppearanceValid();
+}
+
int CPDFSDK_Widget::GetFieldFlags() const {
CPDF_InterForm* pPDFInterForm = m_pInterForm->GetInterForm();
ASSERT(pPDFInterForm != NULL);
@@ -356,7 +362,7 @@ void CPDFSDK_Widget::DrawAppearance(CFX_RenderDevice* pDevice,
pDevice->DrawPath(&pathData, pUser2Device, &gsd, 0, 0xFFAAAAAA,
FXFILL_ALTERNATE);
} else {
- CPDFSDK_Annot::DrawAppearance(pDevice, pUser2Device, mode, pOptions);
+ CPDFSDK_BAAnnot::DrawAppearance(pDevice, pUser2Device, mode, pOptions);
}
}
@@ -1462,7 +1468,7 @@ CPDF_Action CPDFSDK_Widget::GetAAction(CPDF_AAction::AActionType eAAT) {
case CPDF_AAction::PageClose:
case CPDF_AAction::PageVisible:
case CPDF_AAction::PageInvisible:
- return CPDFSDK_Annot::GetAAction(eAAT);
+ return CPDFSDK_BAAnnot::GetAAction(eAAT);
case CPDF_AAction::KeyStroke:
case CPDF_AAction::Format:
@@ -1471,8 +1477,7 @@ CPDF_Action CPDFSDK_Widget::GetAAction(CPDF_AAction::AActionType eAAT) {
CPDF_FormField* pField = GetFormField();
if (CPDF_AAction aa = pField->GetAdditionalAction())
return aa.GetAction(eAAT);
-
- return CPDFSDK_Annot::GetAAction(eAAT);
+ return CPDFSDK_BAAnnot::GetAAction(eAAT);
}
default:
break;