From 80c487809858b74783a00e05cc8164edf4b1307c Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 23 Mar 2017 12:11:20 -0400 Subject: Cleanup some xfa/fxfa code. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This CL moves the .h files to have names corresponding to the contained classes. The .cpp files are moved alongside the .h files. Any extra classes in the .h files have been split into their own files. Change-Id: I14b4efc02417f0df946500e87b6c502e77020db8 Reviewed-on: https://pdfium-review.googlesource.com/3160 Reviewed-by: Tom Sepez Reviewed-by: Nicolás Peña Commit-Queue: dsinclair --- fpdfsdk/cpdfsdk_annothandlermgr.cpp | 4 ++-- fpdfsdk/cpdfsdk_interform.cpp | 6 +++--- fpdfsdk/cpdfsdk_pageview.cpp | 8 ++++---- fpdfsdk/cpdfsdk_widget.cpp | 8 ++++---- fpdfsdk/cpdfsdk_xfawidget.cpp | 2 +- fpdfsdk/cpdfsdk_xfawidgethandler.cpp | 8 ++++---- fpdfsdk/fpdfformfill.cpp | 6 +++--- fpdfsdk/fpdfsave.cpp | 9 +++++---- fpdfsdk/fpdfxfa/cpdfxfa_context.cpp | 13 +++++++------ fpdfsdk/fpdfxfa/cpdfxfa_context.h | 2 +- fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp | 7 ++++--- fpdfsdk/fpdfxfa/cpdfxfa_page.cpp | 4 ++-- 12 files changed, 40 insertions(+), 37 deletions(-) (limited to 'fpdfsdk') diff --git a/fpdfsdk/cpdfsdk_annothandlermgr.cpp b/fpdfsdk/cpdfsdk_annothandlermgr.cpp index c4990674de..287ee11a4d 100644 --- a/fpdfsdk/cpdfsdk_annothandlermgr.cpp +++ b/fpdfsdk/cpdfsdk_annothandlermgr.cpp @@ -21,8 +21,8 @@ #ifdef PDF_ENABLE_XFA #include "fpdfsdk/cpdfsdk_xfawidgethandler.h" #include "fpdfsdk/fpdfxfa/cpdfxfa_page.h" -#include "xfa/fxfa/xfa_ffpageview.h" -#include "xfa/fxfa/xfa_ffwidget.h" +#include "xfa/fxfa/cxfa_ffpageview.h" +#include "xfa/fxfa/cxfa_ffwidget.h" #endif // PDF_ENABLE_XFA CPDFSDK_AnnotHandlerMgr::CPDFSDK_AnnotHandlerMgr( diff --git a/fpdfsdk/cpdfsdk_interform.cpp b/fpdfsdk/cpdfsdk_interform.cpp index 1dbffa4a5a..a16ec93c7a 100644 --- a/fpdfsdk/cpdfsdk_interform.cpp +++ b/fpdfsdk/cpdfsdk_interform.cpp @@ -40,9 +40,9 @@ #include "fpdfsdk/fpdfxfa/cpdfxfa_context.h" #include "fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.h" #include "xfa/fxfa/cxfa_eventparam.h" -#include "xfa/fxfa/xfa_ffdocview.h" -#include "xfa/fxfa/xfa_ffwidget.h" -#include "xfa/fxfa/xfa_ffwidgethandler.h" +#include "xfa/fxfa/cxfa_ffdocview.h" +#include "xfa/fxfa/cxfa_ffwidget.h" +#include "xfa/fxfa/cxfa_ffwidgethandler.h" #endif // PDF_ENABLE_XFA CPDFSDK_InterForm::CPDFSDK_InterForm(CPDFSDK_FormFillEnvironment* pFormFillEnv) diff --git a/fpdfsdk/cpdfsdk_pageview.cpp b/fpdfsdk/cpdfsdk_pageview.cpp index a1a02ef185..7a8e2665c3 100644 --- a/fpdfsdk/cpdfsdk_pageview.cpp +++ b/fpdfsdk/cpdfsdk_pageview.cpp @@ -22,10 +22,10 @@ #ifdef PDF_ENABLE_XFA #include "fpdfsdk/fpdfxfa/cpdfxfa_page.h" -#include "xfa/fxfa/xfa_ffdocview.h" -#include "xfa/fxfa/xfa_ffpageview.h" -#include "xfa/fxfa/xfa_ffwidgethandler.h" -#include "xfa/fxfa/xfa_rendercontext.h" +#include "xfa/fxfa/cxfa_ffdocview.h" +#include "xfa/fxfa/cxfa_ffpageview.h" +#include "xfa/fxfa/cxfa_ffwidgethandler.h" +#include "xfa/fxfa/cxfa_rendercontext.h" #include "xfa/fxgraphics/cfx_graphics.h" #endif // PDF_ENABLE_XFA diff --git a/fpdfsdk/cpdfsdk_widget.cpp b/fpdfsdk/cpdfsdk_widget.cpp index ccfee05575..d3000c6c06 100644 --- a/fpdfsdk/cpdfsdk_widget.cpp +++ b/fpdfsdk/cpdfsdk_widget.cpp @@ -35,10 +35,10 @@ #ifdef PDF_ENABLE_XFA #include "fpdfsdk/fpdfxfa/cpdfxfa_context.h" #include "xfa/fxfa/cxfa_eventparam.h" -#include "xfa/fxfa/fxfa_widget.h" -#include "xfa/fxfa/xfa_ffdocview.h" -#include "xfa/fxfa/xfa_ffwidget.h" -#include "xfa/fxfa/xfa_ffwidgethandler.h" +#include "xfa/fxfa/cxfa_ffdocview.h" +#include "xfa/fxfa/cxfa_ffwidget.h" +#include "xfa/fxfa/cxfa_ffwidgethandler.h" +#include "xfa/fxfa/cxfa_widgetacc.h" #endif // PDF_ENABLE_XFA namespace { diff --git a/fpdfsdk/cpdfsdk_xfawidget.cpp b/fpdfsdk/cpdfsdk_xfawidget.cpp index b30e5f3ac2..902ff2a2e8 100644 --- a/fpdfsdk/cpdfsdk_xfawidget.cpp +++ b/fpdfsdk/cpdfsdk_xfawidget.cpp @@ -7,7 +7,7 @@ #include "fpdfsdk/cpdfsdk_xfawidget.h" #include "fpdfsdk/ipdfsdk_annothandler.h" -#include "xfa/fxfa/xfa_ffwidget.h" +#include "xfa/fxfa/cxfa_ffwidget.h" CPDFSDK_XFAWidget::CPDFSDK_XFAWidget(CXFA_FFWidget* pAnnot, CPDFSDK_PageView* pPageView, diff --git a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp index 653eb8ae43..5e258bc4e5 100644 --- a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp +++ b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp @@ -15,11 +15,11 @@ #include "fpdfsdk/fpdfxfa/cpdfxfa_context.h" #include "xfa/fwl/cfwl_app.h" #include "xfa/fwl/fwl_widgethit.h" +#include "xfa/fxfa/cxfa_ffdocview.h" +#include "xfa/fxfa/cxfa_ffpageview.h" +#include "xfa/fxfa/cxfa_ffwidget.h" +#include "xfa/fxfa/cxfa_ffwidgethandler.h" #include "xfa/fxfa/fxfa_basic.h" -#include "xfa/fxfa/xfa_ffdocview.h" -#include "xfa/fxfa/xfa_ffpageview.h" -#include "xfa/fxfa/xfa_ffwidget.h" -#include "xfa/fxfa/xfa_ffwidgethandler.h" #include "xfa/fxgraphics/cfx_graphics.h" CPDFSDK_XFAWidgetHandler::CPDFSDK_XFAWidgetHandler( diff --git a/fpdfsdk/fpdfformfill.cpp b/fpdfsdk/fpdfformfill.cpp index c664d70c57..c2bbeff7e3 100644 --- a/fpdfsdk/fpdfformfill.cpp +++ b/fpdfsdk/fpdfformfill.cpp @@ -29,9 +29,9 @@ #ifdef PDF_ENABLE_XFA #include "fpdfsdk/fpdfxfa/cpdfxfa_context.h" #include "fpdfsdk/fpdfxfa/cpdfxfa_page.h" -#include "xfa/fxfa/xfa_ffdocview.h" -#include "xfa/fxfa/xfa_ffpageview.h" -#include "xfa/fxfa/xfa_ffwidget.h" +#include "xfa/fxfa/cxfa_ffdocview.h" +#include "xfa/fxfa/cxfa_ffpageview.h" +#include "xfa/fxfa/cxfa_ffwidget.h" static_assert(static_cast(XFA_DocType::PDF) == DOCTYPE_PDF, "PDF doctype must match"); diff --git a/fpdfsdk/fpdfsave.cpp b/fpdfsdk/fpdfsave.cpp index bc67cbba23..fe764f5e1f 100644 --- a/fpdfsdk/fpdfsave.cpp +++ b/fpdfsdk/fpdfsave.cpp @@ -24,11 +24,12 @@ #include "fpdfsdk/fpdfxfa/cpdfxfa_context.h" #include "fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.h" #include "public/fpdf_formfill.h" +#include "xfa/fxfa/cxfa_checksumcontext.h" #include "xfa/fxfa/cxfa_eventparam.h" -#include "xfa/fxfa/xfa_checksum.h" -#include "xfa/fxfa/xfa_ffapp.h" -#include "xfa/fxfa/xfa_ffdocview.h" -#include "xfa/fxfa/xfa_ffwidgethandler.h" +#include "xfa/fxfa/cxfa_ffapp.h" +#include "xfa/fxfa/cxfa_ffdocview.h" +#include "xfa/fxfa/cxfa_ffwidgethandler.h" +#include "xfa/fxfa/cxfa_widgetacciterator.h" #endif #if _FX_OS_ == _FX_ANDROID_ diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp index 8d2996f1de..57735426e7 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp @@ -20,13 +20,14 @@ #include "public/fpdf_formfill.h" #include "third_party/base/ptr_util.h" #include "third_party/base/stl_util.h" +#include "xfa/fxfa/cxfa_deffontmgr.h" #include "xfa/fxfa/cxfa_eventparam.h" -#include "xfa/fxfa/xfa_ffapp.h" -#include "xfa/fxfa/xfa_ffdoc.h" -#include "xfa/fxfa/xfa_ffdocview.h" -#include "xfa/fxfa/xfa_ffpageview.h" -#include "xfa/fxfa/xfa_ffwidgethandler.h" -#include "xfa/fxfa/xfa_fontmgr.h" +#include "xfa/fxfa/cxfa_ffapp.h" +#include "xfa/fxfa/cxfa_ffdoc.h" +#include "xfa/fxfa/cxfa_ffdocview.h" +#include "xfa/fxfa/cxfa_ffpageview.h" +#include "xfa/fxfa/cxfa_ffwidgethandler.h" +#include "xfa/fxfa/cxfa_fontmgr.h" #ifndef _WIN32 extern void SetLastError(int err); diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.h b/fpdfsdk/fpdfxfa/cpdfxfa_context.h index 65e54566e8..8e6b2198af 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_context.h +++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.h @@ -11,7 +11,7 @@ #include #include "fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h" -#include "xfa/fxfa/xfa_ffdoc.h" +#include "xfa/fxfa/cxfa_ffdoc.h" class CJS_Runtime; class CPDFSDK_FormFillEnvironment; diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp index 44d59c69df..45c5d9255b 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp @@ -18,9 +18,10 @@ #include "fpdfsdk/fpdfxfa/cpdfxfa_context.h" #include "fpdfsdk/fpdfxfa/cpdfxfa_page.h" #include "fpdfsdk/javascript/ijs_runtime.h" -#include "xfa/fxfa/xfa_ffdocview.h" -#include "xfa/fxfa/xfa_ffwidget.h" -#include "xfa/fxfa/xfa_ffwidgethandler.h" +#include "xfa/fxfa/cxfa_ffdocview.h" +#include "xfa/fxfa/cxfa_ffwidget.h" +#include "xfa/fxfa/cxfa_ffwidgethandler.h" +#include "xfa/fxfa/cxfa_widgetacciterator.h" #define IDS_XFA_Validate_Input \ "At least one required field was empty. Please fill in the required " \ diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp index 508cf7a15f..e5ab9d357f 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp @@ -13,8 +13,8 @@ #include "fpdfsdk/fsdk_define.h" #include "public/fpdf_formfill.h" #include "third_party/base/ptr_util.h" -#include "xfa/fxfa/xfa_ffdocview.h" -#include "xfa/fxfa/xfa_ffpageview.h" +#include "xfa/fxfa/cxfa_ffdocview.h" +#include "xfa/fxfa/cxfa_ffpageview.h" CPDFXFA_Page::CPDFXFA_Page(CPDFXFA_Context* pContext, int page_index) : m_pXFAPageView(nullptr), -- cgit v1.2.3