Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2398)

Unified Diff: fpdfsdk/src/fsdk_baseannot.cpp

Issue 1399273003: fpdfsdk/ differences with XFA (for didactic purposes only). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Regenerate after taking juns patch Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/src/fsdk_annothandler.cpp ('k') | fpdfsdk/src/fsdk_baseform.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fsdk_baseannot.cpp
diff --git a/fpdfsdk/src/fsdk_baseannot.cpp b/fpdfsdk/src/fsdk_baseannot.cpp
index e124ace2a340c4035c874e7de7d55d626ab63827..2453ec5596d53a4912e00517e0d44d7ebb8549d3 100644
--- a/fpdfsdk/src/fsdk_baseannot.cpp
+++ b/fpdfsdk/src/fsdk_baseannot.cpp
@@ -5,6 +5,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "core/include/fxcrt/fx_ext.h"
+#ifdef PDF_ENABLE_XFA
+#include "fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h"
+#endif
#include "fpdfsdk/include/fsdk_baseannot.h"
#include "fpdfsdk/include/fsdk_define.h"
#include "fpdfsdk/include/fsdk_mgr.h"
@@ -966,6 +969,12 @@ CPDF_Action CPDFSDK_BAAnnot::GetAAction(CPDF_AAction::AActionType eAAT) {
return CPDF_Action();
}
+#ifdef PDF_ENABLE_XFA
+FX_BOOL CPDFSDK_BAAnnot::IsXFAField() {
+ return FALSE;
+}
+
+#endif
void CPDFSDK_BAAnnot::Annot_OnDraw(CFX_RenderDevice* pDevice,
CPDF_Matrix* pUser2Device,
CPDF_RenderOptions* pOptions) {
@@ -977,7 +986,11 @@ void CPDFSDK_BAAnnot::Annot_OnDraw(CFX_RenderDevice* pDevice,
}
UnderlyingPageType* CPDFSDK_Annot::GetUnderlyingPage() {
+#ifndef PDF_ENABLE_XFA
return GetPDFPage();
+#else
+ return GetPDFXFAPage();
+#endif
}
CPDF_Page* CPDFSDK_Annot::GetPDFPage() {
@@ -985,3 +998,11 @@ CPDF_Page* CPDFSDK_Annot::GetPDFPage() {
return m_pPageView->GetPDFPage();
return NULL;
}
+#ifdef PDF_ENABLE_XFA
+
+CPDFXFA_Page* CPDFSDK_Annot::GetPDFXFAPage() {
+ if (m_pPageView)
+ return m_pPageView->GetPDFXFAPage();
+ return NULL;
+}
+#endif
« no previous file with comments | « fpdfsdk/src/fsdk_annothandler.cpp ('k') | fpdfsdk/src/fsdk_baseform.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698