diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-04-24 20:54:41 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-04-24 20:54:41 +0000 |
commit | a1d344230925e94bbf43a62ddc814321056c68d5 (patch) | |
tree | 521550993794bc12ae4927529a780d72f89e5283 /fpdfsdk | |
parent | b242943f5e949ce3d92dcb62c7497815ccd231d1 (diff) | |
download | pdfium-a1d344230925e94bbf43a62ddc814321056c68d5.tar.xz |
Fix include order for cpdfxfa_context.hchromium/3407
It should include cpdfsdk_helpers, not the other way around.
Change-Id: Id2cc3018e8c38f82ce8a35b03bb90e936aa1d446
Reviewed-on: https://pdfium-review.googlesource.com/31294
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/cpdfsdk_annot.h | 4 | ||||
-rw-r--r-- | fpdfsdk/cpdfsdk_formfillenvironment.cpp | 14 | ||||
-rw-r--r-- | fpdfsdk/cpdfsdk_formfillenvironment.h | 6 | ||||
-rw-r--r-- | fpdfsdk/cpdfsdk_helpers.cpp | 5 | ||||
-rw-r--r-- | fpdfsdk/cpdfsdk_helpers.h | 7 | ||||
-rw-r--r-- | fpdfsdk/cpdfsdk_pageview.cpp | 1 | ||||
-rw-r--r-- | fpdfsdk/fpdf_catalog_unittest.cpp | 1 | ||||
-rw-r--r-- | fpdfsdk/fpdf_doc_unittest.cpp | 1 | ||||
-rw-r--r-- | fpdfsdk/fpdf_ppo_embeddertest.cpp | 1 | ||||
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_context.h | 1 |
10 files changed, 36 insertions, 5 deletions
diff --git a/fpdfsdk/cpdfsdk_annot.h b/fpdfsdk/cpdfsdk_annot.h index f3311bc560..bf6e2cc387 100644 --- a/fpdfsdk/cpdfsdk_annot.h +++ b/fpdfsdk/cpdfsdk_annot.h @@ -22,6 +22,10 @@ class CPDF_Page; class CPDF_RenderOptions; class CPDFSDK_PageView; +#ifdef PDF_ENABLE_XFA +class CXFA_FFWidget; +#endif // PDF_ENABLE_XFA + class CPDFSDK_Annot : public Observable<CPDFSDK_Annot> { public: explicit CPDFSDK_Annot(CPDFSDK_PageView* pPageView); diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.cpp b/fpdfsdk/cpdfsdk_formfillenvironment.cpp index 272e27032b..a115355d9c 100644 --- a/fpdfsdk/cpdfsdk_formfillenvironment.cpp +++ b/fpdfsdk/cpdfsdk_formfillenvironment.cpp @@ -20,6 +20,10 @@ #include "fxjs/ijs_runtime.h" #include "third_party/base/ptr_util.h" +#ifdef PDF_ENABLE_XFA +#include "fpdfsdk/fpdfxfa/cpdfxfa_context.h" +#endif + FPDF_WIDESTRING AsFPDFWideString(ByteString* bsUTF16LE) { // Force a private version of the string, since we're about to hand it off // to the embedder. Should the embedder modify it by accident, it won't @@ -704,6 +708,16 @@ bool CPDFSDK_FormFillEnvironment::KillFocusAnnot(uint32_t nFlag) { return !m_pFocusAnnot; } +#ifdef PDF_ENABLE_XFA +CPDF_Document* CPDFSDK_FormFillEnvironment::GetPDFDocument() const { + return m_pUnderlyingDoc ? m_pUnderlyingDoc->GetPDFDoc() : nullptr; +} +#endif // PDF_ENABLE_XFA + +int CPDFSDK_FormFillEnvironment::GetPageCount() const { + return m_pUnderlyingDoc->GetPageCount(); +} + bool CPDFSDK_FormFillEnvironment::GetPermissions(int nFlag) const { return !!(GetPDFDocument()->GetUserPermissions() & nFlag); } diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.h b/fpdfsdk/cpdfsdk_formfillenvironment.h index d60f2eca94..eac9067730 100644 --- a/fpdfsdk/cpdfsdk_formfillenvironment.h +++ b/fpdfsdk/cpdfsdk_formfillenvironment.h @@ -81,7 +81,7 @@ class CPDFSDK_FormFillEnvironment const CPDF_Document* pSrcDoc, const std::vector<uint16_t>& arrSrcPages); - int GetPageCount() const { return m_pUnderlyingDoc->GetPageCount(); } + int GetPageCount() const; bool GetPermissions(int nFlag) const; bool GetChangeMark() const { return m_bChangeMask; } @@ -118,9 +118,7 @@ class CPDFSDK_FormFillEnvironment } #ifdef PDF_ENABLE_XFA - CPDF_Document* GetPDFDocument() const { - return m_pUnderlyingDoc ? m_pUnderlyingDoc->GetPDFDoc() : nullptr; - } + CPDF_Document* GetPDFDocument() const; CPDFXFA_Context* GetXFAContext() const { return m_pUnderlyingDoc.Get(); } void ResetXFADocument() { m_pUnderlyingDoc = nullptr; } diff --git a/fpdfsdk/cpdfsdk_helpers.cpp b/fpdfsdk/cpdfsdk_helpers.cpp index 9cf4c44147..4c417e15e5 100644 --- a/fpdfsdk/cpdfsdk_helpers.cpp +++ b/fpdfsdk/cpdfsdk_helpers.cpp @@ -8,6 +8,7 @@ #include "constants/stream_dict_common.h" #include "core/fpdfapi/cpdf_modulemgr.h" +#include "core/fpdfapi/page/cpdf_page.h" #include "core/fpdfapi/parser/cpdf_array.h" #include "core/fpdfapi/parser/cpdf_document.h" #include "core/fpdfapi/parser/fpdf_parser_decode.h" @@ -16,6 +17,10 @@ #include "core/fpdfdoc/cpdf_metadata.h" #include "public/fpdf_ext.h" +#ifdef PDF_ENABLE_XFA +#include "fpdfsdk/fpdfxfa/cpdfxfa_context.h" +#endif + namespace { constexpr char kQuadPoints[] = "QuadPoints"; diff --git a/fpdfsdk/cpdfsdk_helpers.h b/fpdfsdk/cpdfsdk_helpers.h index a5e03292a0..a9708ccddb 100644 --- a/fpdfsdk/cpdfsdk_helpers.h +++ b/fpdfsdk/cpdfsdk_helpers.h @@ -14,7 +14,7 @@ #include "public/fpdfview.h" #ifdef PDF_ENABLE_XFA -#include "fpdfsdk/fpdfxfa/cpdfxfa_context.h" +#include "core/fxcrt/fx_stream.h" #endif // PDF_ENABLE_XFA #ifdef _WIN32 @@ -31,6 +31,11 @@ class CPDF_Stream; class IPDFSDK_PauseAdapter; class FX_PATHPOINT; +#ifdef PDF_ENABLE_XFA +class CPDFXFA_Context; +class CPDFXFA_Page; +#endif // PDF_ENABLE_XFA + // Object types for public FPDF_ types; these correspond to next layer down // from fpdfsdk. For master, these are CPDF_ types, but for XFA, these are // CPDFXFA_ types. diff --git a/fpdfsdk/cpdfsdk_pageview.cpp b/fpdfsdk/cpdfsdk_pageview.cpp index b68828b144..e648e596c4 100644 --- a/fpdfsdk/cpdfsdk_pageview.cpp +++ b/fpdfsdk/cpdfsdk_pageview.cpp @@ -21,6 +21,7 @@ #include "third_party/base/ptr_util.h" #ifdef PDF_ENABLE_XFA +#include "fpdfsdk/fpdfxfa/cpdfxfa_context.h" #include "fpdfsdk/fpdfxfa/cpdfxfa_page.h" #include "xfa/fxfa/cxfa_ffdocview.h" #include "xfa/fxfa/cxfa_ffpageview.h" diff --git a/fpdfsdk/fpdf_catalog_unittest.cpp b/fpdfsdk/fpdf_catalog_unittest.cpp index b00748b49d..5bb55594eb 100644 --- a/fpdfsdk/fpdf_catalog_unittest.cpp +++ b/fpdfsdk/fpdf_catalog_unittest.cpp @@ -11,6 +11,7 @@ #include "core/fpdfapi/parser/cpdf_number.h" #include "core/fpdfapi/parser/cpdf_parser.h" #include "core/fpdfapi/parser/cpdf_string.h" +#include "fpdfsdk/cpdfsdk_helpers.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/test_support.h" diff --git a/fpdfsdk/fpdf_doc_unittest.cpp b/fpdfsdk/fpdf_doc_unittest.cpp index b52cccf098..0aea5534da 100644 --- a/fpdfsdk/fpdf_doc_unittest.cpp +++ b/fpdfsdk/fpdf_doc_unittest.cpp @@ -17,6 +17,7 @@ #include "core/fpdfapi/parser/cpdf_reference.h" #include "core/fpdfapi/parser/cpdf_string.h" #include "core/fpdfdoc/cpdf_dest.h" +#include "fpdfsdk/cpdfsdk_helpers.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/test_support.h" #include "third_party/base/ptr_util.h" diff --git a/fpdfsdk/fpdf_ppo_embeddertest.cpp b/fpdfsdk/fpdf_ppo_embeddertest.cpp index f62ca52048..614573b24f 100644 --- a/fpdfsdk/fpdf_ppo_embeddertest.cpp +++ b/fpdfsdk/fpdf_ppo_embeddertest.cpp @@ -5,6 +5,7 @@ #include <memory> #include <string> +#include "fpdfsdk/cpdfsdk_helpers.h" #include "public/cpp/fpdf_deleters.h" #include "public/fpdf_edit.h" #include "public/fpdf_ppo.h" diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.h b/fpdfsdk/fpdfxfa/cpdfxfa_context.h index 3eca1b548c..188f1fbe2f 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_context.h +++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.h @@ -13,6 +13,7 @@ #include "core/fxcrt/fx_system.h" #include "core/fxcrt/observable.h" #include "core/fxcrt/unowned_ptr.h" +#include "fpdfsdk/cpdfsdk_helpers.h" #include "fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h" #include "fpdfsdk/fpdfxfa/cpdfxfa_page.h" #include "xfa/fxfa/cxfa_ffdoc.h" |