summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_annot.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-13 21:26:56 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-13 21:26:56 +0000
commit8e631772e34256ca2f3bb86a1e23cca34fe8d4fa (patch)
tree9db04b7412a6f2cd3339c508712e6a97cee7096e /fpdfsdk/cpdfsdk_annot.cpp
parent571053a44f876fe970dd85ee61483b6846a2f383 (diff)
downloadpdfium-8e631772e34256ca2f3bb86a1e23cca34fe8d4fa.tar.xz
Collapse some more xfa/non-xfa code in cpdfsdk annots.chromium/3459chromium/3458
cpdfsdk_annot.cpp:315 and cpdfsdk_annot.cpp:338 are nearly identical, except that the #ifdef XFA code passed along the correct type from the argument. Prefer this behaviour even when non-XFA. Change-Id: Id4d5fbcc773ffd10746c4ddc77a571e818e5a957 Reviewed-on: https://pdfium-review.googlesource.com/35030 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_annot.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_annot.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/fpdfsdk/cpdfsdk_annot.cpp b/fpdfsdk/cpdfsdk_annot.cpp
index 6c17628a33..cfd87b3255 100644
--- a/fpdfsdk/cpdfsdk_annot.cpp
+++ b/fpdfsdk/cpdfsdk_annot.cpp
@@ -75,10 +75,11 @@ CFX_FloatRect CPDFSDK_Annot::GetRect() const {
IPDF_Page* CPDFSDK_Annot::GetPage() {
#ifdef PDF_ENABLE_XFA
- return GetPDFXFAPage();
-#else // PDF_ENABLE_XFA
- return GetPDFPage();
+ CPDFXFA_Page* pXFAPage = GetPDFXFAPage();
+ if (pXFAPage)
+ return pXFAPage;
#endif // PDF_ENABLE_XFA
+ return GetPDFPage();
}
CPDF_Page* CPDFSDK_Annot::GetPDFPage() {