diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-10-12 15:47:07 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-10-12 15:47:07 -0700 |
commit | a8a39e25af3c19bb91434fdf367cffa0e1536934 (patch) | |
tree | d6bfa30a756014ec79dfce75d6658ecf3778594a /fpdfsdk/src/fpdfxfa | |
parent | 5ef9faa8e8f5593556d78f775d86f1e52e4c341a (diff) | |
download | pdfium-a8a39e25af3c19bb91434fdf367cffa0e1536934.tar.xz |
Allow building of XFA branch without XFA
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1399833002 .
Diffstat (limited to 'fpdfsdk/src/fpdfxfa')
-rw-r--r-- | fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp | 4 | ||||
-rw-r--r-- | fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp | 12 |
2 files changed, 14 insertions, 2 deletions
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp index 255d2bb024..fed3f32318 100644 --- a/fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp +++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp @@ -43,14 +43,17 @@ CPDFXFA_App::~CPDFXFA_App() { delete m_pXFAApp;
m_pXFAApp = NULL;
+#ifdef PDF_ENABLE_XFA
FXJSE_Runtime_Release(m_hJSERuntime);
m_hJSERuntime = NULL;
FXJSE_Finalize();
BC_Library_Destory();
+#endif
}
FX_BOOL CPDFXFA_App::Initialize() {
+#ifdef PDF_ENABLE_XFA
BC_Library_Init();
FXJSE_Initialize();
@@ -67,6 +70,7 @@ FX_BOOL CPDFXFA_App::Initialize() { return FALSE;
m_pXFAApp->SetDefaultFontMgr(m_pFontMgr);
+#endif
return TRUE;
}
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp index cef65acd1b..365d5d786b 100644 --- a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp +++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp @@ -338,7 +338,10 @@ FX_BOOL CPDFXFA_Document::GetPopupPos(IXFA_Widget* hWidget, CXFA_WidgetAcc* pWidgetAcc =
m_pXFADocView->GetWidgetHandler()->GetDataAcc(hWidget);
- int nRotate = pWidgetAcc->GetRotate();
+ int nRotate = 0;
+#ifdef PDF_ENABLE_XFA
+ nRotate = pWidgetAcc->GetRotate();
+#endif
CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
if (pEnv == NULL)
@@ -894,6 +897,7 @@ FX_BOOL CPDFXFA_Document::_NotifySubmit(FX_BOOL bPrevOrPost) { }
FX_BOOL CPDFXFA_Document::_OnBeforeNotifySumbit() {
+#ifdef PDF_ENABLE_XFA
if (m_iDocType != DOCTYPE_DYNIMIC_XFA && m_iDocType != DOCTYPE_STATIC_XFA)
return TRUE;
if (m_pXFADocView == NULL)
@@ -939,7 +943,7 @@ FX_BOOL CPDFXFA_Document::_OnBeforeNotifySumbit() { pWidgetAccIterator->Release();
m_pXFADocView->UpdateDocView();
}
-
+#endif
return TRUE;
}
void CPDFXFA_Document::_OnAfterNotifySumbit() {
@@ -1190,6 +1194,7 @@ FX_BOOL CPDFXFA_Document::_MailToInfo(CFX_WideString& csURL, }
FX_BOOL CPDFXFA_Document::_SubmitData(IXFA_Doc* hDoc, CXFA_Submit submit) {
+#ifdef PDF_ENABLE_XFA
CFX_WideStringC csURLC;
submit.GetSubmitTarget(csURLC);
CFX_WideString csURL = csURLC;
@@ -1290,6 +1295,9 @@ FX_BOOL CPDFXFA_Document::_SubmitData(IXFA_Doc* hDoc, CXFA_Submit submit) { }
return bRet;
+#else
+ return TRUE;
+#endif
}
FX_BOOL CPDFXFA_Document::SetGlobalProperty(IXFA_Doc* hDoc,
|