summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_baseannot.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-11-30 12:39:54 -0800
committerTom Sepez <tsepez@chromium.org>2015-11-30 12:39:54 -0800
commit40e9ff30b7f22b37c071dc9751f489d4cc22b0ee (patch)
tree33f50b65518fcb32bc197adc94bb0073244113e1 /fpdfsdk/src/fsdk_baseannot.cpp
parentd029d934e1a23aadc07cc99753a55b308f20ef2b (diff)
downloadpdfium-40e9ff30b7f22b37c071dc9751f489d4cc22b0ee.tar.xz
Tidy PDF_ENABLE_XFA #ifdefs in fpdfsdk.
-- label matching #endifs -- prefer #ifdef over #ifndef -- consolidate some blocks. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1484843002 .
Diffstat (limited to 'fpdfsdk/src/fsdk_baseannot.cpp')
-rw-r--r--fpdfsdk/src/fsdk_baseannot.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/fpdfsdk/src/fsdk_baseannot.cpp b/fpdfsdk/src/fsdk_baseannot.cpp
index 2453ec5596..c2036a5ba8 100644
--- a/fpdfsdk/src/fsdk_baseannot.cpp
+++ b/fpdfsdk/src/fsdk_baseannot.cpp
@@ -5,13 +5,14 @@
// 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"
+#ifdef PDF_ENABLE_XFA
+#include "fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h"
+#endif // PDF_ENABLE_XFA
+
int _gAfxGetTimeZoneInSeconds(FX_CHAR tzhour, uint8_t tzminute) {
return (int)tzhour * 3600 + (int)tzminute * (tzhour >= 0 ? 60 : -60);
}
@@ -973,24 +974,22 @@ CPDF_Action CPDFSDK_BAAnnot::GetAAction(CPDF_AAction::AActionType eAAT) {
FX_BOOL CPDFSDK_BAAnnot::IsXFAField() {
return FALSE;
}
+#endif // PDF_ENABLE_XFA
-#endif
void CPDFSDK_BAAnnot::Annot_OnDraw(CFX_RenderDevice* pDevice,
CPDF_Matrix* pUser2Device,
CPDF_RenderOptions* pOptions) {
m_pAnnot->GetAPForm(m_pPageView->GetPDFPage(), CPDF_Annot::Normal);
m_pAnnot->DrawAppearance(m_pPageView->GetPDFPage(), pDevice, pUser2Device,
CPDF_Annot::Normal, NULL);
-
- return;
}
UnderlyingPageType* CPDFSDK_Annot::GetUnderlyingPage() {
-#ifndef PDF_ENABLE_XFA
- return GetPDFPage();
-#else
+#ifdef PDF_ENABLE_XFA
return GetPDFXFAPage();
-#endif
+#else // PDF_ENABLE_XFA
+ return GetPDFPage();
+#endif // PDF_ENABLE_XFA
}
CPDF_Page* CPDFSDK_Annot::GetPDFPage() {
@@ -998,11 +997,11 @@ CPDF_Page* CPDFSDK_Annot::GetPDFPage() {
return m_pPageView->GetPDFPage();
return NULL;
}
-#ifdef PDF_ENABLE_XFA
+#ifdef PDF_ENABLE_XFA
CPDFXFA_Page* CPDFSDK_Annot::GetPDFXFAPage() {
if (m_pPageView)
return m_pPageView->GetPDFXFAPage();
return NULL;
}
-#endif
+#endif // PDF_ENABLE_XFA