summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_pageview.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-12 19:21:46 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-12 19:21:46 +0000
commita3843c99e7a631b2fbf87bbc12834e61bfb7b6f2 (patch)
tree4bc4f0c8c75b40a8a7cfe1246a36b69a1ac9900c /fpdfsdk/cpdfsdk_pageview.h
parent82c730bf83c7582d360fc4080c7729115b0a9550 (diff)
downloadpdfium-a3843c99e7a631b2fbf87bbc12834e61bfb7b6f2.tar.xz
Remove some #ifdef XFA in favor of runtime checks.chromium/3457
Make LoadDocumentImpl() logic match FPDFAvail_GetDocument() logic, so that the XFA extension is loaded before checking unsupported features. Add some comments along the way. Change-Id: I040e40fcca872f7c0a46e921bce1146f0fe42588 Reviewed-on: https://pdfium-review.googlesource.com/34931 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_pageview.h')
-rw-r--r--fpdfsdk/cpdfsdk_pageview.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/fpdfsdk/cpdfsdk_pageview.h b/fpdfsdk/cpdfsdk_pageview.h
index 38ff288607..46c35e1e2d 100644
--- a/fpdfsdk/cpdfsdk_pageview.h
+++ b/fpdfsdk/cpdfsdk_pageview.h
@@ -44,7 +44,6 @@ class CPDFSDK_PageView final : public CPDF_Page::View {
bool DeleteAnnot(CPDFSDK_Annot* pAnnot);
CPDFSDK_Annot* AddAnnot(CXFA_FFWidget* pPDFAnnot);
CPDFSDK_Annot* GetAnnotByXFAWidget(CXFA_FFWidget* hWidget);
-
CPDFXFA_Page* GetPDFXFAPage() { return ToXFAPage(m_page); }
#endif // PDF_ENABLE_XFA
@@ -66,10 +65,12 @@ class CPDFSDK_PageView final : public CPDF_Page::View {
bool OnFocus(const CFX_PointF& point, uint32_t nFlag);
bool OnLButtonDown(const CFX_PointF& point, uint32_t nFlag);
bool OnLButtonUp(const CFX_PointF& point, uint32_t nFlag);
+
#ifdef PDF_ENABLE_XFA
bool OnRButtonDown(const CFX_PointF& point, uint32_t nFlag);
bool OnRButtonUp(const CFX_PointF& point, uint32_t nFlag);
#endif // PDF_ENABLE_XFA
+
bool OnChar(int nChar, uint32_t nFlag);
bool OnKeyDown(int nKeyCode, int nFlag);
bool OnKeyUp(int nKeyCode, int nFlag);
@@ -88,15 +89,10 @@ class CPDFSDK_PageView final : public CPDF_Page::View {
void SetValid(bool bValid) { m_bValid = bValid; }
bool IsValid() { return m_bValid; }
-
bool IsLocked() { return m_bLocked; }
-
void SetBeingDestroyed() { m_bBeingDestroyed = true; }
bool IsBeingDestroyed() const { return m_bBeingDestroyed; }
-
-#ifndef PDF_ENABLE_XFA
void TakePageOwnership() { m_pOwnsPage.Reset(ToPDFPage(m_page)); }
-#endif // PDF_ENABLE_XFA
private:
CPDFSDK_Annot* GetFXAnnotAtPoint(const CFX_PointF& point);
@@ -117,9 +113,7 @@ class CPDFSDK_PageView final : public CPDF_Page::View {
std::vector<CPDFSDK_Annot*> m_SDKAnnotArray;
UnownedPtr<CPDFSDK_FormFillEnvironment> const m_pFormFillEnv;
CPDFSDK_Annot::ObservedPtr m_pCaptureWidget;
-#ifndef PDF_ENABLE_XFA
RetainPtr<CPDF_Page> m_pOwnsPage;
-#endif // PDF_ENABLE_XFA
bool m_bOnWidget = false;
bool m_bValid = false;
bool m_bLocked = false;