diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-04-20 13:13:04 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-20 17:49:41 +0000 |
commit | cfb1944e245e20fe2ce0e94feebc06526db34fa1 (patch) | |
tree | 6728e3ebca9e53dc97a18e1f5f37c3d53d9bb404 /xfa | |
parent | 6864bf8c4fbcac0833a77d044f17f4100d504f2a (diff) | |
download | pdfium-cfb1944e245e20fe2ce0e94feebc06526db34fa1.tar.xz |
Cleanup the fx_extension code.
This CL cleans up the fx_extension file. The stream code was moved to
fx_stream. IFX_FileAccess was removed and CFX_CRTFileAccess split to its
own file. Code shuffled from header to cpp file.
Change-Id: I700fdfcc9797cf4e8050cd9ba010ad8854feefbf
Reviewed-on: https://pdfium-review.googlesource.com/4371
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa')
28 files changed, 35 insertions, 33 deletions
diff --git a/xfa/fde/css/cfde_cssdeclaration.cpp b/xfa/fde/css/cfde_cssdeclaration.cpp index 8983059220..4de8cb74f0 100644 --- a/xfa/fde/css/cfde_cssdeclaration.cpp +++ b/xfa/fde/css/cfde_cssdeclaration.cpp @@ -6,7 +6,7 @@ #include "xfa/fde/css/cfde_cssdeclaration.h" -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" #include "third_party/base/ptr_util.h" #include "xfa/fde/css/cfde_csscolorvalue.h" #include "xfa/fde/css/cfde_csscustomproperty.h" diff --git a/xfa/fde/css/fde_cssdatatable.cpp b/xfa/fde/css/fde_cssdatatable.cpp index 5fa9cf0dc9..79170bc072 100644 --- a/xfa/fde/css/fde_cssdatatable.cpp +++ b/xfa/fde/css/fde_cssdatatable.cpp @@ -9,7 +9,7 @@ #include <utility> #include "core/fxcrt/fx_codepage.h" -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" #include "xfa/fde/css/cfde_cssstyleselector.h" #include "xfa/fde/css/cfde_cssvaluelistparser.h" diff --git a/xfa/fgas/crt/cfgas_formatstring.cpp b/xfa/fgas/crt/cfgas_formatstring.cpp index 6cb8281993..6d940d6c94 100644 --- a/xfa/fgas/crt/cfgas_formatstring.cpp +++ b/xfa/fgas/crt/cfgas_formatstring.cpp @@ -10,7 +10,7 @@ #include <vector> #include "core/fxcrt/cfx_decimal.h" -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" #include "core/fxcrt/xml/cxml_element.h" #define FX_LOCALECATEGORY_DateHash 0xbde9abde diff --git a/xfa/fgas/font/cfgas_fontmgr.cpp b/xfa/fgas/font/cfgas_fontmgr.cpp index e0b71118d9..74c284012f 100644 --- a/xfa/fgas/font/cfgas_fontmgr.cpp +++ b/xfa/fgas/font/cfgas_fontmgr.cpp @@ -678,12 +678,11 @@ bool CFX_FontSourceEnum_File::HasStartPosition() { return m_wsNext.GetLength() != 0; } -CFX_RetainPtr<IFX_FileAccess> CFX_FontSourceEnum_File::GetNext() { +CFX_RetainPtr<CFX_CRTFileAccess> CFX_FontSourceEnum_File::GetNext() { if (m_wsNext.GetLength() == 0) return nullptr; - CFX_RetainPtr<IFX_FileAccess> pAccess = - IFX_FileAccess::CreateDefault(m_wsNext.AsStringC()); + auto pAccess = pdfium::MakeRetain<CFX_CRTFileAccess>(m_wsNext.AsStringC()); m_wsNext = GetNextFile().UTF8Decode(); return pAccess; } @@ -733,7 +732,8 @@ bool CFGAS_FontMgr::EnumFontsFromFiles() { if (!m_pFontSource->HasStartPosition()) return !m_InstalledFonts.empty(); - while (CFX_RetainPtr<IFX_FileAccess> pFontSource = m_pFontSource->GetNext()) { + while (CFX_RetainPtr<CFX_CRTFileAccess> pFontSource = + m_pFontSource->GetNext()) { CFX_RetainPtr<IFX_SeekableReadStream> pFontStream = pFontSource->CreateFileStream(FX_FILEMODE_ReadOnly); if (pFontStream) diff --git a/xfa/fgas/font/cfgas_fontmgr.h b/xfa/fgas/font/cfgas_fontmgr.h index cca999a869..1ef78a79a6 100644 --- a/xfa/fgas/font/cfgas_fontmgr.h +++ b/xfa/fgas/font/cfgas_fontmgr.h @@ -13,9 +13,10 @@ #include <set> #include <vector> +#include "core/fxcrt/cfx_crtfileaccess.h" #include "core/fxcrt/cfx_retain_ptr.h" #include "core/fxcrt/cfx_seekablestreamproxy.h" -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" #include "core/fxge/cfx_fontmapper.h" #include "core/fxge/fx_freetype.h" #include "core/fxge/ifx_systemfontinfo.h" @@ -169,7 +170,7 @@ class CFX_FontSourceEnum_File { ~CFX_FontSourceEnum_File(); bool HasStartPosition(); - CFX_RetainPtr<IFX_FileAccess> GetNext(); + CFX_RetainPtr<CFX_CRTFileAccess> GetNext(); private: CFX_ByteString GetNextFile(); diff --git a/xfa/fgas/font/fgas_fontutils.cpp b/xfa/fgas/font/fgas_fontutils.cpp index 82930094ec..44f9423297 100644 --- a/xfa/fgas/font/fgas_fontutils.cpp +++ b/xfa/fgas/font/fgas_fontutils.cpp @@ -7,7 +7,7 @@ #include "xfa/fgas/font/fgas_fontutils.h" #include "core/fxcrt/fx_codepage.h" -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" #include "xfa/fgas/font/cfgas_fontmgr.h" namespace { diff --git a/xfa/fwl/cfwl_notedriver.cpp b/xfa/fwl/cfwl_notedriver.cpp index 9012100c32..364ef196a9 100644 --- a/xfa/fwl/cfwl_notedriver.cpp +++ b/xfa/fwl/cfwl_notedriver.cpp @@ -9,7 +9,7 @@ #include <algorithm> #include <utility> -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" #include "third_party/base/ptr_util.h" #include "third_party/base/stl_util.h" #include "xfa/fwl/cfwl_app.h" diff --git a/xfa/fxfa/app/xfa_ffbarcode.cpp b/xfa/fxfa/app/xfa_ffbarcode.cpp index 92d687781d..4e5e1f0a41 100644 --- a/xfa/fxfa/app/xfa_ffbarcode.cpp +++ b/xfa/fxfa/app/xfa_ffbarcode.cpp @@ -8,7 +8,7 @@ #include <utility> -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" #include "third_party/base/ptr_util.h" #include "xfa/fwl/cfwl_app.h" #include "xfa/fwl/cfwl_barcode.h" diff --git a/xfa/fxfa/cxfa_ffdoc.cpp b/xfa/fxfa/cxfa_ffdoc.cpp index 04741f9082..5e36c08ff0 100644 --- a/xfa/fxfa/cxfa_ffdoc.cpp +++ b/xfa/fxfa/cxfa_ffdoc.cpp @@ -15,7 +15,7 @@ #include "core/fpdfapi/parser/fpdf_parser_decode.h" #include "core/fpdfdoc/cpdf_nametree.h" #include "core/fxcrt/cfx_checksumcontext.h" -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" #include "core/fxcrt/fx_memory.h" #include "core/fxcrt/xml/cfx_xmlelement.h" #include "core/fxcrt/xml/cfx_xmlnode.h" diff --git a/xfa/fxfa/cxfa_ffdocview.cpp b/xfa/fxfa/cxfa_ffdocview.cpp index 488a31f299..00f759a7f5 100644 --- a/xfa/fxfa/cxfa_ffdocview.cpp +++ b/xfa/fxfa/cxfa_ffdocview.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/cxfa_ffdocview.h" -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" #include "third_party/base/ptr_util.h" #include "third_party/base/stl_util.h" #include "xfa/fxfa/app/xfa_ffbarcode.h" diff --git a/xfa/fxfa/cxfa_fontmgr.h b/xfa/fxfa/cxfa_fontmgr.h index 8652a34422..f66ca8f314 100644 --- a/xfa/fxfa/cxfa_fontmgr.h +++ b/xfa/fxfa/cxfa_fontmgr.h @@ -12,7 +12,7 @@ #include <vector> #include "core/fxcrt/cfx_retain_ptr.h" -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" #include "core/fxcrt/fx_system.h" #include "xfa/fgas/font/cfgas_fontmgr.h" #include "xfa/fxfa/cxfa_deffontmgr.h" diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp index 4621dfe134..bf44ffbcc4 100644 --- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp +++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp @@ -11,7 +11,7 @@ #include <algorithm> #include "core/fxcrt/cfx_decimal.h" -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" #include "fxjs/cfxjse_arguments.h" #include "fxjs/cfxjse_class.h" #include "fxjs/cfxjse_value.h" diff --git a/xfa/fxfa/fm2js/xfa_lexer.cpp b/xfa/fxfa/fm2js/xfa_lexer.cpp index 7ccd4773fb..b646743d10 100644 --- a/xfa/fxfa/fm2js/xfa_lexer.cpp +++ b/xfa/fxfa/fm2js/xfa_lexer.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/fm2js/xfa_lexer.h" -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" namespace { diff --git a/xfa/fxfa/fm2js/xfa_simpleexpression.cpp b/xfa/fxfa/fm2js/xfa_simpleexpression.cpp index 7bc703b59b..872fe7e2e8 100644 --- a/xfa/fxfa/fm2js/xfa_simpleexpression.cpp +++ b/xfa/fxfa/fm2js/xfa_simpleexpression.cpp @@ -8,7 +8,7 @@ #include <utility> -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" namespace { diff --git a/xfa/fxfa/parser/cxfa_data.cpp b/xfa/fxfa/parser/cxfa_data.cpp index 9f265b41be..bdfc25c79c 100644 --- a/xfa/fxfa/parser/cxfa_data.cpp +++ b/xfa/fxfa/parser/cxfa_data.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/parser/cxfa_data.h" -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" #include "xfa/fxfa/parser/cxfa_measurement.h" #include "xfa/fxfa/parser/cxfa_node.h" diff --git a/xfa/fxfa/parser/cxfa_document.cpp b/xfa/fxfa/parser/cxfa_document.cpp index 8e39dafa84..4b0a398ae2 100644 --- a/xfa/fxfa/parser/cxfa_document.cpp +++ b/xfa/fxfa/parser/cxfa_document.cpp @@ -4,7 +4,9 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/fx_ext.h" +#include "xfa/fxfa/parser/cxfa_document.h" + +#include "core/fxcrt/fx_extension.h" #include "xfa/fxfa/app/xfa_ffnotify.h" #include "xfa/fxfa/parser/cscript_datawindow.h" #include "xfa/fxfa/parser/cscript_eventpseudomodel.h" @@ -12,7 +14,6 @@ #include "xfa/fxfa/parser/cscript_layoutpseudomodel.h" #include "xfa/fxfa/parser/cscript_logpseudomodel.h" #include "xfa/fxfa/parser/cscript_signaturepseudomodel.h" -#include "xfa/fxfa/parser/cxfa_document.h" #include "xfa/fxfa/parser/cxfa_document_parser.h" #include "xfa/fxfa/parser/cxfa_layoutprocessor.h" #include "xfa/fxfa/parser/cxfa_localemgr.h" diff --git a/xfa/fxfa/parser/cxfa_localevalue.cpp b/xfa/fxfa/parser/cxfa_localevalue.cpp index 67780924c2..d2e526eb95 100644 --- a/xfa/fxfa/parser/cxfa_localevalue.cpp +++ b/xfa/fxfa/parser/cxfa_localevalue.cpp @@ -8,7 +8,7 @@ #include <vector> -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" #include "third_party/base/ptr_util.h" #include "third_party/base/stl_util.h" #include "xfa/fgas/crt/cfgas_formatstring.h" diff --git a/xfa/fxfa/parser/cxfa_measurement.cpp b/xfa/fxfa/parser/cxfa_measurement.cpp index fd00c42d34..9173223d3c 100644 --- a/xfa/fxfa/parser/cxfa_measurement.cpp +++ b/xfa/fxfa/parser/cxfa_measurement.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/parser/cxfa_measurement.h" -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" CXFA_Measurement::CXFA_Measurement(const CFX_WideStringC& wsMeasure) { Set(wsMeasure); diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp index ce45ae10db..a3c9ee42e0 100644 --- a/xfa/fxfa/parser/cxfa_node.cpp +++ b/xfa/fxfa/parser/cxfa_node.cpp @@ -14,7 +14,7 @@ #include "core/fxcrt/cfx_decimal.h" #include "core/fxcrt/fx_codepage.h" -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" #include "core/fxcrt/xml/cfx_xmlelement.h" #include "core/fxcrt/xml/cfx_xmlnode.h" #include "core/fxcrt/xml/cfx_xmltext.h" diff --git a/xfa/fxfa/parser/cxfa_nodehelper.cpp b/xfa/fxfa/parser/cxfa_nodehelper.cpp index abfca84609..547831caca 100644 --- a/xfa/fxfa/parser/cxfa_nodehelper.cpp +++ b/xfa/fxfa/parser/cxfa_nodehelper.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/parser/cxfa_nodehelper.h" -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" #include "xfa/fxfa/parser/cxfa_document.h" #include "xfa/fxfa/parser/cxfa_localemgr.h" #include "xfa/fxfa/parser/cxfa_node.h" diff --git a/xfa/fxfa/parser/cxfa_nodelist.cpp b/xfa/fxfa/parser/cxfa_nodelist.cpp index 86efb29eba..f47a1b1752 100644 --- a/xfa/fxfa/parser/cxfa_nodelist.cpp +++ b/xfa/fxfa/parser/cxfa_nodelist.cpp @@ -8,7 +8,7 @@ #include <memory> -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" #include "xfa/fxfa/parser/cxfa_document.h" #include "xfa/fxfa/parser/cxfa_node.h" #include "xfa/fxfa/parser/cxfa_scriptcontext.h" diff --git a/xfa/fxfa/parser/cxfa_object.cpp b/xfa/fxfa/parser/cxfa_object.cpp index 9bbee4ec75..30aae88307 100644 --- a/xfa/fxfa/parser/cxfa_object.cpp +++ b/xfa/fxfa/parser/cxfa_object.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/parser/cxfa_object.h" -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" #include "fxjs/cfxjse_value.h" #include "xfa/fxfa/app/xfa_ffnotify.h" #include "xfa/fxfa/parser/cxfa_document.h" diff --git a/xfa/fxfa/parser/cxfa_resolveprocessor.cpp b/xfa/fxfa/parser/cxfa_resolveprocessor.cpp index 51487a1e2b..14adc7793e 100644 --- a/xfa/fxfa/parser/cxfa_resolveprocessor.cpp +++ b/xfa/fxfa/parser/cxfa_resolveprocessor.cpp @@ -10,7 +10,7 @@ #include <utility> #include <vector> -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" #include "third_party/base/ptr_util.h" #include "third_party/base/stl_util.h" #include "xfa/fxfa/parser/cxfa_document.h" diff --git a/xfa/fxfa/parser/cxfa_scriptcontext.cpp b/xfa/fxfa/parser/cxfa_scriptcontext.cpp index f539c39f76..b0b52299e7 100644 --- a/xfa/fxfa/parser/cxfa_scriptcontext.cpp +++ b/xfa/fxfa/parser/cxfa_scriptcontext.cpp @@ -8,7 +8,7 @@ #include <utility> -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" #include "fxjs/cfxjse_arguments.h" #include "fxjs/cfxjse_class.h" #include "fxjs/cfxjse_value.h" diff --git a/xfa/fxfa/parser/cxfa_simple_parser.cpp b/xfa/fxfa/parser/cxfa_simple_parser.cpp index 9fd684c0a9..db15a80a44 100644 --- a/xfa/fxfa/parser/cxfa_simple_parser.cpp +++ b/xfa/fxfa/parser/cxfa_simple_parser.cpp @@ -12,7 +12,7 @@ #include "core/fxcrt/cfx_checksumcontext.h" #include "core/fxcrt/cfx_seekablestreamproxy.h" #include "core/fxcrt/fx_codepage.h" -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" #include "core/fxcrt/xml/cfx_xmlchardata.h" #include "core/fxcrt/xml/cfx_xmldoc.h" #include "core/fxcrt/xml/cfx_xmlelement.h" diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp index 8784b6e9d1..2f90f59bdd 100644 --- a/xfa/fxfa/parser/cxfa_widgetdata.cpp +++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp @@ -7,7 +7,7 @@ #include "xfa/fxfa/parser/cxfa_widgetdata.h" #include "core/fxcrt/cfx_decimal.h" -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" #include "fxbarcode/BC_Library.h" #include "third_party/base/stl_util.h" #include "xfa/fxfa/app/xfa_ffnotify.h" diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp index f338595605..46a2af4a76 100644 --- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp +++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp @@ -9,7 +9,7 @@ #include <map> #include <vector> -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" #include "core/fxcrt/xml/cfx_xmlelement.h" #include "core/fxcrt/xml/cfx_xmlnode.h" #include "third_party/base/stl_util.h" diff --git a/xfa/fxfa/parser/xfa_utils.cpp b/xfa/fxfa/parser/xfa_utils.cpp index 1c5adc75c9..fa75f18015 100644 --- a/xfa/fxfa/parser/xfa_utils.cpp +++ b/xfa/fxfa/parser/xfa_utils.cpp @@ -8,7 +8,7 @@ #include <algorithm> -#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_extension.h" #include "core/fxcrt/xml/cfx_xmlchardata.h" #include "core/fxcrt/xml/cfx_xmlelement.h" #include "core/fxcrt/xml/cfx_xmlnode.h" |