From a8a28e0702a1874d29d3c9f2b155bce1557eb4fd Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 23 Mar 2016 15:41:39 -0400 Subject: Move core/include/fxcrt to core/fxcrt/include. This CL moves the fxcrt code into the core/fxcrt directory. The only exception was fx_bidi.h which was moved into core/fxcrt as it is not used outside of core/. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1825953002 . --- BUILD.gn | 70 +- core/fdrm/crypto/include/fx_crypt.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 | 2 +- core/fpdfapi/fpdf_edit/editint.h | 6 +- core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp | 2 +- core/fpdfapi/fpdf_edit/include/cpdf_creator.h | 2 +- .../fpdf_edit/include/cpdf_pagecontentgenerator.h | 6 +- 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_colorstate.h | 4 +- core/fpdfapi/fpdf_page/cpdf_colorstatedata.h | 2 +- core/fpdfapi/fpdf_page/cpdf_contentmark.h | 2 +- core/fpdfapi/fpdf_page/cpdf_contentmarkdata.h | 2 +- core/fpdfapi/fpdf_page/cpdf_contentmarkitem.h | 4 +- core/fpdfapi/fpdf_page/cpdf_parseoptions.h | 2 +- core/fpdfapi/fpdf_page/cpdf_textstate.h | 2 +- core/fpdfapi/fpdf_page/fpdf_page_func.cpp | 2 +- core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp | 4 +- core/fpdfapi/fpdf_page/include/cpdf_clippath.h | 6 +- core/fpdfapi/fpdf_page/include/cpdf_formobject.h | 2 +- core/fpdfapi/fpdf_page/include/cpdf_generalstate.h | 2 +- .../fpdf_page/include/cpdf_generalstatedata.h | 6 +- core/fpdfapi/fpdf_page/include/cpdf_imageobject.h | 2 +- core/fpdfapi/fpdf_page/include/cpdf_page.h | 6 +- core/fpdfapi/fpdf_page/include/cpdf_pageobject.h | 4 +- .../fpdf_page/include/cpdf_pageobjectholder.h | 4 +- core/fpdfapi/fpdf_page/include/cpdf_path.h | 2 +- core/fpdfapi/fpdf_page/include/cpdf_pathobject.h | 4 +- .../fpdfapi/fpdf_page/include/cpdf_shadingobject.h | 2 +- core/fpdfapi/fpdf_page/include/cpdf_textobject.h | 4 +- .../fpdfapi/fpdf_page/include/cpdf_textstatedata.h | 2 +- core/fpdfapi/fpdf_parser/cpdf_boolean.h | 4 +- core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp | 4 +- core/fpdfapi/fpdf_parser/cpdf_data_avail.h | 2 +- core/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp | 2 +- core/fpdfapi/fpdf_parser/cpdf_hint_tables.h | 4 +- core/fpdfapi/fpdf_parser/cpdf_object.cpp | 2 +- core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp | 2 +- core/fpdfapi/fpdf_parser/cpdf_parser.cpp | 4 +- core/fpdfapi/fpdf_parser/cpdf_parser_unittest.cpp | 4 +- .../fpdf_parser/cpdf_simple_parser_unittest.cpp | 2 +- .../fpdf_parser/cpdf_standard_security_handler.h | 4 +- core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp | 2 +- core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h | 2 +- .../fpdf_parser/cpdf_syntax_parser_unittest.cpp | 4 +- core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp | 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_parser/include/cfdf_document.h | 2 +- core/fpdfapi/fpdf_parser/include/cpdf_array.h | 4 +- core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h | 4 +- core/fpdfapi/fpdf_parser/include/cpdf_document.h | 2 +- .../include/cpdf_indirect_object_holder.h | 2 +- core/fpdfapi/fpdf_parser/include/cpdf_number.h | 4 +- core/fpdfapi/fpdf_parser/include/cpdf_object.h | 4 +- core/fpdfapi/fpdf_parser/include/cpdf_parser.h | 2 +- .../fpdf_parser/include/cpdf_simple_parser.h | 4 +- core/fpdfapi/fpdf_parser/include/cpdf_stream.h | 2 +- core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h | 4 +- core/fpdfapi/fpdf_parser/include/cpdf_string.h | 4 +- .../fpdf_parser/include/fpdf_parser_decode.h | 2 +- core/fpdfapi/fpdf_parser/include/ipdf_data_avail.h | 4 +- core/fpdfapi/fpdf_parser/ipdf_crypto_handler.h | 2 +- core/fpdfapi/fpdf_parser/ipdf_occontext.h | 2 +- core/fpdfapi/fpdf_parser/ipdf_security_handler.h | 2 +- core/fpdfapi/fpdf_render/cpdf_pagerendercache.h | 2 +- core/fpdfapi/fpdf_render/fpdf_render_image.cpp | 2 +- core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp | 2 +- .../fpdf_render/include/cpdf_progressiverenderer.h | 4 +- .../fpdf_render/include/cpdf_rendercontext.h | 4 +- .../fpdf_render/include/cpdf_renderoptions.h | 2 +- .../fpdf_render/include/cpdf_textrenderer.h | 6 +- core/fpdfapi/include/cpdf_modulemgr.h | 2 +- core/fpdfdoc/doc_metadata.cpp | 2 +- core/fpdftext/fpdf_text_int.cpp | 6 +- core/fpdftext/fpdf_text_int.h | 2 +- core/fpdftext/include/ipdf_linkextract.h | 4 +- core/fpdftext/include/ipdf_textpage.h | 4 +- core/fpdftext/include/ipdf_textpagefind.h | 4 +- core/fpdftext/unicodenormalization.cpp | 2 +- core/fpdftext/unicodenormalization.h | 2 +- core/fpdftext/unicodenormalizationdata.cpp | 2 +- core/fxcodec/codec/fx_codec.cpp | 4 +- core/fxcodec/codec/fx_codec_jpeg.cpp | 2 +- core/fxcodec/codec/fx_codec_jpx_opj.cpp | 2 +- core/fxcodec/codec/fx_codec_progress.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/extension.h | 4 +- core/fxcrt/fx_arabic.cpp | 2 +- core/fxcrt/fx_arabic.h | 2 +- core/fxcrt/fx_basic_array.cpp | 2 +- core/fxcrt/fx_basic_bstring.cpp | 2 +- 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_wstring.cpp | 4 +- core/fxcrt/fx_basic_wstring_unittest.cpp | 2 +- core/fxcrt/fx_bidi.cpp | 4 +- core/fxcrt/fx_bidi.h | 73 ++ core/fxcrt/fx_bidi_unittest.cpp | 2 +- core/fxcrt/fx_extension.cpp | 4 +- core/fxcrt/fx_extension_unittest.cpp | 2 +- core/fxcrt/fx_system_unittest.cpp | 2 +- core/fxcrt/fx_ucddata.cpp | 4 +- core/fxcrt/fx_unicode.cpp | 2 +- core/fxcrt/fx_xml_composer.cpp | 2 +- core/fxcrt/fx_xml_parser.cpp | 4 +- core/fxcrt/fxcrt_platforms.cpp | 2 +- core/fxcrt/fxcrt_posix.cpp | 2 +- core/fxcrt/fxcrt_stream.cpp | 2 +- core/fxcrt/fxcrt_windows.cpp | 2 +- core/fxcrt/include/fx_arb.h | 66 ++ core/fxcrt/include/fx_basic.h | 1153 ++++++++++++++++++++ core/fxcrt/include/fx_coordinates.h | 672 ++++++++++++ core/fxcrt/include/fx_ext.h | 134 +++ core/fxcrt/include/fx_memory.h | 84 ++ core/fxcrt/include/fx_safe_types.h | 20 + core/fxcrt/include/fx_stream.h | 162 +++ core/fxcrt/include/fx_string.h | 819 ++++++++++++++ core/fxcrt/include/fx_system.h | 320 ++++++ core/fxcrt/include/fx_ucd.h | 192 ++++ core/fxcrt/include/fx_xml.h | 169 +++ core/fxcrt/plex.h | 2 +- core/fxcrt/xml_int.h | 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/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 | 2 +- core/fxge/dib/dib_int.h | 2 +- core/fxge/ge/fx_ge_path.cpp | 2 +- core/include/fpdfapi/fpdf_resource.h | 2 +- core/include/fxcodec/fx_codec.h | 4 +- core/include/fxcrt/fx_arb.h | 66 -- core/include/fxcrt/fx_basic.h | 1153 -------------------- core/include/fxcrt/fx_bidi.h | 73 -- core/include/fxcrt/fx_coordinates.h | 672 ------------ core/include/fxcrt/fx_ext.h | 134 --- core/include/fxcrt/fx_memory.h | 84 -- core/include/fxcrt/fx_safe_types.h | 20 - core/include/fxcrt/fx_stream.h | 162 --- core/include/fxcrt/fx_string.h | 819 -------------- core/include/fxcrt/fx_system.h | 320 ------ core/include/fxcrt/fx_ucd.h | 192 ---- core/include/fxcrt/fx_xml.h | 169 --- core/include/fxge/fpf.h | 2 +- core/include/fxge/fx_dib.h | 4 +- core/include/fxge/fx_font.h | 2 +- fpdfsdk/DEPS | 1 + fpdfsdk/formfiller/cffl_combobox.h | 2 +- fpdfsdk/fpdf_ext.cpp | 2 +- fpdfsdk/fpdfdoc_embeddertest.cpp | 2 +- fpdfsdk/fpdfsave.cpp | 2 +- fpdfsdk/fpdfsave_embeddertest.cpp | 2 +- fpdfsdk/fpdftext_embeddertest.cpp | 2 +- fpdfsdk/fpdfview.cpp | 2 +- fpdfsdk/fsdk_baseannot.cpp | 2 +- fpdfsdk/include/fpdfxfa/fpdfxfa_page.h | 4 +- fpdfsdk/include/fsdk_actionhandler.h | 2 +- fpdfsdk/include/fsdk_annothandler.h | 4 +- fpdfsdk/include/fsdk_baseannot.h | 2 +- fpdfsdk/include/fsdk_baseform.h | 2 +- fpdfsdk/include/fx_systemhandler.h | 4 +- fpdfsdk/include/fxedit/fx_edit.h | 2 +- fpdfsdk/include/javascript/IJavaScript.h | 4 +- fpdfsdk/include/jsapi/fxjs_v8.h | 2 +- fpdfsdk/include/pdfwindow/PWL_Edit.h | 2 +- fpdfsdk/include/pdfwindow/PWL_EditCtrl.h | 2 +- fpdfsdk/include/pdfwindow/PWL_Icon.h | 2 +- fpdfsdk/include/pdfwindow/PWL_IconList.h | 2 +- fpdfsdk/include/pdfwindow/PWL_Wnd.h | 2 +- fpdfsdk/javascript/JS_Context.h | 4 +- fpdfsdk/javascript/JS_EventHandler.h | 4 +- fpdfsdk/javascript/JS_GlobalData.h | 2 +- fpdfsdk/javascript/JS_Runtime.h | 2 +- fpdfsdk/javascript/JS_Value.h | 2 +- fpdfsdk/javascript/PublicMethods.cpp | 2 +- fpdfsdk/javascript/global.cpp | 2 +- fpdfsdk/javascript/public_methods_embeddertest.cpp | 2 +- fpdfsdk/javascript/resource.h | 2 +- fpdfsdk/javascript/util.cpp | 2 +- fpdfsdk/jsapi/fxjs_v8.cpp | 2 +- fpdfsdk/pdfwindow/PWL_Edit.cpp | 4 +- pdfium.gyp | 24 +- testing/DEPS | 1 + testing/fx_string_testhelpers.h | 2 +- testing/libfuzzer/pdf_fm2js_fuzzer.cc | 4 +- testing/libfuzzer/pdf_xml_fuzzer.cc | 4 +- 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 | 76 +- third_party/libjpeg/jinclude.h | 2 +- third_party/libtiff/tiffconf.h | 2 +- third_party/zlib_v128/zutil.h | 2 +- xfa/DEPS | 1 + 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_brush.h | 2 +- xfa/fde/fde_path.h | 4 +- xfa/fde/fde_render.h | 2 +- xfa/fde/fde_renderdevice.h | 2 +- xfa/fde/fde_visualset.h | 4 +- xfa/fde/tto/fde_textout.cpp | 4 +- xfa/fde/xml/fde_xml_imp.h | 2 +- xfa/fee/fde_txtedtengine.h | 2 +- xfa/fee/fde_txtedtpage.h | 4 +- xfa/fee/fx_wordbreak/fx_wordbreak.h | 4 +- xfa/fee/fx_wordbreak/fx_wordbreak_impl.h | 4 +- xfa/fee/ifde_txtedtbuf.h | 2 +- xfa/fgas/crt/fgas_algorithm.cpp | 2 +- xfa/fgas/crt/fgas_algorithm.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_system.cpp | 2 +- xfa/fgas/crt/fgas_system.h | 2 +- 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_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 | 2 +- xfa/fgas/layout/fgas_rtfbreak.h | 2 +- xfa/fgas/layout/fgas_textbreak.cpp | 4 +- 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/fgas/localization/fgas_localemgr.cpp | 2 +- xfa/fgas/xml/fgas_sax.h | 2 +- xfa/fwl/basewidget/fxmath_barcodeimp.h | 4 +- xfa/fwl/core/fwl_noteimp.cpp | 2 +- xfa/fwl/core/fwl_sdadapterimp.cpp | 2 +- xfa/fwl/core/fwl_targetimp.h | 2 +- xfa/fwl/lightwidget/app.cpp | 2 +- xfa/fxbarcode/BC_BufferedImageLuminanceSource.h | 4 +- xfa/fxbarcode/BC_DecoderResult.h | 2 +- xfa/fxbarcode/BC_Dimension.h | 2 +- xfa/fxbarcode/BC_LuminanceSource.h | 2 +- xfa/fxbarcode/BC_Reader.h | 2 +- xfa/fxbarcode/BC_ResultPoint.h | 2 +- xfa/fxbarcode/BC_UtilCodingConvert.h | 2 +- xfa/fxbarcode/BC_UtilRSS.cpp | 2 +- xfa/fxbarcode/BC_UtilRSS.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_CommonBitSource.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/BC_CommonCharacterSetECI.h | 2 +- xfa/fxbarcode/common/BC_CommonDecoderResult.cpp | 2 +- xfa/fxbarcode/common/BC_CommonDecoderResult.h | 2 +- .../common/BC_CommonPerspectiveTransform.cpp | 2 +- .../common/BC_CommonPerspectiveTransform.h | 2 +- xfa/fxbarcode/common/BC_GlobalHistogramBinarizer.h | 2 +- xfa/fxbarcode/common/BC_WhiteRectangleDetector.h | 2 +- xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.h | 2 +- .../common/reedsolomon/BC_ReedSolomonDecoder.h | 2 +- .../common/reedsolomon/BC_ReedSolomonGF256.h | 2 +- .../common/reedsolomon/BC_ReedSolomonGF256Poly.h | 2 +- .../datamatrix/BC_DataMatrixBitMatrixParser.h | 2 +- xfa/fxbarcode/datamatrix/BC_DataMatrixDataBlock.h | 2 +- xfa/fxbarcode/datamatrix/BC_DataMatrixDecoder.h | 2 +- xfa/fxbarcode/datamatrix/BC_DataMatrixDetector.h | 2 +- xfa/fxbarcode/datamatrix/BC_DataMatrixVersion.h | 2 +- xfa/fxbarcode/datamatrix/BC_DefaultPlacement.h | 2 +- xfa/fxbarcode/datamatrix/BC_SymbolInfo.h | 4 +- xfa/fxbarcode/oned/BC_OneDimReader.h | 2 +- xfa/fxbarcode/oned/BC_OnedCodaBarReader.cpp | 2 +- xfa/fxbarcode/oned/BC_OnedCodaBarReader.h | 2 +- xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h | 4 +- xfa/fxbarcode/oned/BC_OnedCode128Writer.h | 4 +- xfa/fxbarcode/oned/BC_OnedCode39Reader.h | 2 +- xfa/fxbarcode/oned/BC_OnedEAN13Reader.h | 4 +- xfa/fxbarcode/oned/BC_OnedEAN13Writer.h | 4 +- xfa/fxbarcode/oned/BC_OnedEAN8Writer.h | 4 +- xfa/fxbarcode/oned/BC_OnedUPCAReader.cpp | 2 +- xfa/fxbarcode/oned/BC_OnedUPCAReader.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_PDF417BarcodeValue.h | 2 +- xfa/fxbarcode/pdf417/BC_PDF417BoundingBox.h | 2 +- xfa/fxbarcode/pdf417/BC_PDF417Codeword.h | 2 +- xfa/fxbarcode/pdf417/BC_PDF417CodewordDecoder.h | 2 +- xfa/fxbarcode/pdf417/BC_PDF417Common.h | 2 +- .../pdf417/BC_PDF417DecodedBitStreamParser.h | 4 +- .../BC_PDF417DetectionResultRowIndicatorColumn.cpp | 2 +- xfa/fxbarcode/pdf417/BC_PDF417DetectorResult.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_PDF417Reader.h | 4 +- xfa/fxbarcode/pdf417/BC_PDF417ResultMetadata.h | 2 +- xfa/fxbarcode/pdf417/BC_PDF417Writer.h | 4 +- xfa/fxbarcode/qrcode/BC_FinderPatternInfo.h | 2 +- xfa/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.h | 2 +- xfa/fxbarcode/qrcode/BC_QRBitMatrixParser.h | 2 +- xfa/fxbarcode/qrcode/BC_QRCodeReader.h | 2 +- xfa/fxbarcode/qrcode/BC_QRCoderBitVector.cpp | 2 +- xfa/fxbarcode/qrcode/BC_QRCoderDecoder.h | 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/qrcode/BC_QRDataBlock.h | 2 +- xfa/fxbarcode/qrcode/BC_QRDataMask.h | 2 +- xfa/fxbarcode/qrcode/BC_QRDetector.h | 2 +- xfa/fxbarcode/qrcode/BC_QRDetectorResult.h | 2 +- xfa/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp | 2 +- xfa/fxbarcode/qrcode/BC_QRFinderPatternFinder.h | 2 +- xfa/fxbarcode/qrcode/BC_QRGridSampler.h | 2 +- xfa/fxbarcode/utils.h | 2 +- xfa/fxfa/app/xfa_ffbarcode.cpp | 2 +- xfa/fxfa/app/xfa_ffdoc.cpp | 2 +- xfa/fxfa/app/xfa_ffdocview.cpp | 2 +- xfa/fxfa/app/xfa_fontmgr.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_fm2jsapi.cpp | 2 +- xfa/fxfa/fm2js/xfa_fm2jsapi.h | 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/parser/xfa_basic_imp.cpp | 2 +- xfa/fxfa/parser/xfa_document_datamerger_imp.cpp | 2 +- xfa/fxfa/parser/xfa_document_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_object_imp.cpp | 2 +- xfa/fxfa/parser/xfa_objectacc_imp.cpp | 2 +- xfa/fxfa/parser/xfa_script_imp.cpp | 2 +- xfa/fxfa/parser/xfa_script_nodehelper.cpp | 2 +- xfa/fxfa/parser/xfa_script_resolveprocessor.cpp | 2 +- xfa/fxfa/parser/xfa_utils_imp.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 +- xfa/fxjse/context.h | 2 +- xfa/fxjse/include/fxjse.h | 4 +- xfa/fxjse/runtime.h | 2 +- xfa/include/fwl/adapter/fwl_adapterthreadmgr.h | 2 +- xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h | 4 +- xfa/include/fwl/basewidget/fxmath_barcode.h | 4 +- xfa/include/fwl/core/fwl_app.h | 2 +- xfa/include/fwl/core/fwl_note.h | 2 +- xfa/include/fwl/core/fwl_target.h | 2 +- xfa/include/fwl/core/fwl_theme.h | 4 +- xfa/include/fwl/core/fwl_timer.h | 2 +- xfa/include/fwl/theme/utils.h | 2 +- xfa/include/fwl/theme/widgettp.h | 4 +- 437 files changed, 4476 insertions(+), 4473 deletions(-) create mode 100644 core/fxcrt/fx_bidi.h create mode 100644 core/fxcrt/include/fx_arb.h create mode 100644 core/fxcrt/include/fx_basic.h create mode 100644 core/fxcrt/include/fx_coordinates.h create mode 100644 core/fxcrt/include/fx_ext.h create mode 100644 core/fxcrt/include/fx_memory.h create mode 100644 core/fxcrt/include/fx_safe_types.h create mode 100644 core/fxcrt/include/fx_stream.h create mode 100644 core/fxcrt/include/fx_string.h create mode 100644 core/fxcrt/include/fx_system.h create mode 100644 core/fxcrt/include/fx_ucd.h create mode 100644 core/fxcrt/include/fx_xml.h delete mode 100644 core/include/fxcrt/fx_arb.h delete mode 100644 core/include/fxcrt/fx_basic.h delete mode 100644 core/include/fxcrt/fx_bidi.h delete mode 100644 core/include/fxcrt/fx_coordinates.h delete mode 100644 core/include/fxcrt/fx_ext.h delete mode 100644 core/include/fxcrt/fx_memory.h delete mode 100644 core/include/fxcrt/fx_safe_types.h delete mode 100644 core/include/fxcrt/fx_stream.h delete mode 100644 core/include/fxcrt/fx_string.h delete mode 100644 core/include/fxcrt/fx_system.h delete mode 100644 core/include/fxcrt/fx_ucd.h delete mode 100644 core/include/fxcrt/fx_xml.h diff --git a/BUILD.gn b/BUILD.gn index 40165ae374..753e5a72be 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -575,6 +575,7 @@ static_library("fxcrt") { "core/fxcrt/fx_basic_util.cpp", "core/fxcrt/fx_basic_wstring.cpp", "core/fxcrt/fx_bidi.cpp", + "core/fxcrt/fx_bidi.h", "core/fxcrt/fx_extension.cpp", "core/fxcrt/fx_ucddata.cpp", "core/fxcrt/fx_unicode.cpp", @@ -587,26 +588,25 @@ static_library("fxcrt") { "core/fxcrt/fxcrt_stream.cpp", "core/fxcrt/fxcrt_windows.cpp", "core/fxcrt/fxcrt_windows.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", - "core/include/fxcrt/fx_basic.h", - "core/include/fxcrt/fx_bidi.h", - "core/include/fxcrt/fx_coordinates.h", - "core/include/fxcrt/fx_ext.h", - "core/include/fxcrt/fx_memory.h", - "core/include/fxcrt/fx_safe_types.h", - "core/include/fxcrt/fx_stream.h", - "core/include/fxcrt/fx_string.h", - "core/include/fxcrt/fx_system.h", - "core/include/fxcrt/fx_ucd.h", - "core/include/fxcrt/fx_xml.h", ] if (pdf_enable_xfa) { sources += [ "core/fxcrt/fx_arabic.cpp", "core/fxcrt/fx_arabic.h", "core/fxcrt/fx_basic_maps.cpp", - "core/include/fxcrt/fx_arb.h", + "core/fxcrt/include/fx_arb.h", ] } configs += [ ":pdfium_config" ] @@ -1055,6 +1055,28 @@ if (pdf_enable_xfa) { "xfa/fxbarcode/BC_Utils.cpp", "xfa/fxbarcode/BC_Writer.cpp", "xfa/fxbarcode/BC_Writer.h", + "xfa/fxbarcode/cbc_codabar.cpp", + "xfa/fxbarcode/cbc_codabar.h", + "xfa/fxbarcode/cbc_code128.cpp", + "xfa/fxbarcode/cbc_code128.h", + "xfa/fxbarcode/cbc_code39.cpp", + "xfa/fxbarcode/cbc_code39.h", + "xfa/fxbarcode/cbc_codebase.cpp", + "xfa/fxbarcode/cbc_codebase.h", + "xfa/fxbarcode/cbc_datamatrix.cpp", + "xfa/fxbarcode/cbc_datamatrix.h", + "xfa/fxbarcode/cbc_ean13.cpp", + "xfa/fxbarcode/cbc_ean13.h", + "xfa/fxbarcode/cbc_ean8.cpp", + "xfa/fxbarcode/cbc_ean8.h", + "xfa/fxbarcode/cbc_onecode.cpp", + "xfa/fxbarcode/cbc_onecode.h", + "xfa/fxbarcode/cbc_pdf417i.cpp", + "xfa/fxbarcode/cbc_pdf417i.h", + "xfa/fxbarcode/cbc_qrcode.cpp", + "xfa/fxbarcode/cbc_qrcode.h", + "xfa/fxbarcode/cbc_upca.cpp", + "xfa/fxbarcode/cbc_upca.h", "xfa/fxbarcode/common/BC_CommonBitArray.cpp", "xfa/fxbarcode/common/BC_CommonBitArray.h", "xfa/fxbarcode/common/BC_CommonBitMatrix.cpp", @@ -1129,6 +1151,7 @@ if (pdf_enable_xfa) { "xfa/fxbarcode/datamatrix/BC_TextEncoder.h", "xfa/fxbarcode/datamatrix/BC_X12Encoder.cpp", "xfa/fxbarcode/datamatrix/BC_X12Encoder.h", + "xfa/fxbarcode/include/BC_Library.h", "xfa/fxbarcode/oned/BC_OneDReader.cpp", "xfa/fxbarcode/oned/BC_OneDReader.h", "xfa/fxbarcode/oned/BC_OneDimReader.cpp", @@ -1472,29 +1495,6 @@ if (pdf_enable_xfa) { "xfa/include/fwl/theme/scrollbartp.h", "xfa/include/fwl/theme/utils.h", "xfa/include/fwl/theme/widgettp.h", - "xfa/fxbarcode/include/BC_Library.h", - "xfa/fxbarcode/cbc_codebase.h", - "xfa/fxbarcode/cbc_codebase.cpp", - "xfa/fxbarcode/cbc_onecode.h", - "xfa/fxbarcode/cbc_onecode.cpp", - "xfa/fxbarcode/cbc_code39.h", - "xfa/fxbarcode/cbc_code39.cpp", - "xfa/fxbarcode/cbc_codabar.h", - "xfa/fxbarcode/cbc_ean13.h", - "xfa/fxbarcode/cbc_ean13.cpp", - "xfa/fxbarcode/cbc_upca.h", - "xfa/fxbarcode/cbc_upca.cpp", - "xfa/fxbarcode/cbc_qrcode.h", - "xfa/fxbarcode/cbc_qrcode.cpp", - "xfa/fxbarcode/cbc_pdf417i.h", - "xfa/fxbarcode/cbc_pdf417i.cpp", - "xfa/fxbarcode/cbc_datamatrix.h", - "xfa/fxbarcode/cbc_datamatrix.cpp", - "xfa/fxbarcode/cbc_codabar.cpp", - "xfa/fxbarcode/cbc_code128.h", - "xfa/fxbarcode/cbc_code128.cpp", - "xfa/fxbarcode/cbc_ean8.h", - "xfa/fxbarcode/cbc_ean8.cpp", "xfa/include/fxfa/fxfa.h", "xfa/include/fxfa/fxfa_basic.h", "xfa/include/fxfa/fxfa_objectacc.h", diff --git a/core/fdrm/crypto/include/fx_crypt.h b/core/fdrm/crypto/include/fx_crypt.h index fdba0e7164..4563b7fa43 100644 --- a/core/fdrm/crypto/include/fx_crypt.h +++ b/core/fdrm/crypto/include/fx_crypt.h @@ -7,7 +7,7 @@ #ifndef CORE_FDRM_CRYPTO_INCLUDE_FX_CRYPT_H_ #define CORE_FDRM_CRYPTO_INCLUDE_FX_CRYPT_H_ -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" #ifdef __cplusplus extern "C" { diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.cpp index 51c5b1e365..086a78637a 100644 --- a/core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.cpp +++ b/core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.cpp @@ -9,8 +9,8 @@ #include "core/fpdfapi/fpdf_cmaps/cmap_int.h" #include "core/fpdfapi/fpdf_font/font_int.h" #include "core/fpdfapi/include/cpdf_modulemgr.h" +#include "core/fxcrt/include/fx_basic.h" // For FX_ArraySize(). #include "core/include/fpdfapi/fpdf_resource.h" -#include "core/include/fxcrt/fx_basic.h" // For FX_ArraySize(). 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 cf29fe7c8e..95d231563e 100644 --- a/core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp +++ b/core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp @@ -9,8 +9,8 @@ #include "core/fpdfapi/fpdf_cmaps/cmap_int.h" #include "core/fpdfapi/fpdf_font/font_int.h" #include "core/fpdfapi/include/cpdf_modulemgr.h" +#include "core/fxcrt/include/fx_basic.h" // For FX_ArraySize(). #include "core/include/fpdfapi/fpdf_resource.h" -#include "core/include/fxcrt/fx_basic.h" // For FX_ArraySize(). 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 a2146230fe..8c43d41311 100644 --- a/core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.cpp +++ b/core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.cpp @@ -9,8 +9,8 @@ #include "core/fpdfapi/fpdf_cmaps/cmap_int.h" #include "core/fpdfapi/fpdf_font/font_int.h" #include "core/fpdfapi/include/cpdf_modulemgr.h" +#include "core/fxcrt/include/fx_basic.h" // For FX_ArraySize(). #include "core/include/fpdfapi/fpdf_resource.h" -#include "core/include/fxcrt/fx_basic.h" // For FX_ArraySize(). 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 d6932156e5..0001aaaf8d 100644 --- a/core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.cpp +++ b/core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.cpp @@ -9,8 +9,8 @@ #include "core/fpdfapi/fpdf_cmaps/cmap_int.h" #include "core/fpdfapi/fpdf_font/font_int.h" #include "core/fpdfapi/include/cpdf_modulemgr.h" +#include "core/fxcrt/include/fx_basic.h" // For FX_ArraySize(). #include "core/include/fpdfapi/fpdf_resource.h" -#include "core/include/fxcrt/fx_basic.h" // For FX_ArraySize(). 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 8dea4b4759..9b8db2154d 100644 --- a/core/fpdfapi/fpdf_cmaps/cmap_int.h +++ b/core/fpdfapi/fpdf_cmaps/cmap_int.h @@ -7,7 +7,7 @@ #ifndef CORE_FPDFAPI_FPDF_CMAPS_CMAP_INT_H_ #define CORE_FPDFAPI_FPDF_CMAPS_CMAP_INT_H_ -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" struct FXCMAP_CMap { enum MapType { None, Single, Range, Reverse }; diff --git a/core/fpdfapi/fpdf_edit/editint.h b/core/fpdfapi/fpdf_edit/editint.h index 2e4b0cc067..8a73f123a3 100644 --- a/core/fpdfapi/fpdf_edit/editint.h +++ b/core/fpdfapi/fpdf_edit/editint.h @@ -9,9 +9,9 @@ #include -#include "core/include/fxcrt/fx_basic.h" -#include "core/include/fxcrt/fx_stream.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/include/fx_stream.h" +#include "core/fxcrt/include/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 41bb99defc..f774d0119a 100644 --- a/core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp +++ b/core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp @@ -21,7 +21,7 @@ #include "core/fpdfapi/fpdf_parser/include/cpdf_string.h" #include "core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h" #include "core/fpdfapi/fpdf_parser/ipdf_crypto_handler.h" -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" #include "third_party/base/stl_util.h" #define PDF_OBJECTSTREAM_MAXLENGTH (256 * 1024) diff --git a/core/fpdfapi/fpdf_edit/include/cpdf_creator.h b/core/fpdfapi/fpdf_edit/include/cpdf_creator.h index 2132457c1c..0488266564 100644 --- a/core/fpdfapi/fpdf_edit/include/cpdf_creator.h +++ b/core/fpdfapi/fpdf_edit/include/cpdf_creator.h @@ -7,7 +7,7 @@ #ifndef CORE_FPDFAPI_FPDF_EDIT_INCLUDE_CPDF_CREATOR_H_ #define CORE_FPDFAPI_FPDF_EDIT_INCLUDE_CPDF_CREATOR_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CPDF_Array; class CPDF_Dictionary; diff --git a/core/fpdfapi/fpdf_edit/include/cpdf_pagecontentgenerator.h b/core/fpdfapi/fpdf_edit/include/cpdf_pagecontentgenerator.h index 8aea084798..53446c34e3 100644 --- a/core/fpdfapi/fpdf_edit/include/cpdf_pagecontentgenerator.h +++ b/core/fpdfapi/fpdf_edit/include/cpdf_pagecontentgenerator.h @@ -8,9 +8,9 @@ #define CORE_FPDFAPI_FPDF_EDIT_INCLUDE_CPDF_PAGECONTENTGENERATOR_H_ #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" -#include "core/include/fxcrt/fx_basic.h" -#include "core/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_system.h" class CPDF_Object; class CPDF_Page; diff --git a/core/fpdfapi/fpdf_font/font_int.h b/core/fpdfapi/fpdf_font/font_int.h index bb209d8c16..74380f1147 100644 --- a/core/fpdfapi/fpdf_font/font_int.h +++ b/core/fpdfapi/fpdf_font/font_int.h @@ -10,8 +10,8 @@ #include #include +#include "core/fxcrt/include/fx_basic.h" #include "core/include/fpdfapi/fpdf_resource.h" -#include "core/include/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 d079110679..8dc91616f9 100644 --- a/core/fpdfapi/fpdf_font/fpdf_font.cpp +++ b/core/fpdfapi/fpdf_font/fpdf_font.cpp @@ -15,8 +15,8 @@ #include "core/fpdfapi/fpdf_parser/include/cpdf_number.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_simple_parser.h" #include "core/fpdfapi/include/cpdf_modulemgr.h" +#include "core/fxcrt/include/fx_ext.h" #include "core/include/fpdfapi/fpdf_resource.h" -#include "core/include/fxcrt/fx_ext.h" #include "core/include/fxge/fx_freetype.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 b952cda4e5..c73043abfa 100644 --- a/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp +++ b/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp @@ -12,8 +12,8 @@ #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_simple_parser.h" #include "core/fpdfapi/include/cpdf_modulemgr.h" +#include "core/fxcrt/include/fx_ext.h" #include "core/include/fpdfapi/fpdf_resource.h" -#include "core/include/fxcrt/fx_ext.h" #include "core/include/fxge/fx_freetype.h" #include "core/include/fxge/fx_ge.h" diff --git a/core/fpdfapi/fpdf_font/ttgsubtable.h b/core/fpdfapi/fpdf_font/ttgsubtable.h index 47ae5a1fa4..e0bdcc75e2 100644 --- a/core/fpdfapi/fpdf_font/ttgsubtable.h +++ b/core/fpdfapi/fpdf_font/ttgsubtable.h @@ -11,7 +11,7 @@ #include -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "core/include/fxge/fx_font.h" #include "core/include/fxge/fx_freetype.h" diff --git a/core/fpdfapi/fpdf_page/cpdf_allstates.h b/core/fpdfapi/fpdf_page/cpdf_allstates.h index 700072f26c..9af917a113 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/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_system.h" class CPDF_Array; class CPDF_Dictionary; diff --git a/core/fpdfapi/fpdf_page/cpdf_colorstate.h b/core/fpdfapi/fpdf_page/cpdf_colorstate.h index 77a506e1b4..e7f3e37d35 100644 --- a/core/fpdfapi/fpdf_page/cpdf_colorstate.h +++ b/core/fpdfapi/fpdf_page/cpdf_colorstate.h @@ -8,8 +8,8 @@ #define CORE_FPDFAPI_FPDF_PAGE_CPDF_COLORSTATE_H_ #include "core/fpdfapi/fpdf_page/cpdf_colorstatedata.h" -#include "core/include/fxcrt/fx_basic.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/include/fx_system.h" class CPDF_Color; class CPDF_ColorSpace; diff --git a/core/fpdfapi/fpdf_page/cpdf_colorstatedata.h b/core/fpdfapi/fpdf_page/cpdf_colorstatedata.h index 304410b553..319fea51ae 100644 --- a/core/fpdfapi/fpdf_page/cpdf_colorstatedata.h +++ b/core/fpdfapi/fpdf_page/cpdf_colorstatedata.h @@ -7,8 +7,8 @@ #ifndef CORE_FPDFAPI_FPDF_PAGE_CPDF_COLORSTATEDATA_H_ #define CORE_FPDFAPI_FPDF_PAGE_CPDF_COLORSTATEDATA_H_ +#include "core/fxcrt/include/fx_system.h" #include "core/include/fpdfapi/fpdf_resource.h" -#include "core/include/fxcrt/fx_system.h" class CPDF_ColorStateData { public: diff --git a/core/fpdfapi/fpdf_page/cpdf_contentmark.h b/core/fpdfapi/fpdf_page/cpdf_contentmark.h index 35e4a9664b..056edc23a8 100644 --- a/core/fpdfapi/fpdf_page/cpdf_contentmark.h +++ b/core/fpdfapi/fpdf_page/cpdf_contentmark.h @@ -8,7 +8,7 @@ #define CORE_FPDFAPI_FPDF_PAGE_CPDF_CONTENTMARK_H_ #include "core/fpdfapi/fpdf_page/cpdf_contentmarkdata.h" -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CPDF_ContentMark : public CFX_CountRef { public: diff --git a/core/fpdfapi/fpdf_page/cpdf_contentmarkdata.h b/core/fpdfapi/fpdf_page/cpdf_contentmarkdata.h index 4cf859fda9..773fea741b 100644 --- a/core/fpdfapi/fpdf_page/cpdf_contentmarkdata.h +++ b/core/fpdfapi/fpdf_page/cpdf_contentmarkdata.h @@ -10,7 +10,7 @@ #include #include "core/fpdfapi/fpdf_page/cpdf_contentmarkitem.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 0a9ca1a04b..f46592d0a7 100644 --- a/core/fpdfapi/fpdf_page/cpdf_contentmarkitem.h +++ b/core/fpdfapi/fpdf_page/cpdf_contentmarkitem.h @@ -7,8 +7,8 @@ #ifndef CORE_FPDFAPI_FPDF_PAGE_CPDF_CONTENTMARKITEM_H_ #define CORE_FPDFAPI_FPDF_PAGE_CPDF_CONTENTMARKITEM_H_ -#include "core/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" class CPDF_Dictionary; diff --git a/core/fpdfapi/fpdf_page/cpdf_parseoptions.h b/core/fpdfapi/fpdf_page/cpdf_parseoptions.h index cd1bb69948..3d091ab7cf 100644 --- a/core/fpdfapi/fpdf_page/cpdf_parseoptions.h +++ b/core/fpdfapi/fpdf_page/cpdf_parseoptions.h @@ -7,7 +7,7 @@ #ifndef CORE_FPDFAPI_FPDF_PAGE_CPDF_PARSEOPTIONS_H_ #define CORE_FPDFAPI_FPDF_PAGE_CPDF_PARSEOPTIONS_H_ -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" class CPDF_ParseOptions { public: diff --git a/core/fpdfapi/fpdf_page/cpdf_textstate.h b/core/fpdfapi/fpdf_page/cpdf_textstate.h index 8530322aeb..cfb4b28a21 100644 --- a/core/fpdfapi/fpdf_page/cpdf_textstate.h +++ b/core/fpdfapi/fpdf_page/cpdf_textstate.h @@ -8,7 +8,7 @@ #define CORE_FPDFAPI_FPDF_PAGE_CPDF_TEXTSTATE_H_ #include "core/fpdfapi/fpdf_page/include/cpdf_textstatedata.h" -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CPDF_Font; diff --git a/core/fpdfapi/fpdf_page/fpdf_page_func.cpp b/core/fpdfapi/fpdf_page/fpdf_page_func.cpp index 4bf7c06a7b..cea7d6b8e7 100644 --- a/core/fpdfapi/fpdf_page/fpdf_page_func.cpp +++ b/core/fpdfapi/fpdf_page/fpdf_page_func.cpp @@ -15,7 +15,7 @@ #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_simple_parser.h" -#include "core/include/fxcrt/fx_safe_types.h" +#include "core/fxcrt/include/fx_safe_types.h" #include "third_party/base/numerics/safe_conversions_impl.h" namespace { diff --git a/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp b/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp index 87ed09735a..c0d7c08ee1 100644 --- a/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp +++ b/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp @@ -24,9 +24,9 @@ #include "core/fpdfapi/fpdf_parser/include/cpdf_string.h" #include "core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h" #include "core/fpdfapi/include/cpdf_modulemgr.h" +#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/include/fx_safe_types.h" #include "core/include/fxcodec/fx_codec.h" -#include "core/include/fxcrt/fx_ext.h" -#include "core/include/fxcrt/fx_safe_types.h" CPDF_StreamParser::CPDF_StreamParser(const uint8_t* pData, FX_DWORD dwSize) { m_pBuf = pData; diff --git a/core/fpdfapi/fpdf_page/include/cpdf_clippath.h b/core/fpdfapi/fpdf_page/include/cpdf_clippath.h index 4631e8266a..e265cd4ce0 100644 --- a/core/fpdfapi/fpdf_page/include/cpdf_clippath.h +++ b/core/fpdfapi/fpdf_page/include/cpdf_clippath.h @@ -9,9 +9,9 @@ #include "core/fpdfapi/fpdf_page/cpdf_clippathdata.h" #include "core/fpdfapi/fpdf_page/include/cpdf_path.h" -#include "core/include/fxcrt/fx_basic.h" -#include "core/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_system.h" class CPDF_TextObject; diff --git a/core/fpdfapi/fpdf_page/include/cpdf_formobject.h b/core/fpdfapi/fpdf_page/include/cpdf_formobject.h index 47d40e0e8b..234cd73328 100644 --- a/core/fpdfapi/fpdf_page/include/cpdf_formobject.h +++ b/core/fpdfapi/fpdf_page/include/cpdf_formobject.h @@ -8,7 +8,7 @@ #define CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_FORMOBJECT_H_ #include "core/fpdfapi/fpdf_page/include/cpdf_pageobject.h" -#include "core/include/fxcrt/fx_coordinates.h" +#include "core/fxcrt/include/fx_coordinates.h" class Form; diff --git a/core/fpdfapi/fpdf_page/include/cpdf_generalstate.h b/core/fpdfapi/fpdf_page/include/cpdf_generalstate.h index 3495b6c3ff..ab1e940089 100644 --- a/core/fpdfapi/fpdf_page/include/cpdf_generalstate.h +++ b/core/fpdfapi/fpdf_page/include/cpdf_generalstate.h @@ -8,7 +8,7 @@ #define CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_GENERALSTATE_H_ #include "core/fpdfapi/fpdf_page/include/cpdf_generalstatedata.h" -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CPDF_GeneralState : public CFX_CountRef { public: diff --git a/core/fpdfapi/fpdf_page/include/cpdf_generalstatedata.h b/core/fpdfapi/fpdf_page/include/cpdf_generalstatedata.h index f2e5510ccc..df7560289c 100644 --- a/core/fpdfapi/fpdf_page/include/cpdf_generalstatedata.h +++ b/core/fpdfapi/fpdf_page/include/cpdf_generalstatedata.h @@ -7,9 +7,9 @@ #ifndef CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_GENERALSTATEDATA_H_ #define CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_GENERALSTATEDATA_H_ -#include "core/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" #include "core/include/fxge/fx_dib.h" class CPDF_TransferFunc; diff --git a/core/fpdfapi/fpdf_page/include/cpdf_imageobject.h b/core/fpdfapi/fpdf_page/include/cpdf_imageobject.h index dec60c9d9b..9b983cc05c 100644 --- a/core/fpdfapi/fpdf_page/include/cpdf_imageobject.h +++ b/core/fpdfapi/fpdf_page/include/cpdf_imageobject.h @@ -8,7 +8,7 @@ #define CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_IMAGEOBJECT_H_ #include "core/fpdfapi/fpdf_page/include/cpdf_pageobject.h" -#include "core/include/fxcrt/fx_coordinates.h" +#include "core/fxcrt/include/fx_coordinates.h" class CPDF_Image; diff --git a/core/fpdfapi/fpdf_page/include/cpdf_page.h b/core/fpdfapi/fpdf_page/include/cpdf_page.h index 5e27ba2ec7..3ede3c9404 100644 --- a/core/fpdfapi/fpdf_page/include/cpdf_page.h +++ b/core/fpdfapi/fpdf_page/include/cpdf_page.h @@ -8,9 +8,9 @@ #define CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_PAGE_H_ #include "core/fpdfapi/fpdf_page/include/cpdf_pageobjectholder.h" -#include "core/include/fxcrt/fx_basic.h" -#include "core/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_system.h" class CPDF_Document; class CPDF_Dictionary; diff --git a/core/fpdfapi/fpdf_page/include/cpdf_pageobject.h b/core/fpdfapi/fpdf_page/include/cpdf_pageobject.h index 2f55547b47..8e7da81e90 100644 --- a/core/fpdfapi/fpdf_page/include/cpdf_pageobject.h +++ b/core/fpdfapi/fpdf_page/include/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/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_system.h" class CPDF_TextObject; class CPDF_PathObject; diff --git a/core/fpdfapi/fpdf_page/include/cpdf_pageobjectholder.h b/core/fpdfapi/fpdf_page/include/cpdf_pageobjectholder.h index b0ab376956..7ac9f2cea0 100644 --- a/core/fpdfapi/fpdf_page/include/cpdf_pageobjectholder.h +++ b/core/fpdfapi/fpdf_page/include/cpdf_pageobjectholder.h @@ -8,8 +8,8 @@ #define CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_PAGEOBJECTHOLDER_H_ #include "core/fpdfapi/fpdf_page/cpdf_pageobjectlist.h" -#include "core/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_system.h" class IFX_Pause; class CPDF_Dictionary; diff --git a/core/fpdfapi/fpdf_page/include/cpdf_path.h b/core/fpdfapi/fpdf_page/include/cpdf_path.h index a90115486a..f13b2719b9 100644 --- a/core/fpdfapi/fpdf_page/include/cpdf_path.h +++ b/core/fpdfapi/fpdf_page/include/cpdf_path.h @@ -7,7 +7,7 @@ #ifndef CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_PATH_H_ #define CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_PATH_H_ -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" #include "core/include/fxge/fx_ge.h" class CPDF_Path : public CFX_CountRef { diff --git a/core/fpdfapi/fpdf_page/include/cpdf_pathobject.h b/core/fpdfapi/fpdf_page/include/cpdf_pathobject.h index 30df0c2937..296cdf8317 100644 --- a/core/fpdfapi/fpdf_page/include/cpdf_pathobject.h +++ b/core/fpdfapi/fpdf_page/include/cpdf_pathobject.h @@ -9,8 +9,8 @@ #include "core/fpdfapi/fpdf_page/include/cpdf_pageobject.h" #include "core/fpdfapi/fpdf_page/include/cpdf_path.h" -#include "core/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_system.h" class CPDF_PathObject : public CPDF_PageObject { public: diff --git a/core/fpdfapi/fpdf_page/include/cpdf_shadingobject.h b/core/fpdfapi/fpdf_page/include/cpdf_shadingobject.h index f43a1e3a4f..ae2ee90083 100644 --- a/core/fpdfapi/fpdf_page/include/cpdf_shadingobject.h +++ b/core/fpdfapi/fpdf_page/include/cpdf_shadingobject.h @@ -8,7 +8,7 @@ #define CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_SHADINGOBJECT_H_ #include "core/fpdfapi/fpdf_page/include/cpdf_pageobject.h" -#include "core/include/fxcrt/fx_coordinates.h" +#include "core/fxcrt/include/fx_coordinates.h" class CPDF_ShadingPattern; diff --git a/core/fpdfapi/fpdf_page/include/cpdf_textobject.h b/core/fpdfapi/fpdf_page/include/cpdf_textobject.h index 9aaa2f0160..bb268c1446 100644 --- a/core/fpdfapi/fpdf_page/include/cpdf_textobject.h +++ b/core/fpdfapi/fpdf_page/include/cpdf_textobject.h @@ -8,8 +8,8 @@ #define CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_TEXTOBJECT_H_ #include "core/fpdfapi/fpdf_page/include/cpdf_pageobject.h" -#include "core/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" struct CPDF_TextObjectItem { FX_DWORD m_CharCode; diff --git a/core/fpdfapi/fpdf_page/include/cpdf_textstatedata.h b/core/fpdfapi/fpdf_page/include/cpdf_textstatedata.h index 1fcc1fe8c2..feed1a043f 100644 --- a/core/fpdfapi/fpdf_page/include/cpdf_textstatedata.h +++ b/core/fpdfapi/fpdf_page/include/cpdf_textstatedata.h @@ -7,7 +7,7 @@ #ifndef CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_TEXTSTATEDATA_H_ #define CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_TEXTSTATEDATA_H_ -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" class CPDF_Font; class CPDF_Document; diff --git a/core/fpdfapi/fpdf_parser/cpdf_boolean.h b/core/fpdfapi/fpdf_parser/cpdf_boolean.h index 9a35153a20..c92bf41b86 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/include/cpdf_object.h" -#include "core/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" class CPDF_Boolean : public CPDF_Object { public: diff --git a/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp b/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp index 1f7f70fa91..c5576ae8e2 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp +++ b/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp @@ -16,8 +16,8 @@ #include "core/fpdfapi/fpdf_parser/include/cpdf_reference.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_stream.h" #include "core/fpdfapi/include/cpdf_modulemgr.h" -#include "core/include/fxcrt/fx_ext.h" -#include "core/include/fxcrt/fx_safe_types.h" +#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/include/fx_safe_types.h" #include "third_party/base/stl_util.h" IPDF_DataAvail::IPDF_DataAvail(IPDF_DataAvail::FileAvail* pFileAvail, diff --git a/core/fpdfapi/fpdf_parser/cpdf_data_avail.h b/core/fpdfapi/fpdf_parser/cpdf_data_avail.h index c30093dd58..4c8d3719ff 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_data_avail.h +++ b/core/fpdfapi/fpdf_parser/cpdf_data_avail.h @@ -11,7 +11,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_parser.h" #include "core/fpdfapi/fpdf_parser/include/ipdf_data_avail.h" -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CPDF_Dictionary; class CPDF_IndirectObjectHolder; diff --git a/core/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp b/core/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp index 166c68d51a..0dd869210e 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp +++ b/core/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp @@ -11,7 +11,7 @@ #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_stream.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h" -#include "core/include/fxcrt/fx_safe_types.h" +#include "core/fxcrt/include/fx_safe_types.h" namespace { diff --git a/core/fpdfapi/fpdf_parser/cpdf_hint_tables.h b/core/fpdfapi/fpdf_parser/cpdf_hint_tables.h index 325f57611f..3271f5e1ec 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/include/ipdf_data_avail.h" -#include "core/include/fxcrt/fx_basic.h" -#include "core/include/fxcrt/fx_stream.h" +#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/include/fx_stream.h" class CFX_BitStream; class CPDF_DataAvail; diff --git a/core/fpdfapi/fpdf_parser/cpdf_object.cpp b/core/fpdfapi/fpdf_parser/cpdf_object.cpp index ad00cc113b..9a190a7308 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/include/cpdf_indirect_object_holder.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_parser.h" #include "core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h" -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_string.h" #include "third_party/base/stl_util.h" CPDF_Object::~CPDF_Object() {} diff --git a/core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp b/core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp index 529b6c4fd3..84ad7cfc32 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/include/cpdf_indirect_object_holder.h" -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/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 3ee53e6cf9..e9896d8099 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/include/cpdf_stream.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h" #include "core/fpdfapi/fpdf_parser/ipdf_crypto_handler.h" -#include "core/include/fxcrt/fx_ext.h" -#include "core/include/fxcrt/fx_safe_types.h" +#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/include/fx_safe_types.h" #include "third_party/base/stl_util.h" namespace { diff --git a/core/fpdfapi/fpdf_parser/cpdf_parser_unittest.cpp b/core/fpdfapi/fpdf_parser/cpdf_parser_unittest.cpp index dc4d757120..7a08511e81 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_syntax_parser.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_parser.h" -#include "core/include/fxcrt/fx_ext.h" -#include "core/include/fxcrt/fx_stream.h" +#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/include/fx_stream.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/utils/path_service.h" diff --git a/core/fpdfapi/fpdf_parser/cpdf_simple_parser_unittest.cpp b/core/fpdfapi/fpdf_parser/cpdf_simple_parser_unittest.cpp index cfb0b33279..67287dfd5a 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/test_support.h" diff --git a/core/fpdfapi/fpdf_parser/cpdf_standard_security_handler.h b/core/fpdfapi/fpdf_parser/cpdf_standard_security_handler.h index 7acaabcaef..8c1629c486 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_standard_security_handler.h +++ b/core/fpdfapi/fpdf_parser/cpdf_standard_security_handler.h @@ -8,8 +8,8 @@ #define CORE_FPDFAPI_FPDF_PARSER_CPDF_STANDARD_SECURITY_HANDLER_H_ #include "core/fpdfapi/fpdf_parser/ipdf_security_handler.h" -#include "core/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" class CPDF_Array; diff --git a/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp b/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp index 9e5cb9d38a..00e2ee6a13 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/include/fpdf_parser_decode.h" #include "core/fpdfapi/fpdf_parser/ipdf_crypto_handler.h" #include "core/fpdfapi/include/cpdf_modulemgr.h" -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/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 842b35f8f2..2e613d5cd9 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h +++ b/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h @@ -9,7 +9,7 @@ #include -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CPDF_Dictionary; class CPDF_IndirectObjectHolder; diff --git a/core/fpdfapi/fpdf_parser/cpdf_syntax_parser_unittest.cpp b/core/fpdfapi/fpdf_parser/cpdf_syntax_parser_unittest.cpp index 53a01e0224..bfb6ead563 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_syntax_parser.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_parser.h" -#include "core/include/fxcrt/fx_ext.h" -#include "core/include/fxcrt/fx_stream.h" +#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/include/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 75ff11c60c..e6f531da53 100644 --- a/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp +++ b/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp @@ -13,8 +13,8 @@ #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h" #include "core/fpdfapi/include/cpdf_modulemgr.h" +#include "core/fxcrt/include/fx_ext.h" #include "core/include/fxcodec/fx_codec.h" -#include "core/include/fxcrt/fx_ext.h" #include "third_party/base/stl_util.h" #define _STREAM_MAX_SIZE_ 20 * 1024 * 1024 diff --git a/core/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp b/core/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp index 9e8d3344c3..4fd26b9153 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/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 ffd4388dcc..a4cc85ae7d 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/include/cpdf_stream_acc.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_string.h" #include "core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h" -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/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 d0410eec98..d072fbc191 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/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" class IFX_FileRead; class CPDF_Dictionary; diff --git a/core/fpdfapi/fpdf_parser/include/cfdf_document.h b/core/fpdfapi/fpdf_parser/include/cfdf_document.h index bd68789a14..f01039cd4e 100644 --- a/core/fpdfapi/fpdf_parser/include/cfdf_document.h +++ b/core/fpdfapi/fpdf_parser/include/cfdf_document.h @@ -9,7 +9,7 @@ #include "core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_object.h" -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CPDF_Dictionary; diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_array.h b/core/fpdfapi/fpdf_parser/include/cpdf_array.h index a166454eba..2ee7760a77 100644 --- a/core/fpdfapi/fpdf_parser/include/cpdf_array.h +++ b/core/fpdfapi/fpdf_parser/include/cpdf_array.h @@ -9,8 +9,8 @@ #include "core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_object.h" -#include "core/include/fxcrt/fx_basic.h" -#include "core/include/fxcrt/fx_coordinates.h" +#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/include/fx_coordinates.h" class CPDF_Array : public CPDF_Object { public: diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h b/core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h index 896db62cc2..ebc5cee90a 100644 --- a/core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h +++ b/core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h @@ -10,8 +10,8 @@ #include #include "core/fpdfapi/fpdf_parser/include/cpdf_object.h" -#include "core/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_string.h" class CPDF_IndirectObjectHolder; diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_document.h b/core/fpdfapi/fpdf_parser/include/cpdf_document.h index 56e41b4328..02a55dd455 100644 --- a/core/fpdfapi/fpdf_parser/include/cpdf_document.h +++ b/core/fpdfapi/fpdf_parser/include/cpdf_document.h @@ -9,7 +9,7 @@ #include "core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_object.h" -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CFX_Font; class CFX_Matrix; diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h b/core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h index 9fa6770c90..373159d060 100644 --- a/core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h +++ b/core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h @@ -9,7 +9,7 @@ #include -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" class CPDF_Object; class CPDF_Parser; diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_number.h b/core/fpdfapi/fpdf_parser/include/cpdf_number.h index 89586352f6..7b93a992b1 100644 --- a/core/fpdfapi/fpdf_parser/include/cpdf_number.h +++ b/core/fpdfapi/fpdf_parser/include/cpdf_number.h @@ -8,8 +8,8 @@ #define CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_NUMBER_H_ #include "core/fpdfapi/fpdf_parser/include/cpdf_object.h" -#include "core/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" class CPDF_Number : public CPDF_Object { public: diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_object.h b/core/fpdfapi/fpdf_parser/include/cpdf_object.h index 9149510536..cc461d6218 100644 --- a/core/fpdfapi/fpdf_parser/include/cpdf_object.h +++ b/core/fpdfapi/fpdf_parser/include/cpdf_object.h @@ -7,8 +7,8 @@ #ifndef CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_OBJECT_H_ #define CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_OBJECT_H_ -#include "core/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" class CPDF_Array; class CPDF_Boolean; diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_parser.h b/core/fpdfapi/fpdf_parser/include/cpdf_parser.h index d5c5216b9c..933ab1c7fa 100644 --- a/core/fpdfapi/fpdf_parser/include/cpdf_parser.h +++ b/core/fpdfapi/fpdf_parser/include/cpdf_parser.h @@ -11,7 +11,7 @@ #include #include -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CPDF_Array; class CPDF_Dictionary; diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_simple_parser.h b/core/fpdfapi/fpdf_parser/include/cpdf_simple_parser.h index a2a39f10ea..0bd3b8daac 100644 --- a/core/fpdfapi/fpdf_parser/include/cpdf_simple_parser.h +++ b/core/fpdfapi/fpdf_parser/include/cpdf_simple_parser.h @@ -7,8 +7,8 @@ #ifndef CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_SIMPLE_PARSER_H_ #define CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_SIMPLE_PARSER_H_ -#include "core/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" class CPDF_SimpleParser { public: diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_stream.h b/core/fpdfapi/fpdf_parser/include/cpdf_stream.h index 43853839a1..20045d7aa2 100644 --- a/core/fpdfapi/fpdf_parser/include/cpdf_stream.h +++ b/core/fpdfapi/fpdf_parser/include/cpdf_stream.h @@ -9,7 +9,7 @@ #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_object.h" -#include "core/include/fxcrt/fx_stream.h" +#include "core/fxcrt/include/fx_stream.h" class CPDF_Stream : public CPDF_Object { public: diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h b/core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h index 6920579c8e..8fad265a75 100644 --- a/core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h +++ b/core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h @@ -9,8 +9,8 @@ #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_stream.h" -#include "core/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" class CPDF_StreamAcc { public: diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_string.h b/core/fpdfapi/fpdf_parser/include/cpdf_string.h index 088fe6e28d..77e41ecd6a 100644 --- a/core/fpdfapi/fpdf_parser/include/cpdf_string.h +++ b/core/fpdfapi/fpdf_parser/include/cpdf_string.h @@ -8,8 +8,8 @@ #define CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_STRING_H_ #include "core/fpdfapi/fpdf_parser/include/cpdf_object.h" -#include "core/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" class CPDF_String : public CPDF_Object { public: diff --git a/core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h b/core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h index 6904099b52..4a1d66cabb 100644 --- a/core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h +++ b/core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h @@ -7,7 +7,7 @@ #ifndef CORE_FPDFAPI_FPDF_PARSER_INCLUDE_FPDF_PARSER_DECODE_H_ #define CORE_FPDFAPI_FPDF_PARSER_INCLUDE_FPDF_PARSER_DECODE_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CPDF_Dictionary; diff --git a/core/fpdfapi/fpdf_parser/include/ipdf_data_avail.h b/core/fpdfapi/fpdf_parser/include/ipdf_data_avail.h index 90d137c34a..d92c06d0cd 100644 --- a/core/fpdfapi/fpdf_parser/include/ipdf_data_avail.h +++ b/core/fpdfapi/fpdf_parser/include/ipdf_data_avail.h @@ -7,8 +7,8 @@ #ifndef CORE_FPDFAPI_FPDF_PARSER_INCLUDE_IPDF_DATA_AVAIL_H_ #define CORE_FPDFAPI_FPDF_PARSER_INCLUDE_IPDF_DATA_AVAIL_H_ -#include "core/include/fxcrt/fx_stream.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_stream.h" +#include "core/fxcrt/include/fx_system.h" class CPDF_Document; class CPDF_Object; diff --git a/core/fpdfapi/fpdf_parser/ipdf_crypto_handler.h b/core/fpdfapi/fpdf_parser/ipdf_crypto_handler.h index a1000760f3..8e83589a16 100644 --- a/core/fpdfapi/fpdf_parser/ipdf_crypto_handler.h +++ b/core/fpdfapi/fpdf_parser/ipdf_crypto_handler.h @@ -7,7 +7,7 @@ #ifndef CORE_FPDFAPI_FPDF_PARSER_IPDF_CRYPTO_HANDLER_H_ #define CORE_FPDFAPI_FPDF_PARSER_IPDF_CRYPTO_HANDLER_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CPDF_Dictionary; class IPDF_SecurityHandler; diff --git a/core/fpdfapi/fpdf_parser/ipdf_occontext.h b/core/fpdfapi/fpdf_parser/ipdf_occontext.h index 6c410037e2..0108787342 100644 --- a/core/fpdfapi/fpdf_parser/ipdf_occontext.h +++ b/core/fpdfapi/fpdf_parser/ipdf_occontext.h @@ -7,7 +7,7 @@ #ifndef CORE_FPDFAPI_FPDF_PARSER_IPDF_OCCONTEXT_H_ #define CORE_FPDFAPI_FPDF_PARSER_IPDF_OCCONTEXT_H_ -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" class CPDF_Dictionary; class CPDF_PageObject; diff --git a/core/fpdfapi/fpdf_parser/ipdf_security_handler.h b/core/fpdfapi/fpdf_parser/ipdf_security_handler.h index c73c4c5081..fd70b1fac6 100644 --- a/core/fpdfapi/fpdf_parser/ipdf_security_handler.h +++ b/core/fpdfapi/fpdf_parser/ipdf_security_handler.h @@ -7,7 +7,7 @@ #ifndef CORE_FPDFAPI_FPDF_PARSER_IPDF_SECURITY_HANDLER_H_ #define CORE_FPDFAPI_FPDF_PARSER_IPDF_SECURITY_HANDLER_H_ -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" class CPDF_Parser; class CPDF_Dictionary; diff --git a/core/fpdfapi/fpdf_render/cpdf_pagerendercache.h b/core/fpdfapi/fpdf_render/cpdf_pagerendercache.h index 26d71efcab..578700c30d 100644 --- a/core/fpdfapi/fpdf_render/cpdf_pagerendercache.h +++ b/core/fpdfapi/fpdf_render/cpdf_pagerendercache.h @@ -9,7 +9,7 @@ #include -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" class CPDF_Stream; class CPDF_ImageCacheEntry; diff --git a/core/fpdfapi/fpdf_render/fpdf_render_image.cpp b/core/fpdfapi/fpdf_render/fpdf_render_image.cpp index e16016445e..bda2a4469f 100644 --- a/core/fpdfapi/fpdf_render/fpdf_render_image.cpp +++ b/core/fpdfapi/fpdf_render/fpdf_render_image.cpp @@ -21,8 +21,8 @@ #include "core/fpdfapi/fpdf_render/cpdf_pagerendercache.h" #include "core/fpdfapi/fpdf_render/include/cpdf_rendercontext.h" #include "core/fpdfapi/fpdf_render/include/cpdf_renderoptions.h" +#include "core/fxcrt/include/fx_safe_types.h" #include "core/include/fxcodec/fx_codec.h" -#include "core/include/fxcrt/fx_safe_types.h" #include "core/include/fxge/fx_ge.h" FX_BOOL CPDF_RenderStatus::ProcessImage(const CPDF_ImageObject* pImageObj, diff --git a/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp index 193d0874f1..5c4f7f593c 100644 --- a/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp +++ b/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp @@ -18,8 +18,8 @@ #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" #include "core/fpdfapi/fpdf_render/cpdf_pagerendercache.h" #include "core/fpdfapi/include/cpdf_modulemgr.h" +#include "core/fxcrt/include/fx_safe_types.h" #include "core/include/fxcodec/fx_codec.h" -#include "core/include/fxcrt/fx_safe_types.h" #include "core/include/fxge/fx_ge.h" namespace { diff --git a/core/fpdfapi/fpdf_render/include/cpdf_progressiverenderer.h b/core/fpdfapi/fpdf_render/include/cpdf_progressiverenderer.h index e5c0d9d6d8..11ece71406 100644 --- a/core/fpdfapi/fpdf_render/include/cpdf_progressiverenderer.h +++ b/core/fpdfapi/fpdf_render/include/cpdf_progressiverenderer.h @@ -11,8 +11,8 @@ #include "core/fpdfapi/fpdf_page/cpdf_pageobjectlist.h" #include "core/fpdfapi/fpdf_render/include/cpdf_rendercontext.h" -#include "core/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_system.h" class CPDF_RenderOptions; class CPDF_RenderStatus; diff --git a/core/fpdfapi/fpdf_render/include/cpdf_rendercontext.h b/core/fpdfapi/fpdf_render/include/cpdf_rendercontext.h index 4c55658163..b2566ad007 100644 --- a/core/fpdfapi/fpdf_render/include/cpdf_rendercontext.h +++ b/core/fpdfapi/fpdf_render/include/cpdf_rendercontext.h @@ -7,8 +7,8 @@ #ifndef CORE_FPDFAPI_FPDF_RENDER_INCLUDE_CPDF_RENDERCONTEXT_H_ #define CORE_FPDFAPI_FPDF_RENDER_INCLUDE_CPDF_RENDERCONTEXT_H_ -#include "core/include/fxcrt/fx_basic.h" -#include "core/include/fxcrt/fx_coordinates.h" +#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/include/fx_coordinates.h" class CPDF_Dictionary; class CPDF_Document; diff --git a/core/fpdfapi/fpdf_render/include/cpdf_renderoptions.h b/core/fpdfapi/fpdf_render/include/cpdf_renderoptions.h index c0911e7cd2..f28fae4f3d 100644 --- a/core/fpdfapi/fpdf_render/include/cpdf_renderoptions.h +++ b/core/fpdfapi/fpdf_render/include/cpdf_renderoptions.h @@ -7,7 +7,7 @@ #ifndef CORE_FPDFAPI_FPDF_RENDER_INCLUDE_CPDF_RENDEROPTIONS_H_ #define CORE_FPDFAPI_FPDF_RENDER_INCLUDE_CPDF_RENDEROPTIONS_H_ -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" #include "core/include/fxge/fx_dib.h" class IPDF_OCContext; diff --git a/core/fpdfapi/fpdf_render/include/cpdf_textrenderer.h b/core/fpdfapi/fpdf_render/include/cpdf_textrenderer.h index 1cf67cd2f2..7c04e4a705 100644 --- a/core/fpdfapi/fpdf_render/include/cpdf_textrenderer.h +++ b/core/fpdfapi/fpdf_render/include/cpdf_textrenderer.h @@ -7,9 +7,9 @@ #ifndef CORE_FPDFAPI_FPDF_RENDER_INCLUDE_CPDF_TEXTRENDERER_H_ #define CORE_FPDFAPI_FPDF_RENDER_INCLUDE_CPDF_TEXTRENDERER_H_ -#include "core/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" #include "core/include/fxge/fx_dib.h" class CFX_RenderDevice; diff --git a/core/fpdfapi/include/cpdf_modulemgr.h b/core/fpdfapi/include/cpdf_modulemgr.h index 5449b082c6..a8be5af7dd 100644 --- a/core/fpdfapi/include/cpdf_modulemgr.h +++ b/core/fpdfapi/include/cpdf_modulemgr.h @@ -10,7 +10,7 @@ #include #include "core/fpdfapi/ipdf_pagemodule.h" -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CCodec_ModuleMgr; class ICodec_FaxModule; diff --git a/core/fpdfdoc/doc_metadata.cpp b/core/fpdfdoc/doc_metadata.cpp index 5526b8d5ab..c466193055 100644 --- a/core/fpdfdoc/doc_metadata.cpp +++ b/core/fpdfdoc/doc_metadata.cpp @@ -7,8 +7,8 @@ #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_stream.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h" +#include "core/fxcrt/include/fx_xml.h" #include "core/include/fpdfdoc/fpdf_doc.h" -#include "core/include/fxcrt/fx_xml.h" CPDF_Metadata::CPDF_Metadata(CPDF_Document* pDoc) { CPDF_Dictionary* pRoot = pDoc->GetRoot(); diff --git a/core/fpdftext/fpdf_text_int.cpp b/core/fpdftext/fpdf_text_int.cpp index b6843bae9a..2e267fd05d 100644 --- a/core/fpdftext/fpdf_text_int.cpp +++ b/core/fpdftext/fpdf_text_int.cpp @@ -22,10 +22,10 @@ #include "core/fpdftext/include/ipdf_textpage.h" #include "core/fpdftext/include/ipdf_textpagefind.h" #include "core/fpdftext/unicodenormalization.h" +#include "core/fxcrt/fx_bidi.h" +#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/include/fx_ucd.h" #include "core/include/fpdfapi/fpdf_resource.h" -#include "core/include/fxcrt/fx_bidi.h" -#include "core/include/fxcrt/fx_ext.h" -#include "core/include/fxcrt/fx_ucd.h" #include "third_party/base/stl_util.h" #define FPDFTEXT_RLTB 1 diff --git a/core/fpdftext/fpdf_text_int.h b/core/fpdftext/fpdf_text_int.h index be6b0bf241..a4274d7aed 100644 --- a/core/fpdftext/fpdf_text_int.h +++ b/core/fpdftext/fpdf_text_int.h @@ -16,7 +16,7 @@ #include "core/fpdftext/include/ipdf_linkextract.h" #include "core/fpdftext/include/ipdf_textpage.h" #include "core/fpdftext/include/ipdf_textpagefind.h" -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CFX_BidiChar; class CPDF_FormObject; diff --git a/core/fpdftext/include/ipdf_linkextract.h b/core/fpdftext/include/ipdf_linkextract.h index 2d7fe02127..c1a5f2f04e 100644 --- a/core/fpdftext/include/ipdf_linkextract.h +++ b/core/fpdftext/include/ipdf_linkextract.h @@ -7,9 +7,9 @@ #ifndef CORE_FPDFTEXT_INCLUDE_IPDF_LINKEXTRACT_H_ #define CORE_FPDFTEXT_INCLUDE_IPDF_LINKEXTRACT_H_ -#include "core/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_system.h" #include "core/fpdftext/include/ipdf_textpage.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_system.h" class IPDF_LinkExtract { public: diff --git a/core/fpdftext/include/ipdf_textpage.h b/core/fpdftext/include/ipdf_textpage.h index ad3bea8062..3849cd4004 100644 --- a/core/fpdftext/include/ipdf_textpage.h +++ b/core/fpdftext/include/ipdf_textpage.h @@ -7,8 +7,8 @@ #ifndef CORE_FPDFTEXT_INCLUDE_IPDF_TEXTPAGE_H_ #define CORE_FPDFTEXT_INCLUDE_IPDF_TEXTPAGE_H_ -#include "core/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_system.h" class CPDF_TextObject; class CPDF_Page; diff --git a/core/fpdftext/include/ipdf_textpagefind.h b/core/fpdftext/include/ipdf_textpagefind.h index 88774b6061..b13432b59b 100644 --- a/core/fpdftext/include/ipdf_textpagefind.h +++ b/core/fpdftext/include/ipdf_textpagefind.h @@ -8,8 +8,8 @@ #define CORE_FPDFTEXT_INCLUDE_IPDF_TEXTPAGEFIND_H_ #include "core/fpdftext/include/ipdf_textpage.h" -#include "core/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_string.h" class IPDF_TextPageFind { public: diff --git a/core/fpdftext/unicodenormalization.cpp b/core/fpdftext/unicodenormalization.cpp index dd563e5ee3..67ab57cb5d 100644 --- a/core/fpdftext/unicodenormalization.cpp +++ b/core/fpdftext/unicodenormalization.cpp @@ -7,7 +7,7 @@ #include "core/fpdftext/unicodenormalization.h" #include "core/fpdftext/unicodenormalizationdata.h" -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_string.h" namespace { diff --git a/core/fpdftext/unicodenormalization.h b/core/fpdftext/unicodenormalization.h index d9beafbd41..ee3c8b2024 100644 --- a/core/fpdftext/unicodenormalization.h +++ b/core/fpdftext/unicodenormalization.h @@ -7,7 +7,7 @@ #ifndef CORE_FPDFTEXT_UNICODENORMALIZATION_H_ #define CORE_FPDFTEXT_UNICODENORMALIZATION_H_ -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_WCHAR* pDst); diff --git a/core/fpdftext/unicodenormalizationdata.cpp b/core/fpdftext/unicodenormalizationdata.cpp index b22625cf9e..e124bf4540 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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/fx_codec.cpp b/core/fxcodec/codec/fx_codec.cpp index f1298f9fb3..92dba69acf 100644 --- a/core/fxcodec/codec/fx_codec.cpp +++ b/core/fxcodec/codec/fx_codec.cpp @@ -10,8 +10,8 @@ #include #include "core/fxcodec/codec/codec_int.h" -#include "core/include/fxcrt/fx_ext.h" -#include "core/include/fxcrt/fx_safe_types.h" +#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/include/fx_safe_types.h" #include "third_party/base/logging.h" CCodec_ModuleMgr::CCodec_ModuleMgr() diff --git a/core/fxcodec/codec/fx_codec_jpeg.cpp b/core/fxcodec/codec/fx_codec_jpeg.cpp index efbeb790e3..1b0dff7499 100644 --- a/core/fxcodec/codec/fx_codec_jpeg.cpp +++ b/core/fxcodec/codec/fx_codec_jpeg.cpp @@ -7,8 +7,8 @@ #include #include "core/fxcodec/codec/codec_int.h" +#include "core/fxcrt/include/fx_safe_types.h" #include "core/include/fxcodec/fx_codec.h" -#include "core/include/fxcrt/fx_safe_types.h" #include "core/include/fxge/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 a57b93df22..607f082823 100644 --- a/core/fxcodec/codec/fx_codec_jpx_opj.cpp +++ b/core/fxcodec/codec/fx_codec_jpx_opj.cpp @@ -9,9 +9,9 @@ #include #include "core/fxcodec/codec/codec_int.h" +#include "core/fxcrt/include/fx_safe_types.h" #include "core/include/fpdfapi/fpdf_resource.h" #include "core/include/fxcodec/fx_codec.h" -#include "core/include/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/codec/fx_codec_progress.h b/core/fxcodec/codec/fx_codec_progress.h index c9ee389e02..e4335ccf47 100644 --- a/core/fxcodec/codec/fx_codec_progress.h +++ b/core/fxcodec/codec/fx_codec_progress.h @@ -7,9 +7,9 @@ #ifndef CORE_FXCODEC_CODEC_FX_CODEC_PROGRESS_H_ #define CORE_FXCODEC_CODEC_FX_CODEC_PROGRESS_H_ +#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/include/fx_system.h" #include "core/include/fxcodec/fx_codec.h" -#include "core/include/fxcrt/fx_memory.h" -#include "core/include/fxcrt/fx_system.h" #include "core/include/fxge/fx_dib.h" #define FXCODEC_BLOCK_SIZE 4096 diff --git a/core/fxcodec/jbig2/JBig2_ArithDecoder.cpp b/core/fxcodec/jbig2/JBig2_ArithDecoder.cpp index 1673110c7e..f6981a10af 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" namespace { diff --git a/core/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp b/core/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp index 63594672c7..720b96ec36 100644 --- a/core/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp +++ b/core/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp @@ -8,7 +8,7 @@ #include -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" namespace { diff --git a/core/fxcodec/jbig2/JBig2_ArithIntDecoder.h b/core/fxcodec/jbig2/JBig2_ArithIntDecoder.h index 9a04504ca7..50327cc151 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" class CJBig2_ArithIntDecoder { public: diff --git a/core/fxcodec/jbig2/JBig2_BitStream.h b/core/fxcodec/jbig2/JBig2_BitStream.h index 37b18b53a3..45eb44c46a 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CPDF_StreamAcc; diff --git a/core/fxcodec/jbig2/JBig2_Define.h b/core/fxcodec/jbig2/JBig2_Define.h index 5149c19ef2..d12302b360 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 9d7f8b0221..2a638aa8d6 100644 --- a/core/fxcodec/jbig2/JBig2_GrdProc.h +++ b/core/fxcodec/jbig2/JBig2_GrdProc.h @@ -7,9 +7,9 @@ #ifndef CORE_FXCODEC_JBIG2_JBIG2_GRDPROC_H_ #define CORE_FXCODEC_JBIG2_JBIG2_GRDPROC_H_ +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_system.h" #include "core/include/fxcodec/fx_codec_def.h" -#include "core/include/fxcrt/fx_coordinates.h" -#include "core/include/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 36cfdcae3c..2c6d02d271 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 f1a566a5db..2ac96fc9d8 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" FX_DWORD* 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 50c24eaa60..8124db54d2 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 daee067d74..a9f15343d2 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/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 7766ce6d46..62ae57d9c9 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 f4a838eb24..7b1855113d 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/include/fxcrt/fx_memory.h" +#include "core/fxcrt/include/fx_memory.h" CJBig2_HuffmanTable::CJBig2_HuffmanTable(const JBig2TableLine* pTable, FX_DWORD nLines, diff --git a/core/fxcodec/jbig2/JBig2_HuffmanTable.h b/core/fxcodec/jbig2/JBig2_HuffmanTable.h index 892c19e9d6..7a31cf60dd 100644 --- a/core/fxcodec/jbig2/JBig2_HuffmanTable.h +++ b/core/fxcodec/jbig2/JBig2_HuffmanTable.h @@ -9,7 +9,7 @@ #include -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 8187534d4e..97d325ba31 100644 --- a/core/fxcodec/jbig2/JBig2_HuffmanTable_Standard.cpp +++ b/core/fxcodec/jbig2/JBig2_HuffmanTable_Standard.cpp @@ -4,8 +4,8 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/include/fxcrt/fx_basic.h" #include "core/fxcodec/jbig2/JBig2_HuffmanTable_Standard.h" +#include "core/fxcrt/include/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 31b8197d66..4fb2d1e07e 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 dddc1d29d0..bb3674000f 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/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_safe_types.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_safe_types.h" CJBig2_Image::CJBig2_Image(int32_t w, int32_t h) { m_nWidth = w; diff --git a/core/fxcodec/jbig2/JBig2_Page.h b/core/fxcodec/jbig2/JBig2_Page.h index 81800ba2d4..6a33549145 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" struct JBig2PageInfo { FX_DWORD m_dwWidth; diff --git a/core/fxcodec/jbig2/JBig2_PatternDict.cpp b/core/fxcodec/jbig2/JBig2_PatternDict.cpp index 58157ef13a..3db672e86b 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/include/fxcrt/fx_memory.h" +#include "core/fxcrt/include/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 25f941235f..ce0089ac14 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 cd6471d2ee..54c0bb9dd6 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/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 fa1211b4b4..edfc37263b 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 a6bac36141..64df0db5f7 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/include/fxcrt/fx_memory.h" +#include "core/fxcrt/include/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 9fe3d54a0c..c1f8e5a9cd 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/include/fxcrt/fx_memory.h" +#include "core/fxcrt/include/fx_memory.h" CJBig2_SymbolDict::CJBig2_SymbolDict() {} diff --git a/core/fxcodec/jbig2/JBig2_SymbolDict.h b/core/fxcodec/jbig2/JBig2_SymbolDict.h index 64ab881596..b880d6bff3 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CJBig2_Image; diff --git a/core/fxcodec/jbig2/JBig2_TrdProc.h b/core/fxcodec/jbig2/JBig2_TrdProc.h index 090e564726..d73e012296 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 1c269c6507..c0baf8693a 100644 --- a/core/fxcodec/lbmp/fx_bmp.h +++ b/core/fxcodec/lbmp/fx_bmp.h @@ -9,7 +9,7 @@ #include -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/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 ad65d199b6..5ed9ce1fe2 100644 --- a/core/fxcodec/lgif/fx_gif.h +++ b/core/fxcodec/lgif/fx_gif.h @@ -9,7 +9,7 @@ #include -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #define GIF_SIGNATURE "GIF" #define GIF_SIG_EXTENSION 0x21 diff --git a/core/fxcrt/extension.h b/core/fxcrt/extension.h index dbbc889fd0..1789de33aa 100644 --- a/core/fxcrt/extension.h +++ b/core/fxcrt/extension.h @@ -9,8 +9,8 @@ #include -#include "core/include/fxcrt/fx_basic.h" -#include "core/include/fxcrt/fx_safe_types.h" +#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/include/fx_safe_types.h" class IFXCRT_FileAccess { public: diff --git a/core/fxcrt/fx_arabic.cpp b/core/fxcrt/fx_arabic.cpp index f28b916c59..10113c9d5e 100644 --- a/core/fxcrt/fx_arabic.cpp +++ b/core/fxcrt/fx_arabic.cpp @@ -5,7 +5,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "core/fxcrt/fx_arabic.h" -#include "core/include/fxcrt/fx_ucd.h" +#include "core/fxcrt/include/fx_ucd.h" namespace { diff --git a/core/fxcrt/fx_arabic.h b/core/fxcrt/fx_arabic.h index f785e21a91..694bc51020 100644 --- a/core/fxcrt/fx_arabic.h +++ b/core/fxcrt/fx_arabic.h @@ -7,7 +7,7 @@ #ifndef CORE_FXCRT_FX_ARABIC_H_ #define CORE_FXCRT_FX_ARABIC_H_ -#include "core/include/fxcrt/fx_arb.h" +#include "core/fxcrt/include/fx_arb.h" class CFX_ArabicChar : public IFX_ArabicChar { public: diff --git a/core/fxcrt/fx_basic_array.cpp b/core/fxcrt/fx_basic_array.cpp index 18e2bd26d2..74988f7747 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/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 5d38d57757..191694e415 100644 --- a/core/fxcrt/fx_basic_bstring.cpp +++ b/core/fxcrt/fx_basic_bstring.cpp @@ -8,7 +8,7 @@ #include -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "third_party/base/numerics/safe_math.h" static int _Buffer_itoa(char* buf, int i, FX_DWORD flags) { diff --git a/core/fxcrt/fx_basic_bstring_unittest.cpp b/core/fxcrt/fx_basic_bstring_unittest.cpp index 337775d9af..834a6e444d 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/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/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 a3039f4188..aa899b6c17 100644 --- a/core/fxcrt/fx_basic_buffer.cpp +++ b/core/fxcrt/fx_basic_buffer.cpp @@ -7,8 +7,8 @@ #include #include -#include "core/include/fxcrt/fx_basic.h" -#include "core/include/fxcrt/fx_safe_types.h" +#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/include/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 4f723ef919..4625bfd666 100644 --- a/core/fxcrt/fx_basic_coords.cpp +++ b/core/fxcrt/fx_basic_coords.cpp @@ -6,8 +6,8 @@ #include -#include "core/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/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 2c9c54c8b6..440f924795 100644 --- a/core/fxcrt/fx_basic_gcc.cpp +++ b/core/fxcrt/fx_basic_gcc.cpp @@ -8,8 +8,8 @@ #include #include -#include "core/include/fxcrt/fx_ext.h" -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/include/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 eb1e0669ae..1eac9e301a 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 e893773aad..02afd47112 100644 --- a/core/fxcrt/fx_basic_list.cpp +++ b/core/fxcrt/fx_basic_list.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/plex.h" -#include "core/include/fxcrt/fx_basic.h" CFX_PtrList::CFX_PtrList(int nBlockSize) : m_pNodeHead(NULL), diff --git a/core/fxcrt/fx_basic_maps.cpp b/core/fxcrt/fx_basic_maps.cpp index bad1868286..935c998deb 100644 --- a/core/fxcrt/fx_basic_maps.cpp +++ b/core/fxcrt/fx_basic_maps.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/plex.h" -#include "core/include/fxcrt/fx_basic.h" CFX_MapPtrToPtr::CFX_MapPtrToPtr(int nBlockSize) : m_pHashTable(NULL), diff --git a/core/fxcrt/fx_basic_memmgr.cpp b/core/fxcrt/fx_basic_memmgr.cpp index 1cbd293006..94d978c879 100644 --- a/core/fxcrt/fx_basic_memmgr.cpp +++ b/core/fxcrt/fx_basic_memmgr.cpp @@ -6,7 +6,7 @@ #include // For abort(). -#include "core/include/fxcrt/fx_memory.h" +#include "core/fxcrt/include/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 9821ca9057..f69b1325dc 100644 --- a/core/fxcrt/fx_basic_memmgr_unittest.cpp +++ b/core/fxcrt/fx_basic_memmgr_unittest.cpp @@ -4,7 +4,7 @@ #include -#include "core/include/fxcrt/fx_memory.h" +#include "core/fxcrt/include/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 1cddbc32a0..805f059063 100644 --- a/core/fxcrt/fx_basic_plex.cpp +++ b/core/fxcrt/fx_basic_plex.cpp @@ -4,8 +4,8 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include "core/fxcrt/include/fx_memory.h" #include "core/fxcrt/plex.h" -#include "core/include/fxcrt/fx_memory.h" CFX_Plex* CFX_Plex::Create(CFX_Plex*& pHead, FX_DWORD nMax, diff --git a/core/fxcrt/fx_basic_utf.cpp b/core/fxcrt/fx_basic_utf.cpp index 3625feb130..08b9ca6ba6 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/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 2422212d59..3791862066 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/include/fxcrt/fx_basic.h" -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/include/fx_ext.h" #include diff --git a/core/fxcrt/fx_basic_wstring.cpp b/core/fxcrt/fx_basic_wstring.cpp index 89e3f8b1fd..aa62b5e356 100644 --- a/core/fxcrt/fx_basic_wstring.cpp +++ b/core/fxcrt/fx_basic_wstring.cpp @@ -9,8 +9,8 @@ #include #include -#include "core/include/fxcrt/fx_basic.h" -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/include/fx_ext.h" #include "third_party/base/numerics/safe_math.h" namespace { diff --git a/core/fxcrt/fx_basic_wstring_unittest.cpp b/core/fxcrt/fx_basic_wstring_unittest.cpp index 64d694c436..a64d7a91e9 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/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 a7a3ecb295..30b1a6df07 100644 --- a/core/fxcrt/fx_bidi.cpp +++ b/core/fxcrt/fx_bidi.cpp @@ -4,8 +4,8 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/include/fxcrt/fx_bidi.h" -#include "core/include/fxcrt/fx_ucd.h" +#include "core/fxcrt/fx_bidi.h" +#include "core/fxcrt/include/fx_ucd.h" #include diff --git a/core/fxcrt/fx_bidi.h b/core/fxcrt/fx_bidi.h new file mode 100644 index 0000000000..309c6f518d --- /dev/null +++ b/core/fxcrt/fx_bidi.h @@ -0,0 +1,73 @@ +// 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_BIDI_H_ +#define CORE_FXCRT_FX_BIDI_H_ + +#include +#include + +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" + +// Processes characters and group them into segments based on text direction. +class CFX_BidiChar { + public: + enum Direction { NEUTRAL, LEFT, RIGHT }; + struct Segment { + int32_t start; // Start position. + int32_t count; // Character count. + Direction direction; // Segment direction. + }; + + CFX_BidiChar(); + + // Append a character and classify it as left, right, or neutral. + // Returns true if the character has a different direction than the + // existing direction to indicate there is a segment to process. + bool AppendChar(FX_WCHAR wch); + + // Call this after the last character has been appended. AppendChar() + // must not be called after this. + // Returns true if there is still a segment to process. + bool EndChar(); + + // Call after a change in direction is indicated by the above to get + // information about the segment to process. + Segment GetSegmentInfo() const { return m_LastSegment; } + + private: + void StartNewSegment(CFX_BidiChar::Direction direction); + + Segment m_CurrentSegment; + Segment m_LastSegment; +}; + +class CFX_BidiString { + public: + using const_iterator = std::vector::const_iterator; + explicit CFX_BidiString(const CFX_WideString& str); + + // Overall direction is always LEFT or RIGHT, never NEUTRAL. + CFX_BidiChar::Direction OverallDirection() const { + return m_eOverallDirection; + } + + // Force the overall direction to be R2L regardless of what was detected. + void SetOverallDirectionRight(); + + FX_WCHAR CharAt(size_t x) const { return m_Str[x]; } + const_iterator begin() const { return m_Order.begin(); } + const_iterator end() const { return m_Order.end(); } + + private: + const CFX_WideString m_Str; + std::unique_ptr m_pBidiChar; + std::vector m_Order; + CFX_BidiChar::Direction m_eOverallDirection; +}; + +#endif // CORE_FXCRT_FX_BIDI_H_ diff --git a/core/fxcrt/fx_bidi_unittest.cpp b/core/fxcrt/fx_bidi_unittest.cpp index a3c148702b..2c1996be46 100644 --- a/core/fxcrt/fx_bidi_unittest.cpp +++ b/core/fxcrt/fx_bidi_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/include/fxcrt/fx_bidi.h" +#include "core/fxcrt/fx_bidi.h" #include "testing/gtest/include/gtest/gtest.h" namespace { diff --git a/core/fxcrt/fx_extension.cpp b/core/fxcrt/fx_extension.cpp index ef284a2357..99190859b8 100644 --- a/core/fxcrt/fx_extension.cpp +++ b/core/fxcrt/fx_extension.cpp @@ -5,8 +5,8 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "core/fxcrt/extension.h" -#include "core/include/fxcrt/fx_basic.h" -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/include/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 e2ae870f93..7714999bbf 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/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" TEST(fxcrt, FXSYS_toHexDigit) { EXPECT_EQ(10, FXSYS_toHexDigit('a')); diff --git a/core/fxcrt/fx_system_unittest.cpp b/core/fxcrt/fx_system_unittest.cpp index f877eb2aa5..b0a3249465 100644 --- a/core/fxcrt/fx_system_unittest.cpp +++ b/core/fxcrt/fx_system_unittest.cpp @@ -5,7 +5,7 @@ #include #include -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" #include "testing/fx_string_testhelpers.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/core/fxcrt/fx_ucddata.cpp b/core/fxcrt/fx_ucddata.cpp index 60ac01d5fe..783d5653b8 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/include/fxcrt/fx_basic.h" -#include "core/include/fxcrt/fx_ucd.h" +#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/include/fx_ucd.h" const FX_DWORD kTextLayoutCodeProperties[] = { 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, diff --git a/core/fxcrt/fx_unicode.cpp b/core/fxcrt/fx_unicode.cpp index 9094c65294..296ead84bb 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/include/fxcrt/fx_ucd.h" +#include "core/fxcrt/include/fx_ucd.h" FX_DWORD FX_GetUnicodeProperties(FX_WCHAR wch) { size_t idx = static_cast(wch); diff --git a/core/fxcrt/fx_xml_composer.cpp b/core/fxcrt/fx_xml_composer.cpp index 93aee899dd..1af6952fdb 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/include/fxcrt/fx_xml.h" +#include "core/fxcrt/include/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 d5326d3882..43f8c54366 100644 --- a/core/fxcrt/fx_xml_parser.cpp +++ b/core/fxcrt/fx_xml_parser.cpp @@ -8,8 +8,8 @@ #include -#include "core/include/fxcrt/fx_ext.h" -#include "core/include/fxcrt/fx_xml.h" +#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/include/fx_xml.h" #include "third_party/base/stl_util.h" CXML_Parser::~CXML_Parser() { diff --git a/core/fxcrt/fxcrt_platforms.cpp b/core/fxcrt/fxcrt_platforms.cpp index b4f6ffa109..4305c41874 100644 --- a/core/fxcrt/fxcrt_platforms.cpp +++ b/core/fxcrt/fxcrt_platforms.cpp @@ -6,7 +6,7 @@ #include "core/fxcrt/fxcrt_platforms.h" -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #if (_FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ && \ _FXM_PLATFORM_ != _FXM_PLATFORM_LINUX_ && \ diff --git a/core/fxcrt/fxcrt_posix.cpp b/core/fxcrt/fxcrt_posix.cpp index 161506dd74..02556c1520 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/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 2f50153e9e..d96369b81c 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/include/fxcrt/fx_stream.h" +#include "core/fxcrt/include/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 528a3b78ac..61c0eb6e39 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/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_string.h" #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ IFXCRT_FileAccess* FXCRT_FileAccess_Create() { diff --git a/core/fxcrt/include/fx_arb.h b/core/fxcrt/include/fx_arb.h new file mode 100644 index 0000000000..6a0af83150 --- /dev/null +++ b/core/fxcrt/include/fx_arb.h @@ -0,0 +1,66 @@ +// 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" + +class IFX_ArabicChar; + +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, +}; + +class IFX_ArabicChar { + public: + static IFX_ArabicChar* Create(); + virtual ~IFX_ArabicChar() {} + virtual void Release() = 0; + virtual FX_BOOL IsArabicChar(FX_WCHAR wch) const = 0; + virtual FX_BOOL IsArabicFormChar(FX_WCHAR wch) const = 0; + virtual FX_WCHAR GetFormChar(FX_WCHAR wch, + FX_WCHAR prev = 0, + FX_WCHAR next = 0) const = 0; + virtual FX_WCHAR GetFormChar(const CFX_Char* cur, + const CFX_Char* prev, + const CFX_Char* next) const = 0; +}; + +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 new file mode 100644 index 0000000000..3da2e03e60 --- /dev/null +++ b/core/fxcrt/include/fx_basic.h @@ -0,0 +1,1153 @@ +// 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" + +// 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(); } +}; + +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_ByteStringC& str) { + AppendBlock(str.GetPtr(), 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: + void AppendChar(int ch) { AppendByte((uint8_t)ch); } + FX_STRSIZE GetLength() const { return m_DataSize; } + CFX_ByteStringC GetByteString() const; + + CFX_ByteTextBuf& operator<<(int i); + CFX_ByteTextBuf& operator<<(FX_DWORD i); + CFX_ByteTextBuf& operator<<(double f); + 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 GetWideString() const; + + 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); +}; + +#ifdef PDF_ENABLE_XFA +class CFX_ArchiveSaver { + public: + CFX_ArchiveSaver() : m_pStream(NULL) {} + + CFX_ArchiveSaver& operator<<(uint8_t i); + + CFX_ArchiveSaver& operator<<(int i); + + CFX_ArchiveSaver& operator<<(FX_DWORD i); + + CFX_ArchiveSaver& operator<<(FX_FLOAT i); + + CFX_ArchiveSaver& operator<<(double i); + + CFX_ArchiveSaver& operator<<(const CFX_ByteStringC& bstr); + + CFX_ArchiveSaver& operator<<(const FX_WCHAR* bstr); + + CFX_ArchiveSaver& operator<<(const CFX_WideString& wstr); + + void Write(const void* pData, FX_STRSIZE dwSize); + + intptr_t GetLength() { return m_SavingBuf.GetSize(); } + + const uint8_t* GetBuffer() { return m_SavingBuf.GetBuffer(); } + + void SetStream(IFX_FileStream* pStream) { m_pStream = pStream; } + + protected: + CFX_BinaryBuf m_SavingBuf; + + IFX_FileStream* m_pStream; +}; +class CFX_ArchiveLoader { + public: + CFX_ArchiveLoader(const uint8_t* pData, FX_DWORD dwSize); + + CFX_ArchiveLoader& operator>>(uint8_t& i); + + CFX_ArchiveLoader& operator>>(int& i); + + CFX_ArchiveLoader& operator>>(FX_DWORD& i); + + CFX_ArchiveLoader& operator>>(FX_FLOAT& i); + + CFX_ArchiveLoader& operator>>(double& i); + + CFX_ArchiveLoader& operator>>(CFX_ByteString& bstr); + + CFX_ArchiveLoader& operator>>(CFX_WideString& wstr); + + FX_BOOL IsEOF(); + + FX_BOOL Read(void* pBuf, FX_DWORD dwSize); + + protected: + FX_DWORD m_LoadingPos; + + const uint8_t* m_pLoadingBuf; + + FX_DWORD m_LoadingSize; +}; +#endif // PDF_ENABLE_XFA + +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(FX_DWORD 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_WideString& wstr); + + static CFX_WideString GetWideString(uint16_t codepage, + const CFX_ByteString& bstr); + + CFX_CharMap() = delete; +}; + +class CFX_UTF8Decoder { + public: + CFX_UTF8Decoder() { m_PendingBytes = 0; } + + void Clear(); + + void Input(uint8_t byte); + + void AppendChar(FX_DWORD ch); + + void ClearStatus() { m_PendingBytes = 0; } + + CFX_WideStringC GetResult() const { return m_Buffer.GetWideString(); } + + protected: + int m_PendingBytes; + + FX_DWORD 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.GetByteString(); } + + protected: + CFX_ByteTextBuf m_Buffer; +}; + +class CFX_BasicArray { + protected: + CFX_BasicArray(int unit_size); + + ~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) { + return (const TYPE&)(*(volatile const TYPE*)NULL); + } + 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) { + return *(TYPE*)NULL; + } + 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; + } +}; +typedef CFX_ArrayTemplate CFX_DWordArray; + +#ifdef PDF_ENABLE_XFA +typedef CFX_ArrayTemplate CFX_WideStringCArray; +typedef CFX_ArrayTemplate CFX_FloatArray; +typedef CFX_ArrayTemplate CFX_ByteArray; +typedef CFX_ArrayTemplate CFX_Int32Array; +typedef CFX_ArrayTemplate CFX_PtrArray; +#endif // PDF_ENABLE_XFA + +#ifdef PDF_ENABLE_XFA +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; + } + FXSYS_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; + } + FXSYS_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 { + FXSYS_assert(index < m_nSize); + return *(ObjectClass*)CFX_BasicArray::GetDataPtr(index); + } + + ObjectClass* GetDataPtr(int index) { + return (ObjectClass*)CFX_BasicArray::GetDataPtr(index); + } + + void RemoveAt(int index) { + FXSYS_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; +class CFX_BaseSegmentedArray { + public: + CFX_BaseSegmentedArray(int unit_size = 1, + int segment_units = 512, + int index_size = 8); + + ~CFX_BaseSegmentedArray(); + + void SetUnitSize(int unit_size, int segment_units, int index_size = 8); + + void* Add(); + + void* GetAt(int index) const; + + void RemoveAll(); + + void Delete(int index, int count = 1); + + int GetSize() const { return m_DataSize; } + + int GetSegmentSize() const { return m_SegmentSize; } + + int GetUnitSize() const { return m_UnitSize; } + + void* Iterate(FX_BOOL (*callback)(void* param, void* pData), + void* param) const; + + private: + int m_UnitSize; + + short m_SegmentSize; + + uint8_t m_IndexSize; + + uint8_t m_IndexDepth; + + int m_DataSize; + + void* m_pIndex; + void** GetIndex(int seg_index) const; + void* IterateIndex(int level, + int& start, + void** pIndex, + FX_BOOL (*callback)(void* param, void* pData), + void* param) const; + void* IterateSegment(const uint8_t* pSegment, + int count, + FX_BOOL (*callback)(void* param, void* pData), + void* param) const; +}; +template +class CFX_SegmentedArray : public CFX_BaseSegmentedArray { + public: + CFX_SegmentedArray(int segment_units, int index_size = 8) + : CFX_BaseSegmentedArray(sizeof(ElementType), segment_units, index_size) { + } + + void Add(ElementType data) { + *(ElementType*)CFX_BaseSegmentedArray::Add() = data; + } + + ElementType& operator[](int index) { + return *(ElementType*)CFX_BaseSegmentedArray::GetAt(index); + } +}; +#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) ? NULL : (FX_POSITION)-1; + } + + void GetNextAssoc(FX_POSITION& rNextPosition, + void*& rKey, + void*& rValue) const; + + FX_DWORD GetHashTableSize() const { return m_nHashTableSize; } + + void InitHashTable(FX_DWORD hashSize, FX_BOOL bAllocNow = TRUE); + + protected: + CAssoc** m_pHashTable; + + FX_DWORD m_nHashTableSize; + + int m_nCount; + + CAssoc* m_pFreeList; + + struct CFX_Plex* m_pBlocks; + + int m_nBlockSize; + + FX_DWORD HashKey(void* key) const; + + CAssoc* NewAssoc(); + + void FreeAssoc(CAssoc* pAssoc); + + CAssoc* GetAssocAt(void* key, FX_DWORD& 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 = NULL; + 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 = NULL; + void* pValue = NULL; + 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 = NULL) 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(); +}; +typedef void (*PD_CALLBACK_FREEDATA)(void* pData); + +struct FX_PRIVATEDATA { + void FreeData(); + + void* m_pModuleId; + void* m_pData; + PD_CALLBACK_FREEDATA m_pCallback; + FX_BOOL m_bSelfDestruct; +}; + +class CFX_PrivateData { + public: + CFX_PrivateData(); + ~CFX_PrivateData(); + + void ClearAll(); + + void SetPrivateData(void* module_id, + void* pData, + PD_CALLBACK_FREEDATA callback); + void SetPrivateObj(void* module_id, CFX_DestructObject* pObj); + + void* GetPrivateData(void* module_id); + FX_BOOL LookupPrivateData(void* module_id, void*& pData) const { + if (!module_id) { + return FALSE; + } + FX_DWORD nCount = m_DataList.GetSize(); + for (FX_DWORD n = 0; n < nCount; n++) { + if (m_DataList[n].m_pModuleId == module_id) { + pData = m_DataList[n].m_pData; + return TRUE; + } + } + return FALSE; + } + + FX_BOOL RemovePrivateData(void* module_id); + + protected: + CFX_ArrayTemplate m_DataList; + + void AddData(void* module_id, + void* pData, + PD_CALLBACK_FREEDATA callback, + FX_BOOL bSelfDestruct); +}; + +class CFX_BitStream { + public: + void Init(const uint8_t* pData, FX_DWORD dwSize); + + FX_DWORD GetBits(FX_DWORD nBits); + + void ByteAlign(); + + FX_BOOL IsEOF() { return m_BitPos >= m_BitSize; } + + void SkipBits(FX_DWORD nBits) { m_BitPos += nBits; } + + void Rewind() { m_BitPos = 0; } + + FX_DWORD GetPos() const { return m_BitPos; } + + FX_DWORD BitsRemaining() const { + return m_BitSize >= m_BitPos ? m_BitSize - m_BitPos : 0; + } + + protected: + FX_DWORD m_BitPos; + + FX_DWORD m_BitSize; + + const uint8_t* m_pData; +}; +template +class CFX_CountRef { + public: + typedef CFX_CountRef Ref; + + class CountedObj : public ObjClass { + public: + CountedObj() {} + + CountedObj(const CountedObj& src) : ObjClass(src) {} + + int m_RefCount; + }; + + CFX_CountRef() { m_pObject = NULL; } + + CFX_CountRef(const Ref& ref) { + m_pObject = ref.m_pObject; + if (m_pObject) { + m_pObject->m_RefCount++; + } + } + + ~CFX_CountRef() { + if (!m_pObject) { + return; + } + m_pObject->m_RefCount--; + if (m_pObject->m_RefCount <= 0) { + delete m_pObject; + } + } + + ObjClass* New() { + if (m_pObject) { + m_pObject->m_RefCount--; + if (m_pObject->m_RefCount <= 0) { + delete m_pObject; + } + } + m_pObject = new CountedObj; + m_pObject->m_RefCount = 1; + return m_pObject; + } + + void operator=(const Ref& ref) { + if (ref.m_pObject) { + ref.m_pObject->m_RefCount++; + } + if (m_pObject) { + m_pObject->m_RefCount--; + if (m_pObject->m_RefCount <= 0) { + delete m_pObject; + } + } + m_pObject = ref.m_pObject; + } + + void operator=(void* p) { + FXSYS_assert(p == 0); + if (!m_pObject) { + return; + } + m_pObject->m_RefCount--; + if (m_pObject->m_RefCount <= 0) { + delete m_pObject; + } + m_pObject = NULL; + } + + const ObjClass* GetObject() const { return m_pObject; } + + operator const ObjClass*() const { return m_pObject; } + + FX_BOOL IsNull() const { return !m_pObject; } + + FX_BOOL NotNull() const { return !IsNull(); } + + ObjClass* GetModify() { + if (!m_pObject) { + m_pObject = new CountedObj; + m_pObject->m_RefCount = 1; + } else if (m_pObject->m_RefCount > 1) { + m_pObject->m_RefCount--; + CountedObj* pOldObject = m_pObject; + m_pObject = new CountedObj(*pOldObject); + m_pObject->m_RefCount = 1; + } + return m_pObject; + } + + void SetNull() { + if (!m_pObject) { + return; + } + m_pObject->m_RefCount--; + if (m_pObject->m_RefCount <= 0) { + delete m_pObject; + } + m_pObject = NULL; + } + + bool operator==(const Ref& ref) const { return m_pObject == ref.m_pObject; } + + protected: + CountedObj* m_pObject; +}; +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 NULL; + } + if (m_CurList < 0 || m_CurList >= m_DataLists.GetSize()) { + return NULL; + } + DataList* pCurList = m_DataLists.GetDataPtr(m_CurList); + if (!pCurList || nIndex < pCurList->start || + nIndex >= pCurList->start + pCurList->count) { + pCurList = NULL; + 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 : NULL; + } + + 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); + FXSYS_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_Unknown { + public: + virtual ~IFX_Unknown() {} + virtual FX_DWORD Release() = 0; + virtual FX_DWORD AddRef() = 0; +}; +#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; +}; + +#endif // CORE_FXCRT_INCLUDE_FX_BASIC_H_ diff --git a/core/fxcrt/include/fx_coordinates.h b/core/fxcrt/include/fx_coordinates.h new file mode 100644 index 0000000000..a7f0b8d5dc --- /dev/null +++ b/core/fxcrt/include/fx_coordinates.h @@ -0,0 +1,672 @@ +// 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_SMALL_RECT { + FX_SMALL_RECT() : FX_SMALL_RECT(kInvalid, kInvalid, kInvalid, kInvalid) {} + + FX_SMALL_RECT(int16_t l, int16_t t, int16_t r, int16_t b) + : left(l), top(t), right(r), bottom(b) {} + + static const int16_t kInvalid = -1; + + int16_t left; + int16_t top; + int16_t right; + int16_t bottom; +}; + +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) {} + + explicit FX_RECT(const FX_SMALL_RECT& other) + : FX_RECT(other.left, other.top, other.right, other.bottom) {} + + int Width() const { return right - left; } + int Height() const { return bottom - top; } + bool IsEmpty() const { return right <= left || bottom <= top; } + + 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; + } + + FX_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; + } + + FX_BOOL Contains(int x, int y) const { + return x >= left && x < right && y >= top && y < bottom; + } + + FX_SMALL_RECT ToSmallRect() const { + return FX_SMALL_RECT( + static_cast(left), static_cast(top), + static_cast(right), static_cast(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(FX_FLOAT xx, FX_FLOAT yy) : x(xx), y(yy) {} + + FX_FLOAT x; + FX_FLOAT y; +}; + +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 GetOutterRect() 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)); + } + + FX_FLOAT left; + FX_FLOAT bottom; + FX_FLOAT right; + FX_FLOAT top; +}; +using CFX_RectArray = CFX_ArrayTemplate; + +// 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 left, baseType top, baseType width, baseType height) { + FXT_RECT::left = left, FXT_RECT::top = top, FXT_RECT::width = width, + FXT_RECT::height = height; + } + void Set(baseType left, baseType top, const FXT_SIZE& size) { + FXT_RECT::left = left, FXT_RECT::top = top, FXT_RECT::Size(size); + } + void Set(const FXT_POINT& p, baseType width, baseType height) { + TopLeft(p), FXT_RECT::width = width, FXT_RECT::height = height; + } + void Set(const FXT_POINT& p1, const FXT_POINT& p2) { + TopLeft(p1), FXT_RECT::width = p2.x - p1.x, FXT_RECT::height = p2.y - p1.y, + FXT_RECT::Normalize(); + } + void Set(const FXT_POINT& p, const FXT_VECTOR& v) { + TopLeft(p), FXT_RECT::width = v.x, FXT_RECT::height = v.y, + FXT_RECT::Normalize(); + } + void Reset() { + FXT_RECT::left = FXT_RECT::top = FXT_RECT::width = FXT_RECT::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 left, baseType top, baseType right, baseType bottom) { + FXT_RECT::left -= left; + FXT_RECT::top -= top; + FXT_RECT::width += left + right; + FXT_RECT::height += top + 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 left, baseType top, baseType right, baseType bottom) { + FXT_RECT::left += left; + FXT_RECT::top += top; + FXT_RECT::width -= left + right; + FXT_RECT::height -= top + 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; } + FX_BOOL Contains(baseType x, baseType y) const { + return x >= left && x < left + width && y >= top && y < top + height; + } + FX_BOOL Contains(const FXT_POINT& p) const { return Contains(p.x, p.y); } + FX_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(), 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(), 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(), 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_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); + + void Copy(const CFX_Matrix& m) { *this = m; } + + 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 new file mode 100644 index 0000000000..2a39530c07 --- /dev/null +++ b/core/fxcrt/include/fx_ext.h @@ -0,0 +1,134 @@ +// 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" + +// 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 = NULL); +FX_FLOAT FXSYS_wcstof(const FX_WCHAR* pwsStr, + int32_t iLength = -1, + int32_t* pUsedLen = NULL); +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 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_DWORD FX_HashCode_String_GetA(const FX_CHAR* pStr, + int32_t iLength, + FX_BOOL bIgnoreCase = FALSE); +FX_DWORD FX_HashCode_String_GetW(const FX_WCHAR* pStr, + int32_t iLength, + FX_BOOL bIgnoreCase = FALSE); + +void* FX_Random_MT_Start(FX_DWORD dwSeed); + +FX_DWORD FX_Random_MT_Generate(void* pContext); + +void FX_Random_MT_Close(void* pContext); + +void FX_Random_GenerateBase(FX_DWORD* pBuffer, int32_t iCount); + +void FX_Random_GenerateMT(FX_DWORD* pBuffer, int32_t iCount); + +void FX_Random_GenerateCrypto(FX_DWORD* pBuffer, int32_t iCount); + +#ifdef PDF_ENABLE_XFA +typedef struct FX_GUID { + FX_DWORD 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) { + FXSYS_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 new file mode 100644 index 0000000000..c3dafc8d5e --- /dev/null +++ b/core/fxcrt/include/fx_memory.h @@ -0,0 +1,84 @@ +// 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 NULL. +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 + +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 NULL. +#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 NULL. +#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) + +class CFX_DestructObject { + public: + virtual ~CFX_DestructObject() {} +}; + +#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 new file mode 100644 index 0000000000..47eb55ddd5 --- /dev/null +++ b/core/fxcrt/include/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_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_DWORD; +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 new file mode 100644 index 0000000000..4b77796821 --- /dev/null +++ b/core/fxcrt/include/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_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 : 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, FX_DWORD dwModes); +IFX_FileStream* FX_CreateFileStream(const FX_WCHAR* filename, FX_DWORD 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(FX_DWORD 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 new file mode 100644 index 0000000000..4bca083dd0 --- /dev/null +++ b/core/fxcrt/include/fx_string.h @@ -0,0 +1,819 @@ +// 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 "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/include/fx_system.h" + +class CFX_BinaryBuf; +class CFX_ByteString; +class CFX_WideString; + +// An immutable string with caller-provided storage which must outlive the +// string itself. +class CFX_ByteStringC { + public: + typedef FX_CHAR value_type; + + CFX_ByteStringC() { + m_Ptr = NULL; + m_Length = 0; + } + + CFX_ByteStringC(const uint8_t* ptr, FX_STRSIZE size) { + m_Ptr = ptr; + m_Length = size; + } + + CFX_ByteStringC(const FX_CHAR* ptr) { + m_Ptr = (const uint8_t*)ptr; + m_Length = ptr ? FXSYS_strlen(ptr) : 0; + } + + // |ch| must be an lvalue that outlives the the CFX_ByteStringC. However, + // the use of char rvalues are not caught at compile time. They are + // implicitly promoted to CFX_ByteString (see below) and then the + // CFX_ByteStringC is constructed from the CFX_ByteString via the alternate + // constructor below. The CFX_ByteString then typically goes out of scope + // and |m_Ptr| may be left pointing to invalid memory. Beware. + // TODO(tsepez): Mark single-argument string constructors as explicit. + CFX_ByteStringC(FX_CHAR& ch) { + m_Ptr = (const uint8_t*)&ch; + m_Length = 1; + } + + CFX_ByteStringC(const FX_CHAR* ptr, FX_STRSIZE len) { + m_Ptr = (const uint8_t*)ptr; + m_Length = (len == -1) ? FXSYS_strlen(ptr) : len; + } + + CFX_ByteStringC(const CFX_ByteStringC& src) { + m_Ptr = src.m_Ptr; + m_Length = src.m_Length; + } + + CFX_ByteStringC(const CFX_ByteString& src); + + CFX_ByteStringC& operator=(const FX_CHAR* src) { + m_Ptr = (const uint8_t*)src; + m_Length = m_Ptr ? FXSYS_strlen(src) : 0; + return *this; + } + + CFX_ByteStringC& operator=(const CFX_ByteStringC& src) { + m_Ptr = src.m_Ptr; + m_Length = src.m_Length; + return *this; + } + + CFX_ByteStringC& operator=(const CFX_ByteString& src); + + bool operator==(const char* ptr) const { + return FXSYS_strlen(ptr) == m_Length && + FXSYS_memcmp(ptr, m_Ptr, m_Length) == 0; + } + bool operator==(const CFX_ByteStringC& other) const { + return other.m_Length == m_Length && + FXSYS_memcmp(other.m_Ptr, m_Ptr, m_Length) == 0; + } + bool operator!=(const char* ptr) const { return !(*this == ptr); } + bool operator!=(const CFX_ByteStringC& other) const { + return !(*this == other); + } + + FX_DWORD GetID(FX_STRSIZE start_pos = 0) const; + + const uint8_t* GetPtr() const { return m_Ptr; } + + const FX_CHAR* GetCStr() const { return (const FX_CHAR*)m_Ptr; } + + FX_STRSIZE GetLength() const { return m_Length; } + + bool IsEmpty() const { return m_Length == 0; } + + uint8_t GetAt(FX_STRSIZE index) const { return m_Ptr[index]; } + + CFX_ByteStringC Mid(FX_STRSIZE index, FX_STRSIZE count = -1) const { + if (index < 0) { + index = 0; + } + if (index > m_Length) { + return CFX_ByteStringC(); + } + if (count < 0 || count > m_Length - index) { + count = m_Length - index; + } + return CFX_ByteStringC(m_Ptr + index, count); + } + + const uint8_t& operator[](size_t index) const { return m_Ptr[index]; } + + bool operator<(const CFX_ByteStringC& that) const { + int result = memcmp(m_Ptr, that.m_Ptr, std::min(m_Length, that.m_Length)); + return result < 0 || (result == 0 && m_Length < that.m_Length); + } + + protected: + const uint8_t* m_Ptr; + FX_STRSIZE m_Length; + + private: + void* operator new(size_t) throw() { return NULL; } +}; +inline bool operator==(const char* lhs, const CFX_ByteStringC& rhs) { + return rhs == lhs; +} +inline bool operator!=(const char* lhs, const CFX_ByteStringC& rhs) { + return rhs != lhs; +} +#define FXBSTR_ID(c1, c2, c3, c4) ((c1 << 24) | (c2 << 16) | (c3 << 8) | (c4)) + +// 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: + typedef FX_CHAR value_type; + + CFX_ByteString() : m_pData(nullptr) {} + + // Copy constructor. + CFX_ByteString(const CFX_ByteString& str); + + // Move constructor. + inline CFX_ByteString(CFX_ByteString&& other) { + m_pData = other.m_pData; + other.m_pData = nullptr; + } + + CFX_ByteString(char ch); + CFX_ByteString(const FX_CHAR* ptr) + : CFX_ByteString(ptr, ptr ? FXSYS_strlen(ptr) : 0) {} + + CFX_ByteString(const FX_CHAR* ptr, FX_STRSIZE len); + CFX_ByteString(const uint8_t* ptr, FX_STRSIZE len); + + CFX_ByteString(const CFX_ByteStringC& bstrc); + CFX_ByteString(const CFX_ByteStringC& bstrc1, const CFX_ByteStringC& bstrc2); + + ~CFX_ByteString(); + + 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. + const FX_CHAR* c_str() const { return m_pData ? m_pData->m_String : ""; } + + // Implicit conversion to C-style string -- deprecated. + operator const FX_CHAR*() const { return m_pData ? m_pData->m_String : ""; } + + // Explicit conversion to uint8_t*. + const uint8_t* raw_str() const { + return m_pData ? reinterpret_cast(m_pData->m_String) + : nullptr; + } + + // Implicit conversiont to uint8_t* -- deprecated. + operator const uint8_t*() const { + return m_pData ? reinterpret_cast(m_pData->m_String) + : nullptr; + } + + 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 Equal(const char* ptr) const; + bool Equal(const CFX_ByteStringC& str) const; + bool Equal(const CFX_ByteString& other) const; + + bool EqualNoCase(const CFX_ByteStringC& str) const; + + bool operator==(const char* ptr) const { return Equal(ptr); } + bool operator==(const CFX_ByteStringC& str) const { return Equal(str); } + bool operator==(const CFX_ByteString& other) const { return Equal(other); } + + 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 { + int result = FXSYS_memcmp(c_str(), str.c_str(), + std::min(GetLength(), str.GetLength())); + return result < 0 || (result == 0 && GetLength() < str.GetLength()); + } + + void Empty(); + + 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=(const CFX_BinaryBuf& buf); + + void Load(const uint8_t* str, FX_STRSIZE len); + + 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; + + FX_DWORD 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, FX_DWORD flags = 0); + static CFX_ByteString FormatFloat(FX_FLOAT f, int precision = 0); + + protected: + // 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; we need not go + // larger. + class StringData { + public: + static StringData* Create(int nLen); + void Retain() { ++m_nRefs; } + void Release() { + if (--m_nRefs <= 0) + FX_Free(this); + } + + intptr_t m_nRefs; // Would prefer ssize_t, but no windows support. + FX_STRSIZE m_nDataLength; + FX_STRSIZE m_nAllocLength; + FX_CHAR m_String[1]; + + private: + StringData(FX_STRSIZE dataLen, FX_STRSIZE allocLen) + : m_nRefs(1), m_nDataLength(dataLen), m_nAllocLength(allocLen) { + FXSYS_assert(dataLen >= 0); + FXSYS_assert(allocLen >= 0); + FXSYS_assert(dataLen <= allocLen); + m_String[dataLen] = 0; + } + ~StringData() = delete; + }; + + void AllocCopy(CFX_ByteString& dest, + FX_STRSIZE nCopyLen, + FX_STRSIZE nCopyIndex) const; + void AssignCopy(FX_STRSIZE nSrcLen, const FX_CHAR* lpszSrcData); + void ConcatCopy(FX_STRSIZE nSrc1Len, + const FX_CHAR* lpszSrc1Data, + FX_STRSIZE nSrc2Len, + const FX_CHAR* lpszSrc2Data); + void ConcatInPlace(FX_STRSIZE nSrcLen, const FX_CHAR* lpszSrcData); + void CopyBeforeWrite(); + void AllocBeforeWrite(FX_STRSIZE nLen); + + StringData* m_pData; + friend class fxcrt_ByteStringConcatInPlace_Test; +}; +inline CFX_ByteStringC::CFX_ByteStringC(const CFX_ByteString& src) { + m_Ptr = (const uint8_t*)src; + m_Length = src.GetLength(); +} +inline CFX_ByteStringC& CFX_ByteStringC::operator=(const CFX_ByteString& src) { + m_Ptr = (const uint8_t*)src; + m_Length = src.GetLength(); + return *this; +} + +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, str2); +} +inline CFX_ByteString operator+(const CFX_ByteString& str1, FX_CHAR ch) { + return CFX_ByteString(str1, CFX_ByteStringC(ch)); +} +inline CFX_ByteString operator+(FX_CHAR ch, const CFX_ByteString& str2) { + return CFX_ByteString(ch, str2); +} +inline CFX_ByteString operator+(const CFX_ByteString& str1, + const FX_CHAR* str2) { + return CFX_ByteString(str1, str2); +} +inline CFX_ByteString operator+(const FX_CHAR* str1, + const CFX_ByteString& str2) { + return CFX_ByteString(str1, str2); +} +inline CFX_ByteString operator+(const CFX_ByteString& str1, + const CFX_ByteStringC& str2) { + return CFX_ByteString(str1, str2); +} +inline CFX_ByteString operator+(const CFX_ByteStringC& str1, + const CFX_ByteString& str2) { + return CFX_ByteString(str1, str2); +} +class CFX_WideStringC { + public: + typedef FX_WCHAR value_type; + + CFX_WideStringC() { + m_Ptr = NULL; + m_Length = 0; + } + + CFX_WideStringC(const FX_WCHAR* ptr) { + m_Ptr = ptr; + m_Length = ptr ? FXSYS_wcslen(ptr) : 0; + } + + CFX_WideStringC(FX_WCHAR& ch) { + m_Ptr = &ch; + m_Length = 1; + } + + CFX_WideStringC(const FX_WCHAR* ptr, FX_STRSIZE len) { + m_Ptr = ptr; + m_Length = (len == -1) ? FXSYS_wcslen(ptr) : len; + } + + CFX_WideStringC(const CFX_WideStringC& src) { + m_Ptr = src.m_Ptr; + m_Length = src.m_Length; + } + + CFX_WideStringC(const CFX_WideString& src); + + CFX_WideStringC& operator=(const FX_WCHAR* src) { + m_Ptr = src; + m_Length = FXSYS_wcslen(src); + return *this; + } + + CFX_WideStringC& operator=(const CFX_WideStringC& src) { + m_Ptr = src.m_Ptr; + m_Length = src.m_Length; + return *this; + } + + CFX_WideStringC& operator=(const CFX_WideString& src); + + bool operator==(const wchar_t* ptr) const { + return FXSYS_wcslen(ptr) == m_Length && wmemcmp(ptr, m_Ptr, m_Length) == 0; + } + bool operator==(const CFX_WideStringC& str) const { + return str.m_Length == m_Length && wmemcmp(str.m_Ptr, m_Ptr, m_Length) == 0; + } + bool operator!=(const wchar_t* ptr) const { return !(*this == ptr); } + bool operator!=(const CFX_WideStringC& str) const { return !(*this == str); } + + const FX_WCHAR* GetPtr() const { return m_Ptr; } + + FX_STRSIZE GetLength() const { return m_Length; } + + bool IsEmpty() const { return m_Length == 0; } + + FX_WCHAR GetAt(FX_STRSIZE index) const { return m_Ptr[index]; } + + CFX_WideStringC Left(FX_STRSIZE count) const { + if (count < 1) { + return CFX_WideStringC(); + } + if (count > m_Length) { + count = m_Length; + } + return CFX_WideStringC(m_Ptr, count); + } + + CFX_WideStringC Mid(FX_STRSIZE index, FX_STRSIZE count = -1) const { + if (index < 0) { + index = 0; + } + if (index > m_Length) { + return CFX_WideStringC(); + } + if (count < 0 || count > m_Length - index) { + count = m_Length - index; + } + return CFX_WideStringC(m_Ptr + index, count); + } + + CFX_WideStringC Right(FX_STRSIZE count) const { + if (count < 1) { + return CFX_WideStringC(); + } + if (count > m_Length) { + count = m_Length; + } + return CFX_WideStringC(m_Ptr + m_Length - count, count); + } + + const FX_WCHAR& operator[](size_t index) const { return m_Ptr[index]; } + + bool operator<(const CFX_WideStringC& that) const { + int result = wmemcmp(m_Ptr, that.m_Ptr, std::min(m_Length, that.m_Length)); + return result < 0 || (result == 0 && m_Length < that.m_Length); + } + + protected: + const FX_WCHAR* m_Ptr; + FX_STRSIZE m_Length; + + private: + void* operator new(size_t) throw() { return NULL; } +}; +inline bool operator==(const wchar_t* lhs, const CFX_WideStringC& rhs) { + return rhs == lhs; +} +inline bool operator!=(const wchar_t* lhs, const CFX_WideStringC& rhs) { + return rhs != lhs; +} +#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_WideString { + public: + typedef FX_WCHAR value_type; + + CFX_WideString() : m_pData(nullptr) {} + + // Copy constructor. + CFX_WideString(const CFX_WideString& str); + + // Move constructor. + inline CFX_WideString(CFX_WideString&& other) { + m_pData = other.m_pData; + other.m_pData = nullptr; + } + + CFX_WideString(const FX_WCHAR* ptr) + : CFX_WideString(ptr, ptr ? FXSYS_wcslen(ptr) : 0) {} + + CFX_WideString(const FX_WCHAR* ptr, FX_STRSIZE len); + + CFX_WideString(FX_WCHAR ch); + + CFX_WideString(const CFX_WideStringC& str); + + CFX_WideString(const CFX_WideStringC& str1, const CFX_WideStringC& str2); + + ~CFX_WideString(); + + static CFX_WideString FromLocal(const CFX_ByteString& str); + + static CFX_WideString FromCodePage(const CFX_ByteString& str, + uint16_t codepage); + + static CFX_WideString FromUTF8(const char* str, FX_STRSIZE len); + + 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. + const FX_WCHAR* c_str() const { return m_pData ? m_pData->m_String : L""; } + + // Implicit conversion to C-style wide string -- deprecated. + operator const FX_WCHAR*() const { return m_pData ? m_pData->m_String : L""; } + + void Empty(); + + bool IsEmpty() const { return !GetLength(); } + + FX_STRSIZE GetLength() const { return m_pData ? m_pData->m_nDataLength : 0; } + + 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 { return Equal(ptr); } + bool operator==(const CFX_WideStringC& str) const { return Equal(str); } + bool operator==(const CFX_WideString& other) const { return Equal(other); } + + 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 { + int result = + wmemcmp(c_str(), str.c_str(), std::min(GetLength(), str.GetLength())); + return result < 0 || (result == 0 && GetLength() < str.GetLength()); + } + + 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; + + bool Equal(const wchar_t* ptr) const; + bool Equal(const CFX_WideStringC& str) const; + bool Equal(const CFX_WideString& other) 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 FX_WCHAR* lpszTargets); + + void TrimLeft(); + + void TrimLeft(FX_WCHAR chTarget); + + void TrimLeft(const FX_WCHAR* lpszTargets); + + 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 FX_WCHAR* lpszSub, FX_STRSIZE start = 0) const; + + FX_STRSIZE Find(FX_WCHAR ch, FX_STRSIZE start = 0) const; + + FX_STRSIZE Replace(const FX_WCHAR* lpszOld, const FX_WCHAR* lpszNew); + + FX_STRSIZE Remove(FX_WCHAR ch); + + CFX_ByteString UTF8Encode() const; + + CFX_ByteString UTF16LE_Encode() const; + + protected: + class StringData { + public: + static StringData* Create(int nLen); + void Retain() { ++m_nRefs; } + void Release() { + if (--m_nRefs <= 0) + FX_Free(this); + } + + intptr_t m_nRefs; // Would prefer ssize_t, but no windows support. + FX_STRSIZE m_nDataLength; + FX_STRSIZE m_nAllocLength; + FX_WCHAR m_String[1]; + + private: + StringData(FX_STRSIZE dataLen, FX_STRSIZE allocLen) + : m_nRefs(1), m_nDataLength(dataLen), m_nAllocLength(allocLen) { + FXSYS_assert(dataLen >= 0); + FXSYS_assert(allocLen >= 0); + FXSYS_assert(dataLen <= allocLen); + m_String[dataLen] = 0; + } + ~StringData() = delete; + }; + + void CopyBeforeWrite(); + void AllocBeforeWrite(FX_STRSIZE nLen); + void ConcatInPlace(FX_STRSIZE nSrcLen, const FX_WCHAR* lpszSrcData); + void ConcatCopy(FX_STRSIZE nSrc1Len, + const FX_WCHAR* lpszSrc1Data, + FX_STRSIZE nSrc2Len, + const FX_WCHAR* lpszSrc2Data); + void AssignCopy(FX_STRSIZE nSrcLen, const FX_WCHAR* lpszSrcData); + void AllocCopy(CFX_WideString& dest, + FX_STRSIZE nCopyLen, + FX_STRSIZE nCopyIndex) const; + + StringData* m_pData; + friend class fxcrt_WideStringConcatInPlace_Test; +}; +inline CFX_WideStringC::CFX_WideStringC(const CFX_WideString& src) { + m_Ptr = src.c_str(); + m_Length = src.GetLength(); +} +inline CFX_WideStringC& CFX_WideStringC::operator=(const CFX_WideString& src) { + m_Ptr = src.c_str(); + m_Length = src.GetLength(); + return *this; +} + +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, str2); +} +inline CFX_WideString operator+(const CFX_WideString& str1, FX_WCHAR ch) { + return CFX_WideString(str1, CFX_WideStringC(ch)); +} +inline CFX_WideString operator+(FX_WCHAR ch, const CFX_WideString& str2) { + return CFX_WideString(ch, str2); +} +inline CFX_WideString operator+(const CFX_WideString& str1, + const FX_WCHAR* str2) { + return CFX_WideString(str1, str2); +} +inline CFX_WideString operator+(const FX_WCHAR* str1, + const CFX_WideString& str2) { + return CFX_WideString(str1, str2); +} +inline CFX_WideString operator+(const CFX_WideString& str1, + const CFX_WideStringC& str2) { + return CFX_WideString(str1, str2); +} +inline CFX_WideString operator+(const CFX_WideStringC& str1, + const CFX_WideString& str2) { + return CFX_WideString(str1, str2); +} +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.GetPtr(), 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.GetPtr(), wsStr.GetLength())); +} +void FX_atonum(const CFX_ByteStringC& str, FX_BOOL& bInteger, void* pData); +FX_STRSIZE FX_ftoa(FX_FLOAT f, FX_CHAR* buf); + +#endif // CORE_FXCRT_INCLUDE_FX_STRING_H_ diff --git a/core/fxcrt/include/fx_system.h b/core/fxcrt/include/fx_system.h new file mode 100644 index 0000000000..eb863c6048 --- /dev/null +++ b/core/fxcrt/include/fx_system.h @@ -0,0 +1,320 @@ +// 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_ +#define _CRT_SECURE_NO_WARNINGS +#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 uint32_t FX_DWORD; // Keep - "an efficient type" +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. + +// 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 NULL +#define NULL 0 +#endif + +#define FXSYS_assert assert +#ifndef ASSERT +#ifndef NDEBUG +#define ASSERT FXSYS_assert +#else +#define ASSERT(a) +#endif +#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_strchr strchr +#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)) + +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_wcschr wcschr +#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_memchr memchr +#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(void); +char* FXSYS_itoa(int value, char* str, int radix); +int FXSYS_WideCharToMultiByte(FX_DWORD codepage, + FX_DWORD dwFlags, + const wchar_t* wstr, + int wlen, + char* buf, + int buflen, + const char* default_str, + int* pUseDefault); +int FXSYS_MultiByteToWideChar(FX_DWORD codepage, + FX_DWORD dwFlags, + const char* bstr, + int blen, + wchar_t* buf, + int buflen); +FX_DWORD FXSYS_GetFullPathName(const char* filename, + FX_DWORD buflen, + char* buf, + char** filepart); +FX_DWORD FXSYS_GetModuleFileName(void* hModule, char* buf, FX_DWORD 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_FROM_LSBFIRST(i) (i) +#define FXDWORD_FROM_MSBFIRST(i) \ + (((uint8_t)(i) << 24) | ((uint8_t)((i) >> 8) << 16) | \ + ((uint8_t)((i) >> 16) << 8) | (uint8_t)((i) >> 24)) +#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 new file mode 100644 index 0000000000..f2e4215aa8 --- /dev/null +++ b/core/fxcrt/include/fx_ucd.h @@ -0,0 +1,192 @@ +// 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 FX_DWORD 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; + +FX_DWORD 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), +}; + +FX_BOOL FX_IsCtrlCode(FX_WCHAR ch); +FX_WCHAR FX_GetMirrorChar(FX_WCHAR wch, + FX_DWORD 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, FX_DWORD 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_DWORD GetCharType() const { return m_dwCharProps & FX_CHARTYPEBITSMASK; } + uint16_t m_wCharCode; + uint8_t m_nBreakType; + int8_t m_nRotation; + FX_DWORD m_dwCharProps; + FX_DWORD 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() + : CFX_Char(), + m_dwStatus(0), + m_iBidiClass(0), + m_iBidiLevel(0), + m_iBidiPos(0), + m_iBidiOrder(0), + m_pUserData(NULL) {} + FX_DWORD 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_Char(), + 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(NULL) {} + FX_DWORD 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; + FX_DWORD m_dwLayoutStyles; + FX_DWORD m_dwIdentity; + IFX_Unknown* m_pUserData; +}; +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 new file mode 100644 index 0000000000..66add1befc --- /dev/null +++ b/core/fxcrt/include/fx_xml.h @@ -0,0 +1,169 @@ +// 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_ByteStringC& space, const CFX_ByteStringC& name) const; + + CFX_ByteString m_QSpaceName; + CFX_ByteString m_AttrName; + CFX_WideString m_Value; +}; + +class CXML_AttrMap { + public: + const CFX_WideString* Lookup(const CFX_ByteStringC& space, + const CFX_ByteStringC& name) const; + void SetAt(const CFX_ByteStringC& space, + const CFX_ByteStringC& name, + const CFX_WideStringC& value); + int GetSize() const; + CXML_AttrItem& GetAt(int index) const; + + 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 = NULL); + static CXML_Element* Parse(IFX_FileRead* pFile, + FX_BOOL bSaveSpaceChars = FALSE, + FX_FILESIZE* pParsedSize = NULL); + static CXML_Element* Parse(IFX_BufferRead* pBuffer, + FX_BOOL bSaveSpaceChars = FALSE, + FX_FILESIZE* pParsedSize = NULL); + + 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_ByteStringC& qName) const; + CXML_Element* GetParent() const { return m_pParent; } + FX_DWORD 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; + } + + FX_DWORD CountChildren() const { return m_Children.size(); } + ChildType GetChildType(FX_DWORD index) const; + CFX_WideString GetContent(FX_DWORD index) const; + CXML_Element* GetElement(FX_DWORD index) const; + CXML_Element* GetElement(const CFX_ByteStringC& space, + const CFX_ByteStringC& tag) const { + return GetElement(space, tag, 0); + } + + FX_DWORD CountElements(const CFX_ByteStringC& space, + const CFX_ByteStringC& tag) const; + CXML_Element* GetElement(const CFX_ByteStringC& space, + const CFX_ByteStringC& tag, + int index) const; + + FX_DWORD 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(FX_DWORD 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 25fca64d72..8bb9607268 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" struct CFX_Plex { CFX_Plex* pNext; diff --git a/core/fxcrt/xml_int.h b/core/fxcrt/xml_int.h index 18dbf9b955..9a2c28c11f 100644 --- a/core/fxcrt/xml_int.h +++ b/core/fxcrt/xml_int.h @@ -9,7 +9,7 @@ #include -#include "core/include/fxcrt/fx_stream.h" +#include "core/fxcrt/include/fx_stream.h" class CFX_UTF8Decoder; class CXML_Element; diff --git a/core/fxge/android/fpf_skiafont.cpp b/core/fxge/android/fpf_skiafont.cpp index b94ec055bf..58b937f3d4 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 f1ccedb56d..d077f38606 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 e9249ba76f..13d030cf26 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" #if _FX_OS_ == _FX_ANDROID_ @@ -13,9 +13,9 @@ #define FPF_SKIAMATCHWEIGHT_1 16 #define FPF_SKIAMATCHWEIGHT_2 8 +#include "core/fxcrt/include/fx_ext.h" #include "core/fxge/android/fpf_skiafont.h" #include "core/fxge/android/fpf_skiafontmgr.h" -#include "core/include/fxcrt/fx_ext.h" #include "core/include/fxge/fx_freetype.h" #ifdef __cplusplus diff --git a/core/fxge/android/fpf_skiafontmgr.h b/core/fxge/android/fpf_skiafontmgr.h index 9f5cafbed5..5ba5b16475 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 91f00c78e8..0454524829 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 58d20faa7b..7218b5e7d0 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 ef8062dda8..1ce4694f77 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 6d04e4ffc2..3fac3706cf 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 c2b2714bc8..037eca767f 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 8aae334b97..33dfbbc05c 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" #include "core/include/fxge/fx_ge.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 006f701e1e..dae396f7fe 100644 --- a/core/fxge/apple/fx_quartz_device.cpp +++ b/core/fxge/apple/fx_quartz_device.cpp @@ -4,10 +4,10 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include "core/fxcrt/include/fx_ext.h" #include "core/fxge/agg/fx_agg_driver.h" #include "core/fxge/dib/dib_int.h" #include "core/fxge/ge/fx_text_int.h" -#include "core/include/fxcrt/fx_ext.h" #include "core/include/fxge/fx_freetype.h" #include "core/include/fxge/fx_ge.h" diff --git a/core/fxge/dib/dib_int.h b/core/fxge/dib/dib_int.h index 85888fed50..7022ec99ce 100644 --- a/core/fxge/dib/dib_int.h +++ b/core/fxge/dib/dib_int.h @@ -9,7 +9,7 @@ #include -#include "core/include/fxcrt/fx_coordinates.h" +#include "core/fxcrt/include/fx_coordinates.h" #include "core/include/fxge/fx_dib.h" class IFX_ScanlineComposer; diff --git a/core/fxge/ge/fx_ge_path.cpp b/core/fxge/ge/fx_ge_path.cpp index de84de2518..90793c4746 100644 --- a/core/fxge/ge/fx_ge_path.cpp +++ b/core/fxge/ge/fx_ge_path.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" #include "core/include/fxge/fx_ge.h" #include "third_party/base/numerics/safe_math.h" diff --git a/core/include/fpdfapi/fpdf_resource.h b/core/include/fpdfapi/fpdf_resource.h index 379f53acb9..f309114918 100644 --- a/core/include/fpdfapi/fpdf_resource.h +++ b/core/include/fpdfapi/fpdf_resource.h @@ -11,7 +11,7 @@ #include "core/fpdfapi/fpdf_parser/include/cpdf_stream.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" #include "core/include/fxge/fx_font.h" class CFX_CTTGSUBTable; diff --git a/core/include/fxcodec/fx_codec.h b/core/include/fxcodec/fx_codec.h index bce7e49a1f..e209fcffa5 100644 --- a/core/include/fxcodec/fx_codec.h +++ b/core/include/fxcodec/fx_codec.h @@ -11,9 +11,9 @@ #include #include +#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/include/fx_coordinates.h" // For FX_RECT. #include "core/include/fxcodec/fx_codec_def.h" -#include "core/include/fxcrt/fx_basic.h" -#include "core/include/fxcrt/fx_coordinates.h" // For FX_RECT. class CFX_DIBSource; class CJPX_Decoder; diff --git a/core/include/fxcrt/fx_arb.h b/core/include/fxcrt/fx_arb.h deleted file mode 100644 index 57391dea19..0000000000 --- a/core/include/fxcrt/fx_arb.h +++ /dev/null @@ -1,66 +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_INCLUDE_FXCRT_FX_ARB_H_ -#define CORE_INCLUDE_FXCRT_FX_ARB_H_ - -#include "core/include/fxcrt/fx_system.h" -#include "core/include/fxcrt/fx_ucd.h" - -class IFX_ArabicChar; - -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, -}; - -class IFX_ArabicChar { - public: - static IFX_ArabicChar* Create(); - virtual ~IFX_ArabicChar() {} - virtual void Release() = 0; - virtual FX_BOOL IsArabicChar(FX_WCHAR wch) const = 0; - virtual FX_BOOL IsArabicFormChar(FX_WCHAR wch) const = 0; - virtual FX_WCHAR GetFormChar(FX_WCHAR wch, - FX_WCHAR prev = 0, - FX_WCHAR next = 0) const = 0; - virtual FX_WCHAR GetFormChar(const CFX_Char* cur, - const CFX_Char* prev, - const CFX_Char* next) const = 0; -}; - -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_INCLUDE_FXCRT_FX_ARB_H_ diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h deleted file mode 100644 index 277286c80c..0000000000 --- a/core/include/fxcrt/fx_basic.h +++ /dev/null @@ -1,1153 +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_INCLUDE_FXCRT_FX_BASIC_H_ -#define CORE_INCLUDE_FXCRT_FX_BASIC_H_ - -#include -#include - -#include "core/include/fxcrt/fx_memory.h" -#include "core/include/fxcrt/fx_stream.h" -#include "core/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" - -// 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(); } -}; - -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_ByteStringC& str) { - AppendBlock(str.GetPtr(), 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: - void AppendChar(int ch) { AppendByte((uint8_t)ch); } - FX_STRSIZE GetLength() const { return m_DataSize; } - CFX_ByteStringC GetByteString() const; - - CFX_ByteTextBuf& operator<<(int i); - CFX_ByteTextBuf& operator<<(FX_DWORD i); - CFX_ByteTextBuf& operator<<(double f); - 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 GetWideString() const; - - 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); -}; - -#ifdef PDF_ENABLE_XFA -class CFX_ArchiveSaver { - public: - CFX_ArchiveSaver() : m_pStream(NULL) {} - - CFX_ArchiveSaver& operator<<(uint8_t i); - - CFX_ArchiveSaver& operator<<(int i); - - CFX_ArchiveSaver& operator<<(FX_DWORD i); - - CFX_ArchiveSaver& operator<<(FX_FLOAT i); - - CFX_ArchiveSaver& operator<<(double i); - - CFX_ArchiveSaver& operator<<(const CFX_ByteStringC& bstr); - - CFX_ArchiveSaver& operator<<(const FX_WCHAR* bstr); - - CFX_ArchiveSaver& operator<<(const CFX_WideString& wstr); - - void Write(const void* pData, FX_STRSIZE dwSize); - - intptr_t GetLength() { return m_SavingBuf.GetSize(); } - - const uint8_t* GetBuffer() { return m_SavingBuf.GetBuffer(); } - - void SetStream(IFX_FileStream* pStream) { m_pStream = pStream; } - - protected: - CFX_BinaryBuf m_SavingBuf; - - IFX_FileStream* m_pStream; -}; -class CFX_ArchiveLoader { - public: - CFX_ArchiveLoader(const uint8_t* pData, FX_DWORD dwSize); - - CFX_ArchiveLoader& operator>>(uint8_t& i); - - CFX_ArchiveLoader& operator>>(int& i); - - CFX_ArchiveLoader& operator>>(FX_DWORD& i); - - CFX_ArchiveLoader& operator>>(FX_FLOAT& i); - - CFX_ArchiveLoader& operator>>(double& i); - - CFX_ArchiveLoader& operator>>(CFX_ByteString& bstr); - - CFX_ArchiveLoader& operator>>(CFX_WideString& wstr); - - FX_BOOL IsEOF(); - - FX_BOOL Read(void* pBuf, FX_DWORD dwSize); - - protected: - FX_DWORD m_LoadingPos; - - const uint8_t* m_pLoadingBuf; - - FX_DWORD m_LoadingSize; -}; -#endif // PDF_ENABLE_XFA - -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(FX_DWORD 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_WideString& wstr); - - static CFX_WideString GetWideString(uint16_t codepage, - const CFX_ByteString& bstr); - - CFX_CharMap() = delete; -}; - -class CFX_UTF8Decoder { - public: - CFX_UTF8Decoder() { m_PendingBytes = 0; } - - void Clear(); - - void Input(uint8_t byte); - - void AppendChar(FX_DWORD ch); - - void ClearStatus() { m_PendingBytes = 0; } - - CFX_WideStringC GetResult() const { return m_Buffer.GetWideString(); } - - protected: - int m_PendingBytes; - - FX_DWORD 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.GetByteString(); } - - protected: - CFX_ByteTextBuf m_Buffer; -}; - -class CFX_BasicArray { - protected: - CFX_BasicArray(int unit_size); - - ~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) { - return (const TYPE&)(*(volatile const TYPE*)NULL); - } - 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) { - return *(TYPE*)NULL; - } - 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; - } -}; -typedef CFX_ArrayTemplate CFX_DWordArray; - -#ifdef PDF_ENABLE_XFA -typedef CFX_ArrayTemplate CFX_WideStringCArray; -typedef CFX_ArrayTemplate CFX_FloatArray; -typedef CFX_ArrayTemplate CFX_ByteArray; -typedef CFX_ArrayTemplate CFX_Int32Array; -typedef CFX_ArrayTemplate CFX_PtrArray; -#endif // PDF_ENABLE_XFA - -#ifdef PDF_ENABLE_XFA -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; - } - FXSYS_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; - } - FXSYS_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 { - FXSYS_assert(index < m_nSize); - return *(ObjectClass*)CFX_BasicArray::GetDataPtr(index); - } - - ObjectClass* GetDataPtr(int index) { - return (ObjectClass*)CFX_BasicArray::GetDataPtr(index); - } - - void RemoveAt(int index) { - FXSYS_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; -class CFX_BaseSegmentedArray { - public: - CFX_BaseSegmentedArray(int unit_size = 1, - int segment_units = 512, - int index_size = 8); - - ~CFX_BaseSegmentedArray(); - - void SetUnitSize(int unit_size, int segment_units, int index_size = 8); - - void* Add(); - - void* GetAt(int index) const; - - void RemoveAll(); - - void Delete(int index, int count = 1); - - int GetSize() const { return m_DataSize; } - - int GetSegmentSize() const { return m_SegmentSize; } - - int GetUnitSize() const { return m_UnitSize; } - - void* Iterate(FX_BOOL (*callback)(void* param, void* pData), - void* param) const; - - private: - int m_UnitSize; - - short m_SegmentSize; - - uint8_t m_IndexSize; - - uint8_t m_IndexDepth; - - int m_DataSize; - - void* m_pIndex; - void** GetIndex(int seg_index) const; - void* IterateIndex(int level, - int& start, - void** pIndex, - FX_BOOL (*callback)(void* param, void* pData), - void* param) const; - void* IterateSegment(const uint8_t* pSegment, - int count, - FX_BOOL (*callback)(void* param, void* pData), - void* param) const; -}; -template -class CFX_SegmentedArray : public CFX_BaseSegmentedArray { - public: - CFX_SegmentedArray(int segment_units, int index_size = 8) - : CFX_BaseSegmentedArray(sizeof(ElementType), segment_units, index_size) { - } - - void Add(ElementType data) { - *(ElementType*)CFX_BaseSegmentedArray::Add() = data; - } - - ElementType& operator[](int index) { - return *(ElementType*)CFX_BaseSegmentedArray::GetAt(index); - } -}; -#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) ? NULL : (FX_POSITION)-1; - } - - void GetNextAssoc(FX_POSITION& rNextPosition, - void*& rKey, - void*& rValue) const; - - FX_DWORD GetHashTableSize() const { return m_nHashTableSize; } - - void InitHashTable(FX_DWORD hashSize, FX_BOOL bAllocNow = TRUE); - - protected: - CAssoc** m_pHashTable; - - FX_DWORD m_nHashTableSize; - - int m_nCount; - - CAssoc* m_pFreeList; - - struct CFX_Plex* m_pBlocks; - - int m_nBlockSize; - - FX_DWORD HashKey(void* key) const; - - CAssoc* NewAssoc(); - - void FreeAssoc(CAssoc* pAssoc); - - CAssoc* GetAssocAt(void* key, FX_DWORD& 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 = NULL; - 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 = NULL; - void* pValue = NULL; - 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 = NULL) 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(); -}; -typedef void (*PD_CALLBACK_FREEDATA)(void* pData); - -struct FX_PRIVATEDATA { - void FreeData(); - - void* m_pModuleId; - void* m_pData; - PD_CALLBACK_FREEDATA m_pCallback; - FX_BOOL m_bSelfDestruct; -}; - -class CFX_PrivateData { - public: - CFX_PrivateData(); - ~CFX_PrivateData(); - - void ClearAll(); - - void SetPrivateData(void* module_id, - void* pData, - PD_CALLBACK_FREEDATA callback); - void SetPrivateObj(void* module_id, CFX_DestructObject* pObj); - - void* GetPrivateData(void* module_id); - FX_BOOL LookupPrivateData(void* module_id, void*& pData) const { - if (!module_id) { - return FALSE; - } - FX_DWORD nCount = m_DataList.GetSize(); - for (FX_DWORD n = 0; n < nCount; n++) { - if (m_DataList[n].m_pModuleId == module_id) { - pData = m_DataList[n].m_pData; - return TRUE; - } - } - return FALSE; - } - - FX_BOOL RemovePrivateData(void* module_id); - - protected: - CFX_ArrayTemplate m_DataList; - - void AddData(void* module_id, - void* pData, - PD_CALLBACK_FREEDATA callback, - FX_BOOL bSelfDestruct); -}; - -class CFX_BitStream { - public: - void Init(const uint8_t* pData, FX_DWORD dwSize); - - FX_DWORD GetBits(FX_DWORD nBits); - - void ByteAlign(); - - FX_BOOL IsEOF() { return m_BitPos >= m_BitSize; } - - void SkipBits(FX_DWORD nBits) { m_BitPos += nBits; } - - void Rewind() { m_BitPos = 0; } - - FX_DWORD GetPos() const { return m_BitPos; } - - FX_DWORD BitsRemaining() const { - return m_BitSize >= m_BitPos ? m_BitSize - m_BitPos : 0; - } - - protected: - FX_DWORD m_BitPos; - - FX_DWORD m_BitSize; - - const uint8_t* m_pData; -}; -template -class CFX_CountRef { - public: - typedef CFX_CountRef Ref; - - class CountedObj : public ObjClass { - public: - CountedObj() {} - - CountedObj(const CountedObj& src) : ObjClass(src) {} - - int m_RefCount; - }; - - CFX_CountRef() { m_pObject = NULL; } - - CFX_CountRef(const Ref& ref) { - m_pObject = ref.m_pObject; - if (m_pObject) { - m_pObject->m_RefCount++; - } - } - - ~CFX_CountRef() { - if (!m_pObject) { - return; - } - m_pObject->m_RefCount--; - if (m_pObject->m_RefCount <= 0) { - delete m_pObject; - } - } - - ObjClass* New() { - if (m_pObject) { - m_pObject->m_RefCount--; - if (m_pObject->m_RefCount <= 0) { - delete m_pObject; - } - } - m_pObject = new CountedObj; - m_pObject->m_RefCount = 1; - return m_pObject; - } - - void operator=(const Ref& ref) { - if (ref.m_pObject) { - ref.m_pObject->m_RefCount++; - } - if (m_pObject) { - m_pObject->m_RefCount--; - if (m_pObject->m_RefCount <= 0) { - delete m_pObject; - } - } - m_pObject = ref.m_pObject; - } - - void operator=(void* p) { - FXSYS_assert(p == 0); - if (!m_pObject) { - return; - } - m_pObject->m_RefCount--; - if (m_pObject->m_RefCount <= 0) { - delete m_pObject; - } - m_pObject = NULL; - } - - const ObjClass* GetObject() const { return m_pObject; } - - operator const ObjClass*() const { return m_pObject; } - - FX_BOOL IsNull() const { return !m_pObject; } - - FX_BOOL NotNull() const { return !IsNull(); } - - ObjClass* GetModify() { - if (!m_pObject) { - m_pObject = new CountedObj; - m_pObject->m_RefCount = 1; - } else if (m_pObject->m_RefCount > 1) { - m_pObject->m_RefCount--; - CountedObj* pOldObject = m_pObject; - m_pObject = new CountedObj(*pOldObject); - m_pObject->m_RefCount = 1; - } - return m_pObject; - } - - void SetNull() { - if (!m_pObject) { - return; - } - m_pObject->m_RefCount--; - if (m_pObject->m_RefCount <= 0) { - delete m_pObject; - } - m_pObject = NULL; - } - - bool operator==(const Ref& ref) const { return m_pObject == ref.m_pObject; } - - protected: - CountedObj* m_pObject; -}; -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 NULL; - } - if (m_CurList < 0 || m_CurList >= m_DataLists.GetSize()) { - return NULL; - } - DataList* pCurList = m_DataLists.GetDataPtr(m_CurList); - if (!pCurList || nIndex < pCurList->start || - nIndex >= pCurList->start + pCurList->count) { - pCurList = NULL; - 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 : NULL; - } - - 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); - FXSYS_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_Unknown { - public: - virtual ~IFX_Unknown() {} - virtual FX_DWORD Release() = 0; - virtual FX_DWORD AddRef() = 0; -}; -#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; -}; - -#endif // CORE_INCLUDE_FXCRT_FX_BASIC_H_ diff --git a/core/include/fxcrt/fx_bidi.h b/core/include/fxcrt/fx_bidi.h deleted file mode 100644 index 4ea17dae86..0000000000 --- a/core/include/fxcrt/fx_bidi.h +++ /dev/null @@ -1,73 +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_INCLUDE_FXCRT_FX_BIDI_H_ -#define CORE_INCLUDE_FXCRT_FX_BIDI_H_ - -#include -#include - -#include "core/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" - -// Processes characters and group them into segments based on text direction. -class CFX_BidiChar { - public: - enum Direction { NEUTRAL, LEFT, RIGHT }; - struct Segment { - int32_t start; // Start position. - int32_t count; // Character count. - Direction direction; // Segment direction. - }; - - CFX_BidiChar(); - - // Append a character and classify it as left, right, or neutral. - // Returns true if the character has a different direction than the - // existing direction to indicate there is a segment to process. - bool AppendChar(FX_WCHAR wch); - - // Call this after the last character has been appended. AppendChar() - // must not be called after this. - // Returns true if there is still a segment to process. - bool EndChar(); - - // Call after a change in direction is indicated by the above to get - // information about the segment to process. - Segment GetSegmentInfo() const { return m_LastSegment; } - - private: - void StartNewSegment(CFX_BidiChar::Direction direction); - - Segment m_CurrentSegment; - Segment m_LastSegment; -}; - -class CFX_BidiString { - public: - using const_iterator = std::vector::const_iterator; - explicit CFX_BidiString(const CFX_WideString& str); - - // Overall direction is always LEFT or RIGHT, never NEUTRAL. - CFX_BidiChar::Direction OverallDirection() const { - return m_eOverallDirection; - } - - // Force the overall direction to be R2L regardless of what was detected. - void SetOverallDirectionRight(); - - FX_WCHAR CharAt(size_t x) const { return m_Str[x]; } - const_iterator begin() const { return m_Order.begin(); } - const_iterator end() const { return m_Order.end(); } - - private: - const CFX_WideString m_Str; - std::unique_ptr m_pBidiChar; - std::vector m_Order; - CFX_BidiChar::Direction m_eOverallDirection; -}; - -#endif // CORE_INCLUDE_FXCRT_FX_BIDI_H_ diff --git a/core/include/fxcrt/fx_coordinates.h b/core/include/fxcrt/fx_coordinates.h deleted file mode 100644 index 0422da1eaa..0000000000 --- a/core/include/fxcrt/fx_coordinates.h +++ /dev/null @@ -1,672 +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_INCLUDE_FXCRT_FX_COORDINATES_H_ -#define CORE_INCLUDE_FXCRT_FX_COORDINATES_H_ - -#include "core/include/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_SMALL_RECT { - FX_SMALL_RECT() : FX_SMALL_RECT(kInvalid, kInvalid, kInvalid, kInvalid) {} - - FX_SMALL_RECT(int16_t l, int16_t t, int16_t r, int16_t b) - : left(l), top(t), right(r), bottom(b) {} - - static const int16_t kInvalid = -1; - - int16_t left; - int16_t top; - int16_t right; - int16_t bottom; -}; - -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) {} - - explicit FX_RECT(const FX_SMALL_RECT& other) - : FX_RECT(other.left, other.top, other.right, other.bottom) {} - - int Width() const { return right - left; } - int Height() const { return bottom - top; } - bool IsEmpty() const { return right <= left || bottom <= top; } - - 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; - } - - FX_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; - } - - FX_BOOL Contains(int x, int y) const { - return x >= left && x < right && y >= top && y < bottom; - } - - FX_SMALL_RECT ToSmallRect() const { - return FX_SMALL_RECT( - static_cast(left), static_cast(top), - static_cast(right), static_cast(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(FX_FLOAT xx, FX_FLOAT yy) : x(xx), y(yy) {} - - FX_FLOAT x; - FX_FLOAT y; -}; - -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 GetOutterRect() 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)); - } - - FX_FLOAT left; - FX_FLOAT bottom; - FX_FLOAT right; - FX_FLOAT top; -}; -using CFX_RectArray = CFX_ArrayTemplate; - -// 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 left, baseType top, baseType width, baseType height) { - FXT_RECT::left = left, FXT_RECT::top = top, FXT_RECT::width = width, - FXT_RECT::height = height; - } - void Set(baseType left, baseType top, const FXT_SIZE& size) { - FXT_RECT::left = left, FXT_RECT::top = top, FXT_RECT::Size(size); - } - void Set(const FXT_POINT& p, baseType width, baseType height) { - TopLeft(p), FXT_RECT::width = width, FXT_RECT::height = height; - } - void Set(const FXT_POINT& p1, const FXT_POINT& p2) { - TopLeft(p1), FXT_RECT::width = p2.x - p1.x, FXT_RECT::height = p2.y - p1.y, - FXT_RECT::Normalize(); - } - void Set(const FXT_POINT& p, const FXT_VECTOR& v) { - TopLeft(p), FXT_RECT::width = v.x, FXT_RECT::height = v.y, - FXT_RECT::Normalize(); - } - void Reset() { - FXT_RECT::left = FXT_RECT::top = FXT_RECT::width = FXT_RECT::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 left, baseType top, baseType right, baseType bottom) { - FXT_RECT::left -= left; - FXT_RECT::top -= top; - FXT_RECT::width += left + right; - FXT_RECT::height += top + 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 left, baseType top, baseType right, baseType bottom) { - FXT_RECT::left += left; - FXT_RECT::top += top; - FXT_RECT::width -= left + right; - FXT_RECT::height -= top + 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; } - FX_BOOL Contains(baseType x, baseType y) const { - return x >= left && x < left + width && y >= top && y < top + height; - } - FX_BOOL Contains(const FXT_POINT& p) const { return Contains(p.x, p.y); } - FX_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(), 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(), 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(), 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_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); - - void Copy(const CFX_Matrix& m) { *this = m; } - - 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_INCLUDE_FXCRT_FX_COORDINATES_H_ diff --git a/core/include/fxcrt/fx_ext.h b/core/include/fxcrt/fx_ext.h deleted file mode 100644 index 08f735b910..0000000000 --- a/core/include/fxcrt/fx_ext.h +++ /dev/null @@ -1,134 +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_INCLUDE_FXCRT_FX_EXT_H_ -#define CORE_INCLUDE_FXCRT_FX_EXT_H_ - -#include -#include - -#include "core/include/fxcrt/fx_basic.h" - -// 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 = NULL); -FX_FLOAT FXSYS_wcstof(const FX_WCHAR* pwsStr, - int32_t iLength = -1, - int32_t* pUsedLen = NULL); -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 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_DWORD FX_HashCode_String_GetA(const FX_CHAR* pStr, - int32_t iLength, - FX_BOOL bIgnoreCase = FALSE); -FX_DWORD FX_HashCode_String_GetW(const FX_WCHAR* pStr, - int32_t iLength, - FX_BOOL bIgnoreCase = FALSE); - -void* FX_Random_MT_Start(FX_DWORD dwSeed); - -FX_DWORD FX_Random_MT_Generate(void* pContext); - -void FX_Random_MT_Close(void* pContext); - -void FX_Random_GenerateBase(FX_DWORD* pBuffer, int32_t iCount); - -void FX_Random_GenerateMT(FX_DWORD* pBuffer, int32_t iCount); - -void FX_Random_GenerateCrypto(FX_DWORD* pBuffer, int32_t iCount); - -#ifdef PDF_ENABLE_XFA -typedef struct FX_GUID { - FX_DWORD 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) { - FXSYS_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_INCLUDE_FXCRT_FX_EXT_H_ diff --git a/core/include/fxcrt/fx_memory.h b/core/include/fxcrt/fx_memory.h deleted file mode 100644 index e1cc07090a..0000000000 --- a/core/include/fxcrt/fx_memory.h +++ /dev/null @@ -1,84 +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_INCLUDE_FXCRT_FX_MEMORY_H_ -#define CORE_INCLUDE_FXCRT_FX_MEMORY_H_ - -#include "core/include/fxcrt/fx_system.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// For external C libraries to malloc through PDFium. These may return NULL. -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 - -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 NULL. -#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 NULL. -#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) - -class CFX_DestructObject { - public: - virtual ~CFX_DestructObject() {} -}; - -#endif // __cplusplus - -#endif // CORE_INCLUDE_FXCRT_FX_MEMORY_H_ diff --git a/core/include/fxcrt/fx_safe_types.h b/core/include/fxcrt/fx_safe_types.h deleted file mode 100644 index 6ae3ee1054..0000000000 --- a/core/include/fxcrt/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_INCLUDE_FXCRT_FX_SAFE_TYPES_H_ -#define CORE_INCLUDE_FXCRT_FX_SAFE_TYPES_H_ - -#include // For size_t. - -#include "core/include/fxcrt/fx_stream.h" // for FX_FILESIZE. -#include "core/include/fxcrt/fx_system.h" -#include "third_party/base/numerics/safe_math.h" - -typedef pdfium::base::CheckedNumeric FX_SAFE_DWORD; -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_INCLUDE_FXCRT_FX_SAFE_TYPES_H_ diff --git a/core/include/fxcrt/fx_stream.h b/core/include/fxcrt/fx_stream.h deleted file mode 100644 index d15d286031..0000000000 --- a/core/include/fxcrt/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_INCLUDE_FXCRT_FX_STREAM_H_ -#define CORE_INCLUDE_FXCRT_FX_STREAM_H_ - -#include "core/include/fxcrt/fx_string.h" -#include "core/include/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 : 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, FX_DWORD dwModes); -IFX_FileStream* FX_CreateFileStream(const FX_WCHAR* filename, FX_DWORD 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(FX_DWORD 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_INCLUDE_FXCRT_FX_STREAM_H_ diff --git a/core/include/fxcrt/fx_string.h b/core/include/fxcrt/fx_string.h deleted file mode 100644 index afaf94b538..0000000000 --- a/core/include/fxcrt/fx_string.h +++ /dev/null @@ -1,819 +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_INCLUDE_FXCRT_FX_STRING_H_ -#define CORE_INCLUDE_FXCRT_FX_STRING_H_ - -#include // For intptr_t. -#include - -#include "core/include/fxcrt/fx_memory.h" -#include "core/include/fxcrt/fx_system.h" - -class CFX_BinaryBuf; -class CFX_ByteString; -class CFX_WideString; - -// An immutable string with caller-provided storage which must outlive the -// string itself. -class CFX_ByteStringC { - public: - typedef FX_CHAR value_type; - - CFX_ByteStringC() { - m_Ptr = NULL; - m_Length = 0; - } - - CFX_ByteStringC(const uint8_t* ptr, FX_STRSIZE size) { - m_Ptr = ptr; - m_Length = size; - } - - CFX_ByteStringC(const FX_CHAR* ptr) { - m_Ptr = (const uint8_t*)ptr; - m_Length = ptr ? FXSYS_strlen(ptr) : 0; - } - - // |ch| must be an lvalue that outlives the the CFX_ByteStringC. However, - // the use of char rvalues are not caught at compile time. They are - // implicitly promoted to CFX_ByteString (see below) and then the - // CFX_ByteStringC is constructed from the CFX_ByteString via the alternate - // constructor below. The CFX_ByteString then typically goes out of scope - // and |m_Ptr| may be left pointing to invalid memory. Beware. - // TODO(tsepez): Mark single-argument string constructors as explicit. - CFX_ByteStringC(FX_CHAR& ch) { - m_Ptr = (const uint8_t*)&ch; - m_Length = 1; - } - - CFX_ByteStringC(const FX_CHAR* ptr, FX_STRSIZE len) { - m_Ptr = (const uint8_t*)ptr; - m_Length = (len == -1) ? FXSYS_strlen(ptr) : len; - } - - CFX_ByteStringC(const CFX_ByteStringC& src) { - m_Ptr = src.m_Ptr; - m_Length = src.m_Length; - } - - CFX_ByteStringC(const CFX_ByteString& src); - - CFX_ByteStringC& operator=(const FX_CHAR* src) { - m_Ptr = (const uint8_t*)src; - m_Length = m_Ptr ? FXSYS_strlen(src) : 0; - return *this; - } - - CFX_ByteStringC& operator=(const CFX_ByteStringC& src) { - m_Ptr = src.m_Ptr; - m_Length = src.m_Length; - return *this; - } - - CFX_ByteStringC& operator=(const CFX_ByteString& src); - - bool operator==(const char* ptr) const { - return FXSYS_strlen(ptr) == m_Length && - FXSYS_memcmp(ptr, m_Ptr, m_Length) == 0; - } - bool operator==(const CFX_ByteStringC& other) const { - return other.m_Length == m_Length && - FXSYS_memcmp(other.m_Ptr, m_Ptr, m_Length) == 0; - } - bool operator!=(const char* ptr) const { return !(*this == ptr); } - bool operator!=(const CFX_ByteStringC& other) const { - return !(*this == other); - } - - FX_DWORD GetID(FX_STRSIZE start_pos = 0) const; - - const uint8_t* GetPtr() const { return m_Ptr; } - - const FX_CHAR* GetCStr() const { return (const FX_CHAR*)m_Ptr; } - - FX_STRSIZE GetLength() const { return m_Length; } - - bool IsEmpty() const { return m_Length == 0; } - - uint8_t GetAt(FX_STRSIZE index) const { return m_Ptr[index]; } - - CFX_ByteStringC Mid(FX_STRSIZE index, FX_STRSIZE count = -1) const { - if (index < 0) { - index = 0; - } - if (index > m_Length) { - return CFX_ByteStringC(); - } - if (count < 0 || count > m_Length - index) { - count = m_Length - index; - } - return CFX_ByteStringC(m_Ptr + index, count); - } - - const uint8_t& operator[](size_t index) const { return m_Ptr[index]; } - - bool operator<(const CFX_ByteStringC& that) const { - int result = memcmp(m_Ptr, that.m_Ptr, std::min(m_Length, that.m_Length)); - return result < 0 || (result == 0 && m_Length < that.m_Length); - } - - protected: - const uint8_t* m_Ptr; - FX_STRSIZE m_Length; - - private: - void* operator new(size_t) throw() { return NULL; } -}; -inline bool operator==(const char* lhs, const CFX_ByteStringC& rhs) { - return rhs == lhs; -} -inline bool operator!=(const char* lhs, const CFX_ByteStringC& rhs) { - return rhs != lhs; -} -#define FXBSTR_ID(c1, c2, c3, c4) ((c1 << 24) | (c2 << 16) | (c3 << 8) | (c4)) - -// 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: - typedef FX_CHAR value_type; - - CFX_ByteString() : m_pData(nullptr) {} - - // Copy constructor. - CFX_ByteString(const CFX_ByteString& str); - - // Move constructor. - inline CFX_ByteString(CFX_ByteString&& other) { - m_pData = other.m_pData; - other.m_pData = nullptr; - } - - CFX_ByteString(char ch); - CFX_ByteString(const FX_CHAR* ptr) - : CFX_ByteString(ptr, ptr ? FXSYS_strlen(ptr) : 0) {} - - CFX_ByteString(const FX_CHAR* ptr, FX_STRSIZE len); - CFX_ByteString(const uint8_t* ptr, FX_STRSIZE len); - - CFX_ByteString(const CFX_ByteStringC& bstrc); - CFX_ByteString(const CFX_ByteStringC& bstrc1, const CFX_ByteStringC& bstrc2); - - ~CFX_ByteString(); - - 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. - const FX_CHAR* c_str() const { return m_pData ? m_pData->m_String : ""; } - - // Implicit conversion to C-style string -- deprecated. - operator const FX_CHAR*() const { return m_pData ? m_pData->m_String : ""; } - - // Explicit conversion to uint8_t*. - const uint8_t* raw_str() const { - return m_pData ? reinterpret_cast(m_pData->m_String) - : nullptr; - } - - // Implicit conversiont to uint8_t* -- deprecated. - operator const uint8_t*() const { - return m_pData ? reinterpret_cast(m_pData->m_String) - : nullptr; - } - - 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 Equal(const char* ptr) const; - bool Equal(const CFX_ByteStringC& str) const; - bool Equal(const CFX_ByteString& other) const; - - bool EqualNoCase(const CFX_ByteStringC& str) const; - - bool operator==(const char* ptr) const { return Equal(ptr); } - bool operator==(const CFX_ByteStringC& str) const { return Equal(str); } - bool operator==(const CFX_ByteString& other) const { return Equal(other); } - - 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 { - int result = FXSYS_memcmp(c_str(), str.c_str(), - std::min(GetLength(), str.GetLength())); - return result < 0 || (result == 0 && GetLength() < str.GetLength()); - } - - void Empty(); - - 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=(const CFX_BinaryBuf& buf); - - void Load(const uint8_t* str, FX_STRSIZE len); - - 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; - - FX_DWORD 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, FX_DWORD flags = 0); - static CFX_ByteString FormatFloat(FX_FLOAT f, int precision = 0); - - protected: - // 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; we need not go - // larger. - class StringData { - public: - static StringData* Create(int nLen); - void Retain() { ++m_nRefs; } - void Release() { - if (--m_nRefs <= 0) - FX_Free(this); - } - - intptr_t m_nRefs; // Would prefer ssize_t, but no windows support. - FX_STRSIZE m_nDataLength; - FX_STRSIZE m_nAllocLength; - FX_CHAR m_String[1]; - - private: - StringData(FX_STRSIZE dataLen, FX_STRSIZE allocLen) - : m_nRefs(1), m_nDataLength(dataLen), m_nAllocLength(allocLen) { - FXSYS_assert(dataLen >= 0); - FXSYS_assert(allocLen >= 0); - FXSYS_assert(dataLen <= allocLen); - m_String[dataLen] = 0; - } - ~StringData() = delete; - }; - - void AllocCopy(CFX_ByteString& dest, - FX_STRSIZE nCopyLen, - FX_STRSIZE nCopyIndex) const; - void AssignCopy(FX_STRSIZE nSrcLen, const FX_CHAR* lpszSrcData); - void ConcatCopy(FX_STRSIZE nSrc1Len, - const FX_CHAR* lpszSrc1Data, - FX_STRSIZE nSrc2Len, - const FX_CHAR* lpszSrc2Data); - void ConcatInPlace(FX_STRSIZE nSrcLen, const FX_CHAR* lpszSrcData); - void CopyBeforeWrite(); - void AllocBeforeWrite(FX_STRSIZE nLen); - - StringData* m_pData; - friend class fxcrt_ByteStringConcatInPlace_Test; -}; -inline CFX_ByteStringC::CFX_ByteStringC(const CFX_ByteString& src) { - m_Ptr = (const uint8_t*)src; - m_Length = src.GetLength(); -} -inline CFX_ByteStringC& CFX_ByteStringC::operator=(const CFX_ByteString& src) { - m_Ptr = (const uint8_t*)src; - m_Length = src.GetLength(); - return *this; -} - -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, str2); -} -inline CFX_ByteString operator+(const CFX_ByteString& str1, FX_CHAR ch) { - return CFX_ByteString(str1, CFX_ByteStringC(ch)); -} -inline CFX_ByteString operator+(FX_CHAR ch, const CFX_ByteString& str2) { - return CFX_ByteString(ch, str2); -} -inline CFX_ByteString operator+(const CFX_ByteString& str1, - const FX_CHAR* str2) { - return CFX_ByteString(str1, str2); -} -inline CFX_ByteString operator+(const FX_CHAR* str1, - const CFX_ByteString& str2) { - return CFX_ByteString(str1, str2); -} -inline CFX_ByteString operator+(const CFX_ByteString& str1, - const CFX_ByteStringC& str2) { - return CFX_ByteString(str1, str2); -} -inline CFX_ByteString operator+(const CFX_ByteStringC& str1, - const CFX_ByteString& str2) { - return CFX_ByteString(str1, str2); -} -class CFX_WideStringC { - public: - typedef FX_WCHAR value_type; - - CFX_WideStringC() { - m_Ptr = NULL; - m_Length = 0; - } - - CFX_WideStringC(const FX_WCHAR* ptr) { - m_Ptr = ptr; - m_Length = ptr ? FXSYS_wcslen(ptr) : 0; - } - - CFX_WideStringC(FX_WCHAR& ch) { - m_Ptr = &ch; - m_Length = 1; - } - - CFX_WideStringC(const FX_WCHAR* ptr, FX_STRSIZE len) { - m_Ptr = ptr; - m_Length = (len == -1) ? FXSYS_wcslen(ptr) : len; - } - - CFX_WideStringC(const CFX_WideStringC& src) { - m_Ptr = src.m_Ptr; - m_Length = src.m_Length; - } - - CFX_WideStringC(const CFX_WideString& src); - - CFX_WideStringC& operator=(const FX_WCHAR* src) { - m_Ptr = src; - m_Length = FXSYS_wcslen(src); - return *this; - } - - CFX_WideStringC& operator=(const CFX_WideStringC& src) { - m_Ptr = src.m_Ptr; - m_Length = src.m_Length; - return *this; - } - - CFX_WideStringC& operator=(const CFX_WideString& src); - - bool operator==(const wchar_t* ptr) const { - return FXSYS_wcslen(ptr) == m_Length && wmemcmp(ptr, m_Ptr, m_Length) == 0; - } - bool operator==(const CFX_WideStringC& str) const { - return str.m_Length == m_Length && wmemcmp(str.m_Ptr, m_Ptr, m_Length) == 0; - } - bool operator!=(const wchar_t* ptr) const { return !(*this == ptr); } - bool operator!=(const CFX_WideStringC& str) const { return !(*this == str); } - - const FX_WCHAR* GetPtr() const { return m_Ptr; } - - FX_STRSIZE GetLength() const { return m_Length; } - - bool IsEmpty() const { return m_Length == 0; } - - FX_WCHAR GetAt(FX_STRSIZE index) const { return m_Ptr[index]; } - - CFX_WideStringC Left(FX_STRSIZE count) const { - if (count < 1) { - return CFX_WideStringC(); - } - if (count > m_Length) { - count = m_Length; - } - return CFX_WideStringC(m_Ptr, count); - } - - CFX_WideStringC Mid(FX_STRSIZE index, FX_STRSIZE count = -1) const { - if (index < 0) { - index = 0; - } - if (index > m_Length) { - return CFX_WideStringC(); - } - if (count < 0 || count > m_Length - index) { - count = m_Length - index; - } - return CFX_WideStringC(m_Ptr + index, count); - } - - CFX_WideStringC Right(FX_STRSIZE count) const { - if (count < 1) { - return CFX_WideStringC(); - } - if (count > m_Length) { - count = m_Length; - } - return CFX_WideStringC(m_Ptr + m_Length - count, count); - } - - const FX_WCHAR& operator[](size_t index) const { return m_Ptr[index]; } - - bool operator<(const CFX_WideStringC& that) const { - int result = wmemcmp(m_Ptr, that.m_Ptr, std::min(m_Length, that.m_Length)); - return result < 0 || (result == 0 && m_Length < that.m_Length); - } - - protected: - const FX_WCHAR* m_Ptr; - FX_STRSIZE m_Length; - - private: - void* operator new(size_t) throw() { return NULL; } -}; -inline bool operator==(const wchar_t* lhs, const CFX_WideStringC& rhs) { - return rhs == lhs; -} -inline bool operator!=(const wchar_t* lhs, const CFX_WideStringC& rhs) { - return rhs != lhs; -} -#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_WideString { - public: - typedef FX_WCHAR value_type; - - CFX_WideString() : m_pData(nullptr) {} - - // Copy constructor. - CFX_WideString(const CFX_WideString& str); - - // Move constructor. - inline CFX_WideString(CFX_WideString&& other) { - m_pData = other.m_pData; - other.m_pData = nullptr; - } - - CFX_WideString(const FX_WCHAR* ptr) - : CFX_WideString(ptr, ptr ? FXSYS_wcslen(ptr) : 0) {} - - CFX_WideString(const FX_WCHAR* ptr, FX_STRSIZE len); - - CFX_WideString(FX_WCHAR ch); - - CFX_WideString(const CFX_WideStringC& str); - - CFX_WideString(const CFX_WideStringC& str1, const CFX_WideStringC& str2); - - ~CFX_WideString(); - - static CFX_WideString FromLocal(const CFX_ByteString& str); - - static CFX_WideString FromCodePage(const CFX_ByteString& str, - uint16_t codepage); - - static CFX_WideString FromUTF8(const char* str, FX_STRSIZE len); - - 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. - const FX_WCHAR* c_str() const { return m_pData ? m_pData->m_String : L""; } - - // Implicit conversion to C-style wide string -- deprecated. - operator const FX_WCHAR*() const { return m_pData ? m_pData->m_String : L""; } - - void Empty(); - - bool IsEmpty() const { return !GetLength(); } - - FX_STRSIZE GetLength() const { return m_pData ? m_pData->m_nDataLength : 0; } - - 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 { return Equal(ptr); } - bool operator==(const CFX_WideStringC& str) const { return Equal(str); } - bool operator==(const CFX_WideString& other) const { return Equal(other); } - - 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 { - int result = - wmemcmp(c_str(), str.c_str(), std::min(GetLength(), str.GetLength())); - return result < 0 || (result == 0 && GetLength() < str.GetLength()); - } - - 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; - - bool Equal(const wchar_t* ptr) const; - bool Equal(const CFX_WideStringC& str) const; - bool Equal(const CFX_WideString& other) 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 FX_WCHAR* lpszTargets); - - void TrimLeft(); - - void TrimLeft(FX_WCHAR chTarget); - - void TrimLeft(const FX_WCHAR* lpszTargets); - - 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 FX_WCHAR* lpszSub, FX_STRSIZE start = 0) const; - - FX_STRSIZE Find(FX_WCHAR ch, FX_STRSIZE start = 0) const; - - FX_STRSIZE Replace(const FX_WCHAR* lpszOld, const FX_WCHAR* lpszNew); - - FX_STRSIZE Remove(FX_WCHAR ch); - - CFX_ByteString UTF8Encode() const; - - CFX_ByteString UTF16LE_Encode() const; - - protected: - class StringData { - public: - static StringData* Create(int nLen); - void Retain() { ++m_nRefs; } - void Release() { - if (--m_nRefs <= 0) - FX_Free(this); - } - - intptr_t m_nRefs; // Would prefer ssize_t, but no windows support. - FX_STRSIZE m_nDataLength; - FX_STRSIZE m_nAllocLength; - FX_WCHAR m_String[1]; - - private: - StringData(FX_STRSIZE dataLen, FX_STRSIZE allocLen) - : m_nRefs(1), m_nDataLength(dataLen), m_nAllocLength(allocLen) { - FXSYS_assert(dataLen >= 0); - FXSYS_assert(allocLen >= 0); - FXSYS_assert(dataLen <= allocLen); - m_String[dataLen] = 0; - } - ~StringData() = delete; - }; - - void CopyBeforeWrite(); - void AllocBeforeWrite(FX_STRSIZE nLen); - void ConcatInPlace(FX_STRSIZE nSrcLen, const FX_WCHAR* lpszSrcData); - void ConcatCopy(FX_STRSIZE nSrc1Len, - const FX_WCHAR* lpszSrc1Data, - FX_STRSIZE nSrc2Len, - const FX_WCHAR* lpszSrc2Data); - void AssignCopy(FX_STRSIZE nSrcLen, const FX_WCHAR* lpszSrcData); - void AllocCopy(CFX_WideString& dest, - FX_STRSIZE nCopyLen, - FX_STRSIZE nCopyIndex) const; - - StringData* m_pData; - friend class fxcrt_WideStringConcatInPlace_Test; -}; -inline CFX_WideStringC::CFX_WideStringC(const CFX_WideString& src) { - m_Ptr = src.c_str(); - m_Length = src.GetLength(); -} -inline CFX_WideStringC& CFX_WideStringC::operator=(const CFX_WideString& src) { - m_Ptr = src.c_str(); - m_Length = src.GetLength(); - return *this; -} - -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, str2); -} -inline CFX_WideString operator+(const CFX_WideString& str1, FX_WCHAR ch) { - return CFX_WideString(str1, CFX_WideStringC(ch)); -} -inline CFX_WideString operator+(FX_WCHAR ch, const CFX_WideString& str2) { - return CFX_WideString(ch, str2); -} -inline CFX_WideString operator+(const CFX_WideString& str1, - const FX_WCHAR* str2) { - return CFX_WideString(str1, str2); -} -inline CFX_WideString operator+(const FX_WCHAR* str1, - const CFX_WideString& str2) { - return CFX_WideString(str1, str2); -} -inline CFX_WideString operator+(const CFX_WideString& str1, - const CFX_WideStringC& str2) { - return CFX_WideString(str1, str2); -} -inline CFX_WideString operator+(const CFX_WideStringC& str1, - const CFX_WideString& str2) { - return CFX_WideString(str1, str2); -} -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.GetPtr(), 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.GetPtr(), wsStr.GetLength())); -} -void FX_atonum(const CFX_ByteStringC& str, FX_BOOL& bInteger, void* pData); -FX_STRSIZE FX_ftoa(FX_FLOAT f, FX_CHAR* buf); - -#endif // CORE_INCLUDE_FXCRT_FX_STRING_H_ diff --git a/core/include/fxcrt/fx_system.h b/core/include/fxcrt/fx_system.h deleted file mode 100644 index 770b1e7b2f..0000000000 --- a/core/include/fxcrt/fx_system.h +++ /dev/null @@ -1,320 +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_INCLUDE_FXCRT_FX_SYSTEM_H_ -#define CORE_INCLUDE_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_ -#define _CRT_SECURE_NO_WARNINGS -#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 uint32_t FX_DWORD; // Keep - "an efficient type" -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. - -// 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 NULL -#define NULL 0 -#endif - -#define FXSYS_assert assert -#ifndef ASSERT -#ifndef NDEBUG -#define ASSERT FXSYS_assert -#else -#define ASSERT(a) -#endif -#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_strchr strchr -#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)) - -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_wcschr wcschr -#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_memchr memchr -#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(void); -char* FXSYS_itoa(int value, char* str, int radix); -int FXSYS_WideCharToMultiByte(FX_DWORD codepage, - FX_DWORD dwFlags, - const wchar_t* wstr, - int wlen, - char* buf, - int buflen, - const char* default_str, - int* pUseDefault); -int FXSYS_MultiByteToWideChar(FX_DWORD codepage, - FX_DWORD dwFlags, - const char* bstr, - int blen, - wchar_t* buf, - int buflen); -FX_DWORD FXSYS_GetFullPathName(const char* filename, - FX_DWORD buflen, - char* buf, - char** filepart); -FX_DWORD FXSYS_GetModuleFileName(void* hModule, char* buf, FX_DWORD 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_FROM_LSBFIRST(i) (i) -#define FXDWORD_FROM_MSBFIRST(i) \ - (((uint8_t)(i) << 24) | ((uint8_t)((i) >> 8) << 16) | \ - ((uint8_t)((i) >> 16) << 8) | (uint8_t)((i) >> 24)) -#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_INCLUDE_FXCRT_FX_SYSTEM_H_ diff --git a/core/include/fxcrt/fx_ucd.h b/core/include/fxcrt/fx_ucd.h deleted file mode 100644 index de7feccf58..0000000000 --- a/core/include/fxcrt/fx_ucd.h +++ /dev/null @@ -1,192 +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_INCLUDE_FXCRT_FX_UCD_H_ -#define CORE_INCLUDE_FXCRT_FX_UCD_H_ - -#include "core/include/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 FX_DWORD 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; - -FX_DWORD 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), -}; - -FX_BOOL FX_IsCtrlCode(FX_WCHAR ch); -FX_WCHAR FX_GetMirrorChar(FX_WCHAR wch, - FX_DWORD 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, FX_DWORD 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_DWORD GetCharType() const { return m_dwCharProps & FX_CHARTYPEBITSMASK; } - uint16_t m_wCharCode; - uint8_t m_nBreakType; - int8_t m_nRotation; - FX_DWORD m_dwCharProps; - FX_DWORD 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() - : CFX_Char(), - m_dwStatus(0), - m_iBidiClass(0), - m_iBidiLevel(0), - m_iBidiPos(0), - m_iBidiOrder(0), - m_pUserData(NULL) {} - FX_DWORD 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_Char(), - 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(NULL) {} - FX_DWORD 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; - FX_DWORD m_dwLayoutStyles; - FX_DWORD m_dwIdentity; - IFX_Unknown* m_pUserData; -}; -typedef CFX_ArrayTemplate CFX_RTFCharArray; -#endif // PDF_ENABLE_XFA - -#endif // CORE_INCLUDE_FXCRT_FX_UCD_H_ diff --git a/core/include/fxcrt/fx_xml.h b/core/include/fxcrt/fx_xml.h deleted file mode 100644 index f18392c6ee..0000000000 --- a/core/include/fxcrt/fx_xml.h +++ /dev/null @@ -1,169 +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_INCLUDE_FXCRT_FX_XML_H_ -#define CORE_INCLUDE_FXCRT_FX_XML_H_ - -#include -#include - -#include "core/include/fxcrt/fx_basic.h" - -class CXML_AttrItem { - public: - bool Matches(const CFX_ByteStringC& space, const CFX_ByteStringC& name) const; - - CFX_ByteString m_QSpaceName; - CFX_ByteString m_AttrName; - CFX_WideString m_Value; -}; - -class CXML_AttrMap { - public: - const CFX_WideString* Lookup(const CFX_ByteStringC& space, - const CFX_ByteStringC& name) const; - void SetAt(const CFX_ByteStringC& space, - const CFX_ByteStringC& name, - const CFX_WideStringC& value); - int GetSize() const; - CXML_AttrItem& GetAt(int index) const; - - 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 = NULL); - static CXML_Element* Parse(IFX_FileRead* pFile, - FX_BOOL bSaveSpaceChars = FALSE, - FX_FILESIZE* pParsedSize = NULL); - static CXML_Element* Parse(IFX_BufferRead* pBuffer, - FX_BOOL bSaveSpaceChars = FALSE, - FX_FILESIZE* pParsedSize = NULL); - - 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_ByteStringC& qName) const; - CXML_Element* GetParent() const { return m_pParent; } - FX_DWORD 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; - } - - FX_DWORD CountChildren() const { return m_Children.size(); } - ChildType GetChildType(FX_DWORD index) const; - CFX_WideString GetContent(FX_DWORD index) const; - CXML_Element* GetElement(FX_DWORD index) const; - CXML_Element* GetElement(const CFX_ByteStringC& space, - const CFX_ByteStringC& tag) const { - return GetElement(space, tag, 0); - } - - FX_DWORD CountElements(const CFX_ByteStringC& space, - const CFX_ByteStringC& tag) const; - CXML_Element* GetElement(const CFX_ByteStringC& space, - const CFX_ByteStringC& tag, - int index) const; - - FX_DWORD 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(FX_DWORD 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_INCLUDE_FXCRT_FX_XML_H_ diff --git a/core/include/fxge/fpf.h b/core/include/fxge/fpf.h index 11e2bf1e40..6e596782cf 100644 --- a/core/include/fxge/fpf.h +++ b/core/include/fxge/fpf.h @@ -7,7 +7,7 @@ #ifndef CORE_INCLUDE_FXGE_FPF_H_ #define CORE_INCLUDE_FXGE_FPF_H_ -#include "core/include/fxcrt/fx_coordinates.h" +#include "core/fxcrt/include/fx_coordinates.h" class IFPF_FontMgr; diff --git a/core/include/fxge/fx_dib.h b/core/include/fxge/fx_dib.h index 837e5d5f7e..bc8954486d 100644 --- a/core/include/fxge/fx_dib.h +++ b/core/include/fxge/fx_dib.h @@ -7,8 +7,8 @@ #ifndef CORE_INCLUDE_FXGE_FX_DIB_H_ #define CORE_INCLUDE_FXGE_FX_DIB_H_ -#include "core/include/fxcrt/fx_basic.h" -#include "core/include/fxcrt/fx_coordinates.h" +#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/include/fx_coordinates.h" enum FXDIB_Format { FXDIB_Invalid = 0, diff --git a/core/include/fxge/fx_font.h b/core/include/fxge/fx_font.h index 2902145594..900f139a2d 100644 --- a/core/include/fxge/fx_font.h +++ b/core/include/fxge/fx_font.h @@ -11,7 +11,7 @@ #include #include -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" #include "core/include/fxge/fx_dib.h" typedef struct FT_FaceRec_* FXFT_Face; diff --git a/fpdfsdk/DEPS b/fpdfsdk/DEPS index f04eb7a34b..1f188771d9 100644 --- a/fpdfsdk/DEPS +++ b/fpdfsdk/DEPS @@ -6,6 +6,7 @@ include_rules = [ '+core/fpdfapi/fpdf_page/include', '+core/fpdfapi/fpdf_parser/include', '+core/fpdfapi/fpdf_render/include', + '+core/fxcrt/include', '+javascript/IJavaScript.h', '+public', '+v8', diff --git a/fpdfsdk/formfiller/cffl_combobox.h b/fpdfsdk/formfiller/cffl_combobox.h index b59f22bf36..947f42548e 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/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/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 ed087199e2..810650fb7d 100644 --- a/fpdfsdk/fpdf_ext.cpp +++ b/fpdfsdk/fpdf_ext.cpp @@ -9,7 +9,7 @@ #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" #include "core/fpdfapi/include/cpdf_modulemgr.h" -#include "core/include/fxcrt/fx_xml.h" +#include "core/fxcrt/include/fx_xml.h" #include "fpdfsdk/include/fsdk_define.h" #ifdef PDF_ENABLE_XFA diff --git a/fpdfsdk/fpdfdoc_embeddertest.cpp b/fpdfsdk/fpdfdoc_embeddertest.cpp index 4788773982..bf91038ca6 100644 --- a/fpdfsdk/fpdfdoc_embeddertest.cpp +++ b/fpdfsdk/fpdfdoc_embeddertest.cpp @@ -4,7 +4,7 @@ #include -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_string.h" #include "public/fpdf_doc.h" #include "public/fpdfview.h" #include "testing/embedder_test.h" diff --git a/fpdfsdk/fpdfsave.cpp b/fpdfsdk/fpdfsave.cpp index 6c02364c1c..98b914385e 100644 --- a/fpdfsdk/fpdfsave.cpp +++ b/fpdfsdk/fpdfsave.cpp @@ -14,7 +14,7 @@ #include "core/fpdfapi/fpdf_parser/include/cpdf_reference.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_string.h" -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/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 1c93f4f0e1..2b138a61e4 100644 --- a/fpdfsdk/fpdfsave_embeddertest.cpp +++ b/fpdfsdk/fpdfsave_embeddertest.cpp @@ -4,7 +4,7 @@ #include -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/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 3eaa5815d9..ed20882a1b 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/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 589a6de644..c883f9ab7a 100644 --- a/fpdfsdk/fpdfview.cpp +++ b/fpdfsdk/fpdfview.cpp @@ -13,8 +13,8 @@ #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" #include "core/fpdfapi/fpdf_render/include/cpdf_renderoptions.h" #include "core/fpdfapi/include/cpdf_modulemgr.h" +#include "core/fxcrt/include/fx_safe_types.h" #include "core/include/fxcodec/fx_codec.h" -#include "core/include/fxcrt/fx_safe_types.h" #include "fpdfsdk/include/fsdk_define.h" #include "fpdfsdk/include/fsdk_mgr.h" #include "fpdfsdk/include/fsdk_rendercontext.h" diff --git a/fpdfsdk/fsdk_baseannot.cpp b/fpdfsdk/fsdk_baseannot.cpp index 1494c3908c..3979c0ff56 100644 --- a/fpdfsdk/fsdk_baseannot.cpp +++ b/fpdfsdk/fsdk_baseannot.cpp @@ -10,7 +10,7 @@ #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_number.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_stream.h" -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" #include "fpdfsdk/include/fsdk_baseannot.h" #include "fpdfsdk/include/fsdk_define.h" #include "fpdfsdk/include/fsdk_mgr.h" diff --git a/fpdfsdk/include/fpdfxfa/fpdfxfa_page.h b/fpdfsdk/include/fpdfxfa/fpdfxfa_page.h index 19d36e4494..d686fe9bae 100644 --- a/fpdfsdk/include/fpdfxfa/fpdfxfa_page.h +++ b/fpdfsdk/include/fpdfxfa/fpdfxfa_page.h @@ -9,8 +9,8 @@ #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h" #include "core/fpdfapi/include/cpdf_modulemgr.h" -#include "core/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_system.h" class CPDFXFA_Document; class CPDF_Page; diff --git a/fpdfsdk/include/fsdk_actionhandler.h b/fpdfsdk/include/fsdk_actionhandler.h index 920ea64e08..a8022b0695 100644 --- a/fpdfsdk/include/fsdk_actionhandler.h +++ b/fpdfsdk/include/fsdk_actionhandler.h @@ -10,8 +10,8 @@ #include #include +#include "core/fxcrt/include/fx_string.h" #include "core/include/fpdfdoc/fpdf_doc.h" -#include "core/include/fxcrt/fx_string.h" #include "fpdfsdk/include/fsdk_baseform.h" class CPDFSDK_Annot; diff --git a/fpdfsdk/include/fsdk_annothandler.h b/fpdfsdk/include/fsdk_annothandler.h index 09f997fbbc..f94d7d0592 100644 --- a/fpdfsdk/include/fsdk_annothandler.h +++ b/fpdfsdk/include/fsdk_annothandler.h @@ -10,8 +10,8 @@ #include #include -#include "core/include/fxcrt/fx_basic.h" -#include "core/include/fxcrt/fx_coordinates.h" +#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/include/fx_coordinates.h" #ifdef PDF_ENABLE_XFA #include "xfa/include/fxfa/fxfa.h" diff --git a/fpdfsdk/include/fsdk_baseannot.h b/fpdfsdk/include/fsdk_baseannot.h index afaa3bc9f9..2024c2ca2d 100644 --- a/fpdfsdk/include/fsdk_baseannot.h +++ b/fpdfsdk/include/fsdk_baseannot.h @@ -13,8 +13,8 @@ #include #endif +#include "core/fxcrt/include/fx_basic.h" #include "core/include/fpdfdoc/fpdf_doc.h" -#include "core/include/fxcrt/fx_basic.h" #include "fpdfsdk/include/fsdk_define.h" #include "fpdfsdk/include/fx_systemhandler.h" diff --git a/fpdfsdk/include/fsdk_baseform.h b/fpdfsdk/include/fsdk_baseform.h index c2d09e8d4d..aa96215d1c 100644 --- a/fpdfsdk/include/fsdk_baseform.h +++ b/fpdfsdk/include/fsdk_baseform.h @@ -10,8 +10,8 @@ #include #include +#include "core/fxcrt/include/fx_basic.h" #include "core/include/fpdfdoc/fpdf_doc.h" -#include "core/include/fxcrt/fx_basic.h" #include "core/include/fxge/fx_dib.h" #include "fpdfsdk/include/fsdk_baseannot.h" diff --git a/fpdfsdk/include/fx_systemhandler.h b/fpdfsdk/include/fx_systemhandler.h index ab0bc46017..6619f3ed04 100644 --- a/fpdfsdk/include/fx_systemhandler.h +++ b/fpdfsdk/include/fx_systemhandler.h @@ -7,8 +7,8 @@ #ifndef FPDFSDK_INCLUDE_FX_SYSTEMHANDLER_H_ #define FPDFSDK_INCLUDE_FX_SYSTEMHANDLER_H_ -#include "core/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_system.h" class CPDF_Document; class CPDF_Font; diff --git a/fpdfsdk/include/fxedit/fx_edit.h b/fpdfsdk/include/fxedit/fx_edit.h index d2222a04af..905ad392a9 100644 --- a/fpdfsdk/include/fxedit/fx_edit.h +++ b/fpdfsdk/include/fxedit/fx_edit.h @@ -7,7 +7,7 @@ #ifndef FPDFSDK_INCLUDE_FXEDIT_FX_EDIT_H_ #define FPDFSDK_INCLUDE_FXEDIT_FX_EDIT_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "core/include/fxge/fx_dib.h" class CFX_RenderDevice; diff --git a/fpdfsdk/include/javascript/IJavaScript.h b/fpdfsdk/include/javascript/IJavaScript.h index 319634882f..8aab367983 100644 --- a/fpdfsdk/include/javascript/IJavaScript.h +++ b/fpdfsdk/include/javascript/IJavaScript.h @@ -7,8 +7,8 @@ #ifndef FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ #define FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ -#include "core/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" #ifdef PDF_ENABLE_XFA #include "xfa/fxjse/include/fxjse.h" diff --git a/fpdfsdk/include/jsapi/fxjs_v8.h b/fpdfsdk/include/jsapi/fxjs_v8.h index dccb261b06..dad1eaa888 100644 --- a/fpdfsdk/include/jsapi/fxjs_v8.h +++ b/fpdfsdk/include/jsapi/fxjs_v8.h @@ -19,7 +19,7 @@ #include -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_string.h" class CFXJS_ObjDefinition; diff --git a/fpdfsdk/include/pdfwindow/PWL_Edit.h b/fpdfsdk/include/pdfwindow/PWL_Edit.h index 0d764c0f89..1e7dd8c274 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Edit.h +++ b/fpdfsdk/include/pdfwindow/PWL_Edit.h @@ -7,7 +7,7 @@ #ifndef FPDFSDK_INCLUDE_PDFWINDOW_PWL_EDIT_H_ #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_EDIT_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "fpdfsdk/include/fxedit/fx_edit.h" #include "fpdfsdk/include/pdfwindow/PWL_EditCtrl.h" #include "fpdfsdk/include/pdfwindow/PWL_Wnd.h" diff --git a/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h b/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h index f2e166385e..b64b576fff 100644 --- a/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h +++ b/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h @@ -7,7 +7,7 @@ #ifndef FPDFSDK_INCLUDE_PDFWINDOW_PWL_EDITCTRL_H_ #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_EDITCTRL_H_ -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_string.h" #include "fpdfsdk/include/fxedit/fx_edit.h" #include "fpdfsdk/include/pdfwindow/PWL_Wnd.h" diff --git a/fpdfsdk/include/pdfwindow/PWL_Icon.h b/fpdfsdk/include/pdfwindow/PWL_Icon.h index 4db62f81be..57c431647b 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Icon.h +++ b/fpdfsdk/include/pdfwindow/PWL_Icon.h @@ -7,7 +7,7 @@ #ifndef FPDFSDK_INCLUDE_PDFWINDOW_PWL_ICON_H_ #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_ICON_H_ -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_string.h" #include "fpdfsdk/include/pdfwindow/PWL_Wnd.h" class CPWL_Image : public CPWL_Wnd { diff --git a/fpdfsdk/include/pdfwindow/PWL_IconList.h b/fpdfsdk/include/pdfwindow/PWL_IconList.h index a11a73c41a..e4fd68a4c1 100644 --- a/fpdfsdk/include/pdfwindow/PWL_IconList.h +++ b/fpdfsdk/include/pdfwindow/PWL_IconList.h @@ -7,7 +7,7 @@ #ifndef FPDFSDK_INCLUDE_PDFWINDOW_PWL_ICONLIST_H_ #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_ICONLIST_H_ -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_string.h" #include "fpdfsdk/include/pdfwindow/PWL_ListCtrl.h" #include "fpdfsdk/include/pdfwindow/PWL_Wnd.h" diff --git a/fpdfsdk/include/pdfwindow/PWL_Wnd.h b/fpdfsdk/include/pdfwindow/PWL_Wnd.h index 6ad356d80d..3b324a7d7a 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Wnd.h +++ b/fpdfsdk/include/pdfwindow/PWL_Wnd.h @@ -9,8 +9,8 @@ #include +#include "core/fxcrt/include/fx_basic.h" #include "core/include/fpdfdoc/fpdf_doc.h" -#include "core/include/fxcrt/fx_basic.h" #include "fpdfsdk/include/fx_systemhandler.h" class CPWL_MsgControl; diff --git a/fpdfsdk/javascript/JS_Context.h b/fpdfsdk/javascript/JS_Context.h index cd57187720..5aeba27fca 100644 --- a/fpdfsdk/javascript/JS_Context.h +++ b/fpdfsdk/javascript/JS_Context.h @@ -7,8 +7,8 @@ #ifndef FPDFSDK_JAVASCRIPT_JS_CONTEXT_H_ #define FPDFSDK_JAVASCRIPT_JS_CONTEXT_H_ -#include "core/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" #include "fpdfsdk/include/javascript/IJavaScript.h" class CJS_EventHandler; diff --git a/fpdfsdk/javascript/JS_EventHandler.h b/fpdfsdk/javascript/JS_EventHandler.h index 5a819749ef..41d37056a5 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/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" class CJS_Context; class CPDFSDK_Annot; diff --git a/fpdfsdk/javascript/JS_GlobalData.h b/fpdfsdk/javascript/JS_GlobalData.h index 28833d8c12..24c0abf3ca 100644 --- a/fpdfsdk/javascript/JS_GlobalData.h +++ b/fpdfsdk/javascript/JS_GlobalData.h @@ -7,7 +7,7 @@ #ifndef FPDFSDK_JAVASCRIPT_JS_GLOBALDATA_H_ #define FPDFSDK_JAVASCRIPT_JS_GLOBALDATA_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #define JS_GLOBALDATA_TYPE_NUMBER 0 #define JS_GLOBALDATA_TYPE_BOOLEAN 1 diff --git a/fpdfsdk/javascript/JS_Runtime.h b/fpdfsdk/javascript/JS_Runtime.h index 377916416f..fa13273e5b 100644 --- a/fpdfsdk/javascript/JS_Runtime.h +++ b/fpdfsdk/javascript/JS_Runtime.h @@ -12,7 +12,7 @@ #include #include -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "fpdfsdk/include/javascript/IJavaScript.h" #include "fpdfsdk/include/jsapi/fxjs_v8.h" #include "fpdfsdk/javascript/JS_EventHandler.h" diff --git a/fpdfsdk/javascript/JS_Value.h b/fpdfsdk/javascript/JS_Value.h index 70f76cef87..69656ea18c 100644 --- a/fpdfsdk/javascript/JS_Value.h +++ b/fpdfsdk/javascript/JS_Value.h @@ -9,7 +9,7 @@ #include -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "fpdfsdk/include/jsapi/fxjs_v8.h" class CJS_Array; diff --git a/fpdfsdk/javascript/PublicMethods.cpp b/fpdfsdk/javascript/PublicMethods.cpp index 6097369430..b85111bed7 100644 --- a/fpdfsdk/javascript/PublicMethods.cpp +++ b/fpdfsdk/javascript/PublicMethods.cpp @@ -10,7 +10,7 @@ #include #include -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" #include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment. #include "fpdfsdk/include/javascript/IJavaScript.h" #include "fpdfsdk/javascript/Field.h" diff --git a/fpdfsdk/javascript/global.cpp b/fpdfsdk/javascript/global.cpp index c22c05d1db..251e95bd48 100644 --- a/fpdfsdk/javascript/global.cpp +++ b/fpdfsdk/javascript/global.cpp @@ -8,7 +8,7 @@ #include -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" #include "fpdfsdk/include/javascript/IJavaScript.h" #include "fpdfsdk/javascript/JS_Context.h" #include "fpdfsdk/javascript/JS_Define.h" diff --git a/fpdfsdk/javascript/public_methods_embeddertest.cpp b/fpdfsdk/javascript/public_methods_embeddertest.cpp index a298cfc2c8..153b3cd64f 100644 --- a/fpdfsdk/javascript/public_methods_embeddertest.cpp +++ b/fpdfsdk/javascript/public_methods_embeddertest.cpp @@ -4,7 +4,7 @@ #include -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/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 4f35f276bc..a6bfaed7c2 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/include/fxcrt/fx_string.h" // For CFX_WideString. +#include "core/fxcrt/include/fx_string.h" // For CFX_WideString. #include "fpdfsdk/include/fsdk_define.h" // For FX_UINT. class CJS_Context; diff --git a/fpdfsdk/javascript/util.cpp b/fpdfsdk/javascript/util.cpp index d488cb23da..5a7a895dac 100644 --- a/fpdfsdk/javascript/util.cpp +++ b/fpdfsdk/javascript/util.cpp @@ -11,7 +11,7 @@ #include #include -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" #include "fpdfsdk/include/javascript/IJavaScript.h" #include "fpdfsdk/javascript/JS_Context.h" #include "fpdfsdk/javascript/JS_Define.h" diff --git a/fpdfsdk/jsapi/fxjs_v8.cpp b/fpdfsdk/jsapi/fxjs_v8.cpp index 156f1c9a3c..473b546318 100644 --- a/fpdfsdk/jsapi/fxjs_v8.cpp +++ b/fpdfsdk/jsapi/fxjs_v8.cpp @@ -8,7 +8,7 @@ #include -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" const wchar_t kFXJSValueNameString[] = L"string"; const wchar_t kFXJSValueNameNumber[] = L"number"; diff --git a/fpdfsdk/pdfwindow/PWL_Edit.cpp b/fpdfsdk/pdfwindow/PWL_Edit.cpp index 62873e5bc0..cf7e4ff5d9 100644 --- a/fpdfsdk/pdfwindow/PWL_Edit.cpp +++ b/fpdfsdk/pdfwindow/PWL_Edit.cpp @@ -8,9 +8,9 @@ #include +#include "core/fxcrt/include/fx_safe_types.h" +#include "core/fxcrt/include/fx_xml.h" #include "core/include/fpdfapi/fpdf_resource.h" -#include "core/include/fxcrt/fx_safe_types.h" -#include "core/include/fxcrt/fx_xml.h" #include "core/include/fxge/fx_ge.h" #include "fpdfsdk/include/pdfwindow/PWL_Caret.h" #include "fpdfsdk/include/pdfwindow/PWL_EditCtrl.h" diff --git a/pdfium.gyp b/pdfium.gyp index f43f58d985..44aac842a9 100644 --- a/pdfium.gyp +++ b/pdfium.gyp @@ -566,17 +566,6 @@ 'target_name': 'fxcrt', 'type': 'static_library', 'sources': [ - 'core/include/fxcrt/fx_basic.h', - 'core/include/fxcrt/fx_bidi.h', - 'core/include/fxcrt/fx_coordinates.h', - 'core/include/fxcrt/fx_ext.h', - 'core/include/fxcrt/fx_memory.h', - 'core/include/fxcrt/fx_safe_types.h', - 'core/include/fxcrt/fx_stream.h', - 'core/include/fxcrt/fx_string.h', - 'core/include/fxcrt/fx_system.h', - 'core/include/fxcrt/fx_ucd.h', - 'core/include/fxcrt/fx_xml.h', 'core/fxcrt/extension.h', 'core/fxcrt/fxcrt_platforms.cpp', 'core/fxcrt/fxcrt_platforms.h', @@ -597,18 +586,29 @@ 'core/fxcrt/fx_basic_util.cpp', 'core/fxcrt/fx_basic_wstring.cpp', 'core/fxcrt/fx_bidi.cpp', + 'core/fxcrt/fx_bidi.h', 'core/fxcrt/fx_extension.cpp', 'core/fxcrt/fx_ucddata.cpp', 'core/fxcrt/fx_unicode.cpp', 'core/fxcrt/fx_xml_composer.cpp', 'core/fxcrt/fx_xml_parser.cpp', + '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', ], 'conditions': [ ['pdf_enable_xfa==1', { 'sources': [ - 'core/include/fxcrt/fx_arb.h', + 'core/fxcrt/include/fx_arb.h', 'core/fxcrt/fx_arabic.cpp', 'core/fxcrt/fx_arabic.h', 'core/fxcrt/fx_basic_maps.cpp', diff --git a/testing/DEPS b/testing/DEPS index ce8bbe45f7..99f34dc190 100644 --- a/testing/DEPS +++ b/testing/DEPS @@ -1,6 +1,7 @@ include_rules = [ '+core/include', '+core/fxcodec', + '+core/fxcrt/include', '+fpdfsdk/include', '+public', '+v8', diff --git a/testing/fx_string_testhelpers.h b/testing/fx_string_testhelpers.h index d5a45f8635..a47242805f 100644 --- a/testing/fx_string_testhelpers.h +++ b/testing/fx_string_testhelpers.h @@ -7,7 +7,7 @@ #include -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/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/pdf_fm2js_fuzzer.cc b/testing/libfuzzer/pdf_fm2js_fuzzer.cc index acbbf8fd94..569c1291af 100644 --- a/testing/libfuzzer/pdf_fm2js_fuzzer.cc +++ b/testing/libfuzzer/pdf_fm2js_fuzzer.cc @@ -5,8 +5,8 @@ #include #include -#include "core/include/fxcrt/fx_basic.h" -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/include/fx_string.h" #include "xfa/fxfa/fm2js/xfa_program.h" extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { diff --git a/testing/libfuzzer/pdf_xml_fuzzer.cc b/testing/libfuzzer/pdf_xml_fuzzer.cc index 50187e6874..592bf0f066 100644 --- a/testing/libfuzzer/pdf_xml_fuzzer.cc +++ b/testing/libfuzzer/pdf_xml_fuzzer.cc @@ -7,8 +7,8 @@ #include #include -#include "core/include/fxcrt/fx_basic.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/include/fx_system.h" #include "xfa/fxfa/parser/xfa_parser.h" #include "xfa/fxfa/parser/xfa_parser_imp.h" diff --git a/testing/utils/path_service.cpp b/testing/utils/path_service.cpp index c5a461315c..9b2657406d 100644 --- a/testing/utils/path_service.cpp +++ b/testing/utils/path_service.cpp @@ -15,7 +15,7 @@ #include -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" // static bool PathService::EndsWithSeparator(const std::string& path) { diff --git a/third_party/DEPS b/third_party/DEPS index 0b1a28f808..7cc56b3b10 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/include/fxcrt/fx_basic.h', - '+core/include/fxcrt/fx_coordinates.h', - '+core/include/fxcrt/fx_memory.h', - '+core/include/fxcrt/fx_system.h', + '+core/fxcrt/include/fx_basic.h', + '+core/fxcrt/include/fx_coordinates.h', + '+core/fxcrt/include/fx_memory.h', + '+core/fxcrt/include/fx_system.h', ] diff --git a/third_party/agg23/agg_array.h b/third_party/agg23/agg_array.h index a22a5c242a..3a7fb7c9bd 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/include/fxcrt/fx_memory.h" // For FXSYS_* macros. +#include "core/fxcrt/include/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 752560bede..f3dc43cc08 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/include/fxcrt/fx_system.h" // For FX_FLOAT +#include "core/fxcrt/include/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 21b959dc97..619fb6f8d4 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" namespace agg { diff --git a/third_party/agg23/agg_path_storage.cpp b/third_party/agg23/agg_path_storage.cpp index b803a1c730..4c44ca7136 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/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 f02281cee2..47e8e71f63 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/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_memory.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_memory.h" namespace agg { diff --git a/third_party/agg23/agg_vcgen_dash.cpp b/third_party/agg23/agg_vcgen_dash.cpp index 5c5bd78486..3d05d888a4 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" namespace agg { diff --git a/third_party/agg23/agg_vcgen_stroke.cpp b/third_party/agg23/agg_vcgen_stroke.cpp index afc4ee6f9b..7b78ad9007 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/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 dfad4c98fb..6954474470 100644 --- a/third_party/lcms2-2.6/src/cmserr.c +++ b/third_party/lcms2-2.6/src/cmserr.c @@ -63,7 +63,7 @@ long int CMSEXPORT cmsfilelength(FILE* f) // // This is the interface to low-level memory management routines. By default a simple // wrapping to malloc/free/realloc is provided, although there is a limit on the max -// amount of memoy that can be reclaimed. This is mostly as a safety feature to prevent +// amount of memoy that can be reclaimed. This is mostly as a safety feature to prevent // bogus or evil code to allocate huge blocks that otherwise lcms would never need. #define MAX_MEMORY_FOR_ALLOC ((cmsUInt32Number)(1024U*1024U*512U)) @@ -169,7 +169,7 @@ void* _cmsDupDefaultFn(cmsContext ContextID, const void* Org, cmsUInt32Number si // Pointers to memory manager functions in Context0 -_cmsMemPluginChunkType _cmsMemPluginChunk = { _cmsMallocDefaultFn, _cmsMallocZeroDefaultFn, _cmsFreeDefaultFn, +_cmsMemPluginChunkType _cmsMemPluginChunk = { _cmsMallocDefaultFn, _cmsMallocZeroDefaultFn, _cmsFreeDefaultFn, _cmsReallocDefaultFn, _cmsCallocDefaultFn, _cmsDupDefaultFn }; @@ -179,16 +179,16 @@ void _cmsAllocMemPluginChunk(struct _cmsContext_struct* ctx, const struct _cmsCo { _cmsAssert(ctx != NULL); - if (src != NULL) { + if (src != NULL) { // Duplicate - ctx ->chunks[MemPlugin] = _cmsSubAllocDup(ctx ->MemPool, src ->chunks[MemPlugin], sizeof(_cmsMemPluginChunkType)); + ctx ->chunks[MemPlugin] = _cmsSubAllocDup(ctx ->MemPool, src ->chunks[MemPlugin], sizeof(_cmsMemPluginChunkType)); } else { // To reset it, we use the default allocators, which cannot be overriden ctx ->chunks[MemPlugin] = &ctx ->DefaultMemoryManager; - } + } } // Auxiliar to fill memory management functions from plugin (or context 0 defaults) @@ -208,11 +208,11 @@ void _cmsInstallAllocFunctions(cmsPluginMemHandler* Plugin, _cmsMemPluginChunkTy ptr ->MallocZeroPtr= _cmsMallocZeroDefaultFn; ptr ->CallocPtr = _cmsCallocDefaultFn; ptr ->DupPtr = _cmsDupDefaultFn; - + if (Plugin ->MallocZeroPtr != NULL) ptr ->MallocZeroPtr = Plugin -> MallocZeroPtr; if (Plugin ->CallocPtr != NULL) ptr ->CallocPtr = Plugin -> CallocPtr; if (Plugin ->DupPtr != NULL) ptr ->DupPtr = Plugin -> DupPtr; - + } } @@ -220,12 +220,12 @@ void _cmsInstallAllocFunctions(cmsPluginMemHandler* Plugin, _cmsMemPluginChunkTy // Plug-in replacement entry cmsBool _cmsRegisterMemHandlerPlugin(cmsContext ContextID, cmsPluginBase *Data) { - cmsPluginMemHandler* Plugin = (cmsPluginMemHandler*) Data; + cmsPluginMemHandler* Plugin = (cmsPluginMemHandler*) Data; _cmsMemPluginChunkType* ptr; - // NULL forces to reset to defaults. In this special case, the defaults are stored in the context structure. + // NULL forces to reset to defaults. In this special case, the defaults are stored in the context structure. // Remaining plug-ins does NOT have any copy in the context structure, but this is somehow special as the - // context internal data should be malloce'd by using those functions. + // context internal data should be malloce'd by using those functions. if (Data == NULL) { struct _cmsContext_struct* ctx = ( struct _cmsContext_struct*) ContextID; @@ -244,15 +244,15 @@ cmsBool _cmsRegisterMemHandlerPlugin(cmsContext ContextID, cmsPluginBase *Data) // Set replacement functions ptr = (_cmsMemPluginChunkType*) _cmsContextGetClientChunk(ContextID, MemPlugin); - if (ptr == NULL) + if (ptr == NULL) return FALSE; _cmsInstallAllocFunctions(Plugin, ptr); return TRUE; } #else -#include "core/include/fxcrt/fx_memory.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/include/fx_system.h" cmsBool _cmsRegisterMemHandlerPlugin(cmsContext ContextID, cmsPluginBase* Plugin) { @@ -303,7 +303,7 @@ void* CMSEXPORT _cmsDupMem(cmsContext ContextID, const void* Org, cmsUInt32Numbe return p; } -_cmsMemPluginChunkType _cmsMemPluginChunk = {_cmsMalloc, _cmsMallocZero, _cmsFree, +_cmsMemPluginChunkType _cmsMemPluginChunk = {_cmsMalloc, _cmsMallocZero, _cmsFree, _cmsRealloc, _cmsCalloc, _cmsDupMem }; @@ -311,16 +311,16 @@ void _cmsAllocMemPluginChunk(struct _cmsContext_struct* ctx, const struct _cmsCo { _cmsAssert(ctx != NULL); - if (src != NULL) { + if (src != NULL) { // Duplicate - ctx ->chunks[MemPlugin] = _cmsSubAllocDup(ctx ->MemPool, src ->chunks[MemPlugin], sizeof(_cmsMemPluginChunkType)); + ctx ->chunks[MemPlugin] = _cmsSubAllocDup(ctx ->MemPool, src ->chunks[MemPlugin], sizeof(_cmsMemPluginChunkType)); } else { // To reset it, we use the default allocators, which cannot be overriden ctx ->chunks[MemPlugin] = &ctx ->DefaultMemoryManager; - } + } } void _cmsInstallAllocFunctions(cmsPluginMemHandler* Plugin, _cmsMemPluginChunkType* ptr) @@ -458,7 +458,7 @@ void* _cmsSubAlloc(_cmsSubAllocator* sub, cmsUInt32Number size) void* _cmsSubAllocDup(_cmsSubAllocator* s, const void *ptr, cmsUInt32Number size) { void *NewPtr; - + // Dup of null pointer is also NULL if (ptr == NULL) return NULL; @@ -500,20 +500,20 @@ _cmsLogErrorChunkType _cmsLogErrorChunk = { DefaultLogErrorHandlerFunction }; // Allocates and inits error logger container for a given context. If src is NULL, only initializes the value // to the default. Otherwise, it duplicates the value. The interface is standard across all context clients -void _cmsAllocLogErrorChunk(struct _cmsContext_struct* ctx, +void _cmsAllocLogErrorChunk(struct _cmsContext_struct* ctx, const struct _cmsContext_struct* src) -{ +{ static _cmsLogErrorChunkType LogErrorChunk = { DefaultLogErrorHandlerFunction }; void* from; - + if (src != NULL) { - from = src ->chunks[Logger]; + from = src ->chunks[Logger]; } else { from = &LogErrorChunk; } - - ctx ->chunks[Logger] = _cmsSubAllocDup(ctx ->MemPool, from, sizeof(_cmsLogErrorChunkType)); + + ctx ->chunks[Logger] = _cmsSubAllocDup(ctx ->MemPool, from, sizeof(_cmsLogErrorChunkType)); } // The default error logger does nothing. @@ -545,7 +545,7 @@ void CMSEXPORT cmsSetLogErrorHandlerTHR(cmsContext ContextID, cmsLogErrorHandler // Change log error, legacy void CMSEXPORT cmsSetLogErrorHandler(cmsLogErrorHandlerFunction Fn) { - cmsSetLogErrorHandlerTHR(NULL, Fn); + cmsSetLogErrorHandlerTHR(NULL, Fn); } // Log an error @@ -565,7 +565,7 @@ void CMSEXPORT cmsSignalError(cmsContext ContextID, cmsUInt32Number ErrorCode, c lhg = (_cmsLogErrorChunkType*) _cmsContextGetClientChunk(ContextID, Logger); if (lhg ->LogErrorHandler) { lhg ->LogErrorHandler(ContextID, ErrorCode, Buffer); - } + } } // Utility function to print signatures @@ -591,13 +591,13 @@ void* defMtxCreate(cmsContext id) { _cmsMutex* ptr_mutex = (_cmsMutex*) _cmsMalloc(id, sizeof(_cmsMutex)); _cmsInitMutexPrimitive(ptr_mutex); - return (void*) ptr_mutex; + return (void*) ptr_mutex; } static void defMtxDestroy(cmsContext id, void* mtx) { - _cmsDestroyMutexPrimitive((_cmsMutex *) mtx); + _cmsDestroyMutexPrimitive((_cmsMutex *) mtx); _cmsFree(id, mtx); } @@ -605,14 +605,14 @@ static cmsBool defMtxLock(cmsContext id, void* mtx) { cmsUNUSED_PARAMETER(id); - return _cmsLockPrimitive((_cmsMutex *) mtx) == 0; + return _cmsLockPrimitive((_cmsMutex *) mtx) == 0; } static void defMtxUnlock(cmsContext id, void* mtx) { cmsUNUSED_PARAMETER(id); - _cmsUnlockPrimitive((_cmsMutex *) mtx); + _cmsUnlockPrimitive((_cmsMutex *) mtx); } @@ -621,20 +621,20 @@ void defMtxUnlock(cmsContext id, void* mtx) _cmsMutexPluginChunkType _cmsMutexPluginChunk = { defMtxCreate, defMtxDestroy, defMtxLock, defMtxUnlock }; // Allocate and init mutex container. -void _cmsAllocMutexPluginChunk(struct _cmsContext_struct* ctx, +void _cmsAllocMutexPluginChunk(struct _cmsContext_struct* ctx, const struct _cmsContext_struct* src) { static _cmsMutexPluginChunkType MutexChunk = {defMtxCreate, defMtxDestroy, defMtxLock, defMtxUnlock }; void* from; - + if (src != NULL) { - from = src ->chunks[MutexPlugin]; + from = src ->chunks[MutexPlugin]; } else { from = &MutexChunk; } - - ctx ->chunks[MutexPlugin] = _cmsSubAllocDup(ctx ->MemPool, from, sizeof(_cmsMutexPluginChunkType)); + + ctx ->chunks[MutexPlugin] = _cmsSubAllocDup(ctx ->MemPool, from, sizeof(_cmsMutexPluginChunkType)); } // Register new ways to transform @@ -646,15 +646,15 @@ cmsBool _cmsRegisterMutexPlugin(cmsContext ContextID, cmsPluginBase* Data) if (Data == NULL) { // No lock routines - ctx->CreateMutexPtr = NULL; - ctx->DestroyMutexPtr = NULL; + ctx->CreateMutexPtr = NULL; + ctx->DestroyMutexPtr = NULL; ctx->LockMutexPtr = NULL; ctx ->UnlockMutexPtr = NULL; return TRUE; } // Factory callback is required - if (Plugin ->CreateMutexPtr == NULL || Plugin ->DestroyMutexPtr == NULL || + if (Plugin ->CreateMutexPtr == NULL || Plugin ->DestroyMutexPtr == NULL || Plugin ->LockMutexPtr == NULL || Plugin ->UnlockMutexPtr == NULL) return FALSE; diff --git a/third_party/libjpeg/jinclude.h b/third_party/libjpeg/jinclude.h index 157a606e22..94a09c2018 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 ca749da3ff..b80d197fa0 100644 --- a/third_party/libtiff/tiffconf.h +++ b/third_party/libtiff/tiffconf.h @@ -7,7 +7,7 @@ #ifndef _TIFFCONF_ #define _TIFFCONF_ -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 053dd60caa..c9d8c16845 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" #ifdef HAVE_HIDDEN # define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) diff --git a/xfa/DEPS b/xfa/DEPS index 4f814ac338..560dfc9733 100644 --- a/xfa/DEPS +++ b/xfa/DEPS @@ -1,4 +1,5 @@ include_rules = [ '+core/include', + '+core/fxcrt/include', '+third_party/bigint' ] diff --git a/xfa/fde/css/fde_csscache.cpp b/xfa/fde/css/fde_csscache.cpp index aba863ea70..4b7dd4b302 100644 --- a/xfa/fde/css/fde_csscache.cpp +++ b/xfa/fde/css/fde_csscache.cpp @@ -8,7 +8,7 @@ #include -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" FDE_CSSCacheItem::FDE_CSSCacheItem(IFDE_CSSStyleSheet* p) : pStylesheet(p), dwActivity(0) { diff --git a/xfa/fde/css/fde_cssdatatable.cpp b/xfa/fde/css/fde_cssdatatable.cpp index 8f448d8536..e2dff57008 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/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" #include "xfa/fgas/crt/fgas_algorithm.h" #include "xfa/fgas/crt/fgas_codepage.h" #include "xfa/fgas/crt/fgas_system.h" diff --git a/xfa/fde/css/fde_cssdatatable.h b/xfa/fde/css/fde_cssdatatable.h index c96520a670..a44c24b614 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 decc397bdc..1340dae2c5 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/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" #include "xfa/fgas/crt/fgas_system.h" IFDE_CSSValue* CFDE_CSSDeclaration::GetProperty(FDE_CSSPROPERTY eProperty, diff --git a/xfa/fde/css/fde_cssstyleselector.h b/xfa/fde/css/fde_cssstyleselector.h index 5016e8f5cb..0584a2983f 100644 --- a/xfa/fde/css/fde_cssstyleselector.h +++ b/xfa/fde/css/fde_cssstyleselector.h @@ -9,7 +9,7 @@ #include -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/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 e6f4f2904d..882f80f366 100644 --- a/xfa/fde/css/fde_cssstylesheet.h +++ b/xfa/fde/css/fde_cssstylesheet.h @@ -7,7 +7,7 @@ #ifndef XFA_FDE_CSS_FDE_CSSSTYLESHEET_H_ #define XFA_FDE_CSS_FDE_CSSSTYLESHEET_H_ -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" #include "xfa/fde/css/fde_cssdeclaration.h" class CFDE_CSSSelector : public IFDE_CSSSelector, public CFX_Target { diff --git a/xfa/fde/fde_brush.h b/xfa/fde/fde_brush.h index 898ea01e46..cfa40a055f 100644 --- a/xfa/fde/fde_brush.h +++ b/xfa/fde/fde_brush.h @@ -7,7 +7,7 @@ #ifndef XFA_FDE_FDE_BRUSH_H_ #define XFA_FDE_FDE_BRUSH_H_ -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" #include "core/include/fxge/fx_dib.h" class IFDE_Image; diff --git a/xfa/fde/fde_path.h b/xfa/fde/fde_path.h index 9ffba6c199..41d2a66e0a 100644 --- a/xfa/fde/fde_path.h +++ b/xfa/fde/fde_path.h @@ -7,8 +7,8 @@ #ifndef XFA_FDE_FDE_PATH_H_ #define XFA_FDE_FDE_PATH_H_ -#include "core/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_system.h" class IFDE_Path { public: diff --git a/xfa/fde/fde_render.h b/xfa/fde/fde_render.h index 2cf7e5cf92..2b09ed67ac 100644 --- a/xfa/fde/fde_render.h +++ b/xfa/fde/fde_render.h @@ -7,7 +7,7 @@ #ifndef XFA_FDE_FDE_RENDER_H_ #define XFA_FDE_FDE_RENDER_H_ -#include "core/include/fxcrt/fx_coordinates.h" +#include "core/fxcrt/include/fx_coordinates.h" #include "xfa/fde/fde_visualset.h" class IFDE_RenderDevice; diff --git a/xfa/fde/fde_renderdevice.h b/xfa/fde/fde_renderdevice.h index a9e7190c54..58da7759fa 100644 --- a/xfa/fde/fde_renderdevice.h +++ b/xfa/fde/fde_renderdevice.h @@ -7,7 +7,7 @@ #ifndef XFA_FDE_FDE_RENDERDEVICE_H_ #define XFA_FDE_FDE_RENDERDEVICE_H_ -#include "core/include/fxcrt/fx_coordinates.h" +#include "core/fxcrt/include/fx_coordinates.h" #include "core/include/fxge/fx_font.h" #include "core/include/fxge/fx_ge.h" #include "xfa/fde/fde_path.h" diff --git a/xfa/fde/fde_visualset.h b/xfa/fde/fde_visualset.h index 5da21fb842..593d42de20 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/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_system.h" #include "core/include/fxge/fx_dib.h" #include "core/include/fxge/fx_ge.h" #include "xfa/fde/fde_brush.h" diff --git a/xfa/fde/tto/fde_textout.cpp b/xfa/fde/tto/fde_textout.cpp index 2105cf09b0..a7b10749e6 100644 --- a/xfa/fde/tto/fde_textout.cpp +++ b/xfa/fde/tto/fde_textout.cpp @@ -8,8 +8,8 @@ #include -#include "core/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_system.h" #include "xfa/fde/fde_brush.h" #include "xfa/fde/fde_pen.h" #include "xfa/fde/fde_renderdevice.h" diff --git a/xfa/fde/xml/fde_xml_imp.h b/xfa/fde/xml/fde_xml_imp.h index 79d77d93eb..f30e12a7bb 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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/fee/fde_txtedtengine.h b/xfa/fee/fde_txtedtengine.h index 9dc4c4eae2..170c0598de 100644 --- a/xfa/fee/fde_txtedtengine.h +++ b/xfa/fee/fde_txtedtengine.h @@ -7,7 +7,7 @@ #ifndef XFA_FEE_FDE_TXTEDTENGINE_H_ #define XFA_FEE_FDE_TXTEDTENGINE_H_ -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_string.h" #include "xfa/fee/ifde_txtedtbuf.h" #include "xfa/fee/ifde_txtedtengine.h" diff --git a/xfa/fee/fde_txtedtpage.h b/xfa/fee/fde_txtedtpage.h index 66c4c49282..c7a3cb522a 100644 --- a/xfa/fee/fde_txtedtpage.h +++ b/xfa/fee/fde_txtedtpage.h @@ -7,8 +7,8 @@ #ifndef XFA_FEE_FDE_TXTEDTPAGE_H_ #define XFA_FEE_FDE_TXTEDTPAGE_H_ -#include "core/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_string.h" #include "xfa/fde/fde_visualset.h" #include "xfa/fee/ifde_txtedtpage.h" #include "xfa/fgas/crt/fgas_utils.h" diff --git a/xfa/fee/fx_wordbreak/fx_wordbreak.h b/xfa/fee/fx_wordbreak/fx_wordbreak.h index 0288b5926b..fb35230136 100644 --- a/xfa/fee/fx_wordbreak/fx_wordbreak.h +++ b/xfa/fee/fx_wordbreak/fx_wordbreak.h @@ -7,8 +7,8 @@ #ifndef XFA_FEE_FX_WORDBREAK_FX_WORDBREAK_H_ #define XFA_FEE_FX_WORDBREAK_FX_WORDBREAK_H_ -#include "core/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" class IFX_CharIter; diff --git a/xfa/fee/fx_wordbreak/fx_wordbreak_impl.h b/xfa/fee/fx_wordbreak/fx_wordbreak_impl.h index e7421ca1af..16c429b5fe 100644 --- a/xfa/fee/fx_wordbreak/fx_wordbreak_impl.h +++ b/xfa/fee/fx_wordbreak/fx_wordbreak_impl.h @@ -9,8 +9,8 @@ #include -#include "core/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" #include "xfa/fee/fx_wordbreak/fx_wordbreak.h" #include "xfa/fee/fx_wordbreak/fx_wordbreak_impl.h" #include "xfa/fee/ifde_txtedtengine.h" diff --git a/xfa/fee/ifde_txtedtbuf.h b/xfa/fee/ifde_txtedtbuf.h index 0459af4ff8..db744b1b54 100644 --- a/xfa/fee/ifde_txtedtbuf.h +++ b/xfa/fee/ifde_txtedtbuf.h @@ -7,7 +7,7 @@ #ifndef XFA_FEE_IFDE_TXTEDTBUF_H_ #define XFA_FEE_IFDE_TXTEDTBUF_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #define FDE_DEFCHUNKLENGTH (1024) diff --git a/xfa/fgas/crt/fgas_algorithm.cpp b/xfa/fgas/crt/fgas_algorithm.cpp index b351292519..8f13cb3045 100644 --- a/xfa/fgas/crt/fgas_algorithm.cpp +++ b/xfa/fgas/crt/fgas_algorithm.cpp @@ -6,7 +6,7 @@ #include "xfa/fgas/crt/fgas_algorithm.h" -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #ifdef __cplusplus extern "C" { diff --git a/xfa/fgas/crt/fgas_algorithm.h b/xfa/fgas/crt/fgas_algorithm.h index 662b1b62a9..94a0d06f9e 100644 --- a/xfa/fgas/crt/fgas_algorithm.h +++ b/xfa/fgas/crt/fgas_algorithm.h @@ -9,7 +9,7 @@ #include -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #ifdef __cplusplus extern "C" { diff --git a/xfa/fgas/crt/fgas_codepage.cpp b/xfa/fgas/crt/fgas_codepage.cpp index dcf3dfa690..57d97db83c 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/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/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 fe69f7ce93..15bdd74487 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/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 a9c5cc97e7..ac27755cac 100644 --- a/xfa/fgas/crt/fgas_memory.h +++ b/xfa/fgas/crt/fgas_memory.h @@ -7,8 +7,8 @@ #ifndef XFA_FGAS_CRT_FGAS_MEMORY_H_ #define XFA_FGAS_CRT_FGAS_MEMORY_H_ -#include "core/include/fxcrt/fx_memory.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_memory.h" +#include "core/fxcrt/include/fx_system.h" class IFX_MEMAllocator; class CFX_Target; diff --git a/xfa/fgas/crt/fgas_stream.h b/xfa/fgas/crt/fgas_stream.h index 94b7f01ed6..fd977c4a1b 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/include/fxcrt/fx_stream.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_stream.h" +#include "core/fxcrt/include/fx_system.h" class IFX_Stream; diff --git a/xfa/fgas/crt/fgas_system.cpp b/xfa/fgas/crt/fgas_system.cpp index 9d76a60118..e6d89a50af 100644 --- a/xfa/fgas/crt/fgas_system.cpp +++ b/xfa/fgas/crt/fgas_system.cpp @@ -8,7 +8,7 @@ #include -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN32_MOBILE_ || \ _FX_OS_ == _FX_WIN64_ diff --git a/xfa/fgas/crt/fgas_system.h b/xfa/fgas/crt/fgas_system.h index 4335c35541..d4bebcadff 100644 --- a/xfa/fgas/crt/fgas_system.h +++ b/xfa/fgas/crt/fgas_system.h @@ -7,7 +7,7 @@ #ifndef XFA_FGAS_CRT_FGAS_SYSTEM_H_ #define XFA_FGAS_CRT_FGAS_SYSTEM_H_ -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" #define FX_RAD2DEG(r) ((r)*180.0f / FX_PI) #define FX_DEG2RAD(a) ((a)*FX_PI / 180.0f) diff --git a/xfa/fgas/crt/fgas_utils.cpp b/xfa/fgas/crt/fgas_utils.cpp index 7a85fbb7ba..0d020ec38f 100644 --- a/xfa/fgas/crt/fgas_utils.cpp +++ b/xfa/fgas/crt/fgas_utils.cpp @@ -8,7 +8,7 @@ #include -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/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 1138cfd7c9..cb133b0c33 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/include/fxcrt/fx_coordinates.h" +#include "core/fxcrt/include/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 e115e0f42d..a0767d74f5 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/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" #include "xfa/fgas/font/fgas_font.h" FX_DWORD FGAS_GetFontHashCode(uint16_t wCodePage, FX_DWORD dwFontStyles) { diff --git a/xfa/fgas/font/fgas_fontutils.h b/xfa/fgas/font/fgas_fontutils.h index d5608063ca..764aa6b937 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/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_string.h" struct FGAS_FONTUSB { uint16_t wStartUnicode; diff --git a/xfa/fgas/font/fgas_stdfontmgr.cpp b/xfa/fgas/font/fgas_stdfontmgr.cpp index 331ea86582..a2eae837da 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/include/fxcrt/fx_stream.h" +#include "core/fxcrt/include/fx_stream.h" #include "xfa/fgas/crt/fgas_codepage.h" #include "xfa/fgas/font/fgas_fontutils.h" diff --git a/xfa/fgas/font/fgas_stdfontmgr.h b/xfa/fgas/font/fgas_stdfontmgr.h index e548cf5d2b..574eefad23 100644 --- a/xfa/fgas/font/fgas_stdfontmgr.h +++ b/xfa/fgas/font/fgas_stdfontmgr.h @@ -7,7 +7,7 @@ #ifndef XFA_FGAS_FONT_FGAS_STDFONTMGR_H_ #define XFA_FGAS_FONT_FGAS_STDFONTMGR_H_ -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" #include "core/include/fxge/fx_freetype.h" #include "core/include/fxge/fx_ge.h" #include "third_party/freetype/include/freetype/fttypes.h" diff --git a/xfa/fgas/layout/fgas_linebreak.cpp b/xfa/fgas/layout/fgas_linebreak.cpp index 4e5b405f5a..295b5b6b86 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/include/fxcrt/fx_ucd.h" +#include "core/fxcrt/include/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 f1ecad74d0..1333937db1 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 dd150a3002..c856b27b70 100644 --- a/xfa/fgas/layout/fgas_rtfbreak.cpp +++ b/xfa/fgas/layout/fgas_rtfbreak.cpp @@ -8,7 +8,7 @@ #include -#include "core/include/fxcrt/fx_arb.h" +#include "core/fxcrt/include/fx_arb.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 7e395f6918..8549d0c93c 100644 --- a/xfa/fgas/layout/fgas_rtfbreak.h +++ b/xfa/fgas/layout/fgas_rtfbreak.h @@ -7,7 +7,7 @@ #ifndef XFA_FGAS_LAYOUT_FGAS_RTFBREAK_H_ #define XFA_FGAS_LAYOUT_FGAS_RTFBREAK_H_ -#include "core/include/fxcrt/fx_ucd.h" +#include "core/fxcrt/include/fx_ucd.h" #include "core/include/fxge/fx_ge.h" #include "xfa/fgas/crt/fgas_memory.h" #include "xfa/fgas/crt/fgas_utils.h" diff --git a/xfa/fgas/layout/fgas_textbreak.cpp b/xfa/fgas/layout/fgas_textbreak.cpp index f182a6d413..990656b1d1 100644 --- a/xfa/fgas/layout/fgas_textbreak.cpp +++ b/xfa/fgas/layout/fgas_textbreak.cpp @@ -8,8 +8,8 @@ #include -#include "core/include/fxcrt/fx_arb.h" -#include "core/include/fxcrt/fx_memory.h" +#include "core/fxcrt/include/fx_arb.h" +#include "core/fxcrt/include/fx_memory.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 28731d436c..dd42fdf030 100644 --- a/xfa/fgas/layout/fgas_textbreak.h +++ b/xfa/fgas/layout/fgas_textbreak.h @@ -7,7 +7,7 @@ #ifndef XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_ #define XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_ -#include "core/include/fxcrt/fx_ucd.h" +#include "core/fxcrt/include/fx_ucd.h" #include "core/include/fxge/fx_ge.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 ac5ee4a01d..456e476dee 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 0a3d14d240..df2989fc58 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 db94f766b5..a0dcf8e3f4 100644 --- a/xfa/fgas/localization/fgas_locale.cpp +++ b/xfa/fgas/localization/fgas_locale.cpp @@ -6,8 +6,8 @@ #include -#include "core/include/fxcrt/fx_ext.h" -#include "core/include/fxcrt/fx_xml.h" +#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/include/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 3dd6c79fb7..20b6c1232e 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/include/fxcrt/fx_xml.h" +#include "core/fxcrt/include/fx_xml.h" #include "xfa/fgas/localization/fgas_datetime.h" class CFX_Unitime; diff --git a/xfa/fgas/localization/fgas_localemgr.cpp b/xfa/fgas/localization/fgas_localemgr.cpp index 02061f75f3..ba617a0f3f 100644 --- a/xfa/fgas/localization/fgas_localemgr.cpp +++ b/xfa/fgas/localization/fgas_localemgr.cpp @@ -6,7 +6,7 @@ #include "xfa/fgas/localization/fgas_localemgr.h" -#include "core/include/fxcrt/fx_xml.h" +#include "core/fxcrt/include/fx_xml.h" IFX_LocaleMgr* FX_LocaleMgr_Create(const FX_WCHAR* pszLocalPath, uint16_t wDefaultLCID) { diff --git a/xfa/fgas/xml/fgas_sax.h b/xfa/fgas/xml/fgas_sax.h index 222b109080..de5d91493d 100644 --- a/xfa/fgas/xml/fgas_sax.h +++ b/xfa/fgas/xml/fgas_sax.h @@ -7,7 +7,7 @@ #ifndef XFA_FGAS_XML_FGAS_SAX_H_ #define XFA_FGAS_XML_FGAS_SAX_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #define FX_SAXPARSEMODE_NotConvert_amp 0x0001 #define FX_SAXPARSEMODE_NotConvert_lt 0x0002 diff --git a/xfa/fwl/basewidget/fxmath_barcodeimp.h b/xfa/fwl/basewidget/fxmath_barcodeimp.h index 077aeea952..30fe400ca1 100644 --- a/xfa/fwl/basewidget/fxmath_barcodeimp.h +++ b/xfa/fwl/basewidget/fxmath_barcodeimp.h @@ -7,8 +7,8 @@ #ifndef XFA_FWL_BASEWIDGET_FXMATH_BARCODEIMP_H_ #define XFA_FWL_BASEWIDGET_FXMATH_BARCODEIMP_H_ -#include "core/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" #include "xfa/fxbarcode/include/BC_Library.h" #include "xfa/include/fwl/basewidget/fxmath_barcode.h" diff --git a/xfa/fwl/core/fwl_noteimp.cpp b/xfa/fwl/core/fwl_noteimp.cpp index cadace4fca..6553454ff0 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/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" #include "xfa/fwl/basewidget/fwl_tooltipctrlimp.h" #include "xfa/fwl/core/fwl_appimp.h" #include "xfa/fwl/core/fwl_formimp.h" diff --git a/xfa/fwl/core/fwl_sdadapterimp.cpp b/xfa/fwl/core/fwl_sdadapterimp.cpp index 88df9bce43..550c4cc1ef 100644 --- a/xfa/fwl/core/fwl_sdadapterimp.cpp +++ b/xfa/fwl/core/fwl_sdadapterimp.cpp @@ -6,7 +6,7 @@ #include "xfa/include/fwl/adapter/fwl_sdadapterimp.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" #include "xfa/fwl/core/fwl_noteimp.h" #include "xfa/fwl/core/fwl_targetimp.h" #include "xfa/fwl/core/fwl_threadimp.h" diff --git a/xfa/fwl/core/fwl_targetimp.h b/xfa/fwl/core/fwl_targetimp.h index 8aeca79708..616c1acd01 100644 --- a/xfa/fwl/core/fwl_targetimp.h +++ b/xfa/fwl/core/fwl_targetimp.h @@ -7,7 +7,7 @@ #ifndef XFA_FWL_CORE_FWL_TARGETIMP_H_ #define XFA_FWL_CORE_FWL_TARGETIMP_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "xfa/include/fwl/core/fwl_target.h" class CFWL_TargetImp { diff --git a/xfa/fwl/lightwidget/app.cpp b/xfa/fwl/lightwidget/app.cpp index 31a39c17f0..ca6462a2a6 100644 --- a/xfa/fwl/lightwidget/app.cpp +++ b/xfa/fwl/lightwidget/app.cpp @@ -6,7 +6,7 @@ #include "xfa/include/fwl/lightwidget/app.h" -#include "core/include/fxcrt/fx_coordinates.h" +#include "core/fxcrt/include/fx_coordinates.h" #include "xfa/include/fwl/core/fwl_app.h" #include "xfa/include/fwl/core/fwl_error.h" #include "xfa/include/fwl/lightwidget/theme.h" diff --git a/xfa/fxbarcode/BC_BufferedImageLuminanceSource.h b/xfa/fxbarcode/BC_BufferedImageLuminanceSource.h index e39f4d638c..e27dd1df3d 100644 --- a/xfa/fxbarcode/BC_BufferedImageLuminanceSource.h +++ b/xfa/fxbarcode/BC_BufferedImageLuminanceSource.h @@ -7,8 +7,8 @@ #ifndef XFA_FXBARCODE_BC_BUFFEREDIMAGELUMINANCESOURCE_H_ #define XFA_FXBARCODE_BC_BUFFEREDIMAGELUMINANCESOURCE_H_ -#include "core/include/fxcrt/fx_basic.h" -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/include/fx_string.h" #include "core/include/fxge/fx_dib.h" #include "xfa/fxbarcode/BC_LuminanceSource.h" diff --git a/xfa/fxbarcode/BC_DecoderResult.h b/xfa/fxbarcode/BC_DecoderResult.h index c3008c52bf..81d7856633 100644 --- a/xfa/fxbarcode/BC_DecoderResult.h +++ b/xfa/fxbarcode/BC_DecoderResult.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_BC_DECODERRESULT_H_ #define XFA_FXBARCODE_BC_DECODERRESULT_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_DecoderResult { public: diff --git a/xfa/fxbarcode/BC_Dimension.h b/xfa/fxbarcode/BC_Dimension.h index e3253b38ad..2dd37683a0 100644 --- a/xfa/fxbarcode/BC_Dimension.h +++ b/xfa/fxbarcode/BC_Dimension.h @@ -9,7 +9,7 @@ #include -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_string.h" class CBC_Dimension { public: diff --git a/xfa/fxbarcode/BC_LuminanceSource.h b/xfa/fxbarcode/BC_LuminanceSource.h index b4b3ebc03c..753c46979a 100644 --- a/xfa/fxbarcode/BC_LuminanceSource.h +++ b/xfa/fxbarcode/BC_LuminanceSource.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_BC_LUMINANCESOURCE_H_ #define XFA_FXBARCODE_BC_LUMINANCESOURCE_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_LuminanceSource { public: diff --git a/xfa/fxbarcode/BC_Reader.h b/xfa/fxbarcode/BC_Reader.h index 12cfd243e5..8daea1d3c1 100644 --- a/xfa/fxbarcode/BC_Reader.h +++ b/xfa/fxbarcode/BC_Reader.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_BC_READER_H_ #define XFA_FXBARCODE_BC_READER_H_ -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_string.h" class CBC_BinaryBitmap; diff --git a/xfa/fxbarcode/BC_ResultPoint.h b/xfa/fxbarcode/BC_ResultPoint.h index 721adb1eaa..1497b311fc 100644 --- a/xfa/fxbarcode/BC_ResultPoint.h +++ b/xfa/fxbarcode/BC_ResultPoint.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_BC_RESULTPOINT_H_ #define XFA_FXBARCODE_BC_RESULTPOINT_H_ -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" class CBC_ResultPoint { public: diff --git a/xfa/fxbarcode/BC_UtilCodingConvert.h b/xfa/fxbarcode/BC_UtilCodingConvert.h index 2d5c9f3892..ea36d481b6 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_UtilCodingConvert { public: diff --git a/xfa/fxbarcode/BC_UtilRSS.cpp b/xfa/fxbarcode/BC_UtilRSS.cpp index 0d6133cf40..19a8f97b19 100644 --- a/xfa/fxbarcode/BC_UtilRSS.cpp +++ b/xfa/fxbarcode/BC_UtilRSS.cpp @@ -24,7 +24,7 @@ #include -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "xfa/fxbarcode/utils.h" CBC_UtilRSS::CBC_UtilRSS() {} diff --git a/xfa/fxbarcode/BC_UtilRSS.h b/xfa/fxbarcode/BC_UtilRSS.h index b81804e0c8..f66f5279fe 100644 --- a/xfa/fxbarcode/BC_UtilRSS.h +++ b/xfa/fxbarcode/BC_UtilRSS.h @@ -9,7 +9,7 @@ #include -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_UtilRSS { public: diff --git a/xfa/fxbarcode/BC_Utils.cpp b/xfa/fxbarcode/BC_Utils.cpp index 02719689e6..b69b4d251d 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/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 bff3642b94..0b7719a541 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/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_string.h" #include "core/include/fxge/fx_dib.h" #include "xfa/fxbarcode/utils.h" diff --git a/xfa/fxbarcode/cbc_codabar.h b/xfa/fxbarcode/cbc_codabar.h index 8da2383fc5..bab39a8496 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/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_system.h" #include "core/include/fxge/fx_dib.h" #include "xfa/fxbarcode/cbc_onecode.h" diff --git a/xfa/fxbarcode/cbc_code128.h b/xfa/fxbarcode/cbc_code128.h index 3f12e1bc75..33005b1dd3 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/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_system.h" #include "core/include/fxge/fx_dib.h" #include "xfa/fxbarcode/cbc_onecode.h" diff --git a/xfa/fxbarcode/cbc_code39.h b/xfa/fxbarcode/cbc_code39.h index 9e296650a8..c93b7d7d7c 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/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" #include "core/include/fxge/fx_dib.h" #include "xfa/fxbarcode/cbc_onecode.h" diff --git a/xfa/fxbarcode/cbc_codebase.h b/xfa/fxbarcode/cbc_codebase.h index 20f25b58b0..145b929c00 100644 --- a/xfa/fxbarcode/cbc_codebase.h +++ b/xfa/fxbarcode/cbc_codebase.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_CBC_CODEBASE_H_ #define XFA_FXBARCODE_CBC_CODEBASE_H_ -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" #include "core/include/fxge/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 903d0b2472..ea1e136477 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/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" #include "core/include/fxge/fx_dib.h" #include "xfa/fxbarcode/cbc_codebase.h" diff --git a/xfa/fxbarcode/cbc_ean13.h b/xfa/fxbarcode/cbc_ean13.h index c9ecc90cd9..eaf95fe8ab 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/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" #include "core/include/fxge/fx_dib.h" #include "xfa/fxbarcode/cbc_onecode.h" diff --git a/xfa/fxbarcode/cbc_ean8.h b/xfa/fxbarcode/cbc_ean8.h index 95a61d2ab3..fd582deb13 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/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" #include "core/include/fxge/fx_dib.h" #include "xfa/fxbarcode/cbc_onecode.h" diff --git a/xfa/fxbarcode/cbc_onecode.h b/xfa/fxbarcode/cbc_onecode.h index ac070a496c..7c32cf8606 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/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/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 b8f45fa098..9ad387cada 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/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" #include "core/include/fxge/fx_dib.h" #include "xfa/fxbarcode/cbc_codebase.h" diff --git a/xfa/fxbarcode/cbc_qrcode.h b/xfa/fxbarcode/cbc_qrcode.h index 1198194b97..ccf7d13beb 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/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" #include "core/include/fxge/fx_dib.h" #include "xfa/fxbarcode/cbc_codebase.h" diff --git a/xfa/fxbarcode/cbc_upca.h b/xfa/fxbarcode/cbc_upca.h index ee4c31bee4..1a94cfac0e 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/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" #include "core/include/fxge/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 6ddd789480..1c89500138 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_CommonBitArray { public: diff --git a/xfa/fxbarcode/common/BC_CommonBitMatrix.h b/xfa/fxbarcode/common/BC_CommonBitMatrix.h index 78b42641dd..ebf7454dca 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/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" class CBC_CommonBitArray; diff --git a/xfa/fxbarcode/common/BC_CommonBitSource.h b/xfa/fxbarcode/common/BC_CommonBitSource.h index 7617a6f19d..f33e077c68 100644 --- a/xfa/fxbarcode/common/BC_CommonBitSource.h +++ b/xfa/fxbarcode/common/BC_CommonBitSource.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_COMMON_BC_COMMONBITSOURCE_H_ #define XFA_FXBARCODE_COMMON_BC_COMMONBITSOURCE_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "xfa/fxbarcode/utils.h" class CBC_CommonBitSource { diff --git a/xfa/fxbarcode/common/BC_CommonByteArray.h b/xfa/fxbarcode/common/BC_CommonByteArray.h index 69d470b0e5..eaf68d9f41 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_CommonByteArray { private: diff --git a/xfa/fxbarcode/common/BC_CommonByteMatrix.cpp b/xfa/fxbarcode/common/BC_CommonByteMatrix.cpp index c9ed7495c0..05028bd395 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/include/fxcrt/fx_memory.h" +#include "core/fxcrt/include/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 271feef34f..74e1203481 100644 --- a/xfa/fxbarcode/common/BC_CommonByteMatrix.h +++ b/xfa/fxbarcode/common/BC_CommonByteMatrix.h @@ -9,7 +9,7 @@ #include -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" class CBC_CommonByteMatrix { public: diff --git a/xfa/fxbarcode/common/BC_CommonCharacterSetECI.h b/xfa/fxbarcode/common/BC_CommonCharacterSetECI.h index 18a676a449..5bd77e4fd1 100644 --- a/xfa/fxbarcode/common/BC_CommonCharacterSetECI.h +++ b/xfa/fxbarcode/common/BC_CommonCharacterSetECI.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_COMMON_BC_COMMONCHARACTERSETECI_H_ #define XFA_FXBARCODE_COMMON_BC_COMMONCHARACTERSETECI_H_ -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_string.h" #include "xfa/fxbarcode/common/BC_CommonECI.h" class CBC_CommonCharacterSetECI : public CBC_CommonECI { diff --git a/xfa/fxbarcode/common/BC_CommonDecoderResult.cpp b/xfa/fxbarcode/common/BC_CommonDecoderResult.cpp index 0c545c4eba..d28a88bfbc 100644 --- a/xfa/fxbarcode/common/BC_CommonDecoderResult.cpp +++ b/xfa/fxbarcode/common/BC_CommonDecoderResult.cpp @@ -20,7 +20,7 @@ * limitations under the License. */ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "xfa/fxbarcode/common/BC_CommonDecoderResult.h" #include "xfa/fxbarcode/pdf417/BC_PDF417ResultMetadata.h" #include "xfa/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.h" diff --git a/xfa/fxbarcode/common/BC_CommonDecoderResult.h b/xfa/fxbarcode/common/BC_CommonDecoderResult.h index dbdb9d34d4..9dc4b66dce 100644 --- a/xfa/fxbarcode/common/BC_CommonDecoderResult.h +++ b/xfa/fxbarcode/common/BC_CommonDecoderResult.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_COMMON_BC_COMMONDECODERRESULT_H_ #define XFA_FXBARCODE_COMMON_BC_COMMONDECODERRESULT_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_QRCoderErrorCorrectionLevel; class CBC_PDF417ResultMetadata; diff --git a/xfa/fxbarcode/common/BC_CommonPerspectiveTransform.cpp b/xfa/fxbarcode/common/BC_CommonPerspectiveTransform.cpp index daa6189e56..d84ed6163d 100644 --- a/xfa/fxbarcode/common/BC_CommonPerspectiveTransform.cpp +++ b/xfa/fxbarcode/common/BC_CommonPerspectiveTransform.cpp @@ -24,7 +24,7 @@ #include -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "xfa/fxbarcode/utils.h" CBC_CommonPerspectiveTransform::CBC_CommonPerspectiveTransform(FX_FLOAT a11, diff --git a/xfa/fxbarcode/common/BC_CommonPerspectiveTransform.h b/xfa/fxbarcode/common/BC_CommonPerspectiveTransform.h index 36defd8146..d701b7ec34 100644 --- a/xfa/fxbarcode/common/BC_CommonPerspectiveTransform.h +++ b/xfa/fxbarcode/common/BC_CommonPerspectiveTransform.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_COMMON_BC_COMMONPERSPECTIVETRANSFORM_H_ #define XFA_FXBARCODE_COMMON_BC_COMMONPERSPECTIVETRANSFORM_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_CommonPerspectiveTransform { public: diff --git a/xfa/fxbarcode/common/BC_GlobalHistogramBinarizer.h b/xfa/fxbarcode/common/BC_GlobalHistogramBinarizer.h index da13cac402..01ac9a6c2a 100644 --- a/xfa/fxbarcode/common/BC_GlobalHistogramBinarizer.h +++ b/xfa/fxbarcode/common/BC_GlobalHistogramBinarizer.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_COMMON_BC_GLOBALHISTOGRAMBINARIZER_H_ #define XFA_FXBARCODE_COMMON_BC_GLOBALHISTOGRAMBINARIZER_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "xfa/fxbarcode/BC_Binarizer.h" class CBC_CommonBitArray; diff --git a/xfa/fxbarcode/common/BC_WhiteRectangleDetector.h b/xfa/fxbarcode/common/BC_WhiteRectangleDetector.h index 3d6c01ceff..d713d0fa99 100644 --- a/xfa/fxbarcode/common/BC_WhiteRectangleDetector.h +++ b/xfa/fxbarcode/common/BC_WhiteRectangleDetector.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_COMMON_BC_WHITERECTANGLEDETECTOR_H_ #define XFA_FXBARCODE_COMMON_BC_WHITERECTANGLEDETECTOR_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_CommonBitMatrix; class CBC_ResultPoint; diff --git a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.h b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.h index 6f6aef7e7d..0dfa37ddb7 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_ReedSolomonGF256; class CBC_ReedSolomonGF256Poly; diff --git a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonDecoder.h b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonDecoder.h index ec14344fe0..f44f92072e 100644 --- a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonDecoder.h +++ b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonDecoder.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_COMMON_REEDSOLOMON_BC_REEDSOLOMONDECODER_H_ #define XFA_FXBARCODE_COMMON_REEDSOLOMON_BC_REEDSOLOMONDECODER_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/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 099cab57d5..cd788111ed 100644 --- a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.h +++ b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_COMMON_REEDSOLOMON_BC_REEDSOLOMONGF256_H_ #define XFA_FXBARCODE_COMMON_REEDSOLOMON_BC_REEDSOLOMONGF256_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/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 16a1f9066e..aa549efe60 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_ReedSolomonGF256; diff --git a/xfa/fxbarcode/datamatrix/BC_DataMatrixBitMatrixParser.h b/xfa/fxbarcode/datamatrix/BC_DataMatrixBitMatrixParser.h index 4c54d61eef..c8fc3346f1 100644 --- a/xfa/fxbarcode/datamatrix/BC_DataMatrixBitMatrixParser.h +++ b/xfa/fxbarcode/datamatrix/BC_DataMatrixBitMatrixParser.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_DATAMATRIX_BC_DATAMATRIXBITMATRIXPARSER_H_ #define XFA_FXBARCODE_DATAMATRIX_BC_DATAMATRIXBITMATRIXPARSER_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_CommonBitMatrix; class CBC_DataMatrixVersion; diff --git a/xfa/fxbarcode/datamatrix/BC_DataMatrixDataBlock.h b/xfa/fxbarcode/datamatrix/BC_DataMatrixDataBlock.h index 218bb0bb49..039255268f 100644 --- a/xfa/fxbarcode/datamatrix/BC_DataMatrixDataBlock.h +++ b/xfa/fxbarcode/datamatrix/BC_DataMatrixDataBlock.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_DATAMATRIX_BC_DATAMATRIXDATABLOCK_H_ #define XFA_FXBARCODE_DATAMATRIX_BC_DATAMATRIXDATABLOCK_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_DataMatrixVersion; diff --git a/xfa/fxbarcode/datamatrix/BC_DataMatrixDecoder.h b/xfa/fxbarcode/datamatrix/BC_DataMatrixDecoder.h index 2f70282d01..c7af613f6d 100644 --- a/xfa/fxbarcode/datamatrix/BC_DataMatrixDecoder.h +++ b/xfa/fxbarcode/datamatrix/BC_DataMatrixDecoder.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_DATAMATRIX_BC_DATAMATRIXDECODER_H_ #define XFA_FXBARCODE_DATAMATRIX_BC_DATAMATRIXDECODER_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_ReedSolomonDecoder; class CBC_CommonDecoderResult; diff --git a/xfa/fxbarcode/datamatrix/BC_DataMatrixDetector.h b/xfa/fxbarcode/datamatrix/BC_DataMatrixDetector.h index 62d1699c0a..589825fc38 100644 --- a/xfa/fxbarcode/datamatrix/BC_DataMatrixDetector.h +++ b/xfa/fxbarcode/datamatrix/BC_DataMatrixDetector.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_DATAMATRIX_BC_DATAMATRIXDETECTOR_H_ #define XFA_FXBARCODE_DATAMATRIX_BC_DATAMATRIXDETECTOR_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_CommonBitMatrix; class CBC_WhiteRectangleDetector; diff --git a/xfa/fxbarcode/datamatrix/BC_DataMatrixVersion.h b/xfa/fxbarcode/datamatrix/BC_DataMatrixVersion.h index 8a79355153..9e8e801d8e 100644 --- a/xfa/fxbarcode/datamatrix/BC_DataMatrixVersion.h +++ b/xfa/fxbarcode/datamatrix/BC_DataMatrixVersion.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_DATAMATRIX_BC_DATAMATRIXVERSION_H_ #define XFA_FXBARCODE_DATAMATRIX_BC_DATAMATRIXVERSION_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_DataMatrixVersion; diff --git a/xfa/fxbarcode/datamatrix/BC_DefaultPlacement.h b/xfa/fxbarcode/datamatrix/BC_DefaultPlacement.h index 49008f3356..f86cacee66 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_DefaultPlacement { public: diff --git a/xfa/fxbarcode/datamatrix/BC_SymbolInfo.h b/xfa/fxbarcode/datamatrix/BC_SymbolInfo.h index 8f7ed28da9..f5d6b8ae28 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/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" #include "xfa/fxbarcode/datamatrix/BC_SymbolShapeHint.h" class CBC_Dimension; diff --git a/xfa/fxbarcode/oned/BC_OneDimReader.h b/xfa/fxbarcode/oned/BC_OneDimReader.h index cc84ffd39a..f572d6fd1e 100644 --- a/xfa/fxbarcode/oned/BC_OneDimReader.h +++ b/xfa/fxbarcode/oned/BC_OneDimReader.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_ONED_BC_ONEDIMREADER_H_ #define XFA_FXBARCODE_ONED_BC_ONEDIMREADER_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "xfa/fxbarcode/oned/BC_OneDReader.h" class CBC_CommonBitArray; diff --git a/xfa/fxbarcode/oned/BC_OnedCodaBarReader.cpp b/xfa/fxbarcode/oned/BC_OnedCodaBarReader.cpp index 27f2191eac..5f8a0c25aa 100644 --- a/xfa/fxbarcode/oned/BC_OnedCodaBarReader.cpp +++ b/xfa/fxbarcode/oned/BC_OnedCodaBarReader.cpp @@ -25,7 +25,7 @@ #include #include -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "xfa/fxbarcode/BC_Reader.h" #include "xfa/fxbarcode/common/BC_CommonBitArray.h" #include "xfa/fxbarcode/oned/BC_OneDReader.h" diff --git a/xfa/fxbarcode/oned/BC_OnedCodaBarReader.h b/xfa/fxbarcode/oned/BC_OnedCodaBarReader.h index 678795dcf3..8fd2177a04 100644 --- a/xfa/fxbarcode/oned/BC_OnedCodaBarReader.h +++ b/xfa/fxbarcode/oned/BC_OnedCodaBarReader.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_ONED_BC_ONEDCODABARREADER_H_ #define XFA_FXBARCODE_ONED_BC_ONEDCODABARREADER_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "xfa/fxbarcode/oned/BC_OneDReader.h" class CBC_CommonBitArray; diff --git a/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h b/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h index 53af246796..d13601731b 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/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/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 5b68d5cd2e..aa6bd90f17 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/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" #include "xfa/fxbarcode/oned/BC_OneDimWriter.h" class CBC_OnedCode128Writer : public CBC_OneDimWriter { diff --git a/xfa/fxbarcode/oned/BC_OnedCode39Reader.h b/xfa/fxbarcode/oned/BC_OnedCode39Reader.h index 315ffa6faf..0d4591f95b 100644 --- a/xfa/fxbarcode/oned/BC_OnedCode39Reader.h +++ b/xfa/fxbarcode/oned/BC_OnedCode39Reader.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_ONED_BC_ONEDCODE39READER_H_ #define XFA_FXBARCODE_ONED_BC_ONEDCODE39READER_H_ -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" #include "xfa/fxbarcode/oned/BC_OneDReader.h" class CBC_CommonBitArray; diff --git a/xfa/fxbarcode/oned/BC_OnedEAN13Reader.h b/xfa/fxbarcode/oned/BC_OnedEAN13Reader.h index 4d01e42abf..5656540250 100644 --- a/xfa/fxbarcode/oned/BC_OnedEAN13Reader.h +++ b/xfa/fxbarcode/oned/BC_OnedEAN13Reader.h @@ -7,8 +7,8 @@ #ifndef XFA_FXBARCODE_ONED_BC_ONEDEAN13READER_H_ #define XFA_FXBARCODE_ONED_BC_ONEDEAN13READER_H_ -#include "core/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" #include "xfa/fxbarcode/oned/BC_OneDimReader.h" class CBC_CommonBitArray; diff --git a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.h b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.h index de17ac713e..75debc2508 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/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/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 9110d94e20..706393eb03 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/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" #include "xfa/fxbarcode/include/BC_Library.h" #include "xfa/fxbarcode/oned/BC_OneDimWriter.h" diff --git a/xfa/fxbarcode/oned/BC_OnedUPCAReader.cpp b/xfa/fxbarcode/oned/BC_OnedUPCAReader.cpp index 95b0f24775..50a8fbb2f9 100644 --- a/xfa/fxbarcode/oned/BC_OnedUPCAReader.cpp +++ b/xfa/fxbarcode/oned/BC_OnedUPCAReader.cpp @@ -20,7 +20,7 @@ * limitations under the License. */ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "xfa/fxbarcode/BC_Reader.h" #include "xfa/fxbarcode/oned/BC_OneDReader.h" #include "xfa/fxbarcode/oned/BC_OneDimReader.h" diff --git a/xfa/fxbarcode/oned/BC_OnedUPCAReader.h b/xfa/fxbarcode/oned/BC_OnedUPCAReader.h index 4d3f479b71..1f2ba6222c 100644 --- a/xfa/fxbarcode/oned/BC_OnedUPCAReader.h +++ b/xfa/fxbarcode/oned/BC_OnedUPCAReader.h @@ -7,8 +7,8 @@ #ifndef XFA_FXBARCODE_ONED_BC_ONEDUPCAREADER_H_ #define XFA_FXBARCODE_ONED_BC_ONEDUPCAREADER_H_ -#include "core/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" #include "xfa/fxbarcode/oned/BC_OneDimReader.h" class CBC_BinaryBitmap; diff --git a/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h b/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h index 38f3ca57dd..45d4eac620 100644 --- a/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h +++ b/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h @@ -7,8 +7,8 @@ #ifndef XFA_FXBARCODE_ONED_BC_ONEDUPCAWRITER_H_ #define XFA_FXBARCODE_ONED_BC_ONEDUPCAWRITER_H_ -#include "core/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/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 1aec33a964..2e46f80ce8 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417.h +++ b/xfa/fxbarcode/pdf417/BC_PDF417.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_PDF417_BC_PDF417_H_ #define XFA_FXBARCODE_PDF417_BC_PDF417_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/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 21ee44b65f..793bf0acf2 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_BarcodeRow; class CBC_BarcodeMatrix { diff --git a/xfa/fxbarcode/pdf417/BC_PDF417BarcodeRow.h b/xfa/fxbarcode/pdf417/BC_PDF417BarcodeRow.h index 007876a93c..80d931b587 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_BarcodeRow { public: diff --git a/xfa/fxbarcode/pdf417/BC_PDF417BarcodeValue.h b/xfa/fxbarcode/pdf417/BC_PDF417BarcodeValue.h index e99fb84cba..29f0a833a9 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417BarcodeValue.h +++ b/xfa/fxbarcode/pdf417/BC_PDF417BarcodeValue.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_PDF417_BC_PDF417BARCODEVALUE_H_ #define XFA_FXBARCODE_PDF417_BC_PDF417BARCODEVALUE_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_BarcodeValue { public: diff --git a/xfa/fxbarcode/pdf417/BC_PDF417BoundingBox.h b/xfa/fxbarcode/pdf417/BC_PDF417BoundingBox.h index 8b9563587d..3ae0e107ab 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417BoundingBox.h +++ b/xfa/fxbarcode/pdf417/BC_PDF417BoundingBox.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_PDF417_BC_PDF417BOUNDINGBOX_H_ #define XFA_FXBARCODE_PDF417_BC_PDF417BOUNDINGBOX_H_ -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" class CBC_CommonBitMatrix; class CBC_ResultPoint; diff --git a/xfa/fxbarcode/pdf417/BC_PDF417Codeword.h b/xfa/fxbarcode/pdf417/BC_PDF417Codeword.h index e1ca60f229..d397485b1d 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417Codeword.h +++ b/xfa/fxbarcode/pdf417/BC_PDF417Codeword.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_PDF417_BC_PDF417CODEWORD_H_ #define XFA_FXBARCODE_PDF417_BC_PDF417CODEWORD_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_Codeword { public: diff --git a/xfa/fxbarcode/pdf417/BC_PDF417CodewordDecoder.h b/xfa/fxbarcode/pdf417/BC_PDF417CodewordDecoder.h index e5f8c0b144..4c31b31ea2 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417CodewordDecoder.h +++ b/xfa/fxbarcode/pdf417/BC_PDF417CodewordDecoder.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_PDF417_BC_PDF417CODEWORDDECODER_H_ #define XFA_FXBARCODE_PDF417_BC_PDF417CODEWORDDECODER_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_PDF417CodewordDecoder { public: diff --git a/xfa/fxbarcode/pdf417/BC_PDF417Common.h b/xfa/fxbarcode/pdf417/BC_PDF417Common.h index 7e272b8a36..5e05b542e6 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417Common.h +++ b/xfa/fxbarcode/pdf417/BC_PDF417Common.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_PDF417_BC_PDF417COMMON_H_ #define XFA_FXBARCODE_PDF417_BC_PDF417COMMON_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_PDF417Common { public: diff --git a/xfa/fxbarcode/pdf417/BC_PDF417DecodedBitStreamParser.h b/xfa/fxbarcode/pdf417/BC_PDF417DecodedBitStreamParser.h index 747a4ceb5d..e08fb15427 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417DecodedBitStreamParser.h +++ b/xfa/fxbarcode/pdf417/BC_PDF417DecodedBitStreamParser.h @@ -7,8 +7,8 @@ #ifndef XFA_FXBARCODE_PDF417_BC_PDF417DECODEDBITSTREAMPARSER_H_ #define XFA_FXBARCODE_PDF417_BC_PDF417DECODEDBITSTREAMPARSER_H_ -#include "core/include/fxcrt/fx_basic.h" -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/include/fx_string.h" class CBC_CommonDecoderResult; class CBC_PDF417ResultMetadata; diff --git a/xfa/fxbarcode/pdf417/BC_PDF417DetectionResultRowIndicatorColumn.cpp b/xfa/fxbarcode/pdf417/BC_PDF417DetectionResultRowIndicatorColumn.cpp index 22fd25df8b..bdcd91052c 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417DetectionResultRowIndicatorColumn.cpp +++ b/xfa/fxbarcode/pdf417/BC_PDF417DetectionResultRowIndicatorColumn.cpp @@ -20,7 +20,7 @@ * limitations under the License. */ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "xfa/fxbarcode/BC_ResultPoint.h" #include "xfa/fxbarcode/pdf417/BC_PDF417BarcodeMetadata.h" #include "xfa/fxbarcode/pdf417/BC_PDF417BarcodeValue.h" diff --git a/xfa/fxbarcode/pdf417/BC_PDF417DetectorResult.h b/xfa/fxbarcode/pdf417/BC_PDF417DetectorResult.h index 0eea685fbc..558111a28a 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417DetectorResult.h +++ b/xfa/fxbarcode/pdf417/BC_PDF417DetectorResult.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_PDF417_BC_PDF417DETECTORRESULT_H_ #define XFA_FXBARCODE_PDF417_BC_PDF417DETECTORRESULT_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_CommonBitMatrix; diff --git a/xfa/fxbarcode/pdf417/BC_PDF417ErrorCorrection.h b/xfa/fxbarcode/pdf417/BC_PDF417ErrorCorrection.h index 39a7442036..b97638660f 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417ErrorCorrection.h +++ b/xfa/fxbarcode/pdf417/BC_PDF417ErrorCorrection.h @@ -9,7 +9,7 @@ #include -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_string.h" class CBC_PDF417ErrorCorrection { public: diff --git a/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h b/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h index 0ba01265f9..29c56174a5 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/include/fxcrt/fx_basic.h" -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/include/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 8e1837071d..92d1e5682d 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/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_PDF417Reader.h b/xfa/fxbarcode/pdf417/BC_PDF417Reader.h index f1e0eda8b6..808de29014 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417Reader.h +++ b/xfa/fxbarcode/pdf417/BC_PDF417Reader.h @@ -7,8 +7,8 @@ #ifndef XFA_FXBARCODE_PDF417_BC_PDF417READER_H_ #define XFA_FXBARCODE_PDF417_BC_PDF417READER_H_ -#include "core/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" #include "xfa/fxbarcode/BC_Reader.h" class CBC_BinaryBitmap; diff --git a/xfa/fxbarcode/pdf417/BC_PDF417ResultMetadata.h b/xfa/fxbarcode/pdf417/BC_PDF417ResultMetadata.h index 8e25bdbf43..924f25f1c4 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417ResultMetadata.h +++ b/xfa/fxbarcode/pdf417/BC_PDF417ResultMetadata.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_PDF417_BC_PDF417RESULTMETADATA_H_ #define XFA_FXBARCODE_PDF417_BC_PDF417RESULTMETADATA_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_PDF417ResultMetadata { public: diff --git a/xfa/fxbarcode/pdf417/BC_PDF417Writer.h b/xfa/fxbarcode/pdf417/BC_PDF417Writer.h index bc646b8a49..7f7195948c 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/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" #include "xfa/fxbarcode/BC_TwoDimWriter.h" class CBC_PDF417Writer : public CBC_TwoDimWriter { diff --git a/xfa/fxbarcode/qrcode/BC_FinderPatternInfo.h b/xfa/fxbarcode/qrcode/BC_FinderPatternInfo.h index 0acb106856..1091d6723d 100644 --- a/xfa/fxbarcode/qrcode/BC_FinderPatternInfo.h +++ b/xfa/fxbarcode/qrcode/BC_FinderPatternInfo.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_QRCODE_BC_FINDERPATTERNINFO_H_ #define XFA_FXBARCODE_QRCODE_BC_FINDERPATTERNINFO_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_QRFinderPattern; diff --git a/xfa/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.h b/xfa/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.h index 0b1a2a7ca7..d227708fd8 100644 --- a/xfa/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.h +++ b/xfa/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_QRCODE_BC_QRALIGNMENTPATTERNFINDER_H_ #define XFA_FXBARCODE_QRCODE_BC_QRALIGNMENTPATTERNFINDER_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "xfa/fxbarcode/utils.h" class CBC_CommonBitMatrix; diff --git a/xfa/fxbarcode/qrcode/BC_QRBitMatrixParser.h b/xfa/fxbarcode/qrcode/BC_QRBitMatrixParser.h index 6bb1064cd2..66b28d924b 100644 --- a/xfa/fxbarcode/qrcode/BC_QRBitMatrixParser.h +++ b/xfa/fxbarcode/qrcode/BC_QRBitMatrixParser.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_QRCODE_BC_QRBITMATRIXPARSER_H_ #define XFA_FXBARCODE_QRCODE_BC_QRBITMATRIXPARSER_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_CommonBitMatrix; class CBC_QRCoderVersion; diff --git a/xfa/fxbarcode/qrcode/BC_QRCodeReader.h b/xfa/fxbarcode/qrcode/BC_QRCodeReader.h index 72dd453953..c11ccd1f26 100644 --- a/xfa/fxbarcode/qrcode/BC_QRCodeReader.h +++ b/xfa/fxbarcode/qrcode/BC_QRCodeReader.h @@ -9,7 +9,7 @@ #include -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_string.h" #include "xfa/fxbarcode/BC_Reader.h" class CBC_BinaryBitmap; diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderBitVector.cpp b/xfa/fxbarcode/qrcode/BC_QRCoderBitVector.cpp index a225f61fbb..b928b0a857 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/include/fxcrt/fx_memory.h" +#include "core/fxcrt/include/fx_memory.h" #include "xfa/fxbarcode/qrcode/BC_QRCoderBitVector.h" #include "xfa/fxbarcode/utils.h" diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderDecoder.h b/xfa/fxbarcode/qrcode/BC_QRCoderDecoder.h index b6c381cc9d..3a588b6293 100644 --- a/xfa/fxbarcode/qrcode/BC_QRCoderDecoder.h +++ b/xfa/fxbarcode/qrcode/BC_QRCoderDecoder.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_QRCODE_BC_QRCODERDECODER_H_ #define XFA_FXBARCODE_QRCODE_BC_QRCODERDECODER_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_CommonBitMatrix; class CBC_ReedSolomonDecoder; diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderECBlocks.h b/xfa/fxbarcode/qrcode/BC_QRCoderECBlocks.h index c1a5b34194..5209a5f8d8 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_QRCoderECB; diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.h b/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.h index 8330dc2d1a..bbdec5bf1e 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/include/fxcrt/fx_basic.h" -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/include/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 377137ae91..9b3a256c07 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/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_string.h" class CBC_QRCoderErrorCorrectionLevel { private: diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderMode.h b/xfa/fxbarcode/qrcode/BC_QRCoderMode.h index e36f7a13b5..91a991f898 100644 --- a/xfa/fxbarcode/qrcode/BC_QRCoderMode.h +++ b/xfa/fxbarcode/qrcode/BC_QRCoderMode.h @@ -9,7 +9,7 @@ #include -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_string.h" class CBC_QRCoderVersion; diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderVersion.h b/xfa/fxbarcode/qrcode/BC_QRCoderVersion.h index dd2b0c6be8..0cbace0251 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_QRCoderECBlocks; class CBC_CommonBitMatrix; diff --git a/xfa/fxbarcode/qrcode/BC_QRDataBlock.h b/xfa/fxbarcode/qrcode/BC_QRDataBlock.h index 8e11ab845c..873904f7c6 100644 --- a/xfa/fxbarcode/qrcode/BC_QRDataBlock.h +++ b/xfa/fxbarcode/qrcode/BC_QRDataBlock.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_QRCODE_BC_QRDATABLOCK_H_ #define XFA_FXBARCODE_QRCODE_BC_QRDATABLOCK_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_QRCoderVersion; class CBC_QRCoderErrorCorrectionLevel; diff --git a/xfa/fxbarcode/qrcode/BC_QRDataMask.h b/xfa/fxbarcode/qrcode/BC_QRDataMask.h index 5893149d3b..88aa1140ea 100644 --- a/xfa/fxbarcode/qrcode/BC_QRDataMask.h +++ b/xfa/fxbarcode/qrcode/BC_QRDataMask.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_QRCODE_BC_QRDATAMASK_H_ #define XFA_FXBARCODE_QRCODE_BC_QRDATAMASK_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_CommonBitMatrix; diff --git a/xfa/fxbarcode/qrcode/BC_QRDetector.h b/xfa/fxbarcode/qrcode/BC_QRDetector.h index 4c171847cb..91eed25415 100644 --- a/xfa/fxbarcode/qrcode/BC_QRDetector.h +++ b/xfa/fxbarcode/qrcode/BC_QRDetector.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_QRCODE_BC_QRDETECTOR_H_ #define XFA_FXBARCODE_QRCODE_BC_QRDETECTOR_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_ResultPoint; class CBC_CommonBitMatrix; diff --git a/xfa/fxbarcode/qrcode/BC_QRDetectorResult.h b/xfa/fxbarcode/qrcode/BC_QRDetectorResult.h index c6145ecbbe..1570777afe 100644 --- a/xfa/fxbarcode/qrcode/BC_QRDetectorResult.h +++ b/xfa/fxbarcode/qrcode/BC_QRDetectorResult.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_QRCODE_BC_QRDETECTORRESULT_H_ #define XFA_FXBARCODE_QRCODE_BC_QRDETECTORRESULT_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_CommonBitMatrix; diff --git a/xfa/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp b/xfa/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp index 5ccbd9804b..ea08f1550d 100644 --- a/xfa/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp +++ b/xfa/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp @@ -24,7 +24,7 @@ #include -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "xfa/fxbarcode/BC_ResultPoint.h" #include "xfa/fxbarcode/common/BC_CommonBitMatrix.h" #include "xfa/fxbarcode/qrcode/BC_FinderPatternInfo.h" diff --git a/xfa/fxbarcode/qrcode/BC_QRFinderPatternFinder.h b/xfa/fxbarcode/qrcode/BC_QRFinderPatternFinder.h index 058f65df31..ada224787b 100644 --- a/xfa/fxbarcode/qrcode/BC_QRFinderPatternFinder.h +++ b/xfa/fxbarcode/qrcode/BC_QRFinderPatternFinder.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_QRCODE_BC_QRFINDERPATTERNFINDER_H_ #define XFA_FXBARCODE_QRCODE_BC_QRFINDERPATTERNFINDER_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_CommonBitMatrix; class CBC_QRFinderPattern; diff --git a/xfa/fxbarcode/qrcode/BC_QRGridSampler.h b/xfa/fxbarcode/qrcode/BC_QRGridSampler.h index 4e10c5627a..70bfb9e085 100644 --- a/xfa/fxbarcode/qrcode/BC_QRGridSampler.h +++ b/xfa/fxbarcode/qrcode/BC_QRGridSampler.h @@ -7,7 +7,7 @@ #ifndef XFA_FXBARCODE_QRCODE_BC_QRGRIDSAMPLER_H_ #define XFA_FXBARCODE_QRCODE_BC_QRGRIDSAMPLER_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" class CBC_CommonBitMatrix; diff --git a/xfa/fxbarcode/utils.h b/xfa/fxbarcode/utils.h index f6186e664f..60d4754096 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/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 2ae7c0f1a6..49e01cba92 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/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" #include "xfa/fxfa/app/xfa_fffield.h" #include "xfa/fxfa/app/xfa_ffpageview.h" #include "xfa/fxfa/app/xfa_fftextedit.h" diff --git a/xfa/fxfa/app/xfa_ffdoc.cpp b/xfa/fxfa/app/xfa_ffdoc.cpp index 041b41ce5d..b7e1b1f416 100644 --- a/xfa/fxfa/app/xfa_ffdoc.cpp +++ b/xfa/fxfa/app/xfa_ffdoc.cpp @@ -8,8 +8,8 @@ #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" +#include "core/fxcrt/include/fx_ext.h" #include "core/include/fpdfdoc/fpdf_doc.h" -#include "core/include/fxcrt/fx_ext.h" #include "xfa/fgas/crt/fgas_algorithm.h" #include "xfa/fxfa/app/xfa_ffapp.h" #include "xfa/fxfa/app/xfa_ffdocview.h" diff --git a/xfa/fxfa/app/xfa_ffdocview.cpp b/xfa/fxfa/app/xfa_ffdocview.cpp index f5d3fc56ab..ab1cafe5f4 100644 --- a/xfa/fxfa/app/xfa_ffdocview.cpp +++ b/xfa/fxfa/app/xfa_ffdocview.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/app/xfa_ffdocview.h" -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" #include "xfa/fxfa/app/xfa_ffapp.h" #include "xfa/fxfa/app/xfa_ffbarcode.h" #include "xfa/fxfa/app/xfa_ffcheckbutton.h" diff --git a/xfa/fxfa/app/xfa_fontmgr.h b/xfa/fxfa/app/xfa_fontmgr.h index 09d42931a5..516d7bb6e0 100644 --- a/xfa/fxfa/app/xfa_fontmgr.h +++ b/xfa/fxfa/app/xfa_fontmgr.h @@ -9,8 +9,8 @@ #include -#include "core/include/fxcrt/fx_ext.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_ext.h" +#include "core/fxcrt/include/fx_system.h" #include "xfa/fgas/font/fgas_font.h" #include "xfa/include/fxfa/fxfa.h" diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp index 05316f8784..6a17122149 100644 --- a/xfa/fxfa/app/xfa_textlayout.cpp +++ b/xfa/fxfa/app/xfa_textlayout.cpp @@ -8,7 +8,7 @@ #include -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" #include "xfa/fde/fde_pen.h" #include "xfa/fgas/crt/fgas_algorithm.h" #include "xfa/fgas/crt/fgas_codepage.h" diff --git a/xfa/fxfa/fm2js/xfa_error.h b/xfa/fxfa/fm2js/xfa_error.h index 1da1e245c0..b8116edf2a 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/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" enum XFA_FM_ERRMSG { FMERR_UNSUPPORTED_CHAR, diff --git a/xfa/fxfa/fm2js/xfa_expression.cpp b/xfa/fxfa/fm2js/xfa_expression.cpp index b4b1a1ae55..a97e777256 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/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" namespace { diff --git a/xfa/fxfa/fm2js/xfa_fm2jsapi.cpp b/xfa/fxfa/fm2js/xfa_fm2jsapi.cpp index 3a6bc17a25..38e5f2389f 100644 --- a/xfa/fxfa/fm2js/xfa_fm2jsapi.cpp +++ b/xfa/fxfa/fm2js/xfa_fm2jsapi.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "xfa/fxfa/fm2js/xfa_fm2jscontext.h" #include "xfa/fxfa/fm2js/xfa_program.h" #include "xfa/fxfa/parser/xfa_document.h" diff --git a/xfa/fxfa/fm2js/xfa_fm2jsapi.h b/xfa/fxfa/fm2js/xfa_fm2jsapi.h index 41f54642e3..a5ef9e0007 100644 --- a/xfa/fxfa/fm2js/xfa_fm2jsapi.h +++ b/xfa/fxfa/fm2js/xfa_fm2jsapi.h @@ -7,7 +7,7 @@ #ifndef XFA_FXFA_FM2JS_XFA_FM2JSAPI_H_ #define XFA_FXFA_FM2JS_XFA_FM2JSAPI_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxjse/include/fxjse.h" diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp index f2576b00d4..7b3573f36e 100644 --- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp +++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp @@ -8,7 +8,7 @@ #include -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" #include "xfa/fgas/localization/fgas_locale.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" #include "xfa/fxfa/parser/xfa_document.h" diff --git a/xfa/fxfa/fm2js/xfa_lexer.cpp b/xfa/fxfa/fm2js/xfa_lexer.cpp index d470390609..7c9682de8b 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/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" namespace { diff --git a/xfa/fxfa/fm2js/xfa_lexer.h b/xfa/fxfa/fm2js/xfa_lexer.h index b0d6069683..40fd8cae13 100644 --- a/xfa/fxfa/fm2js/xfa_lexer.h +++ b/xfa/fxfa/fm2js/xfa_lexer.h @@ -9,7 +9,7 @@ #include -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/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 3e6657335c..ece1cde7ae 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/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" namespace { diff --git a/xfa/fxfa/fm2js/xfa_simpleexpression.h b/xfa/fxfa/fm2js/xfa_simpleexpression.h index 9098b39824..3b8164e7d7 100644 --- a/xfa/fxfa/fm2js/xfa_simpleexpression.h +++ b/xfa/fxfa/fm2js/xfa_simpleexpression.h @@ -9,7 +9,7 @@ #include -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "xfa/fxfa/fm2js/xfa_lexer.h" #define RUNTIMEFUNCTIONRETURNVALUE \ diff --git a/xfa/fxfa/parser/xfa_basic_imp.cpp b/xfa/fxfa/parser/xfa_basic_imp.cpp index 61e2ab629b..ae5e5e8939 100644 --- a/xfa/fxfa/parser/xfa_basic_imp.cpp +++ b/xfa/fxfa/parser/xfa_basic_imp.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/parser/xfa_basic_imp.h" -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" #include "xfa/fgas/crt/fgas_algorithm.h" #include "xfa/fgas/crt/fgas_codepage.h" #include "xfa/fgas/crt/fgas_system.h" diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp index 0dc087a48f..317610e8b3 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/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" #include "xfa/fxfa/parser/xfa_basic_imp.h" #include "xfa/fxfa/parser/xfa_docdata.h" diff --git a/xfa/fxfa/parser/xfa_document_imp.cpp b/xfa/fxfa/parser/xfa_document_imp.cpp index ce07c4704e..3c07c4822d 100644 --- a/xfa/fxfa/parser/xfa_document_imp.cpp +++ b/xfa/fxfa/parser/xfa_document_imp.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" #include "xfa/fxfa/parser/xfa_basic_imp.h" #include "xfa/fxfa/parser/xfa_docdata.h" diff --git a/xfa/fxfa/parser/xfa_layout_itemlayout.h b/xfa/fxfa/parser/xfa_layout_itemlayout.h index 362e1c19fc..8e7032e6e0 100644 --- a/xfa/fxfa/parser/xfa_layout_itemlayout.h +++ b/xfa/fxfa/parser/xfa_layout_itemlayout.h @@ -11,7 +11,7 @@ #include -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document_layout_imp.h" diff --git a/xfa/fxfa/parser/xfa_locale.cpp b/xfa/fxfa/parser/xfa_locale.cpp index eb8c244c23..c721d7da17 100644 --- a/xfa/fxfa/parser/xfa_locale.cpp +++ b/xfa/fxfa/parser/xfa_locale.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/parser/xfa_locale.h" -#include "core/include/fxcrt/fx_xml.h" +#include "core/fxcrt/include/fx_xml.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" #include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" diff --git a/xfa/fxfa/parser/xfa_localemgr.cpp b/xfa/fxfa/parser/xfa_localemgr.cpp index 05706d4eb2..dc511abf7c 100644 --- a/xfa/fxfa/parser/xfa_localemgr.cpp +++ b/xfa/fxfa/parser/xfa_localemgr.cpp @@ -6,8 +6,8 @@ #include "xfa/fxfa/parser/xfa_localemgr.h" +#include "core/fxcrt/include/fx_xml.h" #include "core/include/fxcodec/fx_codec.h" -#include "core/include/fxcrt/fx_xml.h" #include "core/include/fxge/fx_ge.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" #include "xfa/fxfa/parser/xfa_docdata.h" diff --git a/xfa/fxfa/parser/xfa_object_imp.cpp b/xfa/fxfa/parser/xfa_object_imp.cpp index 368e919e11..1010a19102 100644 --- a/xfa/fxfa/parser/xfa_object_imp.cpp +++ b/xfa/fxfa/parser/xfa_object_imp.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/parser/xfa_object.h" -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" #include "xfa/fgas/crt/fgas_codepage.h" #include "xfa/fgas/crt/fgas_system.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" diff --git a/xfa/fxfa/parser/xfa_objectacc_imp.cpp b/xfa/fxfa/parser/xfa_objectacc_imp.cpp index 1e86e73a22..d729eef028 100644 --- a/xfa/fxfa/parser/xfa_objectacc_imp.cpp +++ b/xfa/fxfa/parser/xfa_objectacc_imp.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" #include "xfa/fxbarcode/include/BC_Library.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" #include "xfa/fxfa/parser/xfa_docdata.h" diff --git a/xfa/fxfa/parser/xfa_script_imp.cpp b/xfa/fxfa/parser/xfa_script_imp.cpp index c49bb31a70..48ae6b4923 100644 --- a/xfa/fxfa/parser/xfa_script_imp.cpp +++ b/xfa/fxfa/parser/xfa_script_imp.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/parser/xfa_script_imp.h" -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" #include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" diff --git a/xfa/fxfa/parser/xfa_script_nodehelper.cpp b/xfa/fxfa/parser/xfa_script_nodehelper.cpp index ba584303cd..6d106e9d64 100644 --- a/xfa/fxfa/parser/xfa_script_nodehelper.cpp +++ b/xfa/fxfa/parser/xfa_script_nodehelper.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/parser/xfa_script_nodehelper.h" -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" #include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" diff --git a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp index cb5c039f75..6573c0676f 100644 --- a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp +++ b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/parser/xfa_script_resolveprocessor.h" -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" #include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" diff --git a/xfa/fxfa/parser/xfa_utils_imp.cpp b/xfa/fxfa/parser/xfa_utils_imp.cpp index c043e7cc67..af0630f6ec 100644 --- a/xfa/fxfa/parser/xfa_utils_imp.cpp +++ b/xfa/fxfa/parser/xfa_utils_imp.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/parser/xfa_utils.h" -#include "core/include/fxcrt/fx_ext.h" +#include "core/fxcrt/include/fx_ext.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" #include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" diff --git a/xfa/fxgraphics/cfx_path.h b/xfa/fxgraphics/cfx_path.h index e8e31b3876..5b5840fa0b 100644 --- a/xfa/fxgraphics/cfx_path.h +++ b/xfa/fxgraphics/cfx_path.h @@ -7,7 +7,7 @@ #ifndef XFA_FXGRAPHICS_CFX_PATH_H_ #define XFA_FXGRAPHICS_CFX_PATH_H_ -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/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 e4c1b096f6..e7f47eea6a 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/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/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 d56807616a..8bfd3ca9d4 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/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_system.h" #include "core/include/fxge/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 121ae3a744..0bb1e76e10 100644 --- a/xfa/fxgraphics/include/cfx_graphics.h +++ b/xfa/fxgraphics/include/cfx_graphics.h @@ -7,7 +7,7 @@ #ifndef XFA_FXGRAPHICS_INCLUDE_CFX_GRAPHICS_H_ #define XFA_FXGRAPHICS_INCLUDE_CFX_GRAPHICS_H_ -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" #include "core/include/fxge/fx_dib.h" #include "core/include/fxge/fx_ge.h" diff --git a/xfa/fxjse/context.h b/xfa/fxjse/context.h index 9d3700940c..75973f2a66 100644 --- a/xfa/fxjse/context.h +++ b/xfa/fxjse/context.h @@ -7,7 +7,7 @@ #ifndef XFA_FXJSE_CONTEXT_H_ #define XFA_FXJSE_CONTEXT_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "v8/include/v8.h" #include "xfa/fxjse/include/fxjse.h" diff --git a/xfa/fxjse/include/fxjse.h b/xfa/fxjse/include/fxjse.h index d957c58651..cf6587e8fd 100644 --- a/xfa/fxjse/include/fxjse.h +++ b/xfa/fxjse/include/fxjse.h @@ -7,8 +7,8 @@ #ifndef XFA_FXJSE_INCLUDE_FXJSE_H_ #define XFA_FXJSE_INCLUDE_FXJSE_H_ -#include "core/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" struct FXJSE_CLASS; class CFXJSE_Arguments; diff --git a/xfa/fxjse/runtime.h b/xfa/fxjse/runtime.h index 023aaaac9b..43629e3771 100644 --- a/xfa/fxjse/runtime.h +++ b/xfa/fxjse/runtime.h @@ -7,7 +7,7 @@ #ifndef XFA_FXJSE_RUNTIME_H_ #define XFA_FXJSE_RUNTIME_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "v8/include/v8.h" class CFXJSE_RuntimeList; diff --git a/xfa/include/fwl/adapter/fwl_adapterthreadmgr.h b/xfa/include/fwl/adapter/fwl_adapterthreadmgr.h index 7446853299..dbd1d72ea2 100644 --- a/xfa/include/fwl/adapter/fwl_adapterthreadmgr.h +++ b/xfa/include/fwl/adapter/fwl_adapterthreadmgr.h @@ -7,7 +7,7 @@ #ifndef XFA_INCLUDE_FWL_ADAPTER_FWL_ADAPTERTHREADMGR_H_ #define XFA_INCLUDE_FWL_ADAPTER_FWL_ADAPTERTHREADMGR_H_ -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" #include "xfa/include/fwl/core/fwl_error.h" #include "xfa/include/fwl/core/fwl_thread.h" diff --git a/xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h b/xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h index 327c92e7e1..f5d3c05000 100644 --- a/xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h +++ b/xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h @@ -7,8 +7,8 @@ #ifndef XFA_INCLUDE_FWL_ADAPTER_FWL_ADAPTERWIDGETMGR_H_ #define XFA_INCLUDE_FWL_ADAPTER_FWL_ADAPTERWIDGETMGR_H_ -#include "core/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_system.h" #include "xfa/include/fwl/core/fwl_error.h" class IFWL_Widget; diff --git a/xfa/include/fwl/basewidget/fxmath_barcode.h b/xfa/include/fwl/basewidget/fxmath_barcode.h index 58ce11727c..51fd242a7d 100644 --- a/xfa/include/fwl/basewidget/fxmath_barcode.h +++ b/xfa/include/fwl/basewidget/fxmath_barcode.h @@ -7,8 +7,8 @@ #ifndef XFA_INCLUDE_FWL_BASEWIDGET_FXMATH_BARCODE_H_ #define XFA_INCLUDE_FWL_BASEWIDGET_FXMATH_BARCODE_H_ -#include "core/include/fxcrt/fx_string.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_string.h" +#include "core/fxcrt/include/fx_system.h" #include "core/include/fxge/fx_dib.h" #include "xfa/fxbarcode/include/BC_Library.h" diff --git a/xfa/include/fwl/core/fwl_app.h b/xfa/include/fwl/core/fwl_app.h index ca771432db..7904ee89f5 100644 --- a/xfa/include/fwl/core/fwl_app.h +++ b/xfa/include/fwl/core/fwl_app.h @@ -7,7 +7,7 @@ #ifndef XFA_INCLUDE_FWL_CORE_FWL_APP_H_ #define XFA_INCLUDE_FWL_CORE_FWL_APP_H_ -#include "core/include/fxcrt/fx_string.h" +#include "core/fxcrt/include/fx_string.h" #include "xfa/include/fwl/core/fwl_thread.h" class IFWL_AdapterNative; diff --git a/xfa/include/fwl/core/fwl_note.h b/xfa/include/fwl/core/fwl_note.h index e41cf1dcef..170e4795ff 100644 --- a/xfa/include/fwl/core/fwl_note.h +++ b/xfa/include/fwl/core/fwl_note.h @@ -7,7 +7,7 @@ #ifndef XFA_INCLUDE_FWL_CORE_FWL_NOTE_H_ #define XFA_INCLUDE_FWL_CORE_FWL_NOTE_H_ -#include "core/include/fxcrt/fx_coordinates.h" +#include "core/fxcrt/include/fx_coordinates.h" #include "xfa/fxgraphics/include/cfx_graphics.h" #include "xfa/include/fwl/core/fwl_error.h" diff --git a/xfa/include/fwl/core/fwl_target.h b/xfa/include/fwl/core/fwl_target.h index 6572f8be33..9f010e91e4 100644 --- a/xfa/include/fwl/core/fwl_target.h +++ b/xfa/include/fwl/core/fwl_target.h @@ -7,7 +7,7 @@ #ifndef XFA_INCLUDE_FWL_CORE_FWL_TARGET_H_ #define XFA_INCLUDE_FWL_CORE_FWL_TARGET_H_ -#include "core/include/fxcrt/fx_basic.h" +#include "core/fxcrt/include/fx_basic.h" #include "xfa/include/fwl/core/fwl_error.h" // FWL contains three parallel inheritance hierarchies, which reference each diff --git a/xfa/include/fwl/core/fwl_theme.h b/xfa/include/fwl/core/fwl_theme.h index 69783c740a..7dd443e506 100644 --- a/xfa/include/fwl/core/fwl_theme.h +++ b/xfa/include/fwl/core/fwl_theme.h @@ -7,8 +7,8 @@ #ifndef XFA_INCLUDE_FWL_CORE_FWL_THEME_H_ #define XFA_INCLUDE_FWL_CORE_FWL_THEME_H_ -#include "core/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_system.h" #include "xfa/include/fwl/core/fwl_error.h" class IFWL_Widget; diff --git a/xfa/include/fwl/core/fwl_timer.h b/xfa/include/fwl/core/fwl_timer.h index b9b4735f22..4e8feb0cfc 100644 --- a/xfa/include/fwl/core/fwl_timer.h +++ b/xfa/include/fwl/core/fwl_timer.h @@ -7,7 +7,7 @@ #ifndef XFA_INCLUDE_FWL_CORE_FWL_TIMER_H_ #define XFA_INCLUDE_FWL_CORE_FWL_TIMER_H_ -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" typedef struct FWL_HTIMER_ { void* pData; } * FWL_HTIMER; diff --git a/xfa/include/fwl/theme/utils.h b/xfa/include/fwl/theme/utils.h index dd6549666d..73e865076d 100644 --- a/xfa/include/fwl/theme/utils.h +++ b/xfa/include/fwl/theme/utils.h @@ -7,7 +7,7 @@ #ifndef XFA_INCLUDE_FWL_THEME_UTILS_H_ #define XFA_INCLUDE_FWL_THEME_UTILS_H_ -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_system.h" #define THEME_XPSimilar enum FWLTHEME_EDGE { diff --git a/xfa/include/fwl/theme/widgettp.h b/xfa/include/fwl/theme/widgettp.h index 1585db9ce2..84cf82a868 100644 --- a/xfa/include/fwl/theme/widgettp.h +++ b/xfa/include/fwl/theme/widgettp.h @@ -10,8 +10,8 @@ #include #include -#include "core/include/fxcrt/fx_coordinates.h" -#include "core/include/fxcrt/fx_system.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_system.h" #include "xfa/include/fwl/core/fwl_error.h" #include "xfa/include/fwl/core/fwl_theme.h" #include "xfa/include/fwl/core/fwl_widget.h" -- cgit v1.2.3