From a52ab741019342fbca0468e43a01deb44fa5f1bd Mon Sep 17 00:00:00 2001 From: dsinclair Date: Thu, 29 Sep 2016 13:59:29 -0700 Subject: Move core/fxcrt/include to core/fxcrt BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2382723003 --- BUILD.gn | 34 +- core/fdrm/crypto/fx_crypt.h | 2 +- core/fpdfapi/cpdf_modulemgr.h | 2 +- core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.cpp | 2 +- core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp | 2 +- core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.cpp | 2 +- core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.cpp | 2 +- core/fpdfapi/fpdf_cmaps/cmap_int.h | 4 +- core/fpdfapi/fpdf_edit/cpdf_creator.h | 2 +- core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.h | 6 +- core/fpdfapi/fpdf_edit/editint.h | 6 +- core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp | 2 +- core/fpdfapi/fpdf_font/cpdf_cidfont.h | 4 +- core/fpdfapi/fpdf_font/cpdf_font.cpp | 2 +- core/fpdfapi/fpdf_font/cpdf_font.h | 4 +- core/fpdfapi/fpdf_font/cpdf_fontencoding.h | 6 +- core/fpdfapi/fpdf_font/cpdf_simplefont.h | 4 +- core/fpdfapi/fpdf_font/cpdf_truetypefont.h | 2 +- core/fpdfapi/fpdf_font/cpdf_type1font.h | 2 +- core/fpdfapi/fpdf_font/cpdf_type3char.h | 4 +- core/fpdfapi/fpdf_font/cpdf_type3font.cpp | 2 +- core/fpdfapi/fpdf_font/cpdf_type3font.h | 4 +- core/fpdfapi/fpdf_font/font_int.h | 2 +- core/fpdfapi/fpdf_font/fpdf_font.cpp | 2 +- core/fpdfapi/fpdf_font/fpdf_font_cid.cpp | 2 +- core/fpdfapi/fpdf_font/ttgsubtable.h | 2 +- core/fpdfapi/fpdf_page/cpdf_allstates.h | 4 +- core/fpdfapi/fpdf_page/cpdf_clippath.h | 6 +- core/fpdfapi/fpdf_page/cpdf_color.cpp | 2 +- core/fpdfapi/fpdf_page/cpdf_color.h | 2 +- core/fpdfapi/fpdf_page/cpdf_colorspace.h | 4 +- core/fpdfapi/fpdf_page/cpdf_colorstate.h | 6 +- core/fpdfapi/fpdf_page/cpdf_contentmark.h | 6 +- core/fpdfapi/fpdf_page/cpdf_contentmarkitem.h | 6 +- core/fpdfapi/fpdf_page/cpdf_countedobject.h | 2 +- core/fpdfapi/fpdf_page/cpdf_formobject.h | 2 +- core/fpdfapi/fpdf_page/cpdf_generalstate.h | 4 +- core/fpdfapi/fpdf_page/cpdf_image.h | 2 +- core/fpdfapi/fpdf_page/cpdf_imageobject.h | 2 +- core/fpdfapi/fpdf_page/cpdf_meshstream.h | 4 +- core/fpdfapi/fpdf_page/cpdf_page.h | 6 +- core/fpdfapi/fpdf_page/cpdf_pageobject.h | 4 +- core/fpdfapi/fpdf_page/cpdf_pageobjectholder.h | 4 +- core/fpdfapi/fpdf_page/cpdf_path.h | 4 +- core/fpdfapi/fpdf_page/cpdf_pathobject.h | 4 +- core/fpdfapi/fpdf_page/cpdf_pattern.h | 4 +- core/fpdfapi/fpdf_page/cpdf_psengine.h | 2 +- core/fpdfapi/fpdf_page/cpdf_shadingobject.h | 2 +- core/fpdfapi/fpdf_page/cpdf_shadingpattern.h | 2 +- core/fpdfapi/fpdf_page/cpdf_textobject.h | 4 +- core/fpdfapi/fpdf_page/cpdf_textstate.h | 4 +- core/fpdfapi/fpdf_page/cpdf_tilingpattern.h | 4 +- core/fpdfapi/fpdf_page/fpdf_page_func.cpp | 2 +- core/fpdfapi/fpdf_page/fpdf_page_parser.cpp | 2 +- core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp | 4 +- core/fpdfapi/fpdf_page/pageint.h | 4 +- core/fpdfapi/fpdf_parser/cfdf_document.h | 6 +- core/fpdfapi/fpdf_parser/cpdf_array.h | 4 +- core/fpdfapi/fpdf_parser/cpdf_boolean.h | 4 +- core/fpdfapi/fpdf_parser/cpdf_crypto_handler.h | 6 +- core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp | 4 +- core/fpdfapi/fpdf_parser/cpdf_data_avail.h | 2 +- core/fpdfapi/fpdf_parser/cpdf_dictionary.h | 8 +- core/fpdfapi/fpdf_parser/cpdf_document.h | 6 +- core/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp | 2 +- core/fpdfapi/fpdf_parser/cpdf_hint_tables.h | 4 +- .../fpdf_parser/cpdf_indirect_object_holder.h | 2 +- core/fpdfapi/fpdf_parser/cpdf_number.h | 4 +- core/fpdfapi/fpdf_parser/cpdf_object.cpp | 2 +- core/fpdfapi/fpdf_parser/cpdf_object.h | 4 +- core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp | 2 +- core/fpdfapi/fpdf_parser/cpdf_parser.cpp | 4 +- core/fpdfapi/fpdf_parser/cpdf_parser.h | 2 +- core/fpdfapi/fpdf_parser/cpdf_parser_unittest.cpp | 4 +- core/fpdfapi/fpdf_parser/cpdf_security_handler.h | 4 +- core/fpdfapi/fpdf_parser/cpdf_simple_parser.h | 4 +- .../fpdf_parser/cpdf_simple_parser_unittest.cpp | 2 +- core/fpdfapi/fpdf_parser/cpdf_stream.h | 2 +- core/fpdfapi/fpdf_parser/cpdf_stream_acc.h | 4 +- core/fpdfapi/fpdf_parser/cpdf_string.h | 4 +- core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp | 2 +- core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h | 6 +- .../fpdf_parser/cpdf_syntax_parser_unittest.cpp | 4 +- core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp | 2 +- core/fpdfapi/fpdf_parser/fpdf_parser_decode.h | 2 +- .../fpdf_parser_decode_embeddertest.cpp | 2 +- core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp | 2 +- core/fpdfapi/fpdf_parser/fpdf_parser_utility.h | 4 +- core/fpdfapi/fpdf_render/cpdf_pagerendercache.h | 2 +- .../fpdfapi/fpdf_render/cpdf_progressiverenderer.h | 4 +- core/fpdfapi/fpdf_render/cpdf_rendercontext.h | 4 +- core/fpdfapi/fpdf_render/cpdf_renderoptions.h | 2 +- core/fpdfapi/fpdf_render/cpdf_textrenderer.h | 6 +- core/fpdfapi/fpdf_render/cpdf_type3cache.h | 6 +- core/fpdfapi/fpdf_render/cpdf_type3glyphs.h | 2 +- core/fpdfapi/fpdf_render/fpdf_render_image.cpp | 2 +- core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp | 2 +- core/fpdfdoc/cpdf_action.h | 2 +- core/fpdfdoc/cpdf_annot.cpp | 2 +- core/fpdfdoc/cpdf_annot.h | 6 +- core/fpdfdoc/cpdf_annotlist.h | 4 +- core/fpdfdoc/cpdf_apsettings.h | 4 +- core/fpdfdoc/cpdf_bookmark.h | 2 +- core/fpdfdoc/cpdf_defaultappearance.h | 6 +- core/fpdfdoc/cpdf_dest.h | 4 +- core/fpdfdoc/cpdf_docjsactions.h | 2 +- core/fpdfdoc/cpdf_filespec.cpp | 2 +- core/fpdfdoc/cpdf_filespec.h | 6 +- core/fpdfdoc/cpdf_formcontrol.h | 4 +- core/fpdfdoc/cpdf_formfield.h | 6 +- core/fpdfdoc/cpdf_iconfit.cpp | 2 +- core/fpdfdoc/cpdf_iconfit.h | 2 +- core/fpdfdoc/cpdf_interform.h | 4 +- core/fpdfdoc/cpdf_link.h | 2 +- core/fpdfdoc/cpdf_linklist.h | 2 +- core/fpdfdoc/cpdf_metadata.cpp | 2 +- core/fpdfdoc/cpdf_nametree.h | 2 +- core/fpdfdoc/cpdf_occontext.h | 2 +- core/fpdfdoc/cpdf_pagelabel.h | 2 +- core/fpdfdoc/cpdf_variabletext.h | 6 +- core/fpdfdoc/cpdf_viewerpreferences.h | 4 +- core/fpdfdoc/cpvt_arraytemplate.h | 4 +- core/fpdfdoc/cpvt_color.h | 4 +- core/fpdfdoc/cpvt_floatrect.h | 2 +- core/fpdfdoc/cpvt_fontmap.h | 2 +- core/fpdfdoc/cpvt_generateap.h | 6 +- core/fpdfdoc/cpvt_line.h | 4 +- core/fpdfdoc/cpvt_lineinfo.h | 2 +- core/fpdfdoc/cpvt_secprops.h | 2 +- core/fpdfdoc/cpvt_section.h | 2 +- core/fpdfdoc/cpvt_word.h | 2 +- core/fpdfdoc/cpvt_wordinfo.h | 2 +- core/fpdfdoc/cpvt_wordplace.h | 2 +- core/fpdfdoc/cpvt_wordprops.h | 2 +- core/fpdfdoc/cpvt_wordrange.h | 2 +- core/fpdfdoc/csection.h | 4 +- core/fpdfdoc/ctypeset.h | 2 +- core/fpdfdoc/ipdf_formnotify.h | 2 +- core/fpdfdoc/ipvt_fontmap.h | 2 +- core/fpdfdoc/tagged_int.h | 2 +- core/fpdftext/cpdf_linkextract.cpp | 6 +- core/fpdftext/cpdf_linkextract.h | 8 +- core/fpdftext/cpdf_textpage.cpp | 4 +- core/fpdftext/cpdf_textpage.h | 6 +- core/fpdftext/cpdf_textpagefind.cpp | 4 +- core/fpdftext/cpdf_textpagefind.h | 6 +- core/fpdftext/unicodenormalizationdata.cpp | 2 +- core/fxcodec/codec/ccodec_basicmodule.h | 2 +- core/fxcodec/codec/ccodec_bmpmodule.h | 2 +- core/fxcodec/codec/ccodec_faxmodule.h | 2 +- core/fxcodec/codec/ccodec_flatemodule.h | 2 +- core/fxcodec/codec/ccodec_gifmodule.h | 2 +- core/fxcodec/codec/ccodec_iccmodule.h | 4 +- core/fxcodec/codec/ccodec_jbig2module.h | 2 +- core/fxcodec/codec/ccodec_jpegmodule.h | 2 +- core/fxcodec/codec/ccodec_jpxmodule.h | 2 +- core/fxcodec/codec/ccodec_pngmodule.h | 2 +- core/fxcodec/codec/ccodec_progressivedecoder.h | 2 +- core/fxcodec/codec/ccodec_scanlinedecoder.h | 2 +- core/fxcodec/codec/ccodec_tiffmodule.h | 2 +- core/fxcodec/codec/fx_codec.cpp | 4 +- core/fxcodec/codec/fx_codec_flate.cpp | 2 +- core/fxcodec/codec/fx_codec_jbig.cpp | 2 +- core/fxcodec/codec/fx_codec_jpeg.cpp | 2 +- core/fxcodec/codec/fx_codec_jpx_opj.cpp | 2 +- core/fxcodec/fx_codec.h | 4 +- core/fxcodec/jbig2/JBig2_ArithDecoder.cpp | 2 +- core/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp | 2 +- core/fxcodec/jbig2/JBig2_ArithIntDecoder.h | 2 +- core/fxcodec/jbig2/JBig2_BitStream.h | 2 +- core/fxcodec/jbig2/JBig2_Define.h | 2 +- core/fxcodec/jbig2/JBig2_GrdProc.h | 4 +- core/fxcodec/jbig2/JBig2_GrrdProc.h | 2 +- core/fxcodec/jbig2/JBig2_GsidProc.cpp | 2 +- core/fxcodec/jbig2/JBig2_GsidProc.h | 2 +- core/fxcodec/jbig2/JBig2_HtrdProc.cpp | 2 +- core/fxcodec/jbig2/JBig2_HtrdProc.h | 2 +- core/fxcodec/jbig2/JBig2_HuffmanTable.cpp | 2 +- core/fxcodec/jbig2/JBig2_HuffmanTable.h | 2 +- core/fxcodec/jbig2/JBig2_HuffmanTable_Standard.cpp | 2 +- core/fxcodec/jbig2/JBig2_HuffmanTable_Standard.h | 2 +- core/fxcodec/jbig2/JBig2_Image.cpp | 4 +- core/fxcodec/jbig2/JBig2_Page.h | 2 +- core/fxcodec/jbig2/JBig2_PatternDict.cpp | 2 +- core/fxcodec/jbig2/JBig2_PddProc.h | 2 +- core/fxcodec/jbig2/JBig2_SddProc.cpp | 2 +- core/fxcodec/jbig2/JBig2_SddProc.h | 2 +- core/fxcodec/jbig2/JBig2_Segment.cpp | 2 +- core/fxcodec/jbig2/JBig2_SymbolDict.cpp | 2 +- core/fxcodec/jbig2/JBig2_SymbolDict.h | 2 +- core/fxcodec/jbig2/JBig2_TrdProc.h | 2 +- core/fxcodec/lbmp/fx_bmp.h | 2 +- core/fxcodec/lgif/fx_gif.h | 2 +- core/fxcrt/cfx_count_ref.h | 81 ++ core/fxcrt/cfx_count_ref_unittest.cpp | 2 +- core/fxcrt/cfx_observable.h | 78 ++ core/fxcrt/cfx_observable_unittest.cpp | 2 +- core/fxcrt/cfx_retain_ptr.h | 56 ++ core/fxcrt/cfx_retain_ptr_unittest.cpp | 2 +- core/fxcrt/cfx_string_c_template.h | 2 +- core/fxcrt/cfx_string_data_template.h | 4 +- core/fxcrt/cfx_string_pool_template.h | 30 + core/fxcrt/cfx_string_pool_template_unittest.cpp | 4 +- core/fxcrt/cfx_weak_ptr.h | 80 ++ core/fxcrt/cfx_weak_ptr_unittest.cpp | 4 +- core/fxcrt/extension.h | 4 +- core/fxcrt/fx_arabic.cpp | 4 +- core/fxcrt/fx_arabic.h | 188 +++++ core/fxcrt/fx_arb.h | 49 ++ core/fxcrt/fx_basic.h | 860 +++++++++++++++++++++ core/fxcrt/fx_basic_array.cpp | 2 +- core/fxcrt/fx_basic_bstring.cpp | 4 +- core/fxcrt/fx_basic_bstring_unittest.cpp | 2 +- core/fxcrt/fx_basic_buffer.cpp | 4 +- core/fxcrt/fx_basic_coords.cpp | 4 +- core/fxcrt/fx_basic_gcc.cpp | 4 +- core/fxcrt/fx_basic_gcc_unittest.cpp | 2 +- core/fxcrt/fx_basic_list.cpp | 2 +- core/fxcrt/fx_basic_maps.cpp | 2 +- core/fxcrt/fx_basic_memmgr.cpp | 2 +- core/fxcrt/fx_basic_memmgr_unittest.cpp | 2 +- core/fxcrt/fx_basic_plex.cpp | 2 +- core/fxcrt/fx_basic_utf.cpp | 2 +- core/fxcrt/fx_basic_util.cpp | 4 +- core/fxcrt/fx_basic_util_unittest.cpp | 2 +- core/fxcrt/fx_basic_wstring.cpp | 6 +- core/fxcrt/fx_basic_wstring_unittest.cpp | 2 +- core/fxcrt/fx_bidi.cpp | 2 +- core/fxcrt/fx_bidi.h | 4 +- core/fxcrt/fx_coordinates.h | 671 ++++++++++++++++ core/fxcrt/fx_ext.h | 130 ++++ core/fxcrt/fx_extension.cpp | 4 +- core/fxcrt/fx_extension_unittest.cpp | 2 +- core/fxcrt/fx_memory.h | 112 +++ core/fxcrt/fx_safe_types.h | 20 + core/fxcrt/fx_stream.h | 162 ++++ core/fxcrt/fx_string.h | 464 +++++++++++ core/fxcrt/fx_system.h | 342 ++++++++ core/fxcrt/fx_system_unittest.cpp | 2 +- core/fxcrt/fx_ucd.h | 202 +++++ core/fxcrt/fx_ucddata.cpp | 4 +- core/fxcrt/fx_unicode.cpp | 2 +- core/fxcrt/fx_xml.h | 173 +++++ core/fxcrt/fx_xml_composer.cpp | 2 +- core/fxcrt/fx_xml_parser.cpp | 4 +- core/fxcrt/fxcrt_posix.cpp | 2 +- core/fxcrt/fxcrt_stream.cpp | 2 +- core/fxcrt/fxcrt_windows.cpp | 2 +- core/fxcrt/include/cfx_count_ref.h | 81 -- core/fxcrt/include/cfx_observable.h | 78 -- core/fxcrt/include/cfx_retain_ptr.h | 57 -- core/fxcrt/include/cfx_string_pool_template.h | 30 - core/fxcrt/include/cfx_weak_ptr.h | 80 -- core/fxcrt/include/fx_arabic.h | 188 ----- core/fxcrt/include/fx_arb.h | 49 -- core/fxcrt/include/fx_basic.h | 859 -------------------- core/fxcrt/include/fx_coordinates.h | 671 ---------------- core/fxcrt/include/fx_ext.h | 130 ---- core/fxcrt/include/fx_memory.h | 112 --- core/fxcrt/include/fx_safe_types.h | 20 - core/fxcrt/include/fx_stream.h | 162 ---- core/fxcrt/include/fx_string.h | 465 ----------- core/fxcrt/include/fx_system.h | 342 -------- core/fxcrt/include/fx_ucd.h | 202 ----- core/fxcrt/include/fx_xml.h | 173 ----- core/fxcrt/plex.h | 2 +- core/fxcrt/xml_int.h | 2 +- core/fxge/agg/fx_agg_driver.cpp | 2 +- core/fxge/android/fpf_skiafont.cpp | 2 +- core/fxge/android/fpf_skiafont.h | 2 +- core/fxge/android/fpf_skiafontmgr.cpp | 4 +- core/fxge/android/fpf_skiafontmgr.h | 2 +- core/fxge/android/fpf_skiamodule.cpp | 2 +- core/fxge/android/fpf_skiamodule.h | 2 +- core/fxge/android/fx_android_font.cpp | 2 +- core/fxge/android/fx_android_font.h | 2 +- core/fxge/android/fx_android_imp.cpp | 2 +- core/fxge/apple/apple_int.h | 2 +- core/fxge/apple/fx_apple_platform.cpp | 2 +- core/fxge/apple/fx_quartz_device.cpp | 4 +- core/fxge/dib/dib_int.h | 2 +- core/fxge/dib/fx_dib_engine_unittest.cpp | 2 +- core/fxge/ge/cfx_graphstatedata.cpp | 4 +- core/fxge/ge/cfx_pathdata.cpp | 2 +- core/fxge/ge/cfx_renderdevice.cpp | 2 +- core/fxge/ge/cttfontdesc.h | 2 +- core/fxge/ge/fx_ge_text.cpp | 2 +- core/fxge/ifx_renderdevicedriver.cpp | 2 +- core/fxge/include/cfx_fontcache.h | 2 +- core/fxge/include/cfx_graphstate.h | 2 +- core/fxge/include/cfx_graphstatedata.h | 2 +- core/fxge/include/cfx_pathdata.h | 4 +- core/fxge/include/cfx_substfont.h | 2 +- core/fxge/include/cfx_unicodeencodingex.h | 2 +- core/fxge/include/fx_dib.h | 6 +- core/fxge/include/fx_font.h | 2 +- core/fxge/include/ifx_renderdevicedriver.h | 2 +- core/fxge/skia/fx_skia_device.cpp | 2 +- core/fxge/win32/fx_win32_device.cpp | 4 +- core/fxge/win32/fx_win32_dib.cpp | 2 +- core/fxge/win32/fx_win32_dwrite.cpp | 2 +- core/fxge/win32/fx_win32_gdipext.cpp | 2 +- core/fxge/win32/fx_win32_print.cpp | 2 +- fpdfsdk/DEPS | 2 +- fpdfsdk/cfx_systemhandler.h | 4 +- fpdfsdk/cpdfsdk_datetime.cpp | 2 +- fpdfsdk/formfiller/cffl_combobox.h | 2 +- fpdfsdk/fpdf_ext.cpp | 6 +- fpdfsdk/fpdf_progressive.cpp | 2 +- fpdfsdk/fpdfdoc_embeddertest.cpp | 2 +- fpdfsdk/fpdfsave.cpp | 2 +- fpdfsdk/fpdfsave_embeddertest.cpp | 2 +- fpdfsdk/fpdftext_embeddertest.cpp | 2 +- fpdfsdk/fpdfview.cpp | 4 +- fpdfsdk/fpdfxfa/include/fpdfxfa_page.h | 2 +- fpdfsdk/fxedit/include/fx_edit.h | 2 +- fpdfsdk/fxedit/include/fxet_list.h | 2 +- fpdfsdk/include/cba_annotiterator.h | 4 +- fpdfsdk/include/cpdfsdk_annot.h | 4 +- fpdfsdk/include/cpdfsdk_annothandlermgr.h | 4 +- fpdfsdk/include/cpdfsdk_baannot.h | 4 +- fpdfsdk/include/cpdfsdk_baannothandler.h | 4 +- fpdfsdk/include/cpdfsdk_document.h | 2 +- fpdfsdk/include/cpdfsdk_environment.h | 2 +- fpdfsdk/include/cpdfsdk_interform.h | 2 +- fpdfsdk/include/cpdfsdk_pageview.h | 2 +- fpdfsdk/include/cpdfsdk_widget.h | 4 +- fpdfsdk/include/cpdfsdk_widgethandler.h | 4 +- fpdfsdk/include/cpdfsdk_xfawidget.h | 4 +- fpdfsdk/include/cpdfsdk_xfawidgethandler.h | 4 +- fpdfsdk/include/fsdk_actionhandler.h | 2 +- fpdfsdk/include/fsdk_pauseadapter.h | 4 +- fpdfsdk/include/ipdfsdk_annothandler.h | 4 +- fpdfsdk/include/pdfsdk_fieldaction.h | 2 +- fpdfsdk/javascript/Field.h | 2 +- fpdfsdk/javascript/JS_EventHandler.h | 4 +- fpdfsdk/javascript/JS_GlobalData.h | 2 +- fpdfsdk/javascript/JS_KeyValue.h | 2 +- fpdfsdk/javascript/JS_Value.h | 2 +- fpdfsdk/javascript/PublicMethods.cpp | 2 +- fpdfsdk/javascript/cjs_context.h | 4 +- fpdfsdk/javascript/cjs_runtime.h | 4 +- fpdfsdk/javascript/global.cpp | 2 +- fpdfsdk/javascript/ijs_context.h | 4 +- fpdfsdk/javascript/ijs_runtime.h | 4 +- fpdfsdk/javascript/public_methods_embeddertest.cpp | 2 +- fpdfsdk/javascript/resource.h | 2 +- fpdfsdk/javascript/util.cpp | 2 +- fpdfsdk/pdfwindow/PWL_Edit.cpp | 4 +- fpdfsdk/pdfwindow/PWL_Edit.h | 2 +- fpdfsdk/pdfwindow/PWL_EditCtrl.h | 2 +- fpdfsdk/pdfwindow/PWL_Icon.h | 2 +- fpdfsdk/pdfwindow/PWL_Wnd.h | 2 +- fxjs/DEPS | 2 +- fxjs/fxjs_v8.cpp | 2 +- fxjs/include/cfxjse_context.h | 2 +- fxjs/include/cfxjse_value.h | 4 +- fxjs/include/fxjs_v8.h | 2 +- fxjs/include/fxjse.h | 4 +- testing/DEPS | 2 +- testing/fx_string_testhelpers.h | 2 +- testing/libfuzzer/xfa_codec_fuzzer.h | 2 +- testing/utils/path_service.cpp | 2 +- third_party/DEPS | 8 +- third_party/agg23/agg_array.h | 2 +- third_party/agg23/agg_basics.h | 2 +- third_party/agg23/agg_curves.cpp | 2 +- third_party/agg23/agg_path_storage.cpp | 2 +- third_party/agg23/agg_rasterizer_scanline_aa.h | 4 +- third_party/agg23/agg_vcgen_dash.cpp | 2 +- third_party/agg23/agg_vcgen_stroke.cpp | 2 +- third_party/lcms2-2.6/src/cmserr.c | 4 +- third_party/libjpeg/jinclude.h | 2 +- third_party/libtiff/tiffconf.h | 2 +- third_party/zlib_v128/zutil.h | 2 +- xfa/DEPS | 2 +- xfa/fde/cfde_txtedtbuf.h | 4 +- xfa/fde/cfde_txtedtbufiter.h | 2 +- xfa/fde/cfde_txtedtdorecord_deleterange.h | 4 +- xfa/fde/cfde_txtedtdorecord_insert.h | 4 +- xfa/fde/cfx_chariter.h | 4 +- xfa/fde/cfx_wordbreak.h | 4 +- xfa/fde/css/fde_csscache.cpp | 2 +- xfa/fde/css/fde_cssdatatable.cpp | 2 +- xfa/fde/css/fde_cssdatatable.h | 2 +- xfa/fde/css/fde_cssdeclaration.cpp | 2 +- xfa/fde/css/fde_cssstyleselector.h | 2 +- xfa/fde/css/fde_cssstylesheet.h | 2 +- xfa/fde/fde_render.h | 2 +- xfa/fde/fde_visualset.h | 4 +- xfa/fde/ifde_txtedtdorecord.h | 2 +- xfa/fde/ifx_chariter.h | 2 +- xfa/fde/tto/fde_textout.cpp | 4 +- xfa/fde/xml/cfx_saxreader.h | 2 +- xfa/fde/xml/fde_xml.h | 2 +- xfa/fde/xml/fde_xml_imp.cpp | 4 +- xfa/fde/xml/fde_xml_imp.h | 2 +- xfa/fgas/crt/fgas_codepage.cpp | 2 +- xfa/fgas/crt/fgas_codepage.h | 2 +- xfa/fgas/crt/fgas_memory.h | 4 +- xfa/fgas/crt/fgas_stream.h | 4 +- xfa/fgas/crt/fgas_utils.cpp | 2 +- xfa/fgas/crt/fgas_utils.h | 2 +- xfa/fgas/font/fgas_fontutils.cpp | 2 +- xfa/fgas/font/fgas_fontutils.h | 2 +- xfa/fgas/font/fgas_gefont.h | 2 +- xfa/fgas/font/fgas_stdfontmgr.cpp | 2 +- xfa/fgas/font/fgas_stdfontmgr.h | 2 +- xfa/fgas/layout/fgas_linebreak.cpp | 2 +- xfa/fgas/layout/fgas_linebreak.h | 2 +- xfa/fgas/layout/fgas_rtfbreak.cpp | 4 +- xfa/fgas/layout/fgas_rtfbreak.h | 4 +- xfa/fgas/layout/fgas_textbreak.cpp | 6 +- xfa/fgas/layout/fgas_textbreak.h | 2 +- xfa/fgas/localization/fgas_datetime.cpp | 2 +- xfa/fgas/localization/fgas_datetime.h | 2 +- xfa/fgas/localization/fgas_locale.cpp | 4 +- xfa/fgas/localization/fgas_locale.h | 2 +- xfa/fwl/basewidget/cfx_barcode.h | 6 +- xfa/fwl/basewidget/ifwl_scrollbar.h | 2 +- xfa/fwl/core/cfwl_event.h | 6 +- xfa/fwl/core/cfwl_message.h | 4 +- xfa/fwl/core/cfwl_themepart.h | 4 +- xfa/fwl/core/cfwl_themetext.h | 4 +- xfa/fwl/core/cfwl_widgetimpproperties.h | 4 +- xfa/fwl/core/cfwl_widgetmgr.h | 2 +- xfa/fwl/core/fwl_noteimp.cpp | 2 +- xfa/fwl/core/fwl_widgetimp.h | 4 +- xfa/fwl/core/ifwl_app.h | 2 +- xfa/fwl/core/ifwl_dataprovider.h | 2 +- xfa/fwl/core/ifwl_form.h | 2 +- xfa/fwl/core/ifwl_themeprovider.h | 4 +- xfa/fwl/core/ifwl_timer.h | 2 +- xfa/fwl/core/ifwl_widget.h | 6 +- xfa/fwl/lightwidget/cfwl_widgetproperties.h | 6 +- xfa/fwl/theme/cfwl_arrowdata.h | 2 +- xfa/fwl/theme/cfwl_utils.h | 2 +- xfa/fwl/theme/cfwl_widgettp.h | 4 +- xfa/fxbarcode/BC_Dimension.h | 2 +- xfa/fxbarcode/BC_UtilCodingConvert.h | 2 +- xfa/fxbarcode/BC_Utils.cpp | 2 +- xfa/fxbarcode/BC_Writer.h | 2 +- xfa/fxbarcode/cbc_codabar.h | 4 +- xfa/fxbarcode/cbc_code128.h | 4 +- xfa/fxbarcode/cbc_code39.h | 4 +- xfa/fxbarcode/cbc_codebase.h | 2 +- xfa/fxbarcode/cbc_datamatrix.h | 4 +- xfa/fxbarcode/cbc_ean13.h | 4 +- xfa/fxbarcode/cbc_ean8.h | 4 +- xfa/fxbarcode/cbc_onecode.h | 4 +- xfa/fxbarcode/cbc_pdf417i.h | 4 +- xfa/fxbarcode/cbc_qrcode.h | 4 +- xfa/fxbarcode/cbc_upca.h | 4 +- xfa/fxbarcode/common/BC_CommonBitArray.h | 2 +- xfa/fxbarcode/common/BC_CommonBitMatrix.h | 2 +- xfa/fxbarcode/common/BC_CommonByteArray.h | 2 +- xfa/fxbarcode/common/BC_CommonByteMatrix.cpp | 2 +- xfa/fxbarcode/common/BC_CommonByteMatrix.h | 2 +- xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.h | 2 +- .../common/reedsolomon/BC_ReedSolomonGF256.h | 2 +- .../common/reedsolomon/BC_ReedSolomonGF256Poly.h | 2 +- xfa/fxbarcode/datamatrix/BC_DefaultPlacement.h | 2 +- xfa/fxbarcode/datamatrix/BC_SymbolInfo.h | 4 +- xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h | 4 +- xfa/fxbarcode/oned/BC_OnedCode128Writer.h | 4 +- xfa/fxbarcode/oned/BC_OnedEAN13Writer.h | 4 +- xfa/fxbarcode/oned/BC_OnedEAN8Writer.h | 4 +- xfa/fxbarcode/oned/BC_OnedUPCAWriter.h | 4 +- xfa/fxbarcode/pdf417/BC_PDF417.h | 2 +- xfa/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h | 2 +- xfa/fxbarcode/pdf417/BC_PDF417BarcodeRow.h | 2 +- xfa/fxbarcode/pdf417/BC_PDF417ErrorCorrection.h | 2 +- xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h | 4 +- .../pdf417/BC_PDF417HighLevelEncoder_unittest.cpp | 2 +- xfa/fxbarcode/pdf417/BC_PDF417Writer.h | 4 +- xfa/fxbarcode/qrcode/BC_QRCoderBitVector.cpp | 2 +- xfa/fxbarcode/qrcode/BC_QRCoderECBlocks.h | 2 +- xfa/fxbarcode/qrcode/BC_QRCoderEncoder.h | 4 +- .../qrcode/BC_QRCoderErrorCorrectionLevel.h | 2 +- xfa/fxbarcode/qrcode/BC_QRCoderMode.h | 2 +- xfa/fxbarcode/qrcode/BC_QRCoderVersion.h | 2 +- xfa/fxbarcode/utils.h | 2 +- xfa/fxfa/app/xfa_ffbarcode.cpp | 2 +- xfa/fxfa/app/xfa_ffdoc.cpp | 4 +- xfa/fxfa/app/xfa_ffdocview.cpp | 2 +- xfa/fxfa/app/xfa_fwladapter.h | 4 +- xfa/fxfa/app/xfa_textlayout.cpp | 2 +- xfa/fxfa/fm2js/xfa_error.h | 4 +- xfa/fxfa/fm2js/xfa_expression.cpp | 2 +- xfa/fxfa/fm2js/xfa_fm2jscontext.cpp | 2 +- xfa/fxfa/fm2js/xfa_lexer.cpp | 2 +- xfa/fxfa/fm2js/xfa_lexer.h | 2 +- xfa/fxfa/fm2js/xfa_simpleexpression.cpp | 2 +- xfa/fxfa/fm2js/xfa_simpleexpression.h | 2 +- xfa/fxfa/include/fxfa_widget.h | 2 +- xfa/fxfa/include/xfa_fontmgr.h | 4 +- xfa/fxfa/parser/cxfa_bind.h | 2 +- xfa/fxfa/parser/cxfa_binditems.h | 2 +- xfa/fxfa/parser/cxfa_box.h | 2 +- xfa/fxfa/parser/cxfa_calculate.h | 2 +- xfa/fxfa/parser/cxfa_data.cpp | 2 +- xfa/fxfa/parser/cxfa_data.h | 2 +- xfa/fxfa/parser/cxfa_dataexporter.cpp | 2 +- xfa/fxfa/parser/cxfa_dataexporter.h | 2 +- xfa/fxfa/parser/cxfa_dataimporter.cpp | 2 +- xfa/fxfa/parser/cxfa_dataimporter.h | 2 +- xfa/fxfa/parser/cxfa_document.cpp | 2 +- xfa/fxfa/parser/cxfa_event.h | 2 +- xfa/fxfa/parser/cxfa_exdata.h | 2 +- xfa/fxfa/parser/cxfa_fill.h | 2 +- xfa/fxfa/parser/cxfa_image.h | 4 +- xfa/fxfa/parser/cxfa_layoutprocessor.h | 2 +- xfa/fxfa/parser/cxfa_line.h | 2 +- xfa/fxfa/parser/cxfa_margin.h | 2 +- xfa/fxfa/parser/cxfa_measurement.cpp | 2 +- xfa/fxfa/parser/cxfa_measurement.h | 4 +- xfa/fxfa/parser/cxfa_node.cpp | 2 +- xfa/fxfa/parser/cxfa_nodehelper.cpp | 2 +- xfa/fxfa/parser/cxfa_nodelist.cpp | 2 +- xfa/fxfa/parser/cxfa_object.cpp | 2 +- xfa/fxfa/parser/cxfa_occur.h | 2 +- xfa/fxfa/parser/cxfa_para.h | 2 +- xfa/fxfa/parser/cxfa_resolveprocessor.cpp | 2 +- xfa/fxfa/parser/cxfa_script.h | 2 +- xfa/fxfa/parser/cxfa_scriptcontext.cpp | 2 +- xfa/fxfa/parser/cxfa_simple_parser.cpp | 2 +- xfa/fxfa/parser/cxfa_stroke.h | 2 +- xfa/fxfa/parser/cxfa_submit.h | 4 +- xfa/fxfa/parser/cxfa_text.h | 2 +- xfa/fxfa/parser/cxfa_tooltip.h | 2 +- xfa/fxfa/parser/cxfa_validate.h | 4 +- xfa/fxfa/parser/cxfa_value.h | 2 +- xfa/fxfa/parser/cxfa_widetextread.cpp | 2 +- xfa/fxfa/parser/cxfa_widgetdata.cpp | 2 +- xfa/fxfa/parser/cxfa_widgetdata.h | 4 +- xfa/fxfa/parser/xfa_document_datamerger_imp.cpp | 2 +- xfa/fxfa/parser/xfa_layout_itemlayout.h | 2 +- xfa/fxfa/parser/xfa_locale.cpp | 2 +- xfa/fxfa/parser/xfa_localemgr.cpp | 2 +- xfa/fxfa/parser/xfa_localevalue.cpp | 2 +- xfa/fxfa/parser/xfa_localevalue.h | 4 +- xfa/fxfa/parser/xfa_utils.cpp | 2 +- xfa/fxgraphics/cfx_path.h | 2 +- xfa/fxgraphics/cfx_pattern.h | 4 +- xfa/fxgraphics/cfx_shading.h | 4 +- xfa/fxgraphics/include/cfx_graphics.h | 2 +- 546 files changed, 4443 insertions(+), 4444 deletions(-) create mode 100644 core/fxcrt/cfx_count_ref.h create mode 100644 core/fxcrt/cfx_observable.h create mode 100644 core/fxcrt/cfx_retain_ptr.h create mode 100644 core/fxcrt/cfx_string_pool_template.h create mode 100644 core/fxcrt/cfx_weak_ptr.h create mode 100644 core/fxcrt/fx_arabic.h create mode 100644 core/fxcrt/fx_arb.h create mode 100644 core/fxcrt/fx_basic.h create mode 100644 core/fxcrt/fx_coordinates.h create mode 100644 core/fxcrt/fx_ext.h create mode 100644 core/fxcrt/fx_memory.h create mode 100644 core/fxcrt/fx_safe_types.h create mode 100644 core/fxcrt/fx_stream.h create mode 100644 core/fxcrt/fx_string.h create mode 100644 core/fxcrt/fx_system.h create mode 100644 core/fxcrt/fx_ucd.h create mode 100644 core/fxcrt/fx_xml.h delete mode 100644 core/fxcrt/include/cfx_count_ref.h delete mode 100644 core/fxcrt/include/cfx_observable.h delete mode 100644 core/fxcrt/include/cfx_retain_ptr.h delete mode 100644 core/fxcrt/include/cfx_string_pool_template.h delete mode 100644 core/fxcrt/include/cfx_weak_ptr.h delete mode 100644 core/fxcrt/include/fx_arabic.h delete mode 100644 core/fxcrt/include/fx_arb.h delete mode 100644 core/fxcrt/include/fx_basic.h delete mode 100644 core/fxcrt/include/fx_coordinates.h delete mode 100644 core/fxcrt/include/fx_ext.h delete mode 100644 core/fxcrt/include/fx_memory.h delete mode 100644 core/fxcrt/include/fx_safe_types.h delete mode 100644 core/fxcrt/include/fx_stream.h delete mode 100644 core/fxcrt/include/fx_string.h delete mode 100644 core/fxcrt/include/fx_system.h delete mode 100644 core/fxcrt/include/fx_ucd.h delete mode 100644 core/fxcrt/include/fx_xml.h diff --git a/BUILD.gn b/BUILD.gn index 8574de51a5..0c3bd09f42 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -680,9 +680,15 @@ config("fxge_warnings") { static_library("fxcrt") { sources = [ + "core/fxcrt/cfx_count_ref.h", + "core/fxcrt/cfx_observable.h", + "core/fxcrt/cfx_retain_ptr.h", "core/fxcrt/cfx_string_c_template.h", "core/fxcrt/cfx_string_data_template.h", + "core/fxcrt/cfx_string_pool_template.h", + "core/fxcrt/cfx_weak_ptr.h", "core/fxcrt/extension.h", + "core/fxcrt/fx_basic.h", "core/fxcrt/fx_basic_array.cpp", "core/fxcrt/fx_basic_bstring.cpp", "core/fxcrt/fx_basic_buffer.cpp", @@ -696,9 +702,18 @@ static_library("fxcrt") { "core/fxcrt/fx_basic_wstring.cpp", "core/fxcrt/fx_bidi.cpp", "core/fxcrt/fx_bidi.h", + "core/fxcrt/fx_coordinates.h", + "core/fxcrt/fx_ext.h", "core/fxcrt/fx_extension.cpp", + "core/fxcrt/fx_memory.h", + "core/fxcrt/fx_safe_types.h", + "core/fxcrt/fx_stream.h", + "core/fxcrt/fx_string.h", + "core/fxcrt/fx_system.h", + "core/fxcrt/fx_ucd.h", "core/fxcrt/fx_ucddata.cpp", "core/fxcrt/fx_unicode.cpp", + "core/fxcrt/fx_xml.h", "core/fxcrt/fx_xml_composer.cpp", "core/fxcrt/fx_xml_parser.cpp", "core/fxcrt/fxcrt_posix.cpp", @@ -706,21 +721,6 @@ static_library("fxcrt") { "core/fxcrt/fxcrt_stream.cpp", "core/fxcrt/fxcrt_windows.cpp", "core/fxcrt/fxcrt_windows.h", - "core/fxcrt/include/cfx_count_ref.h", - "core/fxcrt/include/cfx_observable.h", - "core/fxcrt/include/cfx_retain_ptr.h", - "core/fxcrt/include/cfx_string_pool_template.h", - "core/fxcrt/include/cfx_weak_ptr.h", - "core/fxcrt/include/fx_basic.h", - "core/fxcrt/include/fx_coordinates.h", - "core/fxcrt/include/fx_ext.h", - "core/fxcrt/include/fx_memory.h", - "core/fxcrt/include/fx_safe_types.h", - "core/fxcrt/include/fx_stream.h", - "core/fxcrt/include/fx_string.h", - "core/fxcrt/include/fx_system.h", - "core/fxcrt/include/fx_ucd.h", - "core/fxcrt/include/fx_xml.h", "core/fxcrt/plex.h", "core/fxcrt/xml_int.h", ] @@ -736,9 +736,9 @@ static_library("fxcrt") { if (pdf_enable_xfa) { sources += [ "core/fxcrt/fx_arabic.cpp", + "core/fxcrt/fx_arabic.h", + "core/fxcrt/fx_arb.h", "core/fxcrt/fx_basic_maps.cpp", - "core/fxcrt/include/fx_arabic.h", - "core/fxcrt/include/fx_arb.h", ] } } diff --git a/core/fdrm/crypto/fx_crypt.h b/core/fdrm/crypto/fx_crypt.h index bb9f4a9730..75cab89435 100644 --- a/core/fdrm/crypto/fx_crypt.h +++ b/core/fdrm/crypto/fx_crypt.h @@ -7,7 +7,7 @@ #ifndef CORE_FDRM_CRYPTO_FX_CRYPT_H_ #define CORE_FDRM_CRYPTO_FX_CRYPT_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #ifdef __cplusplus extern "C" { diff --git a/core/fpdfapi/cpdf_modulemgr.h b/core/fpdfapi/cpdf_modulemgr.h index cd7561a1f9..bc54a9b2fb 100644 --- a/core/fpdfapi/cpdf_modulemgr.h +++ b/core/fpdfapi/cpdf_modulemgr.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" class CCodec_FaxModule; class CCodec_FlateModule; diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.cpp index 59827d79d4..ca9976db9a 100644 --- a/core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.cpp +++ b/core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.cpp @@ -10,7 +10,7 @@ #include "core/fpdfapi/fpdf_cmaps/cmap_int.h" #include "core/fpdfapi/fpdf_font/font_int.h" #include "core/fpdfapi/fpdf_page/cpdf_pagemodule.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" static const FXCMAP_CMap g_FXCMAP_CNS1_cmaps[] = { {"B5pc-H", FXCMAP_CMap::Range, g_FXCMAP_B5pc_H_0, 247, FXCMAP_CMap::None, diff --git a/core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp b/core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp index 61d13933e6..971a5c8512 100644 --- a/core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp +++ b/core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp @@ -10,7 +10,7 @@ #include "core/fpdfapi/fpdf_cmaps/cmap_int.h" #include "core/fpdfapi/fpdf_font/font_int.h" #include "core/fpdfapi/fpdf_page/cpdf_pagemodule.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" static const FXCMAP_CMap g_FXCMAP_GB1_cmaps[] = { {"GB-EUC-H", FXCMAP_CMap::Range, g_FXCMAP_GB_EUC_H_0, 90, FXCMAP_CMap::None, diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.cpp index f2d4978413..aaa969193a 100644 --- a/core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.cpp +++ b/core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.cpp @@ -10,7 +10,7 @@ #include "core/fpdfapi/fpdf_cmaps/cmap_int.h" #include "core/fpdfapi/fpdf_font/font_int.h" #include "core/fpdfapi/fpdf_page/cpdf_pagemodule.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" static const FXCMAP_CMap g_FXCMAP_Japan1_cmaps[] = { {"83pv-RKSJ-H", FXCMAP_CMap::Range, g_FXCMAP_83pv_RKSJ_H_1, 222, diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.cpp b/core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.cpp index 143963fd4e..62f4a6ecfb 100644 --- a/core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.cpp +++ b/core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.cpp @@ -10,7 +10,7 @@ #include "core/fpdfapi/fpdf_cmaps/cmap_int.h" #include "core/fpdfapi/fpdf_font/font_int.h" #include "core/fpdfapi/fpdf_page/cpdf_pagemodule.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" static const FXCMAP_CMap g_FXCMAP_Korea1_cmaps[] = { {"KSC-EUC-H", FXCMAP_CMap::Range, g_FXCMAP_KSC_EUC_H_0, 467, diff --git a/core/fpdfapi/fpdf_cmaps/cmap_int.h b/core/fpdfapi/fpdf_cmaps/cmap_int.h index 5735432371..40fea04953 100644 --- a/core/fpdfapi/fpdf_cmaps/cmap_int.h +++ b/core/fpdfapi/fpdf_cmaps/cmap_int.h @@ -7,8 +7,8 @@ #ifndef CORE_FPDFAPI_FPDF_CMAPS_CMAP_INT_H_ #define CORE_FPDFAPI_FPDF_CMAPS_CMAP_INT_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" struct FXCMAP_CMap { enum MapType { None, Single, Range, Reverse }; diff --git a/core/fpdfapi/fpdf_edit/cpdf_creator.h b/core/fpdfapi/fpdf_edit/cpdf_creator.h index ec2536f01c..f81b043c60 100644 --- a/core/fpdfapi/fpdf_edit/cpdf_creator.h +++ b/core/fpdfapi/fpdf_edit/cpdf_creator.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" class CPDF_Array; class CPDF_CryptoHandler; diff --git a/core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.h b/core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.h index 19b9258979..8dfc6101e1 100644 --- a/core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.h +++ b/core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.h @@ -8,9 +8,9 @@ #define CORE_FPDFAPI_FPDF_EDIT_CPDF_PAGECONTENTGENERATOR_H_ #include "core/fpdfapi/fpdf_parser/cpdf_document.h" -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" class CPDF_Object; class CPDF_Page; diff --git a/core/fpdfapi/fpdf_edit/editint.h b/core/fpdfapi/fpdf_edit/editint.h index cd04d5de4f..ac10958f22 100644 --- a/core/fpdfapi/fpdf_edit/editint.h +++ b/core/fpdfapi/fpdf_edit/editint.h @@ -9,9 +9,9 @@ #include -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_stream.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_stream.h" +#include "core/fxcrt/fx_system.h" class CPDF_Creator; class CPDF_Object; diff --git a/core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp b/core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp index b039ec5535..1eb4286aa1 100644 --- a/core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp +++ b/core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp @@ -20,7 +20,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_stream_acc.h" #include "core/fpdfapi/fpdf_parser/cpdf_string.h" #include "core/fpdfapi/fpdf_parser/fpdf_parser_decode.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "third_party/base/stl_util.h" #define PDF_OBJECTSTREAM_MAXLENGTH (256 * 1024) diff --git a/core/fpdfapi/fpdf_font/cpdf_cidfont.h b/core/fpdfapi/fpdf_font/cpdf_cidfont.h index c79e97bdf2..2c7df93b64 100644 --- a/core/fpdfapi/fpdf_font/cpdf_cidfont.h +++ b/core/fpdfapi/fpdf_font/cpdf_cidfont.h @@ -10,8 +10,8 @@ #include #include "core/fpdfapi/fpdf_font/cpdf_font.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" enum CIDSet { CIDSET_UNKNOWN, diff --git a/core/fpdfapi/fpdf_font/cpdf_font.cpp b/core/fpdfapi/fpdf_font/cpdf_font.cpp index e431d3d31b..fd9a666d03 100644 --- a/core/fpdfapi/fpdf_font/cpdf_font.cpp +++ b/core/fpdfapi/fpdf_font/cpdf_font.cpp @@ -22,7 +22,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_document.h" #include "core/fpdfapi/fpdf_parser/cpdf_name.h" #include "core/fpdfapi/fpdf_parser/cpdf_stream_acc.h" -#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/fx_memory.h" #include "core/fxge/include/fx_freetype.h" #include "third_party/base/stl_util.h" diff --git a/core/fpdfapi/fpdf_font/cpdf_font.h b/core/fpdfapi/fpdf_font/cpdf_font.h index f94758c309..00fcfd7ddd 100644 --- a/core/fpdfapi/fpdf_font/cpdf_font.h +++ b/core/fpdfapi/fpdf_font/cpdf_font.h @@ -10,8 +10,8 @@ #include #include -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_font.h" #define PDFFONT_FIXEDPITCH 1 diff --git a/core/fpdfapi/fpdf_font/cpdf_fontencoding.h b/core/fpdfapi/fpdf_font/cpdf_fontencoding.h index da0f262fc4..f8db9e5ea7 100644 --- a/core/fpdfapi/fpdf_font/cpdf_fontencoding.h +++ b/core/fpdfapi/fpdf_font/cpdf_fontencoding.h @@ -7,9 +7,9 @@ #ifndef CORE_FPDFAPI_FPDF_FONT_CPDF_FONTENCODING_H_ #define CORE_FPDFAPI_FPDF_FONT_CPDF_FONTENCODING_H_ -#include "core/fxcrt/include/cfx_string_pool_template.h" -#include "core/fxcrt/include/cfx_weak_ptr.h" -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/cfx_string_pool_template.h" +#include "core/fxcrt/cfx_weak_ptr.h" +#include "core/fxcrt/fx_string.h" #define PDFFONT_ENCODING_BUILTIN 0 #define PDFFONT_ENCODING_WINANSI 1 diff --git a/core/fpdfapi/fpdf_font/cpdf_simplefont.h b/core/fpdfapi/fpdf_font/cpdf_simplefont.h index 0d4da46351..47067687a3 100644 --- a/core/fpdfapi/fpdf_font/cpdf_simplefont.h +++ b/core/fpdfapi/fpdf_font/cpdf_simplefont.h @@ -11,8 +11,8 @@ #include "core/fpdfapi/fpdf_font/cpdf_font.h" #include "core/fpdfapi/fpdf_font/cpdf_fontencoding.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" class CPDF_SimpleFont : public CPDF_Font { public: diff --git a/core/fpdfapi/fpdf_font/cpdf_truetypefont.h b/core/fpdfapi/fpdf_font/cpdf_truetypefont.h index 1131371d18..8711b8f53d 100644 --- a/core/fpdfapi/fpdf_font/cpdf_truetypefont.h +++ b/core/fpdfapi/fpdf_font/cpdf_truetypefont.h @@ -8,7 +8,7 @@ #define CORE_FPDFAPI_FPDF_FONT_CPDF_TRUETYPEFONT_H_ #include "core/fpdfapi/fpdf_font/cpdf_simplefont.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CPDF_TrueTypeFont : public CPDF_SimpleFont { public: diff --git a/core/fpdfapi/fpdf_font/cpdf_type1font.h b/core/fpdfapi/fpdf_font/cpdf_type1font.h index e13238f4e4..3cc59aa85b 100644 --- a/core/fpdfapi/fpdf_font/cpdf_type1font.h +++ b/core/fpdfapi/fpdf_font/cpdf_type1font.h @@ -8,7 +8,7 @@ #define CORE_FPDFAPI_FPDF_FONT_CPDF_TYPE1FONT_H_ #include "core/fpdfapi/fpdf_font/cpdf_simplefont.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CPDF_Type1Font : public CPDF_SimpleFont { public: diff --git a/core/fpdfapi/fpdf_font/cpdf_type3char.h b/core/fpdfapi/fpdf_font/cpdf_type3char.h index 7b101d3172..325490678d 100644 --- a/core/fpdfapi/fpdf_font/cpdf_type3char.h +++ b/core/fpdfapi/fpdf_font/cpdf_type3char.h @@ -9,8 +9,8 @@ #include -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" class CFX_DIBitmap; class CPDF_Form; diff --git a/core/fpdfapi/fpdf_font/cpdf_type3font.cpp b/core/fpdfapi/fpdf_font/cpdf_type3font.cpp index da30e447c0..4c81202bc4 100644 --- a/core/fpdfapi/fpdf_font/cpdf_type3font.cpp +++ b/core/fpdfapi/fpdf_font/cpdf_type3font.cpp @@ -13,7 +13,7 @@ #include "core/fpdfapi/fpdf_page/pageint.h" #include "core/fpdfapi/fpdf_parser/cpdf_array.h" #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "third_party/base/stl_util.h" CPDF_Type3Font::CPDF_Type3Font() diff --git a/core/fpdfapi/fpdf_font/cpdf_type3font.h b/core/fpdfapi/fpdf_font/cpdf_type3font.h index c66b270b18..2b840f2267 100644 --- a/core/fpdfapi/fpdf_font/cpdf_type3font.h +++ b/core/fpdfapi/fpdf_font/cpdf_type3font.h @@ -11,8 +11,8 @@ #include #include "core/fpdfapi/fpdf_font/cpdf_simplefont.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" class CPDF_Dictionary; class CPDF_Type3Char; diff --git a/core/fpdfapi/fpdf_font/font_int.h b/core/fpdfapi/fpdf_font/font_int.h index 3a30b54c02..dce9e0c48f 100644 --- a/core/fpdfapi/fpdf_font/font_int.h +++ b/core/fpdfapi/fpdf_font/font_int.h @@ -11,7 +11,7 @@ #include #include "core/fpdfapi/fpdf_font/cpdf_cidfont.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" class CPDF_CID2UnicodeMap; class CPDF_CMap; diff --git a/core/fpdfapi/fpdf_font/fpdf_font.cpp b/core/fpdfapi/fpdf_font/fpdf_font.cpp index 5302ba75b8..722e74dde5 100644 --- a/core/fpdfapi/fpdf_font/fpdf_font.cpp +++ b/core/fpdfapi/fpdf_font/fpdf_font.cpp @@ -17,7 +17,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_number.h" #include "core/fpdfapi/fpdf_parser/cpdf_simple_parser.h" #include "core/fpdfapi/fpdf_parser/cpdf_stream_acc.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "core/fxge/include/fx_freetype.h" #include "third_party/base/numerics/safe_conversions.h" #include "third_party/base/stl_util.h" diff --git a/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp b/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp index dcb8593591..891ca7f9ea 100644 --- a/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp +++ b/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp @@ -13,7 +13,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_array.h" #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h" #include "core/fpdfapi/fpdf_parser/cpdf_simple_parser.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "core/fxge/include/fx_freetype.h" namespace { diff --git a/core/fpdfapi/fpdf_font/ttgsubtable.h b/core/fpdfapi/fpdf_font/ttgsubtable.h index 6e69517c72..759eea4036 100644 --- a/core/fpdfapi/fpdf_font/ttgsubtable.h +++ b/core/fpdfapi/fpdf_font/ttgsubtable.h @@ -12,7 +12,7 @@ #include #include -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #include "core/fxge/include/fx_font.h" #include "core/fxge/include/fx_freetype.h" diff --git a/core/fpdfapi/fpdf_page/cpdf_allstates.h b/core/fpdfapi/fpdf_page/cpdf_allstates.h index 21fd6c2d9b..44c5d3e57f 100644 --- a/core/fpdfapi/fpdf_page/cpdf_allstates.h +++ b/core/fpdfapi/fpdf_page/cpdf_allstates.h @@ -8,8 +8,8 @@ #define CORE_FPDFAPI_FPDF_PAGE_CPDF_ALLSTATES_H_ #include "core/fpdfapi/fpdf_page/cpdf_graphicstates.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" class CPDF_Array; class CPDF_Dictionary; diff --git a/core/fpdfapi/fpdf_page/cpdf_clippath.h b/core/fpdfapi/fpdf_page/cpdf_clippath.h index bff9794085..81c8ce6619 100644 --- a/core/fpdfapi/fpdf_page/cpdf_clippath.h +++ b/core/fpdfapi/fpdf_page/cpdf_clippath.h @@ -12,9 +12,9 @@ #include #include "core/fpdfapi/fpdf_page/cpdf_path.h" -#include "core/fxcrt/include/cfx_count_ref.h" -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/cfx_count_ref.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_coordinates.h" class CPDF_Path; class CPDF_TextObject; diff --git a/core/fpdfapi/fpdf_page/cpdf_color.cpp b/core/fpdfapi/fpdf_page/cpdf_color.cpp index 913af63331..ba46d99b80 100644 --- a/core/fpdfapi/fpdf_page/cpdf_color.cpp +++ b/core/fpdfapi/fpdf_page/cpdf_color.cpp @@ -9,7 +9,7 @@ #include "core/fpdfapi/fpdf_page/pageint.h" #include "core/fpdfapi/fpdf_parser/cpdf_array.h" #include "core/fpdfapi/fpdf_parser/cpdf_document.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" CPDF_Color::CPDF_Color() : m_pCS(nullptr), m_pBuffer(nullptr) {} diff --git a/core/fpdfapi/fpdf_page/cpdf_color.h b/core/fpdfapi/fpdf_page/cpdf_color.h index f74b5f45d2..2056ca4cb8 100644 --- a/core/fpdfapi/fpdf_page/cpdf_color.h +++ b/core/fpdfapi/fpdf_page/cpdf_color.h @@ -8,7 +8,7 @@ #define CORE_FPDFAPI_FPDF_PAGE_CPDF_COLOR_H_ #include "core/fpdfapi/fpdf_page/cpdf_colorspace.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CPDF_Pattern; diff --git a/core/fpdfapi/fpdf_page/cpdf_colorspace.h b/core/fpdfapi/fpdf_page/cpdf_colorspace.h index 951de3ee12..892ec688d0 100644 --- a/core/fpdfapi/fpdf_page/cpdf_colorspace.h +++ b/core/fpdfapi/fpdf_page/cpdf_colorspace.h @@ -9,8 +9,8 @@ #include -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #define PDFCS_DEVICEGRAY 1 #define PDFCS_DEVICERGB 2 diff --git a/core/fpdfapi/fpdf_page/cpdf_colorstate.h b/core/fpdfapi/fpdf_page/cpdf_colorstate.h index 3f2d5632e7..9114ad3528 100644 --- a/core/fpdfapi/fpdf_page/cpdf_colorstate.h +++ b/core/fpdfapi/fpdf_page/cpdf_colorstate.h @@ -8,9 +8,9 @@ #define CORE_FPDFAPI_FPDF_PAGE_CPDF_COLORSTATE_H_ #include "core/fpdfapi/fpdf_page/cpdf_color.h" -#include "core/fxcrt/include/cfx_count_ref.h" -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/cfx_count_ref.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_system.h" class CPDF_Color; class CPDF_ColorSpace; diff --git a/core/fpdfapi/fpdf_page/cpdf_contentmark.h b/core/fpdfapi/fpdf_page/cpdf_contentmark.h index eff4af93ed..5f38f04337 100644 --- a/core/fpdfapi/fpdf_page/cpdf_contentmark.h +++ b/core/fpdfapi/fpdf_page/cpdf_contentmark.h @@ -10,9 +10,9 @@ #include #include "core/fpdfapi/fpdf_page/cpdf_contentmarkitem.h" -#include "core/fxcrt/include/cfx_count_ref.h" -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/cfx_count_ref.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_system.h" class CPDF_Dictionary; diff --git a/core/fpdfapi/fpdf_page/cpdf_contentmarkitem.h b/core/fpdfapi/fpdf_page/cpdf_contentmarkitem.h index d5148af6da..1cd80a25a4 100644 --- a/core/fpdfapi/fpdf_page/cpdf_contentmarkitem.h +++ b/core/fpdfapi/fpdf_page/cpdf_contentmarkitem.h @@ -9,9 +9,9 @@ #include -#include "core/fxcrt/include/fx_memory.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_memory.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" class CPDF_Dictionary; diff --git a/core/fpdfapi/fpdf_page/cpdf_countedobject.h b/core/fpdfapi/fpdf_page/cpdf_countedobject.h index aff83e1ed4..6aa6577124 100644 --- a/core/fpdfapi/fpdf_page/cpdf_countedobject.h +++ b/core/fpdfapi/fpdf_page/cpdf_countedobject.h @@ -9,7 +9,7 @@ #include "core/fpdfapi/fpdf_page/cpdf_colorspace.h" #include "core/fpdfapi/fpdf_page/cpdf_pattern.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" template class CPDF_CountedObject { diff --git a/core/fpdfapi/fpdf_page/cpdf_formobject.h b/core/fpdfapi/fpdf_page/cpdf_formobject.h index f776c91562..d3d92575be 100644 --- a/core/fpdfapi/fpdf_page/cpdf_formobject.h +++ b/core/fpdfapi/fpdf_page/cpdf_formobject.h @@ -10,7 +10,7 @@ #include #include "core/fpdfapi/fpdf_page/cpdf_pageobject.h" -#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/fx_coordinates.h" class CPDF_Form; diff --git a/core/fpdfapi/fpdf_page/cpdf_generalstate.h b/core/fpdfapi/fpdf_page/cpdf_generalstate.h index e3b4d689ba..35562d9706 100644 --- a/core/fpdfapi/fpdf_page/cpdf_generalstate.h +++ b/core/fpdfapi/fpdf_page/cpdf_generalstate.h @@ -7,8 +7,8 @@ #ifndef CORE_FPDFAPI_FPDF_PAGE_CPDF_GENERALSTATE_H_ #define CORE_FPDFAPI_FPDF_PAGE_CPDF_GENERALSTATE_H_ -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_coordinates.h" #include "core/fxge/include/fx_dib.h" class CPDF_Object; diff --git a/core/fpdfapi/fpdf_page/cpdf_image.h b/core/fpdfapi/fpdf_page/cpdf_image.h index d885570d6c..4254202c9d 100644 --- a/core/fpdfapi/fpdf_page/cpdf_image.h +++ b/core/fpdfapi/fpdf_page/cpdf_image.h @@ -8,7 +8,7 @@ #define CORE_FPDFAPI_FPDF_PAGE_CPDF_IMAGE_H_ #include "core/fpdfapi/fpdf_parser/cpdf_stream.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #define PDF_IMAGE_NO_COMPRESS 0x0000 #define PDF_IMAGE_LOSSY_COMPRESS 0x0001 diff --git a/core/fpdfapi/fpdf_page/cpdf_imageobject.h b/core/fpdfapi/fpdf_page/cpdf_imageobject.h index 98ef8c8e4b..e61dd5ac36 100644 --- a/core/fpdfapi/fpdf_page/cpdf_imageobject.h +++ b/core/fpdfapi/fpdf_page/cpdf_imageobject.h @@ -10,7 +10,7 @@ #include #include "core/fpdfapi/fpdf_page/cpdf_pageobject.h" -#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/fx_coordinates.h" class CPDF_Image; diff --git a/core/fpdfapi/fpdf_page/cpdf_meshstream.h b/core/fpdfapi/fpdf_page/cpdf_meshstream.h index 53664b8eb1..5930cf9833 100644 --- a/core/fpdfapi/fpdf_page/cpdf_meshstream.h +++ b/core/fpdfapi/fpdf_page/cpdf_meshstream.h @@ -12,8 +12,8 @@ #include "core/fpdfapi/fpdf_page/cpdf_shadingpattern.h" #include "core/fpdfapi/fpdf_parser/cpdf_stream_acc.h" -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_system.h" struct CPDF_MeshVertex { FX_FLOAT x; diff --git a/core/fpdfapi/fpdf_page/cpdf_page.h b/core/fpdfapi/fpdf_page/cpdf_page.h index 814c1563de..13f51986a2 100644 --- a/core/fpdfapi/fpdf_page/cpdf_page.h +++ b/core/fpdfapi/fpdf_page/cpdf_page.h @@ -10,9 +10,9 @@ #include #include "core/fpdfapi/fpdf_page/cpdf_pageobjectholder.h" -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" class CPDF_Dictionary; class CPDF_Document; diff --git a/core/fpdfapi/fpdf_page/cpdf_pageobject.h b/core/fpdfapi/fpdf_page/cpdf_pageobject.h index 8bf47f034b..359bc2bdb4 100644 --- a/core/fpdfapi/fpdf_page/cpdf_pageobject.h +++ b/core/fpdfapi/fpdf_page/cpdf_pageobject.h @@ -9,8 +9,8 @@ #include "core/fpdfapi/fpdf_page/cpdf_contentmark.h" #include "core/fpdfapi/fpdf_page/cpdf_graphicstates.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" class CPDF_TextObject; class CPDF_PathObject; diff --git a/core/fpdfapi/fpdf_page/cpdf_pageobjectholder.h b/core/fpdfapi/fpdf_page/cpdf_pageobjectholder.h index 36379bed15..a8845552f7 100644 --- a/core/fpdfapi/fpdf_page/cpdf_pageobjectholder.h +++ b/core/fpdfapi/fpdf_page/cpdf_pageobjectholder.h @@ -8,8 +8,8 @@ #define CORE_FPDFAPI_FPDF_PAGE_CPDF_PAGEOBJECTHOLDER_H_ #include "core/fpdfapi/fpdf_page/cpdf_pageobjectlist.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" class IFX_Pause; class CPDF_Dictionary; diff --git a/core/fpdfapi/fpdf_page/cpdf_path.h b/core/fpdfapi/fpdf_page/cpdf_path.h index 304a489b2e..b4450c171e 100644 --- a/core/fpdfapi/fpdf_page/cpdf_path.h +++ b/core/fpdfapi/fpdf_page/cpdf_path.h @@ -7,8 +7,8 @@ #ifndef CORE_FPDFAPI_FPDF_PAGE_CPDF_PATH_H_ #define CORE_FPDFAPI_FPDF_PAGE_CPDF_PATH_H_ -#include "core/fxcrt/include/cfx_count_ref.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/cfx_count_ref.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/cfx_fxgedevice.h" #include "core/fxge/include/cfx_pathdata.h" #include "core/fxge/include/cfx_renderdevice.h" diff --git a/core/fpdfapi/fpdf_page/cpdf_pathobject.h b/core/fpdfapi/fpdf_page/cpdf_pathobject.h index 3144ecb24c..ee40322076 100644 --- a/core/fpdfapi/fpdf_page/cpdf_pathobject.h +++ b/core/fpdfapi/fpdf_page/cpdf_pathobject.h @@ -9,8 +9,8 @@ #include "core/fpdfapi/fpdf_page/cpdf_pageobject.h" #include "core/fpdfapi/fpdf_page/cpdf_path.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" class CPDF_PathObject : public CPDF_PageObject { public: diff --git a/core/fpdfapi/fpdf_page/cpdf_pattern.h b/core/fpdfapi/fpdf_page/cpdf_pattern.h index 983c9eab3f..52be26a823 100644 --- a/core/fpdfapi/fpdf_page/cpdf_pattern.h +++ b/core/fpdfapi/fpdf_page/cpdf_pattern.h @@ -7,8 +7,8 @@ #ifndef CORE_FPDFAPI_FPDF_PAGE_CPDF_PATTERN_H_ #define CORE_FPDFAPI_FPDF_PAGE_CPDF_PATTERN_H_ -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" class CPDF_Document; class CPDF_Object; diff --git a/core/fpdfapi/fpdf_page/cpdf_psengine.h b/core/fpdfapi/fpdf_page/cpdf_psengine.h index c154eb8ac8..81e3204fc3 100644 --- a/core/fpdfapi/fpdf_page/cpdf_psengine.h +++ b/core/fpdfapi/fpdf_page/cpdf_psengine.h @@ -10,7 +10,7 @@ #include #include -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CPDF_PSEngine; class CPDF_PSOP; diff --git a/core/fpdfapi/fpdf_page/cpdf_shadingobject.h b/core/fpdfapi/fpdf_page/cpdf_shadingobject.h index 2f1abf7c5d..ff5e3f52dd 100644 --- a/core/fpdfapi/fpdf_page/cpdf_shadingobject.h +++ b/core/fpdfapi/fpdf_page/cpdf_shadingobject.h @@ -8,7 +8,7 @@ #define CORE_FPDFAPI_FPDF_PAGE_CPDF_SHADINGOBJECT_H_ #include "core/fpdfapi/fpdf_page/cpdf_pageobject.h" -#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/fx_coordinates.h" class CPDF_ShadingPattern; diff --git a/core/fpdfapi/fpdf_page/cpdf_shadingpattern.h b/core/fpdfapi/fpdf_page/cpdf_shadingpattern.h index 7fe2cc6c79..e2bcef268a 100644 --- a/core/fpdfapi/fpdf_page/cpdf_shadingpattern.h +++ b/core/fpdfapi/fpdf_page/cpdf_shadingpattern.h @@ -12,7 +12,7 @@ #include "core/fpdfapi/fpdf_page/cpdf_countedobject.h" #include "core/fpdfapi/fpdf_page/cpdf_pattern.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" enum ShadingType { kInvalidShading = 0, diff --git a/core/fpdfapi/fpdf_page/cpdf_textobject.h b/core/fpdfapi/fpdf_page/cpdf_textobject.h index 51700f5556..c09da96040 100644 --- a/core/fpdfapi/fpdf_page/cpdf_textobject.h +++ b/core/fpdfapi/fpdf_page/cpdf_textobject.h @@ -8,8 +8,8 @@ #define CORE_FPDFAPI_FPDF_PAGE_CPDF_TEXTOBJECT_H_ #include "core/fpdfapi/fpdf_page/cpdf_pageobject.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" struct CPDF_TextObjectItem { uint32_t m_CharCode; diff --git a/core/fpdfapi/fpdf_page/cpdf_textstate.h b/core/fpdfapi/fpdf_page/cpdf_textstate.h index a10c81d9f4..0c615b270b 100644 --- a/core/fpdfapi/fpdf_page/cpdf_textstate.h +++ b/core/fpdfapi/fpdf_page/cpdf_textstate.h @@ -7,8 +7,8 @@ #ifndef CORE_FPDFAPI_FPDF_PAGE_CPDF_TEXTSTATE_H_ #define CORE_FPDFAPI_FPDF_PAGE_CPDF_TEXTSTATE_H_ -#include "core/fxcrt/include/cfx_count_ref.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/cfx_count_ref.h" +#include "core/fxcrt/fx_basic.h" class CPDF_Document; class CPDF_Font; diff --git a/core/fpdfapi/fpdf_page/cpdf_tilingpattern.h b/core/fpdfapi/fpdf_page/cpdf_tilingpattern.h index abfd434274..7ff2068f75 100644 --- a/core/fpdfapi/fpdf_page/cpdf_tilingpattern.h +++ b/core/fpdfapi/fpdf_page/cpdf_tilingpattern.h @@ -10,8 +10,8 @@ #include #include "core/fpdfapi/fpdf_page/cpdf_pattern.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" class CPDF_Document; class CPDF_Form; diff --git a/core/fpdfapi/fpdf_page/fpdf_page_func.cpp b/core/fpdfapi/fpdf_page/fpdf_page_func.cpp index a9836eb1c0..eb487577c8 100644 --- a/core/fpdfapi/fpdf_page/fpdf_page_func.cpp +++ b/core/fpdfapi/fpdf_page/fpdf_page_func.cpp @@ -19,7 +19,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_simple_parser.h" #include "core/fpdfapi/fpdf_parser/cpdf_stream.h" #include "core/fpdfapi/fpdf_parser/cpdf_stream_acc.h" -#include "core/fxcrt/include/fx_safe_types.h" +#include "core/fxcrt/fx_safe_types.h" #include "third_party/base/numerics/safe_conversions_impl.h" class CPDF_PSOP { diff --git a/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp index f1aca0991e..41fefa0580 100644 --- a/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp +++ b/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp @@ -33,7 +33,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_stream.h" #include "core/fpdfapi/fpdf_parser/cpdf_stream_acc.h" #include "core/fpdfapi/fpdf_parser/fpdf_parser_decode.h" -#include "core/fxcrt/include/fx_safe_types.h" +#include "core/fxcrt/fx_safe_types.h" #include "core/fxge/include/cfx_graphstatedata.h" #include "core/fxge/include/cfx_pathdata.h" diff --git a/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp b/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp index ddd640ec7f..68c6eca210 100644 --- a/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp +++ b/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp @@ -28,8 +28,8 @@ #include "core/fpdfapi/fpdf_parser/fpdf_parser_decode.h" #include "core/fpdfapi/fpdf_parser/fpdf_parser_utility.h" #include "core/fxcodec/fx_codec.h" -#include "core/fxcrt/include/fx_ext.h" -#include "core/fxcrt/include/fx_safe_types.h" +#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_safe_types.h" #include "core/fxge/include/cfx_fxgedevice.h" #include "core/fxge/include/cfx_renderdevice.h" diff --git a/core/fpdfapi/fpdf_page/pageint.h b/core/fpdfapi/fpdf_page/pageint.h index 0a99cc1f0a..2fbc629136 100644 --- a/core/fpdfapi/fpdf_page/pageint.h +++ b/core/fpdfapi/fpdf_page/pageint.h @@ -16,8 +16,8 @@ #include "core/fpdfapi/fpdf_page/cpdf_contentmark.h" #include "core/fpdfapi/fpdf_page/cpdf_countedobject.h" #include "core/fpdfapi/fpdf_page/cpdf_pageobjectholder.h" -#include "core/fxcrt/include/cfx_string_pool_template.h" -#include "core/fxcrt/include/cfx_weak_ptr.h" +#include "core/fxcrt/cfx_string_pool_template.h" +#include "core/fxcrt/cfx_weak_ptr.h" #include "core/fxge/include/cfx_pathdata.h" #include "core/fxge/include/cfx_renderdevice.h" diff --git a/core/fpdfapi/fpdf_parser/cfdf_document.h b/core/fpdfapi/fpdf_parser/cfdf_document.h index 1894cb3e2b..cd5b5b77bb 100644 --- a/core/fpdfapi/fpdf_parser/cfdf_document.h +++ b/core/fpdfapi/fpdf_parser/cfdf_document.h @@ -9,9 +9,9 @@ #include "core/fpdfapi/fpdf_parser/cpdf_indirect_object_holder.h" #include "core/fpdfapi/fpdf_parser/cpdf_object.h" -#include "core/fxcrt/include/cfx_string_pool_template.h" -#include "core/fxcrt/include/cfx_weak_ptr.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/cfx_string_pool_template.h" +#include "core/fxcrt/cfx_weak_ptr.h" +#include "core/fxcrt/fx_basic.h" class CPDF_Dictionary; diff --git a/core/fpdfapi/fpdf_parser/cpdf_array.h b/core/fpdfapi/fpdf_parser/cpdf_array.h index b3f480ccd3..2d4909d50e 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_array.h +++ b/core/fpdfapi/fpdf_parser/cpdf_array.h @@ -12,8 +12,8 @@ #include "core/fpdfapi/fpdf_parser/cpdf_indirect_object_holder.h" #include "core/fpdfapi/fpdf_parser/cpdf_object.h" -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_coordinates.h" class CPDF_Array : public CPDF_Object { public: diff --git a/core/fpdfapi/fpdf_parser/cpdf_boolean.h b/core/fpdfapi/fpdf_parser/cpdf_boolean.h index d15e5b78c0..db4a11c312 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_boolean.h +++ b/core/fpdfapi/fpdf_parser/cpdf_boolean.h @@ -8,8 +8,8 @@ #define CORE_FPDFAPI_FPDF_PARSER_CPDF_BOOLEAN_H_ #include "core/fpdfapi/fpdf_parser/cpdf_object.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" class CPDF_Boolean : public CPDF_Object { public: diff --git a/core/fpdfapi/fpdf_parser/cpdf_crypto_handler.h b/core/fpdfapi/fpdf_parser/cpdf_crypto_handler.h index 52ad4f29c8..25ff49b482 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_crypto_handler.h +++ b/core/fpdfapi/fpdf_parser/cpdf_crypto_handler.h @@ -7,9 +7,9 @@ #ifndef CORE_FPDFAPI_FPDF_PARSER_CPDF_CRYPTO_HANDLER_H_ #define CORE_FPDFAPI_FPDF_PARSER_CPDF_CRYPTO_HANDLER_H_ -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" class CPDF_Dictionary; class CPDF_SecurityHandler; diff --git a/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp b/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp index c6414a6b1f..9afe4e5f13 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp +++ b/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp @@ -20,8 +20,8 @@ #include "core/fpdfapi/fpdf_parser/cpdf_reference.h" #include "core/fpdfapi/fpdf_parser/cpdf_stream.h" #include "core/fpdfapi/fpdf_parser/fpdf_parser_utility.h" -#include "core/fxcrt/include/fx_ext.h" -#include "core/fxcrt/include/fx_safe_types.h" +#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_safe_types.h" #include "third_party/base/stl_util.h" CPDF_DataAvail::FileAvail::~FileAvail() {} diff --git a/core/fpdfapi/fpdf_parser/cpdf_data_avail.h b/core/fpdfapi/fpdf_parser/cpdf_data_avail.h index 44e242eac1..4f8f45b4ed 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_data_avail.h +++ b/core/fpdfapi/fpdf_parser/cpdf_data_avail.h @@ -9,7 +9,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_parser.h" #include "core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" class CPDF_Dictionary; class CPDF_HintTables; diff --git a/core/fpdfapi/fpdf_parser/cpdf_dictionary.h b/core/fpdfapi/fpdf_parser/cpdf_dictionary.h index c3cfa3f2b3..07903f5bd7 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_dictionary.h +++ b/core/fpdfapi/fpdf_parser/cpdf_dictionary.h @@ -11,10 +11,10 @@ #include #include "core/fpdfapi/fpdf_parser/cpdf_object.h" -#include "core/fxcrt/include/cfx_string_pool_template.h" -#include "core/fxcrt/include/cfx_weak_ptr.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/cfx_string_pool_template.h" +#include "core/fxcrt/cfx_weak_ptr.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_string.h" class CPDF_IndirectObjectHolder; diff --git a/core/fpdfapi/fpdf_parser/cpdf_document.h b/core/fpdfapi/fpdf_parser/cpdf_document.h index 46b4d7881b..9ae43f7e03 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_document.h +++ b/core/fpdfapi/fpdf_parser/cpdf_document.h @@ -13,9 +13,9 @@ #include "core/fpdfapi/fpdf_parser/cpdf_indirect_object_holder.h" #include "core/fpdfapi/fpdf_parser/cpdf_object.h" #include "core/fpdfdoc/cpdf_linklist.h" -#include "core/fxcrt/include/cfx_string_pool_template.h" -#include "core/fxcrt/include/cfx_weak_ptr.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/cfx_string_pool_template.h" +#include "core/fxcrt/cfx_weak_ptr.h" +#include "core/fxcrt/fx_basic.h" class CFX_Font; class CFX_Matrix; diff --git a/core/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp b/core/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp index b1529c463a..ae602b252d 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp +++ b/core/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp @@ -14,7 +14,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_document.h" #include "core/fpdfapi/fpdf_parser/cpdf_stream.h" #include "core/fpdfapi/fpdf_parser/cpdf_stream_acc.h" -#include "core/fxcrt/include/fx_safe_types.h" +#include "core/fxcrt/fx_safe_types.h" #include "third_party/base/numerics/safe_conversions.h" namespace { diff --git a/core/fpdfapi/fpdf_parser/cpdf_hint_tables.h b/core/fpdfapi/fpdf_parser/cpdf_hint_tables.h index f932950b95..797cb24f50 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_hint_tables.h +++ b/core/fpdfapi/fpdf_parser/cpdf_hint_tables.h @@ -10,8 +10,8 @@ #include #include "core/fpdfapi/fpdf_parser/cpdf_data_avail.h" -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_stream.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_stream.h" class CFX_BitStream; class CPDF_Dictionary; diff --git a/core/fpdfapi/fpdf_parser/cpdf_indirect_object_holder.h b/core/fpdfapi/fpdf_parser/cpdf_indirect_object_holder.h index 414f4eeb07..8fb91954c3 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_indirect_object_holder.h +++ b/core/fpdfapi/fpdf_parser/cpdf_indirect_object_holder.h @@ -10,7 +10,7 @@ #include #include -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CPDF_Object; diff --git a/core/fpdfapi/fpdf_parser/cpdf_number.h b/core/fpdfapi/fpdf_parser/cpdf_number.h index 5f8a23753d..068a9c9594 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_number.h +++ b/core/fpdfapi/fpdf_parser/cpdf_number.h @@ -8,8 +8,8 @@ #define CORE_FPDFAPI_FPDF_PARSER_CPDF_NUMBER_H_ #include "core/fpdfapi/fpdf_parser/cpdf_object.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" class CPDF_Number : public CPDF_Object { public: diff --git a/core/fpdfapi/fpdf_parser/cpdf_object.cpp b/core/fpdfapi/fpdf_parser/cpdf_object.cpp index 868dc674f0..ba7490a13f 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_object.cpp +++ b/core/fpdfapi/fpdf_parser/cpdf_object.cpp @@ -13,7 +13,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_indirect_object_holder.h" #include "core/fpdfapi/fpdf_parser/cpdf_parser.h" #include "core/fpdfapi/fpdf_parser/fpdf_parser_decode.h" -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #include "third_party/base/stl_util.h" CPDF_Object::~CPDF_Object() {} diff --git a/core/fpdfapi/fpdf_parser/cpdf_object.h b/core/fpdfapi/fpdf_parser/cpdf_object.h index f46741546c..7077bc190b 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_object.h +++ b/core/fpdfapi/fpdf_parser/cpdf_object.h @@ -10,8 +10,8 @@ #include #include -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" class CPDF_Array; class CPDF_Boolean; diff --git a/core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp b/core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp index d93ccf7be5..beeb8f30c9 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp +++ b/core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp @@ -17,7 +17,7 @@ #include #include "core/fpdfapi/fpdf_parser/cpdf_indirect_object_holder.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #include "testing/gtest/include/gtest/gtest.h" namespace { diff --git a/core/fpdfapi/fpdf_parser/cpdf_parser.cpp b/core/fpdfapi/fpdf_parser/cpdf_parser.cpp index 9dc35ddd12..182d3869bc 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_parser.cpp +++ b/core/fpdfapi/fpdf_parser/cpdf_parser.cpp @@ -19,8 +19,8 @@ #include "core/fpdfapi/fpdf_parser/cpdf_stream_acc.h" #include "core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h" #include "core/fpdfapi/fpdf_parser/fpdf_parser_utility.h" -#include "core/fxcrt/include/fx_ext.h" -#include "core/fxcrt/include/fx_safe_types.h" +#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_safe_types.h" #include "third_party/base/stl_util.h" namespace { diff --git a/core/fpdfapi/fpdf_parser/cpdf_parser.h b/core/fpdfapi/fpdf_parser/cpdf_parser.h index 0368a45611..254b8b0274 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_parser.h +++ b/core/fpdfapi/fpdf_parser/cpdf_parser.h @@ -11,7 +11,7 @@ #include #include -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" class CPDF_Array; class CPDF_CryptoHandler; diff --git a/core/fpdfapi/fpdf_parser/cpdf_parser_unittest.cpp b/core/fpdfapi/fpdf_parser/cpdf_parser_unittest.cpp index 8ad2e47cb6..9c1de09eb1 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_parser_unittest.cpp +++ b/core/fpdfapi/fpdf_parser/cpdf_parser_unittest.cpp @@ -7,8 +7,8 @@ #include "core/fpdfapi/fpdf_parser/cpdf_parser.h" #include "core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h" -#include "core/fxcrt/include/fx_ext.h" -#include "core/fxcrt/include/fx_stream.h" +#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_stream.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/utils/path_service.h" diff --git a/core/fpdfapi/fpdf_parser/cpdf_security_handler.h b/core/fpdfapi/fpdf_parser/cpdf_security_handler.h index 3cf4d2cd19..33c4c0c17d 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_security_handler.h +++ b/core/fpdfapi/fpdf_parser/cpdf_security_handler.h @@ -7,8 +7,8 @@ #ifndef CORE_FPDFAPI_FPDF_PARSER_CPDF_SECURITY_HANDLER_H_ #define CORE_FPDFAPI_FPDF_PARSER_CPDF_SECURITY_HANDLER_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #define FXCIPHER_NONE 0 #define FXCIPHER_RC4 1 diff --git a/core/fpdfapi/fpdf_parser/cpdf_simple_parser.h b/core/fpdfapi/fpdf_parser/cpdf_simple_parser.h index fad0e42b95..d23182dcb8 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_simple_parser.h +++ b/core/fpdfapi/fpdf_parser/cpdf_simple_parser.h @@ -7,8 +7,8 @@ #ifndef CORE_FPDFAPI_FPDF_PARSER_CPDF_SIMPLE_PARSER_H_ #define CORE_FPDFAPI_FPDF_PARSER_CPDF_SIMPLE_PARSER_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" class CPDF_SimpleParser { public: diff --git a/core/fpdfapi/fpdf_parser/cpdf_simple_parser_unittest.cpp b/core/fpdfapi/fpdf_parser/cpdf_simple_parser_unittest.cpp index 67a8f5a0a0..50bbb528c5 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_simple_parser_unittest.cpp +++ b/core/fpdfapi/fpdf_parser/cpdf_simple_parser_unittest.cpp @@ -7,7 +7,7 @@ #include #include "core/fpdfapi/fpdf_parser/fpdf_parser_utility.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/test_support.h" diff --git a/core/fpdfapi/fpdf_parser/cpdf_stream.h b/core/fpdfapi/fpdf_parser/cpdf_stream.h index 9ae6fd64a8..e3bba96346 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_stream.h +++ b/core/fpdfapi/fpdf_parser/cpdf_stream.h @@ -12,7 +12,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h" #include "core/fpdfapi/fpdf_parser/cpdf_object.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" class CPDF_Stream : public CPDF_Object { public: diff --git a/core/fpdfapi/fpdf_parser/cpdf_stream_acc.h b/core/fpdfapi/fpdf_parser/cpdf_stream_acc.h index 19fa12b281..cf2bc8a01d 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_stream_acc.h +++ b/core/fpdfapi/fpdf_parser/cpdf_stream_acc.h @@ -9,8 +9,8 @@ #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h" #include "core/fpdfapi/fpdf_parser/cpdf_stream.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" class CPDF_StreamAcc { public: diff --git a/core/fpdfapi/fpdf_parser/cpdf_string.h b/core/fpdfapi/fpdf_parser/cpdf_string.h index 72d548cde1..2ce0d02ed7 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_string.h +++ b/core/fpdfapi/fpdf_parser/cpdf_string.h @@ -8,8 +8,8 @@ #define CORE_FPDFAPI_FPDF_PARSER_CPDF_STRING_H_ #include "core/fpdfapi/fpdf_parser/cpdf_object.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" class CPDF_String : public CPDF_Object { public: diff --git a/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp b/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp index 5aa431ad59..32a75f98da 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp +++ b/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp @@ -21,7 +21,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_string.h" #include "core/fpdfapi/fpdf_parser/fpdf_parser_decode.h" #include "core/fpdfapi/fpdf_parser/fpdf_parser_utility.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "third_party/base/numerics/safe_math.h" namespace { diff --git a/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h b/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h index 5838fb7144..3a9f1b473a 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h +++ b/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h @@ -9,9 +9,9 @@ #include -#include "core/fxcrt/include/cfx_string_pool_template.h" -#include "core/fxcrt/include/cfx_weak_ptr.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/cfx_string_pool_template.h" +#include "core/fxcrt/cfx_weak_ptr.h" +#include "core/fxcrt/fx_basic.h" class CPDF_CryptoHandler; class CPDF_Dictionary; diff --git a/core/fpdfapi/fpdf_parser/cpdf_syntax_parser_unittest.cpp b/core/fpdfapi/fpdf_parser/cpdf_syntax_parser_unittest.cpp index 7bd1c7a407..eb19652a0c 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_syntax_parser_unittest.cpp +++ b/core/fpdfapi/fpdf_parser/cpdf_syntax_parser_unittest.cpp @@ -7,8 +7,8 @@ #include "core/fpdfapi/fpdf_parser/cpdf_parser.h" #include "core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h" -#include "core/fxcrt/include/fx_ext.h" -#include "core/fxcrt/include/fx_stream.h" +#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_stream.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/utils/path_service.h" diff --git a/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp b/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp index 62350cdd1e..4f172c0073 100644 --- a/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp +++ b/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp @@ -17,7 +17,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h" #include "core/fpdfapi/fpdf_parser/fpdf_parser_utility.h" #include "core/fxcodec/fx_codec.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "third_party/base/stl_util.h" namespace { diff --git a/core/fpdfapi/fpdf_parser/fpdf_parser_decode.h b/core/fpdfapi/fpdf_parser/fpdf_parser_decode.h index 0a0aa81d5a..fab148bc14 100644 --- a/core/fpdfapi/fpdf_parser/fpdf_parser_decode.h +++ b/core/fpdfapi/fpdf_parser/fpdf_parser_decode.h @@ -7,7 +7,7 @@ #ifndef CORE_FPDFAPI_FPDF_PARSER_FPDF_PARSER_DECODE_H_ #define CORE_FPDFAPI_FPDF_PARSER_FPDF_PARSER_DECODE_H_ -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" class CPDF_Dictionary; diff --git a/core/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp b/core/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp index 27d1f0f486..ab0dc4ea3f 100644 --- a/core/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp +++ b/core/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp @@ -7,7 +7,7 @@ #include #include -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #include "testing/embedder_test.h" #include "testing/fx_string_testhelpers.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp b/core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp index e85f996eaf..304cb4a7e6 100644 --- a/core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp +++ b/core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp @@ -14,7 +14,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_stream_acc.h" #include "core/fpdfapi/fpdf_parser/cpdf_string.h" #include "core/fpdfapi/fpdf_parser/fpdf_parser_decode.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" // Indexed by 8-bit character code, contains either: // 'W' - for whitespace: NUL, TAB, CR, LF, FF, SPACE, 0x80, 0xff diff --git a/core/fpdfapi/fpdf_parser/fpdf_parser_utility.h b/core/fpdfapi/fpdf_parser/fpdf_parser_utility.h index 0b27a1fe9a..98bffa7e7c 100644 --- a/core/fpdfapi/fpdf_parser/fpdf_parser_utility.h +++ b/core/fpdfapi/fpdf_parser/fpdf_parser_utility.h @@ -7,8 +7,8 @@ #ifndef CORE_FPDFAPI_FPDF_PARSER_FPDF_PARSER_UTILITY_H_ #define CORE_FPDFAPI_FPDF_PARSER_FPDF_PARSER_UTILITY_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" class IFX_FileRead; class CPDF_Dictionary; diff --git a/core/fpdfapi/fpdf_render/cpdf_pagerendercache.h b/core/fpdfapi/fpdf_render/cpdf_pagerendercache.h index d68856b12b..fda448f7db 100644 --- a/core/fpdfapi/fpdf_render/cpdf_pagerendercache.h +++ b/core/fpdfapi/fpdf_render/cpdf_pagerendercache.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CPDF_Stream; class CPDF_ImageCacheEntry; diff --git a/core/fpdfapi/fpdf_render/cpdf_progressiverenderer.h b/core/fpdfapi/fpdf_render/cpdf_progressiverenderer.h index cbc98a1bfb..5ba3a55453 100644 --- a/core/fpdfapi/fpdf_render/cpdf_progressiverenderer.h +++ b/core/fpdfapi/fpdf_render/cpdf_progressiverenderer.h @@ -11,8 +11,8 @@ #include "core/fpdfapi/fpdf_page/cpdf_pageobjectlist.h" #include "core/fpdfapi/fpdf_render/cpdf_rendercontext.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" class CPDF_RenderOptions; class CPDF_RenderStatus; diff --git a/core/fpdfapi/fpdf_render/cpdf_rendercontext.h b/core/fpdfapi/fpdf_render/cpdf_rendercontext.h index 900e3a3d89..5d0845789f 100644 --- a/core/fpdfapi/fpdf_render/cpdf_rendercontext.h +++ b/core/fpdfapi/fpdf_render/cpdf_rendercontext.h @@ -7,8 +7,8 @@ #ifndef CORE_FPDFAPI_FPDF_RENDER_CPDF_RENDERCONTEXT_H_ #define CORE_FPDFAPI_FPDF_RENDER_CPDF_RENDERCONTEXT_H_ -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_coordinates.h" class CPDF_Dictionary; class CPDF_Document; diff --git a/core/fpdfapi/fpdf_render/cpdf_renderoptions.h b/core/fpdfapi/fpdf_render/cpdf_renderoptions.h index dc45423ce2..73383ae8f0 100644 --- a/core/fpdfapi/fpdf_render/cpdf_renderoptions.h +++ b/core/fpdfapi/fpdf_render/cpdf_renderoptions.h @@ -7,7 +7,7 @@ #ifndef CORE_FPDFAPI_FPDF_RENDER_CPDF_RENDEROPTIONS_H_ #define CORE_FPDFAPI_FPDF_RENDER_CPDF_RENDEROPTIONS_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_dib.h" class CPDF_OCContext; diff --git a/core/fpdfapi/fpdf_render/cpdf_textrenderer.h b/core/fpdfapi/fpdf_render/cpdf_textrenderer.h index ddc9edc7fc..ca6d91efe6 100644 --- a/core/fpdfapi/fpdf_render/cpdf_textrenderer.h +++ b/core/fpdfapi/fpdf_render/cpdf_textrenderer.h @@ -7,9 +7,9 @@ #ifndef CORE_FPDFAPI_FPDF_RENDER_CPDF_TEXTRENDERER_H_ #define CORE_FPDFAPI_FPDF_RENDER_CPDF_TEXTRENDERER_H_ -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_dib.h" class CFX_RenderDevice; diff --git a/core/fpdfapi/fpdf_render/cpdf_type3cache.h b/core/fpdfapi/fpdf_render/cpdf_type3cache.h index 50d7147805..199bc28987 100644 --- a/core/fpdfapi/fpdf_render/cpdf_type3cache.h +++ b/core/fpdfapi/fpdf_render/cpdf_type3cache.h @@ -10,9 +10,9 @@ #include #include "core/fpdfapi/fpdf_font/cpdf_type3font.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" class CPDF_Type3Glyphs; diff --git a/core/fpdfapi/fpdf_render/cpdf_type3glyphs.h b/core/fpdfapi/fpdf_render/cpdf_type3glyphs.h index d021e99e20..c88d179b8b 100644 --- a/core/fpdfapi/fpdf_render/cpdf_type3glyphs.h +++ b/core/fpdfapi/fpdf_render/cpdf_type3glyphs.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CFX_GlyphBitmap; diff --git a/core/fpdfapi/fpdf_render/fpdf_render_image.cpp b/core/fpdfapi/fpdf_render/fpdf_render_image.cpp index 8867af0df1..1b7b7db575 100644 --- a/core/fpdfapi/fpdf_render/fpdf_render_image.cpp +++ b/core/fpdfapi/fpdf_render/fpdf_render_image.cpp @@ -25,7 +25,7 @@ #include "core/fpdfapi/fpdf_render/cpdf_renderoptions.h" #include "core/fpdfdoc/cpdf_occontext.h" #include "core/fxcodec/fx_codec.h" -#include "core/fxcrt/include/fx_safe_types.h" +#include "core/fxcrt/fx_safe_types.h" #include "core/fxge/include/cfx_fxgedevice.h" #include "core/fxge/include/cfx_pathdata.h" diff --git a/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp index d464eab6e1..d040871ac6 100644 --- a/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp +++ b/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp @@ -19,7 +19,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_document.h" #include "core/fpdfapi/fpdf_render/cpdf_pagerendercache.h" #include "core/fxcodec/fx_codec.h" -#include "core/fxcrt/include/fx_safe_types.h" +#include "core/fxcrt/fx_safe_types.h" namespace { diff --git a/core/fpdfdoc/cpdf_action.h b/core/fpdfdoc/cpdf_action.h index 7bef84d2e4..5b985fb855 100644 --- a/core/fpdfdoc/cpdf_action.h +++ b/core/fpdfdoc/cpdf_action.h @@ -9,7 +9,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h" #include "core/fpdfdoc/cpdf_dest.h" -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" class CPDF_Document; diff --git a/core/fpdfdoc/cpdf_annot.cpp b/core/fpdfdoc/cpdf_annot.cpp index 17b2d56bef..ed43e5bab8 100644 --- a/core/fpdfdoc/cpdf_annot.cpp +++ b/core/fpdfdoc/cpdf_annot.cpp @@ -13,7 +13,7 @@ #include "core/fpdfapi/fpdf_render/cpdf_rendercontext.h" #include "core/fpdfapi/fpdf_render/cpdf_renderoptions.h" #include "core/fpdfdoc/cpvt_generateap.h" -#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/fx_memory.h" #include "core/fxge/include/cfx_graphstatedata.h" #include "core/fxge/include/cfx_pathdata.h" #include "core/fxge/include/cfx_renderdevice.h" diff --git a/core/fpdfdoc/cpdf_annot.h b/core/fpdfdoc/cpdf_annot.h index f3166256d6..d4bbca91f7 100644 --- a/core/fpdfdoc/cpdf_annot.h +++ b/core/fpdfdoc/cpdf_annot.h @@ -10,9 +10,9 @@ #include #include -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" class CFX_RenderDevice; class CPDF_Dictionary; diff --git a/core/fpdfdoc/cpdf_annotlist.h b/core/fpdfdoc/cpdf_annotlist.h index afe85f33af..2488c68b0b 100644 --- a/core/fpdfdoc/cpdf_annotlist.h +++ b/core/fpdfdoc/cpdf_annotlist.h @@ -10,8 +10,8 @@ #include #include -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" class CFX_RenderDevice; class CPDF_Annot; diff --git a/core/fpdfdoc/cpdf_apsettings.h b/core/fpdfdoc/cpdf_apsettings.h index 4354ac071f..b2ae2488a1 100644 --- a/core/fpdfdoc/cpdf_apsettings.h +++ b/core/fpdfdoc/cpdf_apsettings.h @@ -8,8 +8,8 @@ #define CORE_FPDFDOC_CPDF_APSETTINGS_H_ #include "core/fpdfdoc/cpdf_iconfit.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_dib.h" class CPDF_Dictionary; diff --git a/core/fpdfdoc/cpdf_bookmark.h b/core/fpdfdoc/cpdf_bookmark.h index b19ebbbd8c..30a8a512cc 100644 --- a/core/fpdfdoc/cpdf_bookmark.h +++ b/core/fpdfdoc/cpdf_bookmark.h @@ -9,7 +9,7 @@ #include "core/fpdfdoc/cpdf_action.h" #include "core/fpdfdoc/cpdf_dest.h" -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" class CPDF_Dictionary; class CPDF_Document; diff --git a/core/fpdfdoc/cpdf_defaultappearance.h b/core/fpdfdoc/cpdf_defaultappearance.h index c09a5aacf4..70b1bd4583 100644 --- a/core/fpdfdoc/cpdf_defaultappearance.h +++ b/core/fpdfdoc/cpdf_defaultappearance.h @@ -8,9 +8,9 @@ #define CORE_FPDFDOC_CPDF_DEFAULTAPPEARANCE_H_ #include "core/fpdfdoc/cpdf_defaultappearance.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_dib.h" enum class BorderStyle { SOLID, DASH, BEVELED, INSET, UNDERLINE }; diff --git a/core/fpdfdoc/cpdf_dest.h b/core/fpdfdoc/cpdf_dest.h index 7a966e26fe..8f38192fd8 100644 --- a/core/fpdfdoc/cpdf_dest.h +++ b/core/fpdfdoc/cpdf_dest.h @@ -7,8 +7,8 @@ #ifndef CORE_FPDFDOC_CPDF_DEST_H_ #define CORE_FPDFDOC_CPDF_DEST_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" class CPDF_Document; class CPDF_Object; diff --git a/core/fpdfdoc/cpdf_docjsactions.h b/core/fpdfdoc/cpdf_docjsactions.h index 34b8b7ed9e..8a8d03d364 100644 --- a/core/fpdfdoc/cpdf_docjsactions.h +++ b/core/fpdfdoc/cpdf_docjsactions.h @@ -8,7 +8,7 @@ #define CORE_FPDFDOC_CPDF_DOCJSACTIONS_H_ #include "core/fpdfdoc/cpdf_action.h" -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" class CPDF_Document; diff --git a/core/fpdfdoc/cpdf_filespec.cpp b/core/fpdfdoc/cpdf_filespec.cpp index 51b8b356a5..c361113df5 100644 --- a/core/fpdfdoc/cpdf_filespec.cpp +++ b/core/fpdfdoc/cpdf_filespec.cpp @@ -9,7 +9,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h" #include "core/fpdfapi/fpdf_parser/cpdf_object.h" #include "core/fpdfapi/fpdf_parser/fpdf_parser_decode.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" namespace { diff --git a/core/fpdfdoc/cpdf_filespec.h b/core/fpdfdoc/cpdf_filespec.h index c960a839f4..6266c37a47 100644 --- a/core/fpdfdoc/cpdf_filespec.h +++ b/core/fpdfdoc/cpdf_filespec.h @@ -7,9 +7,9 @@ #ifndef CORE_FPDFDOC_CPDF_FILESPEC_H_ #define CORE_FPDFDOC_CPDF_FILESPEC_H_ -#include "core/fxcrt/include/cfx_string_pool_template.h" -#include "core/fxcrt/include/cfx_weak_ptr.h" -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/cfx_string_pool_template.h" +#include "core/fxcrt/cfx_weak_ptr.h" +#include "core/fxcrt/fx_string.h" class CPDF_Object; diff --git a/core/fpdfdoc/cpdf_formcontrol.h b/core/fpdfdoc/cpdf_formcontrol.h index 3f6cb537ce..1ad79ee6f7 100644 --- a/core/fpdfdoc/cpdf_formcontrol.h +++ b/core/fpdfdoc/cpdf_formcontrol.h @@ -16,8 +16,8 @@ #include "core/fpdfdoc/cpdf_formfield.h" #include "core/fpdfdoc/cpdf_iconfit.h" #include "core/fpdfdoc/ipdf_formnotify.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_string.h" #include "core/fxge/include/fx_dib.h" #define TEXTPOS_CAPTION 0 diff --git a/core/fpdfdoc/cpdf_formfield.h b/core/fpdfdoc/cpdf_formfield.h index 1d83eb060c..abdd6f78b9 100644 --- a/core/fpdfdoc/cpdf_formfield.h +++ b/core/fpdfdoc/cpdf_formfield.h @@ -9,9 +9,9 @@ #include "core/fpdfdoc/cpdf_aaction.h" #include "core/fpdfdoc/cpdf_formfield.h" -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #define FIELDTYPE_UNKNOWN 0 #define FIELDTYPE_PUSHBUTTON 1 diff --git a/core/fpdfdoc/cpdf_iconfit.cpp b/core/fpdfdoc/cpdf_iconfit.cpp index 1b800b6be9..dacd521c80 100644 --- a/core/fpdfdoc/cpdf_iconfit.cpp +++ b/core/fpdfdoc/cpdf_iconfit.cpp @@ -8,7 +8,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_array.h" #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h" -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" CPDF_IconFit::ScaleMethod CPDF_IconFit::GetScaleMethod() { if (!m_pDict) diff --git a/core/fpdfdoc/cpdf_iconfit.h b/core/fpdfdoc/cpdf_iconfit.h index 746161475e..1ef023ab5f 100644 --- a/core/fpdfdoc/cpdf_iconfit.h +++ b/core/fpdfdoc/cpdf_iconfit.h @@ -7,7 +7,7 @@ #ifndef CORE_FPDFDOC_CPDF_ICONFIT_H_ #define CORE_FPDFDOC_CPDF_ICONFIT_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CPDF_Dictionary; diff --git a/core/fpdfdoc/cpdf_interform.h b/core/fpdfdoc/cpdf_interform.h index 4c62a401b7..71d4517cbb 100644 --- a/core/fpdfdoc/cpdf_interform.h +++ b/core/fpdfdoc/cpdf_interform.h @@ -13,8 +13,8 @@ #include "core/fpdfapi/fpdf_parser/fpdf_parser_decode.h" #include "core/fpdfdoc/cpdf_defaultappearance.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" class CFieldTree; class CFDF_Document; diff --git a/core/fpdfdoc/cpdf_link.h b/core/fpdfdoc/cpdf_link.h index ce99573e91..162630d6ac 100644 --- a/core/fpdfdoc/cpdf_link.h +++ b/core/fpdfdoc/cpdf_link.h @@ -9,7 +9,7 @@ #include "core/fpdfdoc/cpdf_action.h" #include "core/fpdfdoc/cpdf_dest.h" -#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/fx_coordinates.h" class CPDF_Dictionary; diff --git a/core/fpdfdoc/cpdf_linklist.h b/core/fpdfdoc/cpdf_linklist.h index d5c0432671..21d69fdd1d 100644 --- a/core/fpdfdoc/cpdf_linklist.h +++ b/core/fpdfdoc/cpdf_linklist.h @@ -11,7 +11,7 @@ #include #include "core/fpdfdoc/cpdf_link.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CPDF_Page; class CPDF_Dictionary; diff --git a/core/fpdfdoc/cpdf_metadata.cpp b/core/fpdfdoc/cpdf_metadata.cpp index 8186c70c54..3f90b66a64 100644 --- a/core/fpdfdoc/cpdf_metadata.cpp +++ b/core/fpdfdoc/cpdf_metadata.cpp @@ -9,7 +9,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_document.h" #include "core/fpdfapi/fpdf_parser/cpdf_stream.h" #include "core/fpdfapi/fpdf_parser/cpdf_stream_acc.h" -#include "core/fxcrt/include/fx_xml.h" +#include "core/fxcrt/fx_xml.h" CPDF_Metadata::CPDF_Metadata(CPDF_Document* pDoc) { CPDF_Dictionary* pRoot = pDoc->GetRoot(); diff --git a/core/fpdfdoc/cpdf_nametree.h b/core/fpdfdoc/cpdf_nametree.h index 45308b7de5..d6763ad987 100644 --- a/core/fpdfdoc/cpdf_nametree.h +++ b/core/fpdfdoc/cpdf_nametree.h @@ -7,7 +7,7 @@ #ifndef CORE_FPDFDOC_CPDF_NAMETREE_H_ #define CORE_FPDFDOC_CPDF_NAMETREE_H_ -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" class CPDF_Array; class CPDF_Dictionary; diff --git a/core/fpdfdoc/cpdf_occontext.h b/core/fpdfdoc/cpdf_occontext.h index 5c850b9400..49bbd76d0c 100644 --- a/core/fpdfdoc/cpdf_occontext.h +++ b/core/fpdfdoc/cpdf_occontext.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" class CPDF_Array; class CPDF_Dictionary; diff --git a/core/fpdfdoc/cpdf_pagelabel.h b/core/fpdfdoc/cpdf_pagelabel.h index 16acf3b701..6a0664bfca 100644 --- a/core/fpdfdoc/cpdf_pagelabel.h +++ b/core/fpdfdoc/cpdf_pagelabel.h @@ -7,7 +7,7 @@ #ifndef CORE_FPDFDOC_CPDF_PAGELABEL_H_ #define CORE_FPDFDOC_CPDF_PAGELABEL_H_ -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" class CPDF_Document; diff --git a/core/fpdfdoc/cpdf_variabletext.h b/core/fpdfdoc/cpdf_variabletext.h index cc13b33f30..e57636e821 100644 --- a/core/fpdfdoc/cpdf_variabletext.h +++ b/core/fpdfdoc/cpdf_variabletext.h @@ -15,9 +15,9 @@ #include "core/fpdfdoc/cpvt_lineinfo.h" #include "core/fpdfdoc/cpvt_wordplace.h" #include "core/fpdfdoc/cpvt_wordrange.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_font.h" class CSection; diff --git a/core/fpdfdoc/cpdf_viewerpreferences.h b/core/fpdfdoc/cpdf_viewerpreferences.h index 9375e85b25..f400c37b97 100644 --- a/core/fpdfdoc/cpdf_viewerpreferences.h +++ b/core/fpdfdoc/cpdf_viewerpreferences.h @@ -7,8 +7,8 @@ #ifndef CORE_FPDFDOC_CPDF_VIEWERPREFERENCES_H_ #define CORE_FPDFDOC_CPDF_VIEWERPREFERENCES_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" class CPDF_Array; class CPDF_Dictionary; diff --git a/core/fpdfdoc/cpvt_arraytemplate.h b/core/fpdfdoc/cpvt_arraytemplate.h index a0f129d083..5274bd9ba4 100644 --- a/core/fpdfdoc/cpvt_arraytemplate.h +++ b/core/fpdfdoc/cpvt_arraytemplate.h @@ -7,8 +7,8 @@ #ifndef CORE_FPDFDOC_CPVT_ARRAYTEMPLATE_H_ #define CORE_FPDFDOC_CPVT_ARRAYTEMPLATE_H_ -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_system.h" template class CPVT_ArrayTemplate : public CFX_ArrayTemplate { diff --git a/core/fpdfdoc/cpvt_color.h b/core/fpdfdoc/cpvt_color.h index 1be6bebae7..0eec252703 100644 --- a/core/fpdfdoc/cpvt_color.h +++ b/core/fpdfdoc/cpvt_color.h @@ -8,8 +8,8 @@ #define CORE_FPDFDOC_CPVT_COLOR_H_ #include "core/fpdfapi/fpdf_parser/cpdf_array.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" struct CPVT_Color { enum Type { kTransparent = 0, kGray, kRGB, kCMYK }; diff --git a/core/fpdfdoc/cpvt_floatrect.h b/core/fpdfdoc/cpvt_floatrect.h index d58161034b..6fc4b8ebce 100644 --- a/core/fpdfdoc/cpvt_floatrect.h +++ b/core/fpdfdoc/cpvt_floatrect.h @@ -7,7 +7,7 @@ #ifndef CORE_FPDFDOC_CPVT_FLOATRECT_H_ #define CORE_FPDFDOC_CPVT_FLOATRECT_H_ -#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/fx_coordinates.h" class CPVT_FloatRect : public CFX_FloatRect { public: diff --git a/core/fpdfdoc/cpvt_fontmap.h b/core/fpdfdoc/cpvt_fontmap.h index d5ec87948d..98e390f409 100644 --- a/core/fpdfdoc/cpvt_fontmap.h +++ b/core/fpdfdoc/cpvt_fontmap.h @@ -10,7 +10,7 @@ #include #include "core/fpdfdoc/ipvt_fontmap.h" -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" class CPDF_Document; class CPDF_Dictionary; diff --git a/core/fpdfdoc/cpvt_generateap.h b/core/fpdfdoc/cpvt_generateap.h index 603d4458f4..5a52d87250 100644 --- a/core/fpdfdoc/cpvt_generateap.h +++ b/core/fpdfdoc/cpvt_generateap.h @@ -11,9 +11,9 @@ #include "core/fpdfdoc/cpdf_variabletext.h" #include "core/fpdfdoc/cpvt_color.h" #include "core/fpdfdoc/cpvt_dash.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" class CPDF_Dictionary; class CPDF_Document; diff --git a/core/fpdfdoc/cpvt_line.h b/core/fpdfdoc/cpvt_line.h index 70e3b7f40b..25ae34af16 100644 --- a/core/fpdfdoc/cpvt_line.h +++ b/core/fpdfdoc/cpvt_line.h @@ -8,8 +8,8 @@ #define CORE_FPDFDOC_CPVT_LINE_H_ #include "core/fpdfdoc/cpvt_wordplace.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" struct CPVT_Line { CPVT_Line() : fLineWidth(0.0f), fLineAscent(0.0f), fLineDescent(0.0f) {} diff --git a/core/fpdfdoc/cpvt_lineinfo.h b/core/fpdfdoc/cpvt_lineinfo.h index ab66d8c540..2ebc51cb8e 100644 --- a/core/fpdfdoc/cpvt_lineinfo.h +++ b/core/fpdfdoc/cpvt_lineinfo.h @@ -7,7 +7,7 @@ #ifndef CORE_FPDFDOC_CPVT_LINEINFO_H_ #define CORE_FPDFDOC_CPVT_LINEINFO_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" struct CPVT_LineInfo { CPVT_LineInfo() diff --git a/core/fpdfdoc/cpvt_secprops.h b/core/fpdfdoc/cpvt_secprops.h index e5c633f2c4..d1c4b589f1 100644 --- a/core/fpdfdoc/cpvt_secprops.h +++ b/core/fpdfdoc/cpvt_secprops.h @@ -7,7 +7,7 @@ #ifndef CORE_FPDFDOC_CPVT_SECPROPS_H_ #define CORE_FPDFDOC_CPVT_SECPROPS_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" struct CPVT_SecProps { CPVT_SecProps() : fLineLeading(0.0f), fLineIndent(0.0f), nAlignment(0) {} diff --git a/core/fpdfdoc/cpvt_section.h b/core/fpdfdoc/cpvt_section.h index ae122902d8..42b16fd310 100644 --- a/core/fpdfdoc/cpvt_section.h +++ b/core/fpdfdoc/cpvt_section.h @@ -10,7 +10,7 @@ #include "core/fpdfdoc/cpvt_secprops.h" #include "core/fpdfdoc/cpvt_wordplace.h" #include "core/fpdfdoc/cpvt_wordprops.h" -#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/fx_coordinates.h" struct CPVT_Section { CPVT_WordPlace secplace; diff --git a/core/fpdfdoc/cpvt_word.h b/core/fpdfdoc/cpvt_word.h index 1e3b5aa0bd..92a4ce1e94 100644 --- a/core/fpdfdoc/cpvt_word.h +++ b/core/fpdfdoc/cpvt_word.h @@ -9,7 +9,7 @@ #include "core/fpdfdoc/cpvt_wordplace.h" #include "core/fpdfdoc/cpvt_wordprops.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" struct CPVT_Word { CPVT_Word(); diff --git a/core/fpdfdoc/cpvt_wordinfo.h b/core/fpdfdoc/cpvt_wordinfo.h index 3bb452a005..861534b0a5 100644 --- a/core/fpdfdoc/cpvt_wordinfo.h +++ b/core/fpdfdoc/cpvt_wordinfo.h @@ -10,7 +10,7 @@ #include #include "core/fpdfdoc/cpvt_wordprops.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" struct CPVT_WordInfo { CPVT_WordInfo(); diff --git a/core/fpdfdoc/cpvt_wordplace.h b/core/fpdfdoc/cpvt_wordplace.h index 33ba7c9ce1..00b5215d57 100644 --- a/core/fpdfdoc/cpvt_wordplace.h +++ b/core/fpdfdoc/cpvt_wordplace.h @@ -7,7 +7,7 @@ #ifndef CORE_FPDFDOC_CPVT_WORDPLACE_H_ #define CORE_FPDFDOC_CPVT_WORDPLACE_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" struct CPVT_WordPlace { CPVT_WordPlace() : nSecIndex(-1), nLineIndex(-1), nWordIndex(-1) {} diff --git a/core/fpdfdoc/cpvt_wordprops.h b/core/fpdfdoc/cpvt_wordprops.h index 25d8d76f00..ca95755dbd 100644 --- a/core/fpdfdoc/cpvt_wordprops.h +++ b/core/fpdfdoc/cpvt_wordprops.h @@ -8,7 +8,7 @@ #define CORE_FPDFDOC_CPVT_WORDPROPS_H_ #include "core/fpdfdoc/cpdf_variabletext.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_dib.h" struct CPVT_WordProps { diff --git a/core/fpdfdoc/cpvt_wordrange.h b/core/fpdfdoc/cpvt_wordrange.h index 3cd0ecfb99..a92613c6a7 100644 --- a/core/fpdfdoc/cpvt_wordrange.h +++ b/core/fpdfdoc/cpvt_wordrange.h @@ -8,7 +8,7 @@ #define CORE_FPDFDOC_CPVT_WORDRANGE_H_ #include "core/fpdfdoc/cpvt_wordplace.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" struct CPVT_WordRange { CPVT_WordRange() {} diff --git a/core/fpdfdoc/csection.h b/core/fpdfdoc/csection.h index 8629be71a7..706f5b67bb 100644 --- a/core/fpdfdoc/csection.h +++ b/core/fpdfdoc/csection.h @@ -10,8 +10,8 @@ #include "core/fpdfdoc/clines.h" #include "core/fpdfdoc/cpvt_sectioninfo.h" #include "core/fpdfdoc/ctypeset.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" class CPDF_VariableText; diff --git a/core/fpdfdoc/ctypeset.h b/core/fpdfdoc/ctypeset.h index 1ead422f6b..3f6551d18c 100644 --- a/core/fpdfdoc/ctypeset.h +++ b/core/fpdfdoc/ctypeset.h @@ -8,7 +8,7 @@ #define CORE_FPDFDOC_CTYPESET_H_ #include "core/fpdfdoc/cpvt_floatrect.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CPDF_VariableText; class CSection; diff --git a/core/fpdfdoc/ipdf_formnotify.h b/core/fpdfdoc/ipdf_formnotify.h index 4937bb1f0e..bf6127dce2 100644 --- a/core/fpdfdoc/ipdf_formnotify.h +++ b/core/fpdfdoc/ipdf_formnotify.h @@ -7,7 +7,7 @@ #ifndef CORE_FPDFDOC_IPDF_FORMNOTIFY_H_ #define CORE_FPDFDOC_IPDF_FORMNOTIFY_H_ -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" class CPDF_FormField; class CPDF_InterForm; diff --git a/core/fpdfdoc/ipvt_fontmap.h b/core/fpdfdoc/ipvt_fontmap.h index 072783b70c..740cb19eb8 100644 --- a/core/fpdfdoc/ipvt_fontmap.h +++ b/core/fpdfdoc/ipvt_fontmap.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" class CPDF_Font; diff --git a/core/fpdfdoc/tagged_int.h b/core/fpdfdoc/tagged_int.h index 871a01eeb7..14dfaf58b4 100644 --- a/core/fpdfdoc/tagged_int.h +++ b/core/fpdfdoc/tagged_int.h @@ -12,7 +12,7 @@ #include #include "core/fpdfdoc/fpdf_tagged.h" -#include "core/fxcrt/include/cfx_retain_ptr.h" +#include "core/fxcrt/cfx_retain_ptr.h" #include "third_party/base/stl_util.h" class CPDF_StructElementImpl; diff --git a/core/fpdftext/cpdf_linkextract.cpp b/core/fpdftext/cpdf_linkextract.cpp index 021cc5e009..8546a8294c 100644 --- a/core/fpdftext/cpdf_linkextract.cpp +++ b/core/fpdftext/cpdf_linkextract.cpp @@ -9,9 +9,9 @@ #include #include "core/fpdftext/cpdf_textpage.h" -#include "core/fxcrt/include/fx_ext.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" CPDF_LinkExtract::CPDF_LinkExtract(const CPDF_TextPage* pTextPage) : m_pTextPage(pTextPage) {} diff --git a/core/fpdftext/cpdf_linkextract.h b/core/fpdftext/cpdf_linkextract.h index 159b330f94..43306cf87a 100644 --- a/core/fpdftext/cpdf_linkextract.h +++ b/core/fpdftext/cpdf_linkextract.h @@ -9,10 +9,10 @@ #include -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" class CPDF_TextPage; diff --git a/core/fpdftext/cpdf_textpage.cpp b/core/fpdftext/cpdf_textpage.cpp index 4fdbc3129d..8ee5719dbf 100644 --- a/core/fpdftext/cpdf_textpage.cpp +++ b/core/fpdftext/cpdf_textpage.cpp @@ -20,8 +20,8 @@ #include "core/fpdfapi/fpdf_parser/cpdf_string.h" #include "core/fpdftext/unicodenormalizationdata.h" #include "core/fxcrt/fx_bidi.h" -#include "core/fxcrt/include/fx_ext.h" -#include "core/fxcrt/include/fx_ucd.h" +#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_ucd.h" #include "third_party/base/stl_util.h" namespace { diff --git a/core/fpdftext/cpdf_textpage.h b/core/fpdftext/cpdf_textpage.h index 46fcafa6c0..bbb92fddf9 100644 --- a/core/fpdftext/cpdf_textpage.h +++ b/core/fpdftext/cpdf_textpage.h @@ -11,9 +11,9 @@ #include #include "core/fpdfapi/fpdf_page/cpdf_pageobjectlist.h" -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_string.h" class CPDF_Font; class CPDF_FormObject; diff --git a/core/fpdftext/cpdf_textpagefind.cpp b/core/fpdftext/cpdf_textpagefind.cpp index 03dd21b475..9ccfcea86f 100644 --- a/core/fpdftext/cpdf_textpagefind.cpp +++ b/core/fpdftext/cpdf_textpagefind.cpp @@ -11,8 +11,8 @@ #include #include "core/fpdftext/cpdf_textpage.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "third_party/base/stl_util.h" namespace { diff --git a/core/fpdftext/cpdf_textpagefind.h b/core/fpdftext/cpdf_textpagefind.h index 2cc4c1e48c..f84ae37c73 100644 --- a/core/fpdftext/cpdf_textpagefind.h +++ b/core/fpdftext/cpdf_textpagefind.h @@ -9,9 +9,9 @@ #include -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" class CPDF_TextPage; diff --git a/core/fpdftext/unicodenormalizationdata.cpp b/core/fpdftext/unicodenormalizationdata.cpp index e124bf4540..7cbc2f73ef 100644 --- a/core/fpdftext/unicodenormalizationdata.cpp +++ b/core/fpdftext/unicodenormalizationdata.cpp @@ -5,7 +5,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "core/fpdftext/unicodenormalizationdata.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" const uint16_t g_UnicodeData_Normalization[65536] = { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, diff --git a/core/fxcodec/codec/ccodec_basicmodule.h b/core/fxcodec/codec/ccodec_basicmodule.h index 641cd00cf4..1c3f4d1cfb 100644 --- a/core/fxcodec/codec/ccodec_basicmodule.h +++ b/core/fxcodec/codec/ccodec_basicmodule.h @@ -7,7 +7,7 @@ #ifndef CORE_FXCODEC_CODEC_CCODEC_BASICMODULE_H_ #define CORE_FXCODEC_CODEC_CCODEC_BASICMODULE_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CCodec_ScanlineDecoder; diff --git a/core/fxcodec/codec/ccodec_bmpmodule.h b/core/fxcodec/codec/ccodec_bmpmodule.h index b465edd874..f5e5417924 100644 --- a/core/fxcodec/codec/ccodec_bmpmodule.h +++ b/core/fxcodec/codec/ccodec_bmpmodule.h @@ -7,7 +7,7 @@ #ifndef CORE_FXCODEC_CODEC_CCODEC_BMPMODULE_H_ #define CORE_FXCODEC_CODEC_CCODEC_BMPMODULE_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" struct FXBMP_Context; class CFX_DIBAttribute; diff --git a/core/fxcodec/codec/ccodec_faxmodule.h b/core/fxcodec/codec/ccodec_faxmodule.h index 27d4b9abdd..18b9bb6b8c 100644 --- a/core/fxcodec/codec/ccodec_faxmodule.h +++ b/core/fxcodec/codec/ccodec_faxmodule.h @@ -7,7 +7,7 @@ #ifndef CORE_FXCODEC_CODEC_CCODEC_FAXMODULE_H_ #define CORE_FXCODEC_CODEC_CCODEC_FAXMODULE_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CCodec_ScanlineDecoder; diff --git a/core/fxcodec/codec/ccodec_flatemodule.h b/core/fxcodec/codec/ccodec_flatemodule.h index 01797e7e68..0b91f0a8c3 100644 --- a/core/fxcodec/codec/ccodec_flatemodule.h +++ b/core/fxcodec/codec/ccodec_flatemodule.h @@ -7,7 +7,7 @@ #ifndef CORE_FXCODEC_CODEC_CCODEC_FLATEMODULE_H_ #define CORE_FXCODEC_CODEC_CCODEC_FLATEMODULE_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CCodec_ScanlineDecoder; diff --git a/core/fxcodec/codec/ccodec_gifmodule.h b/core/fxcodec/codec/ccodec_gifmodule.h index 4878074407..0281e69c33 100644 --- a/core/fxcodec/codec/ccodec_gifmodule.h +++ b/core/fxcodec/codec/ccodec_gifmodule.h @@ -7,7 +7,7 @@ #ifndef CORE_FXCODEC_CODEC_CCODEC_GIFMODULE_H_ #define CORE_FXCODEC_CODEC_CCODEC_GIFMODULE_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" struct FXGIF_Context; diff --git a/core/fxcodec/codec/ccodec_iccmodule.h b/core/fxcodec/codec/ccodec_iccmodule.h index f97065b971..1f856faa04 100644 --- a/core/fxcodec/codec/ccodec_iccmodule.h +++ b/core/fxcodec/codec/ccodec_iccmodule.h @@ -8,8 +8,8 @@ #define CORE_FXCODEC_CODEC_CCODEC_ICCMODULE_H_ #include "core/fxcodec/fx_codec_def.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" class CCodec_IccModule { public: diff --git a/core/fxcodec/codec/ccodec_jbig2module.h b/core/fxcodec/codec/ccodec_jbig2module.h index d2b97b82a0..c74ed5fb02 100644 --- a/core/fxcodec/codec/ccodec_jbig2module.h +++ b/core/fxcodec/codec/ccodec_jbig2module.h @@ -10,7 +10,7 @@ #include #include "core/fxcodec/fx_codec_def.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" class CJBig2_Context; class CJBig2_Image; diff --git a/core/fxcodec/codec/ccodec_jpegmodule.h b/core/fxcodec/codec/ccodec_jpegmodule.h index 52fc4d8e81..74071347cb 100644 --- a/core/fxcodec/codec/ccodec_jpegmodule.h +++ b/core/fxcodec/codec/ccodec_jpegmodule.h @@ -7,7 +7,7 @@ #ifndef CORE_FXCODEC_CODEC_CCODEC_JPEGMODULE_H_ #define CORE_FXCODEC_CODEC_CCODEC_JPEGMODULE_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CCodec_ScanlineDecoder; class CFX_DIBSource; diff --git a/core/fxcodec/codec/ccodec_jpxmodule.h b/core/fxcodec/codec/ccodec_jpxmodule.h index 149e8a7c9a..fd919d91b0 100644 --- a/core/fxcodec/codec/ccodec_jpxmodule.h +++ b/core/fxcodec/codec/ccodec_jpxmodule.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CJPX_Decoder; class CPDF_ColorSpace; diff --git a/core/fxcodec/codec/ccodec_pngmodule.h b/core/fxcodec/codec/ccodec_pngmodule.h index 23b5d4b5b9..747d346afc 100644 --- a/core/fxcodec/codec/ccodec_pngmodule.h +++ b/core/fxcodec/codec/ccodec_pngmodule.h @@ -7,7 +7,7 @@ #ifndef CORE_FXCODEC_CODEC_CCODEC_PNGMODULE_H_ #define CORE_FXCODEC_CODEC_CCODEC_PNGMODULE_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CFX_DIBAttribute; struct FXPNG_Context; diff --git a/core/fxcodec/codec/ccodec_progressivedecoder.h b/core/fxcodec/codec/ccodec_progressivedecoder.h index 8540493648..e51d0739d2 100644 --- a/core/fxcodec/codec/ccodec_progressivedecoder.h +++ b/core/fxcodec/codec/ccodec_progressivedecoder.h @@ -10,7 +10,7 @@ #include #include "core/fxcodec/fx_codec_def.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_dib.h" class CCodec_BmpModule; diff --git a/core/fxcodec/codec/ccodec_scanlinedecoder.h b/core/fxcodec/codec/ccodec_scanlinedecoder.h index 23ecb9582a..14eb6b628a 100644 --- a/core/fxcodec/codec/ccodec_scanlinedecoder.h +++ b/core/fxcodec/codec/ccodec_scanlinedecoder.h @@ -7,7 +7,7 @@ #ifndef CORE_FXCODEC_CODEC_CCODEC_SCANLINEDECODER_H_ #define CORE_FXCODEC_CODEC_CCODEC_SCANLINEDECODER_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class IFX_Pause; diff --git a/core/fxcodec/codec/ccodec_tiffmodule.h b/core/fxcodec/codec/ccodec_tiffmodule.h index 7b89584a3f..c6525f32e2 100644 --- a/core/fxcodec/codec/ccodec_tiffmodule.h +++ b/core/fxcodec/codec/ccodec_tiffmodule.h @@ -7,7 +7,7 @@ #ifndef CORE_FXCODEC_CODEC_CCODEC_TIFFMODULE_H_ #define CORE_FXCODEC_CODEC_CCODEC_TIFFMODULE_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CCodec_TiffContext; class CFX_DIBAttribute; diff --git a/core/fxcodec/codec/fx_codec.cpp b/core/fxcodec/codec/fx_codec.cpp index 60a64a1ab6..dfac86fbf9 100644 --- a/core/fxcodec/codec/fx_codec.cpp +++ b/core/fxcodec/codec/fx_codec.cpp @@ -11,8 +11,8 @@ #include #include "core/fxcodec/codec/codec_int.h" -#include "core/fxcrt/include/fx_ext.h" -#include "core/fxcrt/include/fx_safe_types.h" +#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_safe_types.h" #include "third_party/base/logging.h" CCodec_ModuleMgr::CCodec_ModuleMgr() diff --git a/core/fxcodec/codec/fx_codec_flate.cpp b/core/fxcodec/codec/fx_codec_flate.cpp index c34aabbcab..9b9ad041df 100644 --- a/core/fxcodec/codec/fx_codec_flate.cpp +++ b/core/fxcodec/codec/fx_codec_flate.cpp @@ -10,7 +10,7 @@ #include #include "core/fxcodec/fx_codec.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "third_party/zlib_v128/zlib.h" extern "C" { diff --git a/core/fxcodec/codec/fx_codec_jbig.cpp b/core/fxcodec/codec/fx_codec_jbig.cpp index 93e5494ea0..7b8d99ae89 100644 --- a/core/fxcodec/codec/fx_codec_jbig.cpp +++ b/core/fxcodec/codec/fx_codec_jbig.cpp @@ -12,7 +12,7 @@ #include "core/fxcodec/JBig2_DocumentContext.h" #include "core/fxcodec/jbig2/JBig2_Context.h" #include "core/fxcodec/jbig2/JBig2_Image.h" -#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/fx_memory.h" JBig2_DocumentContext::JBig2_DocumentContext() {} diff --git a/core/fxcodec/codec/fx_codec_jpeg.cpp b/core/fxcodec/codec/fx_codec_jpeg.cpp index 29c6f8c423..16e43f570c 100644 --- a/core/fxcodec/codec/fx_codec_jpeg.cpp +++ b/core/fxcodec/codec/fx_codec_jpeg.cpp @@ -8,7 +8,7 @@ #include "core/fxcodec/codec/codec_int.h" #include "core/fxcodec/fx_codec.h" -#include "core/fxcrt/include/fx_safe_types.h" +#include "core/fxcrt/fx_safe_types.h" #include "core/fxge/include/fx_dib.h" extern "C" { diff --git a/core/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/fxcodec/codec/fx_codec_jpx_opj.cpp index 219b1a0a12..df836c2deb 100644 --- a/core/fxcodec/codec/fx_codec_jpx_opj.cpp +++ b/core/fxcodec/codec/fx_codec_jpx_opj.cpp @@ -11,7 +11,7 @@ #include "core/fpdfapi/fpdf_page/cpdf_colorspace.h" #include "core/fxcodec/codec/codec_int.h" #include "core/fxcodec/fx_codec.h" -#include "core/fxcrt/include/fx_safe_types.h" +#include "core/fxcrt/fx_safe_types.h" #include "third_party/lcms2-2.6/include/lcms2.h" #include "third_party/libopenjpeg20/openjpeg.h" diff --git a/core/fxcodec/fx_codec.h b/core/fxcodec/fx_codec.h index 5e00faf328..0fb39413e1 100644 --- a/core/fxcodec/fx_codec.h +++ b/core/fxcodec/fx_codec.h @@ -20,8 +20,8 @@ #include "core/fxcodec/codec/ccodec_jpxmodule.h" #include "core/fxcodec/codec/ccodec_scanlinedecoder.h" #include "core/fxcodec/fx_codec_def.h" -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_coordinates.h" class CFX_DIBSource; class CJPX_Decoder; diff --git a/core/fxcodec/jbig2/JBig2_ArithDecoder.cpp b/core/fxcodec/jbig2/JBig2_ArithDecoder.cpp index f6981a10af..0d45f57bdf 100644 --- a/core/fxcodec/jbig2/JBig2_ArithDecoder.cpp +++ b/core/fxcodec/jbig2/JBig2_ArithDecoder.cpp @@ -7,7 +7,7 @@ #include "core/fxcodec/jbig2/JBig2_ArithDecoder.h" #include "core/fxcodec/jbig2/JBig2_BitStream.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" namespace { diff --git a/core/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp b/core/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp index 140ca38f99..228e16ec09 100644 --- a/core/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp +++ b/core/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp @@ -8,7 +8,7 @@ #include -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" namespace { diff --git a/core/fxcodec/jbig2/JBig2_ArithIntDecoder.h b/core/fxcodec/jbig2/JBig2_ArithIntDecoder.h index f1eb68d5df..fd9fa89f19 100644 --- a/core/fxcodec/jbig2/JBig2_ArithIntDecoder.h +++ b/core/fxcodec/jbig2/JBig2_ArithIntDecoder.h @@ -10,7 +10,7 @@ #include #include "core/fxcodec/jbig2/JBig2_ArithDecoder.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CJBig2_ArithIntDecoder { public: diff --git a/core/fxcodec/jbig2/JBig2_BitStream.h b/core/fxcodec/jbig2/JBig2_BitStream.h index 191438fee7..24e8faaf5b 100644 --- a/core/fxcodec/jbig2/JBig2_BitStream.h +++ b/core/fxcodec/jbig2/JBig2_BitStream.h @@ -7,7 +7,7 @@ #ifndef CORE_FXCODEC_JBIG2_JBIG2_BITSTREAM_H_ #define CORE_FXCODEC_JBIG2_JBIG2_BITSTREAM_H_ -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" class CPDF_StreamAcc; diff --git a/core/fxcodec/jbig2/JBig2_Define.h b/core/fxcodec/jbig2/JBig2_Define.h index d12302b360..86df248786 100644 --- a/core/fxcodec/jbig2/JBig2_Define.h +++ b/core/fxcodec/jbig2/JBig2_Define.h @@ -7,7 +7,7 @@ #ifndef CORE_FXCODEC_JBIG2_JBIG2_DEFINE_H_ #define CORE_FXCODEC_JBIG2_JBIG2_DEFINE_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #define JBIG2_memset FXSYS_memset #define JBIG2_memcmp FXSYS_memcmp diff --git a/core/fxcodec/jbig2/JBig2_GrdProc.h b/core/fxcodec/jbig2/JBig2_GrdProc.h index ea9748ce80..f087afffef 100644 --- a/core/fxcodec/jbig2/JBig2_GrdProc.h +++ b/core/fxcodec/jbig2/JBig2_GrdProc.h @@ -8,8 +8,8 @@ #define CORE_FXCODEC_JBIG2_JBIG2_GRDPROC_H_ #include "core/fxcodec/fx_codec_def.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" class CJBig2_ArithDecoder; class CJBig2_BitStream; diff --git a/core/fxcodec/jbig2/JBig2_GrrdProc.h b/core/fxcodec/jbig2/JBig2_GrrdProc.h index 17adf1900e..7329b9f988 100644 --- a/core/fxcodec/jbig2/JBig2_GrrdProc.h +++ b/core/fxcodec/jbig2/JBig2_GrrdProc.h @@ -7,7 +7,7 @@ #ifndef CORE_FXCODEC_JBIG2_JBIG2_GRRDPROC_H_ #define CORE_FXCODEC_JBIG2_JBIG2_GRRDPROC_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CJBig2_ArithDecoder; class CJBig2_Image; diff --git a/core/fxcodec/jbig2/JBig2_GsidProc.cpp b/core/fxcodec/jbig2/JBig2_GsidProc.cpp index ee6cd368d5..c5a56b122b 100644 --- a/core/fxcodec/jbig2/JBig2_GsidProc.cpp +++ b/core/fxcodec/jbig2/JBig2_GsidProc.cpp @@ -12,7 +12,7 @@ #include "core/fxcodec/jbig2/JBig2_GrdProc.h" #include "core/fxcodec/jbig2/JBig2_Image.h" #include "core/fxcodec/jbig2/JBig2_List.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" uint32_t* CJBig2_GSIDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, diff --git a/core/fxcodec/jbig2/JBig2_GsidProc.h b/core/fxcodec/jbig2/JBig2_GsidProc.h index b3bd022f03..c440ddb2b9 100644 --- a/core/fxcodec/jbig2/JBig2_GsidProc.h +++ b/core/fxcodec/jbig2/JBig2_GsidProc.h @@ -7,7 +7,7 @@ #ifndef CORE_FXCODEC_JBIG2_JBIG2_GSIDPROC_H_ #define CORE_FXCODEC_JBIG2_JBIG2_GSIDPROC_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CJBig2_ArithDecoder; class CJBig2_BitStream; diff --git a/core/fxcodec/jbig2/JBig2_HtrdProc.cpp b/core/fxcodec/jbig2/JBig2_HtrdProc.cpp index aaa617cd73..f3391b32ff 100644 --- a/core/fxcodec/jbig2/JBig2_HtrdProc.cpp +++ b/core/fxcodec/jbig2/JBig2_HtrdProc.cpp @@ -9,7 +9,7 @@ #include #include "core/fxcodec/jbig2/JBig2_GsidProc.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" CJBig2_Image* CJBig2_HTRDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, diff --git a/core/fxcodec/jbig2/JBig2_HtrdProc.h b/core/fxcodec/jbig2/JBig2_HtrdProc.h index b4f55c6124..0ff79dcf29 100644 --- a/core/fxcodec/jbig2/JBig2_HtrdProc.h +++ b/core/fxcodec/jbig2/JBig2_HtrdProc.h @@ -8,7 +8,7 @@ #define CORE_FXCODEC_JBIG2_JBIG2_HTRDPROC_H_ #include "core/fxcodec/jbig2/JBig2_Image.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CJBig2_ArithDecoder; class CJBig2_BitStream; diff --git a/core/fxcodec/jbig2/JBig2_HuffmanTable.cpp b/core/fxcodec/jbig2/JBig2_HuffmanTable.cpp index 038921e740..3b34018c2d 100644 --- a/core/fxcodec/jbig2/JBig2_HuffmanTable.cpp +++ b/core/fxcodec/jbig2/JBig2_HuffmanTable.cpp @@ -12,7 +12,7 @@ #include "core/fxcodec/jbig2/JBig2_BitStream.h" #include "core/fxcodec/jbig2/JBig2_Define.h" #include "core/fxcodec/jbig2/JBig2_HuffmanTable_Standard.h" -#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/fx_memory.h" CJBig2_HuffmanTable::CJBig2_HuffmanTable(const JBig2TableLine* pTable, uint32_t nLines, diff --git a/core/fxcodec/jbig2/JBig2_HuffmanTable.h b/core/fxcodec/jbig2/JBig2_HuffmanTable.h index 9b29847e4d..58a3124881 100644 --- a/core/fxcodec/jbig2/JBig2_HuffmanTable.h +++ b/core/fxcodec/jbig2/JBig2_HuffmanTable.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CJBig2_BitStream; struct JBig2TableLine; diff --git a/core/fxcodec/jbig2/JBig2_HuffmanTable_Standard.cpp b/core/fxcodec/jbig2/JBig2_HuffmanTable_Standard.cpp index 97d325ba31..4c2ba997d5 100644 --- a/core/fxcodec/jbig2/JBig2_HuffmanTable_Standard.cpp +++ b/core/fxcodec/jbig2/JBig2_HuffmanTable_Standard.cpp @@ -5,7 +5,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "core/fxcodec/jbig2/JBig2_HuffmanTable_Standard.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" const bool HuffmanTable_HTOOB_B1 = false; const JBig2TableLine HuffmanTable_B1[] = {{1, 4, 0}, diff --git a/core/fxcodec/jbig2/JBig2_HuffmanTable_Standard.h b/core/fxcodec/jbig2/JBig2_HuffmanTable_Standard.h index 4fb2d1e07e..c064f57d0c 100644 --- a/core/fxcodec/jbig2/JBig2_HuffmanTable_Standard.h +++ b/core/fxcodec/jbig2/JBig2_HuffmanTable_Standard.h @@ -7,7 +7,7 @@ #ifndef CORE_FXCODEC_JBIG2_JBIG2_HUFFMANTABLE_STANDARD_H_ #define CORE_FXCODEC_JBIG2_JBIG2_HUFFMANTABLE_STANDARD_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" struct JBig2TableLine { uint8_t PREFLEN; diff --git a/core/fxcodec/jbig2/JBig2_Image.cpp b/core/fxcodec/jbig2/JBig2_Image.cpp index 2071221cd1..7ac7e6147c 100644 --- a/core/fxcodec/jbig2/JBig2_Image.cpp +++ b/core/fxcodec/jbig2/JBig2_Image.cpp @@ -7,8 +7,8 @@ #include #include "core/fxcodec/jbig2/JBig2_Image.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_safe_types.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_safe_types.h" namespace { diff --git a/core/fxcodec/jbig2/JBig2_Page.h b/core/fxcodec/jbig2/JBig2_Page.h index e9ffa76791..131d6c8ba7 100644 --- a/core/fxcodec/jbig2/JBig2_Page.h +++ b/core/fxcodec/jbig2/JBig2_Page.h @@ -7,7 +7,7 @@ #ifndef CORE_FXCODEC_JBIG2_JBIG2_PAGE_H_ #define CORE_FXCODEC_JBIG2_JBIG2_PAGE_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" struct JBig2PageInfo { uint32_t m_dwWidth; diff --git a/core/fxcodec/jbig2/JBig2_PatternDict.cpp b/core/fxcodec/jbig2/JBig2_PatternDict.cpp index 9598dc4bae..cd6a2ad3c2 100644 --- a/core/fxcodec/jbig2/JBig2_PatternDict.cpp +++ b/core/fxcodec/jbig2/JBig2_PatternDict.cpp @@ -6,7 +6,7 @@ #include "core/fxcodec/jbig2/JBig2_PatternDict.h" -#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/fx_memory.h" CJBig2_PatternDict::CJBig2_PatternDict() { NUMPATS = 0; diff --git a/core/fxcodec/jbig2/JBig2_PddProc.h b/core/fxcodec/jbig2/JBig2_PddProc.h index 6bdd186ffc..93b2d350c1 100644 --- a/core/fxcodec/jbig2/JBig2_PddProc.h +++ b/core/fxcodec/jbig2/JBig2_PddProc.h @@ -7,7 +7,7 @@ #ifndef CORE_FXCODEC_JBIG2_JBIG2_PDDPROC_H_ #define CORE_FXCODEC_JBIG2_JBIG2_PDDPROC_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CJBig2_ArithDecoder; class CJBig2_BitStream; diff --git a/core/fxcodec/jbig2/JBig2_SddProc.cpp b/core/fxcodec/jbig2/JBig2_SddProc.cpp index c6adfce784..1a7e96d26b 100644 --- a/core/fxcodec/jbig2/JBig2_SddProc.cpp +++ b/core/fxcodec/jbig2/JBig2_SddProc.cpp @@ -17,7 +17,7 @@ #include "core/fxcodec/jbig2/JBig2_HuffmanTable_Standard.h" #include "core/fxcodec/jbig2/JBig2_SymbolDict.h" #include "core/fxcodec/jbig2/JBig2_TrdProc.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" CJBig2_SymbolDict* CJBig2_SDDProc::decode_Arith( CJBig2_ArithDecoder* pArithDecoder, diff --git a/core/fxcodec/jbig2/JBig2_SddProc.h b/core/fxcodec/jbig2/JBig2_SddProc.h index 4febc8d553..747e9f05c7 100644 --- a/core/fxcodec/jbig2/JBig2_SddProc.h +++ b/core/fxcodec/jbig2/JBig2_SddProc.h @@ -10,7 +10,7 @@ #include #include "core/fxcodec/jbig2/JBig2_ArithDecoder.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CJBig2_BitStream; class CJBig2_HuffmanTable; diff --git a/core/fxcodec/jbig2/JBig2_Segment.cpp b/core/fxcodec/jbig2/JBig2_Segment.cpp index 0f53abcee3..610246b6e2 100644 --- a/core/fxcodec/jbig2/JBig2_Segment.cpp +++ b/core/fxcodec/jbig2/JBig2_Segment.cpp @@ -6,7 +6,7 @@ #include "core/fxcodec/jbig2/JBig2_Segment.h" -#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/fx_memory.h" CJBig2_Segment::CJBig2_Segment() { m_dwNumber = 0; diff --git a/core/fxcodec/jbig2/JBig2_SymbolDict.cpp b/core/fxcodec/jbig2/JBig2_SymbolDict.cpp index c1f8e5a9cd..d4dfa35fe9 100644 --- a/core/fxcodec/jbig2/JBig2_SymbolDict.cpp +++ b/core/fxcodec/jbig2/JBig2_SymbolDict.cpp @@ -7,7 +7,7 @@ #include "core/fxcodec/jbig2/JBig2_SymbolDict.h" #include "core/fxcodec/jbig2/JBig2_Image.h" -#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/fx_memory.h" CJBig2_SymbolDict::CJBig2_SymbolDict() {} diff --git a/core/fxcodec/jbig2/JBig2_SymbolDict.h b/core/fxcodec/jbig2/JBig2_SymbolDict.h index b880d6bff3..4520f76680 100644 --- a/core/fxcodec/jbig2/JBig2_SymbolDict.h +++ b/core/fxcodec/jbig2/JBig2_SymbolDict.h @@ -12,7 +12,7 @@ #include "core/fxcodec/jbig2/JBig2_ArithDecoder.h" #include "core/fxcodec/jbig2/JBig2_List.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" class CJBig2_Image; diff --git a/core/fxcodec/jbig2/JBig2_TrdProc.h b/core/fxcodec/jbig2/JBig2_TrdProc.h index 83e43ec05f..2779676314 100644 --- a/core/fxcodec/jbig2/JBig2_TrdProc.h +++ b/core/fxcodec/jbig2/JBig2_TrdProc.h @@ -8,7 +8,7 @@ #define CORE_FXCODEC_JBIG2_JBIG2_TRDPROC_H_ #include "core/fxcodec/jbig2/JBig2_Image.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CJBig2_ArithDecoder; class CJBig2_ArithIaidDecoder; diff --git a/core/fxcodec/lbmp/fx_bmp.h b/core/fxcodec/lbmp/fx_bmp.h index 5c4837807f..dfaf2859ef 100644 --- a/core/fxcodec/lbmp/fx_bmp.h +++ b/core/fxcodec/lbmp/fx_bmp.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #define BMP_WIDTHBYTES(width, bitCount) ((width * bitCount) + 31) / 32 * 4 #define BMP_PAL_ENCODE(a, r, g, b) \ diff --git a/core/fxcodec/lgif/fx_gif.h b/core/fxcodec/lgif/fx_gif.h index c669e9851e..2a40995bbe 100644 --- a/core/fxcodec/lgif/fx_gif.h +++ b/core/fxcodec/lgif/fx_gif.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #define GIF_SIGNATURE "GIF" #define GIF_SIG_EXTENSION 0x21 diff --git a/core/fxcrt/cfx_count_ref.h b/core/fxcrt/cfx_count_ref.h new file mode 100644 index 0000000000..3b9ccff8fe --- /dev/null +++ b/core/fxcrt/cfx_count_ref.h @@ -0,0 +1,81 @@ +// Copyright 2016 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FXCRT_CFX_COUNT_REF_H_ +#define CORE_FXCRT_CFX_COUNT_REF_H_ + +#include "core/fxcrt/cfx_retain_ptr.h" +#include "core/fxcrt/fx_system.h" + +// A shared object with Copy on Write semantics that makes it appear as +// if each one were independent. +template +class CFX_CountRef { + public: + CFX_CountRef() {} + CFX_CountRef(const CFX_CountRef& other) : m_pObject(other.m_pObject) {} + ~CFX_CountRef() {} + + template + ObjClass* Emplace(Args... params) { + m_pObject.Reset(new CountedObj(params...)); + return m_pObject.Get(); + } + + CFX_CountRef& operator=(const CFX_CountRef& that) { + if (*this != that) + m_pObject = that.m_pObject; + return *this; + } + + void SetNull() { m_pObject.Reset(); } + const ObjClass* GetObject() const { return m_pObject.Get(); } + + template + ObjClass* GetPrivateCopy(Args... params) { + if (!m_pObject) + return Emplace(params...); + if (!m_pObject->HasOneRef()) + m_pObject.Reset(new CountedObj(*m_pObject)); + return m_pObject.Get(); + } + + bool operator==(const CFX_CountRef& that) const { + return m_pObject == that.m_pObject; + } + bool operator!=(const CFX_CountRef& that) const { return !(*this == that); } + explicit operator bool() const { return !!m_pObject; } + + private: + class CountedObj : public ObjClass { + public: + template + CountedObj(Args... params) : ObjClass(params...), m_RefCount(0) {} + + CountedObj(const CountedObj& src) : ObjClass(src), m_RefCount(0) {} + ~CountedObj() { m_RefCount = 0; } + + bool HasOneRef() const { return m_RefCount == 1; } + void Retain() { m_RefCount++; } + void Release() { + ASSERT(m_RefCount); + if (--m_RefCount == 0) + delete this; + } + + private: + // To ensure ref counts do not overflow, consider the worst possible case: + // the entire address space contains nothing but pointers to this object. + // Since the count increments with each new pointer, the largest value is + // the number of pointers that can fit into the address space. The size of + // the address space itself is a good upper bound on it. + intptr_t m_RefCount; + }; + + CFX_RetainPtr m_pObject; +}; + +#endif // CORE_FXCRT_CFX_COUNT_REF_H_ diff --git a/core/fxcrt/cfx_count_ref_unittest.cpp b/core/fxcrt/cfx_count_ref_unittest.cpp index 6cb9f4a2fe..6ab56327d3 100644 --- a/core/fxcrt/cfx_count_ref_unittest.cpp +++ b/core/fxcrt/cfx_count_ref_unittest.cpp @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "core/fxcrt/include/cfx_count_ref.h" +#include "core/fxcrt/cfx_count_ref.h" #include #include diff --git a/core/fxcrt/cfx_observable.h b/core/fxcrt/cfx_observable.h new file mode 100644 index 0000000000..dc869b1766 --- /dev/null +++ b/core/fxcrt/cfx_observable.h @@ -0,0 +1,78 @@ +// Copyright 2016 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CORE_FXCRT_CFX_OBSERVABLE_H_ +#define CORE_FXCRT_CFX_OBSERVABLE_H_ + +#include + +#include "core/fxcrt/fx_system.h" +#include "third_party/base/stl_util.h" + +template +class CFX_Observable { + public: + class ObservedPtr { + public: + ObservedPtr() : m_pObservedPtr(nullptr) {} + explicit ObservedPtr(T* pObservedPtr) : m_pObservedPtr(pObservedPtr) { + if (m_pObservedPtr) + m_pObservedPtr->AddObservedPtr(this); + } + ObservedPtr(const ObservedPtr& that) = delete; + ~ObservedPtr() { + if (m_pObservedPtr) + m_pObservedPtr->RemoveObservedPtr(this); + } + void Reset(T* pObservedPtr = nullptr) { + if (m_pObservedPtr) + m_pObservedPtr->RemoveObservedPtr(this); + m_pObservedPtr = pObservedPtr; + if (m_pObservedPtr) + m_pObservedPtr->AddObservedPtr(this); + } + void OnDestroy() { + ASSERT(m_pObservedPtr); + m_pObservedPtr = nullptr; + } + ObservedPtr& operator=(const ObservedPtr& that) = delete; + bool operator==(const ObservedPtr& that) const { + return m_pObservedPtr == that.m_pObservedPtr; + } + bool operator!=(const ObservedPtr& that) const { return !(*this == that); } + explicit operator bool() const { return !!m_pObservedPtr; } + T* Get() const { return m_pObservedPtr; } + T& operator*() const { return *m_pObservedPtr; } + T* operator->() const { return m_pObservedPtr; } + + private: + T* m_pObservedPtr; + }; + + CFX_Observable() {} + CFX_Observable(const CFX_Observable& that) = delete; + ~CFX_Observable() { NotifyObservedPtrs(); } + void AddObservedPtr(ObservedPtr* pObservedPtr) { + ASSERT(!pdfium::ContainsKey(m_ObservedPtrs, pObservedPtr)); + m_ObservedPtrs.insert(pObservedPtr); + } + void RemoveObservedPtr(ObservedPtr* pObservedPtr) { + ASSERT(pdfium::ContainsKey(m_ObservedPtrs, pObservedPtr)); + m_ObservedPtrs.erase(pObservedPtr); + } + void NotifyObservedPtrs() { + for (auto* pObservedPtr : m_ObservedPtrs) + pObservedPtr->OnDestroy(); + m_ObservedPtrs.clear(); + } + CFX_Observable& operator=(const CFX_Observable& that) = delete; + + protected: + size_t ActiveObservedPtrsForTesting() const { return m_ObservedPtrs.size(); } + + private: + std::set m_ObservedPtrs; +}; + +#endif // CORE_FXCRT_CFX_OBSERVABLE_H_ diff --git a/core/fxcrt/cfx_observable_unittest.cpp b/core/fxcrt/cfx_observable_unittest.cpp index eaadd95bb6..15c76495cf 100644 --- a/core/fxcrt/cfx_observable_unittest.cpp +++ b/core/fxcrt/cfx_observable_unittest.cpp @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "core/fxcrt/include/cfx_observable.h" +#include "core/fxcrt/cfx_observable.h" #include diff --git a/core/fxcrt/cfx_retain_ptr.h b/core/fxcrt/cfx_retain_ptr.h new file mode 100644 index 0000000000..883494e7ec --- /dev/null +++ b/core/fxcrt/cfx_retain_ptr.h @@ -0,0 +1,56 @@ +// Copyright 2016 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CORE_FXCRT_CFX_RETAIN_PTR_H_ +#define CORE_FXCRT_CFX_RETAIN_PTR_H_ + +#include + +#include "core/fxcrt/fx_memory.h" + +template +class CFX_RetainPtr { + public: + explicit CFX_RetainPtr(T* pObj) : m_pObj(pObj) { + if (m_pObj) + m_pObj->Retain(); + } + + CFX_RetainPtr() : CFX_RetainPtr(nullptr) {} + CFX_RetainPtr(const CFX_RetainPtr& that) : CFX_RetainPtr(that.Get()) {} + CFX_RetainPtr(CFX_RetainPtr&& that) { Swap(that); } + + template + CFX_RetainPtr(const CFX_RetainPtr& that) : CFX_RetainPtr(that.Get()) {} + + void Reset(T* obj = nullptr) { + if (obj) + obj->Retain(); + m_pObj.reset(obj); + } + + T* Get() const { return m_pObj.get(); } + void Swap(CFX_RetainPtr& that) { m_pObj.swap(that.m_pObj); } + + CFX_RetainPtr& operator=(const CFX_RetainPtr& that) { + if (*this != that) + Reset(that.Get()); + return *this; + } + + bool operator==(const CFX_RetainPtr& that) const { + return Get() == that.Get(); + } + + bool operator!=(const CFX_RetainPtr& that) const { return !(*this == that); } + + explicit operator bool() const { return !!m_pObj; } + T& operator*() const { return *m_pObj.get(); } + T* operator->() const { return m_pObj.get(); } + + private: + std::unique_ptr> m_pObj; +}; + +#endif // CORE_FXCRT_CFX_RETAIN_PTR_H_ diff --git a/core/fxcrt/cfx_retain_ptr_unittest.cpp b/core/fxcrt/cfx_retain_ptr_unittest.cpp index 9da0d5ccf8..aa92e57f32 100644 --- a/core/fxcrt/cfx_retain_ptr_unittest.cpp +++ b/core/fxcrt/cfx_retain_ptr_unittest.cpp @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "core/fxcrt/include/cfx_retain_ptr.h" +#include "core/fxcrt/cfx_retain_ptr.h" #include diff --git a/core/fxcrt/cfx_string_c_template.h b/core/fxcrt/cfx_string_c_template.h index 70b9fcd609..4a3dae7e7e 100644 --- a/core/fxcrt/cfx_string_c_template.h +++ b/core/fxcrt/cfx_string_c_template.h @@ -10,7 +10,7 @@ #include #include -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" // An immutable string with caller-provided storage which must outlive the // string itself. These are not necessarily nul-terminated, so that substring diff --git a/core/fxcrt/cfx_string_data_template.h b/core/fxcrt/cfx_string_data_template.h index 5f7bfa1f83..affd610011 100644 --- a/core/fxcrt/cfx_string_data_template.h +++ b/core/fxcrt/cfx_string_data_template.h @@ -7,8 +7,8 @@ #ifndef CORE_FXCRT_CFX_STRING_DATA_TEMPLATE_H_ #define CORE_FXCRT_CFX_STRING_DATA_TEMPLATE_H_ -#include "core/fxcrt/include/fx_memory.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_memory.h" +#include "core/fxcrt/fx_system.h" #include "third_party/base/numerics/safe_math.h" template diff --git a/core/fxcrt/cfx_string_pool_template.h b/core/fxcrt/cfx_string_pool_template.h new file mode 100644 index 0000000000..bfc1ce4bfb --- /dev/null +++ b/core/fxcrt/cfx_string_pool_template.h @@ -0,0 +1,30 @@ +// Copyright 2016 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FXCRT_CFX_STRING_POOL_TEMPLATE_H_ +#define CORE_FXCRT_CFX_STRING_POOL_TEMPLATE_H_ + +#include + +#include "core/fxcrt/fx_string.h" + +template +class CFX_StringPoolTemplate { + public: + StringType Intern(const StringType& str) { return *m_Pool.insert(str).first; } + void Clear() { m_Pool.clear(); } + + private: + std::unordered_set m_Pool; +}; + +using CFX_ByteStringPool = CFX_StringPoolTemplate; +using CFX_WideStringPool = CFX_StringPoolTemplate; + +extern template class CFX_StringPoolTemplate; +extern template class CFX_StringPoolTemplate; + +#endif // CORE_FXCRT_CFX_STRING_POOL_TEMPLATE_H_ diff --git a/core/fxcrt/cfx_string_pool_template_unittest.cpp b/core/fxcrt/cfx_string_pool_template_unittest.cpp index 95a9007b92..d0f5fbe96d 100644 --- a/core/fxcrt/cfx_string_pool_template_unittest.cpp +++ b/core/fxcrt/cfx_string_pool_template_unittest.cpp @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "core/fxcrt/include/cfx_string_pool_template.h" -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/cfx_string_pool_template.h" +#include "core/fxcrt/fx_string.h" #include "testing/fx_string_testhelpers.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/core/fxcrt/cfx_weak_ptr.h b/core/fxcrt/cfx_weak_ptr.h new file mode 100644 index 0000000000..61f15e3dda --- /dev/null +++ b/core/fxcrt/cfx_weak_ptr.h @@ -0,0 +1,80 @@ +// Copyright 2016 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FXCRT_CFX_WEAK_PTR_H_ +#define CORE_FXCRT_CFX_WEAK_PTR_H_ + +#include + +#include "core/fxcrt/cfx_retain_ptr.h" +#include "core/fxcrt/fx_system.h" + +template > +class CFX_WeakPtr { + public: + CFX_WeakPtr() {} + CFX_WeakPtr(const CFX_WeakPtr& that) : m_pHandle(that.m_pHandle) {} + CFX_WeakPtr(CFX_WeakPtr&& that) { Swap(that); } + CFX_WeakPtr(std::unique_ptr pObj) + : m_pHandle(new Handle(std::move(pObj))) {} + + explicit operator bool() const { return m_pHandle && !!m_pHandle->Get(); } + bool HasOneRef() const { return m_pHandle && m_pHandle->HasOneRef(); } + T* operator->() { return m_pHandle->Get(); } + const T* operator->() const { return m_pHandle->Get(); } + CFX_WeakPtr& operator=(const CFX_WeakPtr& that) { + m_pHandle = that.m_pHandle; + return *this; + } + bool operator==(const CFX_WeakPtr& that) const { + return m_pHandle == that.m_pHandle; + } + bool operator!=(const CFX_WeakPtr& that) const { return !(*this == that); } + + T* Get() const { return m_pHandle ? m_pHandle->Get() : nullptr; } + void Clear() { + if (m_pHandle) { + m_pHandle->Clear(); + m_pHandle.Reset(); + } + } + void Reset() { m_pHandle.Reset(); } + void Reset(std::unique_ptr pObj) { + m_pHandle.Reset(new Handle(std::move(pObj))); + } + void Swap(CFX_WeakPtr& that) { m_pHandle.Swap(that.m_pHandle); } + + private: + class Handle { + public: + explicit Handle(std::unique_ptr ptr) + : m_nCount(0), m_pObj(std::move(ptr)) {} + void Reset(std::unique_ptr ptr) { m_pObj = std::move(ptr); } + void Clear() { // Now you're all weak ptrs ... + m_pObj.reset(); // unique_ptr nulls first before invoking delete. + } + T* Get() const { return m_pObj.get(); } + T* Retain() { + ++m_nCount; + return m_pObj.get(); + } + void Release() { + if (--m_nCount == 0) + delete this; + } + bool HasOneRef() const { return m_nCount == 1; } + + private: + ~Handle() {} + + intptr_t m_nCount; + std::unique_ptr m_pObj; + }; + + CFX_RetainPtr m_pHandle; +}; + +#endif // CORE_FXCRT_CFX_WEAK_PTR_H_ diff --git a/core/fxcrt/cfx_weak_ptr_unittest.cpp b/core/fxcrt/cfx_weak_ptr_unittest.cpp index c4fa514bef..11dd8bb3c0 100644 --- a/core/fxcrt/cfx_weak_ptr_unittest.cpp +++ b/core/fxcrt/cfx_weak_ptr_unittest.cpp @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "core/fxcrt/include/cfx_weak_ptr.h" +#include "core/fxcrt/cfx_weak_ptr.h" #include #include -#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/fx_memory.h" #include "testing/fx_string_testhelpers.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/core/fxcrt/extension.h b/core/fxcrt/extension.h index d4fd0931f4..6a437db574 100644 --- a/core/fxcrt/extension.h +++ b/core/fxcrt/extension.h @@ -10,8 +10,8 @@ #include #include -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_safe_types.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_safe_types.h" class IFXCRT_FileAccess { public: diff --git a/core/fxcrt/fx_arabic.cpp b/core/fxcrt/fx_arabic.cpp index 2c0a1bbad7..ee04f40ac8 100644 --- a/core/fxcrt/fx_arabic.cpp +++ b/core/fxcrt/fx_arabic.cpp @@ -4,8 +4,8 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_arabic.h" -#include "core/fxcrt/include/fx_ucd.h" +#include "core/fxcrt/fx_arabic.h" +#include "core/fxcrt/fx_ucd.h" namespace { diff --git a/core/fxcrt/fx_arabic.h b/core/fxcrt/fx_arabic.h new file mode 100644 index 0000000000..e20a261b00 --- /dev/null +++ b/core/fxcrt/fx_arabic.h @@ -0,0 +1,188 @@ +// Copyright 2014 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FXCRT_FX_ARABIC_H_ +#define CORE_FXCRT_FX_ARABIC_H_ + +#include "core/fxcrt/fx_arb.h" + +#define FX_BIDIMAXLEVEL 61 +#define FX_BidiDirection(a) (FX_IsOdd(a) ? FX_BIDICLASS_R : FX_BIDICLASS_L) +#define FX_BidiGetDeferredType(a) (((a) >> 4) & 0x0F) +#define FX_BidiGetResolvedType(a) ((a)&0x0F) + +namespace pdfium { +namespace arabic { + +bool IsArabicChar(FX_WCHAR wch); +bool IsArabicFormChar(FX_WCHAR wch); +FX_WCHAR GetFormChar(FX_WCHAR wch, FX_WCHAR prev = 0, FX_WCHAR next = 0); +FX_WCHAR GetFormChar(const CFX_Char* cur, + const CFX_Char* prev, + const CFX_Char* next); + +} // namespace arabic +} // namespace pdfium + +void FX_BidiReverseString(CFX_WideString& wsText, + int32_t iStart, + int32_t iCount); +void FX_BidiSetDeferredRun(CFX_Int32Array& values, + int32_t iStart, + int32_t iCount, + int32_t iValue); +void FX_BidiClassify(const CFX_WideString& wsText, + CFX_Int32Array& classes, + FX_BOOL bWS = FALSE); +int32_t FX_BidiResolveExplicit(int32_t iBaseLevel, + int32_t iDirection, + CFX_Int32Array& classes, + CFX_Int32Array& levels, + int32_t iStart, + int32_t iCount, + int32_t iNest = 0); + +enum FX_BIDIWEAKSTATE { + FX_BIDIWEAKSTATE_xa = 0, + FX_BIDIWEAKSTATE_xr, + FX_BIDIWEAKSTATE_xl, + FX_BIDIWEAKSTATE_ao, + FX_BIDIWEAKSTATE_ro, + FX_BIDIWEAKSTATE_lo, + FX_BIDIWEAKSTATE_rt, + FX_BIDIWEAKSTATE_lt, + FX_BIDIWEAKSTATE_cn, + FX_BIDIWEAKSTATE_ra, + FX_BIDIWEAKSTATE_re, + FX_BIDIWEAKSTATE_la, + FX_BIDIWEAKSTATE_le, + FX_BIDIWEAKSTATE_ac, + FX_BIDIWEAKSTATE_rc, + FX_BIDIWEAKSTATE_rs, + FX_BIDIWEAKSTATE_lc, + FX_BIDIWEAKSTATE_ls, + FX_BIDIWEAKSTATE_ret, + FX_BIDIWEAKSTATE_let, +}; +#define FX_BWSxa FX_BIDIWEAKSTATE_xa +#define FX_BWSxr FX_BIDIWEAKSTATE_xr +#define FX_BWSxl FX_BIDIWEAKSTATE_xl +#define FX_BWSao FX_BIDIWEAKSTATE_ao +#define FX_BWSro FX_BIDIWEAKSTATE_ro +#define FX_BWSlo FX_BIDIWEAKSTATE_lo +#define FX_BWSrt FX_BIDIWEAKSTATE_rt +#define FX_BWSlt FX_BIDIWEAKSTATE_lt +#define FX_BWScn FX_BIDIWEAKSTATE_cn +#define FX_BWSra FX_BIDIWEAKSTATE_ra +#define FX_BWSre FX_BIDIWEAKSTATE_re +#define FX_BWSla FX_BIDIWEAKSTATE_la +#define FX_BWSle FX_BIDIWEAKSTATE_le +#define FX_BWSac FX_BIDIWEAKSTATE_ac +#define FX_BWSrc FX_BIDIWEAKSTATE_rc +#define FX_BWSrs FX_BIDIWEAKSTATE_rs +#define FX_BWSlc FX_BIDIWEAKSTATE_lc +#define FX_BWSls FX_BIDIWEAKSTATE_ls +#define FX_BWSret FX_BIDIWEAKSTATE_ret +#define FX_BWSlet FX_BIDIWEAKSTATE_let + +enum FX_BIDIWEAKACTION { + FX_BIDIWEAKACTION_IX = 0x100, + FX_BIDIWEAKACTION_XX = 0x0F, + FX_BIDIWEAKACTION_xxx = (0x0F << 4) + 0x0F, + FX_BIDIWEAKACTION_xIx = 0x100 + FX_BIDIWEAKACTION_xxx, + FX_BIDIWEAKACTION_xxN = (0x0F << 4) + FX_BIDICLASS_ON, + FX_BIDIWEAKACTION_xxE = (0x0F << 4) + FX_BIDICLASS_EN, + FX_BIDIWEAKACTION_xxA = (0x0F << 4) + FX_BIDICLASS_AN, + FX_BIDIWEAKACTION_xxR = (0x0F << 4) + FX_BIDICLASS_R, + FX_BIDIWEAKACTION_xxL = (0x0F << 4) + FX_BIDICLASS_L, + FX_BIDIWEAKACTION_Nxx = (FX_BIDICLASS_ON << 4) + 0x0F, + FX_BIDIWEAKACTION_Axx = (FX_BIDICLASS_AN << 4) + 0x0F, + FX_BIDIWEAKACTION_ExE = (FX_BIDICLASS_EN << 4) + FX_BIDICLASS_EN, + FX_BIDIWEAKACTION_NIx = (FX_BIDICLASS_ON << 4) + 0x0F + 0x100, + FX_BIDIWEAKACTION_NxN = (FX_BIDICLASS_ON << 4) + FX_BIDICLASS_ON, + FX_BIDIWEAKACTION_NxR = (FX_BIDICLASS_ON << 4) + FX_BIDICLASS_R, + FX_BIDIWEAKACTION_NxE = (FX_BIDICLASS_ON << 4) + FX_BIDICLASS_EN, + FX_BIDIWEAKACTION_AxA = (FX_BIDICLASS_AN << 4) + FX_BIDICLASS_AN, + FX_BIDIWEAKACTION_NxL = (FX_BIDICLASS_ON << 4) + FX_BIDICLASS_L, + FX_BIDIWEAKACTION_LxL = (FX_BIDICLASS_L << 4) + FX_BIDICLASS_L, + FX_BIDIWEAKACTION_xIL = (0x0F << 4) + FX_BIDICLASS_L + 0x100, + FX_BIDIWEAKACTION_AxR = (FX_BIDICLASS_AN << 4) + FX_BIDICLASS_R, + FX_BIDIWEAKACTION_Lxx = (FX_BIDICLASS_L << 4) + 0x0F, +}; +#define FX_BWAIX FX_BIDIWEAKACTION_IX +#define FX_BWAXX FX_BIDIWEAKACTION_XX +#define FX_BWAxxx FX_BIDIWEAKACTION_xxx +#define FX_BWAxIx FX_BIDIWEAKACTION_xIx +#define FX_BWAxxN FX_BIDIWEAKACTION_xxN +#define FX_BWAxxE FX_BIDIWEAKACTION_xxE +#define FX_BWAxxA FX_BIDIWEAKACTION_xxA +#define FX_BWAxxR FX_BIDIWEAKACTION_xxR +#define FX_BWAxxL FX_BIDIWEAKACTION_xxL +#define FX_BWANxx FX_BIDIWEAKACTION_Nxx +#define FX_BWAAxx FX_BIDIWEAKACTION_Axx +#define FX_BWAExE FX_BIDIWEAKACTION_ExE +#define FX_BWANIx FX_BIDIWEAKACTION_NIx +#define FX_BWANxN FX_BIDIWEAKACTION_NxN +#define FX_BWANxR FX_BIDIWEAKACTION_NxR +#define FX_BWANxE FX_BIDIWEAKACTION_NxE +#define FX_BWAAxA FX_BIDIWEAKACTION_AxA +#define FX_BWANxL FX_BIDIWEAKACTION_NxL +#define FX_BWALxL FX_BIDIWEAKACTION_LxL +#define FX_BWAxIL FX_BIDIWEAKACTION_xIL +#define FX_BWAAxR FX_BIDIWEAKACTION_AxR +#define FX_BWALxx FX_BIDIWEAKACTION_Lxx + +void FX_BidiResolveWeak(int32_t iBaseLevel, + CFX_Int32Array& classes, + CFX_Int32Array& levels); +enum FX_BIDINEUTRALSTATE { + FX_BIDINEUTRALSTATE_r = 0, + FX_BIDINEUTRALSTATE_l, + FX_BIDINEUTRALSTATE_rn, + FX_BIDINEUTRALSTATE_ln, + FX_BIDINEUTRALSTATE_a, + FX_BIDINEUTRALSTATE_na, +}; +#define FX_BNSr FX_BIDINEUTRALSTATE_r +#define FX_BNSl FX_BIDINEUTRALSTATE_l +#define FX_BNSrn FX_BIDINEUTRALSTATE_rn +#define FX_BNSln FX_BIDINEUTRALSTATE_ln +#define FX_BNSa FX_BIDINEUTRALSTATE_a +#define FX_BNSna FX_BIDINEUTRALSTATE_na +enum FX_BIDINEUTRALACTION { + FX_BIDINEUTRALACTION_nL = FX_BIDICLASS_L, + FX_BIDINEUTRALACTION_En = (FX_BIDICLASS_AN << 4), + FX_BIDINEUTRALACTION_Rn = (FX_BIDICLASS_R << 4), + FX_BIDINEUTRALACTION_Ln = (FX_BIDICLASS_L << 4), + FX_BIDINEUTRALACTION_In = FX_BIDIWEAKACTION_IX, + FX_BIDINEUTRALACTION_LnL = (FX_BIDICLASS_L << 4) + FX_BIDICLASS_L, +}; +#define FX_BNAnL FX_BIDINEUTRALACTION_nL +#define FX_BNAEn FX_BIDINEUTRALACTION_En +#define FX_BNARn FX_BIDINEUTRALACTION_Rn +#define FX_BNALn FX_BIDINEUTRALACTION_Ln +#define FX_BNAIn FX_BIDINEUTRALACTION_In +#define FX_BNALnL FX_BIDINEUTRALACTION_LnL +int32_t FX_BidiGetDeferredNeutrals(int32_t iAction, int32_t iLevel); +int32_t FX_BidiGetResolvedNeutrals(int32_t iAction); +void FX_BidiResolveNeutrals(int32_t iBaseLevel, + CFX_Int32Array& classes, + const CFX_Int32Array& levels); +void FX_BidiResolveImplicit(const CFX_Int32Array& classes, + CFX_Int32Array& levels); +void FX_BidiResolveWhitespace(int32_t iBaseLevel, + const CFX_Int32Array& classes, + CFX_Int32Array& levels); +int32_t FX_BidiReorderLevel(int32_t iBaseLevel, + CFX_WideString& wsText, + const CFX_Int32Array& levels, + int32_t iStart, + FX_BOOL bReverse = FALSE); +void FX_BidiReorder(int32_t iBaseLevel, + CFX_WideString& wsText, + const CFX_Int32Array& levels); + +#endif // CORE_FXCRT_FX_ARABIC_H_ diff --git a/core/fxcrt/fx_arb.h b/core/fxcrt/fx_arb.h new file mode 100644 index 0000000000..6d556fe9f9 --- /dev/null +++ b/core/fxcrt/fx_arb.h @@ -0,0 +1,49 @@ +// Copyright 2014 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FXCRT_FX_ARB_H_ +#define CORE_FXCRT_FX_ARB_H_ + +#include "core/fxcrt/fx_system.h" +#include "core/fxcrt/fx_ucd.h" + +struct FX_ARBFORMTABLE { + uint16_t wIsolated; + uint16_t wFinal; + uint16_t wInitial; + uint16_t wMedial; +}; + +struct FX_ARAALEF { + uint16_t wAlef; + uint16_t wIsolated; +}; + +struct FX_ARASHADDA { + uint16_t wShadda; + uint16_t wIsolated; +}; + +const FX_ARBFORMTABLE* FX_GetArabicFormTable(FX_WCHAR unicode); +FX_WCHAR FX_GetArabicFromAlefTable(FX_WCHAR alef); +FX_WCHAR FX_GetArabicFromShaddaTable(FX_WCHAR shadda); + +enum FX_ARBPOSITION { + FX_ARBPOSITION_Isolated = 0, + FX_ARBPOSITION_Final, + FX_ARBPOSITION_Initial, + FX_ARBPOSITION_Medial, +}; + +void FX_BidiLine(CFX_WideString& wsText, int32_t iBaseLevel = 0); +void FX_BidiLine(CFX_TxtCharArray& chars, + int32_t iCount, + int32_t iBaseLevel = 0); +void FX_BidiLine(CFX_RTFCharArray& chars, + int32_t iCount, + int32_t iBaseLevel = 0); + +#endif // CORE_FXCRT_FX_ARB_H_ diff --git a/core/fxcrt/fx_basic.h b/core/fxcrt/fx_basic.h new file mode 100644 index 0000000000..4cf69f896b --- /dev/null +++ b/core/fxcrt/fx_basic.h @@ -0,0 +1,860 @@ +// Copyright 2014 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FXCRT_FX_BASIC_H_ +#define CORE_FXCRT_FX_BASIC_H_ + +#include +#include + +#include "core/fxcrt/fx_memory.h" +#include "core/fxcrt/fx_stream.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" + +class CFX_BinaryBuf { + public: + CFX_BinaryBuf(); + explicit CFX_BinaryBuf(FX_STRSIZE size); + ~CFX_BinaryBuf(); + + uint8_t* GetBuffer() const { return m_pBuffer.get(); } + FX_STRSIZE GetSize() const { return m_DataSize; } + + void Clear(); + void EstimateSize(FX_STRSIZE size, FX_STRSIZE alloc_step = 0); + void AppendBlock(const void* pBuf, FX_STRSIZE size); + void AppendString(const CFX_ByteString& str) { + AppendBlock(str.c_str(), str.GetLength()); + } + + void AppendByte(uint8_t byte) { + ExpandBuf(1); + m_pBuffer.get()[m_DataSize++] = byte; + } + + void InsertBlock(FX_STRSIZE pos, const void* pBuf, FX_STRSIZE size); + void Delete(int start_index, int count); + + // Takes ownership of |pBuf|. + void AttachData(uint8_t* pBuf, FX_STRSIZE size); + + // Releases ownership of |m_pBuffer| and returns it. + uint8_t* DetachBuffer(); + + protected: + void ExpandBuf(FX_STRSIZE size); + + FX_STRSIZE m_AllocStep; + FX_STRSIZE m_AllocSize; + FX_STRSIZE m_DataSize; + std::unique_ptr m_pBuffer; +}; + +class CFX_ByteTextBuf : public CFX_BinaryBuf { + public: + FX_STRSIZE GetLength() const { return m_DataSize; } + CFX_ByteString MakeString() const { + return CFX_ByteString(m_pBuffer.get(), m_DataSize); + } + CFX_ByteStringC AsStringC() const { + return CFX_ByteStringC(m_pBuffer.get(), m_DataSize); + } + + void AppendChar(int ch) { AppendByte(static_cast(ch)); } + CFX_ByteTextBuf& operator<<(int i); + CFX_ByteTextBuf& operator<<(uint32_t i); + CFX_ByteTextBuf& operator<<(double f); + CFX_ByteTextBuf& operator<<(const FX_CHAR* pStr) { + return *this << CFX_ByteStringC(pStr); + } + CFX_ByteTextBuf& operator<<(const CFX_ByteString& str) { + return *this << str.AsStringC(); + } + CFX_ByteTextBuf& operator<<(const CFX_ByteStringC& lpsz); + CFX_ByteTextBuf& operator<<(const CFX_ByteTextBuf& buf); +}; + +class CFX_WideTextBuf : public CFX_BinaryBuf { + public: + void AppendChar(FX_WCHAR wch); + FX_STRSIZE GetLength() const { return m_DataSize / sizeof(FX_WCHAR); } + FX_WCHAR* GetBuffer() const { + return reinterpret_cast(m_pBuffer.get()); + } + + CFX_WideStringC AsStringC() const { + return CFX_WideStringC(reinterpret_cast(m_pBuffer.get()), + m_DataSize / sizeof(FX_WCHAR)); + } + CFX_WideString MakeString() const { + return CFX_WideString(reinterpret_cast(m_pBuffer.get()), + m_DataSize / sizeof(FX_WCHAR)); + } + + void Delete(int start_index, int count) { + CFX_BinaryBuf::Delete(start_index * sizeof(FX_WCHAR), + count * sizeof(FX_WCHAR)); + } + + CFX_WideTextBuf& operator<<(int i); + CFX_WideTextBuf& operator<<(double f); + CFX_WideTextBuf& operator<<(const FX_WCHAR* lpsz); + CFX_WideTextBuf& operator<<(const CFX_WideStringC& str); + CFX_WideTextBuf& operator<<(const CFX_WideString& str); + CFX_WideTextBuf& operator<<(const CFX_WideTextBuf& buf); +}; + +class CFX_FileBufferArchive { + public: + CFX_FileBufferArchive(); + ~CFX_FileBufferArchive(); + + void Clear(); + bool Flush(); + int32_t AppendBlock(const void* pBuf, size_t size); + int32_t AppendByte(uint8_t byte); + int32_t AppendDWord(uint32_t i); + int32_t AppendString(const CFX_ByteStringC& lpsz); + + // |pFile| must outlive the CFX_FileBufferArchive. + void AttachFile(IFX_StreamWrite* pFile); + + private: + static const size_t kBufSize = 32768; + + size_t m_Length; + std::unique_ptr m_pBuffer; + IFX_StreamWrite* m_pFile; +}; + +class CFX_CharMap { + public: + static CFX_ByteString GetByteString(uint16_t codepage, + const CFX_WideStringC& wstr); + + static CFX_WideString GetWideString(uint16_t codepage, + const CFX_ByteStringC& bstr); + + CFX_CharMap() = delete; +}; + +class CFX_UTF8Decoder { + public: + CFX_UTF8Decoder() { m_PendingBytes = 0; } + + void Clear(); + + void Input(uint8_t byte); + + void AppendChar(uint32_t ch); + + void ClearStatus() { m_PendingBytes = 0; } + + CFX_WideStringC GetResult() const { return m_Buffer.AsStringC(); } + + protected: + int m_PendingBytes; + + uint32_t m_PendingChar; + + CFX_WideTextBuf m_Buffer; +}; + +class CFX_UTF8Encoder { + public: + CFX_UTF8Encoder() {} + + void Input(FX_WCHAR unicode); + void AppendStr(const CFX_ByteStringC& str) { m_Buffer << str; } + CFX_ByteStringC GetResult() const { return m_Buffer.AsStringC(); } + + protected: + CFX_ByteTextBuf m_Buffer; +}; + +class CFX_BasicArray { + protected: + explicit CFX_BasicArray(int unit_size); + CFX_BasicArray(const CFX_BasicArray&) = delete; + ~CFX_BasicArray(); + + FX_BOOL SetSize(int nNewSize); + FX_BOOL Append(const CFX_BasicArray& src); + FX_BOOL Copy(const CFX_BasicArray& src); + uint8_t* InsertSpaceAt(int nIndex, int nCount); + FX_BOOL RemoveAt(int nIndex, int nCount); + FX_BOOL InsertAt(int nStartIndex, const CFX_BasicArray* pNewArray); + const void* GetDataPtr(int index) const; + + protected: + uint8_t* m_pData; + int m_nSize; + int m_nMaxSize; + int m_nUnitSize; +}; + +template +class CFX_ArrayTemplate : public CFX_BasicArray { + public: + CFX_ArrayTemplate() : CFX_BasicArray(sizeof(TYPE)) {} + + int GetSize() const { return m_nSize; } + + int GetUpperBound() const { return m_nSize - 1; } + + FX_BOOL SetSize(int nNewSize) { return CFX_BasicArray::SetSize(nNewSize); } + + void RemoveAll() { SetSize(0); } + + const TYPE GetAt(int nIndex) const { + if (nIndex < 0 || nIndex >= m_nSize) { + PDFIUM_IMMEDIATE_CRASH(); + } + return ((const TYPE*)m_pData)[nIndex]; + } + + FX_BOOL SetAt(int nIndex, TYPE newElement) { + if (nIndex < 0 || nIndex >= m_nSize) { + return FALSE; + } + ((TYPE*)m_pData)[nIndex] = newElement; + return TRUE; + } + + TYPE& ElementAt(int nIndex) { + if (nIndex < 0 || nIndex >= m_nSize) { + PDFIUM_IMMEDIATE_CRASH(); + } + return ((TYPE*)m_pData)[nIndex]; + } + + const TYPE* GetData() const { return (const TYPE*)m_pData; } + + TYPE* GetData() { return (TYPE*)m_pData; } + + FX_BOOL SetAtGrow(int nIndex, TYPE newElement) { + if (nIndex < 0) + return FALSE; + + if (nIndex >= m_nSize && !SetSize(nIndex + 1)) + return FALSE; + + ((TYPE*)m_pData)[nIndex] = newElement; + return TRUE; + } + + FX_BOOL Add(TYPE newElement) { + if (m_nSize < m_nMaxSize) { + m_nSize++; + } else if (!SetSize(m_nSize + 1)) { + return FALSE; + } + ((TYPE*)m_pData)[m_nSize - 1] = newElement; + return TRUE; + } + + FX_BOOL Append(const CFX_ArrayTemplate& src) { + return CFX_BasicArray::Append(src); + } + + FX_BOOL Copy(const CFX_ArrayTemplate& src) { + return CFX_BasicArray::Copy(src); + } + + TYPE* GetDataPtr(int index) { + return (TYPE*)CFX_BasicArray::GetDataPtr(index); + } + + TYPE* AddSpace() { return (TYPE*)CFX_BasicArray::InsertSpaceAt(m_nSize, 1); } + + TYPE* InsertSpaceAt(int nIndex, int nCount) { + return (TYPE*)CFX_BasicArray::InsertSpaceAt(nIndex, nCount); + } + + const TYPE operator[](int nIndex) const { + if (nIndex < 0 || nIndex >= m_nSize) { + *(volatile char*)0 = '\0'; + } + return ((const TYPE*)m_pData)[nIndex]; + } + + TYPE& operator[](int nIndex) { + if (nIndex < 0 || nIndex >= m_nSize) { + *(volatile char*)0 = '\0'; + } + return ((TYPE*)m_pData)[nIndex]; + } + + FX_BOOL InsertAt(int nIndex, TYPE newElement, int nCount = 1) { + if (!InsertSpaceAt(nIndex, nCount)) { + return FALSE; + } + while (nCount--) { + ((TYPE*)m_pData)[nIndex++] = newElement; + } + return TRUE; + } + + FX_BOOL RemoveAt(int nIndex, int nCount = 1) { + return CFX_BasicArray::RemoveAt(nIndex, nCount); + } + + FX_BOOL InsertAt(int nStartIndex, const CFX_BasicArray* pNewArray) { + return CFX_BasicArray::InsertAt(nStartIndex, pNewArray); + } + + int Find(TYPE data, int iStart = 0) const { + if (iStart < 0) { + return -1; + } + for (; iStart < (int)m_nSize; iStart++) + if (((TYPE*)m_pData)[iStart] == data) { + return iStart; + } + return -1; + } +}; + +#ifdef PDF_ENABLE_XFA +typedef CFX_ArrayTemplate CFX_WideStringCArray; +typedef CFX_ArrayTemplate CFX_FloatArray; +typedef CFX_ArrayTemplate CFX_ByteArray; +typedef CFX_ArrayTemplate CFX_Int32Array; + +template +class CFX_ObjectArray : public CFX_BasicArray { + public: + CFX_ObjectArray() : CFX_BasicArray(sizeof(ObjectClass)) {} + + ~CFX_ObjectArray() { RemoveAll(); } + + void Add(const ObjectClass& data) { + new ((void*)InsertSpaceAt(m_nSize, 1)) ObjectClass(data); + } + + ObjectClass& Add() { + return *(ObjectClass*)new ((void*)InsertSpaceAt(m_nSize, 1)) ObjectClass(); + } + + void* AddSpace() { return InsertSpaceAt(m_nSize, 1); } + + int32_t Append(const CFX_ObjectArray& src, + int32_t nStart = 0, + int32_t nCount = -1) { + if (nCount == 0) { + return 0; + } + int32_t nSize = src.GetSize(); + if (!nSize) { + return 0; + } + ASSERT(nStart > -1 && nStart < nSize); + if (nCount < 0) { + nCount = nSize; + } + if (nStart + nCount > nSize) { + nCount = nSize - nStart; + } + if (nCount < 1) { + return 0; + } + nSize = m_nSize; + InsertSpaceAt(m_nSize, nCount); + ObjectClass* pStartObj = (ObjectClass*)GetDataPtr(nSize); + nSize = nStart + nCount; + for (int32_t i = nStart; i < nSize; i++, pStartObj++) { + new ((void*)pStartObj) ObjectClass(src[i]); + } + return nCount; + } + + int32_t Copy(const CFX_ObjectArray& src, + int32_t nStart = 0, + int32_t nCount = -1) { + if (nCount == 0) { + return 0; + } + int32_t nSize = src.GetSize(); + if (!nSize) { + return 0; + } + ASSERT(nStart > -1 && nStart < nSize); + if (nCount < 0) { + nCount = nSize; + } + if (nStart + nCount > nSize) { + nCount = nSize - nStart; + } + if (nCount < 1) { + return 0; + } + RemoveAll(); + SetSize(nCount); + ObjectClass* pStartObj = (ObjectClass*)m_pData; + nSize = nStart + nCount; + for (int32_t i = nStart; i < nSize; i++, pStartObj++) { + new ((void*)pStartObj) ObjectClass(src[i]); + } + return nCount; + } + + int GetSize() const { return m_nSize; } + + ObjectClass& operator[](int index) const { + ASSERT(index < m_nSize); + return *(ObjectClass*)CFX_BasicArray::GetDataPtr(index); + } + + ObjectClass* GetDataPtr(int index) { + return (ObjectClass*)CFX_BasicArray::GetDataPtr(index); + } + + void RemoveAt(int index) { + ASSERT(index < m_nSize); + ((ObjectClass*)GetDataPtr(index))->~ObjectClass(); + CFX_BasicArray::RemoveAt(index, 1); + } + + void RemoveAll() { + for (int i = 0; i < m_nSize; i++) { + ((ObjectClass*)GetDataPtr(i))->~ObjectClass(); + } + CFX_BasicArray::SetSize(0); + } +}; +typedef CFX_ObjectArray CFX_ByteStringArray; +typedef CFX_ObjectArray CFX_WideStringArray; +#endif // PDF_ENABLE_XFA + +template +class CFX_FixedBufGrow { + public: + explicit CFX_FixedBufGrow(int data_size) { + if (data_size > FixedSize) { + m_pGrowData.reset(FX_Alloc(DataType, data_size)); + return; + } + FXSYS_memset(m_FixedData, 0, sizeof(DataType) * FixedSize); + } + operator DataType*() { return m_pGrowData ? m_pGrowData.get() : m_FixedData; } + + private: + DataType m_FixedData[FixedSize]; + std::unique_ptr m_pGrowData; +}; + +#ifdef PDF_ENABLE_XFA +class CFX_MapPtrToPtr { + protected: + struct CAssoc { + CAssoc* pNext; + void* key; + void* value; + }; + + public: + CFX_MapPtrToPtr(int nBlockSize = 10); + ~CFX_MapPtrToPtr(); + + int GetCount() const { return m_nCount; } + bool IsEmpty() const { return m_nCount == 0; } + + FX_BOOL Lookup(void* key, void*& rValue) const; + + void* GetValueAt(void* key) const; + + void*& operator[](void* key); + + void SetAt(void* key, void* newValue) { (*this)[key] = newValue; } + + FX_BOOL RemoveKey(void* key); + + void RemoveAll(); + + FX_POSITION GetStartPosition() const { + return m_nCount == 0 ? nullptr : (FX_POSITION)-1; + } + + void GetNextAssoc(FX_POSITION& rNextPosition, + void*& rKey, + void*& rValue) const; + + uint32_t GetHashTableSize() const { return m_nHashTableSize; } + + void InitHashTable(uint32_t hashSize, FX_BOOL bAllocNow = TRUE); + + protected: + CAssoc** m_pHashTable; + + uint32_t m_nHashTableSize; + + int m_nCount; + + CAssoc* m_pFreeList; + + struct CFX_Plex* m_pBlocks; + + int m_nBlockSize; + + uint32_t HashKey(void* key) const; + + CAssoc* NewAssoc(); + + void FreeAssoc(CAssoc* pAssoc); + + CAssoc* GetAssocAt(void* key, uint32_t& hash) const; +}; + +template +class CFX_MapPtrTemplate : public CFX_MapPtrToPtr { + public: + CFX_MapPtrTemplate() : CFX_MapPtrToPtr(10) {} + + FX_BOOL Lookup(KeyType key, ValueType& rValue) const { + void* pValue = nullptr; + if (!CFX_MapPtrToPtr::Lookup((void*)(uintptr_t)key, pValue)) { + return FALSE; + } + rValue = (ValueType)(uintptr_t)pValue; + return TRUE; + } + + ValueType& operator[](KeyType key) { + return (ValueType&)CFX_MapPtrToPtr::operator[]((void*)(uintptr_t)key); + } + + void SetAt(KeyType key, ValueType newValue) { + CFX_MapPtrToPtr::SetAt((void*)(uintptr_t)key, (void*)(uintptr_t)newValue); + } + + FX_BOOL RemoveKey(KeyType key) { + return CFX_MapPtrToPtr::RemoveKey((void*)(uintptr_t)key); + } + + void GetNextAssoc(FX_POSITION& rNextPosition, + KeyType& rKey, + ValueType& rValue) const { + void* pKey = nullptr; + void* pValue = nullptr; + CFX_MapPtrToPtr::GetNextAssoc(rNextPosition, pKey, pValue); + rKey = (KeyType)(uintptr_t)pKey; + rValue = (ValueType)(uintptr_t)pValue; + } +}; +#endif // PDF_ENABLE_XFA + +class CFX_PtrList { + protected: + struct CNode { + CNode* pNext; + CNode* pPrev; + void* data; + }; + + public: + CFX_PtrList(int nBlockSize = 10); + + FX_POSITION GetHeadPosition() const { return (FX_POSITION)m_pNodeHead; } + FX_POSITION GetTailPosition() const { return (FX_POSITION)m_pNodeTail; } + + void* GetNext(FX_POSITION& rPosition) const { + CNode* pNode = (CNode*)rPosition; + rPosition = (FX_POSITION)pNode->pNext; + return pNode->data; + } + + void* GetPrev(FX_POSITION& rPosition) const { + CNode* pNode = (CNode*)rPosition; + rPosition = (FX_POSITION)pNode->pPrev; + return pNode->data; + } + + FX_POSITION GetNextPosition(FX_POSITION pos) const { + return ((CNode*)pos)->pNext; + } + + FX_POSITION GetPrevPosition(FX_POSITION pos) const { + return ((CNode*)pos)->pPrev; + } + + void* GetAt(FX_POSITION rPosition) const { + CNode* pNode = (CNode*)rPosition; + return pNode->data; + } + + int GetCount() const { return m_nCount; } + FX_POSITION AddTail(void* newElement); + FX_POSITION AddHead(void* newElement); + + void SetAt(FX_POSITION pos, void* newElement) { + CNode* pNode = (CNode*)pos; + pNode->data = newElement; + } + FX_POSITION InsertAfter(FX_POSITION pos, void* newElement); + + FX_POSITION Find(void* searchValue, FX_POSITION startAfter = nullptr) const; + FX_POSITION FindIndex(int index) const; + + void RemoveAt(FX_POSITION pos); + void RemoveAll(); + + protected: + CNode* m_pNodeHead; + CNode* m_pNodeTail; + int m_nCount; + CNode* m_pNodeFree; + struct CFX_Plex* m_pBlocks; + int m_nBlockSize; + + CNode* NewNode(CNode* pPrev, CNode* pNext); + void FreeNode(CNode* pNode); + + public: + ~CFX_PtrList(); +}; + +#ifdef PDF_ENABLE_XFA +typedef void (*PD_CALLBACK_FREEDATA)(void* pData); +#endif // PDF_ENABLE_XFA + +class CFX_BitStream { + public: + void Init(const uint8_t* pData, uint32_t dwSize); + + uint32_t GetBits(uint32_t nBits); + + void ByteAlign(); + + FX_BOOL IsEOF() { return m_BitPos >= m_BitSize; } + + void SkipBits(uint32_t nBits) { m_BitPos += nBits; } + + void Rewind() { m_BitPos = 0; } + + uint32_t GetPos() const { return m_BitPos; } + + uint32_t BitsRemaining() const { + return m_BitSize >= m_BitPos ? m_BitSize - m_BitPos : 0; + } + + protected: + uint32_t m_BitPos; + + uint32_t m_BitSize; + + const uint8_t* m_pData; +}; + +class IFX_Pause { + public: + virtual ~IFX_Pause() {} + virtual FX_BOOL NeedToPauseNow() = 0; +}; + +template +class CFX_AutoRestorer { + public: + explicit CFX_AutoRestorer(T* location) + : m_Location(location), m_OldValue(*location) {} + ~CFX_AutoRestorer() { *m_Location = m_OldValue; } + + private: + T* const m_Location; + const T m_OldValue; +}; + +#define FX_DATALIST_LENGTH 1024 +template +class CFX_SortListArray { + protected: + struct DataList { + int32_t start; + + int32_t count; + uint8_t* data; + }; + + public: + CFX_SortListArray() : m_CurList(0) {} + + ~CFX_SortListArray() { Clear(); } + + void Clear() { + for (int32_t i = m_DataLists.GetUpperBound(); i >= 0; i--) { + DataList list = m_DataLists.ElementAt(i); + FX_Free(list.data); + } + m_DataLists.RemoveAll(); + m_CurList = 0; + } + + void Append(int32_t nStart, int32_t nCount) { + if (nStart < 0) { + return; + } + while (nCount > 0) { + int32_t temp_count = std::min(nCount, FX_DATALIST_LENGTH); + DataList list; + list.data = FX_Alloc2D(uint8_t, temp_count, unit); + list.start = nStart; + list.count = temp_count; + Append(list); + nCount -= temp_count; + nStart += temp_count; + } + } + + uint8_t* GetAt(int32_t nIndex) { + if (nIndex < 0) { + return nullptr; + } + if (m_CurList < 0 || m_CurList >= m_DataLists.GetSize()) { + return nullptr; + } + DataList* pCurList = m_DataLists.GetDataPtr(m_CurList); + if (!pCurList || nIndex < pCurList->start || + nIndex >= pCurList->start + pCurList->count) { + pCurList = nullptr; + int32_t iStart = 0; + int32_t iEnd = m_DataLists.GetUpperBound(); + int32_t iMid = 0; + while (iStart <= iEnd) { + iMid = (iStart + iEnd) / 2; + DataList* list = m_DataLists.GetDataPtr(iMid); + if (nIndex < list->start) { + iEnd = iMid - 1; + } else if (nIndex >= list->start + list->count) { + iStart = iMid + 1; + } else { + pCurList = list; + m_CurList = iMid; + break; + } + } + } + return pCurList ? pCurList->data + (nIndex - pCurList->start) * unit + : nullptr; + } + + protected: + void Append(const DataList& list) { + int32_t iStart = 0; + int32_t iEnd = m_DataLists.GetUpperBound(); + int32_t iFind = 0; + while (iStart <= iEnd) { + int32_t iMid = (iStart + iEnd) / 2; + DataList* cur_list = m_DataLists.GetDataPtr(iMid); + if (list.start < cur_list->start + cur_list->count) { + iEnd = iMid - 1; + } else { + if (iMid == iEnd) { + iFind = iMid + 1; + break; + } + DataList* next_list = m_DataLists.GetDataPtr(iMid + 1); + if (list.start < next_list->start) { + iFind = iMid + 1; + break; + } else { + iStart = iMid + 1; + } + } + } + m_DataLists.InsertAt(iFind, list); + } + int32_t m_CurList; + CFX_ArrayTemplate m_DataLists; +}; +template +class CFX_ListArrayTemplate { + public: + void Clear() { m_Data.Clear(); } + + void Add(int32_t nStart, int32_t nCount) { m_Data.Append(nStart, nCount); } + + T2& operator[](int32_t nIndex) { + uint8_t* data = m_Data.GetAt(nIndex); + ASSERT(data); + return (T2&)(*(volatile T2*)data); + } + + T2* GetPtrAt(int32_t nIndex) { return (T2*)m_Data.GetAt(nIndex); } + + protected: + T1 m_Data; +}; +typedef CFX_ListArrayTemplate, + FX_FILESIZE> + CFX_FileSizeListArray; + +#ifdef PDF_ENABLE_XFA +class IFX_Retainable { + public: + virtual uint32_t Retain() = 0; + virtual uint32_t Release() = 0; + + protected: + virtual ~IFX_Retainable() {} +}; +#define FX_IsOdd(a) ((a)&1) +#endif // PDF_ENABLE_XFA + +class CFX_Vector_3by1 { + public: + CFX_Vector_3by1() : a(0.0f), b(0.0f), c(0.0f) {} + + CFX_Vector_3by1(FX_FLOAT a1, FX_FLOAT b1, FX_FLOAT c1) + : a(a1), b(b1), c(c1) {} + + FX_FLOAT a; + FX_FLOAT b; + FX_FLOAT c; +}; +class CFX_Matrix_3by3 { + public: + CFX_Matrix_3by3() + : a(0.0f), + b(0.0f), + c(0.0f), + d(0.0f), + e(0.0f), + f(0.0f), + g(0.0f), + h(0.0f), + i(0.0f) {} + + CFX_Matrix_3by3(FX_FLOAT a1, + FX_FLOAT b1, + FX_FLOAT c1, + FX_FLOAT d1, + FX_FLOAT e1, + FX_FLOAT f1, + FX_FLOAT g1, + FX_FLOAT h1, + FX_FLOAT i1) + : a(a1), b(b1), c(c1), d(d1), e(e1), f(f1), g(g1), h(h1), i(i1) {} + + CFX_Matrix_3by3 Inverse(); + + CFX_Matrix_3by3 Multiply(const CFX_Matrix_3by3& m); + + CFX_Vector_3by1 TransformVector(const CFX_Vector_3by1& v); + + FX_FLOAT a; + FX_FLOAT b; + FX_FLOAT c; + FX_FLOAT d; + FX_FLOAT e; + FX_FLOAT f; + FX_FLOAT g; + FX_FLOAT h; + FX_FLOAT i; +}; + +uint32_t GetBits32(const uint8_t* pData, int bitpos, int nbits); + +#endif // CORE_FXCRT_FX_BASIC_H_ diff --git a/core/fxcrt/fx_basic_array.cpp b/core/fxcrt/fx_basic_array.cpp index 0a2dc43fc5..2d1a7bdf31 100644 --- a/core/fxcrt/fx_basic_array.cpp +++ b/core/fxcrt/fx_basic_array.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #include "third_party/base/numerics/safe_math.h" CFX_BasicArray::CFX_BasicArray(int unit_size) diff --git a/core/fxcrt/fx_basic_bstring.cpp b/core/fxcrt/fx_basic_bstring.cpp index 63db86e0c8..23f13c1207 100644 --- a/core/fxcrt/fx_basic_bstring.cpp +++ b/core/fxcrt/fx_basic_bstring.cpp @@ -9,8 +9,8 @@ #include #include -#include "core/fxcrt/include/cfx_string_pool_template.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/cfx_string_pool_template.h" +#include "core/fxcrt/fx_basic.h" #include "third_party/base/numerics/safe_math.h" template class CFX_StringDataTemplate; diff --git a/core/fxcrt/fx_basic_bstring_unittest.cpp b/core/fxcrt/fx_basic_bstring_unittest.cpp index cfdf2794b4..f314c652ba 100644 --- a/core/fxcrt/fx_basic_bstring_unittest.cpp +++ b/core/fxcrt/fx_basic_bstring_unittest.cpp @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #include "testing/fx_string_testhelpers.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/core/fxcrt/fx_basic_buffer.cpp b/core/fxcrt/fx_basic_buffer.cpp index 5ee1a659e5..d441f6c0e9 100644 --- a/core/fxcrt/fx_basic_buffer.cpp +++ b/core/fxcrt/fx_basic_buffer.cpp @@ -7,8 +7,8 @@ #include #include -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_safe_types.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_safe_types.h" #include "third_party/base/numerics/safe_conversions.h" CFX_BinaryBuf::CFX_BinaryBuf() diff --git a/core/fxcrt/fx_basic_coords.cpp b/core/fxcrt/fx_basic_coords.cpp index 893a99ac42..1184370fa7 100644 --- a/core/fxcrt/fx_basic_coords.cpp +++ b/core/fxcrt/fx_basic_coords.cpp @@ -6,8 +6,8 @@ #include -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_ext.h" void FX_RECT::Normalize() { if (left > right) { diff --git a/core/fxcrt/fx_basic_gcc.cpp b/core/fxcrt/fx_basic_gcc.cpp index 3547e5fbf0..42fb2a17f7 100644 --- a/core/fxcrt/fx_basic_gcc.cpp +++ b/core/fxcrt/fx_basic_gcc.cpp @@ -8,8 +8,8 @@ #include #include -#include "core/fxcrt/include/fx_ext.h" -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_string.h" template IntType FXSYS_StrToInt(const CharType* str) { diff --git a/core/fxcrt/fx_basic_gcc_unittest.cpp b/core/fxcrt/fx_basic_gcc_unittest.cpp index 73e7446de0..665eede9ff 100644 --- a/core/fxcrt/fx_basic_gcc_unittest.cpp +++ b/core/fxcrt/fx_basic_gcc_unittest.cpp @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "testing/gtest/include/gtest/gtest.h" TEST(fxcrt, FXSYS_atoi) { diff --git a/core/fxcrt/fx_basic_list.cpp b/core/fxcrt/fx_basic_list.cpp index 53e0621a6e..09ad08b281 100644 --- a/core/fxcrt/fx_basic_list.cpp +++ b/core/fxcrt/fx_basic_list.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #include "core/fxcrt/plex.h" CFX_PtrList::CFX_PtrList(int nBlockSize) diff --git a/core/fxcrt/fx_basic_maps.cpp b/core/fxcrt/fx_basic_maps.cpp index 2424b82714..48fb97082d 100644 --- a/core/fxcrt/fx_basic_maps.cpp +++ b/core/fxcrt/fx_basic_maps.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #include "core/fxcrt/plex.h" CFX_MapPtrToPtr::CFX_MapPtrToPtr(int nBlockSize) diff --git a/core/fxcrt/fx_basic_memmgr.cpp b/core/fxcrt/fx_basic_memmgr.cpp index 94d978c879..927b994b5f 100644 --- a/core/fxcrt/fx_basic_memmgr.cpp +++ b/core/fxcrt/fx_basic_memmgr.cpp @@ -6,7 +6,7 @@ #include // For abort(). -#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/fx_memory.h" void* FXMEM_DefaultAlloc(size_t byte_size, int flags) { return (void*)malloc(byte_size); diff --git a/core/fxcrt/fx_basic_memmgr_unittest.cpp b/core/fxcrt/fx_basic_memmgr_unittest.cpp index 3ce533012f..fdffd98f19 100644 --- a/core/fxcrt/fx_basic_memmgr_unittest.cpp +++ b/core/fxcrt/fx_basic_memmgr_unittest.cpp @@ -4,7 +4,7 @@ #include -#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/fx_memory.h" #include "testing/gtest/include/gtest/gtest.h" namespace { diff --git a/core/fxcrt/fx_basic_plex.cpp b/core/fxcrt/fx_basic_plex.cpp index 99cc700dbf..cb6fde6ca0 100644 --- a/core/fxcrt/fx_basic_plex.cpp +++ b/core/fxcrt/fx_basic_plex.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/fx_memory.h" #include "core/fxcrt/plex.h" CFX_Plex* CFX_Plex::Create(CFX_Plex*& pHead, diff --git a/core/fxcrt/fx_basic_utf.cpp b/core/fxcrt/fx_basic_utf.cpp index de219b40fd..8dbbb28877 100644 --- a/core/fxcrt/fx_basic_utf.cpp +++ b/core/fxcrt/fx_basic_utf.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" void CFX_UTF8Decoder::Clear() { m_Buffer.Clear(); diff --git a/core/fxcrt/fx_basic_util.cpp b/core/fxcrt/fx_basic_util.cpp index 663ca93e9c..ae3959bdb9 100644 --- a/core/fxcrt/fx_basic_util.cpp +++ b/core/fxcrt/fx_basic_util.cpp @@ -4,8 +4,8 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_ext.h" #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ #include diff --git a/core/fxcrt/fx_basic_util_unittest.cpp b/core/fxcrt/fx_basic_util_unittest.cpp index 6eae6696ad..471c6deeb3 100644 --- a/core/fxcrt/fx_basic_util_unittest.cpp +++ b/core/fxcrt/fx_basic_util_unittest.cpp @@ -4,7 +4,7 @@ #include -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #include "testing/fx_string_testhelpers.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/core/fxcrt/fx_basic_wstring.cpp b/core/fxcrt/fx_basic_wstring.cpp index 377f09c913..099d0ecd43 100644 --- a/core/fxcrt/fx_basic_wstring.cpp +++ b/core/fxcrt/fx_basic_wstring.cpp @@ -9,9 +9,9 @@ #include #include -#include "core/fxcrt/include/cfx_string_pool_template.h" -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/cfx_string_pool_template.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_ext.h" #include "third_party/base/numerics/safe_math.h" template class CFX_StringDataTemplate; diff --git a/core/fxcrt/fx_basic_wstring_unittest.cpp b/core/fxcrt/fx_basic_wstring_unittest.cpp index efd958d8a6..07b5aaf13c 100644 --- a/core/fxcrt/fx_basic_wstring_unittest.cpp +++ b/core/fxcrt/fx_basic_wstring_unittest.cpp @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #include "testing/fx_string_testhelpers.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/core/fxcrt/fx_bidi.cpp b/core/fxcrt/fx_bidi.cpp index f1d162dee9..e82b3e7284 100644 --- a/core/fxcrt/fx_bidi.cpp +++ b/core/fxcrt/fx_bidi.cpp @@ -5,7 +5,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "core/fxcrt/fx_bidi.h" -#include "core/fxcrt/include/fx_ucd.h" +#include "core/fxcrt/fx_ucd.h" #include diff --git a/core/fxcrt/fx_bidi.h b/core/fxcrt/fx_bidi.h index ad5fb27054..8d12cc8997 100644 --- a/core/fxcrt/fx_bidi.h +++ b/core/fxcrt/fx_bidi.h @@ -10,8 +10,8 @@ #include #include -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" // Processes characters and group them into segments based on text direction. class CFX_BidiChar { diff --git a/core/fxcrt/fx_coordinates.h b/core/fxcrt/fx_coordinates.h new file mode 100644 index 0000000000..d10f7b0c57 --- /dev/null +++ b/core/fxcrt/fx_coordinates.h @@ -0,0 +1,671 @@ +// Copyright 2014 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FXCRT_FX_COORDINATES_H_ +#define CORE_FXCRT_FX_COORDINATES_H_ + +#include "core/fxcrt/fx_basic.h" + +class CFX_Matrix; + +template +class CFX_PSTemplate { + public: + CFX_PSTemplate() : x(0), y(0) {} + CFX_PSTemplate(BaseType new_x, BaseType new_y) : x(new_x), y(new_y) {} + CFX_PSTemplate(const CFX_PSTemplate& other) : x(other.x), y(other.y) {} + void clear() { + x = 0; + y = 0; + } + CFX_PSTemplate operator=(const CFX_PSTemplate& other) { + if (this != &other) { + x = other.x; + y = other.y; + } + return *this; + } + bool operator==(const CFX_PSTemplate& other) const { + return x == other.x && y == other.y; + } + bool operator!=(const CFX_PSTemplate& other) const { + return !(*this == other); + } + CFX_PSTemplate& operator+=(const CFX_PSTemplate& obj) { + x += obj.x; + y += obj.y; + return *this; + } + CFX_PSTemplate& operator-=(const CFX_PSTemplate& obj) { + x -= obj.x; + y -= obj.y; + return *this; + } + CFX_PSTemplate& operator*=(BaseType factor) { + x *= factor; + y *= factor; + return *this; + } + CFX_PSTemplate& operator/=(BaseType divisor) { + x /= divisor; + y /= divisor; + return *this; + } + CFX_PSTemplate operator+(const CFX_PSTemplate& other) { + return CFX_PSTemplate(x + other.x, y + other.y); + } + CFX_PSTemplate operator-(const CFX_PSTemplate& other) { + return CFX_PSTemplate(x - other.x, y - other.y); + } + CFX_PSTemplate operator*(BaseType factor) { + return CFX_PSTemplate(x * factor, y * factor); + } + CFX_PSTemplate operator/(BaseType divisor) { + return CFX_PSTemplate(x / divisor, y / divisor); + } + + BaseType x; + BaseType y; +}; +typedef CFX_PSTemplate CFX_Point; +typedef CFX_PSTemplate CFX_PointF; +typedef CFX_PSTemplate CFX_Size; +typedef CFX_PSTemplate CFX_SizeF; +typedef CFX_ArrayTemplate CFX_Points; +typedef CFX_ArrayTemplate CFX_PointsF; + +template +class CFX_VTemplate : public CFX_PSTemplate { + public: + using CFX_PSTemplate::x; + using CFX_PSTemplate::y; + + CFX_VTemplate() : CFX_PSTemplate() {} + CFX_VTemplate(BaseType new_x, BaseType new_y) + : CFX_PSTemplate(new_x, new_y) {} + + CFX_VTemplate(const CFX_VTemplate& other) : CFX_PSTemplate(other) {} + + CFX_VTemplate(const CFX_PSTemplate& point1, + const CFX_PSTemplate& point2) + : CFX_PSTemplate(point2.x - point1.x, point2.y - point1.y) {} + + FX_FLOAT Length() const { return FXSYS_sqrt(x * x + y * y); } + void Normalize() { + FX_FLOAT fLen = Length(); + if (fLen < 0.0001f) + return; + + x /= fLen; + y /= fLen; + } + void Translate(BaseType dx, BaseType dy) { + x += dx; + y += dy; + } + void Scale(BaseType sx, BaseType sy) { + x *= sx; + y *= sy; + } + void Rotate(FX_FLOAT fRadian) { + FX_FLOAT cosValue = FXSYS_cos(fRadian); + FX_FLOAT sinValue = FXSYS_sin(fRadian); + x = x * cosValue - y * sinValue; + y = x * sinValue + y * cosValue; + } +}; +typedef CFX_VTemplate CFX_Vector; +typedef CFX_VTemplate CFX_VectorF; + +// Rectangles. +// TODO(tsepez): Consolidate all these different rectangle classes. + +// LTRB rectangles (y-axis runs downwards). +struct FX_RECT { + FX_RECT() : left(0), top(0), right(0), bottom(0) {} + + FX_RECT(int l, int t, int r, int b) : left(l), top(t), right(r), bottom(b) {} + + int Width() const { return right - left; } + int Height() const { return bottom - top; } + bool IsEmpty() const { return right <= left || bottom <= top; } + + bool Valid() const { + pdfium::base::CheckedNumeric w = right; + pdfium::base::CheckedNumeric h = bottom; + w -= left; + h -= top; + return w.IsValid() && h.IsValid(); + } + + void Normalize(); + + void Intersect(const FX_RECT& src); + void Intersect(int l, int t, int r, int b) { Intersect(FX_RECT(l, t, r, b)); } + + void Union(const FX_RECT& other_rect); + void Union(int l, int t, int r, int b) { Union(FX_RECT(l, t, r, b)); } + + void Offset(int dx, int dy) { + left += dx; + right += dx; + top += dy; + bottom += dy; + } + + bool operator==(const FX_RECT& src) const { + return left == src.left && right == src.right && top == src.top && + bottom == src.bottom; + } + + bool Contains(const FX_RECT& other_rect) const { + return other_rect.left >= left && other_rect.right <= right && + other_rect.top >= top && other_rect.bottom <= bottom; + } + + bool Contains(int x, int y) const { + return x >= left && x < right && y >= top && y < bottom; + } + + int32_t left; + int32_t top; + int32_t right; + int32_t bottom; +}; + +// LBRT rectangles (y-axis runs upwards). +class CFX_FloatPoint { + public: + CFX_FloatPoint() : x(0.0f), y(0.0f) {} + CFX_FloatPoint(FX_FLOAT xx, FX_FLOAT yy) : x(xx), y(yy) {} + + bool operator==(const CFX_FloatPoint& that) const { + return x == that.x && y == that.y; + } + bool operator!=(const CFX_FloatPoint& that) const { return !(*this == that); } + + FX_FLOAT x; + FX_FLOAT y; +}; + +// LTWH rectangles (y-axis runs downwards). +template +class CFX_RTemplate { + public: + typedef CFX_PSTemplate FXT_POINT; + typedef CFX_PSTemplate FXT_SIZE; + typedef CFX_VTemplate FXT_VECTOR; + typedef CFX_RTemplate FXT_RECT; + void Set(baseType dst_left, + baseType dst_top, + baseType dst_width, + baseType dst_height) { + left = dst_left; + top = dst_top; + width = dst_width; + height = dst_height; + } + void Set(baseType dst_left, baseType dst_top, const FXT_SIZE& dst_size) { + left = dst_left; + top = dst_top; + Size(dst_size); + } + void Set(const FXT_POINT& p, baseType dst_width, baseType dst_height) { + TopLeft(p); + width = dst_width; + height = dst_height; + } + void Set(const FXT_POINT& p1, const FXT_POINT& p2) { + TopLeft(p1); + width = p2.x - p1.x; + height = p2.y - p1.y; + Normalize(); + } + void Set(const FXT_POINT& p, const FXT_VECTOR& v) { + TopLeft(p); + width = v.x; + height = v.y; + Normalize(); + } + void Reset() { + left = 0; + top = 0; + width = 0; + height = 0; + } + FXT_RECT& operator+=(const FXT_POINT& p) { + left += p.x; + top += p.y; + return *this; + } + FXT_RECT& operator-=(const FXT_POINT& p) { + left -= p.x; + top -= p.y; + return *this; + } + baseType right() const { return left + width; } + baseType bottom() const { return top + height; } + void Normalize() { + if (width < 0) { + left += width; + width = -width; + } + if (height < 0) { + top += height; + height = -height; + } + } + void Offset(baseType dx, baseType dy) { + left += dx; + top += dy; + } + void Inflate(baseType x, baseType y) { + left -= x; + width += x * 2; + top -= y; + height += y * 2; + } + void Inflate(const FXT_POINT& p) { Inflate(p.x, p.y); } + void Inflate(baseType off_left, + baseType off_top, + baseType off_right, + baseType off_bottom) { + left -= off_left; + top -= off_top; + width += off_left + off_right; + height += off_top + off_bottom; + } + void Inflate(const FXT_RECT& rt) { + Inflate(rt.left, rt.top, rt.left + rt.width, rt.top + rt.height); + } + void Deflate(baseType x, baseType y) { + left += x; + width -= x * 2; + top += y; + height -= y * 2; + } + void Deflate(const FXT_POINT& p) { Deflate(p.x, p.y); } + void Deflate(baseType off_left, + baseType off_top, + baseType off_right, + baseType off_bottom) { + left += off_left; + top += off_top; + width -= off_left + off_right; + height -= off_top + off_bottom; + } + void Deflate(const FXT_RECT& rt) { + Deflate(rt.left, rt.top, rt.top + rt.width, rt.top + rt.height); + } + FX_BOOL IsEmpty() const { return width <= 0 || height <= 0; } + FX_BOOL IsEmpty(FX_FLOAT fEpsilon) const { + return width <= fEpsilon || height <= fEpsilon; + } + void Empty() { width = height = 0; } + bool Contains(baseType x, baseType y) const { + return x >= left && x < left + width && y >= top && y < top + height; + } + bool Contains(const FXT_POINT& p) const { return Contains(p.x, p.y); } + bool Contains(const FXT_RECT& rt) const { + return rt.left >= left && rt.right() <= right() && rt.top >= top && + rt.bottom() <= bottom(); + } + baseType Width() const { return width; } + baseType Height() const { return height; } + FXT_SIZE Size() const { + FXT_SIZE size; + size.Set(width, height); + return size; + } + void Size(FXT_SIZE s) { width = s.x, height = s.y; } + FXT_POINT TopLeft() const { + FXT_POINT p; + p.x = left; + p.y = top; + return p; + } + FXT_POINT TopRight() const { + FXT_POINT p; + p.x = left + width; + p.y = top; + return p; + } + FXT_POINT BottomLeft() const { + FXT_POINT p; + p.x = left; + p.y = top + height; + return p; + } + FXT_POINT BottomRight() const { + FXT_POINT p; + p.x = left + width; + p.y = top + height; + return p; + } + void TopLeft(FXT_POINT tl) { + left = tl.x; + top = tl.y; + } + void TopRight(FXT_POINT tr) { + width = tr.x - left; + top = tr.y; + } + void BottomLeft(FXT_POINT bl) { + left = bl.x; + height = bl.y - top; + } + void BottomRight(FXT_POINT br) { + width = br.x - left; + height = br.y - top; + } + FXT_POINT Center() const { + FXT_POINT p; + p.x = left + width / 2; + p.y = top + height / 2; + return p; + } + void Union(baseType x, baseType y) { + baseType r = right(); + baseType b = bottom(); + if (left > x) + left = x; + if (r < x) + r = x; + if (top > y) + top = y; + if (b < y) + b = y; + width = r - left; + height = b - top; + } + void Union(const FXT_POINT& p) { Union(p.x, p.y); } + void Union(const FXT_RECT& rt) { + baseType r = right(); + baseType b = bottom(); + if (left > rt.left) + left = rt.left; + if (r < rt.right()) + r = rt.right(); + if (top > rt.top) + top = rt.top; + if (b < rt.bottom()) + b = rt.bottom(); + width = r - left; + height = b - top; + } + void Intersect(const FXT_RECT& rt) { + baseType r = right(); + baseType b = bottom(); + if (left < rt.left) + left = rt.left; + if (r > rt.right()) + r = rt.right(); + if (top < rt.top) + top = rt.top; + if (b > rt.bottom()) + b = rt.bottom(); + width = r - left; + height = b - top; + } + FX_BOOL IntersectWith(const FXT_RECT& rt) const { + FXT_RECT rect = rt; + rect.Intersect(*this); + return !rect.IsEmpty(); + } + FX_BOOL IntersectWith(const FXT_RECT& rt, FX_FLOAT fEpsilon) const { + FXT_RECT rect = rt; + rect.Intersect(*this); + return !rect.IsEmpty(fEpsilon); + } + friend bool operator==(const FXT_RECT& rc1, const FXT_RECT& rc2) { + return rc1.left == rc2.left && rc1.top == rc2.top && + rc1.width == rc2.width && rc1.height == rc2.height; + } + friend bool operator!=(const FXT_RECT& rc1, const FXT_RECT& rc2) { + return !(rc1 == rc2); + } + baseType left, top; + baseType width, height; +}; +typedef CFX_RTemplate CFX_Rect; +typedef CFX_RTemplate CFX_RectF; +typedef CFX_ArrayTemplate CFX_RectFArray; + +class CFX_FloatRect { + public: + CFX_FloatRect() : CFX_FloatRect(0.0f, 0.0f, 0.0f, 0.0f) {} + CFX_FloatRect(FX_FLOAT l, FX_FLOAT b, FX_FLOAT r, FX_FLOAT t) + : left(l), bottom(b), right(r), top(t) {} + + explicit CFX_FloatRect(const FX_FLOAT* pArray) + : CFX_FloatRect(pArray[0], pArray[1], pArray[2], pArray[3]) {} + + explicit CFX_FloatRect(const FX_RECT& rect); + + void Normalize(); + + void Reset() { + left = 0.0f; + right = 0.0f; + bottom = 0.0f; + top = 0.0f; + } + + bool IsEmpty() const { return left >= right || bottom >= top; } + bool Contains(const CFX_FloatRect& other_rect) const; + bool Contains(FX_FLOAT x, FX_FLOAT y) const; + + void Transform(const CFX_Matrix* pMatrix); + void Intersect(const CFX_FloatRect& other_rect); + void Union(const CFX_FloatRect& other_rect); + + FX_RECT GetInnerRect() const; + FX_RECT GetOuterRect() const; + FX_RECT GetClosestRect() const; + + int Substract4(CFX_FloatRect& substract_rect, CFX_FloatRect* pRects); + + void InitRect(FX_FLOAT x, FX_FLOAT y) { + left = x; + right = x; + bottom = y; + top = y; + } + void UpdateRect(FX_FLOAT x, FX_FLOAT y); + + FX_FLOAT Width() const { return right - left; } + FX_FLOAT Height() const { return top - bottom; } + + void Inflate(FX_FLOAT x, FX_FLOAT y) { + Normalize(); + left -= x; + right += x; + bottom -= y; + top += y; + } + + void Inflate(FX_FLOAT other_left, + FX_FLOAT other_bottom, + FX_FLOAT other_right, + FX_FLOAT other_top) { + Normalize(); + left -= other_left; + bottom -= other_bottom; + right += other_right; + top += other_top; + } + + void Inflate(const CFX_FloatRect& rt) { + Inflate(rt.left, rt.bottom, rt.right, rt.top); + } + + void Deflate(FX_FLOAT x, FX_FLOAT y) { + Normalize(); + left += x; + right -= x; + bottom += y; + top -= y; + } + + void Deflate(FX_FLOAT other_left, + FX_FLOAT other_bottom, + FX_FLOAT other_right, + FX_FLOAT other_top) { + Normalize(); + left += other_left; + bottom += other_bottom; + right -= other_right; + top -= other_top; + } + + void Deflate(const CFX_FloatRect& rt) { + Deflate(rt.left, rt.bottom, rt.right, rt.top); + } + + void Translate(FX_FLOAT e, FX_FLOAT f) { + left += e; + right += e; + top += f; + bottom += f; + } + + static CFX_FloatRect GetBBox(const CFX_PointF* pPoints, int nPoints); + + FX_RECT ToFxRect() const { + return FX_RECT(static_cast(left), static_cast(top), + static_cast(right), static_cast(bottom)); + } + + static CFX_FloatRect FromCFXRectF(const CFX_RectF& rect) { + return CFX_FloatRect(rect.left, rect.top, rect.right(), rect.bottom()); + } + + FX_FLOAT left; + FX_FLOAT bottom; + FX_FLOAT right; + FX_FLOAT top; +}; + +class CFX_Matrix { + public: + CFX_Matrix() { SetIdentity(); } + + CFX_Matrix(FX_FLOAT a1, + FX_FLOAT b1, + FX_FLOAT c1, + FX_FLOAT d1, + FX_FLOAT e1, + FX_FLOAT f1) { + a = a1; + b = b1; + c = c1; + d = d1; + e = e1; + f = f1; + } + + void Set(FX_FLOAT a, + FX_FLOAT b, + FX_FLOAT c, + FX_FLOAT d, + FX_FLOAT e, + FX_FLOAT f); + void Set(const FX_FLOAT n[6]); + + void SetIdentity() { + a = d = 1; + b = c = e = f = 0; + } + + void SetReverse(const CFX_Matrix& m); + + void Concat(FX_FLOAT a, + FX_FLOAT b, + FX_FLOAT c, + FX_FLOAT d, + FX_FLOAT e, + FX_FLOAT f, + FX_BOOL bPrepended = FALSE); + void Concat(const CFX_Matrix& m, FX_BOOL bPrepended = FALSE); + void ConcatInverse(const CFX_Matrix& m, FX_BOOL bPrepended = FALSE); + + FX_BOOL IsIdentity() const { + return a == 1 && b == 0 && c == 0 && d == 1 && e == 0 && f == 0; + } + + FX_BOOL IsInvertible() const; + FX_BOOL Is90Rotated() const; + FX_BOOL IsScaled() const; + + void Translate(FX_FLOAT x, FX_FLOAT y, FX_BOOL bPrepended = FALSE); + void TranslateI(int32_t x, int32_t y, FX_BOOL bPrepended = FALSE) { + Translate((FX_FLOAT)x, (FX_FLOAT)y, bPrepended); + } + + void Scale(FX_FLOAT sx, FX_FLOAT sy, FX_BOOL bPrepended = FALSE); + void Rotate(FX_FLOAT fRadian, FX_BOOL bPrepended = FALSE); + void RotateAt(FX_FLOAT fRadian, + FX_FLOAT x, + FX_FLOAT y, + FX_BOOL bPrepended = FALSE); + + void Shear(FX_FLOAT fAlphaRadian, + FX_FLOAT fBetaRadian, + FX_BOOL bPrepended = FALSE); + + void MatchRect(const CFX_FloatRect& dest, const CFX_FloatRect& src); + FX_FLOAT GetXUnit() const; + FX_FLOAT GetYUnit() const; + void GetUnitRect(CFX_RectF& rect) const; + CFX_FloatRect GetUnitRect() const; + + FX_FLOAT GetUnitArea() const; + FX_FLOAT TransformXDistance(FX_FLOAT dx) const; + int32_t TransformXDistance(int32_t dx) const; + FX_FLOAT TransformYDistance(FX_FLOAT dy) const; + int32_t TransformYDistance(int32_t dy) const; + FX_FLOAT TransformDistance(FX_FLOAT dx, FX_FLOAT dy) const; + int32_t TransformDistance(int32_t dx, int32_t dy) const; + FX_FLOAT TransformDistance(FX_FLOAT distance) const; + + void TransformPoint(FX_FLOAT& x, FX_FLOAT& y) const; + void TransformPoint(int32_t& x, int32_t& y) const; + + void Transform(FX_FLOAT& x, FX_FLOAT& y) const { TransformPoint(x, y); } + void Transform(FX_FLOAT x, FX_FLOAT y, FX_FLOAT& x1, FX_FLOAT& y1) const { + x1 = x, y1 = y; + TransformPoint(x1, y1); + } + + void TransformVector(CFX_VectorF& v) const; + void TransformVector(CFX_Vector& v) const; + void TransformRect(CFX_RectF& rect) const; + void TransformRect(CFX_Rect& rect) const; + void TransformRect(FX_FLOAT& left, + FX_FLOAT& right, + FX_FLOAT& top, + FX_FLOAT& bottom) const; + void TransformRect(CFX_FloatRect& rect) const { + TransformRect(rect.left, rect.right, rect.top, rect.bottom); + } + + FX_FLOAT GetA() const { return a; } + FX_FLOAT GetB() const { return b; } + FX_FLOAT GetC() const { return c; } + FX_FLOAT GetD() const { return d; } + FX_FLOAT GetE() const { return e; } + FX_FLOAT GetF() const { return f; } + + public: + FX_FLOAT a; + FX_FLOAT b; + FX_FLOAT c; + FX_FLOAT d; + FX_FLOAT e; + FX_FLOAT f; +}; + +#endif // CORE_FXCRT_FX_COORDINATES_H_ diff --git a/core/fxcrt/fx_ext.h b/core/fxcrt/fx_ext.h new file mode 100644 index 0000000000..959a26bf44 --- /dev/null +++ b/core/fxcrt/fx_ext.h @@ -0,0 +1,130 @@ +// Copyright 2014 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FXCRT_FX_EXT_H_ +#define CORE_FXCRT_FX_EXT_H_ + +#include +#include + +#include "core/fxcrt/fx_basic.h" + +#define FX_INVALID_OFFSET static_cast(-1) + +// TODO(thestig) Using unique_ptr with ReleaseDeleter is still not ideal. +// Come up or wait for something better. This appears in this file rather +// than fx_stream.h due to include ordering restrictions. +using ScopedFileStream = + std::unique_ptr>; + +FX_FLOAT FXSYS_tan(FX_FLOAT a); +FX_FLOAT FXSYS_logb(FX_FLOAT b, FX_FLOAT x); +FX_FLOAT FXSYS_strtof(const FX_CHAR* pcsStr, + int32_t iLength = -1, + int32_t* pUsedLen = nullptr); +FX_FLOAT FXSYS_wcstof(const FX_WCHAR* pwsStr, + int32_t iLength = -1, + int32_t* pUsedLen = nullptr); +FX_WCHAR* FXSYS_wcsncpy(FX_WCHAR* dstStr, const FX_WCHAR* srcStr, size_t count); +int32_t FXSYS_wcsnicmp(const FX_WCHAR* s1, const FX_WCHAR* s2, size_t count); +int32_t FXSYS_strnicmp(const FX_CHAR* s1, const FX_CHAR* s2, size_t count); + +inline bool FXSYS_islower(int32_t ch) { + return ch >= 'a' && ch <= 'z'; +} +inline bool FXSYS_isupper(int32_t ch) { + return ch >= 'A' && ch <= 'Z'; +} +inline int32_t FXSYS_tolower(int32_t ch) { + return ch < 'A' || ch > 'Z' ? ch : (ch + 0x20); +} +inline int32_t FXSYS_toupper(int32_t ch) { + return ch < 'a' || ch > 'z' ? ch : (ch - 0x20); +} +inline bool FXSYS_iswalpha(wchar_t wch) { + return (wch >= L'A' && wch <= L'Z') || (wch >= L'a' && wch <= L'z'); +} +inline bool FXSYS_iswdigit(wchar_t wch) { + return wch >= L'0' && wch <= L'9'; +} +inline bool FXSYS_iswalnum(wchar_t wch) { + return FXSYS_iswalpha(wch) || FXSYS_iswdigit(wch); +} +inline bool FXSYS_iswspace(FX_WCHAR c) { + return (c == 0x20) || (c == 0x0d) || (c == 0x0a) || (c == 0x09); +} + +inline int FXSYS_toHexDigit(const FX_CHAR c) { + if (!std::isxdigit(c)) + return 0; + char upchar = std::toupper(c); + return upchar > '9' ? upchar - 'A' + 10 : upchar - '0'; +} + +inline bool FXSYS_isDecimalDigit(const FX_CHAR c) { + return !!std::isdigit(c); +} + +inline bool FXSYS_isDecimalDigit(const FX_WCHAR c) { + return !!std::iswdigit(c); +} + +inline int FXSYS_toDecimalDigit(const FX_CHAR c) { + return std::isdigit(c) ? c - '0' : 0; +} + +inline int FXSYS_toDecimalDigit(const FX_WCHAR c) { + return std::iswdigit(c) ? c - L'0' : 0; +} + +FX_FLOAT FXSYS_FractionalScale(size_t scale_factor, int value); +int FXSYS_FractionalScaleCount(); + +void* FX_Random_MT_Start(uint32_t dwSeed); +void FX_Random_MT_Close(void* pContext); +uint32_t FX_Random_MT_Generate(void* pContext); +void FX_Random_GenerateBase(uint32_t* pBuffer, int32_t iCount); +void FX_Random_GenerateMT(uint32_t* pBuffer, int32_t iCount); +void FX_Random_GenerateCrypto(uint32_t* pBuffer, int32_t iCount); + +#ifdef PDF_ENABLE_XFA +typedef struct FX_GUID { + uint32_t data1; + uint16_t data2; + uint16_t data3; + uint8_t data4[8]; +} FX_GUID, *FX_LPGUID; +typedef FX_GUID const* FX_LPCGUID; +void FX_GUID_CreateV4(FX_LPGUID pGUID); +void FX_GUID_ToString(FX_LPCGUID pGUID, + CFX_ByteString& bsStr, + FX_BOOL bSeparator = TRUE); +#endif // PDF_ENABLE_XFA + +template +class CFX_SSortTemplate { + public: + void ShellSort(baseType* pArray, int32_t iCount) { + ASSERT(pArray && iCount > 0); + int32_t i, j, gap; + baseType v1, v2; + gap = iCount >> 1; + while (gap > 0) { + for (i = gap; i < iCount; i++) { + j = i - gap; + v1 = pArray[i]; + while (j > -1 && (v2 = pArray[j]) > v1) { + pArray[j + gap] = v2; + j -= gap; + } + pArray[j + gap] = v1; + } + gap >>= 1; + } + } +}; + +#endif // CORE_FXCRT_FX_EXT_H_ diff --git a/core/fxcrt/fx_extension.cpp b/core/fxcrt/fx_extension.cpp index 4c77244b3d..ca6b6d4066 100644 --- a/core/fxcrt/fx_extension.cpp +++ b/core/fxcrt/fx_extension.cpp @@ -7,8 +7,8 @@ #include #include "core/fxcrt/extension.h" -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_ext.h" #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ #include diff --git a/core/fxcrt/fx_extension_unittest.cpp b/core/fxcrt/fx_extension_unittest.cpp index 954e0956ed..3739a3db8c 100644 --- a/core/fxcrt/fx_extension_unittest.cpp +++ b/core/fxcrt/fx_extension_unittest.cpp @@ -4,7 +4,7 @@ #include "testing/gtest/include/gtest/gtest.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" TEST(fxcrt, FXSYS_toHexDigit) { EXPECT_EQ(10, FXSYS_toHexDigit('a')); diff --git a/core/fxcrt/fx_memory.h b/core/fxcrt/fx_memory.h new file mode 100644 index 0000000000..beb194fbda --- /dev/null +++ b/core/fxcrt/fx_memory.h @@ -0,0 +1,112 @@ +// Copyright 2014 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FXCRT_FX_MEMORY_H_ +#define CORE_FXCRT_FX_MEMORY_H_ + +#include "core/fxcrt/fx_system.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// For external C libraries to malloc through PDFium. These may return nullptr. +void* FXMEM_DefaultAlloc(size_t byte_size, int flags); +void* FXMEM_DefaultRealloc(void* pointer, size_t new_size, int flags); +void FXMEM_DefaultFree(void* pointer, int flags); + +#ifdef __cplusplus +} // extern "C" + +#include +#include +#include +#include + +NEVER_INLINE void FX_OutOfMemoryTerminate(); + +inline void* FX_SafeRealloc(void* ptr, size_t num_members, size_t member_size) { + if (num_members < std::numeric_limits::max() / member_size) { + return realloc(ptr, num_members * member_size); + } + return nullptr; +} + +inline void* FX_AllocOrDie(size_t num_members, size_t member_size) { + // TODO(tsepez): See if we can avoid the implicit memset(0). + if (void* result = calloc(num_members, member_size)) { + return result; + } + FX_OutOfMemoryTerminate(); // Never returns. + return nullptr; // Suppress compiler warning. +} + +inline void* FX_AllocOrDie2D(size_t w, size_t h, size_t member_size) { + if (w < std::numeric_limits::max() / h) { + return FX_AllocOrDie(w * h, member_size); + } + FX_OutOfMemoryTerminate(); // Never returns. + return nullptr; // Suppress compiler warning. +} + +inline void* FX_ReallocOrDie(void* ptr, + size_t num_members, + size_t member_size) { + if (void* result = FX_SafeRealloc(ptr, num_members, member_size)) { + return result; + } + FX_OutOfMemoryTerminate(); // Never returns. + return nullptr; // Suppress compiler warning. +} + +// Never returns nullptr. +#define FX_Alloc(type, size) (type*)FX_AllocOrDie(size, sizeof(type)) +#define FX_Alloc2D(type, w, h) (type*)FX_AllocOrDie2D(w, h, sizeof(type)) +#define FX_Realloc(type, ptr, size) \ + (type*)FX_ReallocOrDie(ptr, size, sizeof(type)) + +// May return nullptr. +#define FX_TryAlloc(type, size) (type*)calloc(size, sizeof(type)) +#define FX_TryRealloc(type, ptr, size) \ + (type*)FX_SafeRealloc(ptr, size, sizeof(type)) + +#define FX_Free(ptr) free(ptr) + +// The FX_ArraySize(arr) macro returns the # of elements in an array arr. +// The expression is a compile-time constant, and therefore can be +// used in defining new arrays, for example. If you use FX_ArraySize on +// a pointer by mistake, you will get a compile-time error. +// +// One caveat is that FX_ArraySize() doesn't accept any array of an +// anonymous type or a type defined inside a function. +#define FX_ArraySize(array) (sizeof(ArraySizeHelper(array))) + +// This template function declaration is used in defining FX_ArraySize. +// Note that the function doesn't need an implementation, as we only +// use its type. +template +char (&ArraySizeHelper(T (&array)[N]))[N]; + +// Used with std::unique_ptr to FX_Free raw memory. +struct FxFreeDeleter { + inline void operator()(void* ptr) const { FX_Free(ptr); } +}; + +// Used with std::unique_ptr to Release() objects that can't be deleted. +template +struct ReleaseDeleter { + inline void operator()(T* ptr) const { ptr->Release(); } +}; + +// Used to help transfer ownership of a raw pointer to std::unique_ptr. +template +std::unique_ptr WrapUnique(T* ptr) { + return std::unique_ptr(ptr); +} + +#endif // __cplusplus + +#endif // CORE_FXCRT_FX_MEMORY_H_ diff --git a/core/fxcrt/fx_safe_types.h b/core/fxcrt/fx_safe_types.h new file mode 100644 index 0000000000..66dbc57681 --- /dev/null +++ b/core/fxcrt/fx_safe_types.h @@ -0,0 +1,20 @@ +// Copyright 2014 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CORE_FXCRT_FX_SAFE_TYPES_H_ +#define CORE_FXCRT_FX_SAFE_TYPES_H_ + +#include // For size_t. + +#include "core/fxcrt/fx_stream.h" // for FX_FILESIZE. +#include "core/fxcrt/fx_system.h" +#include "third_party/base/numerics/safe_math.h" + +typedef pdfium::base::CheckedNumeric FX_SAFE_UINT32; +typedef pdfium::base::CheckedNumeric FX_SAFE_INT32; +typedef pdfium::base::CheckedNumeric FX_SAFE_SIZE_T; +typedef pdfium::base::CheckedNumeric FX_SAFE_FILESIZE; +typedef pdfium::base::CheckedNumeric FX_SAFE_STRSIZE; + +#endif // CORE_FXCRT_FX_SAFE_TYPES_H_ diff --git a/core/fxcrt/fx_stream.h b/core/fxcrt/fx_stream.h new file mode 100644 index 0000000000..5a5a650650 --- /dev/null +++ b/core/fxcrt/fx_stream.h @@ -0,0 +1,162 @@ +// Copyright 2014 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FXCRT_FX_STREAM_H_ +#define CORE_FXCRT_FX_STREAM_H_ + +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" + +void* FX_OpenFolder(const FX_CHAR* path); +void* FX_OpenFolder(const FX_WCHAR* path); +FX_BOOL FX_GetNextFile(void* handle, + CFX_ByteString& filename, + FX_BOOL& bFolder); +FX_BOOL FX_GetNextFile(void* handle, + CFX_WideString& filename, + FX_BOOL& bFolder); +void FX_CloseFolder(void* handle); +FX_WCHAR FX_GetFolderSeparator(); + +#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ +#define FX_FILESIZE int32_t +#else +#include +#include +#include + +#ifndef O_BINARY +#define O_BINARY 0 +#endif // O_BINARY + +#ifndef O_LARGEFILE +#define O_LARGEFILE 0 +#endif // O_LARGEFILE + +#define FX_FILESIZE off_t +#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ + +#define FX_GETBYTEOFFSET32(a) 0 +#define FX_GETBYTEOFFSET40(a) 0 +#define FX_GETBYTEOFFSET48(a) 0 +#define FX_GETBYTEOFFSET56(a) 0 +#define FX_GETBYTEOFFSET24(a) ((uint8_t)(a >> 24)) +#define FX_GETBYTEOFFSET16(a) ((uint8_t)(a >> 16)) +#define FX_GETBYTEOFFSET8(a) ((uint8_t)(a >> 8)) +#define FX_GETBYTEOFFSET0(a) ((uint8_t)(a)) +#define FX_FILEMODE_Write 0 +#define FX_FILEMODE_ReadOnly 1 +#define FX_FILEMODE_Truncate 2 + +class IFX_StreamWrite { + public: + virtual ~IFX_StreamWrite() {} + virtual void Release() = 0; + virtual FX_BOOL WriteBlock(const void* pData, size_t size) = 0; +}; + +class IFX_FileWrite : public IFX_StreamWrite { + public: + // IFX_StreamWrite: + FX_BOOL WriteBlock(const void* pData, size_t size) override; + virtual FX_FILESIZE GetSize() = 0; + virtual FX_BOOL Flush() = 0; + virtual FX_BOOL WriteBlock(const void* pData, + FX_FILESIZE offset, + size_t size) = 0; +}; + +class IFX_StreamRead { + public: + virtual ~IFX_StreamRead() {} + + virtual void Release() = 0; + virtual FX_BOOL IsEOF() = 0; + virtual FX_FILESIZE GetPosition() = 0; + virtual size_t ReadBlock(void* buffer, size_t size) = 0; +}; + +class IFX_FileRead : public IFX_StreamRead { + public: + // IFX_StreamRead: + void Release() override = 0; + FX_BOOL IsEOF() override; + FX_FILESIZE GetPosition() override; + size_t ReadBlock(void* buffer, size_t size) override; + + virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) = 0; + virtual FX_FILESIZE GetSize() = 0; +}; + +IFX_FileRead* FX_CreateFileRead(const FX_CHAR* filename); +IFX_FileRead* FX_CreateFileRead(const FX_WCHAR* filename); + +class IFX_FileStream : public IFX_FileRead, public IFX_FileWrite { + public: + virtual IFX_FileStream* Retain() = 0; + + // IFX_FileRead: + void Release() override = 0; + FX_BOOL IsEOF() override = 0; + FX_FILESIZE GetPosition() override = 0; + size_t ReadBlock(void* buffer, size_t size) override = 0; + FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override = 0; + FX_FILESIZE GetSize() override = 0; + + // IFX_FileWrite: + FX_BOOL WriteBlock(const void* buffer, + FX_FILESIZE offset, + size_t size) override = 0; + FX_BOOL WriteBlock(const void* buffer, size_t size) override; + FX_BOOL Flush() override = 0; +}; + +IFX_FileStream* FX_CreateFileStream(const FX_CHAR* filename, uint32_t dwModes); +IFX_FileStream* FX_CreateFileStream(const FX_WCHAR* filename, uint32_t dwModes); + +#ifdef PDF_ENABLE_XFA +class IFX_FileAccess { + public: + virtual ~IFX_FileAccess() {} + virtual void Release() = 0; + virtual IFX_FileAccess* Retain() = 0; + virtual void GetPath(CFX_WideString& wsPath) = 0; + virtual IFX_FileStream* CreateFileStream(uint32_t dwModes) = 0; +}; +IFX_FileAccess* FX_CreateDefaultFileAccess(const CFX_WideStringC& wsPath); +#endif // PDF_ENABLE_XFA + +class IFX_MemoryStream : public IFX_FileStream { + public: + virtual FX_BOOL IsConsecutive() const = 0; + virtual void EstimateSize(size_t nInitSize, size_t nGrowSize) = 0; + virtual uint8_t* GetBuffer() const = 0; + virtual void AttachBuffer(uint8_t* pBuffer, + size_t nSize, + FX_BOOL bTakeOver = FALSE) = 0; + virtual void DetachBuffer() = 0; +}; + +IFX_MemoryStream* FX_CreateMemoryStream(uint8_t* pBuffer, + size_t nSize, + FX_BOOL bTakeOver = FALSE); +IFX_MemoryStream* FX_CreateMemoryStream(FX_BOOL bConsecutive = FALSE); + +class IFX_BufferRead : public IFX_StreamRead { + public: + // IFX_StreamRead: + void Release() override = 0; + FX_BOOL IsEOF() override = 0; + FX_FILESIZE GetPosition() override = 0; + size_t ReadBlock(void* buffer, size_t size) override = 0; + + virtual FX_BOOL ReadNextBlock(FX_BOOL bRestart = FALSE) = 0; + virtual const uint8_t* GetBlockBuffer() = 0; + virtual size_t GetBlockSize() = 0; + virtual FX_FILESIZE GetBlockOffset() = 0; +}; + +#endif // CORE_FXCRT_FX_STREAM_H_ diff --git a/core/fxcrt/fx_string.h b/core/fxcrt/fx_string.h new file mode 100644 index 0000000000..0b6d8064d4 --- /dev/null +++ b/core/fxcrt/fx_string.h @@ -0,0 +1,464 @@ +// Copyright 2014 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FXCRT_FX_STRING_H_ +#define CORE_FXCRT_FX_STRING_H_ + +#include // For intptr_t. + +#include +#include + +#include "core/fxcrt/cfx_retain_ptr.h" +#include "core/fxcrt/cfx_string_c_template.h" +#include "core/fxcrt/cfx_string_data_template.h" +#include "core/fxcrt/fx_memory.h" +#include "core/fxcrt/fx_system.h" + +class CFX_ByteString; +class CFX_WideString; + +using CFX_ByteStringC = CFX_StringCTemplate; +using CFX_WideStringC = CFX_StringCTemplate; + +#define FXBSTR_ID(c1, c2, c3, c4) \ + (((uint32_t)c1 << 24) | ((uint32_t)c2 << 16) | ((uint32_t)c3 << 8) | \ + ((uint32_t)c4)) + +#define FX_WSTRC(wstr) CFX_WideStringC(wstr, FX_ArraySize(wstr) - 1) + +// A mutable string with shared buffers using copy-on-write semantics that +// avoids the cost of std::string's iterator stability guarantees. +class CFX_ByteString { + public: + using CharType = FX_CHAR; + + CFX_ByteString(); + CFX_ByteString(const CFX_ByteString& other); + CFX_ByteString(CFX_ByteString&& other); + + // Deliberately implicit to avoid calling on every string literal. + CFX_ByteString(char ch); + CFX_ByteString(const FX_CHAR* ptr); + + CFX_ByteString(const FX_CHAR* ptr, FX_STRSIZE len); + CFX_ByteString(const uint8_t* ptr, FX_STRSIZE len); + + explicit CFX_ByteString(const CFX_ByteStringC& bstrc); + CFX_ByteString(const CFX_ByteStringC& bstrc1, const CFX_ByteStringC& bstrc2); + + ~CFX_ByteString(); + + void clear() { m_pData.Reset(); } + + static CFX_ByteString FromUnicode(const FX_WCHAR* ptr, FX_STRSIZE len = -1); + static CFX_ByteString FromUnicode(const CFX_WideString& str); + + // Explicit conversion to C-style string. + // Note: Any subsequent modification of |this| will invalidate the result. + const FX_CHAR* c_str() const { return m_pData ? m_pData->m_String : ""; } + + // Explicit conversion to uint8_t*. + // Note: Any subsequent modification of |this| will invalidate the result. + const uint8_t* raw_str() const { + return m_pData ? reinterpret_cast(m_pData->m_String) + : nullptr; + } + + // Explicit conversion to CFX_ByteStringC. + // Note: Any subsequent modification of |this| will invalidate the result. + CFX_ByteStringC AsStringC() const { + return CFX_ByteStringC(raw_str(), GetLength()); + } + + FX_STRSIZE GetLength() const { return m_pData ? m_pData->m_nDataLength : 0; } + bool IsEmpty() const { return !GetLength(); } + + int Compare(const CFX_ByteStringC& str) const; + bool EqualNoCase(const CFX_ByteStringC& str) const; + + bool operator==(const char* ptr) const; + bool operator==(const CFX_ByteStringC& str) const; + bool operator==(const CFX_ByteString& other) const; + + bool operator!=(const char* ptr) const { return !(*this == ptr); } + bool operator!=(const CFX_ByteStringC& str) const { return !(*this == str); } + bool operator!=(const CFX_ByteString& other) const { + return !(*this == other); + } + + bool operator<(const CFX_ByteString& str) const; + + const CFX_ByteString& operator=(const FX_CHAR* str); + const CFX_ByteString& operator=(const CFX_ByteStringC& bstrc); + const CFX_ByteString& operator=(const CFX_ByteString& stringSrc); + + const CFX_ByteString& operator+=(FX_CHAR ch); + const CFX_ByteString& operator+=(const FX_CHAR* str); + const CFX_ByteString& operator+=(const CFX_ByteString& str); + const CFX_ByteString& operator+=(const CFX_ByteStringC& bstrc); + + uint8_t GetAt(FX_STRSIZE nIndex) const { + return m_pData ? m_pData->m_String[nIndex] : 0; + } + + uint8_t operator[](FX_STRSIZE nIndex) const { + return m_pData ? m_pData->m_String[nIndex] : 0; + } + + void SetAt(FX_STRSIZE nIndex, FX_CHAR ch); + FX_STRSIZE Insert(FX_STRSIZE index, FX_CHAR ch); + FX_STRSIZE Delete(FX_STRSIZE index, FX_STRSIZE count = 1); + + void Format(const FX_CHAR* lpszFormat, ...); + void FormatV(const FX_CHAR* lpszFormat, va_list argList); + + void Reserve(FX_STRSIZE len); + FX_CHAR* GetBuffer(FX_STRSIZE len); + void ReleaseBuffer(FX_STRSIZE len = -1); + + CFX_ByteString Mid(FX_STRSIZE first) const; + CFX_ByteString Mid(FX_STRSIZE first, FX_STRSIZE count) const; + CFX_ByteString Left(FX_STRSIZE count) const; + CFX_ByteString Right(FX_STRSIZE count) const; + + FX_STRSIZE Find(const CFX_ByteStringC& lpszSub, FX_STRSIZE start = 0) const; + FX_STRSIZE Find(FX_CHAR ch, FX_STRSIZE start = 0) const; + FX_STRSIZE ReverseFind(FX_CHAR ch) const; + + void MakeLower(); + void MakeUpper(); + + void TrimRight(); + void TrimRight(FX_CHAR chTarget); + void TrimRight(const CFX_ByteStringC& lpszTargets); + + void TrimLeft(); + void TrimLeft(FX_CHAR chTarget); + void TrimLeft(const CFX_ByteStringC& lpszTargets); + + FX_STRSIZE Replace(const CFX_ByteStringC& lpszOld, + const CFX_ByteStringC& lpszNew); + + FX_STRSIZE Remove(FX_CHAR ch); + + CFX_WideString UTF8Decode() const; + + uint32_t GetID(FX_STRSIZE start_pos = 0) const; + +#define FXFORMAT_SIGNED 1 +#define FXFORMAT_HEX 2 +#define FXFORMAT_CAPITAL 4 + + static CFX_ByteString FormatInteger(int i, uint32_t flags = 0); + static CFX_ByteString FormatFloat(FX_FLOAT f, int precision = 0); + + protected: + using StringData = CFX_StringDataTemplate; + + void ReallocBeforeWrite(FX_STRSIZE nNewLen); + void AllocBeforeWrite(FX_STRSIZE nNewLen); + void AllocCopy(CFX_ByteString& dest, + FX_STRSIZE nCopyLen, + FX_STRSIZE nCopyIndex) const; + void AssignCopy(const FX_CHAR* pSrcData, FX_STRSIZE nSrcLen); + void Concat(const FX_CHAR* lpszSrcData, FX_STRSIZE nSrcLen); + + CFX_RetainPtr m_pData; + + friend class fxcrt_ByteStringConcat_Test; + friend class fxcrt_ByteStringPool_Test; +}; + +inline bool operator==(const char* lhs, const CFX_ByteString& rhs) { + return rhs == lhs; +} +inline bool operator==(const CFX_ByteStringC& lhs, const CFX_ByteString& rhs) { + return rhs == lhs; +} +inline bool operator!=(const char* lhs, const CFX_ByteString& rhs) { + return rhs != lhs; +} +inline bool operator!=(const CFX_ByteStringC& lhs, const CFX_ByteString& rhs) { + return rhs != lhs; +} + +inline CFX_ByteString operator+(const CFX_ByteStringC& str1, + const CFX_ByteStringC& str2) { + return CFX_ByteString(str1, str2); +} +inline CFX_ByteString operator+(const CFX_ByteStringC& str1, + const FX_CHAR* str2) { + return CFX_ByteString(str1, str2); +} +inline CFX_ByteString operator+(const FX_CHAR* str1, + const CFX_ByteStringC& str2) { + return CFX_ByteString(str1, str2); +} +inline CFX_ByteString operator+(const CFX_ByteStringC& str1, FX_CHAR ch) { + return CFX_ByteString(str1, CFX_ByteStringC(ch)); +} +inline CFX_ByteString operator+(FX_CHAR ch, const CFX_ByteStringC& str2) { + return CFX_ByteString(ch, str2); +} +inline CFX_ByteString operator+(const CFX_ByteString& str1, + const CFX_ByteString& str2) { + return CFX_ByteString(str1.AsStringC(), str2.AsStringC()); +} +inline CFX_ByteString operator+(const CFX_ByteString& str1, FX_CHAR ch) { + return CFX_ByteString(str1.AsStringC(), CFX_ByteStringC(ch)); +} +inline CFX_ByteString operator+(FX_CHAR ch, const CFX_ByteString& str2) { + return CFX_ByteString(ch, str2.AsStringC()); +} +inline CFX_ByteString operator+(const CFX_ByteString& str1, + const FX_CHAR* str2) { + return CFX_ByteString(str1.AsStringC(), str2); +} +inline CFX_ByteString operator+(const FX_CHAR* str1, + const CFX_ByteString& str2) { + return CFX_ByteString(str1, str2.AsStringC()); +} +inline CFX_ByteString operator+(const CFX_ByteString& str1, + const CFX_ByteStringC& str2) { + return CFX_ByteString(str1.AsStringC(), str2); +} +inline CFX_ByteString operator+(const CFX_ByteStringC& str1, + const CFX_ByteString& str2) { + return CFX_ByteString(str1, str2.AsStringC()); +} + +// A mutable string with shared buffers using copy-on-write semantics that +// avoids the cost of std::string's iterator stability guarantees. +class CFX_WideString { + public: + using CharType = FX_WCHAR; + + CFX_WideString(); + CFX_WideString(const CFX_WideString& other); + CFX_WideString(CFX_WideString&& other); + + // Deliberately implicit to avoid calling on every string literal. + CFX_WideString(FX_WCHAR ch); + CFX_WideString(const FX_WCHAR* ptr); + + CFX_WideString(const FX_WCHAR* ptr, FX_STRSIZE len); + + explicit CFX_WideString(const CFX_WideStringC& str); + CFX_WideString(const CFX_WideStringC& str1, const CFX_WideStringC& str2); + + ~CFX_WideString(); + + static CFX_WideString FromLocal(const CFX_ByteStringC& str); + static CFX_WideString FromCodePage(const CFX_ByteStringC& str, + uint16_t codepage); + + static CFX_WideString FromUTF8(const CFX_ByteStringC& str); + static CFX_WideString FromUTF16LE(const unsigned short* str, FX_STRSIZE len); + + static FX_STRSIZE WStringLength(const unsigned short* str); + + // Explicit conversion to C-style wide string. + // Note: Any subsequent modification of |this| will invalidate the result. + const FX_WCHAR* c_str() const { return m_pData ? m_pData->m_String : L""; } + + // Explicit conversion to CFX_WideStringC. + // Note: Any subsequent modification of |this| will invalidate the result. + CFX_WideStringC AsStringC() const { + return CFX_WideStringC(c_str(), GetLength()); + } + + void clear() { m_pData.Reset(); } + + FX_STRSIZE GetLength() const { return m_pData ? m_pData->m_nDataLength : 0; } + bool IsEmpty() const { return !GetLength(); } + + const CFX_WideString& operator=(const FX_WCHAR* str); + const CFX_WideString& operator=(const CFX_WideString& stringSrc); + const CFX_WideString& operator=(const CFX_WideStringC& stringSrc); + + const CFX_WideString& operator+=(const FX_WCHAR* str); + const CFX_WideString& operator+=(FX_WCHAR ch); + const CFX_WideString& operator+=(const CFX_WideString& str); + const CFX_WideString& operator+=(const CFX_WideStringC& str); + + bool operator==(const wchar_t* ptr) const; + bool operator==(const CFX_WideStringC& str) const; + bool operator==(const CFX_WideString& other) const; + + bool operator!=(const wchar_t* ptr) const { return !(*this == ptr); } + bool operator!=(const CFX_WideStringC& str) const { return !(*this == str); } + bool operator!=(const CFX_WideString& other) const { + return !(*this == other); + } + + bool operator<(const CFX_WideString& str) const; + + FX_WCHAR GetAt(FX_STRSIZE nIndex) const { + return m_pData ? m_pData->m_String[nIndex] : 0; + } + + FX_WCHAR operator[](FX_STRSIZE nIndex) const { + return m_pData ? m_pData->m_String[nIndex] : 0; + } + + void SetAt(FX_STRSIZE nIndex, FX_WCHAR ch); + + int Compare(const FX_WCHAR* str) const; + int Compare(const CFX_WideString& str) const; + int CompareNoCase(const FX_WCHAR* str) const; + + CFX_WideString Mid(FX_STRSIZE first) const; + CFX_WideString Mid(FX_STRSIZE first, FX_STRSIZE count) const; + CFX_WideString Left(FX_STRSIZE count) const; + CFX_WideString Right(FX_STRSIZE count) const; + + FX_STRSIZE Insert(FX_STRSIZE index, FX_WCHAR ch); + FX_STRSIZE Delete(FX_STRSIZE index, FX_STRSIZE count = 1); + + void Format(const FX_WCHAR* lpszFormat, ...); + void FormatV(const FX_WCHAR* lpszFormat, va_list argList); + + void MakeLower(); + void MakeUpper(); + + void TrimRight(); + void TrimRight(FX_WCHAR chTarget); + void TrimRight(const CFX_WideStringC& pTargets); + + void TrimLeft(); + void TrimLeft(FX_WCHAR chTarget); + void TrimLeft(const CFX_WideStringC& pTargets); + + void Reserve(FX_STRSIZE len); + FX_WCHAR* GetBuffer(FX_STRSIZE len); + void ReleaseBuffer(FX_STRSIZE len = -1); + + int GetInteger() const; + FX_FLOAT GetFloat() const; + + FX_STRSIZE Find(const CFX_WideStringC& pSub, FX_STRSIZE start = 0) const; + FX_STRSIZE Find(FX_WCHAR ch, FX_STRSIZE start = 0) const; + FX_STRSIZE Replace(const CFX_WideStringC& pOld, const CFX_WideStringC& pNew); + FX_STRSIZE Remove(FX_WCHAR ch); + + CFX_ByteString UTF8Encode() const; + CFX_ByteString UTF16LE_Encode() const; + + protected: + using StringData = CFX_StringDataTemplate; + + void ReallocBeforeWrite(FX_STRSIZE nLen); + void AllocBeforeWrite(FX_STRSIZE nLen); + void AllocCopy(CFX_WideString& dest, + FX_STRSIZE nCopyLen, + FX_STRSIZE nCopyIndex) const; + void AssignCopy(const FX_WCHAR* pSrcData, FX_STRSIZE nSrcLen); + void Concat(const FX_WCHAR* lpszSrcData, FX_STRSIZE nSrcLen); + + CFX_RetainPtr m_pData; + + friend class fxcrt_WideStringConcatInPlace_Test; + friend class fxcrt_WideStringPool_Test; +}; + +inline CFX_WideString operator+(const CFX_WideStringC& str1, + const CFX_WideStringC& str2) { + return CFX_WideString(str1, str2); +} +inline CFX_WideString operator+(const CFX_WideStringC& str1, + const FX_WCHAR* str2) { + return CFX_WideString(str1, str2); +} +inline CFX_WideString operator+(const FX_WCHAR* str1, + const CFX_WideStringC& str2) { + return CFX_WideString(str1, str2); +} +inline CFX_WideString operator+(const CFX_WideStringC& str1, FX_WCHAR ch) { + return CFX_WideString(str1, CFX_WideStringC(ch)); +} +inline CFX_WideString operator+(FX_WCHAR ch, const CFX_WideStringC& str2) { + return CFX_WideString(ch, str2); +} +inline CFX_WideString operator+(const CFX_WideString& str1, + const CFX_WideString& str2) { + return CFX_WideString(str1.AsStringC(), str2.AsStringC()); +} +inline CFX_WideString operator+(const CFX_WideString& str1, FX_WCHAR ch) { + return CFX_WideString(str1.AsStringC(), CFX_WideStringC(ch)); +} +inline CFX_WideString operator+(FX_WCHAR ch, const CFX_WideString& str2) { + return CFX_WideString(ch, str2.AsStringC()); +} +inline CFX_WideString operator+(const CFX_WideString& str1, + const FX_WCHAR* str2) { + return CFX_WideString(str1.AsStringC(), str2); +} +inline CFX_WideString operator+(const FX_WCHAR* str1, + const CFX_WideString& str2) { + return CFX_WideString(str1, str2.AsStringC()); +} +inline CFX_WideString operator+(const CFX_WideString& str1, + const CFX_WideStringC& str2) { + return CFX_WideString(str1.AsStringC(), str2); +} +inline CFX_WideString operator+(const CFX_WideStringC& str1, + const CFX_WideString& str2) { + return CFX_WideString(str1, str2.AsStringC()); +} +inline bool operator==(const wchar_t* lhs, const CFX_WideString& rhs) { + return rhs == lhs; +} +inline bool operator==(const CFX_WideStringC& lhs, const CFX_WideString& rhs) { + return rhs == lhs; +} +inline bool operator!=(const wchar_t* lhs, const CFX_WideString& rhs) { + return rhs != lhs; +} +inline bool operator!=(const CFX_WideStringC& lhs, const CFX_WideString& rhs) { + return rhs != lhs; +} + +CFX_ByteString FX_UTF8Encode(const FX_WCHAR* pwsStr, FX_STRSIZE len); +inline CFX_ByteString FX_UTF8Encode(const CFX_WideStringC& wsStr) { + return FX_UTF8Encode(wsStr.c_str(), wsStr.GetLength()); +} +inline CFX_ByteString FX_UTF8Encode(const CFX_WideString& wsStr) { + return FX_UTF8Encode(wsStr.c_str(), wsStr.GetLength()); +} + +FX_FLOAT FX_atof(const CFX_ByteStringC& str); +inline FX_FLOAT FX_atof(const CFX_WideStringC& wsStr) { + return FX_atof(FX_UTF8Encode(wsStr.c_str(), wsStr.GetLength()).c_str()); +} +bool FX_atonum(const CFX_ByteStringC& str, void* pData); +FX_STRSIZE FX_ftoa(FX_FLOAT f, FX_CHAR* buf); + +uint32_t FX_HashCode_GetA(const CFX_ByteStringC& str, bool bIgnoreCase); +uint32_t FX_HashCode_GetW(const CFX_WideStringC& str, bool bIgnoreCase); + +namespace std { + +template <> +struct hash { + std::size_t operator()(const CFX_ByteString& str) const { + return FX_HashCode_GetA(str.AsStringC(), false); + } +}; + +template <> +struct hash { + std::size_t operator()(const CFX_WideString& str) const { + return FX_HashCode_GetW(str.AsStringC(), false); + } +}; + +} // namespace std + +extern template struct std::hash; +extern template struct std::hash; + +#endif // CORE_FXCRT_FX_STRING_H_ diff --git a/core/fxcrt/fx_system.h b/core/fxcrt/fx_system.h new file mode 100644 index 0000000000..8364db3a4e --- /dev/null +++ b/core/fxcrt/fx_system.h @@ -0,0 +1,342 @@ +// Copyright 2014 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FXCRT_FX_SYSTEM_H_ +#define CORE_FXCRT_FX_SYSTEM_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// _FX_OS_ values: +#define _FX_WIN32_DESKTOP_ 1 +#define _FX_WIN64_DESKTOP_ 2 +#define _FX_LINUX_DESKTOP_ 4 +#define _FX_MACOSX_ 7 +#define _FX_ANDROID_ 12 + +// _FXM_PLATFORM_ values; +#define _FXM_PLATFORM_WINDOWS_ 1 // _FX_WIN32_DESKTOP_ or _FX_WIN64_DESKTOP_. +#define _FXM_PLATFORM_LINUX_ 2 // _FX_LINUX_DESKTOP_ always. +#define _FXM_PLATFORM_APPLE_ 3 // _FX_MACOSX_ always. +#define _FXM_PLATFORM_ANDROID_ 4 // _FX_ANDROID_ always. + +#ifndef _FX_OS_ +#if defined(__ANDROID__) +#define _FX_OS_ _FX_ANDROID_ +#define _FXM_PLATFORM_ _FXM_PLATFORM_ANDROID_ +#elif defined(_WIN32) +#define _FX_OS_ _FX_WIN32_DESKTOP_ +#define _FXM_PLATFORM_ _FXM_PLATFORM_WINDOWS_ +#elif defined(_WIN64) +#define _FX_OS_ _FX_WIN64_DESKTOP_ +#define _FXM_PLATFORM_ _FXM_PLATFORM_WINDOWS_ +#elif defined(__linux__) +#define _FX_OS_ _FX_LINUX_DESKTOP_ +#define _FXM_PLATFORM_ _FXM_PLATFORM_LINUX_ +#elif defined(__APPLE__) +#define _FX_OS_ _FX_MACOSX_ +#define _FXM_PLATFORM_ _FXM_PLATFORM_APPLE_ +#endif +#endif // _FX_OS_ + +#if !defined(_FX_OS_) || _FX_OS_ == 0 +#error Sorry, can not figure out target OS. Please specify _FX_OS_ macro. +#endif + +#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ +#include +#include +#endif + +#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ +#include +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif +typedef void* FX_POSITION; // Keep until fxcrt containers gone +typedef float FX_FLOAT; // Keep, allow upgrade to doubles. +typedef double FX_DOUBLE; // Keep, allow downgrade to floats. +typedef int FX_BOOL; // Keep, sadly not always 0 or 1. +typedef char FX_CHAR; // Keep, questionable signedness. +typedef wchar_t FX_WCHAR; // Keep, maybe bad platform wchars. + +#define IsFloatZero(f) ((f) < 0.0001 && (f) > -0.0001) +#define IsFloatBigger(fa, fb) ((fa) > (fb) && !IsFloatZero((fa) - (fb))) +#define IsFloatSmaller(fa, fb) ((fa) < (fb) && !IsFloatZero((fa) - (fb))) +#define IsFloatEqual(fa, fb) IsFloatZero(fa - fb) + +// PDFium string sizes are limited to 2^31-1, and the value is signed to +// allow -1 as a placeholder for "unknown". +// TODO(palmer): it should be a |size_t|, or at least unsigned. +typedef int FX_STRSIZE; + +#ifndef TRUE +#define TRUE 1 +#endif + +#ifndef FALSE +#define FALSE 0 +#endif + +#ifdef __cplusplus +static_assert(TRUE == true, "true_needs_to_be_true"); +static_assert(FALSE == false, "false_needs_to_be_false"); +#endif + +#ifndef ASSERT +#ifndef NDEBUG +#define ASSERT assert +#else +#define ASSERT(a) +#endif +#endif + +#if defined(__clang__) || defined(__GNUC__) +#define PDFIUM_IMMEDIATE_CRASH() __builtin_trap() +#else +#define PDFIUM_IMMEDIATE_CRASH() ((void)(*(volatile char*)0 = 0)) +#endif + +// M_PI not universally present on all platforms. +#define FX_PI 3.1415926535897932384626433832795f +#define FX_BEZIER 0.5522847498308f + +// NOTE: prevent use of the return value from snprintf() since some platforms +// have different return values (e.g. windows _vsnprintf()), and provide +// versions that always NUL-terminate. +#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ && _MSC_VER < 1900 +void FXSYS_snprintf(char* str, + size_t size, + _Printf_format_string_ const char* fmt, + ...); +void FXSYS_vsnprintf(char* str, size_t size, const char* fmt, va_list ap); +#else +#define FXSYS_snprintf (void)snprintf +#define FXSYS_vsnprintf (void)vsnprintf +#endif + +#define FXSYS_sprintf DO_NOT_USE_SPRINTF_DIE_DIE_DIE +#define FXSYS_vsprintf DO_NOT_USE_VSPRINTF_DIE_DIE_DIE +#define FXSYS_strncmp strncmp +#define FXSYS_strcmp strcmp +#define FXSYS_strcpy strcpy +#define FXSYS_strncpy strncpy +#define FXSYS_strstr strstr +#define FXSYS_FILE FILE +#define FXSYS_fopen fopen +#define FXSYS_fclose fclose +#define FXSYS_SEEK_END SEEK_END +#define FXSYS_SEEK_SET SEEK_SET +#define FXSYS_fseek fseek +#define FXSYS_ftell ftell +#define FXSYS_fread fread +#define FXSYS_fwrite fwrite +#define FXSYS_fprintf fprintf +#define FXSYS_fflush fflush + +#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ +#ifdef _NATIVE_WCHAR_T_DEFINED +#define FXSYS_wfopen(f, m) _wfopen((const wchar_t*)(f), (const wchar_t*)(m)) +#else +#define FXSYS_wfopen _wfopen +#endif +#else +FXSYS_FILE* FXSYS_wfopen(const FX_WCHAR* filename, const FX_WCHAR* mode); +#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ + +#ifdef __cplusplus +} // extern "C" + +#include "third_party/base/numerics/safe_conversions.h" + +#define FXSYS_strlen(ptr) pdfium::base::checked_cast(strlen(ptr)) +#define FXSYS_wcslen(ptr) pdfium::base::checked_cast(wcslen(ptr)) + +// Overloaded functions for C++ templates +inline FX_STRSIZE FXSYS_len(const FX_CHAR* ptr) { + return FXSYS_strlen(ptr); +} + +inline FX_STRSIZE FXSYS_len(const FX_WCHAR* ptr) { + return FXSYS_wcslen(ptr); +} + +inline int FXSYS_cmp(const FX_CHAR* ptr1, const FX_CHAR* ptr2, size_t len) { + return memcmp(ptr1, ptr2, len); +} + +inline int FXSYS_cmp(const FX_WCHAR* ptr1, const FX_WCHAR* ptr2, size_t len) { + return wmemcmp(ptr1, ptr2, len); +} + +inline const FX_CHAR* FXSYS_chr(const FX_CHAR* ptr, FX_CHAR ch, size_t len) { + return reinterpret_cast(memchr(ptr, ch, len)); +} + +inline const FX_WCHAR* FXSYS_chr(const FX_WCHAR* ptr, FX_WCHAR ch, size_t len) { + return wmemchr(ptr, ch, len); +} + +extern "C" { +#else +#define FXSYS_strlen(ptr) ((FX_STRSIZE)strlen(ptr)) +#define FXSYS_wcslen(ptr) ((FX_STRSIZE)wcslen(ptr)) +#endif + +#define FXSYS_wcscmp wcscmp +#define FXSYS_wcsstr wcsstr +#define FXSYS_wcsncmp wcsncmp +#define FXSYS_vswprintf vswprintf +#define FXSYS_mbstowcs mbstowcs +#define FXSYS_wcstombs wcstombs +#define FXSYS_memcmp memcmp +#define FXSYS_memcpy memcpy +#define FXSYS_memmove memmove +#define FXSYS_memset memset +#define FXSYS_qsort qsort +#define FXSYS_bsearch bsearch + +#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ +#define FXSYS_GetACP GetACP +#define FXSYS_itoa _itoa +#define FXSYS_strlwr _strlwr +#define FXSYS_strupr _strupr +#define FXSYS_stricmp _stricmp +#ifdef _NATIVE_WCHAR_T_DEFINED +#define FXSYS_wcsicmp(str1, str2) _wcsicmp((wchar_t*)(str1), (wchar_t*)(str2)) +#define FXSYS_WideCharToMultiByte(p1, p2, p3, p4, p5, p6, p7, p8) \ + WideCharToMultiByte(p1, p2, (const wchar_t*)(p3), p4, p5, p6, p7, p8) +#define FXSYS_MultiByteToWideChar(p1, p2, p3, p4, p5, p6) \ + MultiByteToWideChar(p1, p2, p3, p4, (wchar_t*)(p5), p6) +#define FXSYS_wcslwr(str) _wcslwr((wchar_t*)(str)) +#define FXSYS_wcsupr(str) _wcsupr((wchar_t*)(str)) +#else +#define FXSYS_wcsicmp _wcsicmp +#define FXSYS_WideCharToMultiByte WideCharToMultiByte +#define FXSYS_MultiByteToWideChar MultiByteToWideChar +#define FXSYS_wcslwr _wcslwr +#define FXSYS_wcsupr _wcsupr +#endif +#define FXSYS_GetFullPathName GetFullPathName +#define FXSYS_GetModuleFileName GetModuleFileName +#else +int FXSYS_GetACP(); +char* FXSYS_itoa(int value, char* str, int radix); +int FXSYS_WideCharToMultiByte(uint32_t codepage, + uint32_t dwFlags, + const wchar_t* wstr, + int wlen, + char* buf, + int buflen, + const char* default_str, + int* pUseDefault); +int FXSYS_MultiByteToWideChar(uint32_t codepage, + uint32_t dwFlags, + const char* bstr, + int blen, + wchar_t* buf, + int buflen); +uint32_t FXSYS_GetFullPathName(const char* filename, + uint32_t buflen, + char* buf, + char** filepart); +uint32_t FXSYS_GetModuleFileName(void* hModule, char* buf, uint32_t bufsize); +char* FXSYS_strlwr(char* str); +char* FXSYS_strupr(char* str); +int FXSYS_stricmp(const char*, const char*); +int FXSYS_wcsicmp(const wchar_t* str1, const wchar_t* str2); +wchar_t* FXSYS_wcslwr(wchar_t* str); +wchar_t* FXSYS_wcsupr(wchar_t* str); +#endif // _FXM_PLATFORM == _FXM_PLATFORM_WINDOWS_ + +#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ +#define FXSYS_pow(a, b) (FX_FLOAT) powf(a, b) +#else +#define FXSYS_pow(a, b) (FX_FLOAT) pow(a, b) +#endif +#define FXSYS_sqrt(a) (FX_FLOAT) sqrt(a) +#define FXSYS_fabs(a) (FX_FLOAT) fabs(a) +#define FXSYS_atan2(a, b) (FX_FLOAT) atan2(a, b) +#define FXSYS_ceil(a) (FX_FLOAT) ceil(a) +#define FXSYS_floor(a) (FX_FLOAT) floor(a) +#define FXSYS_cos(a) (FX_FLOAT) cos(a) +#define FXSYS_acos(a) (FX_FLOAT) acos(a) +#define FXSYS_sin(a) (FX_FLOAT) sin(a) +#define FXSYS_log(a) (FX_FLOAT) log(a) +#define FXSYS_log10(a) (FX_FLOAT) log10(a) +#define FXSYS_fmod(a, b) (FX_FLOAT) fmod(a, b) +#define FXSYS_abs abs +#define FXDWORD_GET_LSBFIRST(p) \ + ((static_cast(p[3]) << 24) | (static_cast(p[2]) << 16) | \ + (static_cast(p[1]) << 8) | (static_cast(p[0]))) +#define FXDWORD_GET_MSBFIRST(p) \ + ((static_cast(p[0]) << 24) | (static_cast(p[1]) << 16) | \ + (static_cast(p[2]) << 8) | (static_cast(p[3]))) +#define FXSYS_HIBYTE(word) ((uint8_t)((word) >> 8)) +#define FXSYS_LOBYTE(word) ((uint8_t)(word)) +#define FXSYS_HIWORD(dword) ((uint16_t)((dword) >> 16)) +#define FXSYS_LOWORD(dword) ((uint16_t)(dword)) +int32_t FXSYS_atoi(const FX_CHAR* str); +uint32_t FXSYS_atoui(const FX_CHAR* str); +int32_t FXSYS_wtoi(const FX_WCHAR* str); +int64_t FXSYS_atoi64(const FX_CHAR* str); +int64_t FXSYS_wtoi64(const FX_WCHAR* str); +const FX_CHAR* FXSYS_i64toa(int64_t value, FX_CHAR* str, int radix); +int FXSYS_round(FX_FLOAT f); +#define FXSYS_sqrt2(a, b) (FX_FLOAT) FXSYS_sqrt((a) * (a) + (b) * (b)) +#ifdef __cplusplus +}; +#endif + +// To print a size_t value in a portable way: +// size_t size; +// printf("xyz: %" PRIuS, size); +// The "u" in the macro corresponds to %u, and S is for "size". + +#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ + +#if (defined(_INTTYPES_H) || defined(_INTTYPES_H_)) && !defined(PRId64) +#error "inttypes.h has already been included before this header file, but " +#error "without __STDC_FORMAT_MACROS defined." +#endif + +#if !defined(__STDC_FORMAT_MACROS) +#define __STDC_FORMAT_MACROS +#endif + +#include + +#if !defined(PRIuS) +#define PRIuS "zu" +#endif + +#else // _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ + +#if !defined(PRIuS) +#define PRIuS "Iu" +#endif + +#endif // _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ + +// Prevent a function from ever being inlined, typically because we'd +// like it to appear in stack traces. +#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ +#define NEVER_INLINE __declspec(noinline) +#else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ +#define NEVER_INLINE __attribute__((__noinline__)) +#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ + +#endif // CORE_FXCRT_FX_SYSTEM_H_ diff --git a/core/fxcrt/fx_system_unittest.cpp b/core/fxcrt/fx_system_unittest.cpp index b0a3249465..4ab37c7bdb 100644 --- a/core/fxcrt/fx_system_unittest.cpp +++ b/core/fxcrt/fx_system_unittest.cpp @@ -5,7 +5,7 @@ #include #include -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "testing/fx_string_testhelpers.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/core/fxcrt/fx_ucd.h b/core/fxcrt/fx_ucd.h new file mode 100644 index 0000000000..23bacca0f6 --- /dev/null +++ b/core/fxcrt/fx_ucd.h @@ -0,0 +1,202 @@ +// Copyright 2014 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FXCRT_FX_UCD_H_ +#define CORE_FXCRT_FX_UCD_H_ + +#include "core/fxcrt/fx_basic.h" + +#define FX_BIDICLASSBITS 6 +#define FX_BIDICLASSBITSMASK (31 << FX_BIDICLASSBITS) + +enum FX_BIDICLASS { + FX_BIDICLASS_ON = 0, // Other Neutral + FX_BIDICLASS_L = 1, // Left Letter + FX_BIDICLASS_R = 2, // Right Letter + FX_BIDICLASS_AN = 3, // Arabic Number + FX_BIDICLASS_EN = 4, // European Number + FX_BIDICLASS_AL = 5, // Arabic Letter + FX_BIDICLASS_NSM = 6, // Non-spacing Mark + FX_BIDICLASS_CS = 7, // Common Number Separator + FX_BIDICLASS_ES = 8, // European Separator + FX_BIDICLASS_ET = 9, // European Number Terminator + FX_BIDICLASS_BN = 10, // Boundary Neutral + FX_BIDICLASS_S = 11, // Segment Separator + FX_BIDICLASS_WS = 12, // Whitespace + FX_BIDICLASS_B = 13, // Paragraph Separator + FX_BIDICLASS_RLO = 14, // Right-to-Left Override + FX_BIDICLASS_RLE = 15, // Right-to-Left Embedding + FX_BIDICLASS_LRO = 16, // Left-to-Right Override + FX_BIDICLASS_LRE = 17, // Left-to-Right Embedding + FX_BIDICLASS_PDF = 18, // Pop Directional Format + FX_BIDICLASS_N = FX_BIDICLASS_ON, +}; + +extern const uint32_t kTextLayoutCodeProperties[]; +extern const size_t kTextLayoutCodePropertiesSize; + +extern const uint16_t kFXTextLayoutVerticalMirror[]; +extern const size_t kFXTextLayoutVerticalMirrorSize; + +extern const uint16_t kFXTextLayoutBidiMirror[]; +extern const size_t kFXTextLayoutBidiMirrorSize; + +uint32_t FX_GetUnicodeProperties(FX_WCHAR wch); +FX_WCHAR FX_GetMirrorChar(FX_WCHAR wch, FX_BOOL bRTL, FX_BOOL bVertical); + +#ifdef PDF_ENABLE_XFA +enum FX_CHARBREAKPROP { + FX_CBP_OP = 0, + FX_CBP_CL = 1, + FX_CBP_QU = 2, + FX_CBP_GL = 3, + FX_CBP_NS = 4, + FX_CBP_EX = 5, + FX_CBP_SY = 6, + FX_CBP_IS = 7, + FX_CBP_PR = 8, + FX_CBP_PO = 9, + FX_CBP_NU = 10, + FX_CBP_AL = 11, + FX_CBP_ID = 12, + FX_CBP_IN = 13, + FX_CBP_HY = 14, + FX_CBP_BA = 15, + FX_CBP_BB = 16, + FX_CBP_B2 = 17, + FX_CBP_ZW = 18, + FX_CBP_CM = 19, + FX_CBP_WJ = 20, + FX_CBP_H2 = 21, + FX_CBP_H3 = 22, + FX_CBP_JL = 23, + FX_CBP_JV = 24, + FX_CBP_JT = 25, + + FX_CBP_BK = 26, + FX_CBP_CR = 27, + FX_CBP_LF = 28, + FX_CBP_NL = 29, + FX_CBP_SA = 30, + FX_CBP_SG = 31, + FX_CBP_CB = 32, + FX_CBP_XX = 33, + FX_CBP_AI = 34, + FX_CBP_SP = 35, + FX_CBP_TB = 37, + FX_CBP_NONE = 36, +}; + +#define FX_CHARTYPEBITS 11 +#define FX_CHARTYPEBITSMASK (15 << FX_CHARTYPEBITS) +enum FX_CHARTYPE { + FX_CHARTYPE_Unknown = 0, + FX_CHARTYPE_Tab = (1 << FX_CHARTYPEBITS), + FX_CHARTYPE_Space = (2 << FX_CHARTYPEBITS), + FX_CHARTYPE_Control = (3 << FX_CHARTYPEBITS), + FX_CHARTYPE_Combination = (4 << FX_CHARTYPEBITS), + FX_CHARTYPE_Numeric = (5 << FX_CHARTYPEBITS), + FX_CHARTYPE_Normal = (6 << FX_CHARTYPEBITS), + FX_CHARTYPE_ArabicAlef = (7 << FX_CHARTYPEBITS), + FX_CHARTYPE_ArabicSpecial = (8 << FX_CHARTYPEBITS), + FX_CHARTYPE_ArabicDistortion = (9 << FX_CHARTYPEBITS), + FX_CHARTYPE_ArabicNormal = (10 << FX_CHARTYPEBITS), + FX_CHARTYPE_ArabicForm = (11 << FX_CHARTYPEBITS), + FX_CHARTYPE_Arabic = (12 << FX_CHARTYPEBITS), +}; +inline FX_CHARTYPE GetCharTypeFromProp(uint32_t prop) { + return static_cast(prop & FX_CHARTYPEBITSMASK); +} + +FX_BOOL FX_IsCtrlCode(FX_WCHAR ch); +FX_WCHAR FX_GetMirrorChar(FX_WCHAR wch, + uint32_t dwProps, + FX_BOOL bRTL, + FX_BOOL bVertical); +class CFX_Char { + public: + CFX_Char() + : m_wCharCode(0), + m_nBreakType(0), + m_nRotation(0), + m_dwCharProps(0), + m_dwCharStyles(0), + m_iCharWidth(0), + m_iHorizontalScale(100), + m_iVertialScale(100) {} + CFX_Char(uint16_t wCharCode, uint32_t dwCharProps) + : m_wCharCode(wCharCode), + m_nBreakType(0), + m_nRotation(0), + m_dwCharProps(dwCharProps), + m_dwCharStyles(0), + m_iCharWidth(0), + m_iHorizontalScale(100), + m_iVertialScale(100) {} + + FX_CHARTYPE GetCharType() const { return GetCharTypeFromProp(m_dwCharProps); } + + uint16_t m_wCharCode; + uint8_t m_nBreakType; + int8_t m_nRotation; + uint32_t m_dwCharProps; + uint32_t m_dwCharStyles; + int32_t m_iCharWidth; + int32_t m_iHorizontalScale; + int32_t m_iVertialScale; +}; +typedef CFX_ArrayTemplate CFX_CharArray; +class CFX_TxtChar : public CFX_Char { + public: + CFX_TxtChar() + : m_dwStatus(0), + m_iBidiClass(0), + m_iBidiLevel(0), + m_iBidiPos(0), + m_iBidiOrder(0), + m_pUserData(nullptr) {} + uint32_t m_dwStatus; + int16_t m_iBidiClass; + int16_t m_iBidiLevel; + int16_t m_iBidiPos; + int16_t m_iBidiOrder; + void* m_pUserData; +}; +typedef CFX_ArrayTemplate CFX_TxtCharArray; +class CFX_RTFChar : public CFX_Char { + public: + CFX_RTFChar(); + CFX_RTFChar(const CFX_RTFChar& other); + + uint32_t m_dwStatus; + int32_t m_iFontSize; + int32_t m_iFontHeight; + int16_t m_iBidiClass; + int16_t m_iBidiLevel; + int16_t m_iBidiPos; + int16_t m_iBidiOrder; + uint32_t m_dwLayoutStyles; + uint32_t m_dwIdentity; + IFX_Retainable* m_pUserData; +}; + +inline CFX_RTFChar::CFX_RTFChar() + : m_dwStatus(0), + m_iFontSize(0), + m_iFontHeight(0), + m_iBidiClass(0), + m_iBidiLevel(0), + m_iBidiPos(0), + m_dwLayoutStyles(0), + m_dwIdentity(0), + m_pUserData(nullptr) {} + +inline CFX_RTFChar::CFX_RTFChar(const CFX_RTFChar& other) = default; + +typedef CFX_ArrayTemplate CFX_RTFCharArray; +#endif // PDF_ENABLE_XFA + +#endif // CORE_FXCRT_FX_UCD_H_ diff --git a/core/fxcrt/fx_ucddata.cpp b/core/fxcrt/fx_ucddata.cpp index 1567d454f8..b8661b87cb 100644 --- a/core/fxcrt/fx_ucddata.cpp +++ b/core/fxcrt/fx_ucddata.cpp @@ -4,8 +4,8 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_ucd.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_ucd.h" const uint32_t kTextLayoutCodeProperties[] = { 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, diff --git a/core/fxcrt/fx_unicode.cpp b/core/fxcrt/fx_unicode.cpp index d042283a32..cfc24b5a0e 100644 --- a/core/fxcrt/fx_unicode.cpp +++ b/core/fxcrt/fx_unicode.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_ucd.h" +#include "core/fxcrt/fx_ucd.h" uint32_t FX_GetUnicodeProperties(FX_WCHAR wch) { size_t idx = static_cast(wch); diff --git a/core/fxcrt/fx_xml.h b/core/fxcrt/fx_xml.h new file mode 100644 index 0000000000..78f162597f --- /dev/null +++ b/core/fxcrt/fx_xml.h @@ -0,0 +1,173 @@ +// Copyright 2014 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FXCRT_FX_XML_H_ +#define CORE_FXCRT_FX_XML_H_ + +#include +#include + +#include "core/fxcrt/fx_basic.h" + +class CXML_AttrItem { + public: + bool Matches(const CFX_ByteString& space, const CFX_ByteString& name) const; + + CFX_ByteString m_QSpaceName; + CFX_ByteString m_AttrName; + CFX_WideString m_Value; +}; + +class CXML_AttrMap { + public: + CXML_AttrMap(); + ~CXML_AttrMap(); + + const CFX_WideString* Lookup(const CFX_ByteString& space, + const CFX_ByteString& name) const; + int GetSize() const; + CXML_AttrItem& GetAt(int index) const; + + void SetAt(const CFX_ByteString& space, + const CFX_ByteString& name, + const CFX_WideString& value); + + std::unique_ptr> m_pMap; +}; + +class CXML_Content { + public: + CXML_Content() : m_bCDATA(FALSE), m_Content() {} + void Set(FX_BOOL bCDATA, const CFX_WideStringC& content) { + m_bCDATA = bCDATA; + m_Content = content; + } + + FX_BOOL m_bCDATA; + CFX_WideString m_Content; +}; + +class CXML_Element { + public: + enum ChildType { Invalid, Element, Content }; + + static CXML_Element* Parse(const void* pBuffer, + size_t size, + FX_BOOL bSaveSpaceChars = FALSE, + FX_FILESIZE* pParsedSize = nullptr); + static CXML_Element* Parse(IFX_FileRead* pFile, + FX_BOOL bSaveSpaceChars = FALSE, + FX_FILESIZE* pParsedSize = nullptr); + static CXML_Element* Parse(IFX_BufferRead* pBuffer, + FX_BOOL bSaveSpaceChars = FALSE, + FX_FILESIZE* pParsedSize = nullptr); + + CXML_Element(const CFX_ByteStringC& qSpace, const CFX_ByteStringC& tagName); + CXML_Element(const CFX_ByteStringC& qTagName); + CXML_Element(); + ~CXML_Element(); + + void Empty(); + CFX_ByteString GetTagName(FX_BOOL bQualified = FALSE) const; + CFX_ByteString GetNamespace(FX_BOOL bQualified = FALSE) const; + CFX_ByteString GetNamespaceURI(const CFX_ByteString& qName) const; + CXML_Element* GetParent() const { return m_pParent; } + uint32_t CountAttrs() const { return m_AttrMap.GetSize(); } + void GetAttrByIndex(int index, + CFX_ByteString& space, + CFX_ByteString& name, + CFX_WideString& value) const; + FX_BOOL HasAttr(const CFX_ByteStringC& qName) const; + FX_BOOL GetAttrValue(const CFX_ByteStringC& name, + CFX_WideString& attribute) const; + CFX_WideString GetAttrValue(const CFX_ByteStringC& name) const { + CFX_WideString attr; + GetAttrValue(name, attr); + return attr; + } + + FX_BOOL GetAttrValue(const CFX_ByteStringC& space, + const CFX_ByteStringC& name, + CFX_WideString& attribute) const; + CFX_WideString GetAttrValue(const CFX_ByteStringC& space, + const CFX_ByteStringC& name) const { + CFX_WideString attr; + GetAttrValue(space, name, attr); + return attr; + } + + FX_BOOL GetAttrInteger(const CFX_ByteStringC& name, int& attribute) const; + int GetAttrInteger(const CFX_ByteStringC& name) const { + int attr = 0; + GetAttrInteger(name, attr); + return attr; + } + + FX_BOOL GetAttrInteger(const CFX_ByteStringC& space, + const CFX_ByteStringC& name, + int& attribute) const; + int GetAttrInteger(const CFX_ByteStringC& space, + const CFX_ByteStringC& name) const { + int attr = 0; + GetAttrInteger(space, name, attr); + return attr; + } + + FX_BOOL GetAttrFloat(const CFX_ByteStringC& name, FX_FLOAT& attribute) const; + FX_FLOAT GetAttrFloat(const CFX_ByteStringC& name) const { + FX_FLOAT attr = 0; + GetAttrFloat(name, attr); + return attr; + } + + FX_BOOL GetAttrFloat(const CFX_ByteStringC& space, + const CFX_ByteStringC& name, + FX_FLOAT& attribute) const; + FX_FLOAT GetAttrFloat(const CFX_ByteStringC& space, + const CFX_ByteStringC& name) const { + FX_FLOAT attr = 0; + GetAttrFloat(space, name, attr); + return attr; + } + + uint32_t CountChildren() const { return m_Children.size(); } + ChildType GetChildType(uint32_t index) const; + CFX_WideString GetContent(uint32_t index) const; + CXML_Element* GetElement(uint32_t index) const; + CXML_Element* GetElement(const CFX_ByteStringC& space, + const CFX_ByteStringC& tag) const { + return GetElement(space, tag, 0); + } + + uint32_t CountElements(const CFX_ByteStringC& space, + const CFX_ByteStringC& tag) const; + CXML_Element* GetElement(const CFX_ByteStringC& space, + const CFX_ByteStringC& tag, + int index) const; + + uint32_t FindElement(CXML_Element* pChild) const; + void SetTag(const CFX_ByteStringC& qSpace, const CFX_ByteStringC& tagname); + void SetTag(const CFX_ByteStringC& qTagName); + void RemoveChildren(); + void RemoveChild(uint32_t index); + + protected: + struct ChildRecord { + ChildType type; + void* child; // CXML_Element and CXML_Content lack a common ancestor. + }; + + CXML_Element* m_pParent; + CFX_ByteString m_QSpaceName; + CFX_ByteString m_TagName; + CXML_AttrMap m_AttrMap; + std::vector m_Children; + + friend class CXML_Parser; + friend class CXML_Composer; +}; + +#endif // CORE_FXCRT_FX_XML_H_ diff --git a/core/fxcrt/fx_xml_composer.cpp b/core/fxcrt/fx_xml_composer.cpp index 1bad069c34..91118a0a65 100644 --- a/core/fxcrt/fx_xml_composer.cpp +++ b/core/fxcrt/fx_xml_composer.cpp @@ -6,7 +6,7 @@ #include "core/fxcrt/xml_int.h" -#include "core/fxcrt/include/fx_xml.h" +#include "core/fxcrt/fx_xml.h" void FX_XML_SplitQualifiedName(const CFX_ByteStringC& bsFullName, CFX_ByteStringC& bsSpace, diff --git a/core/fxcrt/fx_xml_parser.cpp b/core/fxcrt/fx_xml_parser.cpp index 926196786a..a7026e9bb1 100644 --- a/core/fxcrt/fx_xml_parser.cpp +++ b/core/fxcrt/fx_xml_parser.cpp @@ -8,8 +8,8 @@ #include -#include "core/fxcrt/include/fx_ext.h" -#include "core/fxcrt/include/fx_xml.h" +#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_xml.h" #include "third_party/base/stl_util.h" CXML_DataBufAcc::CXML_DataBufAcc(const uint8_t* pBuffer, size_t size) diff --git a/core/fxcrt/fxcrt_posix.cpp b/core/fxcrt/fxcrt_posix.cpp index 053f89c2c9..b5efdc28f4 100644 --- a/core/fxcrt/fxcrt_posix.cpp +++ b/core/fxcrt/fxcrt_posix.cpp @@ -6,7 +6,7 @@ #include "core/fxcrt/fxcrt_posix.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #if _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_ || \ _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || \ diff --git a/core/fxcrt/fxcrt_stream.cpp b/core/fxcrt/fxcrt_stream.cpp index d96369b81c..a8c96bf02c 100644 --- a/core/fxcrt/fxcrt_stream.cpp +++ b/core/fxcrt/fxcrt_stream.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_stream.h" +#include "core/fxcrt/fx_stream.h" FX_BOOL IFX_FileWrite::WriteBlock(const void* pData, size_t size) { return WriteBlock(pData, GetSize(), size); diff --git a/core/fxcrt/fxcrt_windows.cpp b/core/fxcrt/fxcrt_windows.cpp index 271cc8fda8..ec16373f02 100644 --- a/core/fxcrt/fxcrt_windows.cpp +++ b/core/fxcrt/fxcrt_windows.cpp @@ -6,7 +6,7 @@ #include "core/fxcrt/fxcrt_windows.h" -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ diff --git a/core/fxcrt/include/cfx_count_ref.h b/core/fxcrt/include/cfx_count_ref.h deleted file mode 100644 index a879967b28..0000000000 --- a/core/fxcrt/include/cfx_count_ref.h +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2016 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef CORE_FXCRT_INCLUDE_CFX_COUNT_REF_H_ -#define CORE_FXCRT_INCLUDE_CFX_COUNT_REF_H_ - -#include "core/fxcrt/include/cfx_retain_ptr.h" -#include "core/fxcrt/include/fx_system.h" - -// A shared object with Copy on Write semantics that makes it appear as -// if each one were independent. -template -class CFX_CountRef { - public: - CFX_CountRef() {} - CFX_CountRef(const CFX_CountRef& other) : m_pObject(other.m_pObject) {} - ~CFX_CountRef() {} - - template - ObjClass* Emplace(Args... params) { - m_pObject.Reset(new CountedObj(params...)); - return m_pObject.Get(); - } - - CFX_CountRef& operator=(const CFX_CountRef& that) { - if (*this != that) - m_pObject = that.m_pObject; - return *this; - } - - void SetNull() { m_pObject.Reset(); } - const ObjClass* GetObject() const { return m_pObject.Get(); } - - template - ObjClass* GetPrivateCopy(Args... params) { - if (!m_pObject) - return Emplace(params...); - if (!m_pObject->HasOneRef()) - m_pObject.Reset(new CountedObj(*m_pObject)); - return m_pObject.Get(); - } - - bool operator==(const CFX_CountRef& that) const { - return m_pObject == that.m_pObject; - } - bool operator!=(const CFX_CountRef& that) const { return !(*this == that); } - explicit operator bool() const { return !!m_pObject; } - - private: - class CountedObj : public ObjClass { - public: - template - CountedObj(Args... params) : ObjClass(params...), m_RefCount(0) {} - - CountedObj(const CountedObj& src) : ObjClass(src), m_RefCount(0) {} - ~CountedObj() { m_RefCount = 0; } - - bool HasOneRef() const { return m_RefCount == 1; } - void Retain() { m_RefCount++; } - void Release() { - ASSERT(m_RefCount); - if (--m_RefCount == 0) - delete this; - } - - private: - // To ensure ref counts do not overflow, consider the worst possible case: - // the entire address space contains nothing but pointers to this object. - // Since the count increments with each new pointer, the largest value is - // the number of pointers that can fit into the address space. The size of - // the address space itself is a good upper bound on it. - intptr_t m_RefCount; - }; - - CFX_RetainPtr m_pObject; -}; - -#endif // CORE_FXCRT_INCLUDE_CFX_COUNT_REF_H_ diff --git a/core/fxcrt/include/cfx_observable.h b/core/fxcrt/include/cfx_observable.h deleted file mode 100644 index a5053f3952..0000000000 --- a/core/fxcrt/include/cfx_observable.h +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2016 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CORE_FXCRT_INCLUDE_CFX_OBSERVABLE_H_ -#define CORE_FXCRT_INCLUDE_CFX_OBSERVABLE_H_ - -#include - -#include "core/fxcrt/include/fx_system.h" -#include "third_party/base/stl_util.h" - -template -class CFX_Observable { - public: - class ObservedPtr { - public: - ObservedPtr() : m_pObservedPtr(nullptr) {} - explicit ObservedPtr(T* pObservedPtr) : m_pObservedPtr(pObservedPtr) { - if (m_pObservedPtr) - m_pObservedPtr->AddObservedPtr(this); - } - ObservedPtr(const ObservedPtr& that) = delete; - ~ObservedPtr() { - if (m_pObservedPtr) - m_pObservedPtr->RemoveObservedPtr(this); - } - void Reset(T* pObservedPtr = nullptr) { - if (m_pObservedPtr) - m_pObservedPtr->RemoveObservedPtr(this); - m_pObservedPtr = pObservedPtr; - if (m_pObservedPtr) - m_pObservedPtr->AddObservedPtr(this); - } - void OnDestroy() { - ASSERT(m_pObservedPtr); - m_pObservedPtr = nullptr; - } - ObservedPtr& operator=(const ObservedPtr& that) = delete; - bool operator==(const ObservedPtr& that) const { - return m_pObservedPtr == that.m_pObservedPtr; - } - bool operator!=(const ObservedPtr& that) const { return !(*this == that); } - explicit operator bool() const { return !!m_pObservedPtr; } - T* Get() const { return m_pObservedPtr; } - T& operator*() const { return *m_pObservedPtr; } - T* operator->() const { return m_pObservedPtr; } - - private: - T* m_pObservedPtr; - }; - - CFX_Observable() {} - CFX_Observable(const CFX_Observable& that) = delete; - ~CFX_Observable() { NotifyObservedPtrs(); } - void AddObservedPtr(ObservedPtr* pObservedPtr) { - ASSERT(!pdfium::ContainsKey(m_ObservedPtrs, pObservedPtr)); - m_ObservedPtrs.insert(pObservedPtr); - } - void RemoveObservedPtr(ObservedPtr* pObservedPtr) { - ASSERT(pdfium::ContainsKey(m_ObservedPtrs, pObservedPtr)); - m_ObservedPtrs.erase(pObservedPtr); - } - void NotifyObservedPtrs() { - for (auto* pObservedPtr : m_ObservedPtrs) - pObservedPtr->OnDestroy(); - m_ObservedPtrs.clear(); - } - CFX_Observable& operator=(const CFX_Observable& that) = delete; - - protected: - size_t ActiveObservedPtrsForTesting() const { return m_ObservedPtrs.size(); } - - private: - std::set m_ObservedPtrs; -}; - -#endif // CORE_FXCRT_INCLUDE_CFX_OBSERVABLE_H_ diff --git a/core/fxcrt/include/cfx_retain_ptr.h b/core/fxcrt/include/cfx_retain_ptr.h deleted file mode 100644 index e40feb6b31..0000000000 --- a/core/fxcrt/include/cfx_retain_ptr.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2016 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CORE_FXCRT_INCLUDE_CFX_RETAIN_PTR_H_ -#define CORE_FXCRT_INCLUDE_CFX_RETAIN_PTR_H_ - -#include - -#include "core/fxcrt/include/fx_memory.h" - -template -class CFX_RetainPtr { - public: - explicit CFX_RetainPtr(T* pObj) : m_pObj(pObj) { - if (m_pObj) - m_pObj->Retain(); - } - - CFX_RetainPtr() : CFX_RetainPtr(nullptr) {} - CFX_RetainPtr(const CFX_RetainPtr& that) : CFX_RetainPtr(that.Get()) {} - CFX_RetainPtr(CFX_RetainPtr&& that) { Swap(that); } - - template - CFX_RetainPtr(const CFX_RetainPtr& that) - : CFX_RetainPtr(that.Get()) {} - - void Reset(T* obj = nullptr) { - if (obj) - obj->Retain(); - m_pObj.reset(obj); - } - - T* Get() const { return m_pObj.get(); } - void Swap(CFX_RetainPtr& that) { m_pObj.swap(that.m_pObj); } - - CFX_RetainPtr& operator=(const CFX_RetainPtr& that) { - if (*this != that) - Reset(that.Get()); - return *this; - } - - bool operator==(const CFX_RetainPtr& that) const { - return Get() == that.Get(); - } - - bool operator!=(const CFX_RetainPtr& that) const { return !(*this == that); } - - explicit operator bool() const { return !!m_pObj; } - T& operator*() const { return *m_pObj.get(); } - T* operator->() const { return m_pObj.get(); } - - private: - std::unique_ptr> m_pObj; -}; - -#endif // CORE_FXCRT_INCLUDE_CFX_RETAIN_PTR_H_ diff --git a/core/fxcrt/include/cfx_string_pool_template.h b/core/fxcrt/include/cfx_string_pool_template.h deleted file mode 100644 index a59d13a61d..0000000000 --- a/core/fxcrt/include/cfx_string_pool_template.h +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2016 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef CORE_FXCRT_INCLUDE_CFX_STRING_POOL_TEMPLATE_H_ -#define CORE_FXCRT_INCLUDE_CFX_STRING_POOL_TEMPLATE_H_ - -#include - -#include "core/fxcrt/include/fx_string.h" - -template -class CFX_StringPoolTemplate { - public: - StringType Intern(const StringType& str) { return *m_Pool.insert(str).first; } - void Clear() { m_Pool.clear(); } - - private: - std::unordered_set m_Pool; -}; - -using CFX_ByteStringPool = CFX_StringPoolTemplate; -using CFX_WideStringPool = CFX_StringPoolTemplate; - -extern template class CFX_StringPoolTemplate; -extern template class CFX_StringPoolTemplate; - -#endif // CORE_FXCRT_INCLUDE_CFX_STRING_POOL_TEMPLATE_H_ diff --git a/core/fxcrt/include/cfx_weak_ptr.h b/core/fxcrt/include/cfx_weak_ptr.h deleted file mode 100644 index 64218cd679..0000000000 --- a/core/fxcrt/include/cfx_weak_ptr.h +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2016 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef CORE_FXCRT_INCLUDE_CFX_WEAK_PTR_H_ -#define CORE_FXCRT_INCLUDE_CFX_WEAK_PTR_H_ - -#include - -#include "core/fxcrt/include/cfx_retain_ptr.h" -#include "core/fxcrt/include/fx_system.h" - -template > -class CFX_WeakPtr { - public: - CFX_WeakPtr() {} - CFX_WeakPtr(const CFX_WeakPtr& that) : m_pHandle(that.m_pHandle) {} - CFX_WeakPtr(CFX_WeakPtr&& that) { Swap(that); } - CFX_WeakPtr(std::unique_ptr pObj) - : m_pHandle(new Handle(std::move(pObj))) {} - - explicit operator bool() const { return m_pHandle && !!m_pHandle->Get(); } - bool HasOneRef() const { return m_pHandle && m_pHandle->HasOneRef(); } - T* operator->() { return m_pHandle->Get(); } - const T* operator->() const { return m_pHandle->Get(); } - CFX_WeakPtr& operator=(const CFX_WeakPtr& that) { - m_pHandle = that.m_pHandle; - return *this; - } - bool operator==(const CFX_WeakPtr& that) const { - return m_pHandle == that.m_pHandle; - } - bool operator!=(const CFX_WeakPtr& that) const { return !(*this == that); } - - T* Get() const { return m_pHandle ? m_pHandle->Get() : nullptr; } - void Clear() { - if (m_pHandle) { - m_pHandle->Clear(); - m_pHandle.Reset(); - } - } - void Reset() { m_pHandle.Reset(); } - void Reset(std::unique_ptr pObj) { - m_pHandle.Reset(new Handle(std::move(pObj))); - } - void Swap(CFX_WeakPtr& that) { m_pHandle.Swap(that.m_pHandle); } - - private: - class Handle { - public: - explicit Handle(std::unique_ptr ptr) - : m_nCount(0), m_pObj(std::move(ptr)) {} - void Reset(std::unique_ptr ptr) { m_pObj = std::move(ptr); } - void Clear() { // Now you're all weak ptrs ... - m_pObj.reset(); // unique_ptr nulls first before invoking delete. - } - T* Get() const { return m_pObj.get(); } - T* Retain() { - ++m_nCount; - return m_pObj.get(); - } - void Release() { - if (--m_nCount == 0) - delete this; - } - bool HasOneRef() const { return m_nCount == 1; } - - private: - ~Handle() {} - - intptr_t m_nCount; - std::unique_ptr m_pObj; - }; - - CFX_RetainPtr m_pHandle; -}; - -#endif // CORE_FXCRT_INCLUDE_CFX_WEAK_PTR_H_ diff --git a/core/fxcrt/include/fx_arabic.h b/core/fxcrt/include/fx_arabic.h deleted file mode 100644 index 2617d1897f..0000000000 --- a/core/fxcrt/include/fx_arabic.h +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef CORE_FXCRT_INCLUDE_FX_ARABIC_H_ -#define CORE_FXCRT_INCLUDE_FX_ARABIC_H_ - -#include "core/fxcrt/include/fx_arb.h" - -#define FX_BIDIMAXLEVEL 61 -#define FX_BidiDirection(a) (FX_IsOdd(a) ? FX_BIDICLASS_R : FX_BIDICLASS_L) -#define FX_BidiGetDeferredType(a) (((a) >> 4) & 0x0F) -#define FX_BidiGetResolvedType(a) ((a)&0x0F) - -namespace pdfium { -namespace arabic { - -bool IsArabicChar(FX_WCHAR wch); -bool IsArabicFormChar(FX_WCHAR wch); -FX_WCHAR GetFormChar(FX_WCHAR wch, FX_WCHAR prev = 0, FX_WCHAR next = 0); -FX_WCHAR GetFormChar(const CFX_Char* cur, - const CFX_Char* prev, - const CFX_Char* next); - -} // namespace arabic -} // namespace pdfium - -void FX_BidiReverseString(CFX_WideString& wsText, - int32_t iStart, - int32_t iCount); -void FX_BidiSetDeferredRun(CFX_Int32Array& values, - int32_t iStart, - int32_t iCount, - int32_t iValue); -void FX_BidiClassify(const CFX_WideString& wsText, - CFX_Int32Array& classes, - FX_BOOL bWS = FALSE); -int32_t FX_BidiResolveExplicit(int32_t iBaseLevel, - int32_t iDirection, - CFX_Int32Array& classes, - CFX_Int32Array& levels, - int32_t iStart, - int32_t iCount, - int32_t iNest = 0); - -enum FX_BIDIWEAKSTATE { - FX_BIDIWEAKSTATE_xa = 0, - FX_BIDIWEAKSTATE_xr, - FX_BIDIWEAKSTATE_xl, - FX_BIDIWEAKSTATE_ao, - FX_BIDIWEAKSTATE_ro, - FX_BIDIWEAKSTATE_lo, - FX_BIDIWEAKSTATE_rt, - FX_BIDIWEAKSTATE_lt, - FX_BIDIWEAKSTATE_cn, - FX_BIDIWEAKSTATE_ra, - FX_BIDIWEAKSTATE_re, - FX_BIDIWEAKSTATE_la, - FX_BIDIWEAKSTATE_le, - FX_BIDIWEAKSTATE_ac, - FX_BIDIWEAKSTATE_rc, - FX_BIDIWEAKSTATE_rs, - FX_BIDIWEAKSTATE_lc, - FX_BIDIWEAKSTATE_ls, - FX_BIDIWEAKSTATE_ret, - FX_BIDIWEAKSTATE_let, -}; -#define FX_BWSxa FX_BIDIWEAKSTATE_xa -#define FX_BWSxr FX_BIDIWEAKSTATE_xr -#define FX_BWSxl FX_BIDIWEAKSTATE_xl -#define FX_BWSao FX_BIDIWEAKSTATE_ao -#define FX_BWSro FX_BIDIWEAKSTATE_ro -#define FX_BWSlo FX_BIDIWEAKSTATE_lo -#define FX_BWSrt FX_BIDIWEAKSTATE_rt -#define FX_BWSlt FX_BIDIWEAKSTATE_lt -#define FX_BWScn FX_BIDIWEAKSTATE_cn -#define FX_BWSra FX_BIDIWEAKSTATE_ra -#define FX_BWSre FX_BIDIWEAKSTATE_re -#define FX_BWSla FX_BIDIWEAKSTATE_la -#define FX_BWSle FX_BIDIWEAKSTATE_le -#define FX_BWSac FX_BIDIWEAKSTATE_ac -#define FX_BWSrc FX_BIDIWEAKSTATE_rc -#define FX_BWSrs FX_BIDIWEAKSTATE_rs -#define FX_BWSlc FX_BIDIWEAKSTATE_lc -#define FX_BWSls FX_BIDIWEAKSTATE_ls -#define FX_BWSret FX_BIDIWEAKSTATE_ret -#define FX_BWSlet FX_BIDIWEAKSTATE_let - -enum FX_BIDIWEAKACTION { - FX_BIDIWEAKACTION_IX = 0x100, - FX_BIDIWEAKACTION_XX = 0x0F, - FX_BIDIWEAKACTION_xxx = (0x0F << 4) + 0x0F, - FX_BIDIWEAKACTION_xIx = 0x100 + FX_BIDIWEAKACTION_xxx, - FX_BIDIWEAKACTION_xxN = (0x0F << 4) + FX_BIDICLASS_ON, - FX_BIDIWEAKACTION_xxE = (0x0F << 4) + FX_BIDICLASS_EN, - FX_BIDIWEAKACTION_xxA = (0x0F << 4) + FX_BIDICLASS_AN, - FX_BIDIWEAKACTION_xxR = (0x0F << 4) + FX_BIDICLASS_R, - FX_BIDIWEAKACTION_xxL = (0x0F << 4) + FX_BIDICLASS_L, - FX_BIDIWEAKACTION_Nxx = (FX_BIDICLASS_ON << 4) + 0x0F, - FX_BIDIWEAKACTION_Axx = (FX_BIDICLASS_AN << 4) + 0x0F, - FX_BIDIWEAKACTION_ExE = (FX_BIDICLASS_EN << 4) + FX_BIDICLASS_EN, - FX_BIDIWEAKACTION_NIx = (FX_BIDICLASS_ON << 4) + 0x0F + 0x100, - FX_BIDIWEAKACTION_NxN = (FX_BIDICLASS_ON << 4) + FX_BIDICLASS_ON, - FX_BIDIWEAKACTION_NxR = (FX_BIDICLASS_ON << 4) + FX_BIDICLASS_R, - FX_BIDIWEAKACTION_NxE = (FX_BIDICLASS_ON << 4) + FX_BIDICLASS_EN, - FX_BIDIWEAKACTION_AxA = (FX_BIDICLASS_AN << 4) + FX_BIDICLASS_AN, - FX_BIDIWEAKACTION_NxL = (FX_BIDICLASS_ON << 4) + FX_BIDICLASS_L, - FX_BIDIWEAKACTION_LxL = (FX_BIDICLASS_L << 4) + FX_BIDICLASS_L, - FX_BIDIWEAKACTION_xIL = (0x0F << 4) + FX_BIDICLASS_L + 0x100, - FX_BIDIWEAKACTION_AxR = (FX_BIDICLASS_AN << 4) + FX_BIDICLASS_R, - FX_BIDIWEAKACTION_Lxx = (FX_BIDICLASS_L << 4) + 0x0F, -}; -#define FX_BWAIX FX_BIDIWEAKACTION_IX -#define FX_BWAXX FX_BIDIWEAKACTION_XX -#define FX_BWAxxx FX_BIDIWEAKACTION_xxx -#define FX_BWAxIx FX_BIDIWEAKACTION_xIx -#define FX_BWAxxN FX_BIDIWEAKACTION_xxN -#define FX_BWAxxE FX_BIDIWEAKACTION_xxE -#define FX_BWAxxA FX_BIDIWEAKACTION_xxA -#define FX_BWAxxR FX_BIDIWEAKACTION_xxR -#define FX_BWAxxL FX_BIDIWEAKACTION_xxL -#define FX_BWANxx FX_BIDIWEAKACTION_Nxx -#define FX_BWAAxx FX_BIDIWEAKACTION_Axx -#define FX_BWAExE FX_BIDIWEAKACTION_ExE -#define FX_BWANIx FX_BIDIWEAKACTION_NIx -#define FX_BWANxN FX_BIDIWEAKACTION_NxN -#define FX_BWANxR FX_BIDIWEAKACTION_NxR -#define FX_BWANxE FX_BIDIWEAKACTION_NxE -#define FX_BWAAxA FX_BIDIWEAKACTION_AxA -#define FX_BWANxL FX_BIDIWEAKACTION_NxL -#define FX_BWALxL FX_BIDIWEAKACTION_LxL -#define FX_BWAxIL FX_BIDIWEAKACTION_xIL -#define FX_BWAAxR FX_BIDIWEAKACTION_AxR -#define FX_BWALxx FX_BIDIWEAKACTION_Lxx - -void FX_BidiResolveWeak(int32_t iBaseLevel, - CFX_Int32Array& classes, - CFX_Int32Array& levels); -enum FX_BIDINEUTRALSTATE { - FX_BIDINEUTRALSTATE_r = 0, - FX_BIDINEUTRALSTATE_l, - FX_BIDINEUTRALSTATE_rn, - FX_BIDINEUTRALSTATE_ln, - FX_BIDINEUTRALSTATE_a, - FX_BIDINEUTRALSTATE_na, -}; -#define FX_BNSr FX_BIDINEUTRALSTATE_r -#define FX_BNSl FX_BIDINEUTRALSTATE_l -#define FX_BNSrn FX_BIDINEUTRALSTATE_rn -#define FX_BNSln FX_BIDINEUTRALSTATE_ln -#define FX_BNSa FX_BIDINEUTRALSTATE_a -#define FX_BNSna FX_BIDINEUTRALSTATE_na -enum FX_BIDINEUTRALACTION { - FX_BIDINEUTRALACTION_nL = FX_BIDICLASS_L, - FX_BIDINEUTRALACTION_En = (FX_BIDICLASS_AN << 4), - FX_BIDINEUTRALACTION_Rn = (FX_BIDICLASS_R << 4), - FX_BIDINEUTRALACTION_Ln = (FX_BIDICLASS_L << 4), - FX_BIDINEUTRALACTION_In = FX_BIDIWEAKACTION_IX, - FX_BIDINEUTRALACTION_LnL = (FX_BIDICLASS_L << 4) + FX_BIDICLASS_L, -}; -#define FX_BNAnL FX_BIDINEUTRALACTION_nL -#define FX_BNAEn FX_BIDINEUTRALACTION_En -#define FX_BNARn FX_BIDINEUTRALACTION_Rn -#define FX_BNALn FX_BIDINEUTRALACTION_Ln -#define FX_BNAIn FX_BIDINEUTRALACTION_In -#define FX_BNALnL FX_BIDINEUTRALACTION_LnL -int32_t FX_BidiGetDeferredNeutrals(int32_t iAction, int32_t iLevel); -int32_t FX_BidiGetResolvedNeutrals(int32_t iAction); -void FX_BidiResolveNeutrals(int32_t iBaseLevel, - CFX_Int32Array& classes, - const CFX_Int32Array& levels); -void FX_BidiResolveImplicit(const CFX_Int32Array& classes, - CFX_Int32Array& levels); -void FX_BidiResolveWhitespace(int32_t iBaseLevel, - const CFX_Int32Array& classes, - CFX_Int32Array& levels); -int32_t FX_BidiReorderLevel(int32_t iBaseLevel, - CFX_WideString& wsText, - const CFX_Int32Array& levels, - int32_t iStart, - FX_BOOL bReverse = FALSE); -void FX_BidiReorder(int32_t iBaseLevel, - CFX_WideString& wsText, - const CFX_Int32Array& levels); - -#endif // CORE_FXCRT_INCLUDE_FX_ARABIC_H_ diff --git a/core/fxcrt/include/fx_arb.h b/core/fxcrt/include/fx_arb.h deleted file mode 100644 index 6928519a80..0000000000 --- a/core/fxcrt/include/fx_arb.h +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef CORE_FXCRT_INCLUDE_FX_ARB_H_ -#define CORE_FXCRT_INCLUDE_FX_ARB_H_ - -#include "core/fxcrt/include/fx_system.h" -#include "core/fxcrt/include/fx_ucd.h" - -struct FX_ARBFORMTABLE { - uint16_t wIsolated; - uint16_t wFinal; - uint16_t wInitial; - uint16_t wMedial; -}; - -struct FX_ARAALEF { - uint16_t wAlef; - uint16_t wIsolated; -}; - -struct FX_ARASHADDA { - uint16_t wShadda; - uint16_t wIsolated; -}; - -const FX_ARBFORMTABLE* FX_GetArabicFormTable(FX_WCHAR unicode); -FX_WCHAR FX_GetArabicFromAlefTable(FX_WCHAR alef); -FX_WCHAR FX_GetArabicFromShaddaTable(FX_WCHAR shadda); - -enum FX_ARBPOSITION { - FX_ARBPOSITION_Isolated = 0, - FX_ARBPOSITION_Final, - FX_ARBPOSITION_Initial, - FX_ARBPOSITION_Medial, -}; - -void FX_BidiLine(CFX_WideString& wsText, int32_t iBaseLevel = 0); -void FX_BidiLine(CFX_TxtCharArray& chars, - int32_t iCount, - int32_t iBaseLevel = 0); -void FX_BidiLine(CFX_RTFCharArray& chars, - int32_t iCount, - int32_t iBaseLevel = 0); - -#endif // CORE_FXCRT_INCLUDE_FX_ARB_H_ diff --git a/core/fxcrt/include/fx_basic.h b/core/fxcrt/include/fx_basic.h deleted file mode 100644 index 6a8988d5dc..0000000000 --- a/core/fxcrt/include/fx_basic.h +++ /dev/null @@ -1,859 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef CORE_FXCRT_INCLUDE_FX_BASIC_H_ -#define CORE_FXCRT_INCLUDE_FX_BASIC_H_ - -#include -#include - -#include "core/fxcrt/include/fx_memory.h" -#include "core/fxcrt/include/fx_stream.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" - -class CFX_BinaryBuf { - public: - CFX_BinaryBuf(); - explicit CFX_BinaryBuf(FX_STRSIZE size); - ~CFX_BinaryBuf(); - - uint8_t* GetBuffer() const { return m_pBuffer.get(); } - FX_STRSIZE GetSize() const { return m_DataSize; } - - void Clear(); - void EstimateSize(FX_STRSIZE size, FX_STRSIZE alloc_step = 0); - void AppendBlock(const void* pBuf, FX_STRSIZE size); - void AppendString(const CFX_ByteString& str) { - AppendBlock(str.c_str(), str.GetLength()); - } - - void AppendByte(uint8_t byte) { - ExpandBuf(1); - m_pBuffer.get()[m_DataSize++] = byte; - } - - void InsertBlock(FX_STRSIZE pos, const void* pBuf, FX_STRSIZE size); - void Delete(int start_index, int count); - - // Takes ownership of |pBuf|. - void AttachData(uint8_t* pBuf, FX_STRSIZE size); - - // Releases ownership of |m_pBuffer| and returns it. - uint8_t* DetachBuffer(); - - protected: - void ExpandBuf(FX_STRSIZE size); - - FX_STRSIZE m_AllocStep; - FX_STRSIZE m_AllocSize; - FX_STRSIZE m_DataSize; - std::unique_ptr m_pBuffer; -}; - -class CFX_ByteTextBuf : public CFX_BinaryBuf { - public: - FX_STRSIZE GetLength() const { return m_DataSize; } - CFX_ByteString MakeString() const { - return CFX_ByteString(m_pBuffer.get(), m_DataSize); - } - CFX_ByteStringC AsStringC() const { - return CFX_ByteStringC(m_pBuffer.get(), m_DataSize); - } - - void AppendChar(int ch) { AppendByte(static_cast(ch)); } - CFX_ByteTextBuf& operator<<(int i); - CFX_ByteTextBuf& operator<<(uint32_t i); - CFX_ByteTextBuf& operator<<(double f); - CFX_ByteTextBuf& operator<<(const FX_CHAR* pStr) { - return *this << CFX_ByteStringC(pStr); - } - CFX_ByteTextBuf& operator<<(const CFX_ByteString& str) { - return *this << str.AsStringC(); - } - CFX_ByteTextBuf& operator<<(const CFX_ByteStringC& lpsz); - CFX_ByteTextBuf& operator<<(const CFX_ByteTextBuf& buf); -}; - -class CFX_WideTextBuf : public CFX_BinaryBuf { - public: - void AppendChar(FX_WCHAR wch); - FX_STRSIZE GetLength() const { return m_DataSize / sizeof(FX_WCHAR); } - FX_WCHAR* GetBuffer() const { - return reinterpret_cast(m_pBuffer.get()); - } - - CFX_WideStringC AsStringC() const { - return CFX_WideStringC(reinterpret_cast(m_pBuffer.get()), - m_DataSize / sizeof(FX_WCHAR)); - } - CFX_WideString MakeString() const { - return CFX_WideString(reinterpret_cast(m_pBuffer.get()), - m_DataSize / sizeof(FX_WCHAR)); - } - - void Delete(int start_index, int count) { - CFX_BinaryBuf::Delete(start_index * sizeof(FX_WCHAR), - count * sizeof(FX_WCHAR)); - } - - CFX_WideTextBuf& operator<<(int i); - CFX_WideTextBuf& operator<<(double f); - CFX_WideTextBuf& operator<<(const FX_WCHAR* lpsz); - CFX_WideTextBuf& operator<<(const CFX_WideStringC& str); - CFX_WideTextBuf& operator<<(const CFX_WideString& str); - CFX_WideTextBuf& operator<<(const CFX_WideTextBuf& buf); -}; - -class CFX_FileBufferArchive { - public: - CFX_FileBufferArchive(); - ~CFX_FileBufferArchive(); - - void Clear(); - bool Flush(); - int32_t AppendBlock(const void* pBuf, size_t size); - int32_t AppendByte(uint8_t byte); - int32_t AppendDWord(uint32_t i); - int32_t AppendString(const CFX_ByteStringC& lpsz); - - // |pFile| must outlive the CFX_FileBufferArchive. - void AttachFile(IFX_StreamWrite* pFile); - - private: - static const size_t kBufSize = 32768; - - size_t m_Length; - std::unique_ptr m_pBuffer; - IFX_StreamWrite* m_pFile; -}; - -class CFX_CharMap { - public: - static CFX_ByteString GetByteString(uint16_t codepage, - const CFX_WideStringC& wstr); - - static CFX_WideString GetWideString(uint16_t codepage, - const CFX_ByteStringC& bstr); - - CFX_CharMap() = delete; -}; - -class CFX_UTF8Decoder { - public: - CFX_UTF8Decoder() { m_PendingBytes = 0; } - - void Clear(); - - void Input(uint8_t byte); - - void AppendChar(uint32_t ch); - - void ClearStatus() { m_PendingBytes = 0; } - - CFX_WideStringC GetResult() const { return m_Buffer.AsStringC(); } - - protected: - int m_PendingBytes; - - uint32_t m_PendingChar; - - CFX_WideTextBuf m_Buffer; -}; - -class CFX_UTF8Encoder { - public: - CFX_UTF8Encoder() {} - - void Input(FX_WCHAR unicode); - void AppendStr(const CFX_ByteStringC& str) { m_Buffer << str; } - CFX_ByteStringC GetResult() const { return m_Buffer.AsStringC(); } - - protected: - CFX_ByteTextBuf m_Buffer; -}; - -class CFX_BasicArray { - protected: - explicit CFX_BasicArray(int unit_size); - CFX_BasicArray(const CFX_BasicArray&) = delete; - ~CFX_BasicArray(); - - FX_BOOL SetSize(int nNewSize); - FX_BOOL Append(const CFX_BasicArray& src); - FX_BOOL Copy(const CFX_BasicArray& src); - uint8_t* InsertSpaceAt(int nIndex, int nCount); - FX_BOOL RemoveAt(int nIndex, int nCount); - FX_BOOL InsertAt(int nStartIndex, const CFX_BasicArray* pNewArray); - const void* GetDataPtr(int index) const; - - protected: - uint8_t* m_pData; - int m_nSize; - int m_nMaxSize; - int m_nUnitSize; -}; - -template -class CFX_ArrayTemplate : public CFX_BasicArray { - public: - CFX_ArrayTemplate() : CFX_BasicArray(sizeof(TYPE)) {} - - int GetSize() const { return m_nSize; } - - int GetUpperBound() const { return m_nSize - 1; } - - FX_BOOL SetSize(int nNewSize) { return CFX_BasicArray::SetSize(nNewSize); } - - void RemoveAll() { SetSize(0); } - - const TYPE GetAt(int nIndex) const { - if (nIndex < 0 || nIndex >= m_nSize) { - PDFIUM_IMMEDIATE_CRASH(); - } - return ((const TYPE*)m_pData)[nIndex]; - } - - FX_BOOL SetAt(int nIndex, TYPE newElement) { - if (nIndex < 0 || nIndex >= m_nSize) { - return FALSE; - } - ((TYPE*)m_pData)[nIndex] = newElement; - return TRUE; - } - - TYPE& ElementAt(int nIndex) { - if (nIndex < 0 || nIndex >= m_nSize) { - PDFIUM_IMMEDIATE_CRASH(); - } - return ((TYPE*)m_pData)[nIndex]; - } - - const TYPE* GetData() const { return (const TYPE*)m_pData; } - - TYPE* GetData() { return (TYPE*)m_pData; } - - FX_BOOL SetAtGrow(int nIndex, TYPE newElement) { - if (nIndex < 0) - return FALSE; - - if (nIndex >= m_nSize && !SetSize(nIndex + 1)) - return FALSE; - - ((TYPE*)m_pData)[nIndex] = newElement; - return TRUE; - } - - FX_BOOL Add(TYPE newElement) { - if (m_nSize < m_nMaxSize) { - m_nSize++; - } else if (!SetSize(m_nSize + 1)) { - return FALSE; - } - ((TYPE*)m_pData)[m_nSize - 1] = newElement; - return TRUE; - } - - FX_BOOL Append(const CFX_ArrayTemplate& src) { - return CFX_BasicArray::Append(src); - } - - FX_BOOL Copy(const CFX_ArrayTemplate& src) { - return CFX_BasicArray::Copy(src); - } - - TYPE* GetDataPtr(int index) { - return (TYPE*)CFX_BasicArray::GetDataPtr(index); - } - - TYPE* AddSpace() { return (TYPE*)CFX_BasicArray::InsertSpaceAt(m_nSize, 1); } - - TYPE* InsertSpaceAt(int nIndex, int nCount) { - return (TYPE*)CFX_BasicArray::InsertSpaceAt(nIndex, nCount); - } - - const TYPE operator[](int nIndex) const { - if (nIndex < 0 || nIndex >= m_nSize) { - *(volatile char*)0 = '\0'; - } - return ((const TYPE*)m_pData)[nIndex]; - } - - TYPE& operator[](int nIndex) { - if (nIndex < 0 || nIndex >= m_nSize) { - *(volatile char*)0 = '\0'; - } - return ((TYPE*)m_pData)[nIndex]; - } - - FX_BOOL InsertAt(int nIndex, TYPE newElement, int nCount = 1) { - if (!InsertSpaceAt(nIndex, nCount)) { - return FALSE; - } - while (nCount--) { - ((TYPE*)m_pData)[nIndex++] = newElement; - } - return TRUE; - } - - FX_BOOL RemoveAt(int nIndex, int nCount = 1) { - return CFX_BasicArray::RemoveAt(nIndex, nCount); - } - - FX_BOOL InsertAt(int nStartIndex, const CFX_BasicArray* pNewArray) { - return CFX_BasicArray::InsertAt(nStartIndex, pNewArray); - } - - int Find(TYPE data, int iStart = 0) const { - if (iStart < 0) { - return -1; - } - for (; iStart < (int)m_nSize; iStart++) - if (((TYPE*)m_pData)[iStart] == data) { - return iStart; - } - return -1; - } -}; - -#ifdef PDF_ENABLE_XFA -typedef CFX_ArrayTemplate CFX_WideStringCArray; -typedef CFX_ArrayTemplate CFX_FloatArray; -typedef CFX_ArrayTemplate CFX_ByteArray; -typedef CFX_ArrayTemplate CFX_Int32Array; - -template -class CFX_ObjectArray : public CFX_BasicArray { - public: - CFX_ObjectArray() : CFX_BasicArray(sizeof(ObjectClass)) {} - - ~CFX_ObjectArray() { RemoveAll(); } - - void Add(const ObjectClass& data) { - new ((void*)InsertSpaceAt(m_nSize, 1)) ObjectClass(data); - } - - ObjectClass& Add() { - return *(ObjectClass*)new ((void*)InsertSpaceAt(m_nSize, 1)) ObjectClass(); - } - - void* AddSpace() { return InsertSpaceAt(m_nSize, 1); } - - int32_t Append(const CFX_ObjectArray& src, - int32_t nStart = 0, - int32_t nCount = -1) { - if (nCount == 0) { - return 0; - } - int32_t nSize = src.GetSize(); - if (!nSize) { - return 0; - } - ASSERT(nStart > -1 && nStart < nSize); - if (nCount < 0) { - nCount = nSize; - } - if (nStart + nCount > nSize) { - nCount = nSize - nStart; - } - if (nCount < 1) { - return 0; - } - nSize = m_nSize; - InsertSpaceAt(m_nSize, nCount); - ObjectClass* pStartObj = (ObjectClass*)GetDataPtr(nSize); - nSize = nStart + nCount; - for (int32_t i = nStart; i < nSize; i++, pStartObj++) { - new ((void*)pStartObj) ObjectClass(src[i]); - } - return nCount; - } - - int32_t Copy(const CFX_ObjectArray& src, - int32_t nStart = 0, - int32_t nCount = -1) { - if (nCount == 0) { - return 0; - } - int32_t nSize = src.GetSize(); - if (!nSize) { - return 0; - } - ASSERT(nStart > -1 && nStart < nSize); - if (nCount < 0) { - nCount = nSize; - } - if (nStart + nCount > nSize) { - nCount = nSize - nStart; - } - if (nCount < 1) { - return 0; - } - RemoveAll(); - SetSize(nCount); - ObjectClass* pStartObj = (ObjectClass*)m_pData; - nSize = nStart + nCount; - for (int32_t i = nStart; i < nSize; i++, pStartObj++) { - new ((void*)pStartObj) ObjectClass(src[i]); - } - return nCount; - } - - int GetSize() const { return m_nSize; } - - ObjectClass& operator[](int index) const { - ASSERT(index < m_nSize); - return *(ObjectClass*)CFX_BasicArray::GetDataPtr(index); - } - - ObjectClass* GetDataPtr(int index) { - return (ObjectClass*)CFX_BasicArray::GetDataPtr(index); - } - - void RemoveAt(int index) { - ASSERT(index < m_nSize); - ((ObjectClass*)GetDataPtr(index))->~ObjectClass(); - CFX_BasicArray::RemoveAt(index, 1); - } - - void RemoveAll() { - for (int i = 0; i < m_nSize; i++) { - ((ObjectClass*)GetDataPtr(i))->~ObjectClass(); - } - CFX_BasicArray::SetSize(0); - } -}; -typedef CFX_ObjectArray CFX_ByteStringArray; -typedef CFX_ObjectArray CFX_WideStringArray; -#endif // PDF_ENABLE_XFA - -template -class CFX_FixedBufGrow { - public: - explicit CFX_FixedBufGrow(int data_size) { - if (data_size > FixedSize) { - m_pGrowData.reset(FX_Alloc(DataType, data_size)); - return; - } - FXSYS_memset(m_FixedData, 0, sizeof(DataType) * FixedSize); - } - operator DataType*() { return m_pGrowData ? m_pGrowData.get() : m_FixedData; } - - private: - DataType m_FixedData[FixedSize]; - std::unique_ptr m_pGrowData; -}; - -#ifdef PDF_ENABLE_XFA -class CFX_MapPtrToPtr { - protected: - struct CAssoc { - CAssoc* pNext; - void* key; - void* value; - }; - - public: - CFX_MapPtrToPtr(int nBlockSize = 10); - ~CFX_MapPtrToPtr(); - - int GetCount() const { return m_nCount; } - bool IsEmpty() const { return m_nCount == 0; } - - FX_BOOL Lookup(void* key, void*& rValue) const; - - void* GetValueAt(void* key) const; - - void*& operator[](void* key); - - void SetAt(void* key, void* newValue) { (*this)[key] = newValue; } - - FX_BOOL RemoveKey(void* key); - - void RemoveAll(); - - FX_POSITION GetStartPosition() const { - return m_nCount == 0 ? nullptr : (FX_POSITION)-1; - } - - void GetNextAssoc(FX_POSITION& rNextPosition, - void*& rKey, - void*& rValue) const; - - uint32_t GetHashTableSize() const { return m_nHashTableSize; } - - void InitHashTable(uint32_t hashSize, FX_BOOL bAllocNow = TRUE); - - protected: - CAssoc** m_pHashTable; - - uint32_t m_nHashTableSize; - - int m_nCount; - - CAssoc* m_pFreeList; - - struct CFX_Plex* m_pBlocks; - - int m_nBlockSize; - - uint32_t HashKey(void* key) const; - - CAssoc* NewAssoc(); - - void FreeAssoc(CAssoc* pAssoc); - - CAssoc* GetAssocAt(void* key, uint32_t& hash) const; -}; - -template -class CFX_MapPtrTemplate : public CFX_MapPtrToPtr { - public: - CFX_MapPtrTemplate() : CFX_MapPtrToPtr(10) {} - - FX_BOOL Lookup(KeyType key, ValueType& rValue) const { - void* pValue = nullptr; - if (!CFX_MapPtrToPtr::Lookup((void*)(uintptr_t)key, pValue)) { - return FALSE; - } - rValue = (ValueType)(uintptr_t)pValue; - return TRUE; - } - - ValueType& operator[](KeyType key) { - return (ValueType&)CFX_MapPtrToPtr::operator[]((void*)(uintptr_t)key); - } - - void SetAt(KeyType key, ValueType newValue) { - CFX_MapPtrToPtr::SetAt((void*)(uintptr_t)key, (void*)(uintptr_t)newValue); - } - - FX_BOOL RemoveKey(KeyType key) { - return CFX_MapPtrToPtr::RemoveKey((void*)(uintptr_t)key); - } - - void GetNextAssoc(FX_POSITION& rNextPosition, - KeyType& rKey, - ValueType& rValue) const { - void* pKey = nullptr; - void* pValue = nullptr; - CFX_MapPtrToPtr::GetNextAssoc(rNextPosition, pKey, pValue); - rKey = (KeyType)(uintptr_t)pKey; - rValue = (ValueType)(uintptr_t)pValue; - } -}; -#endif // PDF_ENABLE_XFA - -class CFX_PtrList { - protected: - struct CNode { - CNode* pNext; - CNode* pPrev; - void* data; - }; - - public: - CFX_PtrList(int nBlockSize = 10); - - FX_POSITION GetHeadPosition() const { return (FX_POSITION)m_pNodeHead; } - FX_POSITION GetTailPosition() const { return (FX_POSITION)m_pNodeTail; } - - void* GetNext(FX_POSITION& rPosition) const { - CNode* pNode = (CNode*)rPosition; - rPosition = (FX_POSITION)pNode->pNext; - return pNode->data; - } - - void* GetPrev(FX_POSITION& rPosition) const { - CNode* pNode = (CNode*)rPosition; - rPosition = (FX_POSITION)pNode->pPrev; - return pNode->data; - } - - FX_POSITION GetNextPosition(FX_POSITION pos) const { - return ((CNode*)pos)->pNext; - } - - FX_POSITION GetPrevPosition(FX_POSITION pos) const { - return ((CNode*)pos)->pPrev; - } - - void* GetAt(FX_POSITION rPosition) const { - CNode* pNode = (CNode*)rPosition; - return pNode->data; - } - - int GetCount() const { return m_nCount; } - FX_POSITION AddTail(void* newElement); - FX_POSITION AddHead(void* newElement); - - void SetAt(FX_POSITION pos, void* newElement) { - CNode* pNode = (CNode*)pos; - pNode->data = newElement; - } - FX_POSITION InsertAfter(FX_POSITION pos, void* newElement); - - FX_POSITION Find(void* searchValue, FX_POSITION startAfter = nullptr) const; - FX_POSITION FindIndex(int index) const; - - void RemoveAt(FX_POSITION pos); - void RemoveAll(); - - protected: - CNode* m_pNodeHead; - CNode* m_pNodeTail; - int m_nCount; - CNode* m_pNodeFree; - struct CFX_Plex* m_pBlocks; - int m_nBlockSize; - - CNode* NewNode(CNode* pPrev, CNode* pNext); - void FreeNode(CNode* pNode); - - public: - ~CFX_PtrList(); -}; - -#ifdef PDF_ENABLE_XFA -typedef void (*PD_CALLBACK_FREEDATA)(void* pData); -#endif // PDF_ENABLE_XFA - -class CFX_BitStream { - public: - void Init(const uint8_t* pData, uint32_t dwSize); - - uint32_t GetBits(uint32_t nBits); - - void ByteAlign(); - - FX_BOOL IsEOF() { return m_BitPos >= m_BitSize; } - - void SkipBits(uint32_t nBits) { m_BitPos += nBits; } - - void Rewind() { m_BitPos = 0; } - - uint32_t GetPos() const { return m_BitPos; } - - uint32_t BitsRemaining() const { - return m_BitSize >= m_BitPos ? m_BitSize - m_BitPos : 0; - } - - protected: - uint32_t m_BitPos; - - uint32_t m_BitSize; - - const uint8_t* m_pData; -}; - -class IFX_Pause { - public: - virtual ~IFX_Pause() {} - virtual FX_BOOL NeedToPauseNow() = 0; -}; - -template -class CFX_AutoRestorer { - public: - explicit CFX_AutoRestorer(T* location) - : m_Location(location), m_OldValue(*location) {} - ~CFX_AutoRestorer() { *m_Location = m_OldValue; } - - private: - T* const m_Location; - const T m_OldValue; -}; - -#define FX_DATALIST_LENGTH 1024 -template -class CFX_SortListArray { - protected: - struct DataList { - int32_t start; - - int32_t count; - uint8_t* data; - }; - - public: - CFX_SortListArray() : m_CurList(0) {} - - ~CFX_SortListArray() { Clear(); } - - void Clear() { - for (int32_t i = m_DataLists.GetUpperBound(); i >= 0; i--) { - DataList list = m_DataLists.ElementAt(i); - FX_Free(list.data); - } - m_DataLists.RemoveAll(); - m_CurList = 0; - } - - void Append(int32_t nStart, int32_t nCount) { - if (nStart < 0) { - return; - } - while (nCount > 0) { - int32_t temp_count = std::min(nCount, FX_DATALIST_LENGTH); - DataList list; - list.data = FX_Alloc2D(uint8_t, temp_count, unit); - list.start = nStart; - list.count = temp_count; - Append(list); - nCount -= temp_count; - nStart += temp_count; - } - } - - uint8_t* GetAt(int32_t nIndex) { - if (nIndex < 0) { - return nullptr; - } - if (m_CurList < 0 || m_CurList >= m_DataLists.GetSize()) { - return nullptr; - } - DataList* pCurList = m_DataLists.GetDataPtr(m_CurList); - if (!pCurList || nIndex < pCurList->start || - nIndex >= pCurList->start + pCurList->count) { - pCurList = nullptr; - int32_t iStart = 0; - int32_t iEnd = m_DataLists.GetUpperBound(); - int32_t iMid = 0; - while (iStart <= iEnd) { - iMid = (iStart + iEnd) / 2; - DataList* list = m_DataLists.GetDataPtr(iMid); - if (nIndex < list->start) { - iEnd = iMid - 1; - } else if (nIndex >= list->start + list->count) { - iStart = iMid + 1; - } else { - pCurList = list; - m_CurList = iMid; - break; - } - } - } - return pCurList ? pCurList->data + (nIndex - pCurList->start) * unit - : nullptr; - } - - protected: - void Append(const DataList& list) { - int32_t iStart = 0; - int32_t iEnd = m_DataLists.GetUpperBound(); - int32_t iFind = 0; - while (iStart <= iEnd) { - int32_t iMid = (iStart + iEnd) / 2; - DataList* cur_list = m_DataLists.GetDataPtr(iMid); - if (list.start < cur_list->start + cur_list->count) { - iEnd = iMid - 1; - } else { - if (iMid == iEnd) { - iFind = iMid + 1; - break; - } - DataList* next_list = m_DataLists.GetDataPtr(iMid + 1); - if (list.start < next_list->start) { - iFind = iMid + 1; - break; - } else { - iStart = iMid + 1; - } - } - } - m_DataLists.InsertAt(iFind, list); - } - int32_t m_CurList; - CFX_ArrayTemplate m_DataLists; -}; -template -class CFX_ListArrayTemplate { - public: - void Clear() { m_Data.Clear(); } - - void Add(int32_t nStart, int32_t nCount) { m_Data.Append(nStart, nCount); } - - T2& operator[](int32_t nIndex) { - uint8_t* data = m_Data.GetAt(nIndex); - ASSERT(data); - return (T2&)(*(volatile T2*)data); - } - - T2* GetPtrAt(int32_t nIndex) { return (T2*)m_Data.GetAt(nIndex); } - - protected: - T1 m_Data; -}; -typedef CFX_ListArrayTemplate, - FX_FILESIZE> CFX_FileSizeListArray; - -#ifdef PDF_ENABLE_XFA -class IFX_Retainable { - public: - virtual uint32_t Retain() = 0; - virtual uint32_t Release() = 0; - - protected: - virtual ~IFX_Retainable() {} -}; -#define FX_IsOdd(a) ((a)&1) -#endif // PDF_ENABLE_XFA - -class CFX_Vector_3by1 { - public: - CFX_Vector_3by1() : a(0.0f), b(0.0f), c(0.0f) {} - - CFX_Vector_3by1(FX_FLOAT a1, FX_FLOAT b1, FX_FLOAT c1) - : a(a1), b(b1), c(c1) {} - - FX_FLOAT a; - FX_FLOAT b; - FX_FLOAT c; -}; -class CFX_Matrix_3by3 { - public: - CFX_Matrix_3by3() - : a(0.0f), - b(0.0f), - c(0.0f), - d(0.0f), - e(0.0f), - f(0.0f), - g(0.0f), - h(0.0f), - i(0.0f) {} - - CFX_Matrix_3by3(FX_FLOAT a1, - FX_FLOAT b1, - FX_FLOAT c1, - FX_FLOAT d1, - FX_FLOAT e1, - FX_FLOAT f1, - FX_FLOAT g1, - FX_FLOAT h1, - FX_FLOAT i1) - : a(a1), b(b1), c(c1), d(d1), e(e1), f(f1), g(g1), h(h1), i(i1) {} - - CFX_Matrix_3by3 Inverse(); - - CFX_Matrix_3by3 Multiply(const CFX_Matrix_3by3& m); - - CFX_Vector_3by1 TransformVector(const CFX_Vector_3by1& v); - - FX_FLOAT a; - FX_FLOAT b; - FX_FLOAT c; - FX_FLOAT d; - FX_FLOAT e; - FX_FLOAT f; - FX_FLOAT g; - FX_FLOAT h; - FX_FLOAT i; -}; - -uint32_t GetBits32(const uint8_t* pData, int bitpos, int nbits); - -#endif // CORE_FXCRT_INCLUDE_FX_BASIC_H_ diff --git a/core/fxcrt/include/fx_coordinates.h b/core/fxcrt/include/fx_coordinates.h deleted file mode 100644 index a7c01cadb7..0000000000 --- a/core/fxcrt/include/fx_coordinates.h +++ /dev/null @@ -1,671 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef CORE_FXCRT_INCLUDE_FX_COORDINATES_H_ -#define CORE_FXCRT_INCLUDE_FX_COORDINATES_H_ - -#include "core/fxcrt/include/fx_basic.h" - -class CFX_Matrix; - -template -class CFX_PSTemplate { - public: - CFX_PSTemplate() : x(0), y(0) {} - CFX_PSTemplate(BaseType new_x, BaseType new_y) : x(new_x), y(new_y) {} - CFX_PSTemplate(const CFX_PSTemplate& other) : x(other.x), y(other.y) {} - void clear() { - x = 0; - y = 0; - } - CFX_PSTemplate operator=(const CFX_PSTemplate& other) { - if (this != &other) { - x = other.x; - y = other.y; - } - return *this; - } - bool operator==(const CFX_PSTemplate& other) const { - return x == other.x && y == other.y; - } - bool operator!=(const CFX_PSTemplate& other) const { - return !(*this == other); - } - CFX_PSTemplate& operator+=(const CFX_PSTemplate& obj) { - x += obj.x; - y += obj.y; - return *this; - } - CFX_PSTemplate& operator-=(const CFX_PSTemplate& obj) { - x -= obj.x; - y -= obj.y; - return *this; - } - CFX_PSTemplate& operator*=(BaseType factor) { - x *= factor; - y *= factor; - return *this; - } - CFX_PSTemplate& operator/=(BaseType divisor) { - x /= divisor; - y /= divisor; - return *this; - } - CFX_PSTemplate operator+(const CFX_PSTemplate& other) { - return CFX_PSTemplate(x + other.x, y + other.y); - } - CFX_PSTemplate operator-(const CFX_PSTemplate& other) { - return CFX_PSTemplate(x - other.x, y - other.y); - } - CFX_PSTemplate operator*(BaseType factor) { - return CFX_PSTemplate(x * factor, y * factor); - } - CFX_PSTemplate operator/(BaseType divisor) { - return CFX_PSTemplate(x / divisor, y / divisor); - } - - BaseType x; - BaseType y; -}; -typedef CFX_PSTemplate CFX_Point; -typedef CFX_PSTemplate CFX_PointF; -typedef CFX_PSTemplate CFX_Size; -typedef CFX_PSTemplate CFX_SizeF; -typedef CFX_ArrayTemplate CFX_Points; -typedef CFX_ArrayTemplate CFX_PointsF; - -template -class CFX_VTemplate : public CFX_PSTemplate { - public: - using CFX_PSTemplate::x; - using CFX_PSTemplate::y; - - CFX_VTemplate() : CFX_PSTemplate() {} - CFX_VTemplate(BaseType new_x, BaseType new_y) - : CFX_PSTemplate(new_x, new_y) {} - - CFX_VTemplate(const CFX_VTemplate& other) : CFX_PSTemplate(other) {} - - CFX_VTemplate(const CFX_PSTemplate& point1, - const CFX_PSTemplate& point2) - : CFX_PSTemplate(point2.x - point1.x, point2.y - point1.y) {} - - FX_FLOAT Length() const { return FXSYS_sqrt(x * x + y * y); } - void Normalize() { - FX_FLOAT fLen = Length(); - if (fLen < 0.0001f) - return; - - x /= fLen; - y /= fLen; - } - void Translate(BaseType dx, BaseType dy) { - x += dx; - y += dy; - } - void Scale(BaseType sx, BaseType sy) { - x *= sx; - y *= sy; - } - void Rotate(FX_FLOAT fRadian) { - FX_FLOAT cosValue = FXSYS_cos(fRadian); - FX_FLOAT sinValue = FXSYS_sin(fRadian); - x = x * cosValue - y * sinValue; - y = x * sinValue + y * cosValue; - } -}; -typedef CFX_VTemplate CFX_Vector; -typedef CFX_VTemplate CFX_VectorF; - -// Rectangles. -// TODO(tsepez): Consolidate all these different rectangle classes. - -// LTRB rectangles (y-axis runs downwards). -struct FX_RECT { - FX_RECT() : left(0), top(0), right(0), bottom(0) {} - - FX_RECT(int l, int t, int r, int b) : left(l), top(t), right(r), bottom(b) {} - - int Width() const { return right - left; } - int Height() const { return bottom - top; } - bool IsEmpty() const { return right <= left || bottom <= top; } - - bool Valid() const { - pdfium::base::CheckedNumeric w = right; - pdfium::base::CheckedNumeric h = bottom; - w -= left; - h -= top; - return w.IsValid() && h.IsValid(); - } - - void Normalize(); - - void Intersect(const FX_RECT& src); - void Intersect(int l, int t, int r, int b) { Intersect(FX_RECT(l, t, r, b)); } - - void Union(const FX_RECT& other_rect); - void Union(int l, int t, int r, int b) { Union(FX_RECT(l, t, r, b)); } - - void Offset(int dx, int dy) { - left += dx; - right += dx; - top += dy; - bottom += dy; - } - - bool operator==(const FX_RECT& src) const { - return left == src.left && right == src.right && top == src.top && - bottom == src.bottom; - } - - bool Contains(const FX_RECT& other_rect) const { - return other_rect.left >= left && other_rect.right <= right && - other_rect.top >= top && other_rect.bottom <= bottom; - } - - bool Contains(int x, int y) const { - return x >= left && x < right && y >= top && y < bottom; - } - - int32_t left; - int32_t top; - int32_t right; - int32_t bottom; -}; - -// LBRT rectangles (y-axis runs upwards). -class CFX_FloatPoint { - public: - CFX_FloatPoint() : x(0.0f), y(0.0f) {} - CFX_FloatPoint(FX_FLOAT xx, FX_FLOAT yy) : x(xx), y(yy) {} - - bool operator==(const CFX_FloatPoint& that) const { - return x == that.x && y == that.y; - } - bool operator!=(const CFX_FloatPoint& that) const { return !(*this == that); } - - FX_FLOAT x; - FX_FLOAT y; -}; - -// LTWH rectangles (y-axis runs downwards). -template -class CFX_RTemplate { - public: - typedef CFX_PSTemplate FXT_POINT; - typedef CFX_PSTemplate FXT_SIZE; - typedef CFX_VTemplate FXT_VECTOR; - typedef CFX_RTemplate FXT_RECT; - void Set(baseType dst_left, - baseType dst_top, - baseType dst_width, - baseType dst_height) { - left = dst_left; - top = dst_top; - width = dst_width; - height = dst_height; - } - void Set(baseType dst_left, baseType dst_top, const FXT_SIZE& dst_size) { - left = dst_left; - top = dst_top; - Size(dst_size); - } - void Set(const FXT_POINT& p, baseType dst_width, baseType dst_height) { - TopLeft(p); - width = dst_width; - height = dst_height; - } - void Set(const FXT_POINT& p1, const FXT_POINT& p2) { - TopLeft(p1); - width = p2.x - p1.x; - height = p2.y - p1.y; - Normalize(); - } - void Set(const FXT_POINT& p, const FXT_VECTOR& v) { - TopLeft(p); - width = v.x; - height = v.y; - Normalize(); - } - void Reset() { - left = 0; - top = 0; - width = 0; - height = 0; - } - FXT_RECT& operator+=(const FXT_POINT& p) { - left += p.x; - top += p.y; - return *this; - } - FXT_RECT& operator-=(const FXT_POINT& p) { - left -= p.x; - top -= p.y; - return *this; - } - baseType right() const { return left + width; } - baseType bottom() const { return top + height; } - void Normalize() { - if (width < 0) { - left += width; - width = -width; - } - if (height < 0) { - top += height; - height = -height; - } - } - void Offset(baseType dx, baseType dy) { - left += dx; - top += dy; - } - void Inflate(baseType x, baseType y) { - left -= x; - width += x * 2; - top -= y; - height += y * 2; - } - void Inflate(const FXT_POINT& p) { Inflate(p.x, p.y); } - void Inflate(baseType off_left, - baseType off_top, - baseType off_right, - baseType off_bottom) { - left -= off_left; - top -= off_top; - width += off_left + off_right; - height += off_top + off_bottom; - } - void Inflate(const FXT_RECT& rt) { - Inflate(rt.left, rt.top, rt.left + rt.width, rt.top + rt.height); - } - void Deflate(baseType x, baseType y) { - left += x; - width -= x * 2; - top += y; - height -= y * 2; - } - void Deflate(const FXT_POINT& p) { Deflate(p.x, p.y); } - void Deflate(baseType off_left, - baseType off_top, - baseType off_right, - baseType off_bottom) { - left += off_left; - top += off_top; - width -= off_left + off_right; - height -= off_top + off_bottom; - } - void Deflate(const FXT_RECT& rt) { - Deflate(rt.left, rt.top, rt.top + rt.width, rt.top + rt.height); - } - FX_BOOL IsEmpty() const { return width <= 0 || height <= 0; } - FX_BOOL IsEmpty(FX_FLOAT fEpsilon) const { - return width <= fEpsilon || height <= fEpsilon; - } - void Empty() { width = height = 0; } - bool Contains(baseType x, baseType y) const { - return x >= left && x < left + width && y >= top && y < top + height; - } - bool Contains(const FXT_POINT& p) const { return Contains(p.x, p.y); } - bool Contains(const FXT_RECT& rt) const { - return rt.left >= left && rt.right() <= right() && rt.top >= top && - rt.bottom() <= bottom(); - } - baseType Width() const { return width; } - baseType Height() const { return height; } - FXT_SIZE Size() const { - FXT_SIZE size; - size.Set(width, height); - return size; - } - void Size(FXT_SIZE s) { width = s.x, height = s.y; } - FXT_POINT TopLeft() const { - FXT_POINT p; - p.x = left; - p.y = top; - return p; - } - FXT_POINT TopRight() const { - FXT_POINT p; - p.x = left + width; - p.y = top; - return p; - } - FXT_POINT BottomLeft() const { - FXT_POINT p; - p.x = left; - p.y = top + height; - return p; - } - FXT_POINT BottomRight() const { - FXT_POINT p; - p.x = left + width; - p.y = top + height; - return p; - } - void TopLeft(FXT_POINT tl) { - left = tl.x; - top = tl.y; - } - void TopRight(FXT_POINT tr) { - width = tr.x - left; - top = tr.y; - } - void BottomLeft(FXT_POINT bl) { - left = bl.x; - height = bl.y - top; - } - void BottomRight(FXT_POINT br) { - width = br.x - left; - height = br.y - top; - } - FXT_POINT Center() const { - FXT_POINT p; - p.x = left + width / 2; - p.y = top + height / 2; - return p; - } - void Union(baseType x, baseType y) { - baseType r = right(); - baseType b = bottom(); - if (left > x) - left = x; - if (r < x) - r = x; - if (top > y) - top = y; - if (b < y) - b = y; - width = r - left; - height = b - top; - } - void Union(const FXT_POINT& p) { Union(p.x, p.y); } - void Union(const FXT_RECT& rt) { - baseType r = right(); - baseType b = bottom(); - if (left > rt.left) - left = rt.left; - if (r < rt.right()) - r = rt.right(); - if (top > rt.top) - top = rt.top; - if (b < rt.bottom()) - b = rt.bottom(); - width = r - left; - height = b - top; - } - void Intersect(const FXT_RECT& rt) { - baseType r = right(); - baseType b = bottom(); - if (left < rt.left) - left = rt.left; - if (r > rt.right()) - r = rt.right(); - if (top < rt.top) - top = rt.top; - if (b > rt.bottom()) - b = rt.bottom(); - width = r - left; - height = b - top; - } - FX_BOOL IntersectWith(const FXT_RECT& rt) const { - FXT_RECT rect = rt; - rect.Intersect(*this); - return !rect.IsEmpty(); - } - FX_BOOL IntersectWith(const FXT_RECT& rt, FX_FLOAT fEpsilon) const { - FXT_RECT rect = rt; - rect.Intersect(*this); - return !rect.IsEmpty(fEpsilon); - } - friend bool operator==(const FXT_RECT& rc1, const FXT_RECT& rc2) { - return rc1.left == rc2.left && rc1.top == rc2.top && - rc1.width == rc2.width && rc1.height == rc2.height; - } - friend bool operator!=(const FXT_RECT& rc1, const FXT_RECT& rc2) { - return !(rc1 == rc2); - } - baseType left, top; - baseType width, height; -}; -typedef CFX_RTemplate CFX_Rect; -typedef CFX_RTemplate CFX_RectF; -typedef CFX_ArrayTemplate CFX_RectFArray; - -class CFX_FloatRect { - public: - CFX_FloatRect() : CFX_FloatRect(0.0f, 0.0f, 0.0f, 0.0f) {} - CFX_FloatRect(FX_FLOAT l, FX_FLOAT b, FX_FLOAT r, FX_FLOAT t) - : left(l), bottom(b), right(r), top(t) {} - - explicit CFX_FloatRect(const FX_FLOAT* pArray) - : CFX_FloatRect(pArray[0], pArray[1], pArray[2], pArray[3]) {} - - explicit CFX_FloatRect(const FX_RECT& rect); - - void Normalize(); - - void Reset() { - left = 0.0f; - right = 0.0f; - bottom = 0.0f; - top = 0.0f; - } - - bool IsEmpty() const { return left >= right || bottom >= top; } - bool Contains(const CFX_FloatRect& other_rect) const; - bool Contains(FX_FLOAT x, FX_FLOAT y) const; - - void Transform(const CFX_Matrix* pMatrix); - void Intersect(const CFX_FloatRect& other_rect); - void Union(const CFX_FloatRect& other_rect); - - FX_RECT GetInnerRect() const; - FX_RECT GetOuterRect() const; - FX_RECT GetClosestRect() const; - - int Substract4(CFX_FloatRect& substract_rect, CFX_FloatRect* pRects); - - void InitRect(FX_FLOAT x, FX_FLOAT y) { - left = x; - right = x; - bottom = y; - top = y; - } - void UpdateRect(FX_FLOAT x, FX_FLOAT y); - - FX_FLOAT Width() const { return right - left; } - FX_FLOAT Height() const { return top - bottom; } - - void Inflate(FX_FLOAT x, FX_FLOAT y) { - Normalize(); - left -= x; - right += x; - bottom -= y; - top += y; - } - - void Inflate(FX_FLOAT other_left, - FX_FLOAT other_bottom, - FX_FLOAT other_right, - FX_FLOAT other_top) { - Normalize(); - left -= other_left; - bottom -= other_bottom; - right += other_right; - top += other_top; - } - - void Inflate(const CFX_FloatRect& rt) { - Inflate(rt.left, rt.bottom, rt.right, rt.top); - } - - void Deflate(FX_FLOAT x, FX_FLOAT y) { - Normalize(); - left += x; - right -= x; - bottom += y; - top -= y; - } - - void Deflate(FX_FLOAT other_left, - FX_FLOAT other_bottom, - FX_FLOAT other_right, - FX_FLOAT other_top) { - Normalize(); - left += other_left; - bottom += other_bottom; - right -= other_right; - top -= other_top; - } - - void Deflate(const CFX_FloatRect& rt) { - Deflate(rt.left, rt.bottom, rt.right, rt.top); - } - - void Translate(FX_FLOAT e, FX_FLOAT f) { - left += e; - right += e; - top += f; - bottom += f; - } - - static CFX_FloatRect GetBBox(const CFX_PointF* pPoints, int nPoints); - - FX_RECT ToFxRect() const { - return FX_RECT(static_cast(left), static_cast(top), - static_cast(right), static_cast(bottom)); - } - - static CFX_FloatRect FromCFXRectF(const CFX_RectF& rect) { - return CFX_FloatRect(rect.left, rect.top, rect.right(), rect.bottom()); - } - - FX_FLOAT left; - FX_FLOAT bottom; - FX_FLOAT right; - FX_FLOAT top; -}; - -class CFX_Matrix { - public: - CFX_Matrix() { SetIdentity(); } - - CFX_Matrix(FX_FLOAT a1, - FX_FLOAT b1, - FX_FLOAT c1, - FX_FLOAT d1, - FX_FLOAT e1, - FX_FLOAT f1) { - a = a1; - b = b1; - c = c1; - d = d1; - e = e1; - f = f1; - } - - void Set(FX_FLOAT a, - FX_FLOAT b, - FX_FLOAT c, - FX_FLOAT d, - FX_FLOAT e, - FX_FLOAT f); - void Set(const FX_FLOAT n[6]); - - void SetIdentity() { - a = d = 1; - b = c = e = f = 0; - } - - void SetReverse(const CFX_Matrix& m); - - void Concat(FX_FLOAT a, - FX_FLOAT b, - FX_FLOAT c, - FX_FLOAT d, - FX_FLOAT e, - FX_FLOAT f, - FX_BOOL bPrepended = FALSE); - void Concat(const CFX_Matrix& m, FX_BOOL bPrepended = FALSE); - void ConcatInverse(const CFX_Matrix& m, FX_BOOL bPrepended = FALSE); - - FX_BOOL IsIdentity() const { - return a == 1 && b == 0 && c == 0 && d == 1 && e == 0 && f == 0; - } - - FX_BOOL IsInvertible() const; - FX_BOOL Is90Rotated() const; - FX_BOOL IsScaled() const; - - void Translate(FX_FLOAT x, FX_FLOAT y, FX_BOOL bPrepended = FALSE); - void TranslateI(int32_t x, int32_t y, FX_BOOL bPrepended = FALSE) { - Translate((FX_FLOAT)x, (FX_FLOAT)y, bPrepended); - } - - void Scale(FX_FLOAT sx, FX_FLOAT sy, FX_BOOL bPrepended = FALSE); - void Rotate(FX_FLOAT fRadian, FX_BOOL bPrepended = FALSE); - void RotateAt(FX_FLOAT fRadian, - FX_FLOAT x, - FX_FLOAT y, - FX_BOOL bPrepended = FALSE); - - void Shear(FX_FLOAT fAlphaRadian, - FX_FLOAT fBetaRadian, - FX_BOOL bPrepended = FALSE); - - void MatchRect(const CFX_FloatRect& dest, const CFX_FloatRect& src); - FX_FLOAT GetXUnit() const; - FX_FLOAT GetYUnit() const; - void GetUnitRect(CFX_RectF& rect) const; - CFX_FloatRect GetUnitRect() const; - - FX_FLOAT GetUnitArea() const; - FX_FLOAT TransformXDistance(FX_FLOAT dx) const; - int32_t TransformXDistance(int32_t dx) const; - FX_FLOAT TransformYDistance(FX_FLOAT dy) const; - int32_t TransformYDistance(int32_t dy) const; - FX_FLOAT TransformDistance(FX_FLOAT dx, FX_FLOAT dy) const; - int32_t TransformDistance(int32_t dx, int32_t dy) const; - FX_FLOAT TransformDistance(FX_FLOAT distance) const; - - void TransformPoint(FX_FLOAT& x, FX_FLOAT& y) const; - void TransformPoint(int32_t& x, int32_t& y) const; - - void Transform(FX_FLOAT& x, FX_FLOAT& y) const { TransformPoint(x, y); } - void Transform(FX_FLOAT x, FX_FLOAT y, FX_FLOAT& x1, FX_FLOAT& y1) const { - x1 = x, y1 = y; - TransformPoint(x1, y1); - } - - void TransformVector(CFX_VectorF& v) const; - void TransformVector(CFX_Vector& v) const; - void TransformRect(CFX_RectF& rect) const; - void TransformRect(CFX_Rect& rect) const; - void TransformRect(FX_FLOAT& left, - FX_FLOAT& right, - FX_FLOAT& top, - FX_FLOAT& bottom) const; - void TransformRect(CFX_FloatRect& rect) const { - TransformRect(rect.left, rect.right, rect.top, rect.bottom); - } - - FX_FLOAT GetA() const { return a; } - FX_FLOAT GetB() const { return b; } - FX_FLOAT GetC() const { return c; } - FX_FLOAT GetD() const { return d; } - FX_FLOAT GetE() const { return e; } - FX_FLOAT GetF() const { return f; } - - public: - FX_FLOAT a; - FX_FLOAT b; - FX_FLOAT c; - FX_FLOAT d; - FX_FLOAT e; - FX_FLOAT f; -}; - -#endif // CORE_FXCRT_INCLUDE_FX_COORDINATES_H_ diff --git a/core/fxcrt/include/fx_ext.h b/core/fxcrt/include/fx_ext.h deleted file mode 100644 index e33d57bdb7..0000000000 --- a/core/fxcrt/include/fx_ext.h +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef CORE_FXCRT_INCLUDE_FX_EXT_H_ -#define CORE_FXCRT_INCLUDE_FX_EXT_H_ - -#include -#include - -#include "core/fxcrt/include/fx_basic.h" - -#define FX_INVALID_OFFSET static_cast(-1) - -// TODO(thestig) Using unique_ptr with ReleaseDeleter is still not ideal. -// Come up or wait for something better. This appears in this file rather -// than fx_stream.h due to include ordering restrictions. -using ScopedFileStream = - std::unique_ptr>; - -FX_FLOAT FXSYS_tan(FX_FLOAT a); -FX_FLOAT FXSYS_logb(FX_FLOAT b, FX_FLOAT x); -FX_FLOAT FXSYS_strtof(const FX_CHAR* pcsStr, - int32_t iLength = -1, - int32_t* pUsedLen = nullptr); -FX_FLOAT FXSYS_wcstof(const FX_WCHAR* pwsStr, - int32_t iLength = -1, - int32_t* pUsedLen = nullptr); -FX_WCHAR* FXSYS_wcsncpy(FX_WCHAR* dstStr, const FX_WCHAR* srcStr, size_t count); -int32_t FXSYS_wcsnicmp(const FX_WCHAR* s1, const FX_WCHAR* s2, size_t count); -int32_t FXSYS_strnicmp(const FX_CHAR* s1, const FX_CHAR* s2, size_t count); - -inline bool FXSYS_islower(int32_t ch) { - return ch >= 'a' && ch <= 'z'; -} -inline bool FXSYS_isupper(int32_t ch) { - return ch >= 'A' && ch <= 'Z'; -} -inline int32_t FXSYS_tolower(int32_t ch) { - return ch < 'A' || ch > 'Z' ? ch : (ch + 0x20); -} -inline int32_t FXSYS_toupper(int32_t ch) { - return ch < 'a' || ch > 'z' ? ch : (ch - 0x20); -} -inline bool FXSYS_iswalpha(wchar_t wch) { - return (wch >= L'A' && wch <= L'Z') || (wch >= L'a' && wch <= L'z'); -} -inline bool FXSYS_iswdigit(wchar_t wch) { - return wch >= L'0' && wch <= L'9'; -} -inline bool FXSYS_iswalnum(wchar_t wch) { - return FXSYS_iswalpha(wch) || FXSYS_iswdigit(wch); -} -inline bool FXSYS_iswspace(FX_WCHAR c) { - return (c == 0x20) || (c == 0x0d) || (c == 0x0a) || (c == 0x09); -} - -inline int FXSYS_toHexDigit(const FX_CHAR c) { - if (!std::isxdigit(c)) - return 0; - char upchar = std::toupper(c); - return upchar > '9' ? upchar - 'A' + 10 : upchar - '0'; -} - -inline bool FXSYS_isDecimalDigit(const FX_CHAR c) { - return !!std::isdigit(c); -} - -inline bool FXSYS_isDecimalDigit(const FX_WCHAR c) { - return !!std::iswdigit(c); -} - -inline int FXSYS_toDecimalDigit(const FX_CHAR c) { - return std::isdigit(c) ? c - '0' : 0; -} - -inline int FXSYS_toDecimalDigit(const FX_WCHAR c) { - return std::iswdigit(c) ? c - L'0' : 0; -} - -FX_FLOAT FXSYS_FractionalScale(size_t scale_factor, int value); -int FXSYS_FractionalScaleCount(); - -void* FX_Random_MT_Start(uint32_t dwSeed); -void FX_Random_MT_Close(void* pContext); -uint32_t FX_Random_MT_Generate(void* pContext); -void FX_Random_GenerateBase(uint32_t* pBuffer, int32_t iCount); -void FX_Random_GenerateMT(uint32_t* pBuffer, int32_t iCount); -void FX_Random_GenerateCrypto(uint32_t* pBuffer, int32_t iCount); - -#ifdef PDF_ENABLE_XFA -typedef struct FX_GUID { - uint32_t data1; - uint16_t data2; - uint16_t data3; - uint8_t data4[8]; -} FX_GUID, *FX_LPGUID; -typedef FX_GUID const* FX_LPCGUID; -void FX_GUID_CreateV4(FX_LPGUID pGUID); -void FX_GUID_ToString(FX_LPCGUID pGUID, - CFX_ByteString& bsStr, - FX_BOOL bSeparator = TRUE); -#endif // PDF_ENABLE_XFA - -template -class CFX_SSortTemplate { - public: - void ShellSort(baseType* pArray, int32_t iCount) { - ASSERT(pArray && iCount > 0); - int32_t i, j, gap; - baseType v1, v2; - gap = iCount >> 1; - while (gap > 0) { - for (i = gap; i < iCount; i++) { - j = i - gap; - v1 = pArray[i]; - while (j > -1 && (v2 = pArray[j]) > v1) { - pArray[j + gap] = v2; - j -= gap; - } - pArray[j + gap] = v1; - } - gap >>= 1; - } - } -}; - -#endif // CORE_FXCRT_INCLUDE_FX_EXT_H_ diff --git a/core/fxcrt/include/fx_memory.h b/core/fxcrt/include/fx_memory.h deleted file mode 100644 index a3eba2fd79..0000000000 --- a/core/fxcrt/include/fx_memory.h +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef CORE_FXCRT_INCLUDE_FX_MEMORY_H_ -#define CORE_FXCRT_INCLUDE_FX_MEMORY_H_ - -#include "core/fxcrt/include/fx_system.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// For external C libraries to malloc through PDFium. These may return nullptr. -void* FXMEM_DefaultAlloc(size_t byte_size, int flags); -void* FXMEM_DefaultRealloc(void* pointer, size_t new_size, int flags); -void FXMEM_DefaultFree(void* pointer, int flags); - -#ifdef __cplusplus -} // extern "C" - -#include -#include -#include -#include - -NEVER_INLINE void FX_OutOfMemoryTerminate(); - -inline void* FX_SafeRealloc(void* ptr, size_t num_members, size_t member_size) { - if (num_members < std::numeric_limits::max() / member_size) { - return realloc(ptr, num_members * member_size); - } - return nullptr; -} - -inline void* FX_AllocOrDie(size_t num_members, size_t member_size) { - // TODO(tsepez): See if we can avoid the implicit memset(0). - if (void* result = calloc(num_members, member_size)) { - return result; - } - FX_OutOfMemoryTerminate(); // Never returns. - return nullptr; // Suppress compiler warning. -} - -inline void* FX_AllocOrDie2D(size_t w, size_t h, size_t member_size) { - if (w < std::numeric_limits::max() / h) { - return FX_AllocOrDie(w * h, member_size); - } - FX_OutOfMemoryTerminate(); // Never returns. - return nullptr; // Suppress compiler warning. -} - -inline void* FX_ReallocOrDie(void* ptr, - size_t num_members, - size_t member_size) { - if (void* result = FX_SafeRealloc(ptr, num_members, member_size)) { - return result; - } - FX_OutOfMemoryTerminate(); // Never returns. - return nullptr; // Suppress compiler warning. -} - -// Never returns nullptr. -#define FX_Alloc(type, size) (type*) FX_AllocOrDie(size, sizeof(type)) -#define FX_Alloc2D(type, w, h) (type*) FX_AllocOrDie2D(w, h, sizeof(type)) -#define FX_Realloc(type, ptr, size) \ - (type*) FX_ReallocOrDie(ptr, size, sizeof(type)) - -// May return nullptr. -#define FX_TryAlloc(type, size) (type*) calloc(size, sizeof(type)) -#define FX_TryRealloc(type, ptr, size) \ - (type*) FX_SafeRealloc(ptr, size, sizeof(type)) - -#define FX_Free(ptr) free(ptr) - -// The FX_ArraySize(arr) macro returns the # of elements in an array arr. -// The expression is a compile-time constant, and therefore can be -// used in defining new arrays, for example. If you use FX_ArraySize on -// a pointer by mistake, you will get a compile-time error. -// -// One caveat is that FX_ArraySize() doesn't accept any array of an -// anonymous type or a type defined inside a function. -#define FX_ArraySize(array) (sizeof(ArraySizeHelper(array))) - -// This template function declaration is used in defining FX_ArraySize. -// Note that the function doesn't need an implementation, as we only -// use its type. -template -char(&ArraySizeHelper(T(&array)[N]))[N]; - -// Used with std::unique_ptr to FX_Free raw memory. -struct FxFreeDeleter { - inline void operator()(void* ptr) const { FX_Free(ptr); } -}; - -// Used with std::unique_ptr to Release() objects that can't be deleted. -template -struct ReleaseDeleter { - inline void operator()(T* ptr) const { ptr->Release(); } -}; - -// Used to help transfer ownership of a raw pointer to std::unique_ptr. -template -std::unique_ptr WrapUnique(T* ptr) { - return std::unique_ptr(ptr); -} - -#endif // __cplusplus - -#endif // CORE_FXCRT_INCLUDE_FX_MEMORY_H_ diff --git a/core/fxcrt/include/fx_safe_types.h b/core/fxcrt/include/fx_safe_types.h deleted file mode 100644 index f12e74906b..0000000000 --- a/core/fxcrt/include/fx_safe_types.h +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CORE_FXCRT_INCLUDE_FX_SAFE_TYPES_H_ -#define CORE_FXCRT_INCLUDE_FX_SAFE_TYPES_H_ - -#include // For size_t. - -#include "core/fxcrt/include/fx_stream.h" // for FX_FILESIZE. -#include "core/fxcrt/include/fx_system.h" -#include "third_party/base/numerics/safe_math.h" - -typedef pdfium::base::CheckedNumeric FX_SAFE_UINT32; -typedef pdfium::base::CheckedNumeric FX_SAFE_INT32; -typedef pdfium::base::CheckedNumeric FX_SAFE_SIZE_T; -typedef pdfium::base::CheckedNumeric FX_SAFE_FILESIZE; -typedef pdfium::base::CheckedNumeric FX_SAFE_STRSIZE; - -#endif // CORE_FXCRT_INCLUDE_FX_SAFE_TYPES_H_ diff --git a/core/fxcrt/include/fx_stream.h b/core/fxcrt/include/fx_stream.h deleted file mode 100644 index a91b59f285..0000000000 --- a/core/fxcrt/include/fx_stream.h +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef CORE_FXCRT_INCLUDE_FX_STREAM_H_ -#define CORE_FXCRT_INCLUDE_FX_STREAM_H_ - -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" - -void* FX_OpenFolder(const FX_CHAR* path); -void* FX_OpenFolder(const FX_WCHAR* path); -FX_BOOL FX_GetNextFile(void* handle, - CFX_ByteString& filename, - FX_BOOL& bFolder); -FX_BOOL FX_GetNextFile(void* handle, - CFX_WideString& filename, - FX_BOOL& bFolder); -void FX_CloseFolder(void* handle); -FX_WCHAR FX_GetFolderSeparator(); - -#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ -#define FX_FILESIZE int32_t -#else -#include -#include -#include - -#ifndef O_BINARY -#define O_BINARY 0 -#endif // O_BINARY - -#ifndef O_LARGEFILE -#define O_LARGEFILE 0 -#endif // O_LARGEFILE - -#define FX_FILESIZE off_t -#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ - -#define FX_GETBYTEOFFSET32(a) 0 -#define FX_GETBYTEOFFSET40(a) 0 -#define FX_GETBYTEOFFSET48(a) 0 -#define FX_GETBYTEOFFSET56(a) 0 -#define FX_GETBYTEOFFSET24(a) ((uint8_t)(a >> 24)) -#define FX_GETBYTEOFFSET16(a) ((uint8_t)(a >> 16)) -#define FX_GETBYTEOFFSET8(a) ((uint8_t)(a >> 8)) -#define FX_GETBYTEOFFSET0(a) ((uint8_t)(a)) -#define FX_FILEMODE_Write 0 -#define FX_FILEMODE_ReadOnly 1 -#define FX_FILEMODE_Truncate 2 - -class IFX_StreamWrite { - public: - virtual ~IFX_StreamWrite() {} - virtual void Release() = 0; - virtual FX_BOOL WriteBlock(const void* pData, size_t size) = 0; -}; - -class IFX_FileWrite : public IFX_StreamWrite { - public: - // IFX_StreamWrite: - FX_BOOL WriteBlock(const void* pData, size_t size) override; - virtual FX_FILESIZE GetSize() = 0; - virtual FX_BOOL Flush() = 0; - virtual FX_BOOL WriteBlock(const void* pData, - FX_FILESIZE offset, - size_t size) = 0; -}; - -class IFX_StreamRead { - public: - virtual ~IFX_StreamRead() {} - - virtual void Release() = 0; - virtual FX_BOOL IsEOF() = 0; - virtual FX_FILESIZE GetPosition() = 0; - virtual size_t ReadBlock(void* buffer, size_t size) = 0; -}; - -class IFX_FileRead : public IFX_StreamRead { - public: - // IFX_StreamRead: - void Release() override = 0; - FX_BOOL IsEOF() override; - FX_FILESIZE GetPosition() override; - size_t ReadBlock(void* buffer, size_t size) override; - - virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) = 0; - virtual FX_FILESIZE GetSize() = 0; -}; - -IFX_FileRead* FX_CreateFileRead(const FX_CHAR* filename); -IFX_FileRead* FX_CreateFileRead(const FX_WCHAR* filename); - -class IFX_FileStream : public IFX_FileRead, public IFX_FileWrite { - public: - virtual IFX_FileStream* Retain() = 0; - - // IFX_FileRead: - void Release() override = 0; - FX_BOOL IsEOF() override = 0; - FX_FILESIZE GetPosition() override = 0; - size_t ReadBlock(void* buffer, size_t size) override = 0; - FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override = 0; - FX_FILESIZE GetSize() override = 0; - - // IFX_FileWrite: - FX_BOOL WriteBlock(const void* buffer, - FX_FILESIZE offset, - size_t size) override = 0; - FX_BOOL WriteBlock(const void* buffer, size_t size) override; - FX_BOOL Flush() override = 0; -}; - -IFX_FileStream* FX_CreateFileStream(const FX_CHAR* filename, uint32_t dwModes); -IFX_FileStream* FX_CreateFileStream(const FX_WCHAR* filename, uint32_t dwModes); - -#ifdef PDF_ENABLE_XFA -class IFX_FileAccess { - public: - virtual ~IFX_FileAccess() {} - virtual void Release() = 0; - virtual IFX_FileAccess* Retain() = 0; - virtual void GetPath(CFX_WideString& wsPath) = 0; - virtual IFX_FileStream* CreateFileStream(uint32_t dwModes) = 0; -}; -IFX_FileAccess* FX_CreateDefaultFileAccess(const CFX_WideStringC& wsPath); -#endif // PDF_ENABLE_XFA - -class IFX_MemoryStream : public IFX_FileStream { - public: - virtual FX_BOOL IsConsecutive() const = 0; - virtual void EstimateSize(size_t nInitSize, size_t nGrowSize) = 0; - virtual uint8_t* GetBuffer() const = 0; - virtual void AttachBuffer(uint8_t* pBuffer, - size_t nSize, - FX_BOOL bTakeOver = FALSE) = 0; - virtual void DetachBuffer() = 0; -}; - -IFX_MemoryStream* FX_CreateMemoryStream(uint8_t* pBuffer, - size_t nSize, - FX_BOOL bTakeOver = FALSE); -IFX_MemoryStream* FX_CreateMemoryStream(FX_BOOL bConsecutive = FALSE); - -class IFX_BufferRead : public IFX_StreamRead { - public: - // IFX_StreamRead: - void Release() override = 0; - FX_BOOL IsEOF() override = 0; - FX_FILESIZE GetPosition() override = 0; - size_t ReadBlock(void* buffer, size_t size) override = 0; - - virtual FX_BOOL ReadNextBlock(FX_BOOL bRestart = FALSE) = 0; - virtual const uint8_t* GetBlockBuffer() = 0; - virtual size_t GetBlockSize() = 0; - virtual FX_FILESIZE GetBlockOffset() = 0; -}; - -#endif // CORE_FXCRT_INCLUDE_FX_STREAM_H_ diff --git a/core/fxcrt/include/fx_string.h b/core/fxcrt/include/fx_string.h deleted file mode 100644 index 6e9af221ca..0000000000 --- a/core/fxcrt/include/fx_string.h +++ /dev/null @@ -1,465 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef CORE_FXCRT_INCLUDE_FX_STRING_H_ -#define CORE_FXCRT_INCLUDE_FX_STRING_H_ - -#include // For intptr_t. - -#include -#include - -#include "core/fxcrt/cfx_string_c_template.h" -#include "core/fxcrt/cfx_string_data_template.h" -#include "core/fxcrt/include/cfx_retain_ptr.h" -#include "core/fxcrt/include/fx_memory.h" -#include "core/fxcrt/include/fx_system.h" - -class CFX_ByteString; -class CFX_WideString; - -using CFX_ByteStringC = CFX_StringCTemplate; -using CFX_WideStringC = CFX_StringCTemplate; - -#define FXBSTR_ID(c1, c2, c3, c4) \ - (((uint32_t)c1 << 24) | ((uint32_t)c2 << 16) | ((uint32_t)c3 << 8) | \ - ((uint32_t)c4)) - -#define FX_WSTRC(wstr) CFX_WideStringC(wstr, FX_ArraySize(wstr) - 1) - -// A mutable string with shared buffers using copy-on-write semantics that -// avoids the cost of std::string's iterator stability guarantees. -class CFX_ByteString { - public: - using CharType = FX_CHAR; - - CFX_ByteString(); - CFX_ByteString(const CFX_ByteString& other); - CFX_ByteString(CFX_ByteString&& other); - - // Deliberately implicit to avoid calling on every string literal. - CFX_ByteString(char ch); - CFX_ByteString(const FX_CHAR* ptr); - - CFX_ByteString(const FX_CHAR* ptr, FX_STRSIZE len); - CFX_ByteString(const uint8_t* ptr, FX_STRSIZE len); - - explicit CFX_ByteString(const CFX_ByteStringC& bstrc); - CFX_ByteString(const CFX_ByteStringC& bstrc1, const CFX_ByteStringC& bstrc2); - - ~CFX_ByteString(); - - void clear() { m_pData.Reset(); } - - static CFX_ByteString FromUnicode(const FX_WCHAR* ptr, FX_STRSIZE len = -1); - static CFX_ByteString FromUnicode(const CFX_WideString& str); - - // Explicit conversion to C-style string. - // Note: Any subsequent modification of |this| will invalidate the result. - const FX_CHAR* c_str() const { return m_pData ? m_pData->m_String : ""; } - - // Explicit conversion to uint8_t*. - // Note: Any subsequent modification of |this| will invalidate the result. - const uint8_t* raw_str() const { - return m_pData ? reinterpret_cast(m_pData->m_String) - : nullptr; - } - - // Explicit conversion to CFX_ByteStringC. - // Note: Any subsequent modification of |this| will invalidate the result. - CFX_ByteStringC AsStringC() const { - return CFX_ByteStringC(raw_str(), GetLength()); - } - - FX_STRSIZE GetLength() const { return m_pData ? m_pData->m_nDataLength : 0; } - bool IsEmpty() const { return !GetLength(); } - - int Compare(const CFX_ByteStringC& str) const; - bool EqualNoCase(const CFX_ByteStringC& str) const; - - bool operator==(const char* ptr) const; - bool operator==(const CFX_ByteStringC& str) const; - bool operator==(const CFX_ByteString& other) const; - - bool operator!=(const char* ptr) const { return !(*this == ptr); } - bool operator!=(const CFX_ByteStringC& str) const { return !(*this == str); } - bool operator!=(const CFX_ByteString& other) const { - return !(*this == other); - } - - bool operator<(const CFX_ByteString& str) const; - - const CFX_ByteString& operator=(const FX_CHAR* str); - const CFX_ByteString& operator=(const CFX_ByteStringC& bstrc); - const CFX_ByteString& operator=(const CFX_ByteString& stringSrc); - - const CFX_ByteString& operator+=(FX_CHAR ch); - const CFX_ByteString& operator+=(const FX_CHAR* str); - const CFX_ByteString& operator+=(const CFX_ByteString& str); - const CFX_ByteString& operator+=(const CFX_ByteStringC& bstrc); - - uint8_t GetAt(FX_STRSIZE nIndex) const { - return m_pData ? m_pData->m_String[nIndex] : 0; - } - - uint8_t operator[](FX_STRSIZE nIndex) const { - return m_pData ? m_pData->m_String[nIndex] : 0; - } - - void SetAt(FX_STRSIZE nIndex, FX_CHAR ch); - FX_STRSIZE Insert(FX_STRSIZE index, FX_CHAR ch); - FX_STRSIZE Delete(FX_STRSIZE index, FX_STRSIZE count = 1); - - void Format(const FX_CHAR* lpszFormat, ...); - void FormatV(const FX_CHAR* lpszFormat, va_list argList); - - void Reserve(FX_STRSIZE len); - FX_CHAR* GetBuffer(FX_STRSIZE len); - void ReleaseBuffer(FX_STRSIZE len = -1); - - CFX_ByteString Mid(FX_STRSIZE first) const; - CFX_ByteString Mid(FX_STRSIZE first, FX_STRSIZE count) const; - CFX_ByteString Left(FX_STRSIZE count) const; - CFX_ByteString Right(FX_STRSIZE count) const; - - FX_STRSIZE Find(const CFX_ByteStringC& lpszSub, FX_STRSIZE start = 0) const; - FX_STRSIZE Find(FX_CHAR ch, FX_STRSIZE start = 0) const; - FX_STRSIZE ReverseFind(FX_CHAR ch) const; - - void MakeLower(); - void MakeUpper(); - - void TrimRight(); - void TrimRight(FX_CHAR chTarget); - void TrimRight(const CFX_ByteStringC& lpszTargets); - - void TrimLeft(); - void TrimLeft(FX_CHAR chTarget); - void TrimLeft(const CFX_ByteStringC& lpszTargets); - - FX_STRSIZE Replace(const CFX_ByteStringC& lpszOld, - const CFX_ByteStringC& lpszNew); - - FX_STRSIZE Remove(FX_CHAR ch); - - CFX_WideString UTF8Decode() const; - - uint32_t GetID(FX_STRSIZE start_pos = 0) const; - -#define FXFORMAT_SIGNED 1 -#define FXFORMAT_HEX 2 -#define FXFORMAT_CAPITAL 4 - - static CFX_ByteString FormatInteger(int i, uint32_t flags = 0); - static CFX_ByteString FormatFloat(FX_FLOAT f, int precision = 0); - - protected: - using StringData = CFX_StringDataTemplate; - - void ReallocBeforeWrite(FX_STRSIZE nNewLen); - void AllocBeforeWrite(FX_STRSIZE nNewLen); - void AllocCopy(CFX_ByteString& dest, - FX_STRSIZE nCopyLen, - FX_STRSIZE nCopyIndex) const; - void AssignCopy(const FX_CHAR* pSrcData, FX_STRSIZE nSrcLen); - void Concat(const FX_CHAR* lpszSrcData, FX_STRSIZE nSrcLen); - - CFX_RetainPtr m_pData; - - friend class fxcrt_ByteStringConcat_Test; - friend class fxcrt_ByteStringPool_Test; -}; - -inline bool operator==(const char* lhs, const CFX_ByteString& rhs) { - return rhs == lhs; -} -inline bool operator==(const CFX_ByteStringC& lhs, const CFX_ByteString& rhs) { - return rhs == lhs; -} -inline bool operator!=(const char* lhs, const CFX_ByteString& rhs) { - return rhs != lhs; -} -inline bool operator!=(const CFX_ByteStringC& lhs, const CFX_ByteString& rhs) { - return rhs != lhs; -} - -inline CFX_ByteString operator+(const CFX_ByteStringC& str1, - const CFX_ByteStringC& str2) { - return CFX_ByteString(str1, str2); -} -inline CFX_ByteString operator+(const CFX_ByteStringC& str1, - const FX_CHAR* str2) { - return CFX_ByteString(str1, str2); -} -inline CFX_ByteString operator+(const FX_CHAR* str1, - const CFX_ByteStringC& str2) { - return CFX_ByteString(str1, str2); -} -inline CFX_ByteString operator+(const CFX_ByteStringC& str1, FX_CHAR ch) { - return CFX_ByteString(str1, CFX_ByteStringC(ch)); -} -inline CFX_ByteString operator+(FX_CHAR ch, const CFX_ByteStringC& str2) { - return CFX_ByteString(ch, str2); -} -inline CFX_ByteString operator+(const CFX_ByteString& str1, - const CFX_ByteString& str2) { - return CFX_ByteString(str1.AsStringC(), str2.AsStringC()); -} -inline CFX_ByteString operator+(const CFX_ByteString& str1, FX_CHAR ch) { - return CFX_ByteString(str1.AsStringC(), CFX_ByteStringC(ch)); -} -inline CFX_ByteString operator+(FX_CHAR ch, const CFX_ByteString& str2) { - return CFX_ByteString(ch, str2.AsStringC()); -} -inline CFX_ByteString operator+(const CFX_ByteString& str1, - const FX_CHAR* str2) { - return CFX_ByteString(str1.AsStringC(), str2); -} -inline CFX_ByteString operator+(const FX_CHAR* str1, - const CFX_ByteString& str2) { - return CFX_ByteString(str1, str2.AsStringC()); -} -inline CFX_ByteString operator+(const CFX_ByteString& str1, - const CFX_ByteStringC& str2) { - return CFX_ByteString(str1.AsStringC(), str2); -} -inline CFX_ByteString operator+(const CFX_ByteStringC& str1, - const CFX_ByteString& str2) { - return CFX_ByteString(str1, str2.AsStringC()); -} - -// A mutable string with shared buffers using copy-on-write semantics that -// avoids the cost of std::string's iterator stability guarantees. -class CFX_WideString { - public: - using CharType = FX_WCHAR; - - CFX_WideString(); - CFX_WideString(const CFX_WideString& other); - CFX_WideString(CFX_WideString&& other); - - // Deliberately implicit to avoid calling on every string literal. - CFX_WideString(FX_WCHAR ch); - CFX_WideString(const FX_WCHAR* ptr); - - CFX_WideString(const FX_WCHAR* ptr, FX_STRSIZE len); - - explicit CFX_WideString(const CFX_WideStringC& str); - CFX_WideString(const CFX_WideStringC& str1, const CFX_WideStringC& str2); - - ~CFX_WideString(); - - static CFX_WideString FromLocal(const CFX_ByteStringC& str); - static CFX_WideString FromCodePage(const CFX_ByteStringC& str, - uint16_t codepage); - - static CFX_WideString FromUTF8(const CFX_ByteStringC& str); - static CFX_WideString FromUTF16LE(const unsigned short* str, FX_STRSIZE len); - - static FX_STRSIZE WStringLength(const unsigned short* str); - - // Explicit conversion to C-style wide string. - // Note: Any subsequent modification of |this| will invalidate the result. - const FX_WCHAR* c_str() const { return m_pData ? m_pData->m_String : L""; } - - // Explicit conversion to CFX_WideStringC. - // Note: Any subsequent modification of |this| will invalidate the result. - CFX_WideStringC AsStringC() const { - return CFX_WideStringC(c_str(), GetLength()); - } - - void clear() { m_pData.Reset(); } - - FX_STRSIZE GetLength() const { return m_pData ? m_pData->m_nDataLength : 0; } - bool IsEmpty() const { return !GetLength(); } - - const CFX_WideString& operator=(const FX_WCHAR* str); - const CFX_WideString& operator=(const CFX_WideString& stringSrc); - const CFX_WideString& operator=(const CFX_WideStringC& stringSrc); - - const CFX_WideString& operator+=(const FX_WCHAR* str); - const CFX_WideString& operator+=(FX_WCHAR ch); - const CFX_WideString& operator+=(const CFX_WideString& str); - const CFX_WideString& operator+=(const CFX_WideStringC& str); - - bool operator==(const wchar_t* ptr) const; - bool operator==(const CFX_WideStringC& str) const; - bool operator==(const CFX_WideString& other) const; - - bool operator!=(const wchar_t* ptr) const { return !(*this == ptr); } - bool operator!=(const CFX_WideStringC& str) const { return !(*this == str); } - bool operator!=(const CFX_WideString& other) const { - return !(*this == other); - } - - bool operator<(const CFX_WideString& str) const; - - FX_WCHAR GetAt(FX_STRSIZE nIndex) const { - return m_pData ? m_pData->m_String[nIndex] : 0; - } - - FX_WCHAR operator[](FX_STRSIZE nIndex) const { - return m_pData ? m_pData->m_String[nIndex] : 0; - } - - void SetAt(FX_STRSIZE nIndex, FX_WCHAR ch); - - int Compare(const FX_WCHAR* str) const; - int Compare(const CFX_WideString& str) const; - int CompareNoCase(const FX_WCHAR* str) const; - - - CFX_WideString Mid(FX_STRSIZE first) const; - CFX_WideString Mid(FX_STRSIZE first, FX_STRSIZE count) const; - CFX_WideString Left(FX_STRSIZE count) const; - CFX_WideString Right(FX_STRSIZE count) const; - - FX_STRSIZE Insert(FX_STRSIZE index, FX_WCHAR ch); - FX_STRSIZE Delete(FX_STRSIZE index, FX_STRSIZE count = 1); - - void Format(const FX_WCHAR* lpszFormat, ...); - void FormatV(const FX_WCHAR* lpszFormat, va_list argList); - - void MakeLower(); - void MakeUpper(); - - void TrimRight(); - void TrimRight(FX_WCHAR chTarget); - void TrimRight(const CFX_WideStringC& pTargets); - - void TrimLeft(); - void TrimLeft(FX_WCHAR chTarget); - void TrimLeft(const CFX_WideStringC& pTargets); - - void Reserve(FX_STRSIZE len); - FX_WCHAR* GetBuffer(FX_STRSIZE len); - void ReleaseBuffer(FX_STRSIZE len = -1); - - int GetInteger() const; - FX_FLOAT GetFloat() const; - - FX_STRSIZE Find(const CFX_WideStringC& pSub, FX_STRSIZE start = 0) const; - FX_STRSIZE Find(FX_WCHAR ch, FX_STRSIZE start = 0) const; - FX_STRSIZE Replace(const CFX_WideStringC& pOld, const CFX_WideStringC& pNew); - FX_STRSIZE Remove(FX_WCHAR ch); - - CFX_ByteString UTF8Encode() const; - CFX_ByteString UTF16LE_Encode() const; - - protected: - using StringData = CFX_StringDataTemplate; - - void ReallocBeforeWrite(FX_STRSIZE nLen); - void AllocBeforeWrite(FX_STRSIZE nLen); - void AllocCopy(CFX_WideString& dest, - FX_STRSIZE nCopyLen, - FX_STRSIZE nCopyIndex) const; - void AssignCopy(const FX_WCHAR* pSrcData, FX_STRSIZE nSrcLen); - void Concat(const FX_WCHAR* lpszSrcData, FX_STRSIZE nSrcLen); - - CFX_RetainPtr m_pData; - - friend class fxcrt_WideStringConcatInPlace_Test; - friend class fxcrt_WideStringPool_Test; -}; - -inline CFX_WideString operator+(const CFX_WideStringC& str1, - const CFX_WideStringC& str2) { - return CFX_WideString(str1, str2); -} -inline CFX_WideString operator+(const CFX_WideStringC& str1, - const FX_WCHAR* str2) { - return CFX_WideString(str1, str2); -} -inline CFX_WideString operator+(const FX_WCHAR* str1, - const CFX_WideStringC& str2) { - return CFX_WideString(str1, str2); -} -inline CFX_WideString operator+(const CFX_WideStringC& str1, FX_WCHAR ch) { - return CFX_WideString(str1, CFX_WideStringC(ch)); -} -inline CFX_WideString operator+(FX_WCHAR ch, const CFX_WideStringC& str2) { - return CFX_WideString(ch, str2); -} -inline CFX_WideString operator+(const CFX_WideString& str1, - const CFX_WideString& str2) { - return CFX_WideString(str1.AsStringC(), str2.AsStringC()); -} -inline CFX_WideString operator+(const CFX_WideString& str1, FX_WCHAR ch) { - return CFX_WideString(str1.AsStringC(), CFX_WideStringC(ch)); -} -inline CFX_WideString operator+(FX_WCHAR ch, const CFX_WideString& str2) { - return CFX_WideString(ch, str2.AsStringC()); -} -inline CFX_WideString operator+(const CFX_WideString& str1, - const FX_WCHAR* str2) { - return CFX_WideString(str1.AsStringC(), str2); -} -inline CFX_WideString operator+(const FX_WCHAR* str1, - const CFX_WideString& str2) { - return CFX_WideString(str1, str2.AsStringC()); -} -inline CFX_WideString operator+(const CFX_WideString& str1, - const CFX_WideStringC& str2) { - return CFX_WideString(str1.AsStringC(), str2); -} -inline CFX_WideString operator+(const CFX_WideStringC& str1, - const CFX_WideString& str2) { - return CFX_WideString(str1, str2.AsStringC()); -} -inline bool operator==(const wchar_t* lhs, const CFX_WideString& rhs) { - return rhs == lhs; -} -inline bool operator==(const CFX_WideStringC& lhs, const CFX_WideString& rhs) { - return rhs == lhs; -} -inline bool operator!=(const wchar_t* lhs, const CFX_WideString& rhs) { - return rhs != lhs; -} -inline bool operator!=(const CFX_WideStringC& lhs, const CFX_WideString& rhs) { - return rhs != lhs; -} - -CFX_ByteString FX_UTF8Encode(const FX_WCHAR* pwsStr, FX_STRSIZE len); -inline CFX_ByteString FX_UTF8Encode(const CFX_WideStringC& wsStr) { - return FX_UTF8Encode(wsStr.c_str(), wsStr.GetLength()); -} -inline CFX_ByteString FX_UTF8Encode(const CFX_WideString& wsStr) { - return FX_UTF8Encode(wsStr.c_str(), wsStr.GetLength()); -} - -FX_FLOAT FX_atof(const CFX_ByteStringC& str); -inline FX_FLOAT FX_atof(const CFX_WideStringC& wsStr) { - return FX_atof(FX_UTF8Encode(wsStr.c_str(), wsStr.GetLength()).c_str()); -} -bool FX_atonum(const CFX_ByteStringC& str, void* pData); -FX_STRSIZE FX_ftoa(FX_FLOAT f, FX_CHAR* buf); - -uint32_t FX_HashCode_GetA(const CFX_ByteStringC& str, bool bIgnoreCase); -uint32_t FX_HashCode_GetW(const CFX_WideStringC& str, bool bIgnoreCase); - -namespace std { - -template <> -struct hash { - std::size_t operator()(const CFX_ByteString& str) const { - return FX_HashCode_GetA(str.AsStringC(), false); - } -}; - -template <> -struct hash { - std::size_t operator()(const CFX_WideString& str) const { - return FX_HashCode_GetW(str.AsStringC(), false); - } -}; - -} // namespace std - -extern template struct std::hash; -extern template struct std::hash; - -#endif // CORE_FXCRT_INCLUDE_FX_STRING_H_ diff --git a/core/fxcrt/include/fx_system.h b/core/fxcrt/include/fx_system.h deleted file mode 100644 index 0542f33047..0000000000 --- a/core/fxcrt/include/fx_system.h +++ /dev/null @@ -1,342 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef CORE_FXCRT_INCLUDE_FX_SYSTEM_H_ -#define CORE_FXCRT_INCLUDE_FX_SYSTEM_H_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// _FX_OS_ values: -#define _FX_WIN32_DESKTOP_ 1 -#define _FX_WIN64_DESKTOP_ 2 -#define _FX_LINUX_DESKTOP_ 4 -#define _FX_MACOSX_ 7 -#define _FX_ANDROID_ 12 - -// _FXM_PLATFORM_ values; -#define _FXM_PLATFORM_WINDOWS_ 1 // _FX_WIN32_DESKTOP_ or _FX_WIN64_DESKTOP_. -#define _FXM_PLATFORM_LINUX_ 2 // _FX_LINUX_DESKTOP_ always. -#define _FXM_PLATFORM_APPLE_ 3 // _FX_MACOSX_ always. -#define _FXM_PLATFORM_ANDROID_ 4 // _FX_ANDROID_ always. - -#ifndef _FX_OS_ -#if defined(__ANDROID__) -#define _FX_OS_ _FX_ANDROID_ -#define _FXM_PLATFORM_ _FXM_PLATFORM_ANDROID_ -#elif defined(_WIN32) -#define _FX_OS_ _FX_WIN32_DESKTOP_ -#define _FXM_PLATFORM_ _FXM_PLATFORM_WINDOWS_ -#elif defined(_WIN64) -#define _FX_OS_ _FX_WIN64_DESKTOP_ -#define _FXM_PLATFORM_ _FXM_PLATFORM_WINDOWS_ -#elif defined(__linux__) -#define _FX_OS_ _FX_LINUX_DESKTOP_ -#define _FXM_PLATFORM_ _FXM_PLATFORM_LINUX_ -#elif defined(__APPLE__) -#define _FX_OS_ _FX_MACOSX_ -#define _FXM_PLATFORM_ _FXM_PLATFORM_APPLE_ -#endif -#endif // _FX_OS_ - -#if !defined(_FX_OS_) || _FX_OS_ == 0 -#error Sorry, can not figure out target OS. Please specify _FX_OS_ macro. -#endif - -#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ -#include -#include -#endif - -#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ -#include -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif -typedef void* FX_POSITION; // Keep until fxcrt containers gone -typedef float FX_FLOAT; // Keep, allow upgrade to doubles. -typedef double FX_DOUBLE; // Keep, allow downgrade to floats. -typedef int FX_BOOL; // Keep, sadly not always 0 or 1. -typedef char FX_CHAR; // Keep, questionable signedness. -typedef wchar_t FX_WCHAR; // Keep, maybe bad platform wchars. - -#define IsFloatZero(f) ((f) < 0.0001 && (f) > -0.0001) -#define IsFloatBigger(fa, fb) ((fa) > (fb) && !IsFloatZero((fa) - (fb))) -#define IsFloatSmaller(fa, fb) ((fa) < (fb) && !IsFloatZero((fa) - (fb))) -#define IsFloatEqual(fa, fb) IsFloatZero(fa - fb) - -// PDFium string sizes are limited to 2^31-1, and the value is signed to -// allow -1 as a placeholder for "unknown". -// TODO(palmer): it should be a |size_t|, or at least unsigned. -typedef int FX_STRSIZE; - -#ifndef TRUE -#define TRUE 1 -#endif - -#ifndef FALSE -#define FALSE 0 -#endif - -#ifdef __cplusplus -static_assert(TRUE == true, "true_needs_to_be_true"); -static_assert(FALSE == false, "false_needs_to_be_false"); -#endif - -#ifndef ASSERT -#ifndef NDEBUG -#define ASSERT assert -#else -#define ASSERT(a) -#endif -#endif - -#if defined(__clang__) || defined(__GNUC__) -#define PDFIUM_IMMEDIATE_CRASH() __builtin_trap() -#else -#define PDFIUM_IMMEDIATE_CRASH() ((void)(*(volatile char*)0 = 0)) -#endif - -// M_PI not universally present on all platforms. -#define FX_PI 3.1415926535897932384626433832795f -#define FX_BEZIER 0.5522847498308f - -// NOTE: prevent use of the return value from snprintf() since some platforms -// have different return values (e.g. windows _vsnprintf()), and provide -// versions that always NUL-terminate. -#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ && _MSC_VER < 1900 -void FXSYS_snprintf(char* str, - size_t size, - _Printf_format_string_ const char* fmt, - ...); -void FXSYS_vsnprintf(char* str, size_t size, const char* fmt, va_list ap); -#else -#define FXSYS_snprintf (void) snprintf -#define FXSYS_vsnprintf (void) vsnprintf -#endif - -#define FXSYS_sprintf DO_NOT_USE_SPRINTF_DIE_DIE_DIE -#define FXSYS_vsprintf DO_NOT_USE_VSPRINTF_DIE_DIE_DIE -#define FXSYS_strncmp strncmp -#define FXSYS_strcmp strcmp -#define FXSYS_strcpy strcpy -#define FXSYS_strncpy strncpy -#define FXSYS_strstr strstr -#define FXSYS_FILE FILE -#define FXSYS_fopen fopen -#define FXSYS_fclose fclose -#define FXSYS_SEEK_END SEEK_END -#define FXSYS_SEEK_SET SEEK_SET -#define FXSYS_fseek fseek -#define FXSYS_ftell ftell -#define FXSYS_fread fread -#define FXSYS_fwrite fwrite -#define FXSYS_fprintf fprintf -#define FXSYS_fflush fflush - -#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ -#ifdef _NATIVE_WCHAR_T_DEFINED -#define FXSYS_wfopen(f, m) _wfopen((const wchar_t*)(f), (const wchar_t*)(m)) -#else -#define FXSYS_wfopen _wfopen -#endif -#else -FXSYS_FILE* FXSYS_wfopen(const FX_WCHAR* filename, const FX_WCHAR* mode); -#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ - -#ifdef __cplusplus -} // extern "C" - -#include "third_party/base/numerics/safe_conversions.h" - -#define FXSYS_strlen(ptr) pdfium::base::checked_cast(strlen(ptr)) -#define FXSYS_wcslen(ptr) pdfium::base::checked_cast(wcslen(ptr)) - -// Overloaded functions for C++ templates -inline FX_STRSIZE FXSYS_len(const FX_CHAR* ptr) { - return FXSYS_strlen(ptr); -} - -inline FX_STRSIZE FXSYS_len(const FX_WCHAR* ptr) { - return FXSYS_wcslen(ptr); -} - -inline int FXSYS_cmp(const FX_CHAR* ptr1, const FX_CHAR* ptr2, size_t len) { - return memcmp(ptr1, ptr2, len); -} - -inline int FXSYS_cmp(const FX_WCHAR* ptr1, const FX_WCHAR* ptr2, size_t len) { - return wmemcmp(ptr1, ptr2, len); -} - -inline const FX_CHAR* FXSYS_chr(const FX_CHAR* ptr, FX_CHAR ch, size_t len) { - return reinterpret_cast(memchr(ptr, ch, len)); -} - -inline const FX_WCHAR* FXSYS_chr(const FX_WCHAR* ptr, FX_WCHAR ch, size_t len) { - return wmemchr(ptr, ch, len); -} - -extern "C" { -#else -#define FXSYS_strlen(ptr) ((FX_STRSIZE)strlen(ptr)) -#define FXSYS_wcslen(ptr) ((FX_STRSIZE)wcslen(ptr)) -#endif - -#define FXSYS_wcscmp wcscmp -#define FXSYS_wcsstr wcsstr -#define FXSYS_wcsncmp wcsncmp -#define FXSYS_vswprintf vswprintf -#define FXSYS_mbstowcs mbstowcs -#define FXSYS_wcstombs wcstombs -#define FXSYS_memcmp memcmp -#define FXSYS_memcpy memcpy -#define FXSYS_memmove memmove -#define FXSYS_memset memset -#define FXSYS_qsort qsort -#define FXSYS_bsearch bsearch - -#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ -#define FXSYS_GetACP GetACP -#define FXSYS_itoa _itoa -#define FXSYS_strlwr _strlwr -#define FXSYS_strupr _strupr -#define FXSYS_stricmp _stricmp -#ifdef _NATIVE_WCHAR_T_DEFINED -#define FXSYS_wcsicmp(str1, str2) _wcsicmp((wchar_t*)(str1), (wchar_t*)(str2)) -#define FXSYS_WideCharToMultiByte(p1, p2, p3, p4, p5, p6, p7, p8) \ - WideCharToMultiByte(p1, p2, (const wchar_t*)(p3), p4, p5, p6, p7, p8) -#define FXSYS_MultiByteToWideChar(p1, p2, p3, p4, p5, p6) \ - MultiByteToWideChar(p1, p2, p3, p4, (wchar_t*)(p5), p6) -#define FXSYS_wcslwr(str) _wcslwr((wchar_t*)(str)) -#define FXSYS_wcsupr(str) _wcsupr((wchar_t*)(str)) -#else -#define FXSYS_wcsicmp _wcsicmp -#define FXSYS_WideCharToMultiByte WideCharToMultiByte -#define FXSYS_MultiByteToWideChar MultiByteToWideChar -#define FXSYS_wcslwr _wcslwr -#define FXSYS_wcsupr _wcsupr -#endif -#define FXSYS_GetFullPathName GetFullPathName -#define FXSYS_GetModuleFileName GetModuleFileName -#else -int FXSYS_GetACP(); -char* FXSYS_itoa(int value, char* str, int radix); -int FXSYS_WideCharToMultiByte(uint32_t codepage, - uint32_t dwFlags, - const wchar_t* wstr, - int wlen, - char* buf, - int buflen, - const char* default_str, - int* pUseDefault); -int FXSYS_MultiByteToWideChar(uint32_t codepage, - uint32_t dwFlags, - const char* bstr, - int blen, - wchar_t* buf, - int buflen); -uint32_t FXSYS_GetFullPathName(const char* filename, - uint32_t buflen, - char* buf, - char** filepart); -uint32_t FXSYS_GetModuleFileName(void* hModule, char* buf, uint32_t bufsize); -char* FXSYS_strlwr(char* str); -char* FXSYS_strupr(char* str); -int FXSYS_stricmp(const char*, const char*); -int FXSYS_wcsicmp(const wchar_t* str1, const wchar_t* str2); -wchar_t* FXSYS_wcslwr(wchar_t* str); -wchar_t* FXSYS_wcsupr(wchar_t* str); -#endif // _FXM_PLATFORM == _FXM_PLATFORM_WINDOWS_ - -#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ -#define FXSYS_pow(a, b) (FX_FLOAT) powf(a, b) -#else -#define FXSYS_pow(a, b) (FX_FLOAT) pow(a, b) -#endif -#define FXSYS_sqrt(a) (FX_FLOAT) sqrt(a) -#define FXSYS_fabs(a) (FX_FLOAT) fabs(a) -#define FXSYS_atan2(a, b) (FX_FLOAT) atan2(a, b) -#define FXSYS_ceil(a) (FX_FLOAT) ceil(a) -#define FXSYS_floor(a) (FX_FLOAT) floor(a) -#define FXSYS_cos(a) (FX_FLOAT) cos(a) -#define FXSYS_acos(a) (FX_FLOAT) acos(a) -#define FXSYS_sin(a) (FX_FLOAT) sin(a) -#define FXSYS_log(a) (FX_FLOAT) log(a) -#define FXSYS_log10(a) (FX_FLOAT) log10(a) -#define FXSYS_fmod(a, b) (FX_FLOAT) fmod(a, b) -#define FXSYS_abs abs -#define FXDWORD_GET_LSBFIRST(p) \ - ((static_cast(p[3]) << 24) | (static_cast(p[2]) << 16) | \ - (static_cast(p[1]) << 8) | (static_cast(p[0]))) -#define FXDWORD_GET_MSBFIRST(p) \ - ((static_cast(p[0]) << 24) | (static_cast(p[1]) << 16) | \ - (static_cast(p[2]) << 8) | (static_cast(p[3]))) -#define FXSYS_HIBYTE(word) ((uint8_t)((word) >> 8)) -#define FXSYS_LOBYTE(word) ((uint8_t)(word)) -#define FXSYS_HIWORD(dword) ((uint16_t)((dword) >> 16)) -#define FXSYS_LOWORD(dword) ((uint16_t)(dword)) -int32_t FXSYS_atoi(const FX_CHAR* str); -uint32_t FXSYS_atoui(const FX_CHAR* str); -int32_t FXSYS_wtoi(const FX_WCHAR* str); -int64_t FXSYS_atoi64(const FX_CHAR* str); -int64_t FXSYS_wtoi64(const FX_WCHAR* str); -const FX_CHAR* FXSYS_i64toa(int64_t value, FX_CHAR* str, int radix); -int FXSYS_round(FX_FLOAT f); -#define FXSYS_sqrt2(a, b) (FX_FLOAT) FXSYS_sqrt((a) * (a) + (b) * (b)) -#ifdef __cplusplus -}; -#endif - -// To print a size_t value in a portable way: -// size_t size; -// printf("xyz: %" PRIuS, size); -// The "u" in the macro corresponds to %u, and S is for "size". - -#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ - -#if (defined(_INTTYPES_H) || defined(_INTTYPES_H_)) && !defined(PRId64) -#error "inttypes.h has already been included before this header file, but " -#error "without __STDC_FORMAT_MACROS defined." -#endif - -#if !defined(__STDC_FORMAT_MACROS) -#define __STDC_FORMAT_MACROS -#endif - -#include - -#if !defined(PRIuS) -#define PRIuS "zu" -#endif - -#else // _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ - -#if !defined(PRIuS) -#define PRIuS "Iu" -#endif - -#endif // _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ - -// Prevent a function from ever being inlined, typically because we'd -// like it to appear in stack traces. -#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ -#define NEVER_INLINE __declspec(noinline) -#else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ -#define NEVER_INLINE __attribute__((__noinline__)) -#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ - -#endif // CORE_FXCRT_INCLUDE_FX_SYSTEM_H_ diff --git a/core/fxcrt/include/fx_ucd.h b/core/fxcrt/include/fx_ucd.h deleted file mode 100644 index eeecd39cbf..0000000000 --- a/core/fxcrt/include/fx_ucd.h +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef CORE_FXCRT_INCLUDE_FX_UCD_H_ -#define CORE_FXCRT_INCLUDE_FX_UCD_H_ - -#include "core/fxcrt/include/fx_basic.h" - -#define FX_BIDICLASSBITS 6 -#define FX_BIDICLASSBITSMASK (31 << FX_BIDICLASSBITS) - -enum FX_BIDICLASS { - FX_BIDICLASS_ON = 0, // Other Neutral - FX_BIDICLASS_L = 1, // Left Letter - FX_BIDICLASS_R = 2, // Right Letter - FX_BIDICLASS_AN = 3, // Arabic Number - FX_BIDICLASS_EN = 4, // European Number - FX_BIDICLASS_AL = 5, // Arabic Letter - FX_BIDICLASS_NSM = 6, // Non-spacing Mark - FX_BIDICLASS_CS = 7, // Common Number Separator - FX_BIDICLASS_ES = 8, // European Separator - FX_BIDICLASS_ET = 9, // European Number Terminator - FX_BIDICLASS_BN = 10, // Boundary Neutral - FX_BIDICLASS_S = 11, // Segment Separator - FX_BIDICLASS_WS = 12, // Whitespace - FX_BIDICLASS_B = 13, // Paragraph Separator - FX_BIDICLASS_RLO = 14, // Right-to-Left Override - FX_BIDICLASS_RLE = 15, // Right-to-Left Embedding - FX_BIDICLASS_LRO = 16, // Left-to-Right Override - FX_BIDICLASS_LRE = 17, // Left-to-Right Embedding - FX_BIDICLASS_PDF = 18, // Pop Directional Format - FX_BIDICLASS_N = FX_BIDICLASS_ON, -}; - -extern const uint32_t kTextLayoutCodeProperties[]; -extern const size_t kTextLayoutCodePropertiesSize; - -extern const uint16_t kFXTextLayoutVerticalMirror[]; -extern const size_t kFXTextLayoutVerticalMirrorSize; - -extern const uint16_t kFXTextLayoutBidiMirror[]; -extern const size_t kFXTextLayoutBidiMirrorSize; - -uint32_t FX_GetUnicodeProperties(FX_WCHAR wch); -FX_WCHAR FX_GetMirrorChar(FX_WCHAR wch, FX_BOOL bRTL, FX_BOOL bVertical); - -#ifdef PDF_ENABLE_XFA -enum FX_CHARBREAKPROP { - FX_CBP_OP = 0, - FX_CBP_CL = 1, - FX_CBP_QU = 2, - FX_CBP_GL = 3, - FX_CBP_NS = 4, - FX_CBP_EX = 5, - FX_CBP_SY = 6, - FX_CBP_IS = 7, - FX_CBP_PR = 8, - FX_CBP_PO = 9, - FX_CBP_NU = 10, - FX_CBP_AL = 11, - FX_CBP_ID = 12, - FX_CBP_IN = 13, - FX_CBP_HY = 14, - FX_CBP_BA = 15, - FX_CBP_BB = 16, - FX_CBP_B2 = 17, - FX_CBP_ZW = 18, - FX_CBP_CM = 19, - FX_CBP_WJ = 20, - FX_CBP_H2 = 21, - FX_CBP_H3 = 22, - FX_CBP_JL = 23, - FX_CBP_JV = 24, - FX_CBP_JT = 25, - - FX_CBP_BK = 26, - FX_CBP_CR = 27, - FX_CBP_LF = 28, - FX_CBP_NL = 29, - FX_CBP_SA = 30, - FX_CBP_SG = 31, - FX_CBP_CB = 32, - FX_CBP_XX = 33, - FX_CBP_AI = 34, - FX_CBP_SP = 35, - FX_CBP_TB = 37, - FX_CBP_NONE = 36, -}; - -#define FX_CHARTYPEBITS 11 -#define FX_CHARTYPEBITSMASK (15 << FX_CHARTYPEBITS) -enum FX_CHARTYPE { - FX_CHARTYPE_Unknown = 0, - FX_CHARTYPE_Tab = (1 << FX_CHARTYPEBITS), - FX_CHARTYPE_Space = (2 << FX_CHARTYPEBITS), - FX_CHARTYPE_Control = (3 << FX_CHARTYPEBITS), - FX_CHARTYPE_Combination = (4 << FX_CHARTYPEBITS), - FX_CHARTYPE_Numeric = (5 << FX_CHARTYPEBITS), - FX_CHARTYPE_Normal = (6 << FX_CHARTYPEBITS), - FX_CHARTYPE_ArabicAlef = (7 << FX_CHARTYPEBITS), - FX_CHARTYPE_ArabicSpecial = (8 << FX_CHARTYPEBITS), - FX_CHARTYPE_ArabicDistortion = (9 << FX_CHARTYPEBITS), - FX_CHARTYPE_ArabicNormal = (10 << FX_CHARTYPEBITS), - FX_CHARTYPE_ArabicForm = (11 << FX_CHARTYPEBITS), - FX_CHARTYPE_Arabic = (12 << FX_CHARTYPEBITS), -}; -inline FX_CHARTYPE GetCharTypeFromProp(uint32_t prop) { - return static_cast(prop & FX_CHARTYPEBITSMASK); -} - -FX_BOOL FX_IsCtrlCode(FX_WCHAR ch); -FX_WCHAR FX_GetMirrorChar(FX_WCHAR wch, - uint32_t dwProps, - FX_BOOL bRTL, - FX_BOOL bVertical); -class CFX_Char { - public: - CFX_Char() - : m_wCharCode(0), - m_nBreakType(0), - m_nRotation(0), - m_dwCharProps(0), - m_dwCharStyles(0), - m_iCharWidth(0), - m_iHorizontalScale(100), - m_iVertialScale(100) {} - CFX_Char(uint16_t wCharCode, uint32_t dwCharProps) - : m_wCharCode(wCharCode), - m_nBreakType(0), - m_nRotation(0), - m_dwCharProps(dwCharProps), - m_dwCharStyles(0), - m_iCharWidth(0), - m_iHorizontalScale(100), - m_iVertialScale(100) {} - - FX_CHARTYPE GetCharType() const { return GetCharTypeFromProp(m_dwCharProps); } - - uint16_t m_wCharCode; - uint8_t m_nBreakType; - int8_t m_nRotation; - uint32_t m_dwCharProps; - uint32_t m_dwCharStyles; - int32_t m_iCharWidth; - int32_t m_iHorizontalScale; - int32_t m_iVertialScale; -}; -typedef CFX_ArrayTemplate CFX_CharArray; -class CFX_TxtChar : public CFX_Char { - public: - CFX_TxtChar() - : m_dwStatus(0), - m_iBidiClass(0), - m_iBidiLevel(0), - m_iBidiPos(0), - m_iBidiOrder(0), - m_pUserData(nullptr) {} - uint32_t m_dwStatus; - int16_t m_iBidiClass; - int16_t m_iBidiLevel; - int16_t m_iBidiPos; - int16_t m_iBidiOrder; - void* m_pUserData; -}; -typedef CFX_ArrayTemplate CFX_TxtCharArray; -class CFX_RTFChar : public CFX_Char { - public: - CFX_RTFChar(); - CFX_RTFChar(const CFX_RTFChar& other); - - uint32_t m_dwStatus; - int32_t m_iFontSize; - int32_t m_iFontHeight; - int16_t m_iBidiClass; - int16_t m_iBidiLevel; - int16_t m_iBidiPos; - int16_t m_iBidiOrder; - uint32_t m_dwLayoutStyles; - uint32_t m_dwIdentity; - IFX_Retainable* m_pUserData; -}; - -inline CFX_RTFChar::CFX_RTFChar() - : m_dwStatus(0), - m_iFontSize(0), - m_iFontHeight(0), - m_iBidiClass(0), - m_iBidiLevel(0), - m_iBidiPos(0), - m_dwLayoutStyles(0), - m_dwIdentity(0), - m_pUserData(nullptr) {} - -inline CFX_RTFChar::CFX_RTFChar(const CFX_RTFChar& other) = default; - -typedef CFX_ArrayTemplate CFX_RTFCharArray; -#endif // PDF_ENABLE_XFA - -#endif // CORE_FXCRT_INCLUDE_FX_UCD_H_ diff --git a/core/fxcrt/include/fx_xml.h b/core/fxcrt/include/fx_xml.h deleted file mode 100644 index 4db4998c32..0000000000 --- a/core/fxcrt/include/fx_xml.h +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef CORE_FXCRT_INCLUDE_FX_XML_H_ -#define CORE_FXCRT_INCLUDE_FX_XML_H_ - -#include -#include - -#include "core/fxcrt/include/fx_basic.h" - -class CXML_AttrItem { - public: - bool Matches(const CFX_ByteString& space, const CFX_ByteString& name) const; - - CFX_ByteString m_QSpaceName; - CFX_ByteString m_AttrName; - CFX_WideString m_Value; -}; - -class CXML_AttrMap { - public: - CXML_AttrMap(); - ~CXML_AttrMap(); - - const CFX_WideString* Lookup(const CFX_ByteString& space, - const CFX_ByteString& name) const; - int GetSize() const; - CXML_AttrItem& GetAt(int index) const; - - void SetAt(const CFX_ByteString& space, - const CFX_ByteString& name, - const CFX_WideString& value); - - std::unique_ptr> m_pMap; -}; - -class CXML_Content { - public: - CXML_Content() : m_bCDATA(FALSE), m_Content() {} - void Set(FX_BOOL bCDATA, const CFX_WideStringC& content) { - m_bCDATA = bCDATA; - m_Content = content; - } - - FX_BOOL m_bCDATA; - CFX_WideString m_Content; -}; - -class CXML_Element { - public: - enum ChildType { Invalid, Element, Content }; - - static CXML_Element* Parse(const void* pBuffer, - size_t size, - FX_BOOL bSaveSpaceChars = FALSE, - FX_FILESIZE* pParsedSize = nullptr); - static CXML_Element* Parse(IFX_FileRead* pFile, - FX_BOOL bSaveSpaceChars = FALSE, - FX_FILESIZE* pParsedSize = nullptr); - static CXML_Element* Parse(IFX_BufferRead* pBuffer, - FX_BOOL bSaveSpaceChars = FALSE, - FX_FILESIZE* pParsedSize = nullptr); - - CXML_Element(const CFX_ByteStringC& qSpace, const CFX_ByteStringC& tagName); - CXML_Element(const CFX_ByteStringC& qTagName); - CXML_Element(); - ~CXML_Element(); - - void Empty(); - CFX_ByteString GetTagName(FX_BOOL bQualified = FALSE) const; - CFX_ByteString GetNamespace(FX_BOOL bQualified = FALSE) const; - CFX_ByteString GetNamespaceURI(const CFX_ByteString& qName) const; - CXML_Element* GetParent() const { return m_pParent; } - uint32_t CountAttrs() const { return m_AttrMap.GetSize(); } - void GetAttrByIndex(int index, - CFX_ByteString& space, - CFX_ByteString& name, - CFX_WideString& value) const; - FX_BOOL HasAttr(const CFX_ByteStringC& qName) const; - FX_BOOL GetAttrValue(const CFX_ByteStringC& name, - CFX_WideString& attribute) const; - CFX_WideString GetAttrValue(const CFX_ByteStringC& name) const { - CFX_WideString attr; - GetAttrValue(name, attr); - return attr; - } - - FX_BOOL GetAttrValue(const CFX_ByteStringC& space, - const CFX_ByteStringC& name, - CFX_WideString& attribute) const; - CFX_WideString GetAttrValue(const CFX_ByteStringC& space, - const CFX_ByteStringC& name) const { - CFX_WideString attr; - GetAttrValue(space, name, attr); - return attr; - } - - FX_BOOL GetAttrInteger(const CFX_ByteStringC& name, int& attribute) const; - int GetAttrInteger(const CFX_ByteStringC& name) const { - int attr = 0; - GetAttrInteger(name, attr); - return attr; - } - - FX_BOOL GetAttrInteger(const CFX_ByteStringC& space, - const CFX_ByteStringC& name, - int& attribute) const; - int GetAttrInteger(const CFX_ByteStringC& space, - const CFX_ByteStringC& name) const { - int attr = 0; - GetAttrInteger(space, name, attr); - return attr; - } - - FX_BOOL GetAttrFloat(const CFX_ByteStringC& name, FX_FLOAT& attribute) const; - FX_FLOAT GetAttrFloat(const CFX_ByteStringC& name) const { - FX_FLOAT attr = 0; - GetAttrFloat(name, attr); - return attr; - } - - FX_BOOL GetAttrFloat(const CFX_ByteStringC& space, - const CFX_ByteStringC& name, - FX_FLOAT& attribute) const; - FX_FLOAT GetAttrFloat(const CFX_ByteStringC& space, - const CFX_ByteStringC& name) const { - FX_FLOAT attr = 0; - GetAttrFloat(space, name, attr); - return attr; - } - - uint32_t CountChildren() const { return m_Children.size(); } - ChildType GetChildType(uint32_t index) const; - CFX_WideString GetContent(uint32_t index) const; - CXML_Element* GetElement(uint32_t index) const; - CXML_Element* GetElement(const CFX_ByteStringC& space, - const CFX_ByteStringC& tag) const { - return GetElement(space, tag, 0); - } - - uint32_t CountElements(const CFX_ByteStringC& space, - const CFX_ByteStringC& tag) const; - CXML_Element* GetElement(const CFX_ByteStringC& space, - const CFX_ByteStringC& tag, - int index) const; - - uint32_t FindElement(CXML_Element* pChild) const; - void SetTag(const CFX_ByteStringC& qSpace, const CFX_ByteStringC& tagname); - void SetTag(const CFX_ByteStringC& qTagName); - void RemoveChildren(); - void RemoveChild(uint32_t index); - - protected: - struct ChildRecord { - ChildType type; - void* child; // CXML_Element and CXML_Content lack a common ancestor. - }; - - CXML_Element* m_pParent; - CFX_ByteString m_QSpaceName; - CFX_ByteString m_TagName; - CXML_AttrMap m_AttrMap; - std::vector m_Children; - - friend class CXML_Parser; - friend class CXML_Composer; -}; - -#endif // CORE_FXCRT_INCLUDE_FX_XML_H_ diff --git a/core/fxcrt/plex.h b/core/fxcrt/plex.h index 5391566d7b..8d00ef569e 100644 --- a/core/fxcrt/plex.h +++ b/core/fxcrt/plex.h @@ -7,7 +7,7 @@ #ifndef CORE_FXCRT_PLEX_H_ #define CORE_FXCRT_PLEX_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" struct CFX_Plex { CFX_Plex* pNext; diff --git a/core/fxcrt/xml_int.h b/core/fxcrt/xml_int.h index 121441b0c4..47997062cc 100644 --- a/core/fxcrt/xml_int.h +++ b/core/fxcrt/xml_int.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_stream.h" +#include "core/fxcrt/fx_stream.h" class CFX_UTF8Decoder; class CXML_Element; diff --git a/core/fxge/agg/fx_agg_driver.cpp b/core/fxge/agg/fx_agg_driver.cpp index 1c82620ca0..72548100ae 100644 --- a/core/fxge/agg/fx_agg_driver.cpp +++ b/core/fxge/agg/fx_agg_driver.cpp @@ -9,7 +9,7 @@ #include #include "core/fxcodec/fx_codec.h" -#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/fx_memory.h" #include "core/fxge/dib/dib_int.h" #include "core/fxge/ge/cfx_cliprgn.h" #include "core/fxge/ge/fx_text_int.h" diff --git a/core/fxge/android/fpf_skiafont.cpp b/core/fxge/android/fpf_skiafont.cpp index 2b639fe944..b154ec422b 100644 --- a/core/fxge/android/fpf_skiafont.cpp +++ b/core/fxge/android/fpf_skiafont.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #if _FX_OS_ == _FX_ANDROID_ diff --git a/core/fxge/android/fpf_skiafont.h b/core/fxge/android/fpf_skiafont.h index 4e03051a44..eb5bc44a85 100644 --- a/core/fxge/android/fpf_skiafont.h +++ b/core/fxge/android/fpf_skiafont.h @@ -7,7 +7,7 @@ #ifndef CORE_FXGE_ANDROID_FPF_SKIAFONT_H_ #define CORE_FXGE_ANDROID_FPF_SKIAFONT_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #if _FX_OS_ == _FX_ANDROID_ diff --git a/core/fxge/android/fpf_skiafontmgr.cpp b/core/fxge/android/fpf_skiafontmgr.cpp index b7400fc47f..67b58d74ce 100644 --- a/core/fxge/android/fpf_skiafontmgr.cpp +++ b/core/fxge/android/fpf_skiafontmgr.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #if _FX_OS_ == _FX_ANDROID_ @@ -13,7 +13,7 @@ #define FPF_SKIAMATCHWEIGHT_1 16 #define FPF_SKIAMATCHWEIGHT_2 8 -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "core/fxge/android/fpf_skiafont.h" #include "core/fxge/android/fpf_skiafontmgr.h" #include "core/fxge/include/fx_freetype.h" diff --git a/core/fxge/android/fpf_skiafontmgr.h b/core/fxge/android/fpf_skiafontmgr.h index 6e8ebb6e64..a0c9f5bffe 100644 --- a/core/fxge/android/fpf_skiafontmgr.h +++ b/core/fxge/android/fpf_skiafontmgr.h @@ -7,7 +7,7 @@ #ifndef CORE_FXGE_ANDROID_FPF_SKIAFONTMGR_H_ #define CORE_FXGE_ANDROID_FPF_SKIAFONTMGR_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #if _FX_OS_ == _FX_ANDROID_ diff --git a/core/fxge/android/fpf_skiamodule.cpp b/core/fxge/android/fpf_skiamodule.cpp index f219f12499..e541b2414f 100644 --- a/core/fxge/android/fpf_skiamodule.cpp +++ b/core/fxge/android/fpf_skiamodule.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #if _FX_OS_ == _FX_ANDROID_ diff --git a/core/fxge/android/fpf_skiamodule.h b/core/fxge/android/fpf_skiamodule.h index c3d5772fb3..a0fb5e0826 100644 --- a/core/fxge/android/fpf_skiamodule.h +++ b/core/fxge/android/fpf_skiamodule.h @@ -7,7 +7,7 @@ #ifndef CORE_FXGE_ANDROID_FPF_SKIAMODULE_H_ #define CORE_FXGE_ANDROID_FPF_SKIAMODULE_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #if _FX_OS_ == _FX_ANDROID_ diff --git a/core/fxge/android/fx_android_font.cpp b/core/fxge/android/fx_android_font.cpp index 58a5ab4b85..1c17432a45 100644 --- a/core/fxge/android/fx_android_font.cpp +++ b/core/fxge/android/fx_android_font.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #if _FX_OS_ == _FX_ANDROID_ diff --git a/core/fxge/android/fx_android_font.h b/core/fxge/android/fx_android_font.h index f980836328..e9fbb3618c 100644 --- a/core/fxge/android/fx_android_font.h +++ b/core/fxge/android/fx_android_font.h @@ -7,7 +7,7 @@ #ifndef CORE_FXGE_ANDROID_FX_ANDROID_FONT_H_ #define CORE_FXGE_ANDROID_FX_ANDROID_FONT_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #if _FX_OS_ == _FX_ANDROID_ diff --git a/core/fxge/android/fx_android_imp.cpp b/core/fxge/android/fx_android_imp.cpp index ebf98c488f..79222b02f4 100644 --- a/core/fxge/android/fx_android_imp.cpp +++ b/core/fxge/android/fx_android_imp.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #if _FX_OS_ == _FX_ANDROID_ diff --git a/core/fxge/apple/apple_int.h b/core/fxge/apple/apple_int.h index 9443b5da01..c7cb24365e 100644 --- a/core/fxge/apple/apple_int.h +++ b/core/fxge/apple/apple_int.h @@ -7,7 +7,7 @@ #ifndef CORE_FXGE_APPLE_APPLE_INT_H_ #define CORE_FXGE_APPLE_APPLE_INT_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ diff --git a/core/fxge/apple/fx_apple_platform.cpp b/core/fxge/apple/fx_apple_platform.cpp index 239a6e50f9..8a0c1e0538 100644 --- a/core/fxge/apple/fx_apple_platform.cpp +++ b/core/fxge/apple/fx_apple_platform.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ diff --git a/core/fxge/apple/fx_quartz_device.cpp b/core/fxge/apple/fx_quartz_device.cpp index 6a0260b1d6..9089710778 100644 --- a/core/fxge/apple/fx_quartz_device.cpp +++ b/core/fxge/apple/fx_quartz_device.cpp @@ -4,13 +4,13 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #ifndef _SKIA_SUPPORT_ #include "core/fxge/agg/fx_agg_driver.h" #endif -#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/fx_memory.h" #include "core/fxge/dib/dib_int.h" #include "core/fxge/ge/fx_text_int.h" #include "core/fxge/include/cfx_gemodule.h" diff --git a/core/fxge/dib/dib_int.h b/core/fxge/dib/dib_int.h index 31ccc8d371..0a679e2f5f 100644 --- a/core/fxge/dib/dib_int.h +++ b/core/fxge/dib/dib_int.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/fx_coordinates.h" #include "core/fxge/include/fx_dib.h" class IFX_ScanlineComposer; diff --git a/core/fxge/dib/fx_dib_engine_unittest.cpp b/core/fxge/dib/fx_dib_engine_unittest.cpp index d35c66ea3f..eed6b52194 100644 --- a/core/fxge/dib/fx_dib_engine_unittest.cpp +++ b/core/fxge/dib/fx_dib_engine_unittest.cpp @@ -8,7 +8,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_number.h" #include "core/fpdfapi/fpdf_parser/cpdf_stream.h" #include "core/fpdfapi/fpdf_render/render_int.h" -#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/fx_memory.h" #include "core/fxge/dib/dib_int.h" #include "core/fxge/include/fx_dib.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/core/fxge/ge/cfx_graphstatedata.cpp b/core/fxge/ge/cfx_graphstatedata.cpp index 0a5b5e301c..c03f08624d 100644 --- a/core/fxge/ge/cfx_graphstatedata.cpp +++ b/core/fxge/ge/cfx_graphstatedata.cpp @@ -6,8 +6,8 @@ #include "core/fxge/include/cfx_graphstatedata.h" -#include "core/fxcrt/include/fx_memory.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_memory.h" +#include "core/fxcrt/fx_system.h" CFX_GraphStateData::CFX_GraphStateData() : m_LineCap(LineCapButt), diff --git a/core/fxge/ge/cfx_pathdata.cpp b/core/fxge/ge/cfx_pathdata.cpp index 969bfc48e8..576e404fc3 100644 --- a/core/fxge/ge/cfx_pathdata.cpp +++ b/core/fxge/ge/cfx_pathdata.cpp @@ -6,7 +6,7 @@ #include "core/fxge/include/cfx_pathdata.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "third_party/base/numerics/safe_math.h" CFX_PathData::CFX_PathData() diff --git a/core/fxge/ge/cfx_renderdevice.cpp b/core/fxge/ge/cfx_renderdevice.cpp index eadd912be4..4b479bae25 100644 --- a/core/fxge/ge/cfx_renderdevice.cpp +++ b/core/fxge/ge/cfx_renderdevice.cpp @@ -6,7 +6,7 @@ #include "core/fxge/include/cfx_renderdevice.h" -#include "core/fxcrt/include/fx_safe_types.h" +#include "core/fxcrt/fx_safe_types.h" #include "core/fxge/include/cfx_facecache.h" #include "core/fxge/include/cfx_fxgedevice.h" #include "core/fxge/include/cfx_graphstatedata.h" diff --git a/core/fxge/ge/cttfontdesc.h b/core/fxge/ge/cttfontdesc.h index 05cafde980..329b9e6bc0 100644 --- a/core/fxge/ge/cttfontdesc.h +++ b/core/fxge/ge/cttfontdesc.h @@ -7,7 +7,7 @@ #ifndef CORE_FXGE_GE_CTTFONTDESC_H_ #define CORE_FXGE_GE_CTTFONTDESC_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_font.h" #define FX_FONT_FLAG_SERIF 0x01 diff --git a/core/fxge/ge/fx_ge_text.cpp b/core/fxge/ge/fx_ge_text.cpp index 4612877980..747fd83178 100644 --- a/core/fxge/ge/fx_ge_text.cpp +++ b/core/fxge/ge/fx_ge_text.cpp @@ -9,7 +9,7 @@ #include #include "core/fxcodec/fx_codec.h" -#include "core/fxcrt/include/fx_safe_types.h" +#include "core/fxcrt/fx_safe_types.h" #include "core/fxge/ge/fx_text_int.h" #include "core/fxge/include/cfx_pathdata.h" #include "core/fxge/include/fx_freetype.h" diff --git a/core/fxge/ifx_renderdevicedriver.cpp b/core/fxge/ifx_renderdevicedriver.cpp index 5acfae4b8b..0c1f922800 100644 --- a/core/fxge/ifx_renderdevicedriver.cpp +++ b/core/fxge/ifx_renderdevicedriver.cpp @@ -6,7 +6,7 @@ #include "core/fxge/include/ifx_renderdevicedriver.h" -#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/fx_coordinates.h" #include "core/fxge/include/cfx_pathdata.h" #include "core/fxge/include/cfx_renderdevice.h" diff --git a/core/fxge/include/cfx_fontcache.h b/core/fxge/include/cfx_fontcache.h index dd9a176d19..7fe0de47f1 100644 --- a/core/fxge/include/cfx_fontcache.h +++ b/core/fxge/include/cfx_fontcache.h @@ -10,7 +10,7 @@ #include #include -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_font.h" #include "core/fxge/include/fx_freetype.h" diff --git a/core/fxge/include/cfx_graphstate.h b/core/fxge/include/cfx_graphstate.h index 9470303ac1..1faec0db7e 100644 --- a/core/fxge/include/cfx_graphstate.h +++ b/core/fxge/include/cfx_graphstate.h @@ -7,7 +7,7 @@ #ifndef CORE_FXGE_INCLUDE_CFX_GRAPHSTATE_H_ #define CORE_FXGE_INCLUDE_CFX_GRAPHSTATE_H_ -#include "core/fxcrt/include/cfx_count_ref.h" +#include "core/fxcrt/cfx_count_ref.h" #include "core/fxge/include/cfx_graphstatedata.h" class CPDF_Array; diff --git a/core/fxge/include/cfx_graphstatedata.h b/core/fxge/include/cfx_graphstatedata.h index 2e79698671..b5f784702d 100644 --- a/core/fxge/include/cfx_graphstatedata.h +++ b/core/fxge/include/cfx_graphstatedata.h @@ -7,7 +7,7 @@ #ifndef CORE_FXGE_INCLUDE_CFX_GRAPHSTATEDATA_H_ #define CORE_FXGE_INCLUDE_CFX_GRAPHSTATEDATA_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CFX_GraphStateData { public: diff --git a/core/fxge/include/cfx_pathdata.h b/core/fxge/include/cfx_pathdata.h index 6bc627c84b..56682dd651 100644 --- a/core/fxge/include/cfx_pathdata.h +++ b/core/fxge/include/cfx_pathdata.h @@ -7,8 +7,8 @@ #ifndef CORE_FXGE_INCLUDE_CFX_PATHDATA_H_ #define CORE_FXGE_INCLUDE_CFX_PATHDATA_H_ -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/cfx_renderdevice.h" struct FX_PATHPOINT { diff --git a/core/fxge/include/cfx_substfont.h b/core/fxge/include/cfx_substfont.h index a712a7a7a7..8cce389fb3 100644 --- a/core/fxge/include/cfx_substfont.h +++ b/core/fxge/include/cfx_substfont.h @@ -7,7 +7,7 @@ #ifndef CORE_FXGE_INCLUDE_CFX_SUBSTFONT_H_ #define CORE_FXGE_INCLUDE_CFX_SUBSTFONT_H_ -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #define FXFONT_SUBST_MM 0x01 #define FXFONT_SUBST_GLYPHPATH 0x04 diff --git a/core/fxge/include/cfx_unicodeencodingex.h b/core/fxge/include/cfx_unicodeencodingex.h index 2ce062faf3..680b8fb6bd 100644 --- a/core/fxge/include/cfx_unicodeencodingex.h +++ b/core/fxge/include/cfx_unicodeencodingex.h @@ -11,7 +11,7 @@ #include #include -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/cfx_unicodeencoding.h" #include "core/fxge/include/fx_dib.h" #include "core/fxge/include/fx_freetype.h" diff --git a/core/fxge/include/fx_dib.h b/core/fxge/include/fx_dib.h index 011e6f7856..2eaa38ab5e 100644 --- a/core/fxge/include/fx_dib.h +++ b/core/fxge/include/fx_dib.h @@ -10,9 +10,9 @@ #include #include -#include "core/fxcrt/include/cfx_count_ref.h" -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/cfx_count_ref.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_coordinates.h" enum FXDIB_Format { FXDIB_Invalid = 0, diff --git a/core/fxge/include/fx_font.h b/core/fxge/include/fx_font.h index 5a83130551..2151bf65bb 100644 --- a/core/fxge/include/fx_font.h +++ b/core/fxge/include/fx_font.h @@ -10,7 +10,7 @@ #include #include -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/cfx_substfont.h" #include "core/fxge/include/fx_dib.h" #include "core/fxge/include/fx_freetype.h" diff --git a/core/fxge/include/ifx_renderdevicedriver.h b/core/fxge/include/ifx_renderdevicedriver.h index e9dbed913a..995e82d654 100644 --- a/core/fxge/include/ifx_renderdevicedriver.h +++ b/core/fxge/include/ifx_renderdevicedriver.h @@ -7,7 +7,7 @@ #ifndef CORE_FXGE_INCLUDE_IFX_RENDERDEVICEDRIVER_H_ #define CORE_FXGE_INCLUDE_IFX_RENDERDEVICEDRIVER_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CFX_DIBitmap; class CFX_DIBSource; diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp index bcbe2d10f7..be4d57b5c0 100644 --- a/core/fxge/skia/fx_skia_device.cpp +++ b/core/fxge/skia/fx_skia_device.cpp @@ -7,7 +7,7 @@ #include #include "core/fxcodec/fx_codec.h" -#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/fx_memory.h" #include "core/fpdfapi/fpdf_page/cpdf_shadingpattern.h" #include "core/fpdfapi/fpdf_page/pageint.h" diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp index e3d00d93f6..d2aa5ff0ec 100644 --- a/core/fxge/win32/fx_win32_device.cpp +++ b/core/fxge/win32/fx_win32_device.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include #include @@ -14,7 +14,7 @@ #include #include "core/fxcodec/fx_codec.h" -#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/fx_memory.h" #ifndef _SKIA_SUPPORT_ #include "core/fxge/agg/fx_agg_driver.h" diff --git a/core/fxge/win32/fx_win32_dib.cpp b/core/fxge/win32/fx_win32_dib.cpp index 84f8abfca7..7ab64ca961 100644 --- a/core/fxge/win32/fx_win32_dib.cpp +++ b/core/fxge/win32/fx_win32_dib.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ #include diff --git a/core/fxge/win32/fx_win32_dwrite.cpp b/core/fxge/win32/fx_win32_dwrite.cpp index fd1dd5c953..b4bb9b6204 100644 --- a/core/fxge/win32/fx_win32_dwrite.cpp +++ b/core/fxge/win32/fx_win32_dwrite.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/ge/cfx_cliprgn.h" #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ diff --git a/core/fxge/win32/fx_win32_gdipext.cpp b/core/fxge/win32/fx_win32_gdipext.cpp index 99ccbd4763..7094da5527 100644 --- a/core/fxge/win32/fx_win32_gdipext.cpp +++ b/core/fxge/win32/fx_win32_gdipext.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ #include diff --git a/core/fxge/win32/fx_win32_print.cpp b/core/fxge/win32/fx_win32_print.cpp index 2a52a60ce6..5372c19e84 100644 --- a/core/fxge/win32/fx_win32_print.cpp +++ b/core/fxge/win32/fx_win32_print.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ diff --git a/fpdfsdk/DEPS b/fpdfsdk/DEPS index 286d5888e7..d01574dd3f 100644 --- a/fpdfsdk/DEPS +++ b/fpdfsdk/DEPS @@ -7,7 +7,7 @@ include_rules = [ '+core/fpdfapi/fpdf_render', '+core/fpdfdoc', '+core/fxcodec', - '+core/fxcrt/include', + '+core/fxcrt', '+core/fxge/include', '+public', '+v8', diff --git a/fpdfsdk/cfx_systemhandler.h b/fpdfsdk/cfx_systemhandler.h index 5f8a871f05..53043904e6 100644 --- a/fpdfsdk/cfx_systemhandler.h +++ b/fpdfsdk/cfx_systemhandler.h @@ -7,8 +7,8 @@ #ifndef FPDFSDK_CFX_SYSTEMHANDLER_H_ #define FPDFSDK_CFX_SYSTEMHANDLER_H_ -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" using TimerCallback = void (*)(int32_t idEvent); diff --git a/fpdfsdk/cpdfsdk_datetime.cpp b/fpdfsdk/cpdfsdk_datetime.cpp index 5bcce1327b..3f54e21dca 100644 --- a/fpdfsdk/cpdfsdk_datetime.cpp +++ b/fpdfsdk/cpdfsdk_datetime.cpp @@ -6,7 +6,7 @@ #include "fpdfsdk/include/cpdfsdk_datetime.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" namespace { diff --git a/fpdfsdk/formfiller/cffl_combobox.h b/fpdfsdk/formfiller/cffl_combobox.h index 31e4d8bba8..acc61af0b1 100644 --- a/fpdfsdk/formfiller/cffl_combobox.h +++ b/fpdfsdk/formfiller/cffl_combobox.h @@ -7,7 +7,7 @@ #ifndef FPDFSDK_FORMFILLER_CFFL_COMBOBOX_H_ #define FPDFSDK_FORMFILLER_CFFL_COMBOBOX_H_ -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #include "fpdfsdk/formfiller/cffl_formfiller.h" class CBA_FontMap; diff --git a/fpdfsdk/fpdf_ext.cpp b/fpdfsdk/fpdf_ext.cpp index f9ae0c0cde..b77e751a38 100644 --- a/fpdfsdk/fpdf_ext.cpp +++ b/fpdfsdk/fpdf_ext.cpp @@ -14,9 +14,9 @@ #include "core/fpdfdoc/cpdf_annot.h" #include "core/fpdfdoc/cpdf_interform.h" #include "core/fpdfdoc/cpdf_metadata.h" -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_memory.h" -#include "core/fxcrt/include/fx_xml.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_memory.h" +#include "core/fxcrt/fx_xml.h" #include "fpdfsdk/include/fsdk_define.h" #ifdef PDF_ENABLE_XFA diff --git a/fpdfsdk/fpdf_progressive.cpp b/fpdfsdk/fpdf_progressive.cpp index 8de4d3fa74..4722a9f0bc 100644 --- a/fpdfsdk/fpdf_progressive.cpp +++ b/fpdfsdk/fpdf_progressive.cpp @@ -9,7 +9,7 @@ #include "core/fpdfapi/cpdf_pagerendercontext.h" #include "core/fpdfapi/fpdf_page/cpdf_page.h" #include "core/fpdfapi/fpdf_render/cpdf_progressiverenderer.h" -#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/fx_memory.h" #include "core/fxge/include/cfx_fxgedevice.h" #include "core/fxge/include/cfx_renderdevice.h" #include "fpdfsdk/include/fsdk_define.h" diff --git a/fpdfsdk/fpdfdoc_embeddertest.cpp b/fpdfsdk/fpdfdoc_embeddertest.cpp index e0880deca5..39b36c4bee 100644 --- a/fpdfsdk/fpdfdoc_embeddertest.cpp +++ b/fpdfsdk/fpdfdoc_embeddertest.cpp @@ -4,7 +4,7 @@ #include -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #include "public/fpdf_doc.h" #include "public/fpdf_edit.h" #include "public/fpdfview.h" diff --git a/fpdfsdk/fpdfsave.cpp b/fpdfsdk/fpdfsave.cpp index 2d886400c7..b6def4d8ff 100644 --- a/fpdfsdk/fpdfsave.cpp +++ b/fpdfsdk/fpdfsave.cpp @@ -14,7 +14,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_reference.h" #include "core/fpdfapi/fpdf_parser/cpdf_stream_acc.h" #include "core/fpdfapi/fpdf_parser/cpdf_string.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "fpdfsdk/include/fsdk_define.h" #include "public/fpdf_edit.h" diff --git a/fpdfsdk/fpdfsave_embeddertest.cpp b/fpdfsdk/fpdfsave_embeddertest.cpp index 5dbff36327..55a58c2de3 100644 --- a/fpdfsdk/fpdfsave_embeddertest.cpp +++ b/fpdfsdk/fpdfsave_embeddertest.cpp @@ -4,7 +4,7 @@ #include -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #include "public/fpdf_save.h" #include "public/fpdfview.h" #include "testing/embedder_test.h" diff --git a/fpdfsdk/fpdftext_embeddertest.cpp b/fpdfsdk/fpdftext_embeddertest.cpp index 957e813f64..46168c8ac7 100644 --- a/fpdfsdk/fpdftext_embeddertest.cpp +++ b/fpdfsdk/fpdftext_embeddertest.cpp @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #include "public/fpdf_text.h" #include "public/fpdfview.h" #include "testing/embedder_test.h" diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp index 2f00afad33..5f115f2db5 100644 --- a/fpdfsdk/fpdfview.cpp +++ b/fpdfsdk/fpdfview.cpp @@ -22,8 +22,8 @@ #include "core/fpdfdoc/cpdf_occontext.h" #include "core/fpdfdoc/cpdf_viewerpreferences.h" #include "core/fxcodec/fx_codec.h" -#include "core/fxcrt/include/fx_memory.h" -#include "core/fxcrt/include/fx_safe_types.h" +#include "core/fxcrt/fx_memory.h" +#include "core/fxcrt/fx_safe_types.h" #include "core/fxge/include/cfx_fxgedevice.h" #include "core/fxge/include/cfx_gemodule.h" #include "fpdfsdk/include/cpdfsdk_pageview.h" diff --git a/fpdfsdk/fpdfxfa/include/fpdfxfa_page.h b/fpdfsdk/fpdfxfa/include/fpdfxfa_page.h index 7b60c669cc..bd60366a6b 100644 --- a/fpdfsdk/fpdfxfa/include/fpdfxfa_page.h +++ b/fpdfsdk/fpdfxfa/include/fpdfxfa_page.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CFX_Matrix; class CPDFXFA_Document; diff --git a/fpdfsdk/fxedit/include/fx_edit.h b/fpdfsdk/fxedit/include/fx_edit.h index e460416e18..da93071f23 100644 --- a/fpdfsdk/fxedit/include/fx_edit.h +++ b/fpdfsdk/fxedit/include/fx_edit.h @@ -7,7 +7,7 @@ #ifndef FPDFSDK_FXEDIT_INCLUDE_FX_EDIT_H_ #define FPDFSDK_FXEDIT_INCLUDE_FX_EDIT_H_ -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" class IPVT_FontMap; diff --git a/fpdfsdk/fxedit/include/fxet_list.h b/fpdfsdk/fxedit/include/fxet_list.h index b5cd392eda..1d738c0dcc 100644 --- a/fpdfsdk/fxedit/include/fxet_list.h +++ b/fpdfsdk/fxedit/include/fxet_list.h @@ -7,7 +7,7 @@ #ifndef FPDFSDK_FXEDIT_INCLUDE_FXET_LIST_H_ #define FPDFSDK_FXEDIT_INCLUDE_FXET_LIST_H_ -#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/fx_coordinates.h" #include "fpdfsdk/fxedit/include/fx_edit.h" class CFX_Edit; diff --git a/fpdfsdk/include/cba_annotiterator.h b/fpdfsdk/include/cba_annotiterator.h index 7d9078e23d..38332db718 100644 --- a/fpdfsdk/include/cba_annotiterator.h +++ b/fpdfsdk/include/cba_annotiterator.h @@ -10,8 +10,8 @@ #include #include "core/fpdfdoc/cpdf_annot.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_string.h" class CPDFSDK_Annot; class CPDFSDK_PageView; diff --git a/fpdfsdk/include/cpdfsdk_annot.h b/fpdfsdk/include/cpdfsdk_annot.h index 7356ce821b..b7b7399373 100644 --- a/fpdfsdk/include/cpdfsdk_annot.h +++ b/fpdfsdk/include/cpdfsdk_annot.h @@ -10,8 +10,8 @@ #include "core/fpdfdoc/cpdf_aaction.h" #include "core/fpdfdoc/cpdf_annot.h" #include "core/fpdfdoc/cpdf_defaultappearance.h" -#include "core/fxcrt/include/cfx_observable.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/cfx_observable.h" +#include "core/fxcrt/fx_basic.h" #include "fpdfsdk/cfx_systemhandler.h" #include "fpdfsdk/include/fsdk_common.h" #include "fpdfsdk/include/fsdk_define.h" diff --git a/fpdfsdk/include/cpdfsdk_annothandlermgr.h b/fpdfsdk/include/cpdfsdk_annothandlermgr.h index da54c7e54b..717f87fcef 100644 --- a/fpdfsdk/include/cpdfsdk_annothandlermgr.h +++ b/fpdfsdk/include/cpdfsdk_annothandlermgr.h @@ -11,8 +11,8 @@ #include #include "core/fpdfdoc/cpdf_annot.h" -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_coordinates.h" #include "fpdfsdk/include/cpdfsdk_annot.h" class CFX_Matrix; diff --git a/fpdfsdk/include/cpdfsdk_baannot.h b/fpdfsdk/include/cpdfsdk_baannot.h index 9cc1680bee..dea717a5e0 100644 --- a/fpdfsdk/include/cpdfsdk_baannot.h +++ b/fpdfsdk/include/cpdfsdk_baannot.h @@ -11,8 +11,8 @@ #include "core/fpdfdoc/cpdf_action.h" #include "core/fpdfdoc/cpdf_annot.h" #include "core/fpdfdoc/cpdf_defaultappearance.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_string.h" #include "fpdfsdk/cfx_systemhandler.h" #include "fpdfsdk/include/cpdfsdk_annot.h" diff --git a/fpdfsdk/include/cpdfsdk_baannothandler.h b/fpdfsdk/include/cpdfsdk_baannothandler.h index ae884526a0..44e0cbb0b7 100644 --- a/fpdfsdk/include/cpdfsdk_baannothandler.h +++ b/fpdfsdk/include/cpdfsdk_baannothandler.h @@ -7,8 +7,8 @@ #ifndef FPDFSDK_INCLUDE_CPDFSDK_BAANNOTHANDLER_H_ #define FPDFSDK_INCLUDE_CPDFSDK_BAANNOTHANDLER_H_ -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_coordinates.h" #include "fpdfsdk/include/ipdfsdk_annothandler.h" class CFFL_InteractiveFormFiller; diff --git a/fpdfsdk/include/cpdfsdk_document.h b/fpdfsdk/include/cpdfsdk_document.h index c1420555b8..fe6ac94c12 100644 --- a/fpdfsdk/include/cpdfsdk_document.h +++ b/fpdfsdk/include/cpdfsdk_document.h @@ -11,7 +11,7 @@ #include #include "core/fpdfapi/fpdf_parser/cpdf_document.h" -#include "core/fxcrt/include/cfx_observable.h" +#include "core/fxcrt/cfx_observable.h" #include "fpdfsdk/include/cpdfsdk_annot.h" #include "fpdfsdk/include/fsdk_define.h" #include "public/fpdf_formfill.h" diff --git a/fpdfsdk/include/cpdfsdk_environment.h b/fpdfsdk/include/cpdfsdk_environment.h index 35b48507ad..1bf541e870 100644 --- a/fpdfsdk/include/cpdfsdk_environment.h +++ b/fpdfsdk/include/cpdfsdk_environment.h @@ -12,7 +12,7 @@ #include "core/fpdfapi/fpdf_page/cpdf_page.h" #include "core/fpdfapi/fpdf_parser/cpdf_document.h" #include "core/fpdfdoc/cpdf_occontext.h" -#include "core/fxcrt/include/cfx_observable.h" +#include "core/fxcrt/cfx_observable.h" #include "fpdfsdk/cfx_systemhandler.h" #include "fpdfsdk/include/fsdk_define.h" #include "public/fpdf_formfill.h" diff --git a/fpdfsdk/include/cpdfsdk_interform.h b/fpdfsdk/include/cpdfsdk_interform.h index b186ceb8cc..6bea3cfac0 100644 --- a/fpdfsdk/include/cpdfsdk_interform.h +++ b/fpdfsdk/include/cpdfsdk_interform.h @@ -12,7 +12,7 @@ #include "core/fpdfdoc/cpdf_action.h" #include "core/fpdfdoc/ipdf_formnotify.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #include "core/fxge/include/fx_dib.h" class CPDF_Dictionary; diff --git a/fpdfsdk/include/cpdfsdk_pageview.h b/fpdfsdk/include/cpdfsdk_pageview.h index 0bcce28feb..c31f6d3fb1 100644 --- a/fpdfsdk/include/cpdfsdk_pageview.h +++ b/fpdfsdk/include/cpdfsdk_pageview.h @@ -11,7 +11,7 @@ #include #include "core/fpdfapi/fpdf_page/cpdf_page.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "fpdfsdk/include/cpdfsdk_annot.h" #include "fpdfsdk/include/cpdfsdk_document.h" diff --git a/fpdfsdk/include/cpdfsdk_widget.h b/fpdfsdk/include/cpdfsdk_widget.h index 01710917ff..8c10a21b9c 100644 --- a/fpdfsdk/include/cpdfsdk_widget.h +++ b/fpdfsdk/include/cpdfsdk_widget.h @@ -12,8 +12,8 @@ #include "core/fpdfdoc/cpdf_aaction.h" #include "core/fpdfdoc/cpdf_action.h" #include "core/fpdfdoc/cpdf_annot.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_string.h" #include "fpdfsdk/include/cpdfsdk_baannot.h" #include "fpdfsdk/include/pdfsdk_fieldaction.h" #include "fpdfsdk/pdfwindow/PWL_Wnd.h" diff --git a/fpdfsdk/include/cpdfsdk_widgethandler.h b/fpdfsdk/include/cpdfsdk_widgethandler.h index b18f623b3f..ca3da87ff6 100644 --- a/fpdfsdk/include/cpdfsdk_widgethandler.h +++ b/fpdfsdk/include/cpdfsdk_widgethandler.h @@ -7,8 +7,8 @@ #ifndef FPDFSDK_INCLUDE_CPDFSDK_WIDGETHANDLER_H_ #define FPDFSDK_INCLUDE_CPDFSDK_WIDGETHANDLER_H_ -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_coordinates.h" #include "fpdfsdk/include/ipdfsdk_annothandler.h" class CFFL_InteractiveFormFiller; diff --git a/fpdfsdk/include/cpdfsdk_xfawidget.h b/fpdfsdk/include/cpdfsdk_xfawidget.h index 311c22587b..99309b9684 100644 --- a/fpdfsdk/include/cpdfsdk_xfawidget.h +++ b/fpdfsdk/include/cpdfsdk_xfawidget.h @@ -7,8 +7,8 @@ #ifndef FPDFSDK_INCLUDE_CPDFSDK_XFAWIDGET_H_ #define FPDFSDK_INCLUDE_CPDFSDK_XFAWIDGET_H_ -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_string.h" #include "fpdfsdk/include/cpdfsdk_annot.h" class CPDFSDK_InterForm; diff --git a/fpdfsdk/include/cpdfsdk_xfawidgethandler.h b/fpdfsdk/include/cpdfsdk_xfawidgethandler.h index 2bf977951c..425c57c03d 100644 --- a/fpdfsdk/include/cpdfsdk_xfawidgethandler.h +++ b/fpdfsdk/include/cpdfsdk_xfawidgethandler.h @@ -7,8 +7,8 @@ #ifndef FPDFSDK_INCLUDE_CPDFSDK_XFAWIDGETHANDLER_H_ #define FPDFSDK_INCLUDE_CPDFSDK_XFAWIDGETHANDLER_H_ -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_coordinates.h" #include "fpdfsdk/include/ipdfsdk_annothandler.h" class CFX_Matrix; diff --git a/fpdfsdk/include/fsdk_actionhandler.h b/fpdfsdk/include/fsdk_actionhandler.h index fc6758898f..ce15b83295 100644 --- a/fpdfsdk/include/fsdk_actionhandler.h +++ b/fpdfsdk/include/fsdk_actionhandler.h @@ -12,7 +12,7 @@ #include "core/fpdfdoc/cpdf_aaction.h" #include "core/fpdfdoc/cpdf_action.h" -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #include "fpdfsdk/include/pdfsdk_fieldaction.h" class CPDFSDK_Annot; diff --git a/fpdfsdk/include/fsdk_pauseadapter.h b/fpdfsdk/include/fsdk_pauseadapter.h index 793e8f2772..4a37f5ce52 100644 --- a/fpdfsdk/include/fsdk_pauseadapter.h +++ b/fpdfsdk/include/fsdk_pauseadapter.h @@ -7,8 +7,8 @@ #ifndef FPDFSDK_INCLUDE_FSDK_PAUSEADAPTER_H_ #define FPDFSDK_INCLUDE_FSDK_PAUSEADAPTER_H_ -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_system.h" #include "public/fpdf_progressive.h" class IFSDK_PAUSE_Adapter : public IFX_Pause { diff --git a/fpdfsdk/include/ipdfsdk_annothandler.h b/fpdfsdk/include/ipdfsdk_annothandler.h index f1db6983c0..3102cb48db 100644 --- a/fpdfsdk/include/ipdfsdk_annothandler.h +++ b/fpdfsdk/include/ipdfsdk_annothandler.h @@ -7,8 +7,8 @@ #ifndef FPDFSDK_INCLUDE_IPDFSDK_ANNOTHANDLER_H_ #define FPDFSDK_INCLUDE_IPDFSDK_ANNOTHANDLER_H_ -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_coordinates.h" #include "fpdfsdk/include/cpdfsdk_annot.h" class CFX_Matrix; diff --git a/fpdfsdk/include/pdfsdk_fieldaction.h b/fpdfsdk/include/pdfsdk_fieldaction.h index 385fbf6845..4ed8b943c9 100644 --- a/fpdfsdk/include/pdfsdk_fieldaction.h +++ b/fpdfsdk/include/pdfsdk_fieldaction.h @@ -7,7 +7,7 @@ #ifndef FPDFSDK_INCLUDE_PDFSDK_FIELDACTION_H_ #define FPDFSDK_INCLUDE_PDFSDK_FIELDACTION_H_ -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #ifdef PDF_ENABLE_XFA typedef enum { diff --git a/fpdfsdk/javascript/Field.h b/fpdfsdk/javascript/Field.h index 56cfd20d83..e559780154 100644 --- a/fpdfsdk/javascript/Field.h +++ b/fpdfsdk/javascript/Field.h @@ -10,7 +10,7 @@ #include #include -#include "core/fxcrt/include/cfx_observable.h" +#include "core/fxcrt/cfx_observable.h" #include "fpdfsdk/include/cpdfsdk_document.h" #include "fpdfsdk/javascript/JS_Define.h" #include "fpdfsdk/pdfwindow/PWL_Wnd.h" // For CPWL_Color. diff --git a/fpdfsdk/javascript/JS_EventHandler.h b/fpdfsdk/javascript/JS_EventHandler.h index 41d37056a5..02d5e82595 100644 --- a/fpdfsdk/javascript/JS_EventHandler.h +++ b/fpdfsdk/javascript/JS_EventHandler.h @@ -7,8 +7,8 @@ #ifndef FPDFSDK_JAVASCRIPT_JS_EVENTHANDLER_H_ #define FPDFSDK_JAVASCRIPT_JS_EVENTHANDLER_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" class CJS_Context; class CPDFSDK_Annot; diff --git a/fpdfsdk/javascript/JS_GlobalData.h b/fpdfsdk/javascript/JS_GlobalData.h index cda8533fad..38ab9256f9 100644 --- a/fpdfsdk/javascript/JS_GlobalData.h +++ b/fpdfsdk/javascript/JS_GlobalData.h @@ -10,7 +10,7 @@ #include #include -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #include "fpdfsdk/javascript/JS_KeyValue.h" class CPDFSDK_Environment; diff --git a/fpdfsdk/javascript/JS_KeyValue.h b/fpdfsdk/javascript/JS_KeyValue.h index 43f6687b8d..a571588870 100644 --- a/fpdfsdk/javascript/JS_KeyValue.h +++ b/fpdfsdk/javascript/JS_KeyValue.h @@ -10,7 +10,7 @@ #include #include -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" enum class JS_GlobalDataType { NUMBER = 0, BOOLEAN, STRING, OBJECT, NULLOBJ }; diff --git a/fpdfsdk/javascript/JS_Value.h b/fpdfsdk/javascript/JS_Value.h index c567a7cbf2..ef79d7b91b 100644 --- a/fpdfsdk/javascript/JS_Value.h +++ b/fpdfsdk/javascript/JS_Value.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #include "fxjs/include/fxjs_v8.h" class CJS_Array; diff --git a/fpdfsdk/javascript/PublicMethods.cpp b/fpdfsdk/javascript/PublicMethods.cpp index c7f7b85f45..6a96466b5a 100644 --- a/fpdfsdk/javascript/PublicMethods.cpp +++ b/fpdfsdk/javascript/PublicMethods.cpp @@ -10,7 +10,7 @@ #include #include "core/fpdfdoc/cpdf_interform.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "fpdfsdk/include/cpdfsdk_document.h" #include "fpdfsdk/include/cpdfsdk_environment.h" #include "fpdfsdk/include/cpdfsdk_interform.h" diff --git a/fpdfsdk/javascript/cjs_context.h b/fpdfsdk/javascript/cjs_context.h index 41f2042b7e..ef65486269 100644 --- a/fpdfsdk/javascript/cjs_context.h +++ b/fpdfsdk/javascript/cjs_context.h @@ -9,8 +9,8 @@ #include -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "fpdfsdk/javascript/ijs_context.h" class CJS_EventHandler; diff --git a/fpdfsdk/javascript/cjs_runtime.h b/fpdfsdk/javascript/cjs_runtime.h index da7e384321..d438e46a6d 100644 --- a/fpdfsdk/javascript/cjs_runtime.h +++ b/fpdfsdk/javascript/cjs_runtime.h @@ -13,8 +13,8 @@ #include #include -#include "core/fxcrt/include/cfx_observable.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/cfx_observable.h" +#include "core/fxcrt/fx_basic.h" #include "fpdfsdk/javascript/JS_EventHandler.h" #include "fpdfsdk/javascript/ijs_runtime.h" #include "fxjs/include/fxjs_v8.h" diff --git a/fpdfsdk/javascript/global.cpp b/fpdfsdk/javascript/global.cpp index b55953907f..144b5ee42a 100644 --- a/fpdfsdk/javascript/global.cpp +++ b/fpdfsdk/javascript/global.cpp @@ -8,7 +8,7 @@ #include -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "fpdfsdk/javascript/JS_Define.h" #include "fpdfsdk/javascript/JS_EventHandler.h" #include "fpdfsdk/javascript/JS_GlobalData.h" diff --git a/fpdfsdk/javascript/ijs_context.h b/fpdfsdk/javascript/ijs_context.h index 587ff8110c..cfeed3050d 100644 --- a/fpdfsdk/javascript/ijs_context.h +++ b/fpdfsdk/javascript/ijs_context.h @@ -7,8 +7,8 @@ #ifndef FPDFSDK_JAVASCRIPT_IJS_CONTEXT_H_ #define FPDFSDK_JAVASCRIPT_IJS_CONTEXT_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" class CPDF_Bookmark; class CPDF_FormField; diff --git a/fpdfsdk/javascript/ijs_runtime.h b/fpdfsdk/javascript/ijs_runtime.h index ee024fe2fd..be0cd042d2 100644 --- a/fpdfsdk/javascript/ijs_runtime.h +++ b/fpdfsdk/javascript/ijs_runtime.h @@ -7,8 +7,8 @@ #ifndef FPDFSDK_JAVASCRIPT_IJS_RUNTIME_H_ #define FPDFSDK_JAVASCRIPT_IJS_RUNTIME_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #ifdef PDF_ENABLE_XFA #include "fxjs/include/fxjse.h" diff --git a/fpdfsdk/javascript/public_methods_embeddertest.cpp b/fpdfsdk/javascript/public_methods_embeddertest.cpp index 80ec6492ee..24793667b0 100644 --- a/fpdfsdk/javascript/public_methods_embeddertest.cpp +++ b/fpdfsdk/javascript/public_methods_embeddertest.cpp @@ -4,7 +4,7 @@ #include -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #include "fpdfsdk/javascript/PublicMethods.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/js_embedder_test.h" diff --git a/fpdfsdk/javascript/resource.h b/fpdfsdk/javascript/resource.h index 7f041cd21a..663cf3b04d 100644 --- a/fpdfsdk/javascript/resource.h +++ b/fpdfsdk/javascript/resource.h @@ -7,7 +7,7 @@ #ifndef FPDFSDK_JAVASCRIPT_RESOURCE_H_ #define FPDFSDK_JAVASCRIPT_RESOURCE_H_ -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" class CJS_Context; diff --git a/fpdfsdk/javascript/util.cpp b/fpdfsdk/javascript/util.cpp index 44511f591f..50c4c56ee9 100644 --- a/fpdfsdk/javascript/util.cpp +++ b/fpdfsdk/javascript/util.cpp @@ -12,7 +12,7 @@ #include #include -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "fpdfsdk/javascript/JS_Define.h" #include "fpdfsdk/javascript/JS_EventHandler.h" #include "fpdfsdk/javascript/JS_Object.h" diff --git a/fpdfsdk/pdfwindow/PWL_Edit.cpp b/fpdfsdk/pdfwindow/PWL_Edit.cpp index b87d3390ea..8c02607719 100644 --- a/fpdfsdk/pdfwindow/PWL_Edit.cpp +++ b/fpdfsdk/pdfwindow/PWL_Edit.cpp @@ -10,8 +10,8 @@ #include "core/fpdfapi/fpdf_font/cpdf_font.h" #include "core/fpdfdoc/cpvt_word.h" -#include "core/fxcrt/include/fx_safe_types.h" -#include "core/fxcrt/include/fx_xml.h" +#include "core/fxcrt/fx_safe_types.h" +#include "core/fxcrt/fx_xml.h" #include "core/fxge/include/cfx_graphstatedata.h" #include "core/fxge/include/cfx_pathdata.h" #include "core/fxge/include/cfx_renderdevice.h" diff --git a/fpdfsdk/pdfwindow/PWL_Edit.h b/fpdfsdk/pdfwindow/PWL_Edit.h index e6993bd16b..2ca61316e1 100644 --- a/fpdfsdk/pdfwindow/PWL_Edit.h +++ b/fpdfsdk/pdfwindow/PWL_Edit.h @@ -7,7 +7,7 @@ #ifndef FPDFSDK_PDFWINDOW_PWL_EDIT_H_ #define FPDFSDK_PDFWINDOW_PWL_EDIT_H_ -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #include "fpdfsdk/fxedit/include/fx_edit.h" #include "fpdfsdk/pdfwindow/PWL_EditCtrl.h" #include "fpdfsdk/pdfwindow/PWL_Wnd.h" diff --git a/fpdfsdk/pdfwindow/PWL_EditCtrl.h b/fpdfsdk/pdfwindow/PWL_EditCtrl.h index 8be2b00821..9c97f2f55b 100644 --- a/fpdfsdk/pdfwindow/PWL_EditCtrl.h +++ b/fpdfsdk/pdfwindow/PWL_EditCtrl.h @@ -7,7 +7,7 @@ #ifndef FPDFSDK_PDFWINDOW_PWL_EDITCTRL_H_ #define FPDFSDK_PDFWINDOW_PWL_EDITCTRL_H_ -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #include "fpdfsdk/fxedit/include/fx_edit.h" #include "fpdfsdk/pdfwindow/PWL_Wnd.h" diff --git a/fpdfsdk/pdfwindow/PWL_Icon.h b/fpdfsdk/pdfwindow/PWL_Icon.h index 04d13a1411..b3b59ca1ba 100644 --- a/fpdfsdk/pdfwindow/PWL_Icon.h +++ b/fpdfsdk/pdfwindow/PWL_Icon.h @@ -7,7 +7,7 @@ #ifndef FPDFSDK_PDFWINDOW_PWL_ICON_H_ #define FPDFSDK_PDFWINDOW_PWL_ICON_H_ -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #include "fpdfsdk/pdfwindow/PWL_Wnd.h" class CPWL_Image : public CPWL_Wnd { diff --git a/fpdfsdk/pdfwindow/PWL_Wnd.h b/fpdfsdk/pdfwindow/PWL_Wnd.h index 37209ed8f8..8fd538f7c4 100644 --- a/fpdfsdk/pdfwindow/PWL_Wnd.h +++ b/fpdfsdk/pdfwindow/PWL_Wnd.h @@ -11,7 +11,7 @@ #include #include "core/fpdfdoc/cpdf_formcontrol.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #include "fpdfsdk/cfx_systemhandler.h" class CPDFSDK_Widget; diff --git a/fxjs/DEPS b/fxjs/DEPS index ccea0b552a..633eeed561 100644 --- a/fxjs/DEPS +++ b/fxjs/DEPS @@ -1,4 +1,4 @@ include_rules = [ - '+core/fxcrt/include', + '+core/fxcrt', '+v8/include', ] diff --git a/fxjs/fxjs_v8.cpp b/fxjs/fxjs_v8.cpp index 19197b9ffb..e967feef75 100644 --- a/fxjs/fxjs_v8.cpp +++ b/fxjs/fxjs_v8.cpp @@ -8,7 +8,7 @@ #include -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" // Keep this consistent with the values defined in gin/public/context_holder.h // (without actually requiring a dependency on gin itself for the standalone diff --git a/fxjs/include/cfxjse_context.h b/fxjs/include/cfxjse_context.h index 882258fe57..669fa89517 100644 --- a/fxjs/include/cfxjse_context.h +++ b/fxjs/include/cfxjse_context.h @@ -10,7 +10,7 @@ #include #include -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #include "fxjs/include/fxjse.h" #include "v8/include/v8.h" diff --git a/fxjs/include/cfxjse_value.h b/fxjs/include/cfxjse_value.h index 7bb2c2d235..9fd1bee786 100644 --- a/fxjs/include/cfxjse_value.h +++ b/fxjs/include/cfxjse_value.h @@ -9,8 +9,8 @@ #include "v8/include/v8.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "fxjs/cfxjse_isolatetracker.h" #include "fxjs/cfxjse_runtimedata.h" diff --git a/fxjs/include/fxjs_v8.h b/fxjs/include/fxjs_v8.h index c87d8a5873..a9064f3faf 100644 --- a/fxjs/include/fxjs_v8.h +++ b/fxjs/include/fxjs_v8.h @@ -21,7 +21,7 @@ #include #include -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #ifdef PDF_ENABLE_XFA // Header for CFXJSE_RuntimeData. FXJS_V8 doesn't interpret this class, // it is just passed along to XFA. diff --git a/fxjs/include/fxjse.h b/fxjs/include/fxjse.h index 79c32b053a..eafae88d2d 100644 --- a/fxjs/include/fxjse.h +++ b/fxjs/include/fxjse.h @@ -7,8 +7,8 @@ #ifndef FXJS_INCLUDE_FXJSE_H_ #define FXJS_INCLUDE_FXJSE_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "v8/include/v8.h" class CFXJSE_Arguments; diff --git a/testing/DEPS b/testing/DEPS index d3cc6f3869..32b3100b72 100644 --- a/testing/DEPS +++ b/testing/DEPS @@ -1,7 +1,7 @@ include_rules = [ '+core/fpdfapi', '+core/fxcodec', - '+core/fxcrt/include', + '+core/fxcrt', '+core/fxge/include', '+core/include', '+fxjs/include', diff --git a/testing/fx_string_testhelpers.h b/testing/fx_string_testhelpers.h index a47242805f..82552d7227 100644 --- a/testing/fx_string_testhelpers.h +++ b/testing/fx_string_testhelpers.h @@ -7,7 +7,7 @@ #include -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" // Output stream operator so GTEST macros work with FX strings. std::ostream& operator<<(std::ostream& out, const CFX_ByteStringC& str); diff --git a/testing/libfuzzer/xfa_codec_fuzzer.h b/testing/libfuzzer/xfa_codec_fuzzer.h index 38c4e0ac33..e73405ef02 100644 --- a/testing/libfuzzer/xfa_codec_fuzzer.h +++ b/testing/libfuzzer/xfa_codec_fuzzer.h @@ -9,7 +9,7 @@ #include "core/fxcodec/codec/include/ccodec_progressivedecoder.h" #include "core/fxcodec/include/fx_codec.h" -#include "core/fxcrt/include/fx_stream.h" +#include "core/fxcrt/fx_stream.h" class XFACodecFuzzer { public: diff --git a/testing/utils/path_service.cpp b/testing/utils/path_service.cpp index c3b8f40d18..a67a778953 100644 --- a/testing/utils/path_service.cpp +++ b/testing/utils/path_service.cpp @@ -15,7 +15,7 @@ #include -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" // static bool PathService::EndsWithSeparator(const std::string& path) { diff --git a/third_party/DEPS b/third_party/DEPS index 7cc56b3b10..c2a3adde7b 100644 --- a/third_party/DEPS +++ b/third_party/DEPS @@ -1,7 +1,7 @@ include_rules = [ # A lot of third_party code has been modified to use fxcrt. - '+core/fxcrt/include/fx_basic.h', - '+core/fxcrt/include/fx_coordinates.h', - '+core/fxcrt/include/fx_memory.h', - '+core/fxcrt/include/fx_system.h', + '+core/fxcrt/fx_basic.h', + '+core/fxcrt/fx_coordinates.h', + '+core/fxcrt/fx_memory.h', + '+core/fxcrt/fx_system.h', ] diff --git a/third_party/agg23/agg_array.h b/third_party/agg23/agg_array.h index 3a7fb7c9bd..204ae2e7a2 100644 --- a/third_party/agg23/agg_array.h +++ b/third_party/agg23/agg_array.h @@ -17,7 +17,7 @@ #define AGG_ARRAY_INCLUDED #include "agg_basics.h" -#include "core/fxcrt/include/fx_memory.h" // For FXSYS_* macros. +#include "core/fxcrt/fx_memory.h" // For FXSYS_* macros. namespace agg { diff --git a/third_party/agg23/agg_basics.h b/third_party/agg23/agg_basics.h index f3dc43cc08..52a658ec96 100644 --- a/third_party/agg23/agg_basics.h +++ b/third_party/agg23/agg_basics.h @@ -41,7 +41,7 @@ #endif #define AGG_INLINE inline -#include "core/fxcrt/include/fx_system.h" // For FX_FLOAT +#include "core/fxcrt/fx_system.h" // For FX_FLOAT namespace agg { diff --git a/third_party/agg23/agg_curves.cpp b/third_party/agg23/agg_curves.cpp index 619fb6f8d4..b86cf630c3 100644 --- a/third_party/agg23/agg_curves.cpp +++ b/third_party/agg23/agg_curves.cpp @@ -21,7 +21,7 @@ #include "agg_curves.h" #include "agg_math.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" namespace agg { diff --git a/third_party/agg23/agg_path_storage.cpp b/third_party/agg23/agg_path_storage.cpp index 4c44ca7136..968746738a 100644 --- a/third_party/agg23/agg_path_storage.cpp +++ b/third_party/agg23/agg_path_storage.cpp @@ -25,7 +25,7 @@ #include "agg_math.h" #include "agg_path_storage.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" namespace agg { diff --git a/third_party/agg23/agg_rasterizer_scanline_aa.h b/third_party/agg23/agg_rasterizer_scanline_aa.h index 47e8e71f63..77e04edee9 100644 --- a/third_party/agg23/agg_rasterizer_scanline_aa.h +++ b/third_party/agg23/agg_rasterizer_scanline_aa.h @@ -35,8 +35,8 @@ #include "agg_clip_liang_barsky.h" #include "agg_math.h" #include "agg_render_scanlines.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_memory.h" namespace agg { diff --git a/third_party/agg23/agg_vcgen_dash.cpp b/third_party/agg23/agg_vcgen_dash.cpp index 3d05d888a4..bd5a2122a2 100644 --- a/third_party/agg23/agg_vcgen_dash.cpp +++ b/third_party/agg23/agg_vcgen_dash.cpp @@ -20,7 +20,7 @@ #include "agg_shorten_path.h" #include "agg_vcgen_dash.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" namespace agg { diff --git a/third_party/agg23/agg_vcgen_stroke.cpp b/third_party/agg23/agg_vcgen_stroke.cpp index 7b78ad9007..03225b1649 100644 --- a/third_party/agg23/agg_vcgen_stroke.cpp +++ b/third_party/agg23/agg_vcgen_stroke.cpp @@ -24,7 +24,7 @@ //---------------------------------------------------------------------------- #include "agg_vcgen_stroke.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" namespace agg { diff --git a/third_party/lcms2-2.6/src/cmserr.c b/third_party/lcms2-2.6/src/cmserr.c index 6954474470..77b67b43aa 100644 --- a/third_party/lcms2-2.6/src/cmserr.c +++ b/third_party/lcms2-2.6/src/cmserr.c @@ -251,8 +251,8 @@ cmsBool _cmsRegisterMemHandlerPlugin(cmsContext ContextID, cmsPluginBase *Data) return TRUE; } #else -#include "core/fxcrt/include/fx_memory.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_memory.h" +#include "core/fxcrt/fx_system.h" cmsBool _cmsRegisterMemHandlerPlugin(cmsContext ContextID, cmsPluginBase* Plugin) { diff --git a/third_party/libjpeg/jinclude.h b/third_party/libjpeg/jinclude.h index 94a09c2018..6f6a87c79e 100644 --- a/third_party/libjpeg/jinclude.h +++ b/third_party/libjpeg/jinclude.h @@ -20,7 +20,7 @@ #include "jconfig.h" /* auto configuration options */ #define JCONFIG_INCLUDED /* so that jpeglib.h doesn't do it again */ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" /* * We need the NULL macro and size_t typedef. diff --git a/third_party/libtiff/tiffconf.h b/third_party/libtiff/tiffconf.h index b80d197fa0..26de163aba 100644 --- a/third_party/libtiff/tiffconf.h +++ b/third_party/libtiff/tiffconf.h @@ -7,7 +7,7 @@ #ifndef _TIFFCONF_ #define _TIFFCONF_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" //NOTE: The tiff codec requires an ANSI C compiler environment for building and // presumes an ANSI C environment for use. diff --git a/third_party/zlib_v128/zutil.h b/third_party/zlib_v128/zutil.h index c9d8c16845..c3b10e109b 100644 --- a/third_party/zlib_v128/zutil.h +++ b/third_party/zlib_v128/zutil.h @@ -13,7 +13,7 @@ #ifndef ZUTIL_H #define ZUTIL_H -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #ifdef HAVE_HIDDEN # define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) diff --git a/xfa/DEPS b/xfa/DEPS index c245fc4cb6..fc47df481c 100644 --- a/xfa/DEPS +++ b/xfa/DEPS @@ -1,5 +1,5 @@ include_rules = [ - '+core/fxcrt/include', + '+core/fxcrt', '+core/fpdfapi/fpdf_parser', '+core/fxge/include', '+third_party/bigint' diff --git a/xfa/fde/cfde_txtedtbuf.h b/xfa/fde/cfde_txtedtbuf.h index baf67cef00..e1bc9259e4 100644 --- a/xfa/fde/cfde_txtedtbuf.h +++ b/xfa/fde/cfde_txtedtbuf.h @@ -9,8 +9,8 @@ #include -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_system.h" class IFX_MemoryAllocator; class IFX_Pause; diff --git a/xfa/fde/cfde_txtedtbufiter.h b/xfa/fde/cfde_txtedtbufiter.h index fc3a571ec2..dacfb26918 100644 --- a/xfa/fde/cfde_txtedtbufiter.h +++ b/xfa/fde/cfde_txtedtbufiter.h @@ -7,7 +7,7 @@ #ifndef XFA_FDE_CFDE_TXTEDTBUFITER_H_ #define XFA_FDE_CFDE_TXTEDTBUFITER_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fde/ifx_chariter.h" class CFDE_TxtEdtBuf; diff --git a/xfa/fde/cfde_txtedtdorecord_deleterange.h b/xfa/fde/cfde_txtedtdorecord_deleterange.h index c99c9e18d9..316e87f266 100644 --- a/xfa/fde/cfde_txtedtdorecord_deleterange.h +++ b/xfa/fde/cfde_txtedtdorecord_deleterange.h @@ -7,8 +7,8 @@ #ifndef XFA_FDE_CFDE_TXTEDTDORECORD_DELETERANGE_H_ #define XFA_FDE_CFDE_TXTEDTDORECORD_DELETERANGE_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fde/ifde_txtedtdorecord.h" class CFDE_TxtEdtEngine; diff --git a/xfa/fde/cfde_txtedtdorecord_insert.h b/xfa/fde/cfde_txtedtdorecord_insert.h index 38bbe57c1a..73493aa4fa 100644 --- a/xfa/fde/cfde_txtedtdorecord_insert.h +++ b/xfa/fde/cfde_txtedtdorecord_insert.h @@ -7,8 +7,8 @@ #ifndef XFA_FDE_CFDE_TXTEDTDORECORD_INSERT_H_ #define XFA_FDE_CFDE_TXTEDTDORECORD_INSERT_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fde/ifde_txtedtdorecord.h" class CFDE_TxtEdtEngine; diff --git a/xfa/fde/cfx_chariter.h b/xfa/fde/cfx_chariter.h index ba9d84cb39..004da3c279 100644 --- a/xfa/fde/cfx_chariter.h +++ b/xfa/fde/cfx_chariter.h @@ -7,8 +7,8 @@ #ifndef XFA_FDE_CFX_CHARITER_H_ #define XFA_FDE_CFX_CHARITER_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fde/ifx_chariter.h" class CFX_CharIter : public IFX_CharIter { diff --git a/xfa/fde/cfx_wordbreak.h b/xfa/fde/cfx_wordbreak.h index 2465c5509e..14cf7304cd 100644 --- a/xfa/fde/cfx_wordbreak.h +++ b/xfa/fde/cfx_wordbreak.h @@ -9,8 +9,8 @@ #include -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" class IFX_CharIter; diff --git a/xfa/fde/css/fde_csscache.cpp b/xfa/fde/css/fde_csscache.cpp index 2343c993a2..be5fc7105c 100644 --- a/xfa/fde/css/fde_csscache.cpp +++ b/xfa/fde/css/fde_csscache.cpp @@ -8,7 +8,7 @@ #include -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "xfa/fxfa/app/xfa_textlayout.h" FDE_CSSCacheItem::FDE_CSSCacheItem(IFDE_CSSStyleSheet* p) diff --git a/xfa/fde/css/fde_cssdatatable.cpp b/xfa/fde/css/fde_cssdatatable.cpp index 0d253ba594..955fe9e747 100644 --- a/xfa/fde/css/fde_cssdatatable.cpp +++ b/xfa/fde/css/fde_cssdatatable.cpp @@ -6,7 +6,7 @@ #include "xfa/fde/css/fde_cssdatatable.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "xfa/fgas/crt/fgas_codepage.h" namespace { diff --git a/xfa/fde/css/fde_cssdatatable.h b/xfa/fde/css/fde_cssdatatable.h index 252efdce50..62eff3f014 100644 --- a/xfa/fde/css/fde_cssdatatable.h +++ b/xfa/fde/css/fde_cssdatatable.h @@ -7,7 +7,7 @@ #ifndef XFA_FDE_CSS_FDE_CSSDATATABLE_H_ #define XFA_FDE_CSS_FDE_CSSDATATABLE_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fde/css/fde_css.h" #include "xfa/fgas/crt/fgas_memory.h" diff --git a/xfa/fde/css/fde_cssdeclaration.cpp b/xfa/fde/css/fde_cssdeclaration.cpp index 34a91ec83c..3ce6ebabd6 100644 --- a/xfa/fde/css/fde_cssdeclaration.cpp +++ b/xfa/fde/css/fde_cssdeclaration.cpp @@ -6,7 +6,7 @@ #include "xfa/fde/css/fde_cssdeclaration.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" IFDE_CSSValue* CFDE_CSSDeclaration::GetProperty(FDE_CSSPROPERTY eProperty, FX_BOOL& bImportant) const { diff --git a/xfa/fde/css/fde_cssstyleselector.h b/xfa/fde/css/fde_cssstyleselector.h index 6a3f2bf594..ba2037677e 100644 --- a/xfa/fde/css/fde_cssstyleselector.h +++ b/xfa/fde/css/fde_cssstyleselector.h @@ -10,7 +10,7 @@ #include #include -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "xfa/fde/css/fde_css.h" #include "xfa/fde/css/fde_csscache.h" #include "xfa/fde/css/fde_cssdeclaration.h" diff --git a/xfa/fde/css/fde_cssstylesheet.h b/xfa/fde/css/fde_cssstylesheet.h index b013e2d2bd..cd587ddcae 100644 --- a/xfa/fde/css/fde_cssstylesheet.h +++ b/xfa/fde/css/fde_cssstylesheet.h @@ -10,7 +10,7 @@ #include #include -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "xfa/fde/css/fde_cssdeclaration.h" class CFDE_CSSSyntaxParser; diff --git a/xfa/fde/fde_render.h b/xfa/fde/fde_render.h index b91bbfe554..45cceabac4 100644 --- a/xfa/fde/fde_render.h +++ b/xfa/fde/fde_render.h @@ -10,7 +10,7 @@ #include #include -#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/fx_coordinates.h" #include "xfa/fde/fde_gedevice.h" #include "xfa/fde/fde_iterator.h" #include "xfa/fde/fde_visualset.h" diff --git a/xfa/fde/fde_visualset.h b/xfa/fde/fde_visualset.h index 4ad24d7630..45b9391e63 100644 --- a/xfa/fde/fde_visualset.h +++ b/xfa/fde/fde_visualset.h @@ -7,8 +7,8 @@ #ifndef XFA_FDE_FDE_VISUALSET_H_ #define XFA_FDE_FDE_VISUALSET_H_ -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_dib.h" #include "xfa/fde/cfde_path.h" #include "xfa/fde/fde_object.h" diff --git a/xfa/fde/ifde_txtedtdorecord.h b/xfa/fde/ifde_txtedtdorecord.h index 5c5d595e4e..e36a59539a 100644 --- a/xfa/fde/ifde_txtedtdorecord.h +++ b/xfa/fde/ifde_txtedtdorecord.h @@ -7,7 +7,7 @@ #ifndef XFA_FDE_IFDE_TXTEDTDORECORD_H_ #define XFA_FDE_IFDE_TXTEDTDORECORD_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class IFDE_TxtEdtDoRecord { public: diff --git a/xfa/fde/ifx_chariter.h b/xfa/fde/ifx_chariter.h index 44a9ba42f6..6c3fa00107 100644 --- a/xfa/fde/ifx_chariter.h +++ b/xfa/fde/ifx_chariter.h @@ -7,7 +7,7 @@ #ifndef XFA_FDE_IFX_CHARITER_H_ #define XFA_FDE_IFX_CHARITER_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class IFX_CharIter { public: diff --git a/xfa/fde/tto/fde_textout.cpp b/xfa/fde/tto/fde_textout.cpp index c83afc1ad6..3010fc7f78 100644 --- a/xfa/fde/tto/fde_textout.cpp +++ b/xfa/fde/tto/fde_textout.cpp @@ -8,8 +8,8 @@ #include -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fde/cfde_path.h" #include "xfa/fde/fde_gedevice.h" #include "xfa/fde/fde_object.h" diff --git a/xfa/fde/xml/cfx_saxreader.h b/xfa/fde/xml/cfx_saxreader.h index e602c3d9e2..7253c8d633 100644 --- a/xfa/fde/xml/cfx_saxreader.h +++ b/xfa/fde/xml/cfx_saxreader.h @@ -7,7 +7,7 @@ #ifndef XFA_FDE_XML_CFX_SAXREADER_H_ #define XFA_FDE_XML_CFX_SAXREADER_H_ -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" class CXFA_SAXContext; diff --git a/xfa/fde/xml/fde_xml.h b/xfa/fde/xml/fde_xml.h index e9906beced..3be4020bbc 100644 --- a/xfa/fde/xml/fde_xml.h +++ b/xfa/fde/xml/fde_xml.h @@ -7,7 +7,7 @@ #ifndef XFA_FDE_XML_FDE_XML_H_ #define XFA_FDE_XML_FDE_XML_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" enum class FDE_XmlSyntaxResult { None, diff --git a/xfa/fde/xml/fde_xml_imp.cpp b/xfa/fde/xml/fde_xml_imp.cpp index 2642ed2202..ea4fe97dac 100644 --- a/xfa/fde/xml/fde_xml_imp.cpp +++ b/xfa/fde/xml/fde_xml_imp.cpp @@ -8,8 +8,8 @@ #include -#include "core/fxcrt/include/fx_ext.h" -#include "core/fxcrt/include/fx_safe_types.h" +#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_safe_types.h" #include "xfa/fgas/crt/fgas_codepage.h" namespace { diff --git a/xfa/fde/xml/fde_xml_imp.h b/xfa/fde/xml/fde_xml_imp.h index b7892d6ff4..2ce95a0f41 100644 --- a/xfa/fde/xml/fde_xml_imp.h +++ b/xfa/fde/xml/fde_xml_imp.h @@ -7,7 +7,7 @@ #ifndef XFA_FDE_XML_FDE_XML_IMP_H_ #define XFA_FDE_XML_FDE_XML_IMP_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fde/xml/fde_xml.h" #include "xfa/fgas/crt/fgas_memory.h" #include "xfa/fgas/crt/fgas_stream.h" diff --git a/xfa/fgas/crt/fgas_codepage.cpp b/xfa/fgas/crt/fgas_codepage.cpp index 57f3e1e322..86aeb7b983 100644 --- a/xfa/fgas/crt/fgas_codepage.cpp +++ b/xfa/fgas/crt/fgas_codepage.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "xfa/fgas/crt/fgas_codepage.h" #include "xfa/fgas/crt/fgas_language.h" diff --git a/xfa/fgas/crt/fgas_codepage.h b/xfa/fgas/crt/fgas_codepage.h index 78aee83219..2beed27552 100644 --- a/xfa/fgas/crt/fgas_codepage.h +++ b/xfa/fgas/crt/fgas_codepage.h @@ -7,7 +7,7 @@ #ifndef XFA_FGAS_CRT_FGAS_CODEPAGE_H_ #define XFA_FGAS_CRT_FGAS_CODEPAGE_H_ -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #define FX_CODEPAGE_DefANSI 0 #define FX_CODEPAGE_DefOEM 1 diff --git a/xfa/fgas/crt/fgas_memory.h b/xfa/fgas/crt/fgas_memory.h index 1034c417d7..4e4e33f7fc 100644 --- a/xfa/fgas/crt/fgas_memory.h +++ b/xfa/fgas/crt/fgas_memory.h @@ -9,8 +9,8 @@ #include -#include "core/fxcrt/include/fx_memory.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_memory.h" +#include "core/fxcrt/fx_system.h" enum FX_ALLOCTYPE { FX_ALLOCTYPE_Static, diff --git a/xfa/fgas/crt/fgas_stream.h b/xfa/fgas/crt/fgas_stream.h index 443e8c7f5c..637402f1f5 100644 --- a/xfa/fgas/crt/fgas_stream.h +++ b/xfa/fgas/crt/fgas_stream.h @@ -7,8 +7,8 @@ #ifndef XFA_FGAS_CRT_FGAS_STREAM_H_ #define XFA_FGAS_CRT_FGAS_STREAM_H_ -#include "core/fxcrt/include/fx_stream.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_stream.h" +#include "core/fxcrt/fx_system.h" class IFX_Stream; diff --git a/xfa/fgas/crt/fgas_utils.cpp b/xfa/fgas/crt/fgas_utils.cpp index e1f7c477fd..150a65af19 100644 --- a/xfa/fgas/crt/fgas_utils.cpp +++ b/xfa/fgas/crt/fgas_utils.cpp @@ -8,7 +8,7 @@ #include -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" class FX_BASEARRAYDATA : public CFX_Target { public: diff --git a/xfa/fgas/crt/fgas_utils.h b/xfa/fgas/crt/fgas_utils.h index d7b753994c..c45f42405f 100644 --- a/xfa/fgas/crt/fgas_utils.h +++ b/xfa/fgas/crt/fgas_utils.h @@ -7,7 +7,7 @@ #ifndef XFA_FGAS_CRT_FGAS_UTILS_H_ #define XFA_FGAS_CRT_FGAS_UTILS_H_ -#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/fx_coordinates.h" #include "xfa/fgas/crt/fgas_memory.h" class FX_BASEARRAYDATA; diff --git a/xfa/fgas/font/fgas_fontutils.cpp b/xfa/fgas/font/fgas_fontutils.cpp index c31e1e08ca..8e923c1209 100644 --- a/xfa/fgas/font/fgas_fontutils.cpp +++ b/xfa/fgas/font/fgas_fontutils.cpp @@ -6,7 +6,7 @@ #include "xfa/fgas/font/fgas_fontutils.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "xfa/fgas/font/fgas_font.h" uint32_t FGAS_GetFontHashCode(uint16_t wCodePage, uint32_t dwFontStyles) { diff --git a/xfa/fgas/font/fgas_fontutils.h b/xfa/fgas/font/fgas_fontutils.h index 4cb4671238..d7055ced9b 100644 --- a/xfa/fgas/font/fgas_fontutils.h +++ b/xfa/fgas/font/fgas_fontutils.h @@ -7,7 +7,7 @@ #ifndef XFA_FGAS_FONT_FGAS_FONTUTILS_H_ #define XFA_FGAS_FONT_FGAS_FONTUTILS_H_ -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" struct FGAS_FONTUSB { uint16_t wStartUnicode; diff --git a/xfa/fgas/font/fgas_gefont.h b/xfa/fgas/font/fgas_gefont.h index 7f3cc60478..5a13aec372 100644 --- a/xfa/fgas/font/fgas_gefont.h +++ b/xfa/fgas/font/fgas_gefont.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/fx_memory.h" #include "xfa/fgas/crt/fgas_utils.h" #include "xfa/fgas/font/fgas_font.h" diff --git a/xfa/fgas/font/fgas_stdfontmgr.cpp b/xfa/fgas/font/fgas_stdfontmgr.cpp index 96081f5799..93f1a7a436 100644 --- a/xfa/fgas/font/fgas_stdfontmgr.cpp +++ b/xfa/fgas/font/fgas_stdfontmgr.cpp @@ -6,7 +6,7 @@ #include "xfa/fgas/font/fgas_stdfontmgr.h" -#include "core/fxcrt/include/fx_stream.h" +#include "core/fxcrt/fx_stream.h" #include "core/fxge/include/cfx_fontmapper.h" #include "core/fxge/include/cfx_fontmgr.h" #include "core/fxge/include/cfx_gemodule.h" diff --git a/xfa/fgas/font/fgas_stdfontmgr.h b/xfa/fgas/font/fgas_stdfontmgr.h index 6fed90da50..f2d87b9002 100644 --- a/xfa/fgas/font/fgas_stdfontmgr.h +++ b/xfa/fgas/font/fgas_stdfontmgr.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "core/fxge/include/cfx_fontmapper.h" #include "core/fxge/include/fx_freetype.h" #include "core/fxge/include/ifx_systemfontinfo.h" diff --git a/xfa/fgas/layout/fgas_linebreak.cpp b/xfa/fgas/layout/fgas_linebreak.cpp index 519ccc590a..2a9e3be522 100644 --- a/xfa/fgas/layout/fgas_linebreak.cpp +++ b/xfa/fgas/layout/fgas_linebreak.cpp @@ -6,7 +6,7 @@ #include "xfa/fgas/layout/fgas_linebreak.h" -#include "core/fxcrt/include/fx_ucd.h" +#include "core/fxcrt/fx_ucd.h" const FX_LINEBREAKTYPE gs_FX_LineBreak_PairTable[64][32] = { {FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB, diff --git a/xfa/fgas/layout/fgas_linebreak.h b/xfa/fgas/layout/fgas_linebreak.h index a96841ef7e..99333dfa47 100644 --- a/xfa/fgas/layout/fgas_linebreak.h +++ b/xfa/fgas/layout/fgas_linebreak.h @@ -7,7 +7,7 @@ #ifndef XFA_FGAS_LAYOUT_FGAS_LINEBREAK_H_ #define XFA_FGAS_LAYOUT_FGAS_LINEBREAK_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fgas/crt/fgas_utils.h" enum FX_LINEBREAKTYPE : uint8_t { diff --git a/xfa/fgas/layout/fgas_rtfbreak.cpp b/xfa/fgas/layout/fgas_rtfbreak.cpp index 21ed0665b9..dfe066f7f4 100644 --- a/xfa/fgas/layout/fgas_rtfbreak.cpp +++ b/xfa/fgas/layout/fgas_rtfbreak.cpp @@ -8,8 +8,8 @@ #include -#include "core/fxcrt/include/fx_arabic.h" -#include "core/fxcrt/include/fx_arb.h" +#include "core/fxcrt/fx_arabic.h" +#include "core/fxcrt/fx_arb.h" #include "xfa/fgas/font/fgas_gefont.h" #include "xfa/fgas/layout/fgas_linebreak.h" #include "xfa/fgas/layout/fgas_unicode.h" diff --git a/xfa/fgas/layout/fgas_rtfbreak.h b/xfa/fgas/layout/fgas_rtfbreak.h index 35b790f39b..3b8551b72c 100644 --- a/xfa/fgas/layout/fgas_rtfbreak.h +++ b/xfa/fgas/layout/fgas_rtfbreak.h @@ -7,8 +7,8 @@ #ifndef XFA_FGAS_LAYOUT_FGAS_RTFBREAK_H_ #define XFA_FGAS_LAYOUT_FGAS_RTFBREAK_H_ -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_ucd.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_ucd.h" #include "xfa/fgas/crt/fgas_memory.h" #include "xfa/fgas/crt/fgas_utils.h" #include "xfa/fgas/layout/fgas_textbreak.h" diff --git a/xfa/fgas/layout/fgas_textbreak.cpp b/xfa/fgas/layout/fgas_textbreak.cpp index e10ef01336..d9a0e22e8b 100644 --- a/xfa/fgas/layout/fgas_textbreak.cpp +++ b/xfa/fgas/layout/fgas_textbreak.cpp @@ -8,9 +8,9 @@ #include -#include "core/fxcrt/include/fx_arabic.h" -#include "core/fxcrt/include/fx_arb.h" -#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/fx_arabic.h" +#include "core/fxcrt/fx_arb.h" +#include "core/fxcrt/fx_memory.h" #include "xfa/fgas/font/fgas_gefont.h" #include "xfa/fgas/layout/fgas_linebreak.h" #include "xfa/fgas/layout/fgas_unicode.h" diff --git a/xfa/fgas/layout/fgas_textbreak.h b/xfa/fgas/layout/fgas_textbreak.h index b5f8ca1edc..062646f8b4 100644 --- a/xfa/fgas/layout/fgas_textbreak.h +++ b/xfa/fgas/layout/fgas_textbreak.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_ucd.h" +#include "core/fxcrt/fx_ucd.h" #include "core/fxge/include/cfx_renderdevice.h" #include "xfa/fgas/crt/fgas_utils.h" #include "xfa/fgas/layout/fgas_unicode.h" diff --git a/xfa/fgas/localization/fgas_datetime.cpp b/xfa/fgas/localization/fgas_datetime.cpp index f658d3597d..18e30fcb86 100644 --- a/xfa/fgas/localization/fgas_datetime.cpp +++ b/xfa/fgas/localization/fgas_datetime.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fgas/localization/fgas_datetime.h" #if _FX_OS_ == _FX_LINUX_DESKTOP_ || _FX_OS_ == _FX_ANDROID_ || \ diff --git a/xfa/fgas/localization/fgas_datetime.h b/xfa/fgas/localization/fgas_datetime.h index 7c8f111bfc..52d665a9c6 100644 --- a/xfa/fgas/localization/fgas_datetime.h +++ b/xfa/fgas/localization/fgas_datetime.h @@ -7,7 +7,7 @@ #ifndef XFA_FGAS_LOCALIZATION_FGAS_DATETIME_H_ #define XFA_FGAS_LOCALIZATION_FGAS_DATETIME_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CFX_Unitime; class CFX_DateTime; diff --git a/xfa/fgas/localization/fgas_locale.cpp b/xfa/fgas/localization/fgas_locale.cpp index 2a77bbe7ed..7393d58096 100644 --- a/xfa/fgas/localization/fgas_locale.cpp +++ b/xfa/fgas/localization/fgas_locale.cpp @@ -6,8 +6,8 @@ #include -#include "core/fxcrt/include/fx_ext.h" -#include "core/fxcrt/include/fx_xml.h" +#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_xml.h" #include "xfa/fgas/localization/fgas_localeimp.h" #define FX_LOCALECATEGORY_DateHash 0xbde9abde diff --git a/xfa/fgas/localization/fgas_locale.h b/xfa/fgas/localization/fgas_locale.h index cc565a6d77..5b4c7f8147 100644 --- a/xfa/fgas/localization/fgas_locale.h +++ b/xfa/fgas/localization/fgas_locale.h @@ -7,7 +7,7 @@ #ifndef XFA_FGAS_LOCALIZATION_FGAS_LOCALE_H_ #define XFA_FGAS_LOCALIZATION_FGAS_LOCALE_H_ -#include "core/fxcrt/include/fx_xml.h" +#include "core/fxcrt/fx_xml.h" #include "xfa/fgas/localization/fgas_datetime.h" class CFX_Unitime; diff --git a/xfa/fwl/basewidget/cfx_barcode.h b/xfa/fwl/basewidget/cfx_barcode.h index 758ba20b1a..7665476780 100644 --- a/xfa/fwl/basewidget/cfx_barcode.h +++ b/xfa/fwl/basewidget/cfx_barcode.h @@ -9,9 +9,9 @@ #include -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_dib.h" #include "xfa/fxbarcode/include/BC_Library.h" diff --git a/xfa/fwl/basewidget/ifwl_scrollbar.h b/xfa/fwl/basewidget/ifwl_scrollbar.h index 033cfe092b..33477acce6 100644 --- a/xfa/fwl/basewidget/ifwl_scrollbar.h +++ b/xfa/fwl/basewidget/ifwl_scrollbar.h @@ -7,7 +7,7 @@ #ifndef XFA_FWL_BASEWIDGET_IFWL_SCROLLBAR_H_ #define XFA_FWL_BASEWIDGET_IFWL_SCROLLBAR_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fwl/core/cfwl_widgetimpproperties.h" #include "xfa/fwl/core/fwl_error.h" #include "xfa/fwl/core/fwl_widgetimp.h" diff --git a/xfa/fwl/core/cfwl_event.h b/xfa/fwl/core/cfwl_event.h index 4d208d0d46..3ef81ff3ba 100644 --- a/xfa/fwl/core/cfwl_event.h +++ b/xfa/fwl/core/cfwl_event.h @@ -7,9 +7,9 @@ #ifndef XFA_FWL_CORE_CFWL_EVENT_H_ #define XFA_FWL_CORE_CFWL_EVENT_H_ -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fwl/core/cfwl_message.h" #include "xfa/fwl/core/fwl_error.h" diff --git a/xfa/fwl/core/cfwl_message.h b/xfa/fwl/core/cfwl_message.h index db434fc1fb..6089fdcf4f 100644 --- a/xfa/fwl/core/cfwl_message.h +++ b/xfa/fwl/core/cfwl_message.h @@ -7,8 +7,8 @@ #ifndef XFA_FWL_CORE_CFWL_MESSAGE_H_ #define XFA_FWL_CORE_CFWL_MESSAGE_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fwl/core/fwl_error.h" enum class CFWL_MessageType { diff --git a/xfa/fwl/core/cfwl_themepart.h b/xfa/fwl/core/cfwl_themepart.h index c5e6cd7ff5..1b2c706274 100644 --- a/xfa/fwl/core/cfwl_themepart.h +++ b/xfa/fwl/core/cfwl_themepart.h @@ -7,8 +7,8 @@ #ifndef XFA_FWL_CORE_CFWL_THEMEPART_H_ #define XFA_FWL_CORE_CFWL_THEMEPART_H_ -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" enum class CFWL_Part { None = 0, diff --git a/xfa/fwl/core/cfwl_themetext.h b/xfa/fwl/core/cfwl_themetext.h index c8929bd1f0..b570ca814d 100644 --- a/xfa/fwl/core/cfwl_themetext.h +++ b/xfa/fwl/core/cfwl_themetext.h @@ -7,8 +7,8 @@ #ifndef XFA_FWL_CORE_CFWL_THEMETEXT_H_ #define XFA_FWL_CORE_CFWL_THEMETEXT_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fwl/core/cfwl_themepart.h" class CFWL_ThemeText : public CFWL_ThemePart { diff --git a/xfa/fwl/core/cfwl_widgetimpproperties.h b/xfa/fwl/core/cfwl_widgetimpproperties.h index 71b0368311..4d7dee6834 100644 --- a/xfa/fwl/core/cfwl_widgetimpproperties.h +++ b/xfa/fwl/core/cfwl_widgetimpproperties.h @@ -7,8 +7,8 @@ #ifndef XFA_FWL_CORE_CFWL_WIDGETIMPPROPERTIES_H_ #define XFA_FWL_CORE_CFWL_WIDGETIMPPROPERTIES_H_ -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fwl/core/fwl_widgetdef.h" class IFWL_DataProvider; diff --git a/xfa/fwl/core/cfwl_widgetmgr.h b/xfa/fwl/core/cfwl_widgetmgr.h index 346785fd97..c528889f77 100644 --- a/xfa/fwl/core/cfwl_widgetmgr.h +++ b/xfa/fwl/core/cfwl_widgetmgr.h @@ -10,7 +10,7 @@ #include #include -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fwl/core/fwl_error.h" #include "xfa/fxgraphics/include/cfx_graphics.h" diff --git a/xfa/fwl/core/fwl_noteimp.cpp b/xfa/fwl/core/fwl_noteimp.cpp index 8ecec2df65..3173f3e4db 100644 --- a/xfa/fwl/core/fwl_noteimp.cpp +++ b/xfa/fwl/core/fwl_noteimp.cpp @@ -6,7 +6,7 @@ #include "xfa/fwl/core/fwl_noteimp.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "third_party/base/stl_util.h" #include "xfa/fwl/basewidget/fwl_tooltipctrlimp.h" #include "xfa/fwl/basewidget/ifwl_tooltip.h" diff --git a/xfa/fwl/core/fwl_widgetimp.h b/xfa/fwl/core/fwl_widgetimp.h index cbc89b9a8b..0c8f643a0f 100644 --- a/xfa/fwl/core/fwl_widgetimp.h +++ b/xfa/fwl/core/fwl_widgetimp.h @@ -9,8 +9,8 @@ #include -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fwl/core/cfwl_event.h" #include "xfa/fwl/core/cfwl_themepart.h" #include "xfa/fwl/core/ifwl_widgetdelegate.h" diff --git a/xfa/fwl/core/ifwl_app.h b/xfa/fwl/core/ifwl_app.h index 27c65c8317..03d44796fd 100644 --- a/xfa/fwl/core/ifwl_app.h +++ b/xfa/fwl/core/ifwl_app.h @@ -17,7 +17,7 @@ #include -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #include "xfa/fwl/core/fwl_appimp.h" #include "xfa/fwl/core/fwl_error.h" diff --git a/xfa/fwl/core/ifwl_dataprovider.h b/xfa/fwl/core/ifwl_dataprovider.h index 5643a3d079..9a3634c40e 100644 --- a/xfa/fwl/core/ifwl_dataprovider.h +++ b/xfa/fwl/core/ifwl_dataprovider.h @@ -7,7 +7,7 @@ #ifndef XFA_FWL_CORE_IFWL_DATAPROVIDER_H_ #define XFA_FWL_CORE_IFWL_DATAPROVIDER_H_ -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #include "xfa/fwl/core/fwl_error.h" class IFWL_Widget; diff --git a/xfa/fwl/core/ifwl_form.h b/xfa/fwl/core/ifwl_form.h index 13eb9d31f4..860cbd679d 100644 --- a/xfa/fwl/core/ifwl_form.h +++ b/xfa/fwl/core/ifwl_form.h @@ -7,7 +7,7 @@ #ifndef XFA_FWL_CORE_IFWL_FORM_H_ #define XFA_FWL_CORE_IFWL_FORM_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fwl/core/cfwl_widgetimpproperties.h" #include "xfa/fwl/core/ifwl_dataprovider.h" #include "xfa/fwl/core/ifwl_widget.h" diff --git a/xfa/fwl/core/ifwl_themeprovider.h b/xfa/fwl/core/ifwl_themeprovider.h index 274b27958a..06f64ba302 100644 --- a/xfa/fwl/core/ifwl_themeprovider.h +++ b/xfa/fwl/core/ifwl_themeprovider.h @@ -7,8 +7,8 @@ #ifndef XFA_FWL_CORE_IFWL_THEMEPROVIDER_H_ #define XFA_FWL_CORE_IFWL_THEMEPROVIDER_H_ -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fwl/core/fwl_error.h" #include "xfa/fwl/theme/cfwl_widgettp.h" diff --git a/xfa/fwl/core/ifwl_timer.h b/xfa/fwl/core/ifwl_timer.h index 162fef9692..9c1c56dd73 100644 --- a/xfa/fwl/core/ifwl_timer.h +++ b/xfa/fwl/core/ifwl_timer.h @@ -7,7 +7,7 @@ #ifndef XFA_FWL_CORE_IFWL_TIMER_H_ #define XFA_FWL_CORE_IFWL_TIMER_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fwl/core/fwl_error.h" class IFWL_TimerInfo; diff --git a/xfa/fwl/core/ifwl_widget.h b/xfa/fwl/core/ifwl_widget.h index 21099921e8..ac213fefae 100644 --- a/xfa/fwl/core/ifwl_widget.h +++ b/xfa/fwl/core/ifwl_widget.h @@ -9,9 +9,9 @@ #include -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fwl/core/fwl_error.h" #include "xfa/fwl/core/fwl_widgetimp.h" diff --git a/xfa/fwl/lightwidget/cfwl_widgetproperties.h b/xfa/fwl/lightwidget/cfwl_widgetproperties.h index 5d4116e62d..73e8fecee8 100644 --- a/xfa/fwl/lightwidget/cfwl_widgetproperties.h +++ b/xfa/fwl/lightwidget/cfwl_widgetproperties.h @@ -7,9 +7,9 @@ #ifndef XFA_FWL_LIGHTWIDGET_CFWL_WIDGETPROPERTIES_H_ #define XFA_FWL_LIGHTWIDGET_CFWL_WIDGETPROPERTIES_H_ -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fwl/core/cfwl_widgetimpproperties.h" class CFWL_Widget; diff --git a/xfa/fwl/theme/cfwl_arrowdata.h b/xfa/fwl/theme/cfwl_arrowdata.h index 88982ab12d..e549c157e5 100644 --- a/xfa/fwl/theme/cfwl_arrowdata.h +++ b/xfa/fwl/theme/cfwl_arrowdata.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_dib.h" class CFWL_ArrowData { diff --git a/xfa/fwl/theme/cfwl_utils.h b/xfa/fwl/theme/cfwl_utils.h index cdd768a878..b253722198 100644 --- a/xfa/fwl/theme/cfwl_utils.h +++ b/xfa/fwl/theme/cfwl_utils.h @@ -7,7 +7,7 @@ #ifndef XFA_FWL_THEME_CFWL_UTILS_H_ #define XFA_FWL_THEME_CFWL_UTILS_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" enum FWLTHEME_EDGE { FWLTHEME_EDGE_Flat = 0, diff --git a/xfa/fwl/theme/cfwl_widgettp.h b/xfa/fwl/theme/cfwl_widgettp.h index 091ad7ddae..1ce1f45a31 100644 --- a/xfa/fwl/theme/cfwl_widgettp.h +++ b/xfa/fwl/theme/cfwl_widgettp.h @@ -10,8 +10,8 @@ #include #include -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fwl/core/fwl_error.h" #include "xfa/fwl/theme/cfwl_utils.h" #include "xfa/fxgraphics/include/cfx_graphics.h" diff --git a/xfa/fxbarcode/BC_Dimension.h b/xfa/fxbarcode/BC_Dimension.h index 2dd37683a0..2050b0faaf 100644 --- a/xfa/fxbarcode/BC_Dimension.h +++ b/xfa/fxbarcode/BC_Dimension.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" class CBC_Dimension { public: diff --git a/xfa/fxbarcode/BC_UtilCodingConvert.h b/xfa/fxbarcode/BC_UtilCodingConvert.h index ea36d481b6..698cd857d7 100644 --- a/xfa/fxbarcode/BC_UtilCodingConvert.h +++ b/xfa/fxbarcode/BC_UtilCodingConvert.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_BC_UTILCODINGCONVERT_H_ #define XFA_FXBARCODE_BC_UTILCODINGCONVERT_H_ -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" class CBC_UtilCodingConvert { public: diff --git a/xfa/fxbarcode/BC_Utils.cpp b/xfa/fxbarcode/BC_Utils.cpp index ccc620218a..d750f9d6fe 100644 --- a/xfa/fxbarcode/BC_Utils.cpp +++ b/xfa/fxbarcode/BC_Utils.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #include "xfa/fxbarcode/utils.h" FX_BOOL BC_FX_ByteString_Replace(CFX_ByteString& dst, diff --git a/xfa/fxbarcode/BC_Writer.h b/xfa/fxbarcode/BC_Writer.h index 9b5d037335..8e4eaf1f5e 100644 --- a/xfa/fxbarcode/BC_Writer.h +++ b/xfa/fxbarcode/BC_Writer.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_BC_WRITER_H_ #define XFA_FXBARCODE_BC_WRITER_H_ -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #include "core/fxge/include/fx_dib.h" #include "xfa/fxbarcode/utils.h" diff --git a/xfa/fxbarcode/cbc_codabar.h b/xfa/fxbarcode/cbc_codabar.h index 9f83d8bb53..b0a587b2d9 100644 --- a/xfa/fxbarcode/cbc_codabar.h +++ b/xfa/fxbarcode/cbc_codabar.h @@ -7,8 +7,8 @@ #ifndef XFA_FXBARCODE_CBC_CODABAR_H_ #define XFA_FXBARCODE_CBC_CODABAR_H_ -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_dib.h" #include "xfa/fxbarcode/cbc_onecode.h" diff --git a/xfa/fxbarcode/cbc_code128.h b/xfa/fxbarcode/cbc_code128.h index 05ef125e1b..2088bdd714 100644 --- a/xfa/fxbarcode/cbc_code128.h +++ b/xfa/fxbarcode/cbc_code128.h @@ -7,8 +7,8 @@ #ifndef XFA_FXBARCODE_CBC_CODE128_H_ #define XFA_FXBARCODE_CBC_CODE128_H_ -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_dib.h" #include "xfa/fxbarcode/cbc_onecode.h" diff --git a/xfa/fxbarcode/cbc_code39.h b/xfa/fxbarcode/cbc_code39.h index 104ec4a217..51f1759ca0 100644 --- a/xfa/fxbarcode/cbc_code39.h +++ b/xfa/fxbarcode/cbc_code39.h @@ -7,8 +7,8 @@ #ifndef XFA_FXBARCODE_CBC_CODE39_H_ #define XFA_FXBARCODE_CBC_CODE39_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_dib.h" #include "xfa/fxbarcode/cbc_onecode.h" diff --git a/xfa/fxbarcode/cbc_codebase.h b/xfa/fxbarcode/cbc_codebase.h index f13c15395f..a6448db741 100644 --- a/xfa/fxbarcode/cbc_codebase.h +++ b/xfa/fxbarcode/cbc_codebase.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_dib.h" #include "xfa/fxbarcode/include/BC_Library.h" diff --git a/xfa/fxbarcode/cbc_datamatrix.h b/xfa/fxbarcode/cbc_datamatrix.h index 8edd1a90f7..51d7c3d3f9 100644 --- a/xfa/fxbarcode/cbc_datamatrix.h +++ b/xfa/fxbarcode/cbc_datamatrix.h @@ -7,8 +7,8 @@ #ifndef XFA_FXBARCODE_CBC_DATAMATRIX_H_ #define XFA_FXBARCODE_CBC_DATAMATRIX_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_dib.h" #include "xfa/fxbarcode/cbc_codebase.h" diff --git a/xfa/fxbarcode/cbc_ean13.h b/xfa/fxbarcode/cbc_ean13.h index 02497a7159..fae8c50915 100644 --- a/xfa/fxbarcode/cbc_ean13.h +++ b/xfa/fxbarcode/cbc_ean13.h @@ -7,8 +7,8 @@ #ifndef XFA_FXBARCODE_CBC_EAN13_H_ #define XFA_FXBARCODE_CBC_EAN13_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_dib.h" #include "xfa/fxbarcode/cbc_onecode.h" diff --git a/xfa/fxbarcode/cbc_ean8.h b/xfa/fxbarcode/cbc_ean8.h index d82e9cd726..c345af3a9c 100644 --- a/xfa/fxbarcode/cbc_ean8.h +++ b/xfa/fxbarcode/cbc_ean8.h @@ -7,8 +7,8 @@ #ifndef XFA_FXBARCODE_CBC_EAN8_H_ #define XFA_FXBARCODE_CBC_EAN8_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_dib.h" #include "xfa/fxbarcode/cbc_onecode.h" diff --git a/xfa/fxbarcode/cbc_onecode.h b/xfa/fxbarcode/cbc_onecode.h index 20b9e12797..f6c992bde1 100644 --- a/xfa/fxbarcode/cbc_onecode.h +++ b/xfa/fxbarcode/cbc_onecode.h @@ -7,8 +7,8 @@ #ifndef XFA_FXBARCODE_CBC_ONECODE_H_ #define XFA_FXBARCODE_CBC_ONECODE_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fxbarcode/cbc_codebase.h" class CFX_DIBitmap; diff --git a/xfa/fxbarcode/cbc_pdf417i.h b/xfa/fxbarcode/cbc_pdf417i.h index d69562d3e5..ca6ac11b26 100644 --- a/xfa/fxbarcode/cbc_pdf417i.h +++ b/xfa/fxbarcode/cbc_pdf417i.h @@ -7,8 +7,8 @@ #ifndef XFA_FXBARCODE_CBC_PDF417I_H_ #define XFA_FXBARCODE_CBC_PDF417I_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_dib.h" #include "xfa/fxbarcode/cbc_codebase.h" diff --git a/xfa/fxbarcode/cbc_qrcode.h b/xfa/fxbarcode/cbc_qrcode.h index 42fc50f22a..e8c9ced56e 100644 --- a/xfa/fxbarcode/cbc_qrcode.h +++ b/xfa/fxbarcode/cbc_qrcode.h @@ -7,8 +7,8 @@ #ifndef XFA_FXBARCODE_CBC_QRCODE_H_ #define XFA_FXBARCODE_CBC_QRCODE_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_dib.h" #include "xfa/fxbarcode/cbc_codebase.h" diff --git a/xfa/fxbarcode/cbc_upca.h b/xfa/fxbarcode/cbc_upca.h index aa1afc44f7..7e869b6ace 100644 --- a/xfa/fxbarcode/cbc_upca.h +++ b/xfa/fxbarcode/cbc_upca.h @@ -7,8 +7,8 @@ #ifndef XFA_FXBARCODE_CBC_UPCA_H_ #define XFA_FXBARCODE_CBC_UPCA_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_dib.h" #include "xfa/fxbarcode/cbc_onecode.h" diff --git a/xfa/fxbarcode/common/BC_CommonBitArray.h b/xfa/fxbarcode/common/BC_CommonBitArray.h index 04cb96b752..6955d5b288 100644 --- a/xfa/fxbarcode/common/BC_CommonBitArray.h +++ b/xfa/fxbarcode/common/BC_CommonBitArray.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_COMMON_BC_COMMONBITARRAY_H_ #define XFA_FXBARCODE_COMMON_BC_COMMONBITARRAY_H_ -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" class CBC_CommonBitArray { public: diff --git a/xfa/fxbarcode/common/BC_CommonBitMatrix.h b/xfa/fxbarcode/common/BC_CommonBitMatrix.h index 48a26b9f8c..98291f0130 100644 --- a/xfa/fxbarcode/common/BC_CommonBitMatrix.h +++ b/xfa/fxbarcode/common/BC_CommonBitMatrix.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_COMMON_BC_COMMONBITMATRIX_H_ #define XFA_FXBARCODE_COMMON_BC_COMMONBITMATRIX_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CBC_CommonBitArray; diff --git a/xfa/fxbarcode/common/BC_CommonByteArray.h b/xfa/fxbarcode/common/BC_CommonByteArray.h index cdda41b4fd..bdac6a6963 100644 --- a/xfa/fxbarcode/common/BC_CommonByteArray.h +++ b/xfa/fxbarcode/common/BC_CommonByteArray.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_COMMON_BC_COMMONBYTEARRAY_H_ #define XFA_FXBARCODE_COMMON_BC_COMMONBYTEARRAY_H_ -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" // TODO(weili): The usage of this class should be replaced by // std::vector. diff --git a/xfa/fxbarcode/common/BC_CommonByteMatrix.cpp b/xfa/fxbarcode/common/BC_CommonByteMatrix.cpp index 234b384d7a..0e7ce80e29 100644 --- a/xfa/fxbarcode/common/BC_CommonByteMatrix.cpp +++ b/xfa/fxbarcode/common/BC_CommonByteMatrix.cpp @@ -20,7 +20,7 @@ * limitations under the License. */ -#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/fx_memory.h" #include "xfa/fxbarcode/common/BC_CommonByteMatrix.h" CBC_CommonByteMatrix::CBC_CommonByteMatrix(int32_t width, int32_t height) { diff --git a/xfa/fxbarcode/common/BC_CommonByteMatrix.h b/xfa/fxbarcode/common/BC_CommonByteMatrix.h index 9bc2a88e8a..13cf5c330e 100644 --- a/xfa/fxbarcode/common/BC_CommonByteMatrix.h +++ b/xfa/fxbarcode/common/BC_CommonByteMatrix.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CBC_CommonByteMatrix { public: diff --git a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.h b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.h index 695da46c79..34e94fb0fd 100644 --- a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.h +++ b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_COMMON_REEDSOLOMON_BC_REEDSOLOMON_H_ #define XFA_FXBARCODE_COMMON_REEDSOLOMON_BC_REEDSOLOMON_H_ -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" class CBC_ReedSolomonGF256; class CBC_ReedSolomonGF256Poly; diff --git a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.h b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.h index ec0f1ff549..16f1ad17f7 100644 --- a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.h +++ b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #include "xfa/fxbarcode/utils.h" class CBC_ReedSolomonGF256Poly; diff --git a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.h b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.h index 03580c2350..3e840f528b 100644 --- a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.h +++ b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_COMMON_REEDSOLOMON_BC_REEDSOLOMONGF256POLY_H_ #define XFA_FXBARCODE_COMMON_REEDSOLOMON_BC_REEDSOLOMONGF256POLY_H_ -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" class CBC_ReedSolomonGF256; diff --git a/xfa/fxbarcode/datamatrix/BC_DefaultPlacement.h b/xfa/fxbarcode/datamatrix/BC_DefaultPlacement.h index f86cacee66..f9b44621b1 100644 --- a/xfa/fxbarcode/datamatrix/BC_DefaultPlacement.h +++ b/xfa/fxbarcode/datamatrix/BC_DefaultPlacement.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_DATAMATRIX_BC_DEFAULTPLACEMENT_H_ #define XFA_FXBARCODE_DATAMATRIX_BC_DEFAULTPLACEMENT_H_ -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" class CBC_DefaultPlacement { public: diff --git a/xfa/fxbarcode/datamatrix/BC_SymbolInfo.h b/xfa/fxbarcode/datamatrix/BC_SymbolInfo.h index 96196da21c..b5778d5a3a 100644 --- a/xfa/fxbarcode/datamatrix/BC_SymbolInfo.h +++ b/xfa/fxbarcode/datamatrix/BC_SymbolInfo.h @@ -7,8 +7,8 @@ #ifndef XFA_FXBARCODE_DATAMATRIX_BC_SYMBOLINFO_H_ #define XFA_FXBARCODE_DATAMATRIX_BC_SYMBOLINFO_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fxbarcode/datamatrix/BC_SymbolShapeHint.h" class CBC_Dimension; diff --git a/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h b/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h index 02b6b66bea..8eb20fa754 100644 --- a/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h +++ b/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h @@ -7,8 +7,8 @@ #ifndef XFA_FXBARCODE_ONED_BC_ONEDCODABARWRITER_H_ #define XFA_FXBARCODE_ONED_BC_ONEDCODABARWRITER_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fxbarcode/include/BC_Library.h" #include "xfa/fxbarcode/oned/BC_OneDimWriter.h" diff --git a/xfa/fxbarcode/oned/BC_OnedCode128Writer.h b/xfa/fxbarcode/oned/BC_OnedCode128Writer.h index 9d2285f0c6..7c85af102d 100644 --- a/xfa/fxbarcode/oned/BC_OnedCode128Writer.h +++ b/xfa/fxbarcode/oned/BC_OnedCode128Writer.h @@ -7,8 +7,8 @@ #ifndef XFA_FXBARCODE_ONED_BC_ONEDCODE128WRITER_H_ #define XFA_FXBARCODE_ONED_BC_ONEDCODE128WRITER_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fxbarcode/oned/BC_OneDimWriter.h" class CBC_OnedCode128Writer : public CBC_OneDimWriter { diff --git a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.h b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.h index b2b85d20e9..f30a74fda0 100644 --- a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.h +++ b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.h @@ -7,8 +7,8 @@ #ifndef XFA_FXBARCODE_ONED_BC_ONEDEAN13WRITER_H_ #define XFA_FXBARCODE_ONED_BC_ONEDEAN13WRITER_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fxbarcode/oned/BC_OneDimWriter.h" class CFX_DIBitmap; diff --git a/xfa/fxbarcode/oned/BC_OnedEAN8Writer.h b/xfa/fxbarcode/oned/BC_OnedEAN8Writer.h index dab1b25de0..d6a293a250 100644 --- a/xfa/fxbarcode/oned/BC_OnedEAN8Writer.h +++ b/xfa/fxbarcode/oned/BC_OnedEAN8Writer.h @@ -7,8 +7,8 @@ #ifndef XFA_FXBARCODE_ONED_BC_ONEDEAN8WRITER_H_ #define XFA_FXBARCODE_ONED_BC_ONEDEAN8WRITER_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fxbarcode/include/BC_Library.h" #include "xfa/fxbarcode/oned/BC_OneDimWriter.h" diff --git a/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h b/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h index b38a235076..8575572820 100644 --- a/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h +++ b/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h @@ -9,8 +9,8 @@ #include -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fxbarcode/oned/BC_OneDimWriter.h" class CBC_OnedEAN13Writer; diff --git a/xfa/fxbarcode/pdf417/BC_PDF417.h b/xfa/fxbarcode/pdf417/BC_PDF417.h index eeffc1e6ee..c3a9f4c477 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417.h +++ b/xfa/fxbarcode/pdf417/BC_PDF417.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #include "xfa/fxbarcode/pdf417/BC_PDF417Compaction.h" class CBC_BarcodeRow; diff --git a/xfa/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h b/xfa/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h index 16da60f5cd..853b9eea98 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h +++ b/xfa/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_PDF417_BC_PDF417BARCODEMATRIX_H_ #define XFA_FXBARCODE_PDF417_BC_PDF417BARCODEMATRIX_H_ -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" class CBC_BarcodeRow; diff --git a/xfa/fxbarcode/pdf417/BC_PDF417BarcodeRow.h b/xfa/fxbarcode/pdf417/BC_PDF417BarcodeRow.h index 9bf1b3cbce..4325acc05f 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417BarcodeRow.h +++ b/xfa/fxbarcode/pdf417/BC_PDF417BarcodeRow.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_PDF417_BC_PDF417BARCODEROW_H_ #define XFA_FXBARCODE_PDF417_BC_PDF417BARCODEROW_H_ -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" class CBC_BarcodeRow { public: diff --git a/xfa/fxbarcode/pdf417/BC_PDF417ErrorCorrection.h b/xfa/fxbarcode/pdf417/BC_PDF417ErrorCorrection.h index 20717b118b..6822ae4e11 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417ErrorCorrection.h +++ b/xfa/fxbarcode/pdf417/BC_PDF417ErrorCorrection.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" class CBC_PDF417ErrorCorrection { public: diff --git a/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h b/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h index 29c56174a5..fb7664d4a3 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h +++ b/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h @@ -7,8 +7,8 @@ #ifndef XFA_FXBARCODE_PDF417_BC_PDF417HIGHLEVELENCODER_H_ #define XFA_FXBARCODE_PDF417_BC_PDF417HIGHLEVELENCODER_H_ -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_string.h" #include "xfa/fxbarcode/pdf417/BC_PDF417Compaction.h" class CBC_PDF417HighLevelEncoder { diff --git a/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder_unittest.cpp b/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder_unittest.cpp index 92d1e5682d..a1b753e3ee 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder_unittest.cpp +++ b/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder_unittest.cpp @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #include "testing/fx_string_testhelpers.h" #include "testing/gtest/include/gtest/gtest.h" #include "xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h" diff --git a/xfa/fxbarcode/pdf417/BC_PDF417Writer.h b/xfa/fxbarcode/pdf417/BC_PDF417Writer.h index e16c51474e..12b8e8baa9 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417Writer.h +++ b/xfa/fxbarcode/pdf417/BC_PDF417Writer.h @@ -7,8 +7,8 @@ #ifndef XFA_FXBARCODE_PDF417_BC_PDF417WRITER_H_ #define XFA_FXBARCODE_PDF417_BC_PDF417WRITER_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fxbarcode/BC_TwoDimWriter.h" class CBC_PDF417Writer : public CBC_TwoDimWriter { diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderBitVector.cpp b/xfa/fxbarcode/qrcode/BC_QRCoderBitVector.cpp index b928b0a857..c770c15392 100644 --- a/xfa/fxbarcode/qrcode/BC_QRCoderBitVector.cpp +++ b/xfa/fxbarcode/qrcode/BC_QRCoderBitVector.cpp @@ -20,7 +20,7 @@ * limitations under the License. */ -#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/fx_memory.h" #include "xfa/fxbarcode/qrcode/BC_QRCoderBitVector.h" #include "xfa/fxbarcode/utils.h" diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderECBlocks.h b/xfa/fxbarcode/qrcode/BC_QRCoderECBlocks.h index cd1539a7b7..a428f06355 100644 --- a/xfa/fxbarcode/qrcode/BC_QRCoderECBlocks.h +++ b/xfa/fxbarcode/qrcode/BC_QRCoderECBlocks.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_QRCODE_BC_QRCODERECBLOCKS_H_ #define XFA_FXBARCODE_QRCODE_BC_QRCODERECBLOCKS_H_ -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" class CBC_QRCoderECB; diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.h b/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.h index be0a76c337..6303d7c1c5 100644 --- a/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.h +++ b/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.h @@ -7,8 +7,8 @@ #ifndef XFA_FXBARCODE_QRCODE_BC_QRCODERENCODER_H_ #define XFA_FXBARCODE_QRCODE_BC_QRCODERENCODER_H_ -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_basic.h" +#include "core/fxcrt/fx_string.h" class CBC_QRCoder; class CBC_QRCoderErrorCorrectionLevel; diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.h b/xfa/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.h index a5fdb0808c..e433ee1127 100644 --- a/xfa/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.h +++ b/xfa/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_QRCODE_BC_QRCODERERRORCORRECTIONLEVEL_H_ #define XFA_FXBARCODE_QRCODE_BC_QRCODERERRORCORRECTIONLEVEL_H_ -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" class CBC_QRCoderErrorCorrectionLevel { public: diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderMode.h b/xfa/fxbarcode/qrcode/BC_QRCoderMode.h index 63048dca43..f876d81f03 100644 --- a/xfa/fxbarcode/qrcode/BC_QRCoderMode.h +++ b/xfa/fxbarcode/qrcode/BC_QRCoderMode.h @@ -11,7 +11,7 @@ #include -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" class CBC_QRCoderVersion; diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderVersion.h b/xfa/fxbarcode/qrcode/BC_QRCoderVersion.h index deae8933e6..43b4b6062e 100644 --- a/xfa/fxbarcode/qrcode/BC_QRCoderVersion.h +++ b/xfa/fxbarcode/qrcode/BC_QRCoderVersion.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_QRCODE_BC_QRCODERVERSION_H_ #define XFA_FXBARCODE_QRCODE_BC_QRCODERVERSION_H_ -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" class CBC_CommonBitMatrix; class CBC_QRCoderECBlocks; diff --git a/xfa/fxbarcode/utils.h b/xfa/fxbarcode/utils.h index dadf34859d..b4474501a7 100644 --- a/xfa/fxbarcode/utils.h +++ b/xfa/fxbarcode/utils.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_UTILS_H_ #define XFA_FXBARCODE_UTILS_H_ -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" typedef CFX_MapPtrTemplate CFX_PtrToInt32; FX_BOOL BC_FX_ByteString_Replace(CFX_ByteString& dst, diff --git a/xfa/fxfa/app/xfa_ffbarcode.cpp b/xfa/fxfa/app/xfa_ffbarcode.cpp index ffbd7ce505..927f38b35b 100644 --- a/xfa/fxfa/app/xfa_ffbarcode.cpp +++ b/xfa/fxfa/app/xfa_ffbarcode.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/app/xfa_ffbarcode.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "xfa/fwl/core/fwl_noteimp.h" #include "xfa/fwl/core/ifwl_app.h" #include "xfa/fwl/lightwidget/cfwl_barcode.h" diff --git a/xfa/fxfa/app/xfa_ffdoc.cpp b/xfa/fxfa/app/xfa_ffdoc.cpp index f9b92c6f6d..c75c84adc0 100644 --- a/xfa/fxfa/app/xfa_ffdoc.cpp +++ b/xfa/fxfa/app/xfa_ffdoc.cpp @@ -12,8 +12,8 @@ #include "core/fpdfapi/fpdf_parser/cpdf_document.h" #include "core/fpdfapi/fpdf_parser/fpdf_parser_decode.h" #include "core/fpdfdoc/cpdf_nametree.h" -#include "core/fxcrt/include/fx_ext.h" -#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_memory.h" #include "xfa/fde/xml/fde_xml_imp.h" #include "xfa/fwl/core/fwl_noteimp.h" #include "xfa/fxfa/app/xfa_ffnotify.h" diff --git a/xfa/fxfa/app/xfa_ffdocview.cpp b/xfa/fxfa/app/xfa_ffdocview.cpp index 7dff9d44f4..939fc099ff 100644 --- a/xfa/fxfa/app/xfa_ffdocview.cpp +++ b/xfa/fxfa/app/xfa_ffdocview.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/include/xfa_ffdocview.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "xfa/fxfa/app/xfa_ffbarcode.h" #include "xfa/fxfa/app/xfa_ffcheckbutton.h" #include "xfa/fxfa/app/xfa_ffchoicelist.h" diff --git a/xfa/fxfa/app/xfa_fwladapter.h b/xfa/fxfa/app/xfa_fwladapter.h index 00e76db227..0fbf0d9ee7 100644 --- a/xfa/fxfa/app/xfa_fwladapter.h +++ b/xfa/fxfa/app/xfa_fwladapter.h @@ -7,8 +7,8 @@ #ifndef XFA_FXFA_APP_XFA_FWLADAPTER_H_ #define XFA_FXFA_APP_XFA_FWLADAPTER_H_ -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fwl/core/fwl_error.h" class IFWL_Widget; diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp index 780ade3612..fcda599125 100644 --- a/xfa/fxfa/app/xfa_textlayout.cpp +++ b/xfa/fxfa/app/xfa_textlayout.cpp @@ -8,7 +8,7 @@ #include -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "xfa/fde/cfde_path.h" #include "xfa/fde/css/fde_csscache.h" #include "xfa/fde/css/fde_cssstyleselector.h" diff --git a/xfa/fxfa/fm2js/xfa_error.h b/xfa/fxfa/fm2js/xfa_error.h index 6ce102e03e..5e3fbbe1ba 100644 --- a/xfa/fxfa/fm2js/xfa_error.h +++ b/xfa/fxfa/fm2js/xfa_error.h @@ -7,8 +7,8 @@ #ifndef XFA_FXFA_FM2JS_XFA_ERROR_H_ #define XFA_FXFA_FM2JS_XFA_ERROR_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" extern const FX_WCHAR kFMErrUnsupportedChar[]; extern const FX_WCHAR kFMErrBadSuffixNumber[]; diff --git a/xfa/fxfa/fm2js/xfa_expression.cpp b/xfa/fxfa/fm2js/xfa_expression.cpp index 22e627d72d..829bf7d74e 100644 --- a/xfa/fxfa/fm2js/xfa_expression.cpp +++ b/xfa/fxfa/fm2js/xfa_expression.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/fm2js/xfa_expression.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" namespace { diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp index 0d735a1b9b..d8d29ec2c5 100644 --- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp +++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp @@ -8,7 +8,7 @@ #include -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "fxjs/include/cfxjse_arguments.h" #include "fxjs/include/cfxjse_class.h" #include "fxjs/include/cfxjse_value.h" diff --git a/xfa/fxfa/fm2js/xfa_lexer.cpp b/xfa/fxfa/fm2js/xfa_lexer.cpp index e480b37d4c..2e8b6fed59 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/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" namespace { diff --git a/xfa/fxfa/fm2js/xfa_lexer.h b/xfa/fxfa/fm2js/xfa_lexer.h index a910d1790c..220a4d7630 100644 --- a/xfa/fxfa/fm2js/xfa_lexer.h +++ b/xfa/fxfa/fm2js/xfa_lexer.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #include "xfa/fxfa/fm2js/xfa_error.h" enum XFA_FM_TOKEN { diff --git a/xfa/fxfa/fm2js/xfa_simpleexpression.cpp b/xfa/fxfa/fm2js/xfa_simpleexpression.cpp index 089333b774..fdae9fc772 100644 --- a/xfa/fxfa/fm2js/xfa_simpleexpression.cpp +++ b/xfa/fxfa/fm2js/xfa_simpleexpression.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/fm2js/xfa_simpleexpression.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" namespace { diff --git a/xfa/fxfa/fm2js/xfa_simpleexpression.h b/xfa/fxfa/fm2js/xfa_simpleexpression.h index 857cd518cf..f0f2f390d5 100644 --- a/xfa/fxfa/fm2js/xfa_simpleexpression.h +++ b/xfa/fxfa/fm2js/xfa_simpleexpression.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #include "xfa/fxfa/fm2js/xfa_lexer.h" #define RUNTIMEFUNCTIONRETURNVALUE \ diff --git a/xfa/fxfa/include/fxfa_widget.h b/xfa/fxfa/include/fxfa_widget.h index fa6d7fa49d..9bab36f806 100644 --- a/xfa/fxfa/include/fxfa_widget.h +++ b/xfa/fxfa/include/fxfa_widget.h @@ -7,7 +7,7 @@ #ifndef XFA_FXFA_INCLUDE_FXFA_WIDGET_H_ #define XFA_FXFA_INCLUDE_FXFA_WIDGET_H_ -#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/fx_coordinates.h" #include "core/fxge/include/fx_dib.h" #include "xfa/fxfa/parser/cxfa_box.h" #include "xfa/fxfa/parser/cxfa_event.h" diff --git a/xfa/fxfa/include/xfa_fontmgr.h b/xfa/fxfa/include/xfa_fontmgr.h index 6147dbc5c7..a996adc2ed 100644 --- a/xfa/fxfa/include/xfa_fontmgr.h +++ b/xfa/fxfa/include/xfa_fontmgr.h @@ -10,8 +10,8 @@ #include #include -#include "core/fxcrt/include/fx_ext.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_ext.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fgas/font/fgas_font.h" #include "xfa/fxfa/include/fxfa.h" diff --git a/xfa/fxfa/parser/cxfa_bind.h b/xfa/fxfa/parser/cxfa_bind.h index 2e2954eae2..40a2a1a482 100644 --- a/xfa/fxfa/parser/cxfa_bind.h +++ b/xfa/fxfa/parser/cxfa_bind.h @@ -7,7 +7,7 @@ #ifndef XFA_FXFA_PARSER_CXFA_BIND_H_ #define XFA_FXFA_PARSER_CXFA_BIND_H_ -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #include "xfa/fxfa/parser/cxfa_data.h" class CXFA_Node; diff --git a/xfa/fxfa/parser/cxfa_binditems.h b/xfa/fxfa/parser/cxfa_binditems.h index 3dc0b28878..cb47cf02f1 100644 --- a/xfa/fxfa/parser/cxfa_binditems.h +++ b/xfa/fxfa/parser/cxfa_binditems.h @@ -7,7 +7,7 @@ #ifndef XFA_FXFA_PARSER_CXFA_BINDITEMS_H_ #define XFA_FXFA_PARSER_CXFA_BINDITEMS_H_ -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #include "xfa/fxfa/parser/cxfa_data.h" class CXFA_Node; diff --git a/xfa/fxfa/parser/cxfa_box.h b/xfa/fxfa/parser/cxfa_box.h index 56c15a2c6b..5cf141271d 100644 --- a/xfa/fxfa/parser/cxfa_box.h +++ b/xfa/fxfa/parser/cxfa_box.h @@ -7,7 +7,7 @@ #ifndef XFA_FXFA_PARSER_CXFA_BOX_H_ #define XFA_FXFA_PARSER_CXFA_BOX_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fxfa/parser/cxfa_data.h" #include "xfa/fxfa/parser/cxfa_edge.h" #include "xfa/fxfa/parser/cxfa_fill.h" diff --git a/xfa/fxfa/parser/cxfa_calculate.h b/xfa/fxfa/parser/cxfa_calculate.h index c90656a314..1012224069 100644 --- a/xfa/fxfa/parser/cxfa_calculate.h +++ b/xfa/fxfa/parser/cxfa_calculate.h @@ -7,7 +7,7 @@ #ifndef XFA_FXFA_PARSER_CXFA_CALCULATE_H_ #define XFA_FXFA_PARSER_CXFA_CALCULATE_H_ -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #include "xfa/fxfa/parser/cxfa_data.h" #include "xfa/fxfa/parser/cxfa_script.h" diff --git a/xfa/fxfa/parser/cxfa_data.cpp b/xfa/fxfa/parser/cxfa_data.cpp index 75ec09c7e8..5f059a7dfe 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/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "xfa/fxfa/parser/cxfa_measurement.h" #include "xfa/fxfa/parser/xfa_object.h" diff --git a/xfa/fxfa/parser/cxfa_data.h b/xfa/fxfa/parser/cxfa_data.h index afb6c3b675..8432cf4a29 100644 --- a/xfa/fxfa/parser/cxfa_data.h +++ b/xfa/fxfa/parser/cxfa_data.h @@ -7,7 +7,7 @@ #ifndef XFA_FXFA_PARSER_CXFA_DATA_H_ #define XFA_FXFA_PARSER_CXFA_DATA_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_dib.h" #include "xfa/fxfa/include/fxfa_basic.h" diff --git a/xfa/fxfa/parser/cxfa_dataexporter.cpp b/xfa/fxfa/parser/cxfa_dataexporter.cpp index fbb9e70b94..8f47b5324d 100644 --- a/xfa/fxfa/parser/cxfa_dataexporter.cpp +++ b/xfa/fxfa/parser/cxfa_dataexporter.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/parser/cxfa_dataexporter.h" -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #include "xfa/fde/xml/fde_xml_imp.h" #include "xfa/fgas/crt/fgas_codepage.h" #include "xfa/fxfa/parser/cxfa_document.h" diff --git a/xfa/fxfa/parser/cxfa_dataexporter.h b/xfa/fxfa/parser/cxfa_dataexporter.h index 3049ae2d02..868c20e294 100644 --- a/xfa/fxfa/parser/cxfa_dataexporter.h +++ b/xfa/fxfa/parser/cxfa_dataexporter.h @@ -7,7 +7,7 @@ #ifndef XFA_FXFA_PARSER_CXFA_DATAEXPORTER_H_ #define XFA_FXFA_PARSER_CXFA_DATAEXPORTER_H_ -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" class CXFA_Document; class CXFA_Node; diff --git a/xfa/fxfa/parser/cxfa_dataimporter.cpp b/xfa/fxfa/parser/cxfa_dataimporter.cpp index 87848ddebb..c5bcc99cb9 100644 --- a/xfa/fxfa/parser/cxfa_dataimporter.cpp +++ b/xfa/fxfa/parser/cxfa_dataimporter.cpp @@ -8,7 +8,7 @@ #include -#include "core/fxcrt/include/fx_stream.h" +#include "core/fxcrt/fx_stream.h" #include "xfa/fde/xml/fde_xml_imp.h" #include "xfa/fxfa/include/fxfa.h" #include "xfa/fxfa/include/fxfa_basic.h" diff --git a/xfa/fxfa/parser/cxfa_dataimporter.h b/xfa/fxfa/parser/cxfa_dataimporter.h index b5648218e9..519fef4410 100644 --- a/xfa/fxfa/parser/cxfa_dataimporter.h +++ b/xfa/fxfa/parser/cxfa_dataimporter.h @@ -7,7 +7,7 @@ #ifndef XFA_FXFA_PARSER_CXFA_DATAIMPORTER_H_ #define XFA_FXFA_PARSER_CXFA_DATAIMPORTER_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" class CXFA_Document; class IFX_FileRead; diff --git a/xfa/fxfa/parser/cxfa_document.cpp b/xfa/fxfa/parser/cxfa_document.cpp index a80d842325..a644c6a92e 100644 --- a/xfa/fxfa/parser/cxfa_document.cpp +++ b/xfa/fxfa/parser/cxfa_document.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "xfa/fxfa/app/xfa_ffnotify.h" #include "xfa/fxfa/parser/cscript_datawindow.h" #include "xfa/fxfa/parser/cscript_eventpseudomodel.h" diff --git a/xfa/fxfa/parser/cxfa_event.h b/xfa/fxfa/parser/cxfa_event.h index de3598de46..b151b399b5 100644 --- a/xfa/fxfa/parser/cxfa_event.h +++ b/xfa/fxfa/parser/cxfa_event.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #include "xfa/fxfa/parser/cxfa_data.h" #include "xfa/fxfa/parser/cxfa_script.h" #include "xfa/fxfa/parser/cxfa_submit.h" diff --git a/xfa/fxfa/parser/cxfa_exdata.h b/xfa/fxfa/parser/cxfa_exdata.h index eb04398379..c5eddbf14c 100644 --- a/xfa/fxfa/parser/cxfa_exdata.h +++ b/xfa/fxfa/parser/cxfa_exdata.h @@ -7,7 +7,7 @@ #ifndef XFA_FXFA_PARSER_CXFA_EXDATA_H_ #define XFA_FXFA_PARSER_CXFA_EXDATA_H_ -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #include "xfa/fxfa/parser/cxfa_data.h" class CXFA_Node; diff --git a/xfa/fxfa/parser/cxfa_fill.h b/xfa/fxfa/parser/cxfa_fill.h index c8f1cb3013..70b0886c85 100644 --- a/xfa/fxfa/parser/cxfa_fill.h +++ b/xfa/fxfa/parser/cxfa_fill.h @@ -7,7 +7,7 @@ #ifndef XFA_FXFA_PARSER_CXFA_FILL_H_ #define XFA_FXFA_PARSER_CXFA_FILL_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_dib.h" #include "xfa/fxfa/parser/cxfa_data.h" diff --git a/xfa/fxfa/parser/cxfa_image.h b/xfa/fxfa/parser/cxfa_image.h index 9f8b3bb228..4b088c8f90 100644 --- a/xfa/fxfa/parser/cxfa_image.h +++ b/xfa/fxfa/parser/cxfa_image.h @@ -7,8 +7,8 @@ #ifndef XFA_FXFA_PARSER_CXFA_IMAGE_H_ #define XFA_FXFA_PARSER_CXFA_IMAGE_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fxfa/parser/cxfa_data.h" class CXFA_Node; diff --git a/xfa/fxfa/parser/cxfa_layoutprocessor.h b/xfa/fxfa/parser/cxfa_layoutprocessor.h index 1e66402720..365c5f2965 100644 --- a/xfa/fxfa/parser/cxfa_layoutprocessor.h +++ b/xfa/fxfa/parser/cxfa_layoutprocessor.h @@ -7,7 +7,7 @@ #ifndef XFA_FXFA_PARSER_CXFA_LAYOUTPROCESSOR_H_ #define XFA_FXFA_PARSER_CXFA_LAYOUTPROCESSOR_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fxfa/parser/xfa_object.h" class CXFA_ContainerLayoutItem; diff --git a/xfa/fxfa/parser/cxfa_line.h b/xfa/fxfa/parser/cxfa_line.h index 3807604853..1d91a5970b 100644 --- a/xfa/fxfa/parser/cxfa_line.h +++ b/xfa/fxfa/parser/cxfa_line.h @@ -7,7 +7,7 @@ #ifndef XFA_FXFA_PARSER_CXFA_LINE_H_ #define XFA_FXFA_PARSER_CXFA_LINE_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fxfa/parser/cxfa_data.h" #include "xfa/fxfa/parser/cxfa_edge.h" diff --git a/xfa/fxfa/parser/cxfa_margin.h b/xfa/fxfa/parser/cxfa_margin.h index ecfc628b89..780f9b2b68 100644 --- a/xfa/fxfa/parser/cxfa_margin.h +++ b/xfa/fxfa/parser/cxfa_margin.h @@ -7,7 +7,7 @@ #ifndef XFA_FXFA_PARSER_CXFA_MARGIN_H_ #define XFA_FXFA_PARSER_CXFA_MARGIN_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fxfa/parser/cxfa_data.h" class CXFA_Node; diff --git a/xfa/fxfa/parser/cxfa_measurement.cpp b/xfa/fxfa/parser/cxfa_measurement.cpp index 90726b249e..cd34f8af25 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/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" CXFA_Measurement::CXFA_Measurement(const CFX_WideStringC& wsMeasure) { Set(wsMeasure); diff --git a/xfa/fxfa/parser/cxfa_measurement.h b/xfa/fxfa/parser/cxfa_measurement.h index 744cc2bcf7..d1b83bda40 100644 --- a/xfa/fxfa/parser/cxfa_measurement.h +++ b/xfa/fxfa/parser/cxfa_measurement.h @@ -7,8 +7,8 @@ #ifndef XFA_FXFA_PARSER_CXFA_MEASUREMENT_H_ #define XFA_FXFA_PARSER_CXFA_MEASUREMENT_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fxfa/include/fxfa_basic.h" class CXFA_Measurement { diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp index 793e37bee2..dae40ac515 100644 --- a/xfa/fxfa/parser/cxfa_node.cpp +++ b/xfa/fxfa/parser/cxfa_node.cpp @@ -9,7 +9,7 @@ #include #include -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "fxjs/include/cfxjse_value.h" #include "third_party/base/stl_util.h" #include "xfa/fde/xml/fde_xml_imp.h" diff --git a/xfa/fxfa/parser/cxfa_nodehelper.cpp b/xfa/fxfa/parser/cxfa_nodehelper.cpp index 4fc6830a73..27b8b038aa 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/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "xfa/fxfa/parser/cxfa_document.h" #include "xfa/fxfa/parser/cxfa_scriptcontext.h" #include "xfa/fxfa/parser/xfa_localemgr.h" diff --git a/xfa/fxfa/parser/cxfa_nodelist.cpp b/xfa/fxfa/parser/cxfa_nodelist.cpp index 86575e6b3f..df6cd408e4 100644 --- a/xfa/fxfa/parser/cxfa_nodelist.cpp +++ b/xfa/fxfa/parser/cxfa_nodelist.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/parser/xfa_object.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "xfa/fxfa/parser/cxfa_document.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 78f39ee6bc..7f35c73a20 100644 --- a/xfa/fxfa/parser/cxfa_object.cpp +++ b/xfa/fxfa/parser/cxfa_object.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/parser/xfa_object.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "fxjs/include/cfxjse_value.h" #include "xfa/fxfa/app/xfa_ffnotify.h" #include "xfa/fxfa/parser/cxfa_document.h" diff --git a/xfa/fxfa/parser/cxfa_occur.h b/xfa/fxfa/parser/cxfa_occur.h index 0f10540b92..58b44b9135 100644 --- a/xfa/fxfa/parser/cxfa_occur.h +++ b/xfa/fxfa/parser/cxfa_occur.h @@ -7,7 +7,7 @@ #ifndef XFA_FXFA_PARSER_CXFA_OCCUR_H_ #define XFA_FXFA_PARSER_CXFA_OCCUR_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fxfa/parser/cxfa_data.h" class CXFA_Node; diff --git a/xfa/fxfa/parser/cxfa_para.h b/xfa/fxfa/parser/cxfa_para.h index 109d05d2f0..e12d48f9fa 100644 --- a/xfa/fxfa/parser/cxfa_para.h +++ b/xfa/fxfa/parser/cxfa_para.h @@ -7,7 +7,7 @@ #ifndef XFA_FXFA_PARSER_CXFA_PARA_H_ #define XFA_FXFA_PARSER_CXFA_PARA_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fxfa/parser/cxfa_data.h" class CXFA_Node; diff --git a/xfa/fxfa/parser/cxfa_resolveprocessor.cpp b/xfa/fxfa/parser/cxfa_resolveprocessor.cpp index 60f3671418..823e884821 100644 --- a/xfa/fxfa/parser/cxfa_resolveprocessor.cpp +++ b/xfa/fxfa/parser/cxfa_resolveprocessor.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/parser/cxfa_resolveprocessor.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "xfa/fxfa/parser/cxfa_document.h" #include "xfa/fxfa/parser/cxfa_nodehelper.h" #include "xfa/fxfa/parser/cxfa_scriptcontext.h" diff --git a/xfa/fxfa/parser/cxfa_script.h b/xfa/fxfa/parser/cxfa_script.h index f265961b07..d89062487d 100644 --- a/xfa/fxfa/parser/cxfa_script.h +++ b/xfa/fxfa/parser/cxfa_script.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #include "xfa/fxfa/parser/cxfa_data.h" enum XFA_SCRIPTTYPE { diff --git a/xfa/fxfa/parser/cxfa_scriptcontext.cpp b/xfa/fxfa/parser/cxfa_scriptcontext.cpp index 22e24c5445..a1a45ab127 100644 --- a/xfa/fxfa/parser/cxfa_scriptcontext.cpp +++ b/xfa/fxfa/parser/cxfa_scriptcontext.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/parser/cxfa_scriptcontext.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "fxjs/include/cfxjse_arguments.h" #include "fxjs/include/cfxjse_class.h" #include "fxjs/include/cfxjse_value.h" diff --git a/xfa/fxfa/parser/cxfa_simple_parser.cpp b/xfa/fxfa/parser/cxfa_simple_parser.cpp index 008ca53f29..3f431e08b3 100644 --- a/xfa/fxfa/parser/cxfa_simple_parser.cpp +++ b/xfa/fxfa/parser/cxfa_simple_parser.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/parser/cxfa_simple_parser.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "xfa/fgas/crt/fgas_codepage.h" #include "xfa/fxfa/include/fxfa.h" #include "xfa/fxfa/include/xfa_checksum.h" diff --git a/xfa/fxfa/parser/cxfa_stroke.h b/xfa/fxfa/parser/cxfa_stroke.h index 6bfc409af7..7d817e0fea 100644 --- a/xfa/fxfa/parser/cxfa_stroke.h +++ b/xfa/fxfa/parser/cxfa_stroke.h @@ -7,7 +7,7 @@ #ifndef XFA_FXFA_PARSER_CXFA_STROKE_H_ #define XFA_FXFA_PARSER_CXFA_STROKE_H_ -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_dib.h" #include "xfa/fxfa/include/fxfa_basic.h" #include "xfa/fxfa/parser/cxfa_data.h" diff --git a/xfa/fxfa/parser/cxfa_submit.h b/xfa/fxfa/parser/cxfa_submit.h index 598431102d..29cd1cff80 100644 --- a/xfa/fxfa/parser/cxfa_submit.h +++ b/xfa/fxfa/parser/cxfa_submit.h @@ -7,8 +7,8 @@ #ifndef XFA_FXFA_PARSER_CXFA_SUBMIT_H_ #define XFA_FXFA_PARSER_CXFA_SUBMIT_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fxfa/parser/cxfa_data.h" class CXFA_Node; diff --git a/xfa/fxfa/parser/cxfa_text.h b/xfa/fxfa/parser/cxfa_text.h index 7467647791..ca41c0dbb4 100644 --- a/xfa/fxfa/parser/cxfa_text.h +++ b/xfa/fxfa/parser/cxfa_text.h @@ -7,7 +7,7 @@ #ifndef XFA_FXFA_PARSER_CXFA_TEXT_H_ #define XFA_FXFA_PARSER_CXFA_TEXT_H_ -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #include "xfa/fxfa/parser/cxfa_data.h" class CXFA_Node; diff --git a/xfa/fxfa/parser/cxfa_tooltip.h b/xfa/fxfa/parser/cxfa_tooltip.h index af1791e2ec..93ba2ba72c 100644 --- a/xfa/fxfa/parser/cxfa_tooltip.h +++ b/xfa/fxfa/parser/cxfa_tooltip.h @@ -7,7 +7,7 @@ #ifndef XFA_FXFA_PARSER_CXFA_TOOLTIP_H_ #define XFA_FXFA_PARSER_CXFA_TOOLTIP_H_ -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #include "xfa/fxfa/parser/cxfa_data.h" class CXFA_Node; diff --git a/xfa/fxfa/parser/cxfa_validate.h b/xfa/fxfa/parser/cxfa_validate.h index bdd7be98b2..da9654a5a0 100644 --- a/xfa/fxfa/parser/cxfa_validate.h +++ b/xfa/fxfa/parser/cxfa_validate.h @@ -7,8 +7,8 @@ #ifndef XFA_FXFA_PARSER_CXFA_VALIDATE_H_ #define XFA_FXFA_PARSER_CXFA_VALIDATE_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fxfa/parser/cxfa_data.h" #include "xfa/fxfa/parser/cxfa_script.h" diff --git a/xfa/fxfa/parser/cxfa_value.h b/xfa/fxfa/parser/cxfa_value.h index 69697c150a..c3a03950ec 100644 --- a/xfa/fxfa/parser/cxfa_value.h +++ b/xfa/fxfa/parser/cxfa_value.h @@ -7,7 +7,7 @@ #ifndef XFA_FXFA_PARSER_CXFA_VALUE_H_ #define XFA_FXFA_PARSER_CXFA_VALUE_H_ -#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/fx_string.h" #include "xfa/fxfa/parser/cxfa_arc.h" #include "xfa/fxfa/parser/cxfa_data.h" #include "xfa/fxfa/parser/cxfa_exdata.h" diff --git a/xfa/fxfa/parser/cxfa_widetextread.cpp b/xfa/fxfa/parser/cxfa_widetextread.cpp index 90abe9af53..7c6487db6a 100644 --- a/xfa/fxfa/parser/cxfa_widetextread.cpp +++ b/xfa/fxfa/parser/cxfa_widetextread.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/parser/cxfa_widetextread.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "xfa/fgas/crt/fgas_codepage.h" CXFA_WideTextRead::CXFA_WideTextRead(const CFX_WideString& wsBuffer) diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp index 561a5df92d..4e02087ebd 100644 --- a/xfa/fxfa/parser/cxfa_widgetdata.cpp +++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/parser/cxfa_widgetdata.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "xfa/fxbarcode/include/BC_Library.h" #include "xfa/fxfa/app/xfa_ffnotify.h" #include "xfa/fxfa/parser/cxfa_document.h" diff --git a/xfa/fxfa/parser/cxfa_widgetdata.h b/xfa/fxfa/parser/cxfa_widgetdata.h index 51e8672e39..f718b6ee59 100644 --- a/xfa/fxfa/parser/cxfa_widgetdata.h +++ b/xfa/fxfa/parser/cxfa_widgetdata.h @@ -7,8 +7,8 @@ #ifndef XFA_FXFA_PARSER_CXFA_WIDGETDATA_H_ #define XFA_FXFA_PARSER_CXFA_WIDGETDATA_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fxfa/parser/cxfa_assist.h" #include "xfa/fxfa/parser/cxfa_bind.h" #include "xfa/fxfa/parser/cxfa_border.h" diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp index ea2f31671f..8d50a5a96d 100644 --- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp +++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/parser/xfa_document_datamerger_imp.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "xfa/fde/xml/fde_xml_imp.h" #include "xfa/fxfa/parser/cxfa_document.h" #include "xfa/fxfa/parser/cxfa_layoutprocessor.h" diff --git a/xfa/fxfa/parser/xfa_layout_itemlayout.h b/xfa/fxfa/parser/xfa_layout_itemlayout.h index a1344ba53a..ee9e29d8b4 100644 --- a/xfa/fxfa/parser/xfa_layout_itemlayout.h +++ b/xfa/fxfa/parser/xfa_layout_itemlayout.h @@ -12,7 +12,7 @@ #include #include -#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/fx_basic.h" #include "xfa/fxfa/include/fxfa_basic.h" #define XFA_LAYOUT_INVALIDNODE ((CXFA_Node*)(intptr_t)-1) diff --git a/xfa/fxfa/parser/xfa_locale.cpp b/xfa/fxfa/parser/xfa_locale.cpp index 686af80576..19511bebce 100644 --- a/xfa/fxfa/parser/xfa_locale.cpp +++ b/xfa/fxfa/parser/xfa_locale.cpp @@ -8,7 +8,7 @@ #include -#include "core/fxcrt/include/fx_xml.h" +#include "core/fxcrt/fx_xml.h" #include "xfa/fxfa/parser/cxfa_document.h" #include "xfa/fxfa/parser/xfa_localemgr.h" #include "xfa/fxfa/parser/xfa_object.h" diff --git a/xfa/fxfa/parser/xfa_localemgr.cpp b/xfa/fxfa/parser/xfa_localemgr.cpp index 9b444defee..0bcfe0b5e0 100644 --- a/xfa/fxfa/parser/xfa_localemgr.cpp +++ b/xfa/fxfa/parser/xfa_localemgr.cpp @@ -10,7 +10,7 @@ #include #include "core/fxcodec/fx_codec.h" -#include "core/fxcrt/include/fx_xml.h" +#include "core/fxcrt/fx_xml.h" #include "core/fxge/include/cfx_gemodule.h" #include "xfa/fxfa/parser/cxfa_document.h" #include "xfa/fxfa/parser/xfa_locale.h" diff --git a/xfa/fxfa/parser/xfa_localevalue.cpp b/xfa/fxfa/parser/xfa_localevalue.cpp index 0324c569f3..27f3b0cf3f 100644 --- a/xfa/fxfa/parser/xfa_localevalue.cpp +++ b/xfa/fxfa/parser/xfa_localevalue.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/parser/xfa_localevalue.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "xfa/fgas/localization/fgas_localeimp.h" #include "xfa/fxfa/parser/cxfa_document.h" #include "xfa/fxfa/parser/xfa_localemgr.h" diff --git a/xfa/fxfa/parser/xfa_localevalue.h b/xfa/fxfa/parser/xfa_localevalue.h index 83885bd56d..f278c07105 100644 --- a/xfa/fxfa/parser/xfa_localevalue.h +++ b/xfa/fxfa/parser/xfa_localevalue.h @@ -7,8 +7,8 @@ #ifndef XFA_FXFA_PARSER_XFA_LOCALEVALUE_H_ #define XFA_FXFA_PARSER_XFA_LOCALEVALUE_H_ -#include "core/fxcrt/include/fx_string.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fxfa/parser/cxfa_widgetdata.h" class IFX_Locale; diff --git a/xfa/fxfa/parser/xfa_utils.cpp b/xfa/fxfa/parser/xfa_utils.cpp index da5b68516b..3967784fe9 100644 --- a/xfa/fxfa/parser/xfa_utils.cpp +++ b/xfa/fxfa/parser/xfa_utils.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/parser/xfa_utils.h" -#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/fx_ext.h" #include "xfa/fde/xml/fde_xml_imp.h" #include "xfa/fxfa/parser/cxfa_document.h" #include "xfa/fxfa/parser/cxfa_measurement.h" diff --git a/xfa/fxgraphics/cfx_path.h b/xfa/fxgraphics/cfx_path.h index bfef04e591..7cd446edcf 100644 --- a/xfa/fxgraphics/cfx_path.h +++ b/xfa/fxgraphics/cfx_path.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fxgraphics/include/cfx_graphics.h" class CFX_PathData; diff --git a/xfa/fxgraphics/cfx_pattern.h b/xfa/fxgraphics/cfx_pattern.h index e7f47eea6a..860d346287 100644 --- a/xfa/fxgraphics/cfx_pattern.h +++ b/xfa/fxgraphics/cfx_pattern.h @@ -7,8 +7,8 @@ #ifndef XFA_FXGRAPHICS_CFX_PATTERN_H_ #define XFA_FXGRAPHICS_CFX_PATTERN_H_ -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" #include "xfa/fxgraphics/include/cfx_graphics.h" class CFX_DIBitmap; diff --git a/xfa/fxgraphics/cfx_shading.h b/xfa/fxgraphics/cfx_shading.h index 302aa65be5..eb01112bc5 100644 --- a/xfa/fxgraphics/cfx_shading.h +++ b/xfa/fxgraphics/cfx_shading.h @@ -7,8 +7,8 @@ #ifndef XFA_FXGRAPHICS_CFX_SHADING_H_ #define XFA_FXGRAPHICS_CFX_SHADING_H_ -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/fx_dib.h" #define FX_SHADING_Steps 256 diff --git a/xfa/fxgraphics/include/cfx_graphics.h b/xfa/fxgraphics/include/cfx_graphics.h index 129ae6e18b..3d818d7952 100644 --- a/xfa/fxgraphics/include/cfx_graphics.h +++ b/xfa/fxgraphics/include/cfx_graphics.h @@ -9,7 +9,7 @@ #include -#include "core/fxcrt/include/fx_system.h" +#include "core/fxcrt/fx_system.h" #include "core/fxge/include/cfx_fxgedevice.h" #include "core/fxge/include/cfx_graphstatedata.h" #include "core/fxge/include/cfx_renderdevice.h" -- cgit v1.2.3