summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-10 14:33:37 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-10 14:33:37 -0700
commitd7e5cc754a937605d1f73db5e7967c58ddd80742 (patch)
treeed28e012c4d6a46b7f29f15a0c060474c27d4286
parentbfa9a824a20f37c2dd7111012b46c929cf2ed8a0 (diff)
downloadpdfium-d7e5cc754a937605d1f73db5e7967c58ddd80742.tar.xz
Merge to XFA: Remove typdefs for pointer types in fx_system.h.
Original Review URL: https://codereview.chromium.org/1171733003 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1178613002.
-rw-r--r--core/include/fdrm/fx_crypt.h56
-rw-r--r--core/include/fpdfapi/fpdf_module.h16
-rw-r--r--core/include/fpdfapi/fpdf_objects.h32
-rw-r--r--core/include/fpdfapi/fpdf_page.h2
-rw-r--r--core/include/fpdfapi/fpdf_parser.h98
-rw-r--r--core/include/fpdfapi/fpdf_resource.h18
-rw-r--r--core/include/fpdfapi/fpdf_serial.h12
-rw-r--r--core/include/fpdfdoc/fpdf_doc.h8
-rw-r--r--core/include/fpdfdoc/fpdf_vt.h4
-rw-r--r--core/include/fxcodec/fx_codec.h110
-rw-r--r--core/include/fxcodec/fx_codec_provider.h18
-rw-r--r--core/include/fxcrt/fx_basic.h70
-rw-r--r--core/include/fxcrt/fx_ext.h26
-rw-r--r--core/include/fxcrt/fx_memory.h4
-rw-r--r--core/include/fxcrt/fx_stream.h26
-rw-r--r--core/include/fxcrt/fx_string.h128
-rw-r--r--core/include/fxcrt/fx_system.h31
-rw-r--r--core/include/fxcrt/fx_ucd.h2
-rw-r--r--core/include/fxge/fpf.h6
-rw-r--r--core/include/fxge/fx_dib.h119
-rw-r--r--core/include/fxge/fx_font.h50
-rw-r--r--core/include/fxge/fx_ge.h18
-rw-r--r--core/include/fxge/fx_ge_win32.h6
-rw-r--r--core/include/reflow/fpdf_layout.h2
-rw-r--r--core/src/fdrm/crypto/fx_crypt.cpp14
-rw-r--r--core/src/fdrm/crypto/fx_crypt_aes.cpp8
-rw-r--r--core/src/fdrm/crypto/fx_crypt_sha.cpp36
-rw-r--r--core/src/fpdfapi/fpdf_basic_module.cpp14
-rw-r--r--core/src/fpdfapi/fpdf_edit/editint.h4
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp6
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp80
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp12
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp30
-rw-r--r--core/src/fpdfapi/fpdf_font/font_int.h16
-rw-r--r--core/src/fpdfapi/fpdf_font/fpdf_font.cpp64
-rw-r--r--core/src/fpdfapi/fpdf_font/fpdf_font_charset.cpp14
-rw-r--r--core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp52
-rw-r--r--core/src/fpdfapi/fpdf_font/ttgsubtable.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp32
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp22
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp10
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp30
-rw-r--r--core/src/fpdfapi/fpdf_page/pageint.h20
-rw-r--r--core/src/fpdfapi/fpdf_parser/filters_int.h32
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp50
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp112
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp8
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp42
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp91
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp84
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp16
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp22
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp32
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp48
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp14
-rw-r--r--core/src/fpdfapi/fpdf_render/render_int.h32
-rw-r--r--core/src/fpdfdoc/doc_annot.cpp2
-rw-r--r--core/src/fpdfdoc/doc_basic.cpp4
-rw-r--r--core/src/fpdfdoc/doc_form.cpp46
-rw-r--r--core/src/fpdfdoc/doc_link.cpp12
-rw-r--r--core/src/fpdfdoc/doc_metadata.cpp6
-rw-r--r--core/src/fpdfdoc/doc_ocg.cpp4
-rw-r--r--core/src/fpdfdoc/doc_tagged.cpp2
-rw-r--r--core/src/fpdfdoc/doc_vt.cpp4
-rw-r--r--core/src/fpdfdoc/pdf_vt.h4
-rw-r--r--core/src/fpdftext/fpdf_text.cpp12
-rw-r--r--core/src/fpdftext/fpdf_text_int.cpp8
-rw-r--r--core/src/fpdftext/text_int.h4
-rw-r--r--core/src/fpdftext/unicodenormalization.cpp12
-rw-r--r--core/src/fxcodec/codec/codec_int.h124
-rw-r--r--core/src/fxcodec/codec/fx_codec.cpp64
-rw-r--r--core/src/fxcodec/codec/fx_codec_bmp.cpp10
-rw-r--r--core/src/fxcodec/codec/fx_codec_fax.cpp60
-rw-r--r--core/src/fxcodec/codec/fx_codec_flate.cpp78
-rw-r--r--core/src/fxcodec/codec/fx_codec_gif.cpp14
-rw-r--r--core/src/fxcodec/codec/fx_codec_icc.cpp44
-rw-r--r--core/src/fxcodec/codec/fx_codec_jbig.cpp18
-rw-r--r--core/src/fxcodec/codec/fx_codec_jpeg.cpp50
-rw-r--r--core/src/fxcodec/codec/fx_codec_jpx_opj.cpp16
-rw-r--r--core/src/fxcodec/codec/fx_codec_png.cpp12
-rw-r--r--core/src/fxcodec/codec/fx_codec_progress.cpp100
-rw-r--r--core/src/fxcodec/codec/fx_codec_progress.h36
-rw-r--r--core/src/fxcodec/codec/fx_codec_tiff.cpp32
-rw-r--r--core/src/fxcodec/jbig2/JBig2_Define.h2
-rw-r--r--core/src/fxcodec/jbig2/JBig2_Module.h10
-rw-r--r--core/src/fxcodec/jbig2/JBig2_Object.cpp8
-rw-r--r--core/src/fxcodec/jbig2/JBig2_Object.h8
-rw-r--r--core/src/fxcodec/jbig2/JBig2_Segment.h2
-rw-r--r--core/src/fxcodec/lbmp/fx_bmp.cpp114
-rw-r--r--core/src/fxcodec/lbmp/fx_bmp.h22
-rw-r--r--core/src/fxcodec/lgif/fx_gif.cpp112
-rw-r--r--core/src/fxcodec/lgif/fx_gif.h66
-rw-r--r--core/src/fxcrt/extension.h28
-rw-r--r--core/src/fxcrt/fx_arabic.cpp6
-rw-r--r--core/src/fxcrt/fx_basic_array.cpp12
-rw-r--r--core/src/fxcrt/fx_basic_bstring.cpp72
-rw-r--r--core/src/fxcrt/fx_basic_bstring_unittest.cpp2
-rw-r--r--core/src/fxcrt/fx_basic_buffer.cpp28
-rw-r--r--core/src/fxcrt/fx_basic_gcc.cpp40
-rw-r--r--core/src/fxcrt/fx_basic_maps.cpp16
-rw-r--r--core/src/fxcrt/fx_basic_memmgr.cpp2
-rw-r--r--core/src/fxcrt/fx_basic_utf.cpp2
-rw-r--r--core/src/fxcrt/fx_basic_util.cpp18
-rw-r--r--core/src/fxcrt/fx_basic_wstring.cpp76
-rw-r--r--core/src/fxcrt/fx_extension.cpp98
-rw-r--r--core/src/fxcrt/fx_xml_parser.cpp8
-rw-r--r--core/src/fxcrt/fxcrt_platforms.cpp2
-rw-r--r--core/src/fxcrt/fxcrt_posix.cpp2
-rw-r--r--core/src/fxcrt/fxcrt_windows.h2
-rw-r--r--core/src/fxcrt/xml_int.h16
-rw-r--r--core/src/fxge/agg/agg23/fx_agg_driver.cpp120
-rw-r--r--core/src/fxge/agg/include/fx_agg_driver.h8
-rw-r--r--core/src/fxge/android/fpf_skiafont.cpp4
-rw-r--r--core/src/fxge/android/fpf_skiafont.h2
-rw-r--r--core/src/fxge/android/fpf_skiafontmgr.cpp10
-rw-r--r--core/src/fxge/android/fpf_skiafontmgr.h14
-rw-r--r--core/src/fxge/android/fx_android_font.cpp6
-rw-r--r--core/src/fxge/android/fx_android_font.h6
-rw-r--r--core/src/fxge/apple/apple_int.h14
-rw-r--r--core/src/fxge/apple/fx_mac_imp.cpp10
-rw-r--r--core/src/fxge/apple/fx_quartz_device.cpp8
-rw-r--r--core/src/fxge/dib/dib_int.h6
-rw-r--r--core/src/fxge/dib/fx_dib_composite.cpp394
-rw-r--r--core/src/fxge/dib/fx_dib_convert.cpp160
-rw-r--r--core/src/fxge/dib/fx_dib_engine.cpp16
-rw-r--r--core/src/fxge/dib/fx_dib_main.cpp108
-rw-r--r--core/src/fxge/dib/fx_dib_transform.cpp44
-rw-r--r--core/src/fxge/ge/fx_ge.cpp2
-rw-r--r--core/src/fxge/ge/fx_ge_device.cpp6
-rw-r--r--core/src/fxge/ge/fx_ge_font.cpp14
-rw-r--r--core/src/fxge/ge/fx_ge_fontmap.cpp104
-rw-r--r--core/src/fxge/ge/fx_ge_linux.cpp32
-rw-r--r--core/src/fxge/ge/fx_ge_path.cpp10
-rw-r--r--core/src/fxge/ge/fx_ge_ps.cpp54
-rw-r--r--core/src/fxge/ge/fx_ge_text.cpp56
-rw-r--r--core/src/fxge/ge/text_int.h2
-rw-r--r--core/src/fxge/skia/fx_skia_blitter_new.cpp164
-rw-r--r--core/src/fxge/skia/fx_skia_blitter_new.h208
-rw-r--r--core/src/fxge/skia/fx_skia_device.cpp6
-rw-r--r--core/src/fxge/skia/fx_skia_device.h8
-rw-r--r--core/src/fxge/win32/dwrite_int.h2
-rw-r--r--core/src/fxge/win32/fx_win32_device.cpp36
-rw-r--r--core/src/fxge/win32/fx_win32_dib.cpp6
-rw-r--r--core/src/fxge/win32/fx_win32_dwrite.cpp4
-rw-r--r--core/src/fxge/win32/fx_win32_gdipext.cpp6
-rw-r--r--core/src/fxge/win32/fx_win32_print.cpp14
-rw-r--r--core/src/fxge/win32/win32_int.h18
-rw-r--r--fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h2
-rw-r--r--fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h2
-rw-r--r--fpdfsdk/include/fsdk_baseform.h10
-rw-r--r--fpdfsdk/include/fsdk_define.h2
-rw-r--r--fpdfsdk/include/fsdk_mgr.h24
-rw-r--r--fpdfsdk/include/fx_systemhandler.h4
-rw-r--r--fpdfsdk/include/fxedit/fx_edit.h6
-rw-r--r--fpdfsdk/include/fxedit/fxet_edit.h10
-rw-r--r--fpdfsdk/include/fxedit/fxet_list.h6
-rw-r--r--fpdfsdk/include/javascript/JS_EventHandler.h4
-rw-r--r--fpdfsdk/include/javascript/JS_GlobalData.h24
-rw-r--r--fpdfsdk/include/javascript/JS_Object.h10
-rw-r--r--fpdfsdk/include/javascript/JS_Value.h10
-rw-r--r--fpdfsdk/include/javascript/PublicMethods.h24
-rw-r--r--fpdfsdk/include/javascript/global.h8
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ComboBox.h4
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Edit.h4
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_EditCtrl.h4
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_FontMap.h2
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Icon.h2
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Label.h2
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ListBox.h4
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Note.h2
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Signature.h6
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Wnd.h4
-rw-r--r--fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp2
-rw-r--r--fpdfsdk/src/fpdf_dataavail.cpp2
-rw-r--r--fpdfsdk/src/fpdf_ext.cpp2
-rw-r--r--fpdfsdk/src/fpdf_flatten.cpp12
-rw-r--r--fpdfsdk/src/fpdf_sysfontinfo.cpp6
-rw-r--r--fpdfsdk/src/fpdf_transformpage.cpp6
-rw-r--r--fpdfsdk/src/fpdfdoc.cpp2
-rw-r--r--fpdfsdk/src/fpdfformfill.cpp2
-rw-r--r--fpdfsdk/src/fpdfppo.cpp6
-rw-r--r--fpdfsdk/src/fpdfsave.cpp2
-rw-r--r--fpdfsdk/src/fpdfview.cpp24
-rw-r--r--fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp18
-rw-r--r--fpdfsdk/src/fsdk_actionhandler.cpp3
-rw-r--r--fpdfsdk/src/fsdk_baseform.cpp14
-rw-r--r--fpdfsdk/src/fsdk_mgr.cpp5
-rw-r--r--fpdfsdk/src/fxedit/fxet_edit.cpp10
-rw-r--r--fpdfsdk/src/fxedit/fxet_list.cpp6
-rw-r--r--fpdfsdk/src/javascript/Consts.cpp48
-rw-r--r--fpdfsdk/src/javascript/JS_EventHandler.cpp4
-rw-r--r--fpdfsdk/src/javascript/JS_GlobalData.cpp28
-rw-r--r--fpdfsdk/src/javascript/JS_Object.cpp10
-rw-r--r--fpdfsdk/src/javascript/JS_Runtime.cpp4
-rw-r--r--fpdfsdk/src/javascript/JS_Value.cpp10
-rw-r--r--fpdfsdk/src/javascript/PublicMethods.cpp56
-rw-r--r--fpdfsdk/src/javascript/global.cpp22
-rw-r--r--fpdfsdk/src/javascript/util.cpp8
-rw-r--r--fpdfsdk/src/jsapi/fxjs_v8.cpp16
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp4
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Edit.cpp4
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp4
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_FontMap.cpp2
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Icon.cpp2
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Label.cpp2
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_ListBox.cpp4
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Note.cpp2
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Signature.cpp6
-rw-r--r--xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h4
-rw-r--r--xfa/include/fwl/adapter/fwl_adaptercursormgr.h2
-rw-r--r--xfa/include/fwl/adapter/fwl_adaptermonitormgr.h2
-rw-r--r--xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h10
-rw-r--r--xfa/include/fwl/adapter/fwl_sdadapterimp.h8
-rw-r--r--xfa/include/fwl/basewidget/fwl_edit.h4
-rw-r--r--xfa/include/fwl/basewidget/fwl_listbox.h6
-rw-r--r--xfa/include/fwl/core/fwl_grid.h2
-rw-r--r--xfa/include/fwl/core/fwl_note.h6
-rw-r--r--xfa/include/fwl/core/fwl_target.h2
-rw-r--r--xfa/include/fwl/core/fwl_theme.h4
-rw-r--r--xfa/include/fwl/core/fwl_thread.h6
-rw-r--r--xfa/include/fwl/core/fwl_timer.h2
-rw-r--r--xfa/include/fwl/core/fwl_widget.h4
-rw-r--r--xfa/include/fwl/core/fwl_widgetmgr.h2
-rw-r--r--xfa/include/fwl/lightwidget/combobox.h10
-rw-r--r--xfa/include/fwl/lightwidget/edit.h2
-rw-r--r--xfa/include/fwl/lightwidget/listbox.h10
-rw-r--r--xfa/include/fwl/lightwidget/theme.h4
-rw-r--r--xfa/include/fwl/lightwidget/widget.h4
-rw-r--r--xfa/include/fwl/theme/comboboxtp.h2
-rw-r--r--xfa/include/fwl/theme/formtp.h2
-rw-r--r--xfa/include/fwl/theme/listboxtp.h2
-rw-r--r--xfa/include/fwl/theme/monthcalendartp.h2
-rw-r--r--xfa/include/fwl/theme/pushbuttontp.h2
-rw-r--r--xfa/include/fwl/theme/scrollbartp.h2
-rw-r--r--xfa/include/fwl/theme/widgettp.h4
-rw-r--r--xfa/include/fxfa/fxfa.h6
-rw-r--r--xfa/include/fxfa/fxfa_basic.h22
-rw-r--r--xfa/include/fxfa/fxfa_widget.h2
-rw-r--r--xfa/include/fxjse/fxjse.h24
-rw-r--r--xfa/src/fdp/include/fde_css.h22
-rw-r--r--xfa/src/fdp/include/fde_psr.h2
-rw-r--r--xfa/src/fdp/include/fde_rdv.h2
-rw-r--r--xfa/src/fdp/include/fde_tto.h24
-rw-r--r--xfa/src/fdp/include/fde_xml.h32
-rw-r--r--xfa/src/fdp/src/css/fde_csscache.cpp10
-rw-r--r--xfa/src/fdp/src/css/fde_cssdatatable.cpp22
-rw-r--r--xfa/src/fdp/src/css/fde_cssdatatable.h46
-rw-r--r--xfa/src/fdp/src/css/fde_cssdeclaration.cpp52
-rw-r--r--xfa/src/fdp/src/css/fde_cssdeclaration.h44
-rw-r--r--xfa/src/fdp/src/css/fde_cssstyleselector.cpp12
-rw-r--r--xfa/src/fdp/src/css/fde_cssstyleselector.h40
-rw-r--r--xfa/src/fdp/src/css/fde_cssstylesheet.cpp26
-rw-r--r--xfa/src/fdp/src/css/fde_cssstylesheet.h8
-rw-r--r--xfa/src/fdp/src/css/fde_csssyntax.cpp14
-rw-r--r--xfa/src/fdp/src/css/fde_csssyntax.h10
-rw-r--r--xfa/src/fdp/src/fde/fde_gdidevice.h2
-rw-r--r--xfa/src/fdp/src/fde/fde_gedevice.cpp2
-rw-r--r--xfa/src/fdp/src/tto/fde_textout.cpp40
-rw-r--r--xfa/src/fdp/src/tto/fde_textout.h30
-rw-r--r--xfa/src/fdp/src/xml/fde_xml.cpp83
-rw-r--r--xfa/src/fdp/src/xml/fde_xml.h42
-rw-r--r--xfa/src/fee/include/ifde_txtedtbuf.h2
-rw-r--r--xfa/src/fee/include/ifde_txtedtengine.h4
-rw-r--r--xfa/src/fee/src/fee/fde_txtedtblock.cpp28
-rw-r--r--xfa/src/fee/src/fee/fde_txtedtbuf.cpp8
-rw-r--r--xfa/src/fee/src/fee/fde_txtedtbuf.h2
-rw-r--r--xfa/src/fee/src/fee/fde_txtedtengine.cpp100
-rw-r--r--xfa/src/fee/src/fee/fde_txtedtengine.h14
-rw-r--r--xfa/src/fee/src/fee/fde_txtedtpage.cpp12
-rw-r--r--xfa/src/fee/src/fee/fde_txtedtpage.h4
-rw-r--r--xfa/src/fee/src/fee/fde_txtedtparag.h2
-rw-r--r--xfa/src/fee/src/fx_wordbreak/fx_wordbreak_impl.cpp2
-rw-r--r--xfa/src/fgas/include/fx_alg.h8
-rw-r--r--xfa/src/fgas/include/fx_cpg.h24
-rw-r--r--xfa/src/fgas/include/fx_fnt.h66
-rw-r--r--xfa/src/fgas/include/fx_lbk.h4
-rw-r--r--xfa/src/fgas/include/fx_locale.h2
-rw-r--r--xfa/src/fgas/include/fx_rbk.h6
-rw-r--r--xfa/src/fgas/include/fx_sax.h14
-rw-r--r--xfa/src/fgas/include/fx_stm.h12
-rw-r--r--xfa/src/fgas/include/fx_sys.h14
-rw-r--r--xfa/src/fgas/include/fx_tbk.h16
-rw-r--r--xfa/src/fgas/include/fx_utl.h38
-rw-r--r--xfa/src/fgas/src/crt/fx_algorithm.cpp46
-rw-r--r--xfa/src/fgas/src/crt/fx_codepage.cpp6
-rw-r--r--xfa/src/fgas/src/crt/fx_encode.cpp24
-rw-r--r--xfa/src/fgas/src/crt/fx_memory.cpp13
-rw-r--r--xfa/src/fgas/src/crt/fx_memory.h18
-rw-r--r--xfa/src/fgas/src/crt/fx_stream.cpp98
-rw-r--r--xfa/src/fgas/src/crt/fx_stream.h76
-rw-r--r--xfa/src/fgas/src/crt/fx_system.cpp22
-rw-r--r--xfa/src/fgas/src/crt/fx_utils.cpp66
-rw-r--r--xfa/src/fgas/src/crt/fx_utils.h6
-rw-r--r--xfa/src/fgas/src/font/fx_fontutils.cpp4
-rw-r--r--xfa/src/fgas/src/font/fx_fontutils.h2
-rw-r--r--xfa/src/fgas/src/font/fx_gdifont.cpp34
-rw-r--r--xfa/src/fgas/src/font/fx_gdifont.h14
-rw-r--r--xfa/src/fgas/src/font/fx_gefont.cpp18
-rw-r--r--xfa/src/fgas/src/font/fx_gefont.h6
-rw-r--r--xfa/src/fgas/src/font/fx_stdfontmgr.cpp98
-rw-r--r--xfa/src/fgas/src/font/fx_stdfontmgr.h54
-rw-r--r--xfa/src/fgas/src/layout/fx_linebreak.cpp4
-rw-r--r--xfa/src/fgas/src/layout/fx_rtfbreak.cpp4
-rw-r--r--xfa/src/fgas/src/layout/fx_textbreak.cpp10
-rw-r--r--xfa/src/fgas/src/layout/fx_textbreak.h6
-rw-r--r--xfa/src/fgas/src/localization/fx_locale.cpp192
-rw-r--r--xfa/src/fgas/src/localization/fx_localemgr.cpp16
-rw-r--r--xfa/src/fgas/src/xml/fx_sax_imp.cpp10
-rw-r--r--xfa/src/fgas/src/xml/fx_sax_imp.h8
-rw-r--r--xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp4
-rw-r--r--xfa/src/fwl/src/basewidget/fwl_datetimepickerimp.cpp4
-rw-r--r--xfa/src/fwl/src/basewidget/fwl_editimp.cpp12
-rw-r--r--xfa/src/fwl/src/basewidget/fwl_monthcalendarimp.cpp34
-rw-r--r--xfa/src/fwl/src/basewidget/include/fwl_editimp.h2
-rw-r--r--xfa/src/fwl/src/core/fwl_noteimp.cpp20
-rw-r--r--xfa/src/fwl/src/core/fwl_sdadapterimp.cpp8
-rw-r--r--xfa/src/fwl/src/core/fwl_targetimp.cpp4
-rw-r--r--xfa/src/fwl/src/core/fwl_widgetimp.cpp12
-rw-r--r--xfa/src/fwl/src/core/fwl_widgetmgrimp.cpp8
-rw-r--r--xfa/src/fwl/src/core/include/fwl_noteimp.h6
-rw-r--r--xfa/src/fwl/src/core/include/fwl_targetimp.h4
-rw-r--r--xfa/src/fwl/src/core/include/fwl_widgetimp.h6
-rw-r--r--xfa/src/fwl/src/core/include/fwl_widgetmgrimp.h2
-rw-r--r--xfa/src/fwl/src/lightwidget/combobox.cpp8
-rw-r--r--xfa/src/fwl/src/lightwidget/edit.cpp2
-rw-r--r--xfa/src/fwl/src/lightwidget/listbox.cpp8
-rw-r--r--xfa/src/fwl/src/lightwidget/theme.cpp4
-rw-r--r--xfa/src/fwl/src/lightwidget/widget.cpp6
-rw-r--r--xfa/src/fwl/src/theme/comboboxtp.cpp2
-rw-r--r--xfa/src/fwl/src/theme/formtp.cpp2
-rw-r--r--xfa/src/fwl/src/theme/listboxtp.cpp2
-rw-r--r--xfa/src/fwl/src/theme/monthcalendartp.cpp2
-rw-r--r--xfa/src/fwl/src/theme/pushbuttontp.cpp2
-rw-r--r--xfa/src/fwl/src/theme/scrollbartp.cpp2
-rw-r--r--xfa/src/fwl/src/theme/widgettp.cpp4
-rw-r--r--xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.cpp2
-rw-r--r--xfa/src/fxbarcode/datamatrix/BC_EdifactEncoder.cpp2
-rw-r--r--xfa/src/fxbarcode/datamatrix/BC_ErrorCorrection.cpp8
-rw-r--r--xfa/src/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp6
-rw-r--r--xfa/src/fxbarcode/datamatrix/BC_SymbolInfo.cpp18
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp2
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.h2
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp4
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCode39Reader.h4
-rw-r--r--xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp2
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.cpp2
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.h2
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp2
-rw-r--r--xfa/src/fxbarcode/utils.h4
-rw-r--r--xfa/src/fxfa/src/app/xfa_checksum.cpp18
-rw-r--r--xfa/src/fxfa/src/app/xfa_checksum.h16
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffapp.cpp10
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffbarcode.h2
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffdoc.cpp22
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffdocview.cpp6
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffimageedit.cpp4
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffnotify.cpp30
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffnotify.h24
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffpageview.cpp2
-rw-r--r--xfa/src/fxfa/src/app/xfa_fftext.cpp10
-rw-r--r--xfa/src/fxfa/src/app/xfa_fftext.h2
-rw-r--r--xfa/src/fxfa/src/app/xfa_fftextedit.cpp2
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffwidget.cpp24
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffwidget.h2
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp14
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp4
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffwidgethandler.h4
-rw-r--r--xfa/src/fxfa/src/app/xfa_fontmgr.cpp24
-rw-r--r--xfa/src/fxfa/src/app/xfa_fontmgr.h4
-rw-r--r--xfa/src/fxfa/src/app/xfa_fwltheme.cpp6
-rw-r--r--xfa/src/fxfa/src/app/xfa_fwltheme.h2
-rw-r--r--xfa/src/fxfa/src/app/xfa_textlayout.cpp19
-rw-r--r--xfa/src/fxfa/src/app/xfa_textlayout.h6
-rw-r--r--xfa/src/fxfa/src/common/xfa_docdata.h2
-rw-r--r--xfa/src/fxfa/src/common/xfa_document.h8
-rw-r--r--xfa/src/fxfa/src/common/xfa_fm2jsapi.h2
-rw-r--r--xfa/src/fxfa/src/common/xfa_object.h74
-rw-r--r--xfa/src/fxfa/src/common/xfa_script.h2
-rw-r--r--xfa/src/fxfa/src/common/xfa_utils.h4
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_error.cpp4
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_error.h2
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp60
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.h6
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp45
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_fmparse.h2
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_lexer.cpp56
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_lexer.h20
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_simpleexpression.h4
-rw-r--r--xfa/src/fxfa/src/parser/xfa_basic_data.cpp582
-rw-r--r--xfa/src/fxfa/src/parser/xfa_basic_imp.cpp26
-rw-r--r--xfa/src/fxfa/src/parser/xfa_basic_imp.h10
-rw-r--r--xfa/src/fxfa/src/parser/xfa_document_imp.cpp12
-rw-r--r--xfa/src/fxfa/src/parser/xfa_document_serialize.cpp34
-rw-r--r--xfa/src/fxfa/src/parser/xfa_document_serialize.h4
-rw-r--r--xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp2
-rw-r--r--xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp10
-rw-r--r--xfa/src/fxfa/src/parser/xfa_locale.cpp10
-rw-r--r--xfa/src/fxfa/src/parser/xfa_localemgr.cpp4
-rw-r--r--xfa/src/fxfa/src/parser/xfa_localevalue.cpp14
-rw-r--r--xfa/src/fxfa/src/parser/xfa_object_imp.cpp150
-rw-r--r--xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp14
-rw-r--r--xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp4
-rw-r--r--xfa/src/fxfa/src/parser/xfa_script_imp.cpp18
-rw-r--r--xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp4
-rw-r--r--xfa/src/fxfa/src/parser/xfa_script_nodehelper.cpp6
-rw-r--r--xfa/src/fxfa/src/parser/xfa_script_nodehelper.h2
-rw-r--r--xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp8
-rw-r--r--xfa/src/fxfa/src/parser/xfa_utils_imp.cpp2
-rw-r--r--xfa/src/fxgraphics/src/fx_graphics.cpp10
-rw-r--r--xfa/src/fxjse/src/class.cpp4
-rw-r--r--xfa/src/fxjse/src/context.cpp10
-rw-r--r--xfa/src/fxjse/src/context.h4
-rw-r--r--xfa/src/fxjse/src/runtime.cpp2
-rw-r--r--xfa/src/fxjse/src/util_inline.h4
-rw-r--r--xfa/src/fxjse/src/value.cpp10
-rw-r--r--xfa/src/fxjse/src/value.h4
420 files changed, 4702 insertions, 4699 deletions
diff --git a/core/include/fdrm/fx_crypt.h b/core/include/fdrm/fx_crypt.h
index 8b0ce2f703..af72fcf470 100644
--- a/core/include/fdrm/fx_crypt.h
+++ b/core/include/fdrm/fx_crypt.h
@@ -13,34 +13,34 @@
extern "C" {
#endif
-void CRYPT_ArcFourCryptBlock(FX_LPBYTE data, FX_DWORD size, FX_LPCBYTE key, FX_DWORD keylen);
-void CRYPT_ArcFourSetup(FX_LPVOID context, FX_LPCBYTE key, FX_DWORD length);
-void CRYPT_ArcFourCrypt(FX_LPVOID context, FX_LPBYTE data, FX_DWORD size);
-void CRYPT_AESSetKey(FX_LPVOID context, FX_DWORD blocklen, FX_LPCBYTE key, FX_DWORD keylen, FX_BOOL bEncrypt);
-void CRYPT_AESSetIV(FX_LPVOID context, FX_LPCBYTE iv);
-void CRYPT_AESDecrypt(FX_LPVOID context, FX_LPBYTE dest, FX_LPCBYTE src, FX_DWORD size);
-void CRYPT_AESEncrypt(FX_LPVOID context, FX_LPBYTE dest, FX_LPCBYTE src, FX_DWORD size);
-void CRYPT_MD5Generate(FX_LPCBYTE data, FX_DWORD size, uint8_t digest[16]);
-void CRYPT_MD5Start(FX_LPVOID context);
-void CRYPT_MD5Update(FX_LPVOID context, FX_LPCBYTE data, FX_DWORD size);
-void CRYPT_MD5Finish(FX_LPVOID context, uint8_t digest[16]);
-void CRYPT_SHA1Generate(FX_LPCBYTE data, FX_DWORD size, uint8_t digest[20]);
-void CRYPT_SHA1Start(FX_LPVOID context);
-void CRYPT_SHA1Update(FX_LPVOID context, FX_LPCBYTE data, FX_DWORD size);
-void CRYPT_SHA1Finish(FX_LPVOID context, uint8_t digest[20]);
-void CRYPT_SHA256Generate(FX_LPCBYTE data, FX_DWORD size, uint8_t digest[32]);
-void CRYPT_SHA256Start(FX_LPVOID context);
-void CRYPT_SHA256Update(FX_LPVOID context, FX_LPCBYTE data, FX_DWORD size);
-void CRYPT_SHA256Finish(FX_LPVOID context, uint8_t digest[32]);
-void CRYPT_SHA384Start(FX_LPVOID context);
-void CRYPT_SHA384Update(FX_LPVOID context, FX_LPCBYTE data, FX_DWORD size);
-void CRYPT_SHA384Finish(FX_LPVOID context, uint8_t digest[48]);
-void CRYPT_SHA384Generate(FX_LPCBYTE data, FX_DWORD size, uint8_t digest[48]);
-void CRYPT_SHA512Start(FX_LPVOID context);
-void CRYPT_SHA512Update(FX_LPVOID context, FX_LPCBYTE data, FX_DWORD size);
-void CRYPT_SHA512Finish(FX_LPVOID context, uint8_t digest[64]);
-void CRYPT_SHA512Generate(FX_LPCBYTE data, FX_DWORD size, uint8_t digest[64]);
-void CRYPT_SetPubKeyDecryptor(FX_BOOL (*func)(FX_LPCBYTE pData, FX_DWORD size, FX_LPBYTE data_buf, FX_DWORD& data_len));
+void CRYPT_ArcFourCryptBlock(uint8_t* data, FX_DWORD size, const uint8_t* key, FX_DWORD keylen);
+void CRYPT_ArcFourSetup(void* context, const uint8_t* key, FX_DWORD length);
+void CRYPT_ArcFourCrypt(void* context, uint8_t* data, FX_DWORD size);
+void CRYPT_AESSetKey(void* context, FX_DWORD blocklen, const uint8_t* key, FX_DWORD keylen, FX_BOOL bEncrypt);
+void CRYPT_AESSetIV(void* context, const uint8_t* iv);
+void CRYPT_AESDecrypt(void* context, uint8_t* dest, const uint8_t* src, FX_DWORD size);
+void CRYPT_AESEncrypt(void* context, uint8_t* dest, const uint8_t* src, FX_DWORD size);
+void CRYPT_MD5Generate(const uint8_t* data, FX_DWORD size, uint8_t digest[16]);
+void CRYPT_MD5Start(void* context);
+void CRYPT_MD5Update(void* context, const uint8_t* data, FX_DWORD size);
+void CRYPT_MD5Finish(void* context, uint8_t digest[16]);
+void CRYPT_SHA1Generate(const uint8_t* data, FX_DWORD size, uint8_t digest[20]);
+void CRYPT_SHA1Start(void* context);
+void CRYPT_SHA1Update(void* context, const uint8_t* data, FX_DWORD size);
+void CRYPT_SHA1Finish(void* context, uint8_t digest[20]);
+void CRYPT_SHA256Generate(const uint8_t* data, FX_DWORD size, uint8_t digest[32]);
+void CRYPT_SHA256Start(void* context);
+void CRYPT_SHA256Update(void* context, const uint8_t* data, FX_DWORD size);
+void CRYPT_SHA256Finish(void* context, uint8_t digest[32]);
+void CRYPT_SHA384Start(void* context);
+void CRYPT_SHA384Update(void* context, const uint8_t* data, FX_DWORD size);
+void CRYPT_SHA384Finish(void* context, uint8_t digest[48]);
+void CRYPT_SHA384Generate(const uint8_t* data, FX_DWORD size, uint8_t digest[48]);
+void CRYPT_SHA512Start(void* context);
+void CRYPT_SHA512Update(void* context, const uint8_t* data, FX_DWORD size);
+void CRYPT_SHA512Finish(void* context, uint8_t digest[64]);
+void CRYPT_SHA512Generate(const uint8_t* data, FX_DWORD size, uint8_t digest[64]);
+void CRYPT_SetPubKeyDecryptor(FX_BOOL (*func)(const uint8_t* pData, FX_DWORD size, uint8_t* data_buf, FX_DWORD& data_len));
#ifdef __cplusplus
};
diff --git a/core/include/fpdfapi/fpdf_module.h b/core/include/fpdfapi/fpdf_module.h
index 5be2b192c4..c7977b6183 100644
--- a/core/include/fpdfapi/fpdf_module.h
+++ b/core/include/fpdfapi/fpdf_module.h
@@ -66,11 +66,11 @@ public:
void InitRenderModule();
- void SetDownloadCallback(FX_BOOL (*callback)(FX_LPCSTR module_name));
+ void SetDownloadCallback(FX_BOOL (*callback)(const FX_CHAR* module_name));
- FX_BOOL DownloadModule(FX_LPCSTR module_name);
+ FX_BOOL DownloadModule(const FX_CHAR* module_name);
- void NotifyModuleAvailable(FX_LPCSTR module_name);
+ void NotifyModuleAvailable(const FX_CHAR* module_name);
@@ -102,13 +102,13 @@ public:
ICodec_IccModule* GetIccModule();
ICodec_FlateModule* GetFlateModule();
- void RegisterSecurityHandler(FX_LPCSTR name, CPDF_SecurityHandler * (*CreateHandler)(void* param), void* param);
+ void RegisterSecurityHandler(const FX_CHAR* name, CPDF_SecurityHandler * (*CreateHandler)(void* param), void* param);
- CPDF_SecurityHandler* CreateSecurityHandler(FX_LPCSTR name);
+ CPDF_SecurityHandler* CreateSecurityHandler(const FX_CHAR* name);
- void SetPrivateData(FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback);
+ void SetPrivateData(void* module_id, void* pData, PD_CALLBACK_FREEDATA callback);
- FX_LPVOID GetPrivateData(FX_LPVOID module_id);
+ void* GetPrivateData(void* module_id);
int m_FileBufSize;
protected:
@@ -129,7 +129,7 @@ protected:
CPDF_PageModuleDef* m_pPageModule;
- FX_BOOL (*m_pDownloadCallback)(FX_LPCSTR module_name);
+ FX_BOOL (*m_pDownloadCallback)(const FX_CHAR* module_name);
CFX_MapByteStringToPtr m_SecurityHandlerMap;
diff --git a/core/include/fpdfapi/fpdf_objects.h b/core/include/fpdfapi/fpdf_objects.h
index 8444f09b70..5b5811d2be 100644
--- a/core/include/fpdfapi/fpdf_objects.h
+++ b/core/include/fpdfapi/fpdf_objects.h
@@ -36,7 +36,7 @@ class IFX_FileRead;
#define PDFOBJ_NULL 8
#define PDFOBJ_REFERENCE 9
-typedef IFX_FileStream* (*FPDF_LPFCloneStreamCallback)(CPDF_Stream *pStream, FX_LPVOID pUserData);
+typedef IFX_FileStream* (*FPDF_LPFCloneStreamCallback)(CPDF_Stream *pStream, void* pUserData);
class CPDF_Object
{
public:
@@ -83,7 +83,7 @@ public:
void SetString(const CFX_ByteString& str);
- void SetUnicodeText(FX_LPCWSTR pUnicodes, int len = -1);
+ void SetUnicodeText(const FX_WCHAR* pUnicodes, int len = -1);
int GetDirectType() const;
@@ -265,14 +265,14 @@ public:
return FX_NEW CPDF_Name(str);
}
- static CPDF_Name* Create(FX_LPCSTR str)
+ static CPDF_Name* Create(const FX_CHAR* str)
{
return FX_NEW CPDF_Name(str);
}
CPDF_Name(const CFX_ByteString& str) : CPDF_Object(PDFOBJ_NAME), m_Name(str) { }
CPDF_Name(FX_BSTR str) : CPDF_Object(PDFOBJ_NAME), m_Name(str) { }
- CPDF_Name(FX_LPCSTR str) : CPDF_Object(PDFOBJ_NAME), m_Name(str) { }
+ CPDF_Name(const FX_CHAR* str) : CPDF_Object(PDFOBJ_NAME), m_Name(str) { }
CFX_ByteString& GetString()
{
@@ -506,19 +506,19 @@ class CPDF_Stream : public CPDF_Object
{
public:
- static CPDF_Stream* Create(FX_LPBYTE pData, FX_DWORD size, CPDF_Dictionary* pDict)
+ static CPDF_Stream* Create(uint8_t* pData, FX_DWORD size, CPDF_Dictionary* pDict)
{
return FX_NEW CPDF_Stream(pData, size, pDict);
}
- CPDF_Stream(FX_LPBYTE pData, FX_DWORD size, CPDF_Dictionary* pDict);
+ CPDF_Stream(uint8_t* pData, FX_DWORD size, CPDF_Dictionary* pDict);
CPDF_Dictionary* GetDict() const
{
return m_pDict;
}
- void SetData(FX_LPCBYTE pData, FX_DWORD size, FX_BOOL bCompressed, FX_BOOL bKeepBuf);
+ void SetData(const uint8_t* pData, FX_DWORD size, FX_BOOL bCompressed, FX_BOOL bKeepBuf);
void InitStream(uint8_t* pData, FX_DWORD size, CPDF_Dictionary* pDict);
@@ -535,7 +535,7 @@ public:
return m_dwSize;
}
- FX_BOOL ReadRawData(FX_FILESIZE start_pos, FX_LPBYTE pBuf, FX_DWORD buf_size) const;
+ FX_BOOL ReadRawData(FX_FILESIZE start_pos, uint8_t* pBuf, FX_DWORD buf_size) const;
FX_BOOL IsMemoryBased() const
@@ -543,7 +543,7 @@ public:
return m_GenNum == (FX_DWORD) - 1;
}
- CPDF_Stream* Clone(FX_BOOL bDirect, FPDF_LPFCloneStreamCallback lpfCallback, FX_LPVOID pUserData) const;
+ CPDF_Stream* Clone(FX_BOOL bDirect, FPDF_LPFCloneStreamCallback lpfCallback, void* pUserData) const;
protected:
~CPDF_Stream();
@@ -556,7 +556,7 @@ protected:
union {
- FX_LPBYTE m_pDataBuf;
+ uint8_t* m_pDataBuf;
IFX_FileRead* m_pFile;
};
@@ -591,11 +591,11 @@ public:
return m_pStream? m_pStream->GetDict() : NULL;
}
- FX_LPCBYTE GetData() const;
+ const uint8_t* GetData() const;
FX_DWORD GetSize() const;
- FX_LPBYTE DetachData();
+ uint8_t* DetachData();
const CFX_ByteString& GetImageDecoder()
{
@@ -608,7 +608,7 @@ public:
}
protected:
- FX_LPBYTE m_pData;
+ uint8_t* m_pData;
FX_DWORD m_dwSize;
@@ -620,7 +620,7 @@ protected:
const CPDF_Stream* m_pStream;
- FX_LPBYTE m_pSrcData;
+ uint8_t* m_pSrcData;
};
CFX_DataFilter* FPDF_CreateFilter(FX_BSTR name, const CPDF_Dictionary* pParam, int width = 0, int height = 0);
#define FPDF_FILTER_BUFFER_SIZE 20480
@@ -630,7 +630,7 @@ public:
~CPDF_StreamFilter();
- FX_DWORD ReadBlock(FX_LPBYTE buffer, FX_DWORD size);
+ FX_DWORD ReadBlock(uint8_t* buffer, FX_DWORD size);
FX_DWORD GetSrcPos()
{
@@ -645,7 +645,7 @@ protected:
CPDF_StreamFilter() {}
- FX_DWORD ReadLeftOver(FX_LPBYTE buffer, FX_DWORD buf_size);
+ FX_DWORD ReadLeftOver(uint8_t* buffer, FX_DWORD buf_size);
const CPDF_Stream* m_pStream;
diff --git a/core/include/fpdfapi/fpdf_page.h b/core/include/fpdfapi/fpdf_page.h
index d549b7713a..867f00208b 100644
--- a/core/include/fpdfapi/fpdf_page.h
+++ b/core/include/fpdfapi/fpdf_page.h
@@ -235,7 +235,7 @@ public:
void TransformContent(CFX_Matrix& matrix);
protected:
void ProcessImage(CFX_ByteTextBuf& buf, CPDF_ImageObject* pImageObj);
- void ProcessForm(CFX_ByteTextBuf& buf, FX_LPCBYTE data, FX_DWORD size, CFX_Matrix& matrix);
+ void ProcessForm(CFX_ByteTextBuf& buf, const uint8_t* data, FX_DWORD size, CFX_Matrix& matrix);
CFX_ByteString RealizeResource(CPDF_Object* pResourceObj, const FX_CHAR* szType);
private:
CPDF_Page* m_pPage;
diff --git a/core/include/fpdfapi/fpdf_parser.h b/core/include/fpdfapi/fpdf_parser.h
index f0e3e2ca08..cdd7aaaa11 100644
--- a/core/include/fpdfapi/fpdf_parser.h
+++ b/core/include/fpdfapi/fpdf_parser.h
@@ -202,7 +202,7 @@ class CPDF_SimpleParser
{
public:
- CPDF_SimpleParser(FX_LPCBYTE pData, FX_DWORD dwSize);
+ CPDF_SimpleParser(const uint8_t* pData, FX_DWORD dwSize);
CPDF_SimpleParser(FX_BSTR str);
@@ -229,9 +229,9 @@ public:
}
private:
- void ParseWord(FX_LPCBYTE& pStart, FX_DWORD& dwSize, int& type);
+ void ParseWord(const uint8_t*& pStart, FX_DWORD& dwSize, int& type);
- FX_LPCBYTE m_pData;
+ const uint8_t* m_pData;
FX_DWORD m_dwSize;
@@ -306,7 +306,7 @@ protected:
void GetNextWord();
- FX_BOOL IsWholeWord(FX_FILESIZE startpos, FX_FILESIZE limit, FX_LPCBYTE tag, FX_DWORD taglen);
+ FX_BOOL IsWholeWord(FX_FILESIZE startpos, FX_FILESIZE limit, const uint8_t* tag, FX_DWORD taglen);
CFX_ByteString ReadString();
@@ -373,8 +373,8 @@ public:
CPDF_Parser();
~CPDF_Parser();
- FX_DWORD StartParse(FX_LPCSTR filename, FX_BOOL bReParse = FALSE);
- FX_DWORD StartParse(FX_LPCWSTR filename, FX_BOOL bReParse = FALSE);
+ FX_DWORD StartParse(const FX_CHAR* filename, FX_BOOL bReParse = FALSE);
+ FX_DWORD StartParse(const FX_WCHAR* filename, FX_BOOL bReParse = FALSE);
FX_DWORD StartParse(IFX_FileRead* pFile, FX_BOOL bReParse = FALSE, FX_BOOL bOwnFileRead = TRUE);
void CloseParser(FX_BOOL bReParse = FALSE);
@@ -592,7 +592,7 @@ public:
virtual FX_BOOL IsOwner() = 0;
- virtual FX_BOOL GetCryptInfo(int& cipher, FX_LPCBYTE& buffer, int& keylen) = 0;
+ virtual FX_BOOL GetCryptInfo(int& cipher, const uint8_t*& buffer, int& keylen) = 0;
virtual FX_BOOL IsMetadataEncrypted()
{
@@ -619,7 +619,7 @@ public:
{
return m_bOwner;
}
- virtual FX_BOOL GetCryptInfo(int& cipher, FX_LPCBYTE& buffer, int& keylen);
+ virtual FX_BOOL GetCryptInfo(int& cipher, const uint8_t*& buffer, int& keylen);
virtual FX_BOOL IsMetadataEncrypted();
virtual CPDF_CryptoHandler* CreateCryptoHandler();
virtual CPDF_StandardSecurityHandler* GetStandardHandler()
@@ -628,14 +628,14 @@ public:
}
void OnCreate(CPDF_Dictionary* pEncryptDict, CPDF_Array* pIdArray,
- FX_LPCBYTE user_pass, FX_DWORD user_size,
- FX_LPCBYTE owner_pass, FX_DWORD owner_size, FX_DWORD type = PDF_ENCRYPT_CONTENT);
+ const uint8_t* user_pass, FX_DWORD user_size,
+ const uint8_t* owner_pass, FX_DWORD owner_size, FX_DWORD type = PDF_ENCRYPT_CONTENT);
void OnCreate(CPDF_Dictionary* pEncryptDict, CPDF_Array* pIdArray,
- FX_LPCBYTE user_pass, FX_DWORD user_size, FX_DWORD type = PDF_ENCRYPT_CONTENT);
+ const uint8_t* user_pass, FX_DWORD user_size, FX_DWORD type = PDF_ENCRYPT_CONTENT);
- CFX_ByteString GetUserPassword(FX_LPCBYTE owner_pass, FX_DWORD pass_size);
- CFX_ByteString GetUserPassword(FX_LPCBYTE owner_pass, FX_DWORD pass_size, int32_t key_len);
+ CFX_ByteString GetUserPassword(const uint8_t* owner_pass, FX_DWORD pass_size);
+ CFX_ByteString GetUserPassword(const uint8_t* owner_pass, FX_DWORD pass_size, int32_t key_len);
int GetVersion()
{
return m_Version;
@@ -645,8 +645,8 @@ public:
return m_Revision;
}
- int CheckPassword(FX_LPCBYTE password, FX_DWORD pass_size, FX_BOOL bOwner, FX_LPBYTE key);
- int CheckPassword(FX_LPCBYTE password, FX_DWORD pass_size, FX_BOOL bOwner, FX_LPBYTE key, int key_len);
+ int CheckPassword(const uint8_t* password, FX_DWORD pass_size, FX_BOOL bOwner, uint8_t* key);
+ int CheckPassword(const uint8_t* password, FX_DWORD pass_size, FX_BOOL bOwner, uint8_t* key, int key_len);
private:
int m_Version;
@@ -660,16 +660,16 @@ private:
FX_BOOL LoadDict(CPDF_Dictionary* pEncryptDict);
FX_BOOL LoadDict(CPDF_Dictionary* pEncryptDict, FX_DWORD type, int& cipher, int& key_len);
- FX_BOOL CheckUserPassword(FX_LPCBYTE password, FX_DWORD pass_size,
- FX_BOOL bIgnoreEncryptMeta, FX_LPBYTE key, int32_t key_len);
+ FX_BOOL CheckUserPassword(const uint8_t* password, FX_DWORD pass_size,
+ FX_BOOL bIgnoreEncryptMeta, uint8_t* key, int32_t key_len);
- FX_BOOL CheckOwnerPassword(FX_LPCBYTE password, FX_DWORD pass_size, FX_LPBYTE key, int32_t key_len);
- FX_BOOL AES256_CheckPassword(FX_LPCBYTE password, FX_DWORD size, FX_BOOL bOwner, FX_LPBYTE key);
- void AES256_SetPassword(CPDF_Dictionary* pEncryptDict, FX_LPCBYTE password, FX_DWORD size, FX_BOOL bOwner, FX_LPCBYTE key);
- void AES256_SetPerms(CPDF_Dictionary* pEncryptDict, FX_DWORD permission, FX_BOOL bEncryptMetadata, FX_LPCBYTE key);
+ FX_BOOL CheckOwnerPassword(const uint8_t* password, FX_DWORD pass_size, uint8_t* key, int32_t key_len);
+ FX_BOOL AES256_CheckPassword(const uint8_t* password, FX_DWORD size, FX_BOOL bOwner, uint8_t* key);
+ void AES256_SetPassword(CPDF_Dictionary* pEncryptDict, const uint8_t* password, FX_DWORD size, FX_BOOL bOwner, const uint8_t* key);
+ void AES256_SetPerms(CPDF_Dictionary* pEncryptDict, FX_DWORD permission, FX_BOOL bEncryptMetadata, const uint8_t* key);
void OnCreate(CPDF_Dictionary* pEncryptDict, CPDF_Array* pIdArray,
- FX_LPCBYTE user_pass, FX_DWORD user_size,
- FX_LPCBYTE owner_pass, FX_DWORD owner_size, FX_BOOL bDefault, FX_DWORD type);
+ const uint8_t* user_pass, FX_DWORD user_size,
+ const uint8_t* owner_pass, FX_DWORD owner_size, FX_BOOL bDefault, FX_DWORD type);
FX_BOOL CheckSecurity(int32_t key_len);
FX_BOOL m_bOwner;
@@ -692,17 +692,17 @@ public:
virtual FX_DWORD DecryptGetSize(FX_DWORD src_size) = 0;
- virtual FX_LPVOID DecryptStart(FX_DWORD objnum, FX_DWORD gennum) = 0;
+ virtual void* DecryptStart(FX_DWORD objnum, FX_DWORD gennum) = 0;
- virtual FX_BOOL DecryptStream(FX_LPVOID context, FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf) = 0;
+ virtual FX_BOOL DecryptStream(void* context, const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf) = 0;
- virtual FX_BOOL DecryptFinish(FX_LPVOID context, CFX_BinaryBuf& dest_buf) = 0;
+ virtual FX_BOOL DecryptFinish(void* context, CFX_BinaryBuf& dest_buf) = 0;
- virtual FX_DWORD EncryptGetSize(FX_DWORD objnum, FX_DWORD version, FX_LPCBYTE src_buf, FX_DWORD src_size) = 0;
+ virtual FX_DWORD EncryptGetSize(FX_DWORD objnum, FX_DWORD version, const uint8_t* src_buf, FX_DWORD src_size) = 0;
- virtual FX_BOOL EncryptContent(FX_DWORD objnum, FX_DWORD version, FX_LPCBYTE src_buf, FX_DWORD src_size,
- FX_LPBYTE dest_buf, FX_DWORD& dest_size) = 0;
+ virtual FX_BOOL EncryptContent(FX_DWORD objnum, FX_DWORD version, const uint8_t* src_buf, FX_DWORD src_size,
+ uint8_t* dest_buf, FX_DWORD& dest_size) = 0;
void Decrypt(FX_DWORD objnum, FX_DWORD version, CFX_ByteString& str);
};
@@ -714,22 +714,22 @@ public:
virtual ~CPDF_StandardCryptoHandler();
- FX_BOOL Init(int cipher, FX_LPCBYTE key, int keylen);
+ FX_BOOL Init(int cipher, const uint8_t* key, int keylen);
virtual FX_BOOL Init(CPDF_Dictionary* pEncryptDict, CPDF_SecurityHandler* pSecurityHandler);
virtual FX_DWORD DecryptGetSize(FX_DWORD src_size);
- virtual FX_LPVOID DecryptStart(FX_DWORD objnum, FX_DWORD gennum);
- virtual FX_BOOL DecryptStream(FX_LPVOID context, FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf);
- virtual FX_BOOL DecryptFinish(FX_LPVOID context, CFX_BinaryBuf& dest_buf);
- virtual FX_DWORD EncryptGetSize(FX_DWORD objnum, FX_DWORD version, FX_LPCBYTE src_buf, FX_DWORD src_size);
- virtual FX_BOOL EncryptContent(FX_DWORD objnum, FX_DWORD version, FX_LPCBYTE src_buf, FX_DWORD src_size,
- FX_LPBYTE dest_buf, FX_DWORD& dest_size);
+ virtual void* DecryptStart(FX_DWORD objnum, FX_DWORD gennum);
+ virtual FX_BOOL DecryptStream(void* context, const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf);
+ virtual FX_BOOL DecryptFinish(void* context, CFX_BinaryBuf& dest_buf);
+ virtual FX_DWORD EncryptGetSize(FX_DWORD objnum, FX_DWORD version, const uint8_t* src_buf, FX_DWORD src_size);
+ virtual FX_BOOL EncryptContent(FX_DWORD objnum, FX_DWORD version, const uint8_t* src_buf, FX_DWORD src_size,
+ uint8_t* dest_buf, FX_DWORD& dest_size);
protected:
- virtual void CryptBlock(FX_BOOL bEncrypt, FX_DWORD objnum, FX_DWORD gennum, FX_LPCBYTE src_buf, FX_DWORD src_size,
- FX_LPBYTE dest_buf, FX_DWORD& dest_size);
- virtual FX_LPVOID CryptStart(FX_DWORD objnum, FX_DWORD gennum, FX_BOOL bEncrypt);
- virtual FX_BOOL CryptStream(FX_LPVOID context, FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf, FX_BOOL bEncrypt);
- virtual FX_BOOL CryptFinish(FX_LPVOID context, CFX_BinaryBuf& dest_buf, FX_BOOL bEncrypt);
+ virtual void CryptBlock(FX_BOOL bEncrypt, FX_DWORD objnum, FX_DWORD gennum, const uint8_t* src_buf, FX_DWORD src_size,
+ uint8_t* dest_buf, FX_DWORD& dest_size);
+ virtual void* CryptStart(FX_DWORD objnum, FX_DWORD gennum, FX_BOOL bEncrypt);
+ virtual FX_BOOL CryptStream(void* context, const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf, FX_BOOL bEncrypt);
+ virtual FX_BOOL CryptFinish(void* context, CFX_BinaryBuf& dest_buf, FX_BOOL bEncrypt);
uint8_t m_EncryptKey[32];
@@ -737,7 +737,7 @@ protected:
int m_Cipher;
- FX_LPBYTE m_pAESContext;
+ uint8_t* m_pAESContext;
};
class CPDF_Point
{
@@ -760,11 +760,11 @@ CFX_ByteString PDF_NameDecode(FX_BSTR orig);
CFX_ByteString PDF_NameDecode(const CFX_ByteString& orig);
CFX_ByteString PDF_NameEncode(const CFX_ByteString& orig);
CFX_ByteString PDF_EncodeString(const CFX_ByteString& src, FX_BOOL bHex = FALSE);
-CFX_WideString PDF_DecodeText(FX_LPCBYTE pData, FX_DWORD size, CFX_CharMap* pCharMap = NULL);
+CFX_WideString PDF_DecodeText(const uint8_t* pData, FX_DWORD size, CFX_CharMap* pCharMap = NULL);
inline CFX_WideString PDF_DecodeText(const CFX_ByteString& bstr, CFX_CharMap* pCharMap = NULL) {
- return PDF_DecodeText((FX_LPCBYTE)bstr.c_str(), bstr.GetLength(), pCharMap);
+ return PDF_DecodeText((const uint8_t*)bstr.c_str(), bstr.GetLength(), pCharMap);
}
-CFX_ByteString PDF_EncodeText(FX_LPCWSTR pString, int len = -1, CFX_CharMap* pCharMap = NULL);
+CFX_ByteString PDF_EncodeText(const FX_WCHAR* pString, int len = -1, CFX_CharMap* pCharMap = NULL);
inline CFX_ByteString PDF_EncodeText(const CFX_WideString& str, CFX_CharMap* pCharMap = NULL) {
return PDF_EncodeText(str.c_str(), str.GetLength(), pCharMap);
}
@@ -774,7 +774,7 @@ class CFDF_Document : public CPDF_IndirectObjects
public:
static CFDF_Document* CreateNewDoc();
static CFDF_Document* ParseFile(IFX_FileRead *pFile, FX_BOOL bOwnFile = FALSE);
- static CFDF_Document* ParseMemory(FX_LPCBYTE pData, FX_DWORD size);
+ static CFDF_Document* ParseMemory(const uint8_t* pData, FX_DWORD size);
~CFDF_Document();
@@ -798,9 +798,9 @@ protected:
CFX_WideString FPDF_FileSpec_GetWin32Path(const CPDF_Object* pFileSpec);
void FPDF_FileSpec_SetWin32Path(CPDF_Object* pFileSpec, const CFX_WideString& fullpath);
-void FlateEncode(const uint8_t* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size);
-FX_DWORD FlateDecode(const uint8_t* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size);
-FX_DWORD RunLengthDecode(const uint8_t* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size);
+void FlateEncode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_buf, FX_DWORD& dest_size);
+FX_DWORD FlateDecode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_buf, FX_DWORD& dest_size);
+FX_DWORD RunLengthDecode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_buf, FX_DWORD& dest_size);
class CPDF_NumberTree
{
public:
diff --git a/core/include/fpdfapi/fpdf_resource.h b/core/include/fpdfapi/fpdf_resource.h
index 06dcdfec44..f962fef916 100644
--- a/core/include/fpdfapi/fpdf_resource.h
+++ b/core/include/fpdfapi/fpdf_resource.h
@@ -155,7 +155,7 @@ public:
return m_Font.GetFace();
}
- virtual FX_DWORD GetNextChar(FX_LPCSTR pString, int nStrLen, int& offset) const
+ virtual FX_DWORD GetNextChar(const FX_CHAR* pString, int nStrLen, int& offset) const
{
if (offset < 0 || nStrLen < 1) {
return 0;
@@ -164,14 +164,14 @@ public:
return static_cast<FX_DWORD>(ch);
}
- virtual int CountChar(FX_LPCSTR pString, int size) const
+ virtual int CountChar(const FX_CHAR* pString, int size) const
{
return size;
}
void AppendChar(CFX_ByteString& str, FX_DWORD charcode) const;
- virtual int AppendChar(FX_LPSTR buf, FX_DWORD charcode) const
+ virtual int AppendChar(FX_CHAR* buf, FX_DWORD charcode) const
{
*buf = (FX_CHAR)charcode;
return 1;
@@ -514,9 +514,9 @@ public:
return !m_bType1;
}
- virtual FX_DWORD GetNextChar(FX_LPCSTR pString, int nStrLen, int& offset) const override;
- virtual int CountChar(FX_LPCSTR pString, int size) const;
- virtual int AppendChar(FX_LPSTR str, FX_DWORD charcode) const;
+ virtual FX_DWORD GetNextChar(const FX_CHAR* pString, int nStrLen, int& offset) const override;
+ virtual int CountChar(const FX_CHAR* pString, int size) const;
+ virtual int AppendChar(FX_CHAR* str, FX_DWORD charcode) const;
virtual int GetCharSize(FX_DWORD charcode) const;
int GetCharset() const
@@ -524,7 +524,7 @@ public:
return m_Charset;
}
- FX_LPCBYTE GetCIDTransform(FX_WORD CID) const;
+ const uint8_t* GetCIDTransform(FX_WORD CID) const;
virtual FX_BOOL IsVertWriting() const;
short GetVertWidth(FX_WORD CID) const;
void GetVertOrigin(FX_WORD CID, short& vx, short& vy) const;
@@ -624,7 +624,7 @@ public:
FX_BOOL SetCMYK(FX_FLOAT* pBuf, FX_FLOAT c, FX_FLOAT m, FX_FLOAT y, FX_FLOAT k) const;
- virtual void TranslateImageLine(FX_LPBYTE dest_buf, FX_LPCBYTE src_buf, int pixels,
+ virtual void TranslateImageLine(uint8_t* dest_buf, const uint8_t* src_buf, int pixels,
int image_width, int image_height, FX_BOOL bTransMask = FALSE) const;
CPDF_Array*& GetArray()
@@ -942,7 +942,7 @@ private:
CPDF_Document* m_pDocument;
CPDF_Dictionary* m_pOC;
- CPDF_Dictionary* InitJPEG(FX_LPBYTE pData, FX_DWORD size);
+ CPDF_Dictionary* InitJPEG(uint8_t* pData, FX_DWORD size);
};
#endif // CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_
diff --git a/core/include/fpdfapi/fpdf_serial.h b/core/include/fpdfapi/fpdf_serial.h
index e4a0aec2e5..ada77a2075 100644
--- a/core/include/fpdfapi/fpdf_serial.h
+++ b/core/include/fpdfapi/fpdf_serial.h
@@ -26,7 +26,7 @@ class CPDF_ObjArchiveLoader : public CFX_ArchiveLoader
{
public:
- CPDF_ObjArchiveLoader(FX_LPCBYTE pData, FX_DWORD dwSize) : CFX_ArchiveLoader(pData, dwSize),
+ CPDF_ObjArchiveLoader(const uint8_t* pData, FX_DWORD dwSize) : CFX_ArchiveLoader(pData, dwSize),
m_IndirectObjects(NULL) {}
friend CPDF_ObjArchiveLoader& operator >> (CPDF_ObjArchiveLoader& ar, CPDF_Object*& pObj);
@@ -72,7 +72,7 @@ class CPDF_PageArchiveLoader : public CPDF_ObjArchiveLoader
{
public:
- CPDF_PageArchiveLoader(CPDF_PageObjects* pPageObjs, FX_LPCBYTE pData, FX_DWORD dwSize);
+ CPDF_PageArchiveLoader(CPDF_PageObjects* pPageObjs, const uint8_t* pData, FX_DWORD dwSize);
friend CPDF_PageArchiveLoader& operator >> (CPDF_PageArchiveLoader& ar, CPDF_PageObject*& pObj);
@@ -91,7 +91,7 @@ public:
protected:
void PostProcColor(CPDF_Color& color);
- CPDF_Object* AddResource(CPDF_Object* pSrcObj, FX_LPCSTR type);
+ CPDF_Object* AddResource(CPDF_Object* pSrcObj, const FX_CHAR* type);
CPDF_ClipPath m_LastClipPath;
@@ -121,9 +121,9 @@ public:
void RemoveSecurity();
- FX_BOOL Create(FX_LPCWSTR filename, FX_DWORD flags = 0);
+ FX_BOOL Create(const FX_WCHAR* filename, FX_DWORD flags = 0);
- FX_BOOL Create(FX_LPCSTR filename, FX_DWORD flags = 0);
+ FX_BOOL Create(const FX_CHAR* filename, FX_DWORD flags = 0);
FX_BOOL Create(IFX_StreamWrite* pFile, FX_DWORD flags = 0);
@@ -179,7 +179,7 @@ protected:
int32_t WriteDirectObj(FX_DWORD objnum, const CPDF_Object* pObj, FX_BOOL bEncrypt = TRUE);
int32_t WriteIndirectObjectToStream(const CPDF_Object* pObj);
int32_t WriteIndirectObj(FX_DWORD objnum, const CPDF_Object* pObj);
- int32_t WriteIndirectObjectToStream(FX_DWORD objnum, FX_LPCBYTE pBuffer, FX_DWORD dwSize);
+ int32_t WriteIndirectObjectToStream(FX_DWORD objnum, const uint8_t* pBuffer, FX_DWORD dwSize);
int32_t AppendObjectNumberToXRef(FX_DWORD objnum);
void InitID(FX_BOOL bDefault = TRUE);
int32_t WriteStream(const CPDF_Object* pStream, FX_DWORD objnum, CPDF_CryptoHandler* pCrypto);
diff --git a/core/include/fpdfdoc/fpdf_doc.h b/core/include/fpdfdoc/fpdf_doc.h
index 14cc145d6d..3c4820aa2b 100644
--- a/core/include/fpdfdoc/fpdf_doc.h
+++ b/core/include/fpdfdoc/fpdf_doc.h
@@ -727,7 +727,7 @@ public:
static FX_BOOL UpdatingAPEnabled();
- static CFX_ByteString GenerateNewResourceName(const CPDF_Dictionary* pResDict, FX_LPCSTR csType, int iMinLen = 2, FX_LPCSTR csPrefix = "");
+ static CFX_ByteString GenerateNewResourceName(const CPDF_Dictionary* pResDict, const FX_CHAR* csType, int iMinLen = 2, const FX_CHAR* csPrefix = "");
@@ -739,9 +739,9 @@ public:
static CPDF_Font* AddStandardFont(const CPDF_Document* pDocument, CFX_ByteString csFontName);
- static CFX_ByteString GetNativeFont(uint8_t iCharSet, FX_LPVOID pLogFont = NULL);
+ static CFX_ByteString GetNativeFont(uint8_t iCharSet, void* pLogFont = NULL);
- static CFX_ByteString GetNativeFont(FX_LPVOID pLogFont = NULL);
+ static CFX_ByteString GetNativeFont(void* pLogFont = NULL);
static uint8_t GetNativeCharSet();
@@ -1544,7 +1544,7 @@ public:
CXML_Element* GetRDF() const;
protected:
- FX_LPVOID m_pData;
+ void* m_pData;
};
class CPDF_ViewerPreferences
{
diff --git a/core/include/fpdfdoc/fpdf_vt.h b/core/include/fpdfdoc/fpdf_vt.h
index fbfeacb755..1fec0e629a 100644
--- a/core/include/fpdfdoc/fpdf_vt.h
+++ b/core/include/fpdfdoc/fpdf_vt.h
@@ -375,7 +375,7 @@ public:
virtual void ResetAll() = 0;
- virtual void SetText(FX_LPCWSTR text, int32_t charset = 1, const CPVT_SecProps * pSecProps = NULL,
+ virtual void SetText(const FX_WCHAR* text, int32_t charset = 1, const CPVT_SecProps * pSecProps = NULL,
const CPVT_WordProps * pWordProps = NULL) = 0;
virtual CPVT_WordPlace InsertWord(const CPVT_WordPlace & place, FX_WORD word, int32_t charset = 1,
@@ -384,7 +384,7 @@ public:
virtual CPVT_WordPlace InsertSection(const CPVT_WordPlace & place, const CPVT_SecProps * pSecProps = NULL,
const CPVT_WordProps * pWordProps = NULL) = 0;
- virtual CPVT_WordPlace InsertText(const CPVT_WordPlace & place, FX_LPCWSTR text, int32_t charset = 1,
+ virtual CPVT_WordPlace InsertText(const CPVT_WordPlace & place, const FX_WCHAR* text, int32_t charset = 1,
const CPVT_SecProps * pSecProps = NULL, const CPVT_WordProps * pWordProps = NULL) = 0;
virtual CPVT_WordPlace DeleteWords(const CPVT_WordRange & PlaceRange) = 0;
diff --git a/core/include/fxcodec/fx_codec.h b/core/include/fxcodec/fx_codec.h
index 31dea3b8d2..dab637ccc1 100644
--- a/core/include/fxcodec/fx_codec.h
+++ b/core/include/fxcodec/fx_codec.h
@@ -114,11 +114,11 @@ class ICodec_BasicModule
public:
virtual ~ICodec_BasicModule() {}
- virtual FX_BOOL RunLengthEncode(const uint8_t* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf,
+ virtual FX_BOOL RunLengthEncode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_buf,
FX_DWORD& dest_size) = 0;
- virtual FX_BOOL A85Encode(const uint8_t* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf,
+ virtual FX_BOOL A85Encode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_buf,
FX_DWORD& dest_size) = 0;
- virtual ICodec_ScanlineDecoder* CreateRunLengthDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height,
+ virtual ICodec_ScanlineDecoder* CreateRunLengthDecoder(const uint8_t* src_buf, FX_DWORD src_size, int width, int height,
int nComps, int bpc) = 0;
};
class ICodec_ScanlineDecoder
@@ -131,7 +131,7 @@ public:
virtual void DownScale(int dest_width, int dest_height) = 0;
- virtual FX_LPBYTE GetScanline(int line) = 0;
+ virtual uint8_t* GetScanline(int line) = 0;
virtual FX_BOOL SkipToScanline(int line, IFX_Pause* pPause) = 0;
@@ -152,15 +152,15 @@ class ICodec_FlateModule
public:
virtual ~ICodec_FlateModule() {}
- virtual ICodec_ScanlineDecoder* CreateDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height,
+ virtual ICodec_ScanlineDecoder* CreateDecoder(const uint8_t* src_buf, FX_DWORD src_size, int width, int height,
int nComps, int bpc, int predictor, int Colors, int BitsPerComponent, int Columns) = 0;
virtual FX_DWORD FlateOrLZWDecode(FX_BOOL bLZW, const uint8_t* src_buf, FX_DWORD src_size, FX_BOOL bEarlyChange,
int predictor, int Colors, int BitsPerComponent, int Columns,
- FX_DWORD estimated_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size) = 0;
+ FX_DWORD estimated_size, uint8_t*& dest_buf, FX_DWORD& dest_size) = 0;
virtual FX_BOOL Encode(const uint8_t* src_buf, FX_DWORD src_size,
int predictor, int Colors, int BitsPerComponent, int Columns,
- FX_LPBYTE& dest_buf, FX_DWORD& dest_size) = 0;
- virtual FX_BOOL Encode(FX_LPCBYTE src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size) = 0;
+ uint8_t*& dest_buf, FX_DWORD& dest_size) = 0;
+ virtual FX_BOOL Encode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_buf, FX_DWORD& dest_size) = 0;
};
class ICodec_FaxModule
{
@@ -168,12 +168,12 @@ public:
virtual ~ICodec_FaxModule() {}
- virtual ICodec_ScanlineDecoder* CreateDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height,
+ virtual ICodec_ScanlineDecoder* CreateDecoder(const uint8_t* src_buf, FX_DWORD src_size, int width, int height,
int K, FX_BOOL EndOfLine, FX_BOOL EncodedByteAlign, FX_BOOL BlackIs1, int Columns, int Rows) = 0;
- virtual FX_BOOL Encode(FX_LPCBYTE src_buf, int width, int height, int pitch,
- FX_LPBYTE& dest_buf, FX_DWORD& dest_size) = 0;
+ virtual FX_BOOL Encode(const uint8_t* src_buf, int width, int height, int pitch,
+ uint8_t*& dest_buf, FX_DWORD& dest_size) = 0;
};
class ICodec_JpegModule
{
@@ -183,21 +183,21 @@ public:
virtual void SetPovider(IFX_JpegProvider* pJP) = 0;
- virtual ICodec_ScanlineDecoder* CreateDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size,
+ virtual ICodec_ScanlineDecoder* CreateDecoder(const uint8_t* src_buf, FX_DWORD src_size,
int width, int height, int nComps, FX_BOOL ColorTransform) = 0;
- virtual FX_BOOL LoadInfo(FX_LPCBYTE src_buf, FX_DWORD src_size, int& width, int& height,
+ virtual FX_BOOL LoadInfo(const uint8_t* src_buf, FX_DWORD src_size, int& width, int& height,
int& num_components, int& bits_per_components, FX_BOOL& color_transform,
- FX_LPBYTE* icc_buf_ptr = NULL, FX_DWORD* icc_length = NULL) = 0;
+ uint8_t** icc_buf_ptr = NULL, FX_DWORD* icc_length = NULL) = 0;
- virtual FX_BOOL Encode(const class CFX_DIBSource* pSource, FX_LPBYTE& dest_buf, FX_STRSIZE& dest_size, int quality = 75,
- FX_LPCBYTE icc_buf = NULL, FX_DWORD icc_length = 0) = 0;
+ virtual FX_BOOL Encode(const class CFX_DIBSource* pSource, uint8_t*& dest_buf, FX_STRSIZE& dest_size, int quality = 75,
+ const uint8_t* icc_buf = NULL, FX_DWORD icc_length = 0) = 0;
virtual void* Start() = 0;
virtual void Finish(void* pContext) = 0;
- virtual void Input(void* pContext, FX_LPCBYTE src_buf, FX_DWORD src_size) = 0;
+ virtual void Input(void* pContext, const uint8_t* src_buf, FX_DWORD src_size) = 0;
virtual int ReadHeader(void* pContext, int* width, int* height, int* nComps, CFX_DIBAttribute* pAttribute = NULL) = 0;
@@ -205,10 +205,10 @@ public:
virtual int StartScanline(void* pContext, int down_scale) = 0;
- virtual FX_BOOL ReadScanline(void* pContext, FX_LPBYTE dest_buf) = 0;
+ virtual FX_BOOL ReadScanline(void* pContext, uint8_t* dest_buf) = 0;
- virtual FX_DWORD GetAvailInput(void* pContext, FX_LPBYTE* avail_buf_ptr = NULL) = 0;
+ virtual FX_DWORD GetAvailInput(void* pContext, uint8_t** avail_buf_ptr = NULL) = 0;
};
class ICodec_JpxModule
{
@@ -216,15 +216,15 @@ public:
virtual ~ICodec_JpxModule() {}
- virtual FX_LPVOID CreateDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size, FX_BOOL useColorSpace = FALSE) = 0;
+ virtual void* CreateDecoder(const uint8_t* src_buf, FX_DWORD src_size, FX_BOOL useColorSpace = FALSE) = 0;
- virtual void GetImageInfo(FX_LPVOID ctx, FX_DWORD& width, FX_DWORD& height,
+ virtual void GetImageInfo(void* ctx, FX_DWORD& width, FX_DWORD& height,
FX_DWORD& codestream_nComps, FX_DWORD& output_nComps) = 0;
- virtual FX_BOOL Decode(FX_LPVOID ctx, FX_LPBYTE dest_data, int pitch,
- FX_BOOL bTranslateColor, FX_LPBYTE offsets) = 0;
+ virtual FX_BOOL Decode(void* ctx, uint8_t* dest_data, int pitch,
+ FX_BOOL bTranslateColor, uint8_t* offsets) = 0;
- virtual void DestroyDecoder(FX_LPVOID ctx) = 0;
+ virtual void DestroyDecoder(void* ctx) = 0;
};
class ICodec_PngModule
{
@@ -236,11 +236,11 @@ public:
virtual void Finish(void* pContext) = 0;
- virtual FX_BOOL Input(void* pContext, FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_DIBAttribute* pAttribute = NULL) = 0;
+ virtual FX_BOOL Input(void* pContext, const uint8_t* src_buf, FX_DWORD src_size, CFX_DIBAttribute* pAttribute = NULL) = 0;
FX_BOOL (*ReadHeaderCallback)(void* pModule, int width, int height, int bpc, int pass, int* color_type, double* gamma);
- FX_BOOL (*AskScanlineBufCallback)(void* pModule, int line, FX_LPBYTE& src_buf);
+ FX_BOOL (*AskScanlineBufCallback)(void* pModule, int line, uint8_t*& src_buf);
void (*FillScanlineBufCompletedCallback)(void* pModule, int pass, int line);
};
@@ -254,9 +254,9 @@ public:
virtual void Finish(void* pContext) = 0;
- virtual FX_DWORD GetAvailInput(void* pContext, FX_LPBYTE* avail_buf_ptr = NULL) = 0;
+ virtual FX_DWORD GetAvailInput(void* pContext, uint8_t** avail_buf_ptr = NULL) = 0;
- virtual void Input(void* pContext, FX_LPCBYTE src_buf, FX_DWORD src_size) = 0;
+ virtual void Input(void* pContext, const uint8_t* src_buf, FX_DWORD src_size) = 0;
virtual int32_t ReadHeader(void* pContext, int* width, int* height,
int* pal_num, void** pal_pp, int* bg_index, CFX_DIBAttribute* pAttribute = NULL) = 0;
@@ -265,7 +265,7 @@ public:
void (*RecordCurrentPositionCallback)(void* pModule, FX_DWORD& cur_pos);
- FX_LPBYTE (*AskLocalPaletteBufCallback)(void* pModule, int32_t frame_num, int32_t pal_size);
+ uint8_t* (*AskLocalPaletteBufCallback)(void* pModule, int32_t frame_num, int32_t pal_size);
virtual int32_t LoadFrame(void* pContext, int frame_num, CFX_DIBAttribute* pAttribute = NULL) = 0;
@@ -274,7 +274,7 @@ public:
int32_t delay_time, FX_BOOL user_input,
int32_t trans_index, int32_t disposal_method, FX_BOOL interlace);
- void (*ReadScanlineCallback)(void* pModule, int32_t row_num, FX_LPBYTE row_buf);
+ void (*ReadScanlineCallback)(void* pModule, int32_t row_num, uint8_t* row_buf);
};
class ICodec_BmpModule
{
@@ -286,9 +286,9 @@ public:
virtual void Finish(void* pContext) = 0;
- virtual FX_DWORD GetAvailInput(void* pContext, FX_LPBYTE* avail_buf_ptr = NULL) = 0;
+ virtual FX_DWORD GetAvailInput(void* pContext, uint8_t** avail_buf_ptr = NULL) = 0;
- virtual void Input(void* pContext, FX_LPCBYTE src_buf, FX_DWORD src_size) = 0;
+ virtual void Input(void* pContext, const uint8_t* src_buf, FX_DWORD src_size) = 0;
virtual int32_t ReadHeader(void* pContext, int32_t* width, int32_t* height, FX_BOOL* tb_flag, int32_t* components,
int* pal_num, FX_DWORD** pal_pp, CFX_DIBAttribute* pAttribute = NULL) = 0;
@@ -297,7 +297,7 @@ public:
FX_BOOL (*InputImagePositionBufCallback)(void* pModule, FX_DWORD rcd_pos);
- void (*ReadScanlineCallback)(void* pModule, int32_t row_num, FX_LPBYTE row_buf);
+ void (*ReadScanlineCallback)(void* pModule, int32_t row_num, uint8_t* row_buf);
};
class ICodec_TiffModule
{
@@ -305,17 +305,17 @@ public:
virtual ~ICodec_TiffModule() {}
- virtual FX_LPVOID CreateDecoder(IFX_FileRead* file_ptr) = 0;
+ virtual void* CreateDecoder(IFX_FileRead* file_ptr) = 0;
- virtual void GetFrames(FX_LPVOID ctx, int32_t& frames) = 0;
+ virtual void GetFrames(void* ctx, int32_t& frames) = 0;
- virtual FX_BOOL LoadFrameInfo(FX_LPVOID ctx, int32_t frame, FX_DWORD& width, FX_DWORD& height, FX_DWORD& comps, FX_DWORD& bpc, CFX_DIBAttribute* pAttribute = NULL) = 0;
+ virtual FX_BOOL LoadFrameInfo(void* ctx, int32_t frame, FX_DWORD& width, FX_DWORD& height, FX_DWORD& comps, FX_DWORD& bpc, CFX_DIBAttribute* pAttribute = NULL) = 0;
- virtual FX_BOOL Decode(FX_LPVOID ctx, class CFX_DIBitmap* pDIBitmap) = 0;
+ virtual FX_BOOL Decode(void* ctx, class CFX_DIBitmap* pDIBitmap) = 0;
- virtual void DestroyDecoder(FX_LPVOID ctx) = 0;
+ virtual void DestroyDecoder(void* ctx) = 0;
};
class ICodec_Jbig2Module
{
@@ -323,18 +323,18 @@ public:
virtual ~ICodec_Jbig2Module() {}
- virtual FX_BOOL Decode(FX_DWORD width, FX_DWORD height, FX_LPCBYTE src_buf, FX_DWORD src_size,
- FX_LPCBYTE global_data, FX_DWORD global_size, FX_LPBYTE dest_buf, FX_DWORD dest_pitch) = 0;
+ virtual FX_BOOL Decode(FX_DWORD width, FX_DWORD height, const uint8_t* src_buf, FX_DWORD src_size,
+ const uint8_t* global_data, FX_DWORD global_size, uint8_t* dest_buf, FX_DWORD dest_pitch) = 0;
virtual FX_BOOL Decode(IFX_FileRead* file_ptr, FX_DWORD& width, FX_DWORD& height,
- FX_DWORD& pitch, FX_LPBYTE& dest_buf) = 0;
+ FX_DWORD& pitch, uint8_t*& dest_buf) = 0;
virtual void* CreateJbig2Context() = 0;
- virtual FXCODEC_STATUS StartDecode(void* pJbig2Context, FX_DWORD width, FX_DWORD height, FX_LPCBYTE src_buf, FX_DWORD src_size,
- FX_LPCBYTE global_data, FX_DWORD global_size, FX_LPBYTE dest_buf, FX_DWORD dest_pitch, IFX_Pause* pPause) = 0;
+ virtual FXCODEC_STATUS StartDecode(void* pJbig2Context, FX_DWORD width, FX_DWORD height, const uint8_t* src_buf, FX_DWORD src_size,
+ const uint8_t* global_data, FX_DWORD global_size, uint8_t* dest_buf, FX_DWORD dest_pitch, IFX_Pause* pPause) = 0;
virtual FXCODEC_STATUS StartDecode(void* pJbig2Context, IFX_FileRead* file_ptr,
- FX_DWORD& width, FX_DWORD& height, FX_DWORD& pitch, FX_LPBYTE& dest_buf, IFX_Pause* pPause) = 0;
+ FX_DWORD& width, FX_DWORD& height, FX_DWORD& pitch, uint8_t*& dest_buf, IFX_Pause* pPause) = 0;
virtual FXCODEC_STATUS ContinueDecode(void* pJbig2Content, IFX_Pause* pPause) = 0;
virtual void DestroyJbig2Context(void* pJbig2Content) = 0;
};
@@ -394,18 +394,18 @@ public:
IccCS ColorSpace;
FX_DWORD dwProfileType;
FX_DWORD dwFormat;
- FX_LPBYTE pProfileData;
+ uint8_t* pProfileData;
FX_DWORD dwProfileSize;
double Gamma;
} IccParam;
virtual ~ICodec_IccModule() {}
- virtual IccCS GetProfileCS(FX_LPCBYTE pProfileData, unsigned int dwProfileSize) = 0;
+ virtual IccCS GetProfileCS(const uint8_t* pProfileData, unsigned int dwProfileSize) = 0;
virtual IccCS GetProfileCS(IFX_FileRead* pFile) = 0;
- virtual FX_LPVOID CreateTransform(ICodec_IccModule::IccParam* pInputParam,
+ virtual void* CreateTransform(ICodec_IccModule::IccParam* pInputParam,
ICodec_IccModule::IccParam* pOutputParam,
ICodec_IccModule::IccParam* pProofParam = NULL,
FX_DWORD dwIntent = Icc_INTENT_PERCEPTUAL,
@@ -415,26 +415,26 @@ public:
) = 0;
- virtual FX_LPVOID CreateTransform_sRGB(FX_LPCBYTE pProfileData, FX_DWORD dwProfileSize, int32_t& nComponents, int32_t intent = 0,
+ virtual void* CreateTransform_sRGB(const uint8_t* pProfileData, FX_DWORD dwProfileSize, int32_t& nComponents, int32_t intent = 0,
FX_DWORD dwSrcFormat = Icc_FORMAT_DEFAULT) = 0;
- virtual FX_LPVOID CreateTransform_CMYK(FX_LPCBYTE pSrcProfileData, FX_DWORD dwSrcProfileSize, int32_t& nSrcComponents,
- FX_LPCBYTE pDstProfileData, FX_DWORD dwDstProfileSize, int32_t intent = 0,
+ virtual void* CreateTransform_CMYK(const uint8_t* pSrcProfileData, FX_DWORD dwSrcProfileSize, int32_t& nSrcComponents,
+ const uint8_t* pDstProfileData, FX_DWORD dwDstProfileSize, int32_t intent = 0,
FX_DWORD dwSrcFormat = Icc_FORMAT_DEFAULT,
FX_DWORD dwDstFormat = Icc_FORMAT_DEFAULT
) = 0;
- virtual void DestroyTransform(FX_LPVOID pTransform) = 0;
+ virtual void DestroyTransform(void* pTransform) = 0;
- virtual void Translate(FX_LPVOID pTransform, FX_FLOAT* pSrcValues, FX_FLOAT* pDestValues) = 0;
+ virtual void Translate(void* pTransform, FX_FLOAT* pSrcValues, FX_FLOAT* pDestValues) = 0;
- virtual void TranslateScanline(FX_LPVOID pTransform, FX_LPBYTE pDest, FX_LPCBYTE pSrc, int pixels) = 0;
+ virtual void TranslateScanline(void* pTransform, uint8_t* pDest, const uint8_t* pSrc, int pixels) = 0;
virtual void SetComponents(FX_DWORD nComponents) = 0;
};
void AdobeCMYK_to_sRGB(FX_FLOAT c, FX_FLOAT m, FX_FLOAT y, FX_FLOAT k, FX_FLOAT& R, FX_FLOAT& G, FX_FLOAT& B);
void AdobeCMYK_to_sRGB1(uint8_t c, uint8_t m, uint8_t y, uint8_t k, uint8_t& R, uint8_t& G, uint8_t& B);
-FX_BOOL MD5ComputeID(FX_LPCVOID buf, FX_DWORD dwSize, uint8_t ID[16]);
+FX_BOOL MD5ComputeID(const void* buf, FX_DWORD dwSize, uint8_t ID[16]);
class CFX_DIBAttribute
{
public:
@@ -467,7 +467,7 @@ class IFX_DIBAttributeExif
{
public:
virtual ~IFX_DIBAttributeExif() {};
- virtual FX_BOOL GetInfo(FX_WORD tag, FX_LPVOID val) = 0;
+ virtual FX_BOOL GetInfo(FX_WORD tag, void* val) = 0;
};
#endif // CORE_INCLUDE_FXCODEC_FX_CODEC_H_
diff --git a/core/include/fxcodec/fx_codec_provider.h b/core/include/fxcodec/fx_codec_provider.h
index 8d2b4980ec..276977bc1d 100644
--- a/core/include/fxcodec/fx_codec_provider.h
+++ b/core/include/fxcodec/fx_codec_provider.h
@@ -13,7 +13,7 @@ class IFX_JpegProvider
public:
virtual void Release() = 0;
- virtual void* CreateDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height, int nComps, FX_BOOL ColorTransform) = 0;
+ virtual void* CreateDecoder(const uint8_t* src_buf, FX_DWORD src_size, int width, int height, int nComps, FX_BOOL ColorTransform) = 0;
virtual void DestroyDecoder(void* pDecoder) = 0;
@@ -22,33 +22,33 @@ public:
virtual FX_BOOL Rewind(void* pDecoder) = 0;
- virtual FX_LPBYTE GetNextLine(void* pDecoder) = 0;
+ virtual uint8_t* GetNextLine(void* pDecoder) = 0;
virtual FX_DWORD GetSrcOffset(void* pDecoder) = 0;
- virtual FX_BOOL LoadInfo(FX_LPCBYTE src_buf, FX_DWORD src_size, int& width, int& height,
+ virtual FX_BOOL LoadInfo(const uint8_t* src_buf, FX_DWORD src_size, int& width, int& height,
int& num_components, int& bits_per_components, FX_BOOL& color_transform,
- FX_LPBYTE* icc_buf_ptr = NULL, FX_DWORD* icc_length = NULL) = 0;
+ uint8_t** icc_buf_ptr = NULL, FX_DWORD* icc_length = NULL) = 0;
- virtual FX_BOOL Encode(const class CFX_DIBSource* pSource, FX_LPBYTE& dest_buf, FX_STRSIZE& dest_size, int quality = 75,
- FX_LPCBYTE icc_buf = NULL, FX_DWORD icc_length = 0) = 0;
+ virtual FX_BOOL Encode(const class CFX_DIBSource* pSource, uint8_t*& dest_buf, FX_STRSIZE& dest_size, int quality = 75,
+ const uint8_t* icc_buf = NULL, FX_DWORD icc_length = 0) = 0;
virtual void* Start() = 0;
virtual void Finish(void* pContext) = 0;
- virtual void Input(void* pContext, FX_LPCBYTE src_buf, FX_DWORD src_size) = 0;
+ virtual void Input(void* pContext, const uint8_t* src_buf, FX_DWORD src_size) = 0;
virtual int ReadHeader(void* pContext, int* width, int* height, int* nComps, CFX_DIBAttribute* pAttribute = NULL) = 0;
virtual int StartScanline(void* pContext, int down_scale) = 0;
- virtual FX_BOOL ReadScanline(void* pContext, FX_LPBYTE dest_buf) = 0;
+ virtual FX_BOOL ReadScanline(void* pContext, uint8_t* dest_buf) = 0;
- virtual FX_DWORD GetAvailInput(void* pContext, FX_LPBYTE* avail_buf_ptr = NULL) = 0;
+ virtual FX_DWORD GetAvailInput(void* pContext, uint8_t** avail_buf_ptr = NULL) = 0;
protected:
~IFX_JpegProvider() { }
diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h
index fbcb657012..924420da91 100644
--- a/core/include/fxcrt/fx_basic.h
+++ b/core/include/fxcrt/fx_basic.h
@@ -66,7 +66,7 @@ public:
void Delete(int start_index, int count);
- FX_LPBYTE GetBuffer() const
+ uint8_t* GetBuffer() const
{
return m_pBuffer;
}
@@ -83,7 +83,7 @@ protected:
FX_STRSIZE m_AllocStep;
- FX_LPBYTE m_pBuffer;
+ uint8_t* m_pBuffer;
FX_STRSIZE m_DataSize;
@@ -121,7 +121,7 @@ class CFX_WideTextBuf : public CFX_BinaryBuf
{
public:
- void operator = (FX_LPCWSTR lpsz);
+ void operator = (const FX_WCHAR* lpsz);
void operator = (FX_WSTR str);
@@ -131,7 +131,7 @@ public:
CFX_WideTextBuf& operator << (double f);
- CFX_WideTextBuf& operator << (FX_LPCWSTR lpsz);
+ CFX_WideTextBuf& operator << (const FX_WCHAR* lpsz);
CFX_WideTextBuf& operator << (FX_WSTR str);
CFX_WideTextBuf& operator << (const CFX_WideString &str);
@@ -143,9 +143,9 @@ public:
return m_DataSize / sizeof(FX_WCHAR);
}
- FX_LPWSTR GetBuffer() const
+ FX_WCHAR* GetBuffer() const
{
- return (FX_LPWSTR)m_pBuffer;
+ return (FX_WCHAR*)m_pBuffer;
}
void Delete(int start_index, int count)
@@ -172,7 +172,7 @@ public:
CFX_ArchiveSaver& operator << (FX_BSTR bstr);
- CFX_ArchiveSaver& operator << (FX_LPCWSTR bstr);
+ CFX_ArchiveSaver& operator << (const FX_WCHAR* bstr);
CFX_ArchiveSaver& operator << (const CFX_WideString& wstr);
@@ -183,7 +183,7 @@ public:
return m_SavingBuf.GetSize();
}
- FX_LPCBYTE GetBuffer()
+ const uint8_t* GetBuffer()
{
return m_SavingBuf.GetBuffer();
}
@@ -202,7 +202,7 @@ class CFX_ArchiveLoader
{
public:
- CFX_ArchiveLoader(FX_LPCBYTE pData, FX_DWORD dwSize);
+ CFX_ArchiveLoader(const uint8_t* pData, FX_DWORD dwSize);
CFX_ArchiveLoader& operator >> (uint8_t& i);
@@ -225,7 +225,7 @@ protected:
FX_DWORD m_LoadingPos;
- FX_LPCBYTE m_pLoadingBuf;
+ const uint8_t* m_pLoadingBuf;
FX_DWORD m_LoadingSize;
};
@@ -256,7 +256,7 @@ protected:
FX_STRSIZE m_BufSize;
- FX_LPBYTE m_pBuffer;
+ uint8_t* m_pBuffer;
FX_STRSIZE m_Length;
};
@@ -269,9 +269,9 @@ public:
FX_BOOL AttachFile(IFX_StreamWrite *pFile, FX_BOOL bTakeover = FALSE);
- FX_BOOL AttachFile(FX_LPCWSTR filename);
+ FX_BOOL AttachFile(const FX_WCHAR* filename);
- FX_BOOL AttachFile(FX_LPCSTR filename);
+ FX_BOOL AttachFile(const FX_CHAR* filename);
private:
virtual FX_BOOL DoWork(const void* pBuf, size_t size);
@@ -365,7 +365,7 @@ protected:
FX_BOOL Copy(const CFX_BasicArray& src);
- FX_LPBYTE InsertSpaceAt(int nIndex, int nCount);
+ uint8_t* InsertSpaceAt(int nIndex, int nCount);
FX_BOOL RemoveAt(int nIndex, int nCount);
@@ -374,7 +374,7 @@ protected:
const void* GetDataPtr(int index) const;
protected:
- FX_LPBYTE m_pData;
+ uint8_t* m_pData;
int m_nSize;
@@ -713,7 +713,7 @@ private:
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(FX_LPCBYTE pSegment, int count, 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 ElementType>
class CFX_SegmentedArray : public CFX_BaseSegmentedArray
@@ -858,7 +858,7 @@ public:
FX_BOOL Lookup(KeyType key, ValueType& rValue) const
{
- FX_LPVOID pValue = NULL;
+ void* pValue = NULL;
if (!CFX_MapPtrToPtr::Lookup((void*)(uintptr_t)key, pValue)) {
return FALSE;
}
@@ -954,7 +954,7 @@ public:
void GetNextAssoc(FX_POSITION& rNextPosition, CFX_ByteString& rKey, void*& rValue) const;
- FX_LPVOID GetNextValue(FX_POSITION& rNextPosition) const;
+ void* GetNextValue(FX_POSITION& rNextPosition) const;
FX_DWORD GetHashTableSize() const
{
@@ -1000,7 +1000,7 @@ public:
void GetNextAssoc(FX_POSITION& rNextPosition, CFX_ByteString& rKey, void*& rValue) const;
- FX_LPVOID GetNextValue(FX_POSITION& rNextPosition) const;
+ void* GetNextValue(FX_POSITION& rNextPosition) const;
FX_BOOL Lookup(FX_BSTR key, void*& rValue) const;
@@ -1115,14 +1115,14 @@ public:
~CFX_PtrList();
};
-typedef void (*PD_CALLBACK_FREEDATA)(FX_LPVOID pData);
+typedef void (*PD_CALLBACK_FREEDATA)(void* pData);
struct FX_PRIVATEDATA {
void FreeData();
- FX_LPVOID m_pModuleId;
+ void* m_pModuleId;
- FX_LPVOID m_pData;
+ void* m_pData;
PD_CALLBACK_FREEDATA m_pCallback;
@@ -1136,13 +1136,13 @@ public:
void ClearAll();
- void SetPrivateData(FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback);
+ void SetPrivateData(void* module_id, void* pData, PD_CALLBACK_FREEDATA callback);
- void SetPrivateObj(FX_LPVOID module_id, CFX_DestructObject* pObj);
+ void SetPrivateObj(void* module_id, CFX_DestructObject* pObj);
- FX_LPVOID GetPrivateData(FX_LPVOID module_id);
+ void* GetPrivateData(void* module_id);
- FX_BOOL LookupPrivateData(FX_LPVOID module_id, FX_LPVOID &pData) const
+ FX_BOOL LookupPrivateData(void* module_id, void* &pData) const
{
if (!module_id) {
return FALSE;
@@ -1157,18 +1157,18 @@ public:
return FALSE;
}
- FX_BOOL RemovePrivateData(FX_LPVOID module_id);
+ FX_BOOL RemovePrivateData(void* module_id);
protected:
CFX_ArrayTemplate<FX_PRIVATEDATA> m_DataList;
- void AddData(FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback, FX_BOOL bSelfDestruct);
+ void AddData(void* module_id, void* pData, PD_CALLBACK_FREEDATA callback, FX_BOOL bSelfDestruct);
};
class CFX_BitStream
{
public:
- void Init(FX_LPCBYTE pData, FX_DWORD dwSize);
+ void Init(const uint8_t* pData, FX_DWORD dwSize);
FX_DWORD GetBits(FX_DWORD nBits);
@@ -1195,7 +1195,7 @@ protected:
FX_DWORD m_BitSize;
- FX_LPCBYTE m_pData;
+ const uint8_t* m_pData;
};
template <class ObjClass> class CFX_CountRef
{
@@ -1365,13 +1365,13 @@ public:
return m_SrcPos;
}
- void FilterIn(FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf);
+ void FilterIn(const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf);
void FilterFinish(CFX_BinaryBuf& dest_buf);
protected:
CFX_DataFilter();
- virtual void v_FilterIn(FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf) = 0;
+ virtual void v_FilterIn(const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf) = 0;
virtual void v_FilterFinish(CFX_BinaryBuf& dest_buf) = 0;
void ReportEOF(FX_DWORD left_input);
@@ -1431,7 +1431,7 @@ protected:
int32_t start;
int32_t count;
- FX_LPBYTE data;
+ uint8_t* data;
};
public:
@@ -1472,7 +1472,7 @@ public:
}
}
- FX_LPBYTE GetAt(int32_t nIndex)
+ uint8_t* GetAt(int32_t nIndex)
{
if (nIndex < 0) {
return NULL;
@@ -1549,7 +1549,7 @@ public:
T2& operator [] (int32_t nIndex)
{
- FX_LPBYTE data = m_Data.GetAt(nIndex);
+ uint8_t* data = m_Data.GetAt(nIndex);
FXSYS_assert(data != NULL);
return (T2&)(*(volatile T2*)data);
}
diff --git a/core/include/fxcrt/fx_ext.h b/core/include/fxcrt/fx_ext.h
index b31d7a43f7..9bb4c29fe6 100644
--- a/core/include/fxcrt/fx_ext.h
+++ b/core/include/fxcrt/fx_ext.h
@@ -19,11 +19,11 @@ extern "C" {
FX_FLOAT FXSYS_tan(FX_FLOAT a);
FX_FLOAT FXSYS_logb(FX_FLOAT b, FX_FLOAT x);
-FX_FLOAT FXSYS_strtof(FX_LPCSTR pcsStr, int32_t iLength = -1, int32_t *pUsedLen = NULL);
-FX_FLOAT FXSYS_wcstof(FX_LPCWSTR pwsStr, int32_t iLength = -1, int32_t *pUsedLen = NULL);
-FX_LPWSTR FXSYS_wcsncpy(FX_LPWSTR dstStr, FX_LPCWSTR srcStr, size_t count);
-int32_t FXSYS_wcsnicmp(FX_LPCWSTR s1, FX_LPCWSTR s2, size_t count);
-int32_t FXSYS_strnicmp(FX_LPCSTR s1, FX_LPCSTR s2, size_t count);
+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 FX_BOOL FXSYS_islower(int32_t ch)
{
@@ -42,8 +42,8 @@ inline int32_t FXSYS_toupper(int32_t ch)
return ch < 'a' || ch > 'z' ? ch : (ch - 0x20);
}
-FX_DWORD FX_HashCode_String_GetA(FX_LPCSTR pStr, int32_t iLength, FX_BOOL bIgnoreCase = FALSE);
-FX_DWORD FX_HashCode_String_GetW(FX_LPCWSTR pStr, int32_t iLength, FX_BOOL bIgnoreCase = FALSE);
+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);
#ifdef __cplusplus
}
@@ -52,17 +52,17 @@ FX_DWORD FX_HashCode_String_GetW(FX_LPCWSTR pStr, int32_t iLength, FX_BOOL bIgno
extern "C" {
#endif
-FX_LPVOID FX_Random_MT_Start(FX_DWORD dwSeed);
+void* FX_Random_MT_Start(FX_DWORD dwSeed);
-FX_DWORD FX_Random_MT_Generate(FX_LPVOID pContext);
+FX_DWORD FX_Random_MT_Generate(void* pContext);
-void FX_Random_MT_Close(FX_LPVOID pContext);
+void FX_Random_MT_Close(void* pContext);
-void FX_Random_GenerateBase(FX_LPDWORD pBuffer, int32_t iCount);
+void FX_Random_GenerateBase(FX_DWORD* pBuffer, int32_t iCount);
-void FX_Random_GenerateMT(FX_LPDWORD pBuffer, int32_t iCount);
+void FX_Random_GenerateMT(FX_DWORD* pBuffer, int32_t iCount);
-void FX_Random_GenerateCrypto(FX_LPDWORD pBuffer, int32_t iCount);
+void FX_Random_GenerateCrypto(FX_DWORD* pBuffer, int32_t iCount);
#ifdef __cplusplus
}
#endif
diff --git a/core/include/fxcrt/fx_memory.h b/core/include/fxcrt/fx_memory.h
index 03df3647b0..2e7eafbaca 100644
--- a/core/include/fxcrt/fx_memory.h
+++ b/core/include/fxcrt/fx_memory.h
@@ -91,14 +91,14 @@ public:
m_TrunkSize = trunk_size;
}
- void* AllocDebug(size_t size, FX_LPCSTR file, int line)
+ void* AllocDebug(size_t size, const FX_CHAR* file, int line)
{
return Alloc(size);
}
void* Alloc(size_t size);
- void* ReallocDebug(void* p, size_t new_size, FX_LPCSTR file, int line)
+ void* ReallocDebug(void* p, size_t new_size, const FX_CHAR* file, int line)
{
return NULL;
}
diff --git a/core/include/fxcrt/fx_stream.h b/core/include/fxcrt/fx_stream.h
index 190ce97cac..ea3d23bab1 100644
--- a/core/include/fxcrt/fx_stream.h
+++ b/core/include/fxcrt/fx_stream.h
@@ -10,14 +10,14 @@
#include "fx_memory.h"
#include "fx_string.h"
-void* FX_OpenFolder(FX_LPCSTR path);
-void* FX_OpenFolder(FX_LPCWSTR path);
+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();
typedef struct FX_HFILE_ {
- FX_LPVOID pData;
+ void* pData;
}* FX_HFILE;
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
#define FX_FILESIZE int32_t
@@ -88,8 +88,8 @@ public:
return WriteBlock(pData, GetSize(), size);
}
};
-IFX_FileWrite* FX_CreateFileWrite(FX_LPCSTR filename);
-IFX_FileWrite* FX_CreateFileWrite(FX_LPCWSTR filename);
+IFX_FileWrite* FX_CreateFileWrite(const FX_CHAR* filename);
+IFX_FileWrite* FX_CreateFileWrite(const FX_WCHAR* filename);
class IFX_StreamRead
{
public:
@@ -134,8 +134,8 @@ public:
return 0;
}
};
-IFX_FileRead* FX_CreateFileRead(FX_LPCSTR filename);
-IFX_FileRead* FX_CreateFileRead(FX_LPCWSTR filename);
+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:
@@ -162,8 +162,8 @@ public:
virtual FX_BOOL Flush() = 0;
};
-IFX_FileStream* FX_CreateFileStream(FX_LPCSTR filename, FX_DWORD dwModes);
-IFX_FileStream* FX_CreateFileStream(FX_LPCWSTR filename, FX_DWORD dwModes);
+IFX_FileStream* FX_CreateFileStream(const FX_CHAR* filename, FX_DWORD dwModes);
+IFX_FileStream* FX_CreateFileStream(const FX_WCHAR* filename, FX_DWORD dwModes);
class IFX_FileAccess
{
public:
@@ -181,13 +181,13 @@ public:
virtual void EstimateSize(size_t nInitSize, size_t nGrowSize) = 0;
- virtual FX_LPBYTE GetBuffer() const = 0;
+ virtual uint8_t* GetBuffer() const = 0;
- virtual void AttachBuffer(FX_LPBYTE pBuffer, size_t nSize, FX_BOOL bTakeOver = FALSE) = 0;
+ virtual void AttachBuffer(uint8_t* pBuffer, size_t nSize, FX_BOOL bTakeOver = FALSE) = 0;
virtual void DetachBuffer() = 0;
};
-IFX_MemoryStream* FX_CreateMemoryStream(FX_LPBYTE pBuffer, size_t nSize, FX_BOOL bTakeOver = FALSE);
+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
{
@@ -203,7 +203,7 @@ public:
virtual FX_BOOL ReadNextBlock(FX_BOOL bRestart = FALSE) = 0;
- virtual FX_LPCBYTE GetBlockBuffer() = 0;
+ virtual const uint8_t* GetBlockBuffer() = 0;
virtual size_t GetBlockSize() = 0;
diff --git a/core/include/fxcrt/fx_string.h b/core/include/fxcrt/fx_string.h
index 8fc9d79ebb..5923ffdf2d 100644
--- a/core/include/fxcrt/fx_string.h
+++ b/core/include/fxcrt/fx_string.h
@@ -31,15 +31,15 @@ public:
m_Length = 0;
}
- CFX_ByteStringC(FX_LPCBYTE ptr, FX_STRSIZE size)
+ CFX_ByteStringC(const uint8_t* ptr, FX_STRSIZE size)
{
m_Ptr = ptr;
m_Length = size;
}
- CFX_ByteStringC(FX_LPCSTR ptr)
+ CFX_ByteStringC(const FX_CHAR* ptr)
{
- m_Ptr = (FX_LPCBYTE)ptr;
+ m_Ptr = (const uint8_t*)ptr;
m_Length = ptr ? FXSYS_strlen(ptr) : 0;
}
@@ -52,13 +52,13 @@ public:
// TODO(tsepez): Mark single-argument string constructors as explicit.
CFX_ByteStringC(FX_CHAR& ch)
{
- m_Ptr = (FX_LPCBYTE)&ch;
+ m_Ptr = (const uint8_t*)&ch;
m_Length = 1;
}
- CFX_ByteStringC(FX_LPCSTR ptr, FX_STRSIZE len)
+ CFX_ByteStringC(const FX_CHAR* ptr, FX_STRSIZE len)
{
- m_Ptr = (FX_LPCBYTE)ptr;
+ m_Ptr = (const uint8_t*)ptr;
m_Length = (len == -1) ? FXSYS_strlen(ptr) : len;
}
@@ -70,9 +70,9 @@ public:
CFX_ByteStringC(const CFX_ByteString& src);
- CFX_ByteStringC& operator = (FX_LPCSTR src)
+ CFX_ByteStringC& operator = (const FX_CHAR* src)
{
- m_Ptr = (FX_LPCBYTE)src;
+ m_Ptr = (const uint8_t*)src;
m_Length = m_Ptr ? FXSYS_strlen(src) : 0;
return *this;
}
@@ -101,14 +101,14 @@ public:
FX_DWORD GetID(FX_STRSIZE start_pos = 0) const;
- FX_LPCBYTE GetPtr() const
+ const uint8_t* GetPtr() const
{
return m_Ptr;
}
- FX_LPCSTR GetCStr() const
+ const FX_CHAR* GetCStr() const
{
- return (FX_LPCSTR)m_Ptr;
+ return (const FX_CHAR*)m_Ptr;
}
FX_STRSIZE GetLength() const
@@ -152,7 +152,7 @@ public:
}
protected:
- FX_LPCBYTE m_Ptr;
+ const uint8_t* m_Ptr;
FX_STRSIZE m_Length;
private:
@@ -190,36 +190,36 @@ public:
}
CFX_ByteString(char ch);
- CFX_ByteString(FX_LPCSTR ptr)
+ CFX_ByteString(const FX_CHAR* ptr)
: CFX_ByteString(ptr, ptr ? FXSYS_strlen(ptr) : 0) { }
- CFX_ByteString(FX_LPCSTR ptr, FX_STRSIZE len);
- CFX_ByteString(FX_LPCBYTE ptr, FX_STRSIZE len);
+ CFX_ByteString(const FX_CHAR* ptr, FX_STRSIZE len);
+ CFX_ByteString(const uint8_t* ptr, FX_STRSIZE len);
CFX_ByteString(FX_BSTR bstrc);
CFX_ByteString(FX_BSTR bstrc1, FX_BSTR bstrc2);
~CFX_ByteString();
- static CFX_ByteString FromUnicode(FX_LPCWSTR ptr, FX_STRSIZE len = -1);
+ static CFX_ByteString FromUnicode(const FX_WCHAR* ptr, FX_STRSIZE len = -1);
static CFX_ByteString FromUnicode(const CFX_WideString& str);
// Explicit conversion to raw string
- FX_LPCSTR c_str() const
+ const FX_CHAR* c_str() const
{
return m_pData ? m_pData->m_String : "";
}
// Implicit conversion to C-style string -- deprecated
- operator FX_LPCSTR() const
+ operator const FX_CHAR*() const
{
return m_pData ? m_pData->m_String : "";
}
- operator FX_LPCBYTE() const
+ operator const uint8_t*() const
{
- return m_pData ? (FX_LPCBYTE)m_pData->m_String : NULL;
+ return m_pData ? (const uint8_t*)m_pData->m_String : NULL;
}
FX_STRSIZE GetLength() const
@@ -261,7 +261,7 @@ public:
void Empty();
- const CFX_ByteString& operator = (FX_LPCSTR str);
+ const CFX_ByteString& operator = (const FX_CHAR* str);
const CFX_ByteString& operator = (FX_BSTR bstrc);
@@ -269,11 +269,11 @@ public:
const CFX_ByteString& operator = (const CFX_BinaryBuf& buf);
- void Load(FX_LPCBYTE str, FX_STRSIZE len);
+ void Load(const uint8_t* str, FX_STRSIZE len);
const CFX_ByteString& operator += (FX_CHAR ch);
- const CFX_ByteString& operator += (FX_LPCSTR str);
+ const CFX_ByteString& operator += (const FX_CHAR* str);
const CFX_ByteString& operator += (const CFX_ByteString& str);
@@ -296,14 +296,14 @@ public:
FX_STRSIZE Delete(FX_STRSIZE index, FX_STRSIZE count = 1);
- void Format(FX_LPCSTR lpszFormat, ... );
+ void Format(const FX_CHAR* lpszFormat, ... );
- void FormatV(FX_LPCSTR lpszFormat, va_list argList);
+ void FormatV(const FX_CHAR* lpszFormat, va_list argList);
void Reserve(FX_STRSIZE len);
- FX_LPSTR GetBuffer(FX_STRSIZE len);
+ FX_CHAR* GetBuffer(FX_STRSIZE len);
void ReleaseBuffer(FX_STRSIZE len = -1);
@@ -384,9 +384,9 @@ protected:
};
void AllocCopy(CFX_ByteString& dest, FX_STRSIZE nCopyLen, FX_STRSIZE nCopyIndex) const;
- void AssignCopy(FX_STRSIZE nSrcLen, FX_LPCSTR lpszSrcData);
- void ConcatCopy(FX_STRSIZE nSrc1Len, FX_LPCSTR lpszSrc1Data, FX_STRSIZE nSrc2Len, FX_LPCSTR lpszSrc2Data);
- void ConcatInPlace(FX_STRSIZE nSrcLen, FX_LPCSTR lpszSrcData);
+ 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);
@@ -395,12 +395,12 @@ protected:
};
inline CFX_ByteStringC::CFX_ByteStringC(const CFX_ByteString& src)
{
- m_Ptr = (FX_LPCBYTE)src;
+ m_Ptr = (const uint8_t*)src;
m_Length = src.GetLength();
}
inline CFX_ByteStringC& CFX_ByteStringC::operator = (const CFX_ByteString& src)
{
- m_Ptr = (FX_LPCBYTE)src;
+ m_Ptr = (const uint8_t*)src;
m_Length = src.GetLength();
return *this;
}
@@ -422,11 +422,11 @@ inline CFX_ByteString operator + (FX_BSTR str1, FX_BSTR str2)
{
return CFX_ByteString(str1, str2);
}
-inline CFX_ByteString operator + (FX_BSTR str1, FX_LPCSTR str2)
+inline CFX_ByteString operator + (FX_BSTR str1, const FX_CHAR* str2)
{
return CFX_ByteString(str1, str2);
}
-inline CFX_ByteString operator + (FX_LPCSTR str1, FX_BSTR str2)
+inline CFX_ByteString operator + (const FX_CHAR* str1, FX_BSTR str2)
{
return CFX_ByteString(str1, str2);
}
@@ -450,11 +450,11 @@ inline CFX_ByteString operator + (FX_CHAR ch, const CFX_ByteString& str2)
{
return CFX_ByteString(ch, str2);
}
-inline CFX_ByteString operator + (const CFX_ByteString& str1, FX_LPCSTR str2)
+inline CFX_ByteString operator + (const CFX_ByteString& str1, const FX_CHAR* str2)
{
return CFX_ByteString(str1, str2);
}
-inline CFX_ByteString operator + (FX_LPCSTR str1, const CFX_ByteString& str2)
+inline CFX_ByteString operator + (const FX_CHAR* str1, const CFX_ByteString& str2)
{
return CFX_ByteString(str1, str2);
}
@@ -477,7 +477,7 @@ public:
m_Length = 0;
}
- CFX_WideStringC(FX_LPCWSTR ptr)
+ CFX_WideStringC(const FX_WCHAR* ptr)
{
m_Ptr = ptr;
m_Length = ptr ? FXSYS_wcslen(ptr) : 0;
@@ -489,7 +489,7 @@ public:
m_Length = 1;
}
- CFX_WideStringC(FX_LPCWSTR ptr, FX_STRSIZE len)
+ CFX_WideStringC(const FX_WCHAR* ptr, FX_STRSIZE len)
{
m_Ptr = ptr;
m_Length = (len == -1) ? FXSYS_wcslen(ptr) : len;
@@ -503,7 +503,7 @@ public:
CFX_WideStringC(const CFX_WideString& src);
- CFX_WideStringC& operator = (FX_LPCWSTR src)
+ CFX_WideStringC& operator = (const FX_WCHAR* src)
{
m_Ptr = src;
m_Length = FXSYS_wcslen(src);
@@ -532,7 +532,7 @@ public:
return !(*this == str);
}
- FX_LPCWSTR GetPtr() const
+ const FX_WCHAR* GetPtr() const
{
return m_Ptr;
}
@@ -600,7 +600,7 @@ public:
}
protected:
- FX_LPCWSTR m_Ptr;
+ const FX_WCHAR* m_Ptr;
FX_STRSIZE m_Length;
private:
@@ -636,10 +636,10 @@ public:
other.m_pData = nullptr;
}
- CFX_WideString(FX_LPCWSTR ptr)
+ CFX_WideString(const FX_WCHAR* ptr)
: CFX_WideString(ptr, ptr ? FXSYS_wcslen(ptr) : 0) { }
- CFX_WideString(FX_LPCWSTR ptr, FX_STRSIZE len);
+ CFX_WideString(const FX_WCHAR* ptr, FX_STRSIZE len);
CFX_WideString(FX_WCHAR ch);
@@ -658,13 +658,13 @@ public:
static FX_STRSIZE WStringLength(const unsigned short* str);
// Explicit conversion to raw string
- FX_LPCWSTR c_str() const
+ const FX_WCHAR* c_str() const
{
return m_pData ? m_pData->m_String : L"";
}
// Implicit conversion to C-style wide string -- deprecated
- operator FX_LPCWSTR() const
+ operator const FX_WCHAR*() const
{
return m_pData ? m_pData->m_String : L"";
}
@@ -682,13 +682,13 @@ public:
return m_pData ? m_pData->m_nDataLength : 0;
}
- const CFX_WideString& operator = (FX_LPCWSTR str);
+ 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 += (FX_LPCWSTR str);
+ const CFX_WideString& operator += (const FX_WCHAR* str);
const CFX_WideString& operator += (FX_WCHAR ch);
@@ -725,11 +725,11 @@ public:
void SetAt(FX_STRSIZE nIndex, FX_WCHAR ch);
- int Compare(FX_LPCWSTR str) const;
+ int Compare(const FX_WCHAR* str) const;
int Compare(const CFX_WideString& str) const;
- int CompareNoCase(FX_LPCWSTR str) const;
+ int CompareNoCase(const FX_WCHAR* str) const;
bool Equal(const wchar_t* ptr) const;
bool Equal(const CFX_WideStringC& str) const;
@@ -747,9 +747,9 @@ public:
FX_STRSIZE Delete(FX_STRSIZE index, FX_STRSIZE count = 1);
- void Format(FX_LPCWSTR lpszFormat, ... );
+ void Format(const FX_WCHAR* lpszFormat, ... );
- void FormatV(FX_LPCWSTR lpszFormat, va_list argList);
+ void FormatV(const FX_WCHAR* lpszFormat, va_list argList);
void MakeLower();
@@ -759,17 +759,17 @@ public:
void TrimRight(FX_WCHAR chTarget);
- void TrimRight(FX_LPCWSTR lpszTargets);
+ void TrimRight(const FX_WCHAR* lpszTargets);
void TrimLeft();
void TrimLeft(FX_WCHAR chTarget);
- void TrimLeft(FX_LPCWSTR lpszTargets);
+ void TrimLeft(const FX_WCHAR* lpszTargets);
void Reserve(FX_STRSIZE len);
- FX_LPWSTR GetBuffer(FX_STRSIZE len);
+ FX_WCHAR* GetBuffer(FX_STRSIZE len);
void ReleaseBuffer(FX_STRSIZE len = -1);
@@ -777,11 +777,11 @@ public:
FX_FLOAT GetFloat() const;
- FX_STRSIZE Find(FX_LPCWSTR lpszSub, FX_STRSIZE start = 0) 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(FX_LPCWSTR lpszOld, FX_LPCWSTR lpszNew);
+ FX_STRSIZE Replace(const FX_WCHAR* lpszOld, const FX_WCHAR* lpszNew);
FX_STRSIZE Remove(FX_WCHAR ch);
@@ -816,9 +816,9 @@ protected:
void CopyBeforeWrite();
void AllocBeforeWrite(FX_STRSIZE nLen);
- void ConcatInPlace(FX_STRSIZE nSrcLen, FX_LPCWSTR lpszSrcData);
- void ConcatCopy(FX_STRSIZE nSrc1Len, FX_LPCWSTR lpszSrc1Data, FX_STRSIZE nSrc2Len, FX_LPCWSTR lpszSrc2Data);
- void AssignCopy(FX_STRSIZE nSrcLen, FX_LPCWSTR lpszSrcData);
+ 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;
@@ -840,11 +840,11 @@ inline CFX_WideString operator + (const CFX_WideStringC& str1, const CFX_WideStr
{
return CFX_WideString(str1, str2);
}
-inline CFX_WideString operator + (const CFX_WideStringC& str1, FX_LPCWSTR str2)
+inline CFX_WideString operator + (const CFX_WideStringC& str1, const FX_WCHAR* str2)
{
return CFX_WideString(str1, str2);
}
-inline CFX_WideString operator + (FX_LPCWSTR str1, const CFX_WideStringC& str2)
+inline CFX_WideString operator + (const FX_WCHAR* str1, const CFX_WideStringC& str2)
{
return CFX_WideString(str1, str2);
}
@@ -868,11 +868,11 @@ inline CFX_WideString operator + (FX_WCHAR ch, const CFX_WideString& str2)
{
return CFX_WideString(ch, str2);
}
-inline CFX_WideString operator + (const CFX_WideString& str1, FX_LPCWSTR str2)
+inline CFX_WideString operator + (const CFX_WideString& str1, const FX_WCHAR* str2)
{
return CFX_WideString(str1, str2);
}
-inline CFX_WideString operator + (FX_LPCWSTR str1, const CFX_WideString& str2)
+inline CFX_WideString operator + (const FX_WCHAR* str1, const CFX_WideString& str2)
{
return CFX_WideString(str1, str2);
}
@@ -898,8 +898,8 @@ inline bool operator!= (const CFX_WideStringC& lhs, const CFX_WideString& rhs) {
}
FX_FLOAT FX_atof(FX_BSTR str);
void FX_atonum(FX_BSTR str, FX_BOOL& bInteger, void* pData);
-FX_STRSIZE FX_ftoa(FX_FLOAT f, FX_LPSTR buf);
-CFX_ByteString FX_UTF8Encode(FX_LPCWSTR pwsStr, FX_STRSIZE len);
+FX_STRSIZE FX_ftoa(FX_FLOAT f, FX_CHAR* buf);
+CFX_ByteString FX_UTF8Encode(const FX_WCHAR* pwsStr, FX_STRSIZE len);
inline CFX_ByteString FX_UTF8Encode(FX_WSTR wsStr)
{
return FX_UTF8Encode(wsStr.GetPtr(), wsStr.GetLength());
diff --git a/core/include/fxcrt/fx_system.h b/core/include/fxcrt/fx_system.h
index 80d75908d4..ec6d6294b0 100644
--- a/core/include/fxcrt/fx_system.h
+++ b/core/include/fxcrt/fx_system.h
@@ -67,24 +67,13 @@
#ifdef __cplusplus
extern "C" {
#endif
-typedef void* FX_LPVOID; // Deprecate, use with void*.
-typedef const void* FX_LPCVOID; // Deprecate, use with const void*.
typedef void* FX_POSITION; // Keep until fxcrt containers gone
-typedef uint8_t* FX_LPBYTE; // Deprecate, use uint8_t*.
-typedef const uint8_t* FX_LPCBYTE; // Deprecate, use const uint8_t*.
typedef unsigned short FX_WORD; // Keep - "an efficient small type"
-typedef FX_WORD* FX_LPWORD; // Deprecate, use FX_WORD*.
-typedef const FX_WORD* FX_LPCWORD; // Deprecate, use const FX_WORD*.
typedef unsigned int FX_DWORD; // Keep - "an efficient type"
-typedef FX_DWORD* FX_LPDWORD; // Deprecate, use FX_DWORD*.
typedef float FX_FLOAT; // Keep, allow upgrade to doubles.
-typedef int FX_BOOL; // Sadly not always 0 or 1.
+typedef int FX_BOOL; // Keep, sadly not always 0 or 1.
typedef char FX_CHAR; // Keep, questionable signedness.
-typedef FX_CHAR* FX_LPSTR; // Deprecate, use FX_CHAR*.
-typedef const FX_CHAR* FX_LPCSTR; // Deprecate, use const FX_CHAR*.
typedef wchar_t FX_WCHAR; // Keep, maybe bad platform wchars.
-typedef FX_WCHAR* FX_LPWSTR; // Deprecate, use FX_WCHAR*.
-typedef const FX_WCHAR* FX_LPCWSTR; // Deprecate, use const FX_WCHAR*.
// PDFium string sizes are limited to 2^31-1, and the value is signed to
// allow -1 as a placeholder for "unknown".
@@ -158,7 +147,7 @@ void FXSYS_vsnprintf(char *str, size_t size, const char* fmt, va_list ap);
#define FXSYS_wfopen _wfopen
#endif
#else
-FXSYS_FILE* FXSYS_wfopen(FX_LPCWSTR filename, FX_LPCWSTR mode);
+FXSYS_FILE* FXSYS_wfopen(const FX_WCHAR* filename, const FX_WCHAR* mode);
#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
#ifdef __cplusplus
@@ -249,18 +238,18 @@ wchar_t* FXSYS_wcsupr(wchar_t* str);
#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) ((((FX_LPBYTE)(p))[3] << 24) | (((FX_LPBYTE)(p))[2] << 16) | (((FX_LPBYTE)(p))[1] << 8) | (((FX_LPBYTE)(p))[0]))
-#define FXDWORD_GET_MSBFIRST(p) ((((FX_LPBYTE)(p))[0] << 24) | (((FX_LPBYTE)(p))[1] << 16) | (((FX_LPBYTE)(p))[2] << 8) | (((FX_LPBYTE)(p))[3]))
+#define FXDWORD_GET_LSBFIRST(p) ((((uint8_t*)(p))[3] << 24) | (((uint8_t*)(p))[2] << 16) | (((uint8_t*)(p))[1] << 8) | (((uint8_t*)(p))[0]))
+#define FXDWORD_GET_MSBFIRST(p) ((((uint8_t*)(p))[0] << 24) | (((uint8_t*)(p))[1] << 16) | (((uint8_t*)(p))[2] << 8) | (((uint8_t*)(p))[3]))
#define FXSYS_HIBYTE(word) ((uint8_t)((word) >> 8))
#define FXSYS_LOBYTE(word) ((uint8_t)(word))
#define FXSYS_HIWORD(dword) ((FX_WORD)((dword) >> 16))
#define FXSYS_LOWORD(dword) ((FX_WORD)(dword))
-int32_t FXSYS_atoi(FX_LPCSTR str);
-int32_t FXSYS_wtoi(FX_LPCWSTR str);
-int64_t FXSYS_atoi64(FX_LPCSTR str);
-int64_t FXSYS_wtoi64(FX_LPCWSTR str);
-FX_LPCSTR FXSYS_i64toa(int64_t value, FX_LPSTR str, int radix);
-FX_LPCWSTR FXSYS_i64tow(int64_t value, FX_LPWSTR str, int radix);
+int32_t FXSYS_atoi(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);
+const FX_WCHAR* FXSYS_i64tow(int64_t value, FX_WCHAR* str, int radix);
int FXSYS_round(FX_FLOAT f);
#define FXSYS_Mul(a, b) ((a) * (b))
#define FXSYS_Div(a, b) ((a) / (b))
diff --git a/core/include/fxcrt/fx_ucd.h b/core/include/fxcrt/fx_ucd.h
index 466acd45d4..e8d55d1cd3 100644
--- a/core/include/fxcrt/fx_ucd.h
+++ b/core/include/fxcrt/fx_ucd.h
@@ -167,7 +167,7 @@ public:
int16_t m_iBidiLevel;
int16_t m_iBidiPos;
int16_t m_iBidiOrder;
- FX_LPVOID m_pUserData;
+ void* m_pUserData;
};
typedef CFX_ArrayTemplate<CFX_TxtChar> CFX_TxtCharArray;
class CFX_RTFChar : public CFX_Char
diff --git a/core/include/fxge/fpf.h b/core/include/fxge/fpf.h
index 30c1c77bbe..710600c84f 100644
--- a/core/include/fxge/fpf.h
+++ b/core/include/fxge/fpf.h
@@ -20,7 +20,7 @@ public:
IFPF_DeviceModule* FPF_GetDeviceModule();
#define FPF_MATCHFONT_REPLACEANSI 1
typedef struct FPF_HFONT_ {
- FX_LPVOID pData;
+ void* pData;
}* FPF_HFONT;
class IFPF_Font
{
@@ -44,7 +44,7 @@ public:
virtual int32_t GetHeight() const = 0;
virtual int32_t GetItalicAngle() const = 0;
- virtual FX_DWORD GetFontData(FX_DWORD dwTable, FX_LPBYTE pBuffer, FX_DWORD dwSize) = 0;
+ virtual FX_DWORD GetFontData(FX_DWORD dwTable, uint8_t* pBuffer, FX_DWORD dwSize) = 0;
protected:
~IFPF_Font() { }
@@ -56,7 +56,7 @@ public:
virtual void LoadSystemFonts() = 0;
virtual void LoadPrivateFont(IFX_FileRead* pFontFile) = 0;
virtual void LoadPrivateFont(FX_BSTR bsFileName) = 0;
- virtual void LoadPrivateFont(FX_LPVOID pBuffer, size_t szBuffer) = 0;
+ virtual void LoadPrivateFont(void* pBuffer, size_t szBuffer) = 0;
virtual IFPF_Font* CreateFont(FX_BSTR bsFamilyname, uint8_t charset, FX_DWORD dwStyle, FX_DWORD dwMatch = 0) = 0;
};
diff --git a/core/include/fxge/fx_dib.h b/core/include/fxge/fx_dib.h
index d798ca3511..50dd3e9eed 100644
--- a/core/include/fxge/fx_dib.h
+++ b/core/include/fxge/fx_dib.h
@@ -100,33 +100,33 @@ FX_ARGB ArgbEncode(int a, FX_COLORREF rgb);
#define FXCMYK2GRAY(c,m,y,k) (((255-(c)) * (255-(k)) * 30 + (255-(m)) * (255-(k)) * 59 + (255-(y)) * (255-(k)) * 11) / 25500)
#define FXDIB_ALPHA_MERGE(backdrop, source, source_alpha) (((backdrop) * (255-(source_alpha)) + (source)*(source_alpha))/255)
#define FXDIB_ALPHA_UNION(dest, src) ((dest) + (src) - (dest)*(src)/255)
-#define FXCMYK_GETDIB(p) ((((FX_LPBYTE)(p))[0] << 24 | (((FX_LPBYTE)(p))[1] << 16) | (((FX_LPBYTE)(p))[2] << 8) | ((FX_LPBYTE)(p))[3]))
-#define FXCMYK_SETDIB(p, cmyk) ((FX_LPBYTE)(p))[0] = (uint8_t)((cmyk) >> 24), \
- ((FX_LPBYTE)(p))[1] = (uint8_t)((cmyk) >> 16), \
- ((FX_LPBYTE)(p))[2] = (uint8_t)((cmyk) >> 8), \
- ((FX_LPBYTE)(p))[3] = (uint8_t)(cmyk))
-#define FXARGB_GETDIB(p) ((((FX_LPBYTE)(p))[0]) | (((FX_LPBYTE)(p))[1] << 8) | (((FX_LPBYTE)(p))[2] << 16) | (((FX_LPBYTE)(p))[3] << 24))
-#define FXARGB_SETDIB(p, argb) ((FX_LPBYTE)(p))[0] = (uint8_t)(argb), \
- ((FX_LPBYTE)(p))[1] = (uint8_t)((argb) >> 8), \
- ((FX_LPBYTE)(p))[2] = (uint8_t)((argb) >> 16), \
- ((FX_LPBYTE)(p))[3] = (uint8_t)((argb) >> 24)
-#define FXARGB_COPY(dest, src) *(FX_LPBYTE)(dest) = *(FX_LPBYTE)(src), \
- *((FX_LPBYTE)(dest)+1) = *((FX_LPBYTE)(src)+1), \
- *((FX_LPBYTE)(dest)+2) = *((FX_LPBYTE)(src)+2), \
- *((FX_LPBYTE)(dest)+3) = *((FX_LPBYTE)(src)+3)
-#define FXCMYK_COPY(dest, src) *(FX_LPBYTE)(dest) = *(FX_LPBYTE)(src), \
- *((FX_LPBYTE)(dest)+1) = *((FX_LPBYTE)(src)+1), \
- *((FX_LPBYTE)(dest)+2) = *((FX_LPBYTE)(src)+2), \
- *((FX_LPBYTE)(dest)+3) = *((FX_LPBYTE)(src)+3)
-#define FXARGB_SETRGBORDERDIB(p, argb) ((FX_LPBYTE)(p))[3] = (uint8_t)(argb>>24), \
- ((FX_LPBYTE)(p))[0] = (uint8_t)((argb) >> 16), \
- ((FX_LPBYTE)(p))[1] = (uint8_t)((argb) >> 8), \
- ((FX_LPBYTE)(p))[2] = (uint8_t)(argb)
-#define FXARGB_GETRGBORDERDIB(p) (((FX_LPBYTE)(p))[2]) | (((FX_LPBYTE)(p))[1] << 8) | (((FX_LPBYTE)(p))[0] << 16) | (((FX_LPBYTE)(p))[3] << 24)
-#define FXARGB_RGBORDERCOPY(dest, src) *((FX_LPBYTE)(dest)+3) = *((FX_LPBYTE)(src)+3), \
- *(FX_LPBYTE)(dest) = *((FX_LPBYTE)(src)+2), \
- *((FX_LPBYTE)(dest)+1) = *((FX_LPBYTE)(src)+1), \
- *((FX_LPBYTE)(dest)+2) = *((FX_LPBYTE)(src))
+#define FXCMYK_GETDIB(p) ((((uint8_t*)(p))[0] << 24 | (((uint8_t*)(p))[1] << 16) | (((uint8_t*)(p))[2] << 8) | ((uint8_t*)(p))[3]))
+#define FXCMYK_SETDIB(p, cmyk) ((uint8_t*)(p))[0] = (uint8_t)((cmyk) >> 24), \
+ ((uint8_t*)(p))[1] = (uint8_t)((cmyk) >> 16), \
+ ((uint8_t*)(p))[2] = (uint8_t)((cmyk) >> 8), \
+ ((uint8_t*)(p))[3] = (uint8_t)(cmyk))
+#define FXARGB_GETDIB(p) ((((uint8_t*)(p))[0]) | (((uint8_t*)(p))[1] << 8) | (((uint8_t*)(p))[2] << 16) | (((uint8_t*)(p))[3] << 24))
+#define FXARGB_SETDIB(p, argb) ((uint8_t*)(p))[0] = (uint8_t)(argb), \
+ ((uint8_t*)(p))[1] = (uint8_t)((argb) >> 8), \
+ ((uint8_t*)(p))[2] = (uint8_t)((argb) >> 16), \
+ ((uint8_t*)(p))[3] = (uint8_t)((argb) >> 24)
+#define FXARGB_COPY(dest, src) *(uint8_t*)(dest) = *(uint8_t*)(src), \
+ *((uint8_t*)(dest)+1) = *((uint8_t*)(src)+1), \
+ *((uint8_t*)(dest)+2) = *((uint8_t*)(src)+2), \
+ *((uint8_t*)(dest)+3) = *((uint8_t*)(src)+3)
+#define FXCMYK_COPY(dest, src) *(uint8_t*)(dest) = *(uint8_t*)(src), \
+ *((uint8_t*)(dest)+1) = *((uint8_t*)(src)+1), \
+ *((uint8_t*)(dest)+2) = *((uint8_t*)(src)+2), \
+ *((uint8_t*)(dest)+3) = *((uint8_t*)(src)+3)
+#define FXARGB_SETRGBORDERDIB(p, argb) ((uint8_t*)(p))[3] = (uint8_t)(argb>>24), \
+ ((uint8_t*)(p))[0] = (uint8_t)((argb) >> 16), \
+ ((uint8_t*)(p))[1] = (uint8_t)((argb) >> 8), \
+ ((uint8_t*)(p))[2] = (uint8_t)(argb)
+#define FXARGB_GETRGBORDERDIB(p) (((uint8_t*)(p))[2]) | (((uint8_t*)(p))[1] << 8) | (((uint8_t*)(p))[0] << 16) | (((uint8_t*)(p))[3] << 24)
+#define FXARGB_RGBORDERCOPY(dest, src) *((uint8_t*)(dest)+3) = *((uint8_t*)(src)+3), \
+ *(uint8_t*)(dest) = *((uint8_t*)(src)+2), \
+ *((uint8_t*)(dest)+1) = *((uint8_t*)(src)+1), \
+ *((uint8_t*)(dest)+2) = *((uint8_t*)(src))
#define FXARGB_TODIB(argb) (argb)
#define FXCMYK_TODIB(cmyk) ((uint8_t)((cmyk) >> 24) | ((uint8_t)((cmyk) >> 16)) << 8 | ((uint8_t)((cmyk) >> 8)) << 16 | ((uint8_t)(cmyk) << 24))
#define FXARGB_TOBGRORDERDIB(argb) ((uint8_t)(argb>>16) | ((uint8_t)(argb>>8)) << 8 | ((uint8_t)(argb)) << 16 | ((uint8_t)(argb>>24) << 24))
@@ -171,19 +171,19 @@ public:
- virtual FX_LPBYTE GetBuffer() const
+ virtual uint8_t* GetBuffer() const
{
return NULL;
}
- virtual FX_LPCBYTE GetScanline(int line) const = 0;
+ virtual const uint8_t* GetScanline(int line) const = 0;
virtual FX_BOOL SkipToScanline(int line, IFX_Pause* pPause) const
{
return FALSE;
}
- virtual void DownSampleScanline(int line, FX_LPBYTE dest_scan, int dest_bpp,
+ virtual void DownSampleScanline(int line, uint8_t* dest_scan, int dest_bpp,
int dest_width, FX_BOOL bFlipX, int clip_left, int clip_width) const = 0;
virtual void SetDownSampleSize(int width, int height) const {}
@@ -291,21 +291,21 @@ public:
CFX_DIBitmap(const CFX_DIBitmap& src);
- FX_BOOL Create(int width, int height, FXDIB_Format format, FX_LPBYTE pBuffer = NULL, int pitch = 0);
+ FX_BOOL Create(int width, int height, FXDIB_Format format, uint8_t* pBuffer = NULL, int pitch = 0);
FX_BOOL Copy(const CFX_DIBSource* pSrc);
- virtual FX_LPBYTE GetBuffer() const
+ virtual uint8_t* GetBuffer() const
{
return m_pBuffer;
}
- virtual FX_LPCBYTE GetScanline(int line) const
+ virtual const uint8_t* GetScanline(int line) const
{
return m_pBuffer ? m_pBuffer + line * m_Pitch : NULL;
}
- virtual void DownSampleScanline(int line, FX_LPBYTE dest_scan, int dest_bpp,
+ virtual void DownSampleScanline(int line, uint8_t* dest_scan, int dest_bpp,
int dest_width, FX_BOOL bFlipX, int clip_left, int clip_width) const;
void TakeOver(CFX_DIBitmap* pSrcBitmap);
@@ -347,7 +347,7 @@ public:
FX_BOOL DitherFS(const FX_DWORD* pPalette, int pal_size, const FX_RECT* pRect = NULL);
protected:
- FX_LPBYTE m_pBuffer;
+ uint8_t* m_pBuffer;
FX_BOOL m_bExtBuf;
@@ -385,26 +385,26 @@ public:
virtual FX_DWORD* GetDestPalette() = 0;
- virtual void TranslateScanline(FX_LPBYTE dest_buf, FX_LPCBYTE src_buf) const = 0;
+ virtual void TranslateScanline(uint8_t* dest_buf, const uint8_t* src_buf) const = 0;
- virtual void TranslateDownSamples(FX_LPBYTE dest_buf, FX_LPCBYTE src_buf, int pixels, int Bpp) const = 0;
+ virtual void TranslateDownSamples(uint8_t* dest_buf, const uint8_t* src_buf, int pixels, int Bpp) const = 0;
protected:
- virtual FX_LPCBYTE GetScanline(int line) const;
- virtual void DownSampleScanline(int line, FX_LPBYTE dest_scan, int dest_bpp,
+ virtual const uint8_t* GetScanline(int line) const;
+ virtual void DownSampleScanline(int line, uint8_t* dest_scan, int dest_bpp,
int dest_width, FX_BOOL bFlipX, int clip_left, int clip_width) const;
const CFX_DIBSource* m_pSrc;
FX_BOOL m_bAutoDropSrc;
- FX_LPBYTE m_pScanline;
+ uint8_t* m_pScanline;
};
class IFX_ScanlineComposer
{
public:
virtual ~IFX_ScanlineComposer() { }
- virtual void ComposeScanline(int line, FX_LPCBYTE scanline, FX_LPCBYTE scan_extra_alpha = NULL) = 0;
+ virtual void ComposeScanline(int line, const uint8_t* scanline, const uint8_t* scan_extra_alpha = NULL) = 0;
virtual FX_BOOL SetInfo(int width, int height, FXDIB_Format src_format, FX_DWORD* pSrcPalette) = 0;
};
@@ -419,20 +419,20 @@ public:
FX_DWORD mask_color, int blend_type, FX_BOOL bClip, FX_BOOL bRgbByteOrder = FALSE, int alpha_flag = 0, void* pIccTransform = NULL);
- void CompositeRgbBitmapLine(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_extra_alpha = NULL, FX_LPBYTE dst_extra_alpha = NULL);
+ void CompositeRgbBitmapLine(uint8_t* dest_scan, const uint8_t* src_scan, int width, const uint8_t* clip_scan,
+ const uint8_t* src_extra_alpha = NULL, uint8_t* dst_extra_alpha = NULL);
- void CompositePalBitmapLine(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_left, int width, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_extra_alpha = NULL, FX_LPBYTE dst_extra_alpha = NULL);
+ void CompositePalBitmapLine(uint8_t* dest_scan, const uint8_t* src_scan, int src_left, int width, const uint8_t* clip_scan,
+ const uint8_t* src_extra_alpha = NULL, uint8_t* dst_extra_alpha = NULL);
- void CompositeByteMaskLine(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, FX_LPCBYTE clip_scan,
- FX_LPBYTE dst_extra_alpha = NULL);
+ void CompositeByteMaskLine(uint8_t* dest_scan, const uint8_t* src_scan, int width, const uint8_t* clip_scan,
+ uint8_t* dst_extra_alpha = NULL);
- void CompositeBitMaskLine(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_left, int width, FX_LPCBYTE clip_scan,
- FX_LPBYTE dst_extra_alpha = NULL);
+ void CompositeBitMaskLine(uint8_t* dest_scan, const uint8_t* src_scan, int src_left, int width, const uint8_t* clip_scan,
+ uint8_t* dst_extra_alpha = NULL);
protected:
int m_Transparency;
FXDIB_Format m_SrcFormat,
@@ -446,7 +446,7 @@ protected:
m_MaskBlack;
int m_BlendType;
void* m_pIccTransform;
- FX_LPBYTE m_pCacheScanline;
+ uint8_t* m_pCacheScanline;
int m_CacheSize;
FX_BOOL m_bRgbByteOrder;
};
@@ -467,11 +467,11 @@ public:
virtual FX_BOOL SetInfo(int width, int height, FXDIB_Format src_format, FX_DWORD* pSrcPalette);
- virtual void ComposeScanline(int line, FX_LPCBYTE scanline, FX_LPCBYTE scan_extra_alpha);
+ virtual void ComposeScanline(int line, const uint8_t* scanline, const uint8_t* scan_extra_alpha);
protected:
- void DoCompose(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int dest_width, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_extra_alpha = NULL, FX_LPBYTE dst_extra_alpha = NULL);
+ void DoCompose(uint8_t* dest_scan, const uint8_t* src_scan, int dest_width, const uint8_t* clip_scan,
+ const uint8_t* src_extra_alpha = NULL, uint8_t* dst_extra_alpha = NULL);
CFX_DIBitmap* m_pBitmap;
const CFX_ClipRgn* m_pClipRgn;
FXDIB_Format m_SrcFormat;
@@ -484,8 +484,11 @@ protected:
void* m_pIccTransform;
FX_BOOL m_bRgbByteOrder;
int m_BlendType;
- void ComposeScanlineV(int line, FX_LPCBYTE scanline, FX_LPCBYTE scan_extra_alpha = NULL);
- FX_LPBYTE m_pScanlineV, m_pClipScanV, m_pAddClipScan, m_pScanlineAlphaV;
+ void ComposeScanlineV(int line, const uint8_t* scanline, const uint8_t* scan_extra_alpha = NULL);
+ uint8_t* m_pScanlineV;
+ uint8_t* m_pClipScanV;
+ uint8_t* m_pAddClipScan;
+ uint8_t* m_pScanlineAlphaV;
};
class CFX_BitmapStorer : public IFX_ScanlineComposer
{
@@ -495,7 +498,7 @@ public:
~CFX_BitmapStorer();
- virtual void ComposeScanline(int line, FX_LPCBYTE scanline, FX_LPCBYTE scan_extra_alpha);
+ virtual void ComposeScanline(int line, const uint8_t* scanline, const uint8_t* scan_extra_alpha);
virtual FX_BOOL SetInfo(int width, int height, FXDIB_Format src_format, FX_DWORD* pSrcPalette);
@@ -535,8 +538,8 @@ public:
FX_RECT m_ClipRect;
int m_LineIndex;
int m_DestBPP;
- FX_LPBYTE m_pScanline;
- FX_LPBYTE m_pMaskScanline;
+ uint8_t* m_pScanline;
+ uint8_t* m_pMaskScanline;
FXDIB_Format m_DestFormat;
int32_t m_Status;
diff --git a/core/include/fxge/fx_font.h b/core/include/fxge/fx_font.h
index 3d2d99cfd8..c950130d8f 100644
--- a/core/include/fxge/fx_font.h
+++ b/core/include/fxge/fx_font.h
@@ -58,7 +58,7 @@ public:
FX_BOOL LoadSubst(const CFX_ByteString& face_name, FX_BOOL bTrueType, FX_DWORD flags,
int weight, int italic_angle, int CharsetCP, FX_BOOL bVertical = FALSE);
- FX_BOOL LoadEmbedded(FX_LPCBYTE data, FX_DWORD size);
+ FX_BOOL LoadEmbedded(const uint8_t* data, FX_DWORD size);
FX_BOOL LoadFile(IFX_FileRead* pFile, int nFaceIndex = 0, int* pFaceCount = NULL);
@@ -126,9 +126,9 @@ public:
}
void AdjustMMParams(int glyph_index, int width, int weight);
- FX_LPBYTE m_pFontDataAllocation;
- FX_LPBYTE m_pFontData;
- FX_LPBYTE m_pGsubData;
+ uint8_t* m_pFontDataAllocation;
+ uint8_t* m_pFontData;
+ uint8_t* m_pGsubData;
FX_DWORD m_dwSize;
CFX_BinaryBuf m_OtfFontData;
void* m_hHandle;
@@ -179,7 +179,7 @@ class IFX_FontEncodingEx : public IFX_FontEncoding
{
public:
- virtual FX_DWORD GlyphIndexFromName(FX_LPCSTR pStrName) = 0;
+ virtual FX_DWORD GlyphIndexFromName(const FX_CHAR* pStrName) = 0;
virtual CFX_ByteString NameFromGlyphIndex(FX_DWORD dwGlyphIndex) = 0;
@@ -199,7 +199,7 @@ public:
CFX_SubstFont();
- FX_LPVOID m_ExtHandle;
+ void* m_ExtHandle;
CFX_ByteString m_Family;
@@ -225,7 +225,7 @@ public:
#define FX_FONT_FLAG_SYMBOLIC_DINGBATS 0x20
#define FX_FONT_FLAG_MULTIPLEMASTER 0x40
typedef struct {
- FX_LPCBYTE m_pFontData;
+ const uint8_t* m_pFontData;
FX_DWORD m_dwSize;
} FoxitFonts;
class CFX_FontMgr
@@ -235,15 +235,15 @@ public:
~CFX_FontMgr();
void InitFTLibrary();
FXFT_Face GetCachedFace(const CFX_ByteString& face_name,
- int weight, FX_BOOL bItalic, FX_LPBYTE& pFontData);
+ int weight, FX_BOOL bItalic, uint8_t*& pFontData);
FXFT_Face AddCachedFace(const CFX_ByteString& face_name,
- int weight, FX_BOOL bItalic, FX_LPBYTE pData, FX_DWORD size, int face_index);
+ int weight, FX_BOOL bItalic, uint8_t* pData, FX_DWORD size, int face_index);
FXFT_Face GetCachedTTCFace(int ttc_size, FX_DWORD checksum,
- int font_offset, FX_LPBYTE& pFontData);
+ int font_offset, uint8_t*& pFontData);
FXFT_Face AddCachedTTCFace(int ttc_size, FX_DWORD checksum,
- FX_LPBYTE pData, FX_DWORD size, int font_offset);
- FXFT_Face GetFileFace(FX_LPCSTR filename, int face_index);
- FXFT_Face GetFixedFace(FX_LPCBYTE pData, FX_DWORD size, int face_index);
+ uint8_t* pData, FX_DWORD size, int font_offset);
+ FXFT_Face GetFileFace(const FX_CHAR* filename, int face_index);
+ FXFT_Face GetFixedFace(const uint8_t* pData, FX_DWORD size, int face_index);
void ReleaseFace(FXFT_Face face);
void SetSystemFontInfo(IFX_SystemFontInfo* pFontInfo);
FXFT_Face FindSubstFont(const CFX_ByteString& face_name, FX_BOOL bTrueType, FX_DWORD flags,
@@ -251,7 +251,7 @@ public:
void FreeCache();
- FX_BOOL GetStandardFont(FX_LPCBYTE& pFontData, FX_DWORD& size, int index);
+ FX_BOOL GetStandardFont(const uint8_t*& pFontData, FX_DWORD& size, int index);
CFX_FontMapper* m_pBuiltinMapper;
IFX_FontMapper* m_pExtMapper;
CFX_MapByteStringToPtr m_FaceMap;
@@ -334,13 +334,13 @@ public:
virtual void Release() = 0;
virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper) = 0;
- virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR face, FX_BOOL& bExact) = 0;
- virtual void* MapFontByUnicode(FX_DWORD dwUnicode, int weight, FX_BOOL bItalic, int pitch_family)
- {
- return NULL;
- }
- virtual void* GetFont(FX_LPCSTR face) = 0;
- virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, FX_LPBYTE buffer, FX_DWORD size) = 0;
+ virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* face, FX_BOOL& bExact) = 0;
+ virtual void* MapFontByUnicode(FX_DWORD dwUnicode, int weight, FX_BOOL bItalic, int pitch_family)
+ {
+ return NULL;
+ }
+ virtual void* GetFont(const FX_CHAR* face) = 0;
+ virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer, FX_DWORD size) = 0;
virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) = 0;
virtual FX_BOOL GetFontCharset(void* hFont, int& charset) = 0;
virtual int GetFaceIndex(void* hFont)
@@ -363,10 +363,10 @@ public:
void AddPath(FX_BSTR path);
virtual void Release();
virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper);
- virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR face, FX_BOOL& bExact);
- virtual void* MapFontByUnicode(FX_DWORD dwUnicode, int weight, FX_BOOL bItalic, int pitch_family);
- virtual void* GetFont(FX_LPCSTR face);
- virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, FX_LPBYTE buffer, FX_DWORD size);
+ virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* face, FX_BOOL& bExact);
+ virtual void* MapFontByUnicode(FX_DWORD dwUnicode, int weight, FX_BOOL bItalic, int pitch_family);
+ virtual void* GetFont(const FX_CHAR* face);
+ virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer, FX_DWORD size);
virtual void DeleteFont(void* hFont);
virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name);
virtual FX_BOOL GetFontCharset(void* hFont, int& charset);
diff --git a/core/include/fxge/fx_ge.h b/core/include/fxge/fx_ge.h
index a880166c39..46ff0c30f8 100644
--- a/core/include/fxge/fx_ge.h
+++ b/core/include/fxge/fx_ge.h
@@ -41,7 +41,7 @@ public:
return m_pFontMgr;
}
void SetTextGamma(FX_FLOAT gammaValue);
- FX_LPCBYTE GetTextGammaTable();
+ const uint8_t* GetTextGammaTable();
void SetExtFontMapper(IFX_FontMapper* pFontMapper);
void SetCodecModule(CCodec_ModuleMgr* pCodecModule)
@@ -423,12 +423,12 @@ public:
FX_DWORD color, FX_DWORD flags = 0, int alpha_flag = 0, void* pIccTransform = NULL);
FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color,
- const CFX_AffineMatrix* pMatrix, FX_DWORD flags, FX_LPVOID& handle,
+ const CFX_AffineMatrix* pMatrix, FX_DWORD flags, void*& handle,
int alpha_flag = 0, void* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL);
- FX_BOOL ContinueDIBits(FX_LPVOID handle, IFX_Pause* pPause);
+ FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause);
- void CancelDIBits(FX_LPVOID handle);
+ void CancelDIBits(void* handle);
FX_BOOL DrawNormalText(int nChars, const FXTEXT_CHARPOS* pCharPos,
CFX_Font* pFont, CFX_FontCache* pCache,
@@ -601,15 +601,15 @@ public:
int alpha_flag = 0, void* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL) = 0;
virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color,
- const CFX_AffineMatrix* pMatrix, FX_DWORD flags, FX_LPVOID& handle,
+ const CFX_AffineMatrix* pMatrix, FX_DWORD flags, void*& handle,
int alpha_flag = 0, void* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL) = 0;
- virtual FX_BOOL ContinueDIBits(FX_LPVOID handle, IFX_Pause* pPause)
+ virtual FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause)
{
return FALSE;
}
- virtual void CancelDIBits(FX_LPVOID handle) {}
+ virtual void CancelDIBits(void* handle) {}
virtual FX_BOOL DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont,
CFX_FontCache* pCache, const CFX_AffineMatrix* pObject2Device, FX_FLOAT font_size, FX_DWORD color,
@@ -634,7 +634,7 @@ class IFX_PSOutput
{
public:
virtual void Release() = 0;
- virtual void OutputPS(FX_LPCSTR string, int len) = 0;
+ virtual void OutputPS(const FX_CHAR* string, int len) = 0;
protected:
~IFX_PSOutput() { }
@@ -726,7 +726,7 @@ private:
void FindPSFontGlyph(CFX_FaceCache* pFaceCache, CFX_Font* pFont, const FXTEXT_CHARPOS& charpos, int& ps_fontnum, int &ps_glyphindex);
- void WritePSBinary(FX_LPCBYTE data, int len);
+ void WritePSBinary(const uint8_t* data, int len);
};
#endif // CORE_INCLUDE_FXGE_FX_GE_H_
diff --git a/core/include/fxge/fx_ge_win32.h b/core/include/fxge/fx_ge_win32.h
index 3972090326..57f30f7d35 100644
--- a/core/include/fxge/fx_ge_win32.h
+++ b/core/include/fxge/fx_ge_win32.h
@@ -21,7 +21,7 @@ typedef struct WINDIB_Open_Args_ {
size_t memory_size;
- FX_LPCWSTR path_name;
+ const FX_WCHAR* path_name;
} WINDIB_Open_Args_;
class CFX_WindowsDIB : public CFX_DIBitmap
{
@@ -35,9 +35,9 @@ public:
static CFX_DIBitmap* LoadFromDDB(HDC hDC, HBITMAP hBitmap, FX_DWORD* pPalette = NULL, FX_DWORD size = 256);
- static CFX_DIBitmap* LoadFromFile(FX_LPCWSTR filename);
+ static CFX_DIBitmap* LoadFromFile(const FX_WCHAR* filename);
- static CFX_DIBitmap* LoadFromFile(FX_LPCSTR filename)
+ static CFX_DIBitmap* LoadFromFile(const FX_CHAR* filename)
{
return LoadFromFile(CFX_WideString::FromLocal(filename).c_str());
}
diff --git a/core/include/reflow/fpdf_layout.h b/core/include/reflow/fpdf_layout.h
index b1038db329..2fff2759ab 100644
--- a/core/include/reflow/fpdf_layout.h
+++ b/core/include/reflow/fpdf_layout.h
@@ -224,7 +224,7 @@ public:
static IPDF_LayoutProcessor* Create_LayoutProcessor_Reflow(FX_FLOAT TopIndent, FX_FLOAT fWidth, FX_FLOAT fHeight, void* pReflowedPage, int flags, FX_FLOAT lineSpace = 0);
- static IPDF_LayoutProcessor* Create_LayoutProcessor_2HTML(FX_LPCSTR fileName);
+ static IPDF_LayoutProcessor* Create_LayoutProcessor_2HTML(const FX_CHAR* fileName);
virtual LayoutStatus StartProcess(IPDF_LayoutElement* pElement, IFX_Pause* pPause, const CFX_AffineMatrix* pPDFMatrix = NULL) = 0;
diff --git a/core/src/fdrm/crypto/fx_crypt.cpp b/core/src/fdrm/crypto/fx_crypt.cpp
index da9fcc5693..f6b3148dba 100644
--- a/core/src/fdrm/crypto/fx_crypt.cpp
+++ b/core/src/fdrm/crypto/fx_crypt.cpp
@@ -14,7 +14,7 @@ extern "C" {
struct rc4_state {
int x, y, m[256];
};
-void CRYPT_ArcFourSetup(void* context, FX_LPCBYTE key, FX_DWORD length )
+void CRYPT_ArcFourSetup(void* context, const uint8_t* key, FX_DWORD length )
{
rc4_state *s = (rc4_state*)context;
int i, j, k, *m, a;
@@ -53,7 +53,7 @@ void CRYPT_ArcFourCrypt(void* context, unsigned char *data, FX_DWORD length )
s->x = x;
s->y = y;
}
-void CRYPT_ArcFourCryptBlock(FX_LPBYTE pData, FX_DWORD size, FX_LPCBYTE key, FX_DWORD keylen)
+void CRYPT_ArcFourCryptBlock(uint8_t* pData, FX_DWORD size, const uint8_t* key, FX_DWORD keylen)
{
rc4_state s;
CRYPT_ArcFourSetup(&s, key, keylen);
@@ -193,7 +193,7 @@ void CRYPT_MD5Start(void* context)
ctx->state[2] = 0x98BADCFE;
ctx->state[3] = 0x10325476;
}
-void CRYPT_MD5Update(FX_LPVOID pctx, FX_LPCBYTE input, FX_DWORD length )
+void CRYPT_MD5Update(void* pctx, const uint8_t* input, FX_DWORD length )
{
struct md5_context *ctx = (struct md5_context *)pctx;
FX_DWORD left, fill;
@@ -228,7 +228,7 @@ const uint8_t md5_padding[64] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
-void CRYPT_MD5Finish(FX_LPVOID pctx, uint8_t digest[16] )
+void CRYPT_MD5Finish(void* pctx, uint8_t digest[16] )
{
struct md5_context *ctx = (struct md5_context *)pctx;
FX_DWORD last, padn;
@@ -244,15 +244,15 @@ void CRYPT_MD5Finish(FX_LPVOID pctx, uint8_t digest[16] )
PUT_FX_DWORD( ctx->state[2], digest, 8 );
PUT_FX_DWORD( ctx->state[3], digest, 12 );
}
-void CRYPT_MD5Generate(FX_LPCBYTE input, FX_DWORD length, uint8_t digest[16])
+void CRYPT_MD5Generate(const uint8_t* input, FX_DWORD length, uint8_t digest[16])
{
md5_context ctx;
CRYPT_MD5Start(&ctx);
CRYPT_MD5Update(&ctx, input, length);
CRYPT_MD5Finish(&ctx, digest);
}
-static FX_BOOL (*g_PubKeyDecryptor)(FX_LPCBYTE pData, FX_DWORD size, FX_LPBYTE data_buf, FX_DWORD& data_len) = NULL;
-void CRYPT_SetPubKeyDecryptor(FX_BOOL (*func)(FX_LPCBYTE pData, FX_DWORD size, FX_LPBYTE data_buf, FX_DWORD& data_len))
+static FX_BOOL (*g_PubKeyDecryptor)(const uint8_t* pData, FX_DWORD size, uint8_t* data_buf, FX_DWORD& data_len) = NULL;
+void CRYPT_SetPubKeyDecryptor(FX_BOOL (*func)(const uint8_t* pData, FX_DWORD size, uint8_t* data_buf, FX_DWORD& data_len))
{
g_PubKeyDecryptor = func;
}
diff --git a/core/src/fdrm/crypto/fx_crypt_aes.cpp b/core/src/fdrm/crypto/fx_crypt_aes.cpp
index 6efa935be3..4de0f7e752 100644
--- a/core/src/fdrm/crypto/fx_crypt_aes.cpp
+++ b/core/src/fdrm/crypto/fx_crypt_aes.cpp
@@ -989,22 +989,22 @@ static void aes_encrypt_cbc(unsigned char *dest, const unsigned char *src, int l
}
FXSYS_memcpy32(ctx->iv, iv, sizeof(iv));
}
-void CRYPT_AESSetKey(FX_LPVOID context, FX_DWORD blocklen, FX_LPCBYTE key, FX_DWORD keylen, FX_BOOL bEncrypt)
+void CRYPT_AESSetKey(void* context, FX_DWORD blocklen, const uint8_t* key, FX_DWORD keylen, FX_BOOL bEncrypt)
{
aes_setup((AESContext*)context, blocklen, key, keylen);
}
-void CRYPT_AESSetIV(FX_LPVOID context, FX_LPCBYTE iv)
+void CRYPT_AESSetIV(void* context, const uint8_t* iv)
{
int i;
for (i = 0; i < ((AESContext*)context)->Nb; i++) {
((AESContext*)context)->iv[i] = GET_32BIT_MSB_FIRST(iv + 4 * i);
}
}
-void CRYPT_AESDecrypt(FX_LPVOID context, FX_LPBYTE dest, FX_LPCBYTE src, FX_DWORD len)
+void CRYPT_AESDecrypt(void* context, uint8_t* dest, const uint8_t* src, FX_DWORD len)
{
aes_decrypt_cbc(dest, src, len, (AESContext*)context);
}
-void CRYPT_AESEncrypt(FX_LPVOID context, FX_LPBYTE dest, FX_LPCBYTE src, FX_DWORD len)
+void CRYPT_AESEncrypt(void* context, uint8_t* dest, const uint8_t* src, FX_DWORD len)
{
aes_encrypt_cbc(dest, src, len, (AESContext*)context);
}
diff --git a/core/src/fdrm/crypto/fx_crypt_sha.cpp b/core/src/fdrm/crypto/fx_crypt_sha.cpp
index 1a55d11633..55a3f0e5bf 100644
--- a/core/src/fdrm/crypto/fx_crypt_sha.cpp
+++ b/core/src/fdrm/crypto/fx_crypt_sha.cpp
@@ -82,14 +82,14 @@ static void SHATransform(unsigned int * digest, unsigned int * block)
digest[3] += d;
digest[4] += e;
}
-void CRYPT_SHA1Start(FX_LPVOID context)
+void CRYPT_SHA1Start(void* context)
{
SHA_State * s = (SHA_State*)context;
SHA_Core_Init(s->h);
s->blkused = 0;
s->lenhi = s->lenlo = 0;
}
-void CRYPT_SHA1Update(FX_LPVOID context, FX_LPCBYTE data, FX_DWORD size)
+void CRYPT_SHA1Update(void* context, const uint8_t* data, FX_DWORD size)
{
SHA_State * s = (SHA_State*)context;
unsigned char *q = (unsigned char *)data;
@@ -121,7 +121,7 @@ void CRYPT_SHA1Update(FX_LPVOID context, FX_LPCBYTE data, FX_DWORD size)
s->blkused = len;
}
}
-void CRYPT_SHA1Finish(FX_LPVOID context, uint8_t digest[20])
+void CRYPT_SHA1Finish(void* context, uint8_t digest[20])
{
SHA_State * s = (SHA_State*)context;
int i;
@@ -154,7 +154,7 @@ void CRYPT_SHA1Finish(FX_LPVOID context, uint8_t digest[20])
digest[i * 4 + 3] = (s->h[i]) & 0xFF;
}
}
-void CRYPT_SHA1Generate(FX_LPCBYTE data, FX_DWORD size, uint8_t digest[20])
+void CRYPT_SHA1Generate(const uint8_t* data, FX_DWORD size, uint8_t digest[20])
{
SHA_State s;
CRYPT_SHA1Start(&s);
@@ -181,7 +181,7 @@ sha256_context;
(b)[(i) + 2] = (uint8_t) ( (n) >> 8 ); \
(b)[(i) + 3] = (uint8_t) ( (n) ); \
}
-void CRYPT_SHA256Start( FX_LPVOID context )
+void CRYPT_SHA256Start( void* context )
{
sha256_context *ctx = (sha256_context *)context;
ctx->total[0] = 0;
@@ -315,7 +315,7 @@ static void sha256_process( sha256_context *ctx, const uint8_t data[64] )
ctx->state[6] += G;
ctx->state[7] += H;
}
-void CRYPT_SHA256Update( void* context, FX_LPCBYTE input, FX_DWORD length )
+void CRYPT_SHA256Update( void* context, const uint8_t* input, FX_DWORD length )
{
sha256_context *ctx = (sha256_context *)context;
FX_DWORD left, fill;
@@ -353,7 +353,7 @@ static const uint8_t sha256_padding[64] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
-void CRYPT_SHA256Finish( FX_LPVOID context, uint8_t digest[32] )
+void CRYPT_SHA256Finish( void* context, uint8_t digest[32] )
{
sha256_context *ctx = (sha256_context *)context;
FX_DWORD last, padn;
@@ -377,7 +377,7 @@ void CRYPT_SHA256Finish( FX_LPVOID context, uint8_t digest[32] )
PUT_FX_DWORD( ctx->state[6], digest, 24 );
PUT_FX_DWORD( ctx->state[7], digest, 28 );
}
-void CRYPT_SHA256Generate(FX_LPCBYTE data, FX_DWORD size, uint8_t digest[32])
+void CRYPT_SHA256Generate(const uint8_t* data, FX_DWORD size, uint8_t digest[32])
{
sha256_context ctx;
CRYPT_SHA256Start(&ctx);
@@ -389,7 +389,7 @@ typedef struct {
uint64_t state[8];
uint8_t buffer[128];
} sha384_context;
-uint64_t FX_ato64i(FX_LPCSTR str)
+uint64_t FX_ato64i(const FX_CHAR* str)
{
FXSYS_assert(str != NULL);
uint64_t ret = 0;
@@ -411,7 +411,7 @@ uint64_t FX_ato64i(FX_LPCSTR str)
}
return ret;
}
-void CRYPT_SHA384Start(FX_LPVOID context)
+void CRYPT_SHA384Start(void* context)
{
if (context == NULL) {
return;
@@ -452,7 +452,7 @@ static const uint8_t sha384_padding[128] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
#define SHA384_R(t) (W[t] = SHA384_S1(W[t - 2]) + W[t - 7] + SHA384_S0(W[t - 15]) + W[t - 16])
-static FX_LPCSTR constants[] = {
+static const FX_CHAR* constants[] = {
"428a2f98d728ae22",
"7137449123ef65cd",
"b5c0fbcfec4d3b2f",
@@ -624,7 +624,7 @@ static void sha384_process( sha384_context *ctx, const uint8_t data[128] )
ctx->state[6] += G;
ctx->state[7] += H;
}
-void CRYPT_SHA384Update(FX_LPVOID context, FX_LPCBYTE input, FX_DWORD length)
+void CRYPT_SHA384Update(void* context, const uint8_t* input, FX_DWORD length)
{
sha384_context *ctx = (sha384_context *)context;
FX_DWORD left, fill;
@@ -655,7 +655,7 @@ void CRYPT_SHA384Update(FX_LPVOID context, FX_LPCBYTE input, FX_DWORD length)
(void *) input, length );
}
}
-void CRYPT_SHA384Finish(FX_LPVOID context, uint8_t digest[48])
+void CRYPT_SHA384Finish(void* context, uint8_t digest[48])
{
sha384_context *ctx = (sha384_context *)context;
FX_DWORD last, padn;
@@ -678,14 +678,14 @@ void CRYPT_SHA384Finish(FX_LPVOID context, uint8_t digest[48])
PUT_FX_64DWORD(ctx->state[4], digest, 32);
PUT_FX_64DWORD(ctx->state[5], digest, 40);
}
-void CRYPT_SHA384Generate(FX_LPCBYTE data, FX_DWORD size, uint8_t digest[64])
+void CRYPT_SHA384Generate(const uint8_t* data, FX_DWORD size, uint8_t digest[64])
{
sha384_context context;
CRYPT_SHA384Start(&context);
CRYPT_SHA384Update(&context, data, size);
CRYPT_SHA384Finish(&context, digest);
}
-void CRYPT_SHA512Start(FX_LPVOID context)
+void CRYPT_SHA512Start(void* context)
{
if (context == NULL) {
return;
@@ -701,11 +701,11 @@ void CRYPT_SHA512Start(FX_LPVOID context)
ctx->state[6] = FX_ato64i("1f83d9abfb41bd6b");
ctx->state[7] = FX_ato64i("5be0cd19137e2179");
}
-void CRYPT_SHA512Update(FX_LPVOID context, FX_LPCBYTE data, FX_DWORD size)
+void CRYPT_SHA512Update(void* context, const uint8_t* data, FX_DWORD size)
{
CRYPT_SHA384Update(context, data, size);
}
-void CRYPT_SHA512Finish(FX_LPVOID context, uint8_t digest[64])
+void CRYPT_SHA512Finish(void* context, uint8_t digest[64])
{
sha384_context *ctx = (sha384_context *)context;
FX_DWORD last, padn;
@@ -730,7 +730,7 @@ void CRYPT_SHA512Finish(FX_LPVOID context, uint8_t digest[64])
PUT_FX_64DWORD(ctx->state[6], digest, 48);
PUT_FX_64DWORD(ctx->state[7], digest, 56);
}
-void CRYPT_SHA512Generate(FX_LPCBYTE data, FX_DWORD size, uint8_t digest[64])
+void CRYPT_SHA512Generate(const uint8_t* data, FX_DWORD size, uint8_t digest[64])
{
sha384_context context;
CRYPT_SHA512Start(&context);
diff --git a/core/src/fpdfapi/fpdf_basic_module.cpp b/core/src/fpdfapi/fpdf_basic_module.cpp
index d564bdb687..e3ec425ff6 100644
--- a/core/src/fpdfapi/fpdf_basic_module.cpp
+++ b/core/src/fpdfapi/fpdf_basic_module.cpp
@@ -50,18 +50,18 @@ CPDF_ModuleMgr::~CPDF_ModuleMgr()
delete m_pRenderModule;
}
}
-void CPDF_ModuleMgr::SetDownloadCallback(FX_BOOL (*callback)(FX_LPCSTR module_name))
+void CPDF_ModuleMgr::SetDownloadCallback(FX_BOOL (*callback)(const FX_CHAR* module_name))
{
m_pDownloadCallback = callback;
}
-FX_BOOL CPDF_ModuleMgr::DownloadModule(FX_LPCSTR module_name)
+FX_BOOL CPDF_ModuleMgr::DownloadModule(const FX_CHAR* module_name)
{
if (m_pDownloadCallback == NULL) {
return FALSE;
}
return m_pDownloadCallback(module_name);
}
-void CPDF_ModuleMgr::NotifyModuleAvailable(FX_LPCSTR module_name)
+void CPDF_ModuleMgr::NotifyModuleAvailable(const FX_CHAR* module_name)
{
if (FXSYS_strcmp(module_name, ADDIN_NAME_CJK) == 0) {
m_pPageModule->NotifyCJKAvailable();
@@ -69,7 +69,7 @@ void CPDF_ModuleMgr::NotifyModuleAvailable(FX_LPCSTR module_name)
m_pRenderModule->NotifyDecoderAvailable();
}
}
-void CPDF_ModuleMgr::RegisterSecurityHandler(FX_LPCSTR filter, CPDF_SecurityHandler * (*CreateHandler)(void* param), void* param)
+void CPDF_ModuleMgr::RegisterSecurityHandler(const FX_CHAR* filter, CPDF_SecurityHandler * (*CreateHandler)(void* param), void* param)
{
if (CreateHandler == NULL) {
m_SecurityHandlerMap.RemoveKey(filter);
@@ -80,15 +80,15 @@ void CPDF_ModuleMgr::RegisterSecurityHandler(FX_LPCSTR filter, CPDF_SecurityHand
m_SecurityHandlerMap.SetAt(FX_BSTRC("_param_") + filter, param);
}
}
-void CPDF_ModuleMgr::SetPrivateData(FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback)
+void CPDF_ModuleMgr::SetPrivateData(void* module_id, void* pData, PD_CALLBACK_FREEDATA callback)
{
m_privateData.SetPrivateData(module_id, pData, callback);
}
-FX_LPVOID CPDF_ModuleMgr::GetPrivateData(FX_LPVOID module_id)
+void* CPDF_ModuleMgr::GetPrivateData(void* module_id)
{
return m_privateData.GetPrivateData(module_id);
}
-CPDF_SecurityHandler* CPDF_ModuleMgr::CreateSecurityHandler(FX_LPCSTR filter)
+CPDF_SecurityHandler* CPDF_ModuleMgr::CreateSecurityHandler(const FX_CHAR* filter)
{
CPDF_SecurityHandler* (*CreateHandler)(void*) = NULL;
if (!m_SecurityHandlerMap.Lookup(filter, (void*&)CreateHandler)) {
diff --git a/core/src/fpdfapi/fpdf_edit/editint.h b/core/src/fpdfapi/fpdf_edit/editint.h
index 38c33439ec..3a9d1588e0 100644
--- a/core/src/fpdfapi/fpdf_edit/editint.h
+++ b/core/src/fpdfapi/fpdf_edit/editint.h
@@ -15,7 +15,7 @@ public:
FX_BOOL Start();
int32_t CompressIndirectObject(FX_DWORD dwObjNum, const CPDF_Object *pObj);
- int32_t CompressIndirectObject(FX_DWORD dwObjNum, FX_LPCBYTE pBuffer, FX_DWORD dwSize);
+ int32_t CompressIndirectObject(FX_DWORD dwObjNum, const uint8_t* pBuffer, FX_DWORD dwSize);
FX_FILESIZE End(CPDF_Creator* pCreator);
@@ -38,7 +38,7 @@ public:
int32_t CompressIndirectObject(FX_DWORD dwObjNum, const CPDF_Object *pObj, CPDF_Creator *pCreator);
- int32_t CompressIndirectObject(FX_DWORD dwObjNum, FX_LPCBYTE pBuffer, FX_DWORD dwSize, CPDF_Creator *pCreator);
+ int32_t CompressIndirectObject(FX_DWORD dwObjNum, const uint8_t* pBuffer, FX_DWORD dwSize, CPDF_Creator *pCreator);
FX_BOOL End(CPDF_Creator *pCreator, FX_BOOL bEOF = FALSE);
FX_BOOL AddObjectNumberToIndexArray(FX_DWORD objnum);
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
index 65b482bf30..717386041d 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
@@ -99,7 +99,7 @@ void CPDF_PageContentGenerate::ProcessImage(CFX_ByteTextBuf& buf, CPDF_ImageObje
buf << "/" << PDF_NameEncode(name) << " Do Q\n";
}
}
-void CPDF_PageContentGenerate::ProcessForm(CFX_ByteTextBuf& buf, FX_LPCBYTE data, FX_DWORD size, CFX_Matrix& matrix)
+void CPDF_PageContentGenerate::ProcessForm(CFX_ByteTextBuf& buf, const uint8_t* data, FX_DWORD size, CFX_Matrix& matrix)
{
if (!data || !size) {
return;
@@ -111,7 +111,7 @@ void CPDF_PageContentGenerate::ProcessForm(CFX_ByteTextBuf& buf, FX_LPCBYTE data
CFX_FloatRect bbox = m_pPage->GetPageBBox();
matrix.TransformRect(bbox);
pFormDict->SetAtRect(FX_BSTR("BBox"), bbox);
- pStream->InitStream((FX_LPBYTE)data, size, pFormDict);
+ pStream->InitStream((uint8_t*)data, size, pFormDict);
buf << "q " << matrix << " cm ";
CFX_ByteString name = RealizeResource(pStream, "XObject");
buf << "/" << PDF_NameEncode(name) << " Do Q\n";
@@ -142,7 +142,7 @@ void CPDF_PageContentGenerate::TransformContent(CFX_Matrix& matrix)
size += pContentArray[i]->GetSize() + 1;
}
int pos = 0;
- FX_LPBYTE pBuf = FX_Alloc(uint8_t, size);
+ uint8_t* pBuf = FX_Alloc(uint8_t, size);
for (i = 0; i < iCount; ++i) {
FXSYS_memcpy32(pBuf + pos, pContentArray[i]->GetData(), pContentArray[i]->GetSize());
pos += pContentArray[i]->GetSize() + 1;
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
index 035baa398f..0091613120 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
@@ -8,9 +8,9 @@
#include "editint.h"
#define PDF_OBJECTSTREAM_MAXLENGTH (256 * 1024)
#define PDF_XREFSTREAM_MAXSIZE 10000
-extern void FlateEncode(const uint8_t* src_buf, FX_DWORD src_data, FX_LPBYTE& dest_buf, FX_DWORD& dest_size);
-extern void FlateEncode(FX_LPCBYTE src_buf, FX_DWORD src_size, int predictor, int Colors, int BitsPerComponent, int Columns,
- FX_LPBYTE& dest_buf, FX_DWORD& dest_size);
+extern void FlateEncode(const uint8_t* src_buf, FX_DWORD src_data, uint8_t*& dest_buf, FX_DWORD& dest_size);
+extern void FlateEncode(const uint8_t* src_buf, FX_DWORD src_size, int predictor, int Colors, int BitsPerComponent, int Columns,
+ uint8_t*& dest_buf, FX_DWORD& dest_size);
extern FX_BOOL IsSignatureDict(const CPDF_Dictionary* pDict);
int32_t PDF_CreatorAppendObject(const CPDF_Object* pObj, CFX_FileBufferArchive *pFile, FX_FILESIZE& offset)
{
@@ -283,12 +283,12 @@ int32_t PDF_CreatorWriteEncrypt(const CPDF_Dictionary* pEncryptDict, FX_DWORD dw
offset += len + 6;
return offset;
}
-FX_BOOL PDF_GenerateFileID(FX_DWORD dwSeed1, FX_DWORD dwSeed2, FX_LPDWORD pBuffer)
+FX_BOOL PDF_GenerateFileID(FX_DWORD dwSeed1, FX_DWORD dwSeed2, FX_DWORD* pBuffer)
{
if (!pBuffer) {
return FALSE;
}
- FX_LPVOID pContext = FX_Random_MT_Start(dwSeed1);
+ void* pContext = FX_Random_MT_Start(dwSeed1);
int32_t i = 0;
for (i = 0; i < 2; i++) {
*pBuffer++ = FX_Random_MT_Generate(pContext);
@@ -307,9 +307,9 @@ public:
CPDF_FlateEncoder();
~CPDF_FlateEncoder();
FX_BOOL Initialize(CPDF_Stream* pStream, FX_BOOL bFlateEncode);
- FX_BOOL Initialize(FX_LPCBYTE pBuffer, FX_DWORD size, FX_BOOL bFlateEncode, FX_BOOL bXRefStream = FALSE);
+ FX_BOOL Initialize(const uint8_t* pBuffer, FX_DWORD size, FX_BOOL bFlateEncode, FX_BOOL bXRefStream = FALSE);
void CloneDict();
- FX_LPBYTE m_pData;
+ uint8_t* m_pData;
FX_DWORD m_dwSize;
CPDF_Dictionary* m_pDict;
FX_BOOL m_bCloned;
@@ -339,13 +339,13 @@ FX_BOOL CPDF_FlateEncoder::Initialize(CPDF_Stream* pStream, FX_BOOL bFlateEncode
CPDF_StreamAcc destAcc;
destAcc.LoadAllData(pStream);
m_dwSize = destAcc.GetSize();
- m_pData = (FX_LPBYTE)destAcc.DetachData();
+ m_pData = (uint8_t*)destAcc.DetachData();
m_pDict = (CPDF_Dictionary*)pStream->GetDict()->Clone();
m_pDict->RemoveAt(FX_BSTRC("Filter"));
m_bNewData = TRUE;
m_bCloned = TRUE;
} else {
- m_pData = (FX_LPBYTE)m_Acc.GetData();
+ m_pData = (uint8_t*)m_Acc.GetData();
m_dwSize = m_Acc.GetSize();
m_pDict = pStream->GetDict();
}
@@ -362,10 +362,10 @@ FX_BOOL CPDF_FlateEncoder::Initialize(CPDF_Stream* pStream, FX_BOOL bFlateEncode
m_pDict->RemoveAt("DecodeParms");
return TRUE;
}
-FX_BOOL CPDF_FlateEncoder::Initialize(FX_LPCBYTE pBuffer, FX_DWORD size, FX_BOOL bFlateEncode, FX_BOOL bXRefStream)
+FX_BOOL CPDF_FlateEncoder::Initialize(const uint8_t* pBuffer, FX_DWORD size, FX_BOOL bFlateEncode, FX_BOOL bXRefStream)
{
if (!bFlateEncode) {
- m_pData = (FX_LPBYTE)pBuffer;
+ m_pData = (uint8_t*)pBuffer;
m_dwSize = size;
return TRUE;
}
@@ -391,8 +391,8 @@ class CPDF_Encryptor
public:
CPDF_Encryptor();
~CPDF_Encryptor();
- FX_BOOL Initialize(CPDF_CryptoHandler* pHandler, int objnum, FX_LPBYTE src_data, FX_DWORD src_size);
- FX_LPBYTE m_pData;
+ FX_BOOL Initialize(CPDF_CryptoHandler* pHandler, int objnum, uint8_t* src_data, FX_DWORD src_size);
+ uint8_t* m_pData;
FX_DWORD m_dwSize;
FX_BOOL m_bNewBuf;
};
@@ -402,13 +402,13 @@ CPDF_Encryptor::CPDF_Encryptor()
m_dwSize = 0;
m_bNewBuf = FALSE;
}
-FX_BOOL CPDF_Encryptor::Initialize(CPDF_CryptoHandler* pHandler, int objnum, FX_LPBYTE src_data, FX_DWORD src_size)
+FX_BOOL CPDF_Encryptor::Initialize(CPDF_CryptoHandler* pHandler, int objnum, uint8_t* src_data, FX_DWORD src_size)
{
if (src_size == 0) {
return TRUE;
}
if (pHandler == NULL) {
- m_pData = (FX_LPBYTE)src_data;
+ m_pData = (uint8_t*)src_data;
m_dwSize = src_size;
m_bNewBuf = FALSE;
return TRUE;
@@ -446,7 +446,7 @@ int32_t CPDF_ObjectStream::CompressIndirectObject(FX_DWORD dwObjNum, const CPDF_
m_Buffer << pObj;
return 1;
}
-int32_t CPDF_ObjectStream::CompressIndirectObject(FX_DWORD dwObjNum, FX_LPCBYTE pBuffer, FX_DWORD dwSize)
+int32_t CPDF_ObjectStream::CompressIndirectObject(FX_DWORD dwObjNum, const uint8_t* pBuffer, FX_DWORD dwSize)
{
m_ObjNumArray.Add(dwObjNum);
m_OffsetArray.Add(m_Buffer.GetLength());
@@ -564,7 +564,7 @@ int32_t CPDF_XRefStream::CompressIndirectObject(FX_DWORD dwObjNum, const CPDF_Ob
}
return EndObjectStream(pCreator);
}
-int32_t CPDF_XRefStream::CompressIndirectObject(FX_DWORD dwObjNum, FX_LPCBYTE pBuffer, FX_DWORD dwSize, CPDF_Creator *pCreator)
+int32_t CPDF_XRefStream::CompressIndirectObject(FX_DWORD dwObjNum, const uint8_t* pBuffer, FX_DWORD dwSize, CPDF_Creator *pCreator)
{
if (!pCreator) {
return 0;
@@ -958,7 +958,7 @@ int32_t CPDF_Creator::WriteIndirectObjectToStream(const CPDF_Object* pObj)
}
return 0;
}
-int32_t CPDF_Creator::WriteIndirectObjectToStream(FX_DWORD objnum, FX_LPCBYTE pBuffer, FX_DWORD dwSize)
+int32_t CPDF_Creator::WriteIndirectObjectToStream(FX_DWORD objnum, const uint8_t* pBuffer, FX_DWORD dwSize)
{
if (!m_pXRefStream) {
return 1;
@@ -1104,8 +1104,8 @@ int32_t CPDF_Creator::WriteDirectObj(FX_DWORD objnum, const CPDF_Object* pObj, F
break;
}
CPDF_Encryptor encryptor;
- encryptor.Initialize(m_pCryptoHandler, objnum, (FX_LPBYTE)str.c_str(), str.GetLength());
- CFX_ByteString content = PDF_EncodeString(CFX_ByteString((FX_LPCSTR)encryptor.m_pData, encryptor.m_dwSize), bHex);
+ encryptor.Initialize(m_pCryptoHandler, objnum, (uint8_t*)str.c_str(), str.GetLength());
+ CFX_ByteString content = PDF_EncodeString(CFX_ByteString((const FX_CHAR*)encryptor.m_pData, encryptor.m_dwSize), bHex);
if ((len = m_File.AppendString(content)) < 0) {
return -1;
}
@@ -1252,8 +1252,8 @@ int32_t CPDF_Creator::WriteOldIndirectObject(FX_DWORD objnum)
return 0;
}
m_ObjectOffset[objnum] = m_Offset;
- FX_LPVOID valuetemp = NULL;
- FX_BOOL bExistInMap = m_pDocument->m_IndirectObjs.Lookup((FX_LPVOID)(uintptr_t)objnum, valuetemp);
+ void* valuetemp = NULL;
+ FX_BOOL bExistInMap = m_pDocument->m_IndirectObjs.Lookup((void*)(uintptr_t)objnum, valuetemp);
FX_BOOL bObjStm = (m_pParser->m_V5Type[objnum] == 2) && m_pEncryptDict && !m_pXRefStream;
if(m_pParser->m_bVersionUpdated || m_bSecurityChanged || bExistInMap || bObjStm) {
CPDF_Object* pObj = m_pDocument->GetIndirectObject(objnum);
@@ -1326,7 +1326,7 @@ int32_t CPDF_Creator::WriteOldObjs(IFX_Pause *pPause)
}
m_ObjectSize[objnum] = (FX_DWORD)(m_Offset - m_ObjectOffset[objnum]);
if (pPause && pPause->NeedToPauseNow()) {
- m_Pos = (FX_LPVOID)(uintptr_t)(objnum + 1);
+ m_Pos = (void*)(uintptr_t)(objnum + 1);
return 1;
}
}
@@ -1339,7 +1339,7 @@ int32_t CPDF_Creator::WriteNewObjs(FX_BOOL bIncremental, IFX_Pause *pPause)
while (index < iCount) {
FX_DWORD objnum = m_NewObjNumArray.ElementAt(index);
CPDF_Object *pObj = NULL;
- m_pDocument->m_IndirectObjs.Lookup((FX_LPVOID)(uintptr_t)objnum, (FX_LPVOID&)pObj);
+ m_pDocument->m_IndirectObjs.Lookup((void*)(uintptr_t)objnum, (void*&)pObj);
if (NULL == pObj) {
++index;
continue;
@@ -1390,7 +1390,7 @@ void CPDF_Creator::InitNewObjNumOffsets()
while (pos) {
size_t key = 0;
CPDF_Object* pObj;
- m_pDocument->m_IndirectObjs.GetNextAssoc(pos, (FX_LPVOID&)key, (FX_LPVOID&)pObj);
+ m_pDocument->m_IndirectObjs.GetNextAssoc(pos, (void*&)key, (void*&)pObj);
FX_DWORD objnum = (FX_DWORD)key;
if (pObj->GetObjNum() == -1) {
continue;
@@ -1517,7 +1517,7 @@ int32_t CPDF_Creator::WriteDoc_Stage1(IFX_Pause *pPause)
} else {
IFX_FileRead* pSrcFile = m_pParser->GetFileAccess();
m_Offset = pSrcFile->GetSize();
- m_Pos = (FX_LPVOID)(uintptr_t)m_Offset;
+ m_Pos = (void*)(uintptr_t)m_Offset;
m_iStage = 15;
}
}
@@ -1536,7 +1536,7 @@ int32_t CPDF_Creator::WriteDoc_Stage1(IFX_Pause *pPause)
}
src_size -= block_size;
if (pPause && pPause->NeedToPauseNow()) {
- m_Pos = (FX_LPVOID)(uintptr_t)src_size;
+ m_Pos = (void*)(uintptr_t)src_size;
return 1;
}
}
@@ -1569,7 +1569,7 @@ int32_t CPDF_Creator::WriteDoc_Stage2(IFX_Pause *pPause)
FXSYS_assert(m_iStage >= 20 || m_iStage < 30);
if (m_iStage == 20) {
if ((m_dwFlags & FPDFCREATE_INCREMENTAL) == 0 && m_pParser) {
- m_Pos = (FX_LPVOID)(uintptr_t)0;
+ m_Pos = (void*)(uintptr_t)0;
m_iStage = 21;
} else {
m_iStage = 25;
@@ -1583,7 +1583,7 @@ int32_t CPDF_Creator::WriteDoc_Stage2(IFX_Pause *pPause)
m_iStage = 25;
}
if (m_iStage == 25) {
- m_Pos = (FX_LPVOID)(uintptr_t)0;
+ m_Pos = (void*)(uintptr_t)0;
m_iStage = 26;
}
if (m_iStage == 26) {
@@ -1630,13 +1630,13 @@ int32_t CPDF_Creator::WriteDoc_Stage3(IFX_Pause *pPause)
if (m_File.AppendString(str) < 0) {
return -1;
}
- m_Pos = (FX_LPVOID)(uintptr_t)1;
+ m_Pos = (void*)(uintptr_t)1;
m_iStage = 81;
} else {
if (m_File.AppendString(FX_BSTRC("xref\r\n")) < 0) {
return -1;
}
- m_Pos = (FX_LPVOID)(uintptr_t)0;
+ m_Pos = (void*)(uintptr_t)0;
m_iStage = 82;
}
} else {
@@ -1675,7 +1675,7 @@ int32_t CPDF_Creator::WriteDoc_Stage3(IFX_Pause *pPause)
break;
}
if (pPause && pPause->NeedToPauseNow()) {
- m_Pos = (FX_LPVOID)(uintptr_t)i;
+ m_Pos = (void*)(uintptr_t)i;
return 1;
}
}
@@ -1715,7 +1715,7 @@ int32_t CPDF_Creator::WriteDoc_Stage3(IFX_Pause *pPause)
}
}
if (pPause && (i % 100) == 0 && pPause->NeedToPauseNow()) {
- m_Pos = (FX_LPVOID)(uintptr_t)i;
+ m_Pos = (void*)(uintptr_t)i;
return 1;
}
}
@@ -1976,7 +1976,7 @@ void CPDF_Creator::Clear()
m_pIDArray = NULL;
}
}
-FX_BOOL CPDF_Creator::Create(FX_LPCSTR filename, FX_DWORD flags)
+FX_BOOL CPDF_Creator::Create(const FX_CHAR* filename, FX_DWORD flags)
{
if (!m_File.AttachFile(filename)) {
return FALSE;
@@ -1987,7 +1987,7 @@ FX_BOOL CPDF_Creator::Create(FX_LPCSTR filename, FX_DWORD flags)
}
return bRet;
}
-FX_BOOL CPDF_Creator::Create(FX_LPCWSTR filename, FX_DWORD flags)
+FX_BOOL CPDF_Creator::Create(const FX_WCHAR* filename, FX_DWORD flags)
{
if (!m_File.AttachFile(filename)) {
return FALSE;
@@ -2028,7 +2028,7 @@ void CPDF_Creator::InitID(FX_BOOL bDefault )
CPDF_Array* pOldIDArray = m_pParser ? m_pParser->GetIDArray() : NULL;
FX_BOOL bNewId = !m_pIDArray;
if (!m_pIDArray) {
- FX_LPDWORD pBuffer = NULL;
+ FX_DWORD* pBuffer = NULL;
m_pIDArray = CPDF_Array::Create();
CPDF_Object* pID1 = pOldIDArray ? pOldIDArray->GetElement(0) : NULL;
if (pID1) {
@@ -2036,7 +2036,7 @@ void CPDF_Creator::InitID(FX_BOOL bDefault )
} else {
pBuffer = FX_Alloc(FX_DWORD, 4);
PDF_GenerateFileID((FX_DWORD)(uintptr_t)this, m_dwLastObjNum, pBuffer);
- CFX_ByteStringC bsBuffer((FX_LPCBYTE)pBuffer, 4 * sizeof(FX_DWORD));
+ CFX_ByteStringC bsBuffer((const uint8_t*)pBuffer, 4 * sizeof(FX_DWORD));
m_pIDArray->Add(CPDF_String::Create(bsBuffer, TRUE), m_pDocument);
}
if (pBuffer) {
@@ -2052,9 +2052,9 @@ void CPDF_Creator::InitID(FX_BOOL bDefault )
m_pIDArray->Add(pID2->Clone());
return;
}
- FX_LPDWORD pBuffer = FX_Alloc(FX_DWORD, 4);
+ FX_DWORD* pBuffer = FX_Alloc(FX_DWORD, 4);
PDF_GenerateFileID((FX_DWORD)(uintptr_t)this, m_dwLastObjNum, pBuffer);
- CFX_ByteStringC bsBuffer((FX_LPCBYTE)pBuffer, 4 * sizeof(FX_DWORD));
+ CFX_ByteStringC bsBuffer((const uint8_t*)pBuffer, 4 * sizeof(FX_DWORD));
m_pIDArray->Add(CPDF_String::Create(bsBuffer, TRUE), m_pDocument);
FX_Free(pBuffer);
return;
@@ -2065,7 +2065,7 @@ void CPDF_Creator::InitID(FX_BOOL bDefault )
CPDF_StandardSecurityHandler handler;
CFX_ByteString user_pass = m_pParser->GetPassword();
FX_DWORD flag = PDF_ENCRYPT_CONTENT;
- handler.OnCreate(m_pEncryptDict, m_pIDArray, (FX_LPCBYTE)user_pass, user_pass.GetLength(), flag);
+ handler.OnCreate(m_pEncryptDict, m_pIDArray, (const uint8_t*)user_pass, user_pass.GetLength(), flag);
if (m_pCryptoHandler && m_bNewCrypto) {
delete m_pCryptoHandler;
}
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
index d2d81d5566..7176a62435 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
@@ -226,7 +226,7 @@ CPDF_Font* CPDF_Document::AddWindowsFont(LOGFONTW* pLogFont, FX_BOOL bVert, FX_B
FXSYS_strcpy(lfa.lfFaceName, face.c_str());
return AddWindowsFont(&lfa, bVert, bTranslateName);
}
-extern CFX_ByteString _FPDF_GetNameFromTT(FX_LPCBYTE name_table, FX_DWORD name);
+extern CFX_ByteString _FPDF_GetNameFromTT(const uint8_t* name_table, FX_DWORD name);
CFX_ByteString _FPDF_GetPSNameFromTT(HDC hDC)
{
CFX_ByteString result;
@@ -429,11 +429,11 @@ CPDF_Font* CPDF_Document::AddWindowsFont(LOGFONTA* pLogFont, FX_BOOL bVert, FX_B
}
#endif
#if (_FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_)
-uint32_t FX_GetLangHashCode( FX_LPCSTR pStr)
+uint32_t FX_GetLangHashCode( const FX_CHAR* pStr)
{
FXSYS_assert( pStr != NULL);
int32_t iLength = FXSYS_strlen(pStr);
- FX_LPCSTR pStrEnd = pStr + iLength;
+ const FX_CHAR* pStrEnd = pStr + iLength;
uint32_t uHashCode = 0;
while ( pStr < pStrEnd) {
uHashCode = 31 * uHashCode + tolower(*pStr++);
@@ -529,7 +529,7 @@ static FX_WORD FX_GetCsFromLangCode(uint32_t uCode)
};
return 0;
}
-static FX_WORD FX_GetCharsetFromLang(FX_LPCSTR pLang, int32_t iLength)
+static FX_WORD FX_GetCharsetFromLang(const FX_CHAR* pLang, int32_t iLength)
{
FXSYS_assert(pLang);
if (iLength < 0) {
@@ -545,7 +545,7 @@ static void _CFString2CFXByteString(CFStringRef src, CFX_ByteString &dest)
CFIndex used = 0;
UInt8* pBuffer = (UInt8*)calloc(len+1, sizeof(UInt8));
CFStringGetBytes(src, range, kCFStringEncodingASCII, 0, false, pBuffer, len, &used);
- dest = (FX_LPSTR)pBuffer;
+ dest = (FX_CHAR*)pBuffer;
free(pBuffer);
}
FX_BOOL IsHasCharSet(CFArrayRef languages, const CFX_DWordArray &charSets)
@@ -1141,7 +1141,7 @@ CPDF_Dictionary* CPDF_Document::CreateNewPage(int iPage)
return pDict;
}
int _PDF_GetStandardFontName(CFX_ByteString& name);
-CPDF_Font* CPDF_Document::AddStandardFont(FX_LPCSTR font, CPDF_FontEncoding* pEncoding)
+CPDF_Font* CPDF_Document::AddStandardFont(const FX_CHAR* font, CPDF_FontEncoding* pEncoding)
{
CFX_ByteString name(font, -1);
if (_PDF_GetStandardFontName(name) < 0) {
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp
index 8d105a5bd8..fd715240a4 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp
@@ -10,7 +10,7 @@
#include "../../../include/fpdfapi/fpdf_render.h"
#include "../fpdf_page/pageint.h"
#include "../fpdf_render/render_int.h"
-CPDF_Dictionary* CPDF_Image::InitJPEG(FX_LPBYTE pData, FX_DWORD size)
+CPDF_Dictionary* CPDF_Image::InitJPEG(uint8_t* pData, FX_DWORD size)
{
int32_t width, height, color_trans, num_comps, bits;
if (!CPDF_ModuleMgr::Get()->GetJpegModule()->
@@ -22,7 +22,7 @@ CPDF_Dictionary* CPDF_Image::InitJPEG(FX_LPBYTE pData, FX_DWORD size)
pDict->SetAtName("Subtype", "Image");
pDict->SetAtInteger("Width", width);
pDict->SetAtInteger("Height", height);
- FX_LPCSTR csname = NULL;
+ const FX_CHAR* csname = NULL;
if (num_comps == 1) {
csname = "DeviceGray";
} else if (num_comps == 3) {
@@ -52,7 +52,7 @@ CPDF_Dictionary* CPDF_Image::InitJPEG(FX_LPBYTE pData, FX_DWORD size)
}
return pDict;
}
-void CPDF_Image::SetJpegImage(FX_LPBYTE pData, FX_DWORD size)
+void CPDF_Image::SetJpegImage(uint8_t* pData, FX_DWORD size)
{
CPDF_Dictionary *pDict = InitJPEG(pData, size);
if (!pDict) {
@@ -70,7 +70,7 @@ void CPDF_Image::SetJpegImage(IFX_FileRead *pFile)
if (dwEstimateSize > 8192) {
dwEstimateSize = 8192;
}
- FX_LPBYTE pData = FX_Alloc(uint8_t, dwEstimateSize);
+ uint8_t* pData = FX_Alloc(uint8_t, dwEstimateSize);
pFile->ReadBlock(pData, 0, dwEstimateSize);
CPDF_Dictionary *pDict = InitJPEG(pData, dwEstimateSize);
FX_Free(pData);
@@ -85,10 +85,10 @@ void CPDF_Image::SetJpegImage(IFX_FileRead *pFile)
}
m_pStream->InitStream(pFile, pDict);
}
-void _DCTEncodeBitmap(CPDF_Dictionary *pBitmapDict, const CFX_DIBitmap* pBitmap, int quality, FX_LPBYTE &buf, FX_STRSIZE &size)
+void _DCTEncodeBitmap(CPDF_Dictionary *pBitmapDict, const CFX_DIBitmap* pBitmap, int quality, uint8_t* &buf, FX_STRSIZE &size)
{
}
-void _JBIG2EncodeBitmap(CPDF_Dictionary *pBitmapDict, const CFX_DIBitmap *pBitmap, CPDF_Document *pDoc, FX_LPBYTE &buf, FX_STRSIZE &size, FX_BOOL bLossLess)
+void _JBIG2EncodeBitmap(CPDF_Dictionary *pBitmapDict, const CFX_DIBitmap *pBitmap, CPDF_Document *pDoc, uint8_t* &buf, FX_STRSIZE &size, FX_BOOL bLossLess)
{
}
void CPDF_Image::SetImage(const CFX_DIBitmap* pBitmap, int32_t iCompress, IFX_FileWrite *pFileWrite, IFX_FileRead *pFileRead, const CFX_DIBitmap* pMask, const CPDF_ImageSetParam* pParam)
@@ -98,7 +98,7 @@ void CPDF_Image::SetImage(const CFX_DIBitmap* pBitmap, int32_t iCompress, IFX_Fi
if (BitmapWidth < 1 || BitmapHeight < 1) {
return;
}
- FX_LPBYTE src_buf = pBitmap->GetBuffer();
+ uint8_t* src_buf = pBitmap->GetBuffer();
int32_t src_pitch = pBitmap->GetPitch();
int32_t bpp = pBitmap->GetBPP();
FX_BOOL bUseMatte = pParam && pParam->pMatteColor && (pBitmap->GetFormat() == FXDIB_Argb);
@@ -107,7 +107,7 @@ void CPDF_Image::SetImage(const CFX_DIBitmap* pBitmap, int32_t iCompress, IFX_Fi
pDict->SetAtName(FX_BSTRC("Subtype"), FX_BSTRC("Image"));
pDict->SetAtInteger(FX_BSTRC("Width"), BitmapWidth);
pDict->SetAtInteger(FX_BSTRC("Height"), BitmapHeight);
- FX_LPBYTE dest_buf = NULL;
+ uint8_t* dest_buf = NULL;
FX_STRSIZE dest_pitch = 0, dest_size = 0, opType = -1;
if (bpp == 1) {
int32_t reset_a = 0, reset_r = 0, reset_g = 0, reset_b = 0;
@@ -130,7 +130,7 @@ void CPDF_Image::SetImage(const CFX_DIBitmap* pBitmap, int32_t iCompress, IFX_Fi
pCS->AddName(FX_BSTRC("DeviceRGB"));
pCS->AddInteger(1);
CFX_ByteString ct;
- FX_LPSTR pBuf = ct.GetBuffer(6);
+ FX_CHAR* pBuf = ct.GetBuffer(6);
pBuf[0] = (FX_CHAR)reset_r;
pBuf[1] = (FX_CHAR)reset_g;
pBuf[2] = (FX_CHAR)reset_b;
@@ -156,8 +156,8 @@ void CPDF_Image::SetImage(const CFX_DIBitmap* pBitmap, int32_t iCompress, IFX_Fi
pCS->AddName(FX_BSTRC("Indexed"));
pCS->AddName(FX_BSTRC("DeviceRGB"));
pCS->AddInteger(iPalette - 1);
- FX_LPBYTE pColorTable = FX_Alloc2D(uint8_t, iPalette, 3);
- FX_LPBYTE ptr = pColorTable;
+ uint8_t* pColorTable = FX_Alloc2D(uint8_t, iPalette, 3);
+ uint8_t* ptr = pColorTable;
for (int32_t i = 0; i < iPalette; i ++) {
FX_DWORD argb = pBitmap->GetPaletteArgb(i);
ptr[0] = (uint8_t)(argb >> 16);
@@ -204,7 +204,7 @@ void CPDF_Image::SetImage(const CFX_DIBitmap* pBitmap, int32_t iCompress, IFX_Fi
if (pMaskBitmap) {
int32_t maskWidth = pMaskBitmap->GetWidth();
int32_t maskHeight = pMaskBitmap->GetHeight();
- FX_LPBYTE mask_buf = NULL;
+ uint8_t* mask_buf = NULL;
FX_STRSIZE mask_size;
CPDF_Dictionary* pMaskDict = new CPDF_Dictionary;
pMaskDict->SetAtName(FX_BSTRC("Type"), FX_BSTRC("XObject"));
@@ -270,7 +270,7 @@ void CPDF_Image::SetImage(const CFX_DIBitmap* pBitmap, int32_t iCompress, IFX_Fi
if (bUseMatte) {
CFX_DIBitmap *pNewBitmap = new CFX_DIBitmap();
pNewBitmap->Create(BitmapWidth, BitmapHeight, FXDIB_Argb);
- FX_LPBYTE dst_buf = pNewBitmap->GetBuffer();
+ uint8_t* dst_buf = pNewBitmap->GetBuffer();
int32_t src_offset = 0;
for (int32_t row = 0; row < BitmapHeight; row ++) {
src_offset = row * src_pitch;
@@ -300,7 +300,7 @@ void CPDF_Image::SetImage(const CFX_DIBitmap* pBitmap, int32_t iCompress, IFX_Fi
dest_buf = FX_Alloc2D(uint8_t, dest_pitch, BitmapHeight);
dest_size = dest_pitch * BitmapHeight; // Safe since checked alloc returned.
}
- FX_LPBYTE pDest = dest_buf;
+ uint8_t* pDest = dest_buf;
for (int32_t i = 0; i < BitmapHeight; i ++) {
if (!bStream) {
FXSYS_memcpy32(pDest, src_buf, dest_pitch);
@@ -317,7 +317,7 @@ void CPDF_Image::SetImage(const CFX_DIBitmap* pBitmap, int32_t iCompress, IFX_Fi
} else {
dest_buf = FX_Alloc(uint8_t, dest_pitch);
}
- FX_LPBYTE pDest = dest_buf;
+ uint8_t* pDest = dest_buf;
int32_t src_offset = 0;
int32_t dest_offset = 0;
for (int32_t row = 0; row < BitmapHeight; row ++) {
diff --git a/core/src/fpdfapi/fpdf_font/font_int.h b/core/src/fpdfapi/fpdf_font/font_int.h
index 1e52607d98..6f32f4fa98 100644
--- a/core/src/fpdfapi/fpdf_font/font_int.h
+++ b/core/src/fpdfapi/fpdf_font/font_int.h
@@ -12,7 +12,7 @@ class CPDF_CMapManager
public:
CPDF_CMapManager();
~CPDF_CMapManager();
- FX_LPVOID GetPackage(FX_BOOL bPrompt);
+ void* GetPackage(FX_BOOL bPrompt);
CPDF_CMap* GetPredefinedCMap(const CFX_ByteString& name, FX_BOOL bPrompt);
CPDF_CID2UnicodeMap* GetCID2UnicodeMap(int charset, FX_BOOL bPrompt);
void ReloadAll();
@@ -44,7 +44,7 @@ public:
} m_EmbeddedToUnicodes[NUMBER_OF_CIDSETS];
private:
CFX_MapPtrToPtr m_pStockMap;
- FX_LPBYTE m_pContrastRamps;
+ uint8_t* m_pContrastRamps;
};
struct _CMap_CodeRange {
int m_CharSize;
@@ -81,7 +81,7 @@ class CPDF_CMap
public:
CPDF_CMap();
FX_BOOL LoadPredefined(CPDF_CMapManager* pMgr, const FX_CHAR* name, FX_BOOL bPromptCJK);
- FX_BOOL LoadEmbedded(FX_LPCBYTE pData, FX_DWORD dwSize);
+ FX_BOOL LoadEmbedded(const uint8_t* pData, FX_DWORD dwSize);
void Release();
FX_BOOL IsLoaded() const
{
@@ -98,9 +98,9 @@ public:
FX_WORD CIDFromCharCode(FX_DWORD charcode) const;
FX_DWORD CharCodeFromCID(FX_WORD CID) const;
int GetCharSize(FX_DWORD charcode) const;
- FX_DWORD GetNextChar(FX_LPCSTR pString, int nStrLen, int& offset) const;
- int CountChar(FX_LPCSTR pString, int size) const;
- int AppendChar(FX_LPSTR str, FX_DWORD charcode) const;
+ FX_DWORD GetNextChar(const FX_CHAR* pString, int nStrLen, int& offset) const;
+ int CountChar(const FX_CHAR* pString, int size) const;
+ int AppendChar(FX_CHAR* str, FX_DWORD charcode) const;
typedef enum {OneByte, TwoBytes, MixedTwoBytes, MixedFourBytes} CodingScheme;
protected:
~CPDF_CMap();
@@ -115,7 +115,7 @@ protected:
int m_nCodeRanges;
uint8_t* m_pLeadingBytes;
FX_WORD* m_pMapping;
- FX_LPBYTE m_pAddMapping;
+ uint8_t* m_pAddMapping;
FX_BOOL m_bLoaded;
const FXCMAP_CMap* m_pEmbedMap;
CPDF_CMap* m_pUseMap;
@@ -123,7 +123,7 @@ protected:
class CPDF_PredefinedCMap
{
public:
- FX_LPCSTR m_pName;
+ const FX_CHAR* m_pName;
int m_Charset;
int m_Coding;
CPDF_CMap::CodingScheme m_CodingScheme;
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
index 0058e140d4..c6922d11f8 100644
--- a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
+++ b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
@@ -205,7 +205,7 @@ CFX_WideString CPDF_Font::DecodeString(const CFX_ByteString& str) const
CFX_WideString result;
int src_len = str.GetLength();
result.Reserve(src_len);
- FX_LPCSTR src_buf = str;
+ const FX_CHAR* src_buf = str;
int src_pos = 0;
while (src_pos < src_len) {
FX_DWORD charcode = GetNextChar(src_buf, src_len, src_pos);
@@ -222,8 +222,8 @@ CFX_ByteString CPDF_Font::EncodeString(const CFX_WideString& str) const
{
CFX_ByteString result;
int src_len = str.GetLength();
- FX_LPSTR dest_buf = result.GetBuffer(src_len * 2);
- FX_LPCWSTR src_buf = str.c_str();
+ FX_CHAR* dest_buf = result.GetBuffer(src_len * 2);
+ const FX_WCHAR* src_buf = str.c_str();
int dest_pos = 0;
for (int src_pos = 0; src_pos < src_len; src_pos ++) {
FX_DWORD charcode = CharCodeFromUnicode(src_buf[src_pos]);
@@ -289,7 +289,7 @@ void CPDF_Font::LoadFontDescriptor(CPDF_Dictionary* pFontDesc)
if (m_pFontFile == NULL) {
return;
}
- FX_LPCBYTE pFontData = m_pFontFile->GetData();
+ const uint8_t* pFontData = m_pFontFile->GetData();
FX_DWORD dwFontSize = m_pFontFile->GetSize();
m_Font.LoadEmbedded(pFontData, dwFontSize);
if (m_Font.m_Face == NULL) {
@@ -369,7 +369,7 @@ void CPDF_Font::LoadUnicodeMap()
m_pToUnicodeMap = new CPDF_ToUnicodeMap;
m_pToUnicodeMap->Load(pStream);
}
-int CPDF_Font::GetStringWidth(FX_LPCSTR pString, int size)
+int CPDF_Font::GetStringWidth(const FX_CHAR* pString, int size)
{
int offset = 0;
int width = 0;
@@ -431,7 +431,7 @@ CPDF_Font* CPDF_Font::CreateFontF(CPDF_Document* pDoc, CPDF_Dictionary* pFontDic
int i;
int count = sizeof(ChineseFontNames) / sizeof(ChineseFontNames[0]);
for (i = 0; i < count; ++i) {
- if (tag == CFX_ByteString((FX_LPCSTR)ChineseFontNames[i])) {
+ if (tag == CFX_ByteString((const FX_CHAR*)ChineseFontNames[i])) {
break;
}
}
@@ -500,7 +500,7 @@ CFX_WideString CPDF_ToUnicodeMap::Lookup(FX_DWORD charcode)
if (unicode != 0xffff) {
return unicode;
}
- FX_LPCWSTR buf = m_MultiCharBuf.GetBuffer();
+ const FX_WCHAR* buf = m_MultiCharBuf.GetBuffer();
FX_DWORD buf_len = m_MultiCharBuf.GetLength();
if (buf == NULL || buf_len == 0) {
return CFX_WideString();
@@ -534,7 +534,7 @@ FX_DWORD CPDF_ToUnicodeMap::ReverseLookup(FX_WCHAR unicode)
}
static FX_DWORD _StringToCode(FX_BSTR str)
{
- FX_LPCSTR buf = str.GetCStr();
+ const FX_CHAR* buf = str.GetCStr();
int len = str.GetLength();
if (len == 0) {
return 0;
@@ -586,7 +586,7 @@ static CFX_WideString _StringDataAdd(CFX_WideString str)
}
static CFX_WideString _StringToWideString(FX_BSTR str)
{
- FX_LPCSTR buf = str.GetCStr();
+ const FX_CHAR* buf = str.GetCStr();
int len = str.GetLength();
if (len == 0) {
return CFX_WideString();
@@ -816,7 +816,7 @@ FX_BOOL CPDF_Font::IsStandardFont() const
}
return TRUE;
}
-extern FX_LPCSTR PDF_CharNameFromPredefinedCharSet(int encoding, uint8_t charcode);
+extern const FX_CHAR* PDF_CharNameFromPredefinedCharSet(int encoding, uint8_t charcode);
CPDF_SimpleFont::CPDF_SimpleFont(int fonttype) : CPDF_Font(fonttype)
{
FXSYS_memset8(m_CharBBox, 0xff, sizeof m_CharBBox);
@@ -907,13 +907,13 @@ void CPDF_SimpleFont::GetCharBBox(FX_DWORD charcode, FX_RECT& rect, int level)
rect.bottom = m_CharBBox[charcode].Bottom;
rect.top = m_CharBBox[charcode].Top;
}
-FX_LPCSTR GetAdobeCharName(int iBaseEncoding, const CFX_ByteString* pCharNames, int charcode)
+const FX_CHAR* GetAdobeCharName(int iBaseEncoding, const CFX_ByteString* pCharNames, int charcode)
{
ASSERT(charcode >= 0 && charcode < 256);
if (charcode < 0 || charcode >= 256) {
return NULL;
}
- FX_LPCSTR name = NULL;
+ const FX_CHAR* name = NULL;
if (pCharNames) {
name = pCharNames[charcode];
}
@@ -1081,8 +1081,8 @@ int CPDF_Type1Font::GlyphFromCharCodeExt(FX_DWORD charcode)
}
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
struct _GlyphNameMap {
- FX_LPCSTR m_pStrAdobe;
- FX_LPCSTR m_pStrUnicode;
+ const FX_CHAR* m_pStrAdobe;
+ const FX_CHAR* m_pStrUnicode;
};
static const _GlyphNameMap g_GlyphNameSubsts[] = {
{"ff", "uniFB00"},
@@ -1094,10 +1094,10 @@ static const _GlyphNameMap g_GlyphNameSubsts[] = {
extern "C" {
static int compareString(const void* key, const void* element)
{
- return FXSYS_stricmp((FX_LPCSTR)key, ((_GlyphNameMap*)element)->m_pStrAdobe);
+ return FXSYS_stricmp((const FX_CHAR*)key, ((_GlyphNameMap*)element)->m_pStrAdobe);
}
}
-static FX_LPCSTR _GlyphNameRemap(FX_LPCSTR pStrAdobe)
+static const FX_CHAR* _GlyphNameRemap(const FX_CHAR* pStrAdobe)
{
_GlyphNameMap* found = (_GlyphNameMap*)FXSYS_bsearch(pStrAdobe, g_GlyphNameSubsts,
sizeof g_GlyphNameSubsts / sizeof(_GlyphNameMap), sizeof(_GlyphNameMap),
@@ -1164,7 +1164,7 @@ void CPDF_Type1Font::LoadGlyphMap()
m_BaseEncoding = PDFFONT_ENCODING_STANDARD;
}
for (int charcode = 0; charcode < 256; charcode ++) {
- FX_LPCSTR name = GetAdobeCharName(m_BaseEncoding, m_pCharNames, charcode);
+ const FX_CHAR* name = GetAdobeCharName(m_BaseEncoding, m_pCharNames, charcode);
if (name == NULL) {
continue;
}
@@ -1207,7 +1207,7 @@ void CPDF_Type1Font::LoadGlyphMap()
if (bCoreText) {
if (m_Flags & PDFFONT_SYMBOLIC) {
for (int charcode = 0; charcode < 256; charcode ++) {
- FX_LPCSTR name = GetAdobeCharName(m_BaseEncoding, m_pCharNames, charcode);
+ const FX_CHAR* name = GetAdobeCharName(m_BaseEncoding, m_pCharNames, charcode);
if (name) {
m_Encoding.m_Unicodes[charcode] = PDF_UnicodeFromAdobeName(name);
m_GlyphIndex[charcode] = FXFT_Get_Name_Index(m_Font.m_Face, (char*)name);
@@ -1244,12 +1244,12 @@ void CPDF_Type1Font::LoadGlyphMap()
bUnicode = TRUE;
}
for (int charcode = 0; charcode < 256; charcode ++) {
- FX_LPCSTR name = GetAdobeCharName(m_BaseEncoding, m_pCharNames, charcode);
+ const FX_CHAR* name = GetAdobeCharName(m_BaseEncoding, m_pCharNames, charcode);
if (name == NULL) {
continue;
}
m_Encoding.m_Unicodes[charcode] = PDF_UnicodeFromAdobeName(name);
- FX_LPCSTR pStrUnicode = _GlyphNameRemap(name);
+ const FX_CHAR* pStrUnicode = _GlyphNameRemap(name);
if (pStrUnicode && 0 == FXFT_Get_Name_Index(m_Font.m_Face, (char*)name)) {
name = pStrUnicode;
}
@@ -1289,7 +1289,7 @@ void CPDF_Type1Font::LoadGlyphMap()
#endif
if (m_Flags & PDFFONT_SYMBOLIC) {
for (int charcode = 0; charcode < 256; charcode ++) {
- FX_LPCSTR name = GetAdobeCharName(m_BaseEncoding, m_pCharNames, charcode);
+ const FX_CHAR* name = GetAdobeCharName(m_BaseEncoding, m_pCharNames, charcode);
if (name) {
m_Encoding.m_Unicodes[charcode] = PDF_UnicodeFromAdobeName(name);
m_GlyphIndex[charcode] = FXFT_Get_Name_Index(m_Font.m_Face, (char*)name);
@@ -1322,7 +1322,7 @@ void CPDF_Type1Font::LoadGlyphMap()
bUnicode = TRUE;
}
for (int charcode = 0; charcode < 256; charcode ++) {
- FX_LPCSTR name = GetAdobeCharName(m_BaseEncoding, m_pCharNames, charcode);
+ const FX_CHAR* name = GetAdobeCharName(m_BaseEncoding, m_pCharNames, charcode);
if (name == NULL) {
continue;
}
@@ -1475,7 +1475,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap()
}
FX_BOOL bToUnicode = m_pFontDict->KeyExist(FX_BSTRC("ToUnicode"));
for (int charcode = 0; charcode < 256; charcode ++) {
- FX_LPCSTR name = GetAdobeCharName(baseEncoding, m_pCharNames, charcode);
+ const FX_CHAR* name = GetAdobeCharName(baseEncoding, m_pCharNames, charcode);
if (name == NULL) {
m_GlyphIndex[charcode] = m_pFontFile ? FXFT_Get_Char_Index(m_Font.m_Face, charcode) : -1;
continue;
@@ -1540,7 +1540,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap()
if (bGotOne) {
if (baseEncoding != PDFFONT_ENCODING_BUILTIN) {
for (int charcode = 0; charcode < 256; charcode ++) {
- FX_LPCSTR name = GetAdobeCharName(baseEncoding, m_pCharNames, charcode);
+ const FX_CHAR* name = GetAdobeCharName(baseEncoding, m_pCharNames, charcode);
if (name == NULL) {
continue;
}
@@ -1572,7 +1572,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap()
const FX_WORD* pUnicodes = PDF_UnicodesForPredefinedCharSet(baseEncoding);
for (int charcode = 0; charcode < 256; charcode ++) {
if (m_pFontFile == NULL) {
- FX_LPCSTR name = GetAdobeCharName(0, m_pCharNames, charcode);
+ const FX_CHAR* name = GetAdobeCharName(0, m_pCharNames, charcode);
if (name != NULL) {
m_Encoding.m_Unicodes[charcode] = PDF_UnicodeFromAdobeName(name);
} else if (pUnicodes) {
@@ -1603,14 +1603,16 @@ CPDF_Type3Font::~CPDF_Type3Font()
{
FX_POSITION pos = m_CacheMap.GetStartPosition();
while (pos) {
- FX_LPVOID key, value;
+ void* key;
+ void* value;
m_CacheMap.GetNextAssoc(pos, key, value);
delete (CPDF_Type3Char*)value;
}
m_CacheMap.RemoveAll();
pos = m_DeletedMap.GetStartPosition();
while (pos) {
- FX_LPVOID key, value;
+ void* key;
+ void* value;
m_DeletedMap.GetNextAssoc(pos, key, value);
delete (CPDF_Type3Char*)key;
}
@@ -1671,15 +1673,15 @@ CPDF_Type3Char* CPDF_Type3Font::LoadChar(FX_DWORD charcode, int level)
return NULL;
}
CPDF_Type3Char* pChar = NULL;
- if (m_CacheMap.Lookup((FX_LPVOID)(uintptr_t)charcode, (FX_LPVOID&)pChar)) {
+ if (m_CacheMap.Lookup((void*)(uintptr_t)charcode, (void*&)pChar)) {
if (pChar->m_bPageRequired && m_pPageResources) {
delete pChar;
- m_CacheMap.RemoveKey((FX_LPVOID)(uintptr_t)charcode);
+ m_CacheMap.RemoveKey((void*)(uintptr_t)charcode);
return LoadChar(charcode, level + 1);
}
return pChar;
}
- FX_LPCSTR name = GetAdobeCharName(m_BaseEncoding, m_pCharNames, charcode);
+ const FX_CHAR* name = GetAdobeCharName(m_BaseEncoding, m_pCharNames, charcode);
if (name == NULL) {
return NULL;
}
@@ -1703,7 +1705,7 @@ CPDF_Type3Char* CPDF_Type3Font::LoadChar(FX_DWORD charcode, int level)
rcBBox.right = FXSYS_round(char_rect.right * 1000);
rcBBox.top = FXSYS_round(char_rect.top * 1000);
rcBBox.bottom = FXSYS_round(char_rect.bottom * 1000);
- m_CacheMap.SetAt((FX_LPVOID)(uintptr_t)charcode, pChar);
+ m_CacheMap.SetAt((void*)(uintptr_t)charcode, pChar);
if (pChar->m_pForm->CountObjects() == 0) {
delete pChar->m_pForm;
pChar->m_pForm = NULL;
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font_charset.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font_charset.cpp
index 8e8fccd8a3..8d2f922fb1 100644
--- a/core/src/fpdfapi/fpdf_font/fpdf_font_charset.cpp
+++ b/core/src/fpdfapi/fpdf_font/fpdf_font_charset.cpp
@@ -264,7 +264,7 @@ const FX_WORD ZapfEncoding[256] = {
0x0000, 0x27B1, 0x27B2, 0x27B3, 0x27B4, 0x27B5, 0x27B6, 0x27B7,
0x27B8, 0x27B9, 0x27BA, 0x27BB, 0x27BC, 0x27BD, 0x27BE, 0x0000,
};
-const FX_LPCSTR StandardEncodingNames[224] = {
+const FX_CHAR* const StandardEncodingNames[224] = {
"space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quoteright",
"parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash",
"zero", "one", "two", "three", "four", "five", "six", "seven",
@@ -294,7 +294,7 @@ const FX_LPCSTR StandardEncodingNames[224] = {
NULL, "ae", NULL, NULL, NULL, "dotlessi", NULL, NULL,
"lslash", "oslash", "oe", "germandbls", NULL, NULL, NULL, NULL,
};
-const FX_LPCSTR AdobeWinAnsiEncodingNames[224] = {
+const FX_CHAR* const AdobeWinAnsiEncodingNames[224] = {
"space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quotesingle",
"parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash",
"zero", "one", "two", "three", "four", "five", "six", "seven",
@@ -324,7 +324,7 @@ const FX_LPCSTR AdobeWinAnsiEncodingNames[224] = {
"eth", "ntilde", "ograve", "oacute", "ocircumflex", "otilde", "odieresis", "divide",
"oslash", "ugrave", "uacute", "ucircumflex", "udieresis", "yacute", "thorn", "ydieresis",
};
-const FX_LPCSTR MacRomanEncodingNames[224] = {
+const FX_CHAR* const MacRomanEncodingNames[224] = {
"space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quotesingle",
"parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash",
"zero", "one", "two", "three", "four", "five", "six", "seven",
@@ -354,7 +354,7 @@ const FX_LPCSTR MacRomanEncodingNames[224] = {
"apple", "Ograve", "Uacute", "Ucircumflex", "Ugrave", "dotlessi", "circumflex", "tilde",
"macron", "breve", "dotaccent", "ring", "cedilla", "hungarumlaut", "ogonek", "caron",
};
-const FX_LPCSTR MacExpertEncodingNames[224] = {
+const FX_CHAR* const MacExpertEncodingNames[224] = {
"space", "exclamsmall", "Hungarumlautsmall", "centoldstyle", "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall",
"parenleftsuperior", "parenrightsuperior", "twodotenleader", "onedotenleader", "comma", "hyphen", "period", "fraction",
"zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle",
@@ -384,7 +384,7 @@ const FX_LPCSTR MacExpertEncodingNames[224] = {
NULL, "lsuperior", "Ogoneksmall", "Brevesmall", "Macronsmall", "bsuperior", "nsuperior", "msuperior",
"commasuperior", "periodsuperior", "Dotaccentsmall", "Ringsmall", NULL, NULL, NULL, NULL,
};
-const FX_LPCSTR PDFDocEncodingNames[232] = {
+const FX_CHAR* const PDFDocEncodingNames[232] = {
"breve", "caron", "circumflex", "dotaccent", "hungarumlaut", "ogonek", "ring", "tilde",
"space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quotesingle",
"parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash",
@@ -415,7 +415,7 @@ const FX_LPCSTR PDFDocEncodingNames[232] = {
"eth", "ntilde", "ograve", "oacute", "ocircumflex", "otilde", "odieresis", "divide",
"oslash", "ugrave", "uacute", "ucircumflex", "udieresis", "yacute", "thorn", "ydieresis",
};
-const FX_LPCSTR AdobeSymbolEncodingNames[224] = {
+const FX_CHAR* const AdobeSymbolEncodingNames[224] = {
"space", "exclam", "universal", "numbersign", "existential", "percent", "ampersand", "suchthat",
"parenleft", "parenright", "asteriskmath", "plus", "comma", "minus", "period", "slash",
"zero", "one", "two", "three", "four", "five", "six", "seven",
@@ -445,7 +445,7 @@ const FX_LPCSTR AdobeSymbolEncodingNames[224] = {
NULL, "angleright", "integral", "integraltp", "integralex", "integralbt", "parenrighttp", "parenrightex",
"parenrightbt", "bracketrighttp", "bracketrightex", "bracketrightbt", "bracerighttp", "bracerightmid", "bracerightbt", NULL,
};
-const FX_LPCSTR ZapfEncodingNames[224] = {
+const FX_CHAR* const ZapfEncodingNames[224] = {
"space", "a1", "a2", "a202", "a3", "a4", "a5", "a119",
"a118", "a117", "a11", "a12", "a13", "a14", "a15", "a16",
"a105", "a17", "a18", "a19", "a20", "a21", "a22", "a23",
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
index a6209cb536..bec2c90144 100644
--- a/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
+++ b/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
@@ -13,7 +13,7 @@
extern FX_DWORD FT_CharCodeFromUnicode(int encoding, FX_WCHAR unicode);
extern short TT2PDF(int m, FXFT_Face face);
extern FX_BOOL FT_UseTTCharmap(FXFT_Face face, int platform_id, int encoding_id);
-extern FX_LPCSTR GetAdobeCharName(int iBaseEncoding, const CFX_ByteString* pCharNames, int charcode);
+extern const FX_CHAR* GetAdobeCharName(int iBaseEncoding, const CFX_ByteString* pCharNames, int charcode);
CPDF_CMapManager::CPDF_CMapManager()
{
m_bPrompted = FALSE;
@@ -26,7 +26,7 @@ CPDF_CMapManager::~CPDF_CMapManager()
CPDF_CMap* CPDF_CMapManager::GetPredefinedCMap(const CFX_ByteString& name, FX_BOOL bPromptCJK)
{
CPDF_CMap* pCMap;
- if (m_CMaps.Lookup(name, (FX_LPVOID&)pCMap)) {
+ if (m_CMaps.Lookup(name, (void*&)pCMap)) {
return pCMap;
}
pCMap = LoadPredefinedCMap(name, bPromptCJK);
@@ -39,14 +39,14 @@ CPDF_CMap* CPDF_CMapManager::GetPredefinedCMap(const CFX_ByteString& name, FX_BO
CPDF_CMap* CPDF_CMapManager::LoadPredefinedCMap(const CFX_ByteString& name, FX_BOOL bPromptCJK)
{
CPDF_CMap* pCMap = new CPDF_CMap;
- FX_LPCSTR pname = name;
+ const FX_CHAR* pname = name;
if (*pname == '/') {
pname ++;
}
pCMap->LoadPredefined(this, pname, bPromptCJK);
return pCMap;
}
-static const FX_LPCSTR g_CharsetNames[NUMBER_OF_CIDSETS] = {NULL, "GB1", "CNS1", "Japan1", "Korea1", "UCS" };
+static const FX_CHAR* const g_CharsetNames[NUMBER_OF_CIDSETS] = {NULL, "GB1", "CNS1", "Japan1", "Korea1", "UCS" };
static const int g_CharsetCPs[NUMBER_OF_CIDSETS] = {0, 936, 950, 932, 949, 1200 };
int _CharsetFromOrdering(const CFX_ByteString& Ordering)
{
@@ -66,7 +66,7 @@ void CPDF_CMapManager::DropAll(FX_BOOL bReload)
while (pos) {
CFX_ByteString name;
CPDF_CMap* pCMap;
- m_CMaps.GetNextAssoc(pos, name, (FX_LPVOID&)pCMap);
+ m_CMaps.GetNextAssoc(pos, name, (void*&)pCMap);
if (pCMap == NULL) {
continue;
}
@@ -347,7 +347,7 @@ const CPDF_PredefinedCMap g_PredefinedCMaps[] = {
};
extern void FPDFAPI_FindEmbeddedCMap(const char* name, int charset, int coding, const FXCMAP_CMap*& pMap);
extern FX_WORD FPDFAPI_CIDFromCharCode(const FXCMAP_CMap* pMap, FX_DWORD charcode);
-FX_BOOL CPDF_CMap::LoadPredefined(CPDF_CMapManager* pMgr, FX_LPCSTR pName, FX_BOOL bPromptCJK)
+FX_BOOL CPDF_CMap::LoadPredefined(CPDF_CMapManager* pMgr, const FX_CHAR* pName, FX_BOOL bPromptCJK)
{
m_PredefinedCMap = pName;
if (m_PredefinedCMap == FX_BSTRC("Identity-H") || m_PredefinedCMap == FX_BSTRC("Identity-V")) {
@@ -396,7 +396,7 @@ extern "C" {
return (*(FX_DWORD*)data1) - (*(FX_DWORD*)data2);
}
};
-FX_BOOL CPDF_CMap::LoadEmbedded(FX_LPCBYTE pData, FX_DWORD size)
+FX_BOOL CPDF_CMap::LoadEmbedded(const uint8_t* pData, FX_DWORD size)
{
m_pMapping = FX_Alloc(FX_WORD, 65536);
CPDF_CMapParser parser;
@@ -462,7 +462,7 @@ FX_WORD CPDF_CMap::CIDFromCharCode(FX_DWORD charcode) const
}
return (FX_WORD)CID;
}
-static int _CheckCodeRange(FX_LPBYTE codes, int size, _CMap_CodeRange* pRanges, int nRanges)
+static int _CheckCodeRange(uint8_t* codes, int size, _CMap_CodeRange* pRanges, int nRanges)
{
int iSeg = nRanges - 1;
while (iSeg >= 0) {
@@ -491,26 +491,26 @@ static int _CheckCodeRange(FX_LPBYTE codes, int size, _CMap_CodeRange* pRanges,
}
return 0;
}
-FX_DWORD CPDF_CMap::GetNextChar(FX_LPCSTR pString, int nStrLen, int& offset) const
+FX_DWORD CPDF_CMap::GetNextChar(const FX_CHAR* pString, int nStrLen, int& offset) const
{
switch (m_CodingScheme) {
case OneByte:
- return ((FX_LPBYTE)pString)[offset++];
+ return ((uint8_t*)pString)[offset++];
case TwoBytes:
offset += 2;
- return ((FX_LPBYTE)pString)[offset - 2] * 256 + ((FX_LPBYTE)pString)[offset - 1];
+ return ((uint8_t*)pString)[offset - 2] * 256 + ((uint8_t*)pString)[offset - 1];
case MixedTwoBytes: {
- uint8_t byte1 = ((FX_LPBYTE)pString)[offset++];
+ uint8_t byte1 = ((uint8_t*)pString)[offset++];
if (!m_pLeadingBytes[byte1]) {
return byte1;
}
- uint8_t byte2 = ((FX_LPBYTE)pString)[offset++];
+ uint8_t byte2 = ((uint8_t*)pString)[offset++];
return byte1 * 256 + byte2;
}
case MixedFourBytes: {
uint8_t codes[4];
int char_size = 1;
- codes[0] = ((FX_LPBYTE)pString)[offset++];
+ codes[0] = ((uint8_t*)pString)[offset++];
_CMap_CodeRange* pRanges = (_CMap_CodeRange*)m_pLeadingBytes;
while (1) {
int ret = _CheckCodeRange(codes, char_size, pRanges, m_nCodeRanges);
@@ -527,7 +527,7 @@ FX_DWORD CPDF_CMap::GetNextChar(FX_LPCSTR pString, int nStrLen, int& offset) con
if (char_size == 4 || offset == nStrLen) {
return 0;
}
- codes[char_size ++] = ((FX_LPBYTE)pString)[offset++];
+ codes[char_size ++] = ((uint8_t*)pString)[offset++];
}
break;
}
@@ -556,7 +556,7 @@ int CPDF_CMap::GetCharSize(FX_DWORD charcode) const
}
return 1;
}
-int CPDF_CMap::CountChar(FX_LPCSTR pString, int size) const
+int CPDF_CMap::CountChar(const FX_CHAR* pString, int size) const
{
switch (m_CodingScheme) {
case OneByte:
@@ -567,7 +567,7 @@ int CPDF_CMap::CountChar(FX_LPCSTR pString, int size) const
int count = 0;
for (int i = 0; i < size; i ++) {
count ++;
- if (m_pLeadingBytes[((FX_LPBYTE)pString)[i]]) {
+ if (m_pLeadingBytes[((uint8_t*)pString)[i]]) {
i ++;
}
}
@@ -619,7 +619,7 @@ int _GetCharSize(FX_DWORD charcode, _CMap_CodeRange* pRanges, int iRangesSize)
}
return 1;
}
-int CPDF_CMap::AppendChar(FX_LPSTR str, FX_DWORD charcode) const
+int CPDF_CMap::AppendChar(FX_CHAR* str, FX_DWORD charcode) const
{
switch (m_CodingScheme) {
case OneByte:
@@ -793,7 +793,7 @@ FX_WCHAR CPDF_CIDFont::_UnicodeFromCharCode(FX_DWORD charcode) const
charcode = (charcode % 256) * 256 + (charcode / 256);
charsize = 2;
}
- int ret = FXSYS_MultiByteToWideChar(g_CharsetCPs[m_pCMap->m_Coding], 0, (FX_LPCSTR)&charcode, charsize, &unicode, 1);
+ int ret = FXSYS_MultiByteToWideChar(g_CharsetCPs[m_pCMap->m_Coding], 0, (const FX_CHAR*)&charcode, charsize, &unicode, 1);
if (ret != 1) {
return 0;
}
@@ -1056,7 +1056,7 @@ void CPDF_CIDFont::GetCharBBox(FX_DWORD charcode, FX_RECT& rect, int level)
}
if (m_pFontFile == NULL && m_Charset == CIDSET_JAPAN1) {
FX_WORD CID = CIDFromCharCode(charcode);
- FX_LPCBYTE pTransform = GetCIDTransform(CID);
+ const uint8_t* pTransform = GetCIDTransform(CID);
if (pTransform && !bVert) {
CFX_AffineMatrix matrix(_CIDTransformToFloat(pTransform[0]), _CIDTransformToFloat(pTransform[1]),
_CIDTransformToFloat(pTransform[2]), _CIDTransformToFloat(pTransform[3]),
@@ -1222,7 +1222,7 @@ int CPDF_CIDFont::GlyphFromCharCode(FX_DWORD charcode, FX_BOOL *pVertGlyph)
} else if (bMacRoman) {
iBaseEncoding = PDFFONT_ENCODING_MACROMAN;
}
- FX_LPCSTR name = GetAdobeCharName(iBaseEncoding, NULL, charcode);
+ const FX_CHAR* name = GetAdobeCharName(iBaseEncoding, NULL, charcode);
if (name == NULL) {
return charcode == 0 ? -1 : (int)charcode;
}
@@ -1314,10 +1314,10 @@ int CPDF_CIDFont::GlyphFromCharCode(FX_DWORD charcode, FX_BOOL *pVertGlyph)
if (byte_pos + 2 > m_pCIDToGIDMap->GetSize()) {
return -1;
}
- FX_LPCBYTE pdata = m_pCIDToGIDMap->GetData() + byte_pos;
+ const uint8_t* pdata = m_pCIDToGIDMap->GetData() + byte_pos;
return pdata[0] * 256 + pdata[1];
}
-FX_DWORD CPDF_CIDFont::GetNextChar(FX_LPCSTR pString, int nStrLen, int& offset) const
+FX_DWORD CPDF_CIDFont::GetNextChar(const FX_CHAR* pString, int nStrLen, int& offset) const
{
return m_pCMap->GetNextChar(pString, nStrLen, offset);
}
@@ -1325,11 +1325,11 @@ int CPDF_CIDFont::GetCharSize(FX_DWORD charcode) const
{
return m_pCMap->GetCharSize(charcode);
}
-int CPDF_CIDFont::CountChar(FX_LPCSTR pString, int size) const
+int CPDF_CIDFont::CountChar(const FX_CHAR* pString, int size) const
{
return m_pCMap->CountChar(pString, size);
}
-int CPDF_CIDFont::AppendChar(FX_LPSTR str, FX_DWORD charcode) const
+int CPDF_CIDFont::AppendChar(FX_CHAR* str, FX_DWORD charcode) const
{
return m_pCMap->AppendChar(str, charcode);
}
@@ -1579,7 +1579,7 @@ Japan1_VertCIDs[] = {
{8818, 0, 129, 127, 0, 19, 114},
{8819, 0, 129, 127, 0, 218, 108},
};
-FX_LPCBYTE CPDF_CIDFont::GetCIDTransform(FX_WORD CID) const
+const uint8_t* CPDF_CIDFont::GetCIDTransform(FX_WORD CID) const
{
if (m_Charset != CIDSET_JAPAN1 || m_pFontFile != NULL) {
return NULL;
diff --git a/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp b/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp
index ab15c47cb3..b6b2f57c02 100644
--- a/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp
+++ b/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp
@@ -48,7 +48,7 @@ void CFX_GlyphMap::SetAt(int key, int value)
}
FX_BOOL CFX_GlyphMap::Lookup(int key, int &value)
{
- FX_LPVOID pResult = FXSYS_bsearch(&key, m_Buffer.GetBuffer(), m_Buffer.GetSize() / sizeof(_IntPair),
+ void* pResult = FXSYS_bsearch(&key, m_Buffer.GetBuffer(), m_Buffer.GetSize() / sizeof(_IntPair),
sizeof(_IntPair), _CompareInt);
if (pResult == NULL) {
return FALSE;
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
index 82f90d17a6..046cebeb98 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
@@ -242,7 +242,7 @@ void CPDF_TextObject::SetSegments(const CFX_ByteString* pStrs, FX_FLOAT* pKernin
m_pCharPos = FX_Alloc(FX_FLOAT, m_nChars - 1);
int index = 0;
for (int i = 0; i < nsegs; i ++) {
- FX_LPCSTR segment = pStrs[i];
+ const FX_CHAR* segment = pStrs[i];
int offset = 0, len = pStrs[i].GetLength();
while (offset < len) {
m_pCharCodes[index++] = pFont->GetNextChar(segment, len, offset);
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
index ea61078209..1b989be040 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
@@ -125,7 +125,7 @@ FX_BOOL CPDF_DeviceCS::v_SetCMYK(FX_FLOAT* pBuf, FX_FLOAT c, FX_FLOAT m, FX_FLOA
}
return FALSE;
}
-static void ReverseRGB(FX_LPBYTE pDestBuf, FX_LPCBYTE pSrcBuf, int pixels)
+static void ReverseRGB(uint8_t* pDestBuf, const uint8_t* pSrcBuf, int pixels)
{
if (pDestBuf == pSrcBuf)
for (int i = 0; i < pixels; i ++) {
@@ -142,7 +142,7 @@ static void ReverseRGB(FX_LPBYTE pDestBuf, FX_LPCBYTE pSrcBuf, int pixels)
pSrcBuf += 3;
}
}
-void CPDF_DeviceCS::TranslateImageLine(FX_LPBYTE pDestBuf, FX_LPCBYTE pSrcBuf, int pixels, int image_width, int image_height, FX_BOOL bTransMask) const
+void CPDF_DeviceCS::TranslateImageLine(uint8_t* pDestBuf, const uint8_t* pSrcBuf, int pixels, int image_width, int image_height, FX_BOOL bTransMask) const
{
if (bTransMask && m_Family == PDFCS_DEVICECMYK) {
for (int i = 0; i < pixels; i ++) {
@@ -267,7 +267,7 @@ public:
CPDF_CalGray();
virtual FX_BOOL v_Load(CPDF_Document* pDoc, CPDF_Array* pArray);
virtual FX_BOOL GetRGB(FX_FLOAT* pBuf, FX_FLOAT& R, FX_FLOAT& G, FX_FLOAT& B) const;
- virtual void TranslateImageLine(FX_LPBYTE pDestBuf, FX_LPCBYTE pSrcBuf, int pixels, int image_width, int image_height, FX_BOOL bTransMask = FALSE) const;
+ virtual void TranslateImageLine(uint8_t* pDestBuf, const uint8_t* pSrcBuf, int pixels, int image_width, int image_height, FX_BOOL bTransMask = FALSE) const;
FX_BOOL SetRGB(FX_FLOAT* pBuf, FX_FLOAT R, FX_FLOAT G, FX_FLOAT B) const;
FX_FLOAT m_WhitePoint[3];
FX_FLOAT m_BlackPoint[3];
@@ -310,7 +310,7 @@ FX_BOOL CPDF_CalGray::SetRGB(FX_FLOAT* pBuf, FX_FLOAT R, FX_FLOAT G, FX_FLOAT B)
return FALSE;
}
}
-void CPDF_CalGray::TranslateImageLine(FX_LPBYTE pDestBuf, FX_LPCBYTE pSrcBuf, int pixels, int image_width, int image_height, FX_BOOL bTransMask) const
+void CPDF_CalGray::TranslateImageLine(uint8_t* pDestBuf, const uint8_t* pSrcBuf, int pixels, int image_width, int image_height, FX_BOOL bTransMask) const
{
for (int i = 0; i < pixels; i ++) {
*pDestBuf ++ = pSrcBuf[i];
@@ -324,7 +324,7 @@ public:
CPDF_CalRGB();
virtual FX_BOOL v_Load(CPDF_Document* pDoc, CPDF_Array* pArray);
virtual FX_BOOL GetRGB(FX_FLOAT* pBuf, FX_FLOAT& R, FX_FLOAT& G, FX_FLOAT& B) const;
- virtual void TranslateImageLine(FX_LPBYTE pDestBuf, FX_LPCBYTE pSrcBuf, int pixels, int image_width, int image_height, FX_BOOL bTransMask = FALSE) const;
+ virtual void TranslateImageLine(uint8_t* pDestBuf, const uint8_t* pSrcBuf, int pixels, int image_width, int image_height, FX_BOOL bTransMask = FALSE) const;
FX_BOOL SetRGB(FX_FLOAT* pBuf, FX_FLOAT R, FX_FLOAT G, FX_FLOAT B) const;
FX_FLOAT m_WhitePoint[3];
FX_FLOAT m_BlackPoint[3];
@@ -399,7 +399,7 @@ FX_BOOL CPDF_CalRGB::SetRGB(FX_FLOAT* pBuf, FX_FLOAT R, FX_FLOAT G, FX_FLOAT B)
pBuf[2] = B;
return TRUE;
}
-void CPDF_CalRGB::TranslateImageLine(FX_LPBYTE pDestBuf, FX_LPCBYTE pSrcBuf, int pixels, int image_width, int image_height, FX_BOOL bTransMask) const
+void CPDF_CalRGB::TranslateImageLine(uint8_t* pDestBuf, const uint8_t* pSrcBuf, int pixels, int image_width, int image_height, FX_BOOL bTransMask) const
{
if (bTransMask) {
FX_FLOAT Cal[3];
@@ -430,7 +430,7 @@ public:
virtual void GetDefaultValue(int iComponent, FX_FLOAT& value, FX_FLOAT& min, FX_FLOAT& max) const;
virtual FX_BOOL GetRGB(FX_FLOAT* pBuf, FX_FLOAT& R, FX_FLOAT& G, FX_FLOAT& B) const;
FX_BOOL SetRGB(FX_FLOAT* pBuf, FX_FLOAT R, FX_FLOAT G, FX_FLOAT B) const;
- virtual void TranslateImageLine(FX_LPBYTE pDestBuf, FX_LPCBYTE pSrcBuf, int pixels, int image_width, int image_height, FX_BOOL bTransMask = FALSE) const;
+ virtual void TranslateImageLine(uint8_t* pDestBuf, const uint8_t* pSrcBuf, int pixels, int image_width, int image_height, FX_BOOL bTransMask = FALSE) const;
FX_FLOAT m_WhitePoint[3];
FX_FLOAT m_BlackPoint[3];
FX_FLOAT m_Ranges[4];
@@ -505,7 +505,7 @@ FX_BOOL CPDF_LabCS::SetRGB(FX_FLOAT* pBuf, FX_FLOAT R, FX_FLOAT G, FX_FLOAT B) c
{
return FALSE;
}
-void CPDF_LabCS::TranslateImageLine(FX_LPBYTE pDestBuf, FX_LPCBYTE pSrcBuf, int pixels, int image_width, int image_height, FX_BOOL bTransMask) const
+void CPDF_LabCS::TranslateImageLine(uint8_t* pDestBuf, const uint8_t* pSrcBuf, int pixels, int image_width, int image_height, FX_BOOL bTransMask) const
{
for (int i = 0; i < pixels; i ++) {
FX_FLOAT lab[3];
@@ -521,7 +521,7 @@ void CPDF_LabCS::TranslateImageLine(FX_LPBYTE pDestBuf, FX_LPCBYTE pSrcBuf, int
pSrcBuf += 3;
}
}
-CPDF_IccProfile::CPDF_IccProfile(FX_LPCBYTE pData, FX_DWORD dwSize):
+CPDF_IccProfile::CPDF_IccProfile(const uint8_t* pData, FX_DWORD dwSize):
m_bsRGB(FALSE),
m_pTransform(NULL),
m_nSrcComponents(0)
@@ -555,11 +555,11 @@ public:
FX_BOOL v_GetCMYK(FX_FLOAT* pBuf, FX_FLOAT& c, FX_FLOAT& m, FX_FLOAT& y, FX_FLOAT& k) const;
FX_BOOL SetRGB(FX_FLOAT* pBuf, FX_FLOAT R, FX_FLOAT G, FX_FLOAT B) const;
virtual void EnableStdConversion(FX_BOOL bEnabled);
- virtual void TranslateImageLine(FX_LPBYTE pDestBuf, FX_LPCBYTE pSrcBuf, int pixels, int image_width, int image_height, FX_BOOL bTransMask = FALSE) const;
+ virtual void TranslateImageLine(uint8_t* pDestBuf, const uint8_t* pSrcBuf, int pixels, int image_width, int image_height, FX_BOOL bTransMask = FALSE) const;
FX_FLOAT* m_pRanges;
CPDF_IccProfile* m_pProfile;
CPDF_ColorSpace* m_pAlterCS;
- FX_LPBYTE m_pCache;
+ uint8_t* m_pCache;
FX_BOOL m_bOwn;
};
CPDF_ICCBasedCS::CPDF_ICCBasedCS()
@@ -702,7 +702,7 @@ void CPDF_ICCBasedCS::EnableStdConversion(FX_BOOL bEnabled)
m_pAlterCS->EnableStdConversion(bEnabled);
}
}
-void CPDF_ICCBasedCS::TranslateImageLine(FX_LPBYTE pDestBuf, FX_LPCBYTE pSrcBuf, int pixels, int image_width, int image_height, FX_BOOL bTransMask) const
+void CPDF_ICCBasedCS::TranslateImageLine(uint8_t* pDestBuf, const uint8_t* pSrcBuf, int pixels, int image_width, int image_height, FX_BOOL bTransMask) const
{
if (m_pProfile->m_bsRGB) {
ReverseRGB(pDestBuf, pSrcBuf, pixels);
@@ -716,8 +716,8 @@ void CPDF_ICCBasedCS::TranslateImageLine(FX_LPBYTE pDestBuf, FX_LPCBYTE pSrcBuf,
} else {
if (m_pCache == NULL) {
((CPDF_ICCBasedCS*)this)->m_pCache = FX_Alloc2D(uint8_t, nMaxColors, 3);
- FX_LPBYTE temp_src = FX_Alloc2D(uint8_t, nMaxColors, m_nComponents);
- FX_LPBYTE pSrc = temp_src;
+ uint8_t* temp_src = FX_Alloc2D(uint8_t, nMaxColors, m_nComponents);
+ uint8_t* pSrc = temp_src;
for (int i = 0; i < nMaxColors; i ++) {
FX_DWORD color = i;
FX_DWORD order = nMaxColors / 52;
@@ -839,7 +839,7 @@ FX_BOOL CPDF_IndexedCS::GetRGB(FX_FLOAT* pBuf, FX_FLOAT& R, FX_FLOAT& G, FX_FLOA
}
CFX_FixedBufGrow<FX_FLOAT, 16> Comps(m_nBaseComponents);
FX_FLOAT* comps = Comps;
- FX_LPCBYTE pTable = m_Table;
+ const uint8_t* pTable = m_Table;
for (int i = 0; i < m_nBaseComponents; i ++) {
comps[i] = m_pCompMinMax[i * 2] + m_pCompMinMax[i * 2 + 1] * pTable[index * m_nBaseComponents + i] / 255;
}
@@ -1257,7 +1257,7 @@ int CPDF_ColorSpace::GetMaxIndex() const
CPDF_IndexedCS* pCS = (CPDF_IndexedCS*)this;
return pCS->m_MaxIndex;
}
-void CPDF_ColorSpace::TranslateImageLine(FX_LPBYTE dest_buf, FX_LPCBYTE src_buf, int pixels, int image_width, int image_height, FX_BOOL bTransMask) const
+void CPDF_ColorSpace::TranslateImageLine(uint8_t* dest_buf, const uint8_t* src_buf, int pixels, int image_width, int image_height, FX_BOOL bTransMask) const
{
CFX_FixedBufGrow<FX_FLOAT, 16> srcbuf(m_nComponents);
FX_FLOAT* src = srcbuf;
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp
index dadf6bf9cb..2cfb02869c 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp
@@ -64,10 +64,10 @@ CPDF_PSProc::~CPDF_PSProc()
{
int size = m_Operators.GetSize();
for (int i = 0; i < size; i ++) {
- if (m_Operators[i] == (FX_LPVOID)PSOP_PROC) {
+ if (m_Operators[i] == (void*)PSOP_PROC) {
delete (CPDF_PSProc*)m_Operators[i + 1];
i ++;
- } else if (m_Operators[i] == (FX_LPVOID)PSOP_CONST) {
+ } else if (m_Operators[i] == (void*)PSOP_CONST) {
FX_Free((FX_FLOAT*)m_Operators[i + 1]);
i ++;
}
@@ -84,15 +84,15 @@ FX_BOOL CPDF_PSProc::Execute(CPDF_PSEngine* pEngine)
pEngine->Push(*(FX_FLOAT*)m_Operators[i + 1]);
i ++;
} else if (op == PSOP_IF) {
- if (i < 2 || m_Operators[i - 2] != (FX_LPVOID)PSOP_PROC) {
+ if (i < 2 || m_Operators[i - 2] != (void*)PSOP_PROC) {
return FALSE;
}
if ((int)pEngine->Pop()) {
((CPDF_PSProc*)m_Operators[i - 1])->Execute(pEngine);
}
} else if (op == PSOP_IFELSE) {
- if (i < 4 || m_Operators[i - 2] != (FX_LPVOID)PSOP_PROC ||
- m_Operators[i - 4] != (FX_LPVOID)PSOP_PROC) {
+ if (i < 4 || m_Operators[i - 2] != (void*)PSOP_PROC ||
+ m_Operators[i - 4] != (void*)PSOP_PROC) {
return FALSE;
}
if ((int)pEngine->Pop()) {
@@ -147,7 +147,7 @@ const struct _PDF_PSOpName {
};
FX_BOOL CPDF_PSEngine::Parse(const FX_CHAR* string, int size)
{
- CPDF_SimpleParser parser((FX_LPBYTE)string, size);
+ CPDF_SimpleParser parser((uint8_t*)string, size);
CFX_ByteStringC word = parser.GetWord();
if (word != FX_BSTRC("{")) {
return FALSE;
@@ -166,7 +166,7 @@ FX_BOOL CPDF_PSProc::Parse(CPDF_SimpleParser& parser)
}
if (word == FX_BSTRC("{")) {
CPDF_PSProc* pProc = new CPDF_PSProc;
- m_Operators.Add((FX_LPVOID)PSOP_PROC);
+ m_Operators.Add((void*)PSOP_PROC);
m_Operators.Add(pProc);
if (!pProc->Parse(parser)) {
return FALSE;
@@ -175,7 +175,7 @@ FX_BOOL CPDF_PSProc::Parse(CPDF_SimpleParser& parser)
int i = 0;
while (_PDF_PSOpNames[i].name) {
if (word == CFX_ByteStringC(_PDF_PSOpNames[i].name)) {
- m_Operators.Add((FX_LPVOID)_PDF_PSOpNames[i].op);
+ m_Operators.Add((void*)_PDF_PSOpNames[i].op);
break;
}
i ++;
@@ -183,7 +183,7 @@ FX_BOOL CPDF_PSProc::Parse(CPDF_SimpleParser& parser)
if (_PDF_PSOpNames[i].name == NULL) {
FX_FLOAT* pd = FX_Alloc(FX_FLOAT, 1);
*pd = FX_atof(word);
- m_Operators.Add((FX_LPVOID)PSOP_CONST);
+ m_Operators.Add((void*)PSOP_CONST);
m_Operators.Add(pd);
}
}
@@ -424,7 +424,7 @@ static FX_FLOAT PDF_Interpolate(FX_FLOAT x, FX_FLOAT xmin, FX_FLOAT xmax, FX_FLO
{
return ((x - xmin) * (ymax - ymin) / (xmax - xmin)) + ymin;
}
-static FX_DWORD _GetBits32(FX_LPCBYTE pData, int bitpos, int nbits)
+static FX_DWORD _GetBits32(const uint8_t* pData, int bitpos, int nbits)
{
int result = 0;
for (int i = 0; i < nbits; i ++)
@@ -561,7 +561,7 @@ FX_BOOL CPDF_SampledFunc::v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const
if (!bitpos.IsValid()) {
return FALSE;
}
- FX_LPCBYTE pSampleData = m_pSampleStream->GetData();
+ const uint8_t* pSampleData = m_pSampleStream->GetData();
if (pSampleData == NULL) {
return FALSE;
}
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
index bb4b9dee23..3ce4baf20c 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
@@ -349,7 +349,7 @@ FX_FLOAT CPDF_TextState::GetShearAngle() const
CPDF_GeneralStateData::CPDF_GeneralStateData()
{
FXSYS_memset32(this, 0, sizeof(CPDF_GeneralStateData));
- FXSYS_strcpy((FX_LPSTR)m_BlendMode, "Normal");
+ FXSYS_strcpy((FX_CHAR*)m_BlendMode, "Normal");
m_StrokeAlpha = 1.0f;
m_FillAlpha = 1.0f;
m_Flatness = 1.0f;
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index a92e9e783d..d898feecf4 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
@@ -113,7 +113,7 @@ int CPDF_StreamContentParser::GetNextParamPos()
m_ParamCount ++;
return index;
}
-void CPDF_StreamContentParser::AddNameParam(FX_LPCSTR name, int len)
+void CPDF_StreamContentParser::AddNameParam(const FX_CHAR* name, int len)
{
int index = GetNextParamPos();
if (len > 32) {
@@ -131,7 +131,7 @@ void CPDF_StreamContentParser::AddNameParam(FX_LPCSTR name, int len)
}
}
}
-void CPDF_StreamContentParser::AddNumberParam(FX_LPCSTR str, int len)
+void CPDF_StreamContentParser::AddNumberParam(const FX_CHAR* str, int len)
{
int index = GetNextParamPos();
m_ParamBuf1[index].m_Type = PDFOBJ_NUMBER;
@@ -321,7 +321,7 @@ const struct _OpCode {
{FXBSTR_ID('w', 0, 0, 0), &CPDF_StreamContentParser::Handle_SetLineWidth},
{FXBSTR_ID('y', 0, 0, 0), &CPDF_StreamContentParser::Handle_CurveTo_13},
};
-FX_BOOL CPDF_StreamContentParser::OnOperator(FX_LPCSTR op)
+FX_BOOL CPDF_StreamContentParser::OnOperator(const FX_CHAR* op)
{
int i = 0;
FX_DWORD opid = 0;
@@ -410,7 +410,7 @@ void CPDF_StreamContentParser::Handle_BeginMarkedContent()
m_CurContentMark.GetModify()->AddMark(tag, NULL, FALSE);
}
struct _FX_BSTR {
- FX_LPCSTR m_Ptr;
+ const FX_CHAR* m_Ptr;
int m_Size;
};
#define _FX_BSTRC(str) {str, sizeof(str)-1}
@@ -1550,7 +1550,7 @@ CFX_ByteString _FPDF_ByteStringFromHex(CFX_BinaryBuf& src_buf)
CFX_ByteTextBuf buf;
FX_BOOL bFirst = TRUE;
int code = 0;
- FX_LPCBYTE str = src_buf.GetBuffer();
+ const uint8_t* str = src_buf.GetBuffer();
FX_DWORD size = src_buf.GetSize();
for (FX_DWORD i = 0; i < size; i ++) {
uint8_t ch = str[i];
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
index bc2138e19e..ec2b69f70b 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
@@ -9,7 +9,7 @@
#include "../../../include/fxcodec/fx_codec.h"
#include "pageint.h"
#include <limits.h>
-extern const FX_LPCSTR _PDF_OpCharType =
+const FX_CHAR* const _PDF_OpCharType =
"IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII"
"IIVIIIIVIIVIIIIIVVIIIIIIIIIIIIII"
"IIVVVVVVIVVVVVVIVVVVVIIVVIIIIIII"
@@ -18,7 +18,7 @@ extern const FX_LPCSTR _PDF_OpCharType =
"IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII"
"IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII"
"IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII";
-FX_BOOL _PDF_HasInvalidOpChar(FX_LPCSTR op)
+FX_BOOL _PDF_HasInvalidOpChar(const FX_CHAR* op)
{
if(!op) {
return FALSE;
@@ -41,7 +41,7 @@ class CPDF_StreamParserAutoClearer {
private:
CPDF_StreamParser** scoped_variable_;
};
-FX_DWORD CPDF_StreamContentParser::Parse(FX_LPCBYTE pData, FX_DWORD dwSize, FX_DWORD max_cost)
+FX_DWORD CPDF_StreamContentParser::Parse(const uint8_t* pData, FX_DWORD dwSize, FX_DWORD max_cost)
{
if (m_Level > _FPDF_MAX_FORM_LEVEL_) {
return dwSize;
@@ -71,7 +71,7 @@ FX_DWORD CPDF_StreamContentParser::Parse(FX_LPCBYTE pData, FX_DWORD dwSize, FX_D
AddNumberParam((char*)syntax.GetWordBuf(), syntax.GetWordSize());
break;
case CPDF_StreamParser::Name:
- AddNameParam((FX_LPCSTR)syntax.GetWordBuf() + 1, syntax.GetWordSize() - 1);
+ AddNameParam((const FX_CHAR*)syntax.GetWordBuf() + 1, syntax.GetWordSize() - 1);
break;
default:
AddObjectParam(syntax.GetObject());
@@ -97,7 +97,7 @@ void CPDF_StreamContentParser::Handle_BeginImage()
if (type != CPDF_StreamParser::Name) {
break;
}
- CFX_ByteString key((FX_LPCSTR)m_pSyntax->GetWordBuf() + 1, m_pSyntax->GetWordSize() - 1);
+ CFX_ByteString key((const FX_CHAR*)m_pSyntax->GetWordBuf() + 1, m_pSyntax->GetWordSize() - 1);
CPDF_Object* pObj = m_pSyntax->ReadNextObject();
if (!key.IsEmpty()) {
pDict->SetAt(key, pObj, m_pDocument);
@@ -248,7 +248,7 @@ CPDF_StreamParser::~CPDF_StreamParser()
m_pLastObj->Release();
}
}
-FX_DWORD _DecodeAllScanlines(ICodec_ScanlineDecoder* pDecoder, FX_LPBYTE& dest_buf, FX_DWORD& dest_size)
+FX_DWORD _DecodeAllScanlines(ICodec_ScanlineDecoder* pDecoder, uint8_t*& dest_buf, FX_DWORD& dest_size)
{
if (pDecoder == NULL) {
return (FX_DWORD) - 1;
@@ -265,7 +265,7 @@ FX_DWORD _DecodeAllScanlines(ICodec_ScanlineDecoder* pDecoder, FX_LPBYTE& dest_b
dest_buf = FX_Alloc2D(uint8_t, pitch, height);
dest_size = pitch * height; // Safe since checked alloc returned.
for (int row = 0; row < height; row ++) {
- FX_LPBYTE pLine = pDecoder->GetScanline(row);
+ uint8_t* pLine = pDecoder->GetScanline(row);
if (pLine == NULL) {
break;
}
@@ -275,15 +275,15 @@ FX_DWORD _DecodeAllScanlines(ICodec_ScanlineDecoder* pDecoder, FX_LPBYTE& dest_b
delete pDecoder;
return srcoff;
}
-ICodec_ScanlineDecoder* FPDFAPI_CreateFaxDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height,
+ICodec_ScanlineDecoder* FPDFAPI_CreateFaxDecoder(const uint8_t* src_buf, FX_DWORD src_size, int width, int height,
const CPDF_Dictionary* pParams);
-FX_DWORD _A85Decode(const uint8_t* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size);
-FX_DWORD _HexDecode(const uint8_t* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size);
+FX_DWORD _A85Decode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_buf, FX_DWORD& dest_size);
+FX_DWORD _HexDecode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_buf, FX_DWORD& dest_size);
FX_DWORD FPDFAPI_FlateOrLZWDecode(FX_BOOL bLZW, const uint8_t* src_buf, FX_DWORD src_size, CPDF_Dictionary* pParams,
- FX_DWORD estimated_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size);
+ FX_DWORD estimated_size, uint8_t*& dest_buf, FX_DWORD& dest_size);
FX_DWORD PDF_DecodeInlineStream(const uint8_t* src_buf, FX_DWORD limit,
int width, int height, CFX_ByteString& decoder,
- CPDF_Dictionary* pParam, FX_LPBYTE& dest_buf, FX_DWORD& dest_size)
+ CPDF_Dictionary* pParam, uint8_t*& dest_buf, FX_DWORD& dest_size)
{
if (decoder == FX_BSTRC("CCITTFaxDecode") || decoder == FX_BSTRC("CCF")) {
ICodec_ScanlineDecoder* pDecoder = FPDFAPI_CreateFaxDecoder(src_buf, limit, width, height, pParam);
@@ -367,7 +367,7 @@ CPDF_Stream* CPDF_StreamParser::ReadInlineStream(CPDF_Document* pDoc, CPDF_Dicti
return NULL;
}
OrigSize *= height;
- FX_LPBYTE pData = NULL;
+ uint8_t* pData = NULL;
FX_DWORD dwStreamSize;
if (Decoder.IsEmpty()) {
if (OrigSize > m_Size - m_Pos) {
@@ -1026,7 +1026,7 @@ void CPDF_ContentParser::Start(CPDF_Form* pForm, CPDF_AllStates* pGraphicStates,
} else {
m_pSingleStream->LoadAllData(pForm->m_pFormStream, FALSE);
}
- m_pData = (FX_LPBYTE)m_pSingleStream->GetData();
+ m_pData = (uint8_t*)m_pSingleStream->GetData();
m_Size = m_pSingleStream->GetSize();
m_Status = ToBeContinued;
m_InternalStage = PAGEPARSE_STAGE_PARSE;
@@ -1060,7 +1060,7 @@ void CPDF_ContentParser::Continue(IFX_Pause* pPause)
FX_Free(m_pStreamArray);
m_pStreamArray = NULL;
} else {
- m_pData = (FX_LPBYTE)m_pSingleStream->GetData();
+ m_pData = (uint8_t*)m_pSingleStream->GetData();
m_Size = m_pSingleStream->GetSize();
}
m_InternalStage = PAGEPARSE_STAGE_PARSE;
diff --git a/core/src/fpdfapi/fpdf_page/pageint.h b/core/src/fpdfapi/fpdf_page/pageint.h
index 1f5428d56f..9ff1c4cb11 100644
--- a/core/src/fpdfapi/fpdf_page/pageint.h
+++ b/core/src/fpdfapi/fpdf_page/pageint.h
@@ -23,7 +23,7 @@ public:
typedef enum { EndOfData, Number, Keyword, Name, Others } SyntaxType;
SyntaxType ParseNextElement();
- FX_LPBYTE GetWordBuf()
+ uint8_t* GetWordBuf()
{
return m_WordBuffer;
}
@@ -142,9 +142,9 @@ public:
_ContentParam m_ParamBuf1[PARAM_BUF_SIZE];
FX_DWORD m_ParamStartPos;
FX_DWORD m_ParamCount;
- void AddNumberParam(FX_LPCSTR str, int len);
+ void AddNumberParam(const FX_CHAR* str, int len);
void AddObjectParam(CPDF_Object* pObj);
- void AddNameParam(FX_LPCSTR name, int size);
+ void AddNameParam(const FX_CHAR* name, int size);
int GetNextParamPos();
void ClearAllParams();
CPDF_Object* GetObject(FX_DWORD index);
@@ -155,7 +155,7 @@ public:
{
return (int32_t)(GetNumber(index));
}
- FX_BOOL OnOperator(FX_LPCSTR op);
+ FX_BOOL OnOperator(const FX_CHAR* op);
void BigCaseCaller(int index);
FX_BOOL m_bAbort;
CPDF_StreamParser* m_pSyntax;
@@ -173,7 +173,7 @@ public:
void ConvertUserSpace(FX_FLOAT& x, FX_FLOAT& y);
void ConvertTextSpace(FX_FLOAT& x, FX_FLOAT& y);
void OnChangeTextMatrix();
- FX_DWORD Parse(FX_LPCBYTE pData, FX_DWORD dwSize, FX_DWORD max_cost);
+ FX_DWORD Parse(const uint8_t* pData, FX_DWORD dwSize, FX_DWORD max_cost);
void ParsePathObject();
int m_CompatCount;
FX_PATHPOINT* m_pPathPoints;
@@ -307,7 +307,7 @@ protected:
CPDF_StreamAcc* m_pSingleStream;
CPDF_StreamAcc** m_pStreamArray;
FX_DWORD m_nStreams;
- FX_LPBYTE m_pData;
+ uint8_t* m_pData;
FX_DWORD m_Size;
class CPDF_StreamContentParser* m_pParser;
FX_DWORD m_CurrentOffset;
@@ -420,11 +420,11 @@ protected:
class CPDF_IccProfile
{
public:
- CPDF_IccProfile(FX_LPCBYTE pData, FX_DWORD dwSize);
+ CPDF_IccProfile(const uint8_t* pData, FX_DWORD dwSize);
~CPDF_IccProfile();
int32_t GetComponents() const { return m_nSrcComponents; }
FX_BOOL m_bsRGB;
- FX_LPVOID m_pTransform;
+ void* m_pTransform;
private:
int32_t m_nSrcComponents;
};
@@ -436,7 +436,7 @@ public:
FX_BOOL SetRGB(FX_FLOAT* pBuf, FX_FLOAT R, FX_FLOAT G, FX_FLOAT B) const;
FX_BOOL v_GetCMYK(FX_FLOAT* pBuf, FX_FLOAT& c, FX_FLOAT& m, FX_FLOAT& y, FX_FLOAT& k) const;
FX_BOOL v_SetCMYK(FX_FLOAT* pBuf, FX_FLOAT c, FX_FLOAT m, FX_FLOAT y, FX_FLOAT k) const;
- virtual void TranslateImageLine(FX_LPBYTE pDestBuf, FX_LPCBYTE pSrcBuf, int pixels, int image_width, int image_height, FX_BOOL bTransMask = FALSE) const;
+ virtual void TranslateImageLine(uint8_t* pDestBuf, const uint8_t* pSrcBuf, int pixels, int image_width, int image_height, FX_BOOL bTransMask = FALSE) const;
};
class CPDF_PatternCS : public CPDF_ColorSpace
{
@@ -461,7 +461,7 @@ public:
int m_nIndex;
};
~CPDF_ResourceNaming();
- CFX_ByteString GetName(const CPDF_Dictionary* pResList, FX_LPCSTR szType);
+ CFX_ByteString GetName(const CPDF_Dictionary* pResList, const FX_CHAR* szType);
protected:
CFX_MapByteStringToPtr m_NamingCache;
};
diff --git a/core/src/fpdfapi/fpdf_parser/filters_int.h b/core/src/fpdfapi/fpdf_parser/filters_int.h
index 6652cc0ccc..38dcb171f5 100644
--- a/core/src/fpdfapi/fpdf_parser/filters_int.h
+++ b/core/src/fpdfapi/fpdf_parser/filters_int.h
@@ -12,10 +12,10 @@ class CPDF_DecryptFilter : public CFX_DataFilter
public:
CPDF_DecryptFilter(CPDF_CryptoHandler* pCryptoHandler, FX_DWORD objnum, FX_DWORD gennum);
virtual ~CPDF_DecryptFilter();
- virtual void v_FilterIn(FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf);
+ virtual void v_FilterIn(const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf);
virtual void v_FilterFinish(CFX_BinaryBuf& dest_buf);
CPDF_CryptoHandler* m_pCryptoHandler;
- FX_LPVOID m_pContext;
+ void* m_pContext;
FX_DWORD m_ObjNum, m_GenNum;
};
class CPDF_FlateFilter : public CFX_DataFilter
@@ -23,7 +23,7 @@ class CPDF_FlateFilter : public CFX_DataFilter
public:
CPDF_FlateFilter();
virtual ~CPDF_FlateFilter();
- virtual void v_FilterIn(FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf);
+ virtual void v_FilterIn(const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf);
virtual void v_FilterFinish(CFX_BinaryBuf& dest_buf) {}
void* m_pContext;
uint8_t m_DestBuffer[FPDF_FILTER_BUFFER_SIZE];
@@ -33,7 +33,7 @@ class CPDF_LzwFilter : public CFX_DataFilter
public:
CPDF_LzwFilter(FX_BOOL bEarlyChange);
virtual ~CPDF_LzwFilter() {}
- virtual void v_FilterIn(FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf);
+ virtual void v_FilterIn(const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf);
virtual void v_FilterFinish(CFX_BinaryBuf& dest_buf) {}
FX_BOOL m_bEarlyChange;
FX_DWORD m_CodeArray[5021];
@@ -52,11 +52,12 @@ class CPDF_PredictorFilter : public CFX_DataFilter
public:
CPDF_PredictorFilter(int predictor, int colors, int bpc, int cols);
virtual ~CPDF_PredictorFilter();
- virtual void v_FilterIn(FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf);
+ virtual void v_FilterIn(const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf);
virtual void v_FilterFinish(CFX_BinaryBuf& dest_buf) {}
FX_BOOL m_bTiff;
FX_DWORD m_Pitch, m_Bpp;
- FX_LPBYTE m_pRefLine, m_pCurLine;
+ uint8_t* m_pRefLine;
+ uint8_t* m_pCurLine;
FX_DWORD m_iLine, m_LineInSize;
};
class CPDF_AsciiHexFilter : public CFX_DataFilter
@@ -64,7 +65,7 @@ class CPDF_AsciiHexFilter : public CFX_DataFilter
public:
CPDF_AsciiHexFilter();
virtual ~CPDF_AsciiHexFilter() {}
- virtual void v_FilterIn(FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf);
+ virtual void v_FilterIn(const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf);
virtual void v_FilterFinish(CFX_BinaryBuf& dest_buf) {}
int m_State;
int m_FirstDigit;
@@ -74,7 +75,7 @@ class CPDF_Ascii85Filter : public CFX_DataFilter
public:
CPDF_Ascii85Filter();
virtual ~CPDF_Ascii85Filter() {}
- virtual void v_FilterIn(FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf);
+ virtual void v_FilterIn(const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf);
virtual void v_FilterFinish(CFX_BinaryBuf& dest_buf) {}
int m_State;
int m_CharCount;
@@ -85,7 +86,7 @@ class CPDF_RunLenFilter : public CFX_DataFilter
public:
CPDF_RunLenFilter();
virtual ~CPDF_RunLenFilter() {}
- virtual void v_FilterIn(FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf);
+ virtual void v_FilterIn(const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf);
virtual void v_FilterFinish(CFX_BinaryBuf& dest_buf) {}
int m_State;
FX_DWORD m_Count;
@@ -95,11 +96,11 @@ class CPDF_JpegFilter : public CFX_DataFilter
public:
CPDF_JpegFilter();
virtual ~CPDF_JpegFilter();
- virtual void v_FilterIn(FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf);
+ virtual void v_FilterIn(const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf);
virtual void v_FilterFinish(CFX_BinaryBuf& dest_buf) {}
void* m_pContext;
CFX_BinaryBuf m_InputBuf;
- FX_LPBYTE m_pScanline;
+ uint8_t* m_pScanline;
int m_Pitch, m_Height, m_Width, m_nComps, m_iLine;
FX_BOOL m_bGotHeader;
};
@@ -109,16 +110,17 @@ public:
CPDF_FaxFilter();
virtual ~CPDF_FaxFilter();
FX_BOOL Initialize(int Encoding, int bEndOfLine, int bByteAlign, int bBlack, int nRows, int nColumns);
- virtual void v_FilterIn(FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf);
+ virtual void v_FilterIn(const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf);
virtual void v_FilterFinish(CFX_BinaryBuf& dest_buf);
int m_Encoding, m_bEndOfLine, m_bByteAlign, m_bBlack;
int m_nRows, m_nColumns, m_Pitch, m_iRow;
- FX_LPBYTE m_pScanlineBuf, m_pRefBuf;
+ uint8_t* m_pScanlineBuf;
+ uint8_t* m_pRefBuf;
CFX_BinaryBuf m_InputBuf;
int m_InputBitPos;
- void ProcessData(FX_LPCBYTE src_buf, FX_DWORD src_size, int& bitpos, FX_BOOL bFinish,
+ void ProcessData(const uint8_t* src_buf, FX_DWORD src_size, int& bitpos, FX_BOOL bFinish,
CFX_BinaryBuf& dest_buf);
- FX_BOOL ReadLine(FX_LPCBYTE src_buf, int bitsize, int& bitpos);
+ FX_BOOL ReadLine(const uint8_t* src_buf, int bitsize, int& bitpos);
};
#endif // CORE_SRC_FPDFAPI_FPDF_PARSER_FILTERS_INT_H_
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
index b1fde0be71..bb490636a9 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
@@ -9,7 +9,7 @@
#include "../../../include/fxcodec/fx_codec.h"
#include <limits.h>
#define _STREAM_MAX_SIZE_ 20 * 1024 * 1024
-FX_DWORD _A85Decode(const uint8_t* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size)
+FX_DWORD _A85Decode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_buf, FX_DWORD& dest_size)
{
dest_size = 0;
dest_buf = NULL;
@@ -82,7 +82,7 @@ FX_DWORD _A85Decode(const uint8_t* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_b
}
return pos;
}
-FX_DWORD _HexDecode(const uint8_t* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size)
+FX_DWORD _HexDecode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_buf, FX_DWORD& dest_size)
{
FX_DWORD i;
for (i = 0; i < src_size; i ++)
@@ -122,7 +122,7 @@ FX_DWORD _HexDecode(const uint8_t* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_b
}
return i;
}
-FX_DWORD RunLengthDecode(const uint8_t* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size)
+FX_DWORD RunLengthDecode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_buf, FX_DWORD& dest_size)
{
FX_DWORD i = 0;
FX_DWORD old;
@@ -182,7 +182,7 @@ FX_DWORD RunLengthDecode(const uint8_t* src_buf, FX_DWORD src_size, FX_LPBYTE& d
}
return ret;
}
-ICodec_ScanlineDecoder* FPDFAPI_CreateFaxDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height,
+ICodec_ScanlineDecoder* FPDFAPI_CreateFaxDecoder(const uint8_t* src_buf, FX_DWORD src_size, int width, int height,
const CPDF_Dictionary* pParams)
{
int K = 0;
@@ -228,7 +228,7 @@ static FX_BOOL CheckFlateDecodeParams(int Colors, int BitsPerComponent, int Colu
}
return TRUE;
}
-ICodec_ScanlineDecoder* FPDFAPI_CreateFlateDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height,
+ICodec_ScanlineDecoder* FPDFAPI_CreateFlateDecoder(const uint8_t* src_buf, FX_DWORD src_size, int width, int height,
int nComps, int bpc, const CPDF_Dictionary* pParams)
{
int predictor = 0;
@@ -246,7 +246,7 @@ ICodec_ScanlineDecoder* FPDFAPI_CreateFlateDecoder(FX_LPCBYTE src_buf, FX_DWORD
nComps, bpc, predictor, Colors, BitsPerComponent, Columns);
}
FX_DWORD FPDFAPI_FlateOrLZWDecode(FX_BOOL bLZW, const uint8_t* src_buf, FX_DWORD src_size, CPDF_Dictionary* pParams,
- FX_DWORD estimated_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size)
+ FX_DWORD estimated_size, uint8_t*& dest_buf, FX_DWORD& dest_size)
{
int predictor = 0;
FX_BOOL bEarlyChange = TRUE;
@@ -265,8 +265,8 @@ FX_DWORD FPDFAPI_FlateOrLZWDecode(FX_BOOL bLZW, const uint8_t* src_buf, FX_DWORD
bEarlyChange, predictor, Colors, BitsPerComponent, Columns, estimated_size,
dest_buf, dest_size);
}
-FX_BOOL PDF_DataDecode(FX_LPCBYTE src_buf, FX_DWORD src_size, const CPDF_Dictionary* pDict,
- FX_LPBYTE& dest_buf, FX_DWORD& dest_size, CFX_ByteString& ImageEncoding,
+FX_BOOL PDF_DataDecode(const uint8_t* src_buf, FX_DWORD src_size, const CPDF_Dictionary* pDict,
+ uint8_t*& dest_buf, FX_DWORD& dest_size, CFX_ByteString& ImageEncoding,
CPDF_Dictionary*& pImageParms, FX_DWORD last_estimated_size, FX_BOOL bImageAcc)
{
@@ -295,19 +295,19 @@ FX_BOOL PDF_DataDecode(FX_LPCBYTE src_buf, FX_DWORD src_size, const CPDF_Diction
DecoderList.Add(pDecoder->GetConstString());
ParamList.Add(pParams ? pParams->GetDict() : NULL);
}
- FX_LPBYTE last_buf = (FX_LPBYTE)src_buf;
+ uint8_t* last_buf = (uint8_t*)src_buf;
FX_DWORD last_size = src_size;
for (int i = 0; i < DecoderList.GetSize(); i ++) {
int estimated_size = i == DecoderList.GetSize() - 1 ? last_estimated_size : 0;
CFX_ByteString decoder = DecoderList[i];
CPDF_Dictionary* pParam = (CPDF_Dictionary*)ParamList[i];
- FX_LPBYTE new_buf = NULL;
+ uint8_t* new_buf = NULL;
FX_DWORD new_size = (FX_DWORD) - 1;
int offset = -1;
if (decoder == FX_BSTRC("FlateDecode") || decoder == FX_BSTRC("Fl")) {
if (bImageAcc && i == DecoderList.GetSize() - 1) {
ImageEncoding = FX_BSTRC("FlateDecode");
- dest_buf = (FX_LPBYTE)last_buf;
+ dest_buf = (uint8_t*)last_buf;
dest_size = last_size;
pImageParms = pParam;
return TRUE;
@@ -323,7 +323,7 @@ FX_BOOL PDF_DataDecode(FX_LPCBYTE src_buf, FX_DWORD src_size, const CPDF_Diction
} else if (decoder == FX_BSTRC("RunLengthDecode") || decoder == FX_BSTRC("RL")) {
if (bImageAcc && i == DecoderList.GetSize() - 1) {
ImageEncoding = FX_BSTRC("RunLengthDecode");
- dest_buf = (FX_LPBYTE)last_buf;
+ dest_buf = (uint8_t*)last_buf;
dest_size = last_size;
pImageParms = pParam;
return TRUE;
@@ -339,7 +339,7 @@ FX_BOOL PDF_DataDecode(FX_LPCBYTE src_buf, FX_DWORD src_size, const CPDF_Diction
}
ImageEncoding = decoder;
pImageParms = pParam;
- dest_buf = (FX_LPBYTE)last_buf;
+ dest_buf = (uint8_t*)last_buf;
dest_size = last_size;
return TRUE;
}
@@ -386,7 +386,7 @@ extern const FX_WORD PDFDocEncoding[256] = {
0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x00f9,
0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff
};
-CFX_WideString PDF_DecodeText(FX_LPCBYTE src_data, FX_DWORD src_len, CFX_CharMap* pCharMap)
+CFX_WideString PDF_DecodeText(const uint8_t* src_data, FX_DWORD src_len, CFX_CharMap* pCharMap)
{
CFX_WideString result;
if (src_len >= 2 && ((src_data[0] == 0xfe && src_data[1] == 0xff) || (src_data[0] == 0xff && src_data[1] == 0xfe))) {
@@ -398,8 +398,8 @@ CFX_WideString PDF_DecodeText(FX_LPCBYTE src_data, FX_DWORD src_len, CFX_CharMap
if (src_data[0] == 0xff) {
bBE = !src_data[2];
}
- FX_LPWSTR dest_buf = result.GetBuffer(max_chars);
- FX_LPCBYTE uni_str = src_data + 2;
+ FX_WCHAR* dest_buf = result.GetBuffer(max_chars);
+ const uint8_t* uni_str = src_data + 2;
int dest_pos = 0;
for (FX_DWORD i = 0; i < max_chars * 2; i += 2) {
FX_WORD unicode = bBE ? (uni_str[i] << 8 | uni_str[i + 1]) : (uni_str[i + 1] << 8 | uni_str[i]);
@@ -418,24 +418,24 @@ CFX_WideString PDF_DecodeText(FX_LPCBYTE src_data, FX_DWORD src_len, CFX_CharMap
}
result.ReleaseBuffer(dest_pos);
} else if (pCharMap == NULL) {
- FX_LPWSTR dest_buf = result.GetBuffer(src_len);
+ FX_WCHAR* dest_buf = result.GetBuffer(src_len);
for (FX_DWORD i = 0; i < src_len; i ++) {
dest_buf[i] = PDFDocEncoding[src_data[i]];
}
result.ReleaseBuffer(src_len);
} else {
- return (*pCharMap->m_GetWideString)(pCharMap, CFX_ByteString((FX_LPCSTR)src_data, src_len));
+ return (*pCharMap->m_GetWideString)(pCharMap, CFX_ByteString((const FX_CHAR*)src_data, src_len));
}
return result;
}
-CFX_ByteString PDF_EncodeText(FX_LPCWSTR pString, int len, CFX_CharMap* pCharMap)
+CFX_ByteString PDF_EncodeText(const FX_WCHAR* pString, int len, CFX_CharMap* pCharMap)
{
if (len == -1) {
len = FXSYS_wcslen(pString);
}
CFX_ByteString result;
if (pCharMap == NULL) {
- FX_LPSTR dest_buf1 = result.GetBuffer(len);
+ FX_CHAR* dest_buf1 = result.GetBuffer(len);
int i;
for (i = 0; i < len; i ++) {
int code;
@@ -462,7 +462,7 @@ CFX_ByteString PDF_EncodeText(FX_LPCWSTR pString, int len, CFX_CharMap* pCharMap
int encLen = len * 2 + 2;
- FX_LPBYTE dest_buf2 = (FX_LPBYTE)result.GetBuffer(encLen);
+ uint8_t* dest_buf2 = (uint8_t*)result.GetBuffer(encLen);
dest_buf2[0] = 0xfe;
dest_buf2[1] = 0xff;
dest_buf2 += 2;
@@ -503,22 +503,22 @@ CFX_ByteString PDF_EncodeString(const CFX_ByteString& src, FX_BOOL bHex)
result.AppendChar(')');
return result.GetByteString();
}
-void FlateEncode(const uint8_t* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size)
+void FlateEncode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_buf, FX_DWORD& dest_size)
{
CCodec_ModuleMgr* pEncoders = CPDF_ModuleMgr::Get()->GetCodecModule();
if (pEncoders) {
pEncoders->GetFlateModule()->Encode(src_buf, src_size, dest_buf, dest_size);
}
}
-void FlateEncode(FX_LPCBYTE src_buf, FX_DWORD src_size, int predictor, int Colors, int BitsPerComponent, int Columns,
- FX_LPBYTE& dest_buf, FX_DWORD& dest_size)
+void FlateEncode(const uint8_t* src_buf, FX_DWORD src_size, int predictor, int Colors, int BitsPerComponent, int Columns,
+ uint8_t*& dest_buf, FX_DWORD& dest_size)
{
CCodec_ModuleMgr* pEncoders = CPDF_ModuleMgr::Get()->GetCodecModule();
if (pEncoders) {
pEncoders->GetFlateModule()->Encode(src_buf, src_size, predictor, Colors, BitsPerComponent, Columns, dest_buf, dest_size);
}
}
-FX_DWORD FlateDecode(const uint8_t* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size)
+FX_DWORD FlateDecode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_buf, FX_DWORD& dest_size)
{
CCodec_ModuleMgr* pEncoders = CPDF_ModuleMgr::Get()->GetCodecModule();
if (pEncoders) {
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp
index f2643694ec..bd15c7587e 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp
@@ -343,7 +343,7 @@ FX_BOOL CPDF_Document::IsFormStream(FX_DWORD objnum, FX_BOOL& bForm) const
{
{
CPDF_Object* pObj;
- if (m_IndirectObjs.Lookup((FX_LPVOID)(uintptr_t)objnum, (FX_LPVOID&)pObj)) {
+ if (m_IndirectObjs.Lookup((void*)(uintptr_t)objnum, (void*&)pObj)) {
bForm = pObj->GetType() == PDFOBJ_STREAM &&
((CPDF_Stream*)pObj)->GetDict()->GetString(FX_BSTRC("Subtype")) == FX_BSTRC("Form");
return TRUE;
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp
index 4ca97fe9e8..973a14e33b 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp
@@ -13,8 +13,8 @@ const uint8_t defpasscode[32] = {
0x2e, 0x2e, 0x00, 0xb6, 0xd0, 0x68, 0x3e, 0x80,
0x2f, 0x0c, 0xa9, 0xfe, 0x64, 0x53, 0x69, 0x7a
};
-void CalcEncryptKey(CPDF_Dictionary* pEncrypt, FX_LPCBYTE password, FX_DWORD pass_size,
- FX_LPBYTE key, int keylen, FX_BOOL bIgnoreMeta, CPDF_Array* pIdArray)
+void CalcEncryptKey(CPDF_Dictionary* pEncrypt, const uint8_t* password, FX_DWORD pass_size,
+ uint8_t* key, int keylen, FX_BOOL bIgnoreMeta, CPDF_Array* pIdArray)
{
int revision = pEncrypt->GetInteger(FX_BSTRC("R"));
uint8_t passcode[32];
@@ -25,16 +25,16 @@ void CalcEncryptKey(CPDF_Dictionary* pEncrypt, FX_LPCBYTE password, FX_DWORD pas
CRYPT_MD5Start(md5);
CRYPT_MD5Update(md5, passcode, 32);
CFX_ByteString okey = pEncrypt->GetString(FX_BSTRC("O"));
- CRYPT_MD5Update(md5, (FX_LPBYTE)okey.c_str(), okey.GetLength());
+ CRYPT_MD5Update(md5, (uint8_t*)okey.c_str(), okey.GetLength());
FX_DWORD perm = pEncrypt->GetInteger(FX_BSTRC("P"));
- CRYPT_MD5Update(md5, (FX_LPBYTE)&perm, 4);
+ CRYPT_MD5Update(md5, (uint8_t*)&perm, 4);
if (pIdArray) {
CFX_ByteString id = pIdArray->GetString(0);
- CRYPT_MD5Update(md5, (FX_LPBYTE)id.c_str(), id.GetLength());
+ CRYPT_MD5Update(md5, (uint8_t*)id.c_str(), id.GetLength());
}
if (!bIgnoreMeta && revision >= 3 && !pEncrypt->GetInteger(FX_BSTRC("EncryptMetadata"), 1)) {
FX_DWORD tag = (FX_DWORD) - 1;
- CRYPT_MD5Update(md5, (FX_LPBYTE)&tag, 4);
+ CRYPT_MD5Update(md5, (uint8_t*)&tag, 4);
}
uint8_t digest[16];
CRYPT_MD5Finish(md5, digest);
@@ -189,7 +189,7 @@ FX_BOOL CPDF_StandardSecurityHandler::LoadDict(CPDF_Dictionary* pEncryptDict, FX
return TRUE;
return TRUE;
}
-FX_BOOL CPDF_StandardSecurityHandler::GetCryptInfo(int& cipher, FX_LPCBYTE& buffer, int& keylen)
+FX_BOOL CPDF_StandardSecurityHandler::GetCryptInfo(int& cipher, const uint8_t*& buffer, int& keylen)
{
cipher = m_Cipher;
buffer = m_EncryptKey;
@@ -203,7 +203,7 @@ FX_BOOL CPDF_StandardSecurityHandler::GetCryptInfo(int& cipher, FX_LPCBYTE& buff
| ( (uint64_t) (b)[(i) + 2] << 8 ) \
| ( (uint64_t) (b)[(i) + 3] )); \
}
-int BigOrder64BitsMod3(FX_LPBYTE data)
+int BigOrder64BitsMod3(uint8_t* data)
{
uint64_t ret = 0;
for (int i = 0; i < 4; ++i) {
@@ -215,7 +215,7 @@ int BigOrder64BitsMod3(FX_LPBYTE data)
}
return (int)ret;
}
-void Revision6_Hash(FX_LPCBYTE password, FX_DWORD size, FX_LPCBYTE salt, FX_LPCBYTE vector, FX_LPBYTE hash)
+void Revision6_Hash(const uint8_t* password, FX_DWORD size, const uint8_t* salt, const uint8_t* vector, uint8_t* hash)
{
int iBlockSize = 32;
uint8_t sha[128];
@@ -228,14 +228,14 @@ void Revision6_Hash(FX_LPCBYTE password, FX_DWORD size, FX_LPCBYTE salt, FX_LPCB
uint8_t digest[32];
CRYPT_SHA256Finish(sha, digest);
CFX_ByteTextBuf buf;
- FX_LPBYTE input = digest;
- FX_LPBYTE key = input;
- FX_LPBYTE iv = input + 16;
- FX_LPBYTE E = buf.GetBuffer();
+ uint8_t* input = digest;
+ uint8_t* key = input;
+ uint8_t* iv = input + 16;
+ uint8_t* E = buf.GetBuffer();
int iBufLen = buf.GetLength();
CFX_ByteTextBuf interDigest;
int i = 0;
- FX_LPBYTE aes = FX_Alloc(uint8_t, 2048);
+ uint8_t* aes = FX_Alloc(uint8_t, 2048);
while (i < 64 || i < E[iBufLen - 1] + 32) {
int iRoundSize = size + iBlockSize;
if (vector) {
@@ -288,8 +288,8 @@ void Revision6_Hash(FX_LPCBYTE password, FX_DWORD size, FX_LPCBYTE salt, FX_LPCB
FXSYS_memcpy32(hash, input, 32);
}
}
-FX_BOOL CPDF_StandardSecurityHandler::AES256_CheckPassword(FX_LPCBYTE password, FX_DWORD size,
- FX_BOOL bOwner, FX_LPBYTE key)
+FX_BOOL CPDF_StandardSecurityHandler::AES256_CheckPassword(const uint8_t* password, FX_DWORD size,
+ FX_BOOL bOwner, uint8_t* key)
{
CFX_ByteString okey = m_pEncryptDict ? m_pEncryptDict->GetString(FX_BSTRC("O")) : CFX_ByteString();
if (okey.GetLength() < 48) {
@@ -299,11 +299,11 @@ FX_BOOL CPDF_StandardSecurityHandler::AES256_CheckPassword(FX_LPCBYTE password,
if (ukey.GetLength() < 48) {
return FALSE;
}
- FX_LPCBYTE pkey = bOwner ? (FX_LPCBYTE)okey : (FX_LPCBYTE)ukey;
+ const uint8_t* pkey = bOwner ? (const uint8_t*)okey : (const uint8_t*)ukey;
uint8_t sha[128];
uint8_t digest[32];
if (m_Revision >= 6) {
- Revision6_Hash(password, size, (FX_LPCBYTE)pkey + 32, (bOwner ? (FX_LPCBYTE)ukey : NULL), digest);
+ Revision6_Hash(password, size, (const uint8_t*)pkey + 32, (bOwner ? (const uint8_t*)ukey : NULL), digest);
} else {
CRYPT_SHA256Start(sha);
CRYPT_SHA256Update(sha, password, size);
@@ -320,7 +320,7 @@ FX_BOOL CPDF_StandardSecurityHandler::AES256_CheckPassword(FX_LPCBYTE password,
return TRUE;
}
if (m_Revision >= 6) {
- Revision6_Hash(password, size, (FX_LPCBYTE)pkey + 40, (bOwner ? (FX_LPCBYTE)ukey : NULL), digest);
+ Revision6_Hash(password, size, (const uint8_t*)pkey + 40, (bOwner ? (const uint8_t*)ukey : NULL), digest);
} else {
CRYPT_SHA256Start(sha);
CRYPT_SHA256Update(sha, password, size);
@@ -352,7 +352,7 @@ FX_BOOL CPDF_StandardSecurityHandler::AES256_CheckPassword(FX_LPCBYTE password,
if (copy_len > (FX_DWORD)perms.GetLength()) {
copy_len = perms.GetLength();
}
- FXSYS_memcpy32(perms_buf, (FX_LPCBYTE)perms, copy_len);
+ FXSYS_memcpy32(perms_buf, (const uint8_t*)perms, copy_len);
uint8_t buf[16];
CRYPT_AESDecrypt(aes, buf, perms_buf, 16);
FX_Free(aes);
@@ -367,11 +367,11 @@ FX_BOOL CPDF_StandardSecurityHandler::AES256_CheckPassword(FX_LPCBYTE password,
}
return TRUE;
}
-int CPDF_StandardSecurityHandler::CheckPassword(FX_LPCBYTE password, FX_DWORD pass_size, FX_BOOL bOwner, FX_LPBYTE key)
+int CPDF_StandardSecurityHandler::CheckPassword(const uint8_t* password, FX_DWORD pass_size, FX_BOOL bOwner, uint8_t* key)
{
return CheckPassword(password, pass_size, bOwner, key, m_KeyLen);
}
-int CPDF_StandardSecurityHandler::CheckPassword(FX_LPCBYTE password, FX_DWORD size, FX_BOOL bOwner, FX_LPBYTE key, int32_t key_len)
+int CPDF_StandardSecurityHandler::CheckPassword(const uint8_t* password, FX_DWORD size, FX_BOOL bOwner, uint8_t* key, int32_t key_len)
{
if (m_Revision >= 5) {
return AES256_CheckPassword(password, size, bOwner, key);
@@ -385,8 +385,8 @@ int CPDF_StandardSecurityHandler::CheckPassword(FX_LPCBYTE password, FX_DWORD si
}
return CheckUserPassword(password, size, FALSE, key, key_len) || CheckUserPassword(password, size, TRUE, key, key_len);
}
-FX_BOOL CPDF_StandardSecurityHandler::CheckUserPassword(FX_LPCBYTE password, FX_DWORD pass_size,
- FX_BOOL bIgnoreEncryptMeta, FX_LPBYTE key, int32_t key_len)
+FX_BOOL CPDF_StandardSecurityHandler::CheckUserPassword(const uint8_t* password, FX_DWORD pass_size,
+ FX_BOOL bIgnoreEncryptMeta, uint8_t* key, int32_t key_len)
{
CalcEncryptKey(m_pEncryptDict, password, pass_size, key, key_len, bIgnoreEncryptMeta,
m_pParser->GetIDArray());
@@ -419,21 +419,21 @@ FX_BOOL CPDF_StandardSecurityHandler::CheckUserPassword(FX_LPCBYTE password, FX_
CPDF_Array* pIdArray = m_pParser->GetIDArray();
if (pIdArray) {
CFX_ByteString id = pIdArray->GetString(0);
- CRYPT_MD5Update(md5, (FX_LPBYTE)id.c_str(), id.GetLength());
+ CRYPT_MD5Update(md5, (uint8_t*)id.c_str(), id.GetLength());
}
CRYPT_MD5Finish(md5, ukeybuf);
return FXSYS_memcmp32(test, ukeybuf, 16) == 0;
}
- if (FXSYS_memcmp32((FX_LPVOID)ukey.c_str(), ukeybuf, 16) == 0) {
+ if (FXSYS_memcmp32((void*)ukey.c_str(), ukeybuf, 16) == 0) {
return TRUE;
}
return FALSE;
}
-CFX_ByteString CPDF_StandardSecurityHandler::GetUserPassword(FX_LPCBYTE owner_pass, FX_DWORD pass_size)
+CFX_ByteString CPDF_StandardSecurityHandler::GetUserPassword(const uint8_t* owner_pass, FX_DWORD pass_size)
{
return GetUserPassword(owner_pass, pass_size, m_KeyLen);
}
-CFX_ByteString CPDF_StandardSecurityHandler::GetUserPassword(FX_LPCBYTE owner_pass, FX_DWORD pass_size, int32_t key_len)
+CFX_ByteString CPDF_StandardSecurityHandler::GetUserPassword(const uint8_t* owner_pass, FX_DWORD pass_size, int32_t key_len)
{
CFX_ByteString okey = m_pEncryptDict->GetString(FX_BSTRC("O"));
uint8_t passcode[32];
@@ -480,8 +480,8 @@ CFX_ByteString CPDF_StandardSecurityHandler::GetUserPassword(FX_LPCBYTE owner_pa
}
return CFX_ByteString(okeybuf, len);
}
-FX_BOOL CPDF_StandardSecurityHandler::CheckOwnerPassword(FX_LPCBYTE password, FX_DWORD pass_size,
- FX_LPBYTE key, int32_t key_len)
+FX_BOOL CPDF_StandardSecurityHandler::CheckOwnerPassword(const uint8_t* password, FX_DWORD pass_size,
+ uint8_t* key, int32_t key_len)
{
CFX_ByteString user_pass = GetUserPassword(password, pass_size, key_len);
if (CheckUserPassword(user_pass, user_pass.GetLength(), FALSE, key, key_len)) {
@@ -498,8 +498,8 @@ CPDF_SecurityHandler* FPDF_CreateStandardSecurityHandler()
return new CPDF_StandardSecurityHandler;
}
void CPDF_StandardSecurityHandler::OnCreate(CPDF_Dictionary* pEncryptDict, CPDF_Array* pIdArray,
- FX_LPCBYTE user_pass, FX_DWORD user_size,
- FX_LPCBYTE owner_pass, FX_DWORD owner_size, FX_BOOL bDefault, FX_DWORD type)
+ const uint8_t* user_pass, FX_DWORD user_size,
+ const uint8_t* owner_pass, FX_DWORD owner_size, FX_BOOL bDefault, FX_DWORD type)
{
int cipher = 0, key_len = 0;
if (!LoadDict(pEncryptDict, type, cipher, key_len)) {
@@ -554,7 +554,7 @@ void CPDF_StandardSecurityHandler::OnCreate(CPDF_Dictionary* pEncryptDict, CPDF_
}
pEncryptDict->SetAtString(FX_BSTRC("O"), CFX_ByteString(passcode, 32));
}
- CalcEncryptKey(m_pEncryptDict, (FX_LPBYTE)user_pass, user_size, m_EncryptKey, key_len, FALSE, pIdArray);
+ CalcEncryptKey(m_pEncryptDict, (uint8_t*)user_pass, user_size, m_EncryptKey, key_len, FALSE, pIdArray);
if (m_Revision < 3) {
uint8_t tempbuf[32];
FXSYS_memcpy32(tempbuf, defpasscode, 32);
@@ -566,7 +566,7 @@ void CPDF_StandardSecurityHandler::OnCreate(CPDF_Dictionary* pEncryptDict, CPDF_
CRYPT_MD5Update(md5, defpasscode, 32);
if (pIdArray) {
CFX_ByteString id = pIdArray->GetString(0);
- CRYPT_MD5Update(md5, (FX_LPBYTE)id.c_str(), id.GetLength());
+ CRYPT_MD5Update(md5, (uint8_t*)id.c_str(), id.GetLength());
}
uint8_t digest[32];
CRYPT_MD5Finish(md5, digest);
@@ -583,16 +583,16 @@ void CPDF_StandardSecurityHandler::OnCreate(CPDF_Dictionary* pEncryptDict, CPDF_
}
}
void CPDF_StandardSecurityHandler::OnCreate(CPDF_Dictionary* pEncryptDict, CPDF_Array* pIdArray,
- FX_LPCBYTE user_pass, FX_DWORD user_size,
- FX_LPCBYTE owner_pass, FX_DWORD owner_size, FX_DWORD type)
+ const uint8_t* user_pass, FX_DWORD user_size,
+ const uint8_t* owner_pass, FX_DWORD owner_size, FX_DWORD type)
{
OnCreate(pEncryptDict, pIdArray, user_pass, user_size, owner_pass, owner_size, TRUE, type);
}
-void CPDF_StandardSecurityHandler::OnCreate(CPDF_Dictionary* pEncryptDict, CPDF_Array* pIdArray, FX_LPCBYTE user_pass, FX_DWORD user_size, FX_DWORD type)
+void CPDF_StandardSecurityHandler::OnCreate(CPDF_Dictionary* pEncryptDict, CPDF_Array* pIdArray, const uint8_t* user_pass, FX_DWORD user_size, FX_DWORD type)
{
OnCreate(pEncryptDict, pIdArray, user_pass, user_size, NULL, 0, FALSE, type);
}
-void CPDF_StandardSecurityHandler::AES256_SetPassword(CPDF_Dictionary* pEncryptDict, FX_LPCBYTE password, FX_DWORD size, FX_BOOL bOwner, FX_LPCBYTE key)
+void CPDF_StandardSecurityHandler::AES256_SetPassword(CPDF_Dictionary* pEncryptDict, const uint8_t* password, FX_DWORD size, FX_BOOL bOwner, const uint8_t* key)
{
uint8_t sha[128];
CRYPT_SHA1Start(sha);
@@ -603,7 +603,7 @@ void CPDF_StandardSecurityHandler::AES256_SetPassword(CPDF_Dictionary* pEncryptD
CFX_ByteString ukey = pEncryptDict->GetString(FX_BSTRC("U"));
uint8_t digest1[48];
if (m_Revision >= 6) {
- Revision6_Hash(password, size, digest, (bOwner ? (FX_LPCBYTE)ukey : NULL), digest1);
+ Revision6_Hash(password, size, digest, (bOwner ? (const uint8_t*)ukey : NULL), digest1);
} else {
CRYPT_SHA256Start(sha);
CRYPT_SHA256Update(sha, password, size);
@@ -616,7 +616,7 @@ void CPDF_StandardSecurityHandler::AES256_SetPassword(CPDF_Dictionary* pEncryptD
FXSYS_memcpy32(digest1 + 32, digest, 16);
pEncryptDict->SetAtString(bOwner ? FX_BSTRC("O") : FX_BSTRC("U"), CFX_ByteString(digest1, 48));
if (m_Revision >= 6) {
- Revision6_Hash(password, size, digest + 8, (bOwner ? (FX_LPCBYTE)ukey : NULL), digest1);
+ Revision6_Hash(password, size, digest + 8, (bOwner ? (const uint8_t*)ukey : NULL), digest1);
} else {
CRYPT_SHA256Start(sha);
CRYPT_SHA256Update(sha, password, size);
@@ -636,7 +636,7 @@ void CPDF_StandardSecurityHandler::AES256_SetPassword(CPDF_Dictionary* pEncryptD
pEncryptDict->SetAtString(bOwner ? FX_BSTRC("OE") : FX_BSTRC("UE"), CFX_ByteString(digest1, 32));
}
void CPDF_StandardSecurityHandler::AES256_SetPerms(CPDF_Dictionary* pEncryptDict, FX_DWORD permissions,
- FX_BOOL bEncryptMetadata, FX_LPCBYTE key)
+ FX_BOOL bEncryptMetadata, const uint8_t* key)
{
uint8_t buf[16];
buf[0] = (uint8_t)permissions;
@@ -660,8 +660,8 @@ void CPDF_StandardSecurityHandler::AES256_SetPerms(CPDF_Dictionary* pEncryptDict
FX_Free(aes);
pEncryptDict->SetAtString(FX_BSTRC("Perms"), CFX_ByteString(buf1, 16));
}
-void CPDF_StandardCryptoHandler::CryptBlock(FX_BOOL bEncrypt, FX_DWORD objnum, FX_DWORD gennum, FX_LPCBYTE src_buf, FX_DWORD src_size,
- FX_LPBYTE dest_buf, FX_DWORD& dest_size)
+void CPDF_StandardCryptoHandler::CryptBlock(FX_BOOL bEncrypt, FX_DWORD objnum, FX_DWORD gennum, const uint8_t* src_buf, FX_DWORD src_size,
+ uint8_t* dest_buf, FX_DWORD& dest_size)
{
if (m_Cipher == FXCIPHER_NONE) {
FXSYS_memcpy32(dest_buf, src_buf, src_size);
@@ -724,7 +724,7 @@ typedef struct _AESCryptContext {
uint8_t m_Block[16];
FX_DWORD m_BlockOffset;
} AESCryptContext;
-FX_LPVOID CPDF_StandardCryptoHandler::CryptStart(FX_DWORD objnum, FX_DWORD gennum, FX_BOOL bEncrypt)
+void* CPDF_StandardCryptoHandler::CryptStart(FX_DWORD objnum, FX_DWORD gennum, FX_BOOL bEncrypt)
{
if (m_Cipher == FXCIPHER_NONE) {
return this;
@@ -772,7 +772,7 @@ FX_LPVOID CPDF_StandardCryptoHandler::CryptStart(FX_DWORD objnum, FX_DWORD gennu
CRYPT_ArcFourSetup(pContext, realkey, realkeylen);
return pContext;
}
-FX_BOOL CPDF_StandardCryptoHandler::CryptStream(FX_LPVOID context, FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf, FX_BOOL bEncrypt)
+FX_BOOL CPDF_StandardCryptoHandler::CryptStream(void* context, const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf, FX_BOOL bEncrypt)
{
if (!context) {
return FALSE;
@@ -825,7 +825,7 @@ FX_BOOL CPDF_StandardCryptoHandler::CryptStream(FX_LPVOID context, FX_LPCBYTE sr
}
return TRUE;
}
-FX_BOOL CPDF_StandardCryptoHandler::CryptFinish(FX_LPVOID context, CFX_BinaryBuf& dest_buf, FX_BOOL bEncrypt)
+FX_BOOL CPDF_StandardCryptoHandler::CryptFinish(void* context, CFX_BinaryBuf& dest_buf, FX_BOOL bEncrypt)
{
if (!context) {
return FALSE;
@@ -858,7 +858,7 @@ FX_BOOL CPDF_StandardCryptoHandler::CryptFinish(FX_LPVOID context, CFX_BinaryBuf
FX_Free(pContext);
return TRUE;
}
-FX_LPVOID CPDF_StandardCryptoHandler::DecryptStart(FX_DWORD objnum, FX_DWORD gennum)
+void* CPDF_StandardCryptoHandler::DecryptStart(FX_DWORD objnum, FX_DWORD gennum)
{
return CryptStart(objnum, gennum, FALSE);
}
@@ -868,7 +868,7 @@ FX_DWORD CPDF_StandardCryptoHandler::DecryptGetSize(FX_DWORD src_size)
}
FX_BOOL CPDF_StandardCryptoHandler::Init(CPDF_Dictionary* pEncryptDict, CPDF_SecurityHandler* pSecurityHandler)
{
- FX_LPCBYTE key;
+ const uint8_t* key;
if (!pSecurityHandler->GetCryptInfo(m_Cipher, key, m_KeyLen)) {
return FALSE;
}
@@ -883,7 +883,7 @@ FX_BOOL CPDF_StandardCryptoHandler::Init(CPDF_Dictionary* pEncryptDict, CPDF_Sec
}
return TRUE;
}
-FX_BOOL CPDF_StandardCryptoHandler::Init(int cipher, FX_LPCBYTE key, int keylen)
+FX_BOOL CPDF_StandardCryptoHandler::Init(int cipher, const uint8_t* key, int keylen)
{
if (cipher == FXCIPHER_AES) {
switch(keylen) {
@@ -915,24 +915,24 @@ FX_BOOL CPDF_StandardCryptoHandler::Init(int cipher, FX_LPCBYTE key, int keylen)
}
return TRUE;
}
-FX_BOOL CPDF_StandardCryptoHandler::DecryptStream(FX_LPVOID context, FX_LPCBYTE src_buf, FX_DWORD src_size,
+FX_BOOL CPDF_StandardCryptoHandler::DecryptStream(void* context, const uint8_t* src_buf, FX_DWORD src_size,
CFX_BinaryBuf& dest_buf)
{
return CryptStream(context, src_buf, src_size, dest_buf, FALSE);
}
-FX_BOOL CPDF_StandardCryptoHandler::DecryptFinish(FX_LPVOID context, CFX_BinaryBuf& dest_buf)
+FX_BOOL CPDF_StandardCryptoHandler::DecryptFinish(void* context, CFX_BinaryBuf& dest_buf)
{
return CryptFinish(context, dest_buf, FALSE);
}
-FX_DWORD CPDF_StandardCryptoHandler::EncryptGetSize(FX_DWORD objnum, FX_DWORD version, FX_LPCBYTE src_buf, FX_DWORD src_size)
+FX_DWORD CPDF_StandardCryptoHandler::EncryptGetSize(FX_DWORD objnum, FX_DWORD version, const uint8_t* src_buf, FX_DWORD src_size)
{
if (m_Cipher == FXCIPHER_AES) {
return src_size + 32;
}
return src_size;
}
-FX_BOOL CPDF_StandardCryptoHandler::EncryptContent(FX_DWORD objnum, FX_DWORD gennum, FX_LPCBYTE src_buf, FX_DWORD src_size,
- FX_LPBYTE dest_buf, FX_DWORD& dest_size)
+FX_BOOL CPDF_StandardCryptoHandler::EncryptContent(FX_DWORD objnum, FX_DWORD gennum, const uint8_t* src_buf, FX_DWORD src_size,
+ uint8_t* dest_buf, FX_DWORD& dest_size)
{
CryptBlock(TRUE, objnum, gennum, src_buf, src_size, dest_buf, dest_size);
return TRUE;
@@ -940,8 +940,8 @@ FX_BOOL CPDF_StandardCryptoHandler::EncryptContent(FX_DWORD objnum, FX_DWORD gen
void CPDF_CryptoHandler::Decrypt(FX_DWORD objnum, FX_DWORD gennum, CFX_ByteString& str)
{
CFX_BinaryBuf dest_buf;
- FX_LPVOID context = DecryptStart(objnum, gennum);
- DecryptStream(context, (FX_LPCBYTE)str, str.GetLength(), dest_buf);
+ void* context = DecryptStart(objnum, gennum);
+ DecryptStream(context, (const uint8_t*)str, str.GetLength(), dest_buf);
DecryptFinish(context, dest_buf);
str = dest_buf;
}
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
index 5bacfd7393..ceed675461 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
@@ -39,9 +39,9 @@ CFDF_Document* CFDF_Document::ParseFile(IFX_FileRead *pFile, FX_BOOL bOwnFile)
}
return pDoc;
}
-CFDF_Document* CFDF_Document::ParseMemory(FX_LPCBYTE pData, FX_DWORD size)
+CFDF_Document* CFDF_Document::ParseMemory(const uint8_t* pData, FX_DWORD size)
{
- return CFDF_Document::ParseFile(FX_CreateMemoryStream((FX_LPBYTE)pData, size), TRUE);
+ return CFDF_Document::ParseFile(FX_CreateMemoryStream((uint8_t*)pData, size), TRUE);
}
void CFDF_Document::ParseStream(IFX_FileRead *pFile, FX_BOOL bOwnFile)
{
@@ -95,7 +95,7 @@ FX_BOOL CFDF_Document::WriteBuf(CFX_ByteTextBuf& buf) const
while(pos) {
size_t objnum;
CPDF_Object* pObj;
- m_IndirectObjs.GetNextAssoc(pos, (FX_LPVOID&)objnum, (FX_LPVOID&)pObj);
+ m_IndirectObjs.GetNextAssoc(pos, (void*&)objnum, (void*&)pObj);
buf << (FX_DWORD)objnum << FX_BSTRC(" 0 obj\r\n") << pObj << FX_BSTRC("\r\nendobj\r\n\r\n");
}
buf << FX_BSTRC("trailer\r\n<</Root ") << m_pRootDict->GetObjNum() << FX_BSTRC(" 0 R>>\r\n%%EOF\r\n");
@@ -113,7 +113,7 @@ CFX_WideString CFDF_Document::GetWin32Path() const
}
return FPDF_FileSpec_GetWin32Path(pFileSpec);
}
-static CFX_WideString ChangeSlash(FX_LPCWSTR str)
+static CFX_WideString ChangeSlash(const FX_WCHAR* str)
{
CFX_WideString result;
while (*str) {
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp
index 8cb0cee82a..97e68b5c0c 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp
@@ -29,7 +29,7 @@ void CFX_DataFilter::SetDestFilter(CFX_DataFilter* pFilter)
m_pDestFilter = pFilter;
}
}
-void CFX_DataFilter::FilterIn(FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf)
+void CFX_DataFilter::FilterIn(const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf)
{
if (m_bEOF) {
return;
@@ -199,7 +199,7 @@ CPDF_StreamFilter::~CPDF_StreamFilter()
}
}
#define FPDF_FILTER_BUFFER_IN_SIZE FPDF_FILTER_BUFFER_SIZE
-FX_DWORD CPDF_StreamFilter::ReadBlock(FX_LPBYTE buffer, FX_DWORD buf_size)
+FX_DWORD CPDF_StreamFilter::ReadBlock(uint8_t* buffer, FX_DWORD buf_size)
{
if (m_pFilter == NULL) {
FX_DWORD read_size = m_pStream->GetRawSize() - m_SrcOffset;
@@ -249,7 +249,7 @@ FX_DWORD CPDF_StreamFilter::ReadBlock(FX_LPBYTE buffer, FX_DWORD buf_size)
}
return read_size + ReadLeftOver(buffer, buf_size);
}
-FX_DWORD CPDF_StreamFilter::ReadLeftOver(FX_LPBYTE buffer, FX_DWORD buf_size)
+FX_DWORD CPDF_StreamFilter::ReadLeftOver(uint8_t* buffer, FX_DWORD buf_size)
{
FX_DWORD read_size = m_pBuffer->GetSize() - m_BufOffset;
if (read_size > buf_size) {
@@ -277,7 +277,7 @@ CPDF_DecryptFilter::~CPDF_DecryptFilter()
m_pCryptoHandler->DecryptFinish(m_pContext, buf);
}
}
-void CPDF_DecryptFilter::v_FilterIn(FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf)
+void CPDF_DecryptFilter::v_FilterIn(const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf)
{
if (m_pContext == NULL) {
m_pContext = m_pCryptoHandler->DecryptStart(m_ObjNum, m_GenNum);
@@ -320,7 +320,7 @@ CPDF_FlateFilter::~CPDF_FlateFilter()
FPDFAPI_FlateEnd(m_pContext);
}
}
-void CPDF_FlateFilter::v_FilterIn(FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf)
+void CPDF_FlateFilter::v_FilterIn(const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf)
{
if (m_pContext == NULL) {
m_pContext = FPDFAPI_FlateInit(my_alloc_func, my_free_func);
@@ -348,7 +348,7 @@ CPDF_LzwFilter::CPDF_LzwFilter(FX_BOOL bEarlyChange)
m_LeftBits = 0;
m_OldCode = (FX_DWORD) - 1;
}
-void CPDF_LzwFilter::v_FilterIn(FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf)
+void CPDF_LzwFilter::v_FilterIn(const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf)
{
for (FX_DWORD i = 0; i < src_size; i ++) {
if (m_nLeftBits + 8 < m_CodeLen) {
@@ -389,7 +389,7 @@ void CPDF_LzwFilter::v_FilterIn(FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_Binar
DecodeString(code);
}
dest_buf.AppendBlock(NULL, m_StackLen);
- FX_LPBYTE pOutput = dest_buf.GetBuffer() + dest_buf.GetSize() - m_StackLen;
+ uint8_t* pOutput = dest_buf.GetBuffer() + dest_buf.GetSize() - m_StackLen;
for (FX_DWORD cc = 0; cc < m_StackLen; cc ++) {
pOutput[cc] = m_DecodeStack[m_StackLen - cc - 1];
}
@@ -475,7 +475,7 @@ static uint8_t PaethPredictor(int a, int b, int c)
}
return (uint8_t)c;
}
-static void PNG_PredictorLine(FX_LPBYTE cur_buf, FX_LPBYTE ref_buf, int pitch, int Bpp)
+static void PNG_PredictorLine(uint8_t* cur_buf, uint8_t* ref_buf, int pitch, int Bpp)
{
uint8_t tag = cur_buf[0];
if (tag == 0) {
@@ -535,7 +535,7 @@ static void PNG_PredictorLine(FX_LPBYTE cur_buf, FX_LPBYTE ref_buf, int pitch, i
}
}
}
-void CPDF_PredictorFilter::v_FilterIn(FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf)
+void CPDF_PredictorFilter::v_FilterIn(const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf)
{
if (m_pCurLine == NULL) {
m_pCurLine = FX_Alloc(uint8_t, m_Pitch);
@@ -564,7 +564,7 @@ void CPDF_PredictorFilter::v_FilterIn(FX_LPCBYTE src_buf, FX_DWORD src_size, CFX
PNG_PredictorLine(m_pCurLine, m_iLine ? m_pRefLine : NULL, m_Pitch - 1, m_Bpp);
dest_buf.AppendBlock(m_pCurLine + 1, m_Pitch - 1);
m_iLine ++;
- FX_LPBYTE temp = m_pCurLine;
+ uint8_t* temp = m_pCurLine;
m_pCurLine = m_pRefLine;
m_pRefLine = temp;
}
@@ -576,7 +576,7 @@ CPDF_Ascii85Filter::CPDF_Ascii85Filter()
m_State = 0;
m_CharCount = 0;
}
-void CPDF_Ascii85Filter::v_FilterIn(FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf)
+void CPDF_Ascii85Filter::v_FilterIn(const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf)
{
for (FX_DWORD i = 0; i < src_size; i ++) {
uint8_t byte = src_buf[i];
@@ -635,7 +635,7 @@ CPDF_AsciiHexFilter::CPDF_AsciiHexFilter()
{
m_State = 0;
}
-void CPDF_AsciiHexFilter::v_FilterIn(FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf)
+void CPDF_AsciiHexFilter::v_FilterIn(const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf)
{
for (FX_DWORD i = 0; i < src_size; i ++) {
uint8_t byte = src_buf[i];
@@ -670,7 +670,7 @@ CPDF_RunLenFilter::CPDF_RunLenFilter()
m_State = 0;
m_Count = 0;
}
-void CPDF_RunLenFilter::v_FilterIn(FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf)
+void CPDF_RunLenFilter::v_FilterIn(const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf)
{
for (FX_DWORD i = 0; i < src_size; i ++) {
uint8_t byte = src_buf[i];
@@ -719,12 +719,12 @@ CPDF_JpegFilter::~CPDF_JpegFilter()
CPDF_ModuleMgr::Get()->GetJpegModule()->Finish(m_pContext);
}
}
-void CPDF_JpegFilter::v_FilterIn(FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf)
+void CPDF_JpegFilter::v_FilterIn(const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf)
{
if (m_pContext == NULL) {
m_pContext = CPDF_ModuleMgr::Get()->GetJpegModule()->Start();
}
- FX_LPCBYTE jpeg_src_buf;
+ const uint8_t* jpeg_src_buf;
FX_DWORD jpeg_src_size;
CFX_BinaryBuf temp_buf;
if (m_InputBuf.GetSize()) {
@@ -811,9 +811,9 @@ FX_BOOL CPDF_FaxFilter::Initialize(int Encoding, int bEndOfLine, int bByteAlign,
m_InputBitPos = 0;
return TRUE;
}
-void CPDF_FaxFilter::v_FilterIn(FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf)
+void CPDF_FaxFilter::v_FilterIn(const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf)
{
- FX_LPCBYTE fax_src_buf;
+ const uint8_t* fax_src_buf;
FX_DWORD fax_src_size;
CFX_BinaryBuf temp_buf;
int bitpos;
@@ -840,9 +840,9 @@ void CPDF_FaxFilter::v_FilterFinish(CFX_BinaryBuf& dest_buf)
ProcessData(m_InputBuf.GetBuffer(), m_InputBuf.GetSize(), m_InputBitPos, TRUE, dest_buf);
}
FX_BOOL _FaxSkipEOL(const uint8_t* src_buf, int bitsize, int& bitpos);
-FX_BOOL _FaxG4GetRow(const uint8_t* src_buf, int bitsize, int& bitpos, FX_LPBYTE dest_buf, const uint8_t* ref_buf, int columns);
-FX_BOOL _FaxGet1DLine(const uint8_t* src_buf, int bitsize, int& bitpos, FX_LPBYTE dest_buf, int columns);
-void CPDF_FaxFilter::ProcessData(FX_LPCBYTE src_buf, FX_DWORD src_size, int& bitpos, FX_BOOL bFinish,
+FX_BOOL _FaxG4GetRow(const uint8_t* src_buf, int bitsize, int& bitpos, uint8_t* dest_buf, const uint8_t* ref_buf, int columns);
+FX_BOOL _FaxGet1DLine(const uint8_t* src_buf, int bitsize, int& bitpos, uint8_t* dest_buf, int columns);
+void CPDF_FaxFilter::ProcessData(const uint8_t* src_buf, FX_DWORD src_size, int& bitpos, FX_BOOL bFinish,
CFX_BinaryBuf& dest_buf)
{
int bitsize = src_size * 8;
@@ -872,7 +872,7 @@ void CPDF_FaxFilter::ProcessData(FX_LPCBYTE src_buf, FX_DWORD src_size, int& bit
}
}
}
-FX_BOOL CPDF_FaxFilter::ReadLine(FX_LPCBYTE src_buf, int bitsize, int& bitpos)
+FX_BOOL CPDF_FaxFilter::ReadLine(const uint8_t* src_buf, int bitsize, int& bitpos)
{
if (!_FaxSkipEOL(src_buf, bitsize, bitpos)) {
return FALSE;
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
index d636f96b68..5cc06e7929 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
@@ -51,7 +51,7 @@ CFX_ByteString CPDF_Object::GetString() const
case PDFOBJ_NAME:
return ((CPDF_Name*)this)->m_Name;
case PDFOBJ_REFERENCE: {
- CPDF_Reference* pRef = (CPDF_Reference*)(FX_LPVOID)this;
+ CPDF_Reference* pRef = (CPDF_Reference*)(void*)this;
if (pRef->m_pObjList == NULL) {
break;
}
@@ -68,11 +68,11 @@ CFX_ByteStringC CPDF_Object::GetConstString() const
{
switch (m_Type) {
case PDFOBJ_STRING:
- return CFX_ByteStringC((FX_LPCBYTE)((CPDF_String*)this)->m_String, ((CPDF_String*)this)->m_String.GetLength());
+ return CFX_ByteStringC((const uint8_t*)((CPDF_String*)this)->m_String, ((CPDF_String*)this)->m_String.GetLength());
case PDFOBJ_NAME:
- return CFX_ByteStringC((FX_LPCBYTE)((CPDF_Name*)this)->m_Name, ((CPDF_Name*)this)->m_Name.GetLength());
+ return CFX_ByteStringC((const uint8_t*)((CPDF_Name*)this)->m_Name, ((CPDF_Name*)this)->m_Name.GetLength());
case PDFOBJ_REFERENCE: {
- CPDF_Reference* pRef = (CPDF_Reference*)(FX_LPVOID)this;
+ CPDF_Reference* pRef = (CPDF_Reference*)(void*)this;
if (pRef->m_pObjList == NULL) {
break;
}
@@ -91,7 +91,7 @@ FX_FLOAT CPDF_Object::GetNumber() const
case PDFOBJ_NUMBER:
return ((CPDF_Number*)this)->GetNumber();
case PDFOBJ_REFERENCE: {
- CPDF_Reference* pRef = (CPDF_Reference*)(FX_LPVOID)this;
+ CPDF_Reference* pRef = (CPDF_Reference*)(void*)this;
if (pRef->m_pObjList == NULL) {
break;
}
@@ -120,7 +120,7 @@ int CPDF_Object::GetInteger() const
case PDFOBJ_NUMBER:
return ((CPDF_Number*)this)->GetInteger();
case PDFOBJ_REFERENCE: {
- CPDF_Reference* pRef = (CPDF_Reference*)(FX_LPVOID)this;
+ CPDF_Reference* pRef = (CPDF_Reference*)(void*)this;
PARSE_CONTEXT context;
FXSYS_memset32(&context, 0, sizeof(PARSE_CONTEXT));
if (pRef->m_pObjList == NULL) {
@@ -233,7 +233,7 @@ CPDF_Object* CPDF_Object::GetDirect() const
if (m_Type != PDFOBJ_REFERENCE) {
return (CPDF_Object*)this;
}
- CPDF_Reference* pRef = (CPDF_Reference*)(FX_LPVOID)this;
+ CPDF_Reference* pRef = (CPDF_Reference*)(void*)this;
if (pRef->m_pObjList == NULL) {
return NULL;
}
@@ -331,13 +331,13 @@ CFX_WideString CPDF_Object::GetUnicodeText(CFX_CharMap* pCharMap) const
}
return CFX_WideString();
}
-void CPDF_Object::SetUnicodeText(FX_LPCWSTR pUnicodes, int len)
+void CPDF_Object::SetUnicodeText(const FX_WCHAR* pUnicodes, int len)
{
if (m_Type == PDFOBJ_STRING) {
((CPDF_String*)this)->m_String = PDF_EncodeText(pUnicodes, len);
} else if (m_Type == PDFOBJ_STREAM) {
CFX_ByteString result = PDF_EncodeText(pUnicodes, len);
- ((CPDF_Stream*)this)->SetData((FX_LPBYTE)result.c_str(), result.GetLength(), FALSE, FALSE);
+ ((CPDF_Stream*)this)->SetData((uint8_t*)result.c_str(), result.GetLength(), FALSE, FALSE);
}
}
@@ -570,7 +570,7 @@ CPDF_Dictionary::~CPDF_Dictionary()
{
FX_POSITION pos = m_Map.GetStartPosition();
while (pos) {
- FX_LPVOID value = m_Map.GetNextValue(pos);
+ void* value = m_Map.GetNextValue(pos);
if (value)
((CPDF_Object*)value)->Release();
}
@@ -585,7 +585,7 @@ CPDF_Object* CPDF_Dictionary::GetNextElement(FX_POSITION& pos, CFX_ByteString& k
return NULL;
}
CPDF_Object* p;
- m_Map.GetNextAssoc(pos, key, (FX_LPVOID&)p);
+ m_Map.GetNextAssoc(pos, key, (void*&)p);
return p;
}
CPDF_Object* CPDF_Dictionary::GetElement(FX_BSTR key) const
@@ -736,7 +736,7 @@ CFX_AffineMatrix CPDF_Dictionary::GetMatrix(FX_BSTR key) const
}
FX_BOOL CPDF_Dictionary::KeyExist(FX_BSTR key) const
{
- FX_LPVOID value;
+ void* value;
return m_Map.Lookup(key, value);
}
void CPDF_Dictionary::SetAt(FX_BSTR key, CPDF_Object* pObj, CPDF_IndirectObjects* pObjs)
@@ -797,7 +797,7 @@ FX_BOOL CPDF_Dictionary::Identical(CPDF_Dictionary* pOther) const
FX_POSITION pos = m_Map.GetStartPosition();
while (pos) {
CFX_ByteString key;
- FX_LPVOID value;
+ void* value;
m_Map.GetNextAssoc(pos, key, value);
if (!value)
return FALSE;
@@ -857,7 +857,7 @@ void CPDF_Dictionary::SetAtMatrix(FX_BSTR key, const CFX_AffineMatrix& matrix)
pArray->AddNumber(matrix.f);
SetAt(key, pArray);
}
-CPDF_Stream::CPDF_Stream(FX_LPBYTE pData, FX_DWORD size, CPDF_Dictionary* pDict)
+CPDF_Stream::CPDF_Stream(uint8_t* pData, FX_DWORD size, CPDF_Dictionary* pDict)
: CPDF_Object(PDFOBJ_STREAM) {
m_pDict = pDict;
m_dwSize = size;
@@ -892,7 +892,7 @@ void CPDF_Stream::InitStream(CPDF_Dictionary* pDict)
m_pCryptoHandler = NULL;
m_FileOffset = 0;
}
-void CPDF_Stream::InitStream(FX_LPBYTE pData, FX_DWORD size, CPDF_Dictionary* pDict)
+void CPDF_Stream::InitStream(uint8_t* pData, FX_DWORD size, CPDF_Dictionary* pDict)
{
InitStream(pDict);
m_GenNum = (FX_DWORD) - 1;
@@ -905,7 +905,7 @@ void CPDF_Stream::InitStream(FX_LPBYTE pData, FX_DWORD size, CPDF_Dictionary* pD
m_pDict->SetAtInteger(FX_BSTRC("Length"), size);
}
}
-void CPDF_Stream::SetData(FX_LPCBYTE pData, FX_DWORD size, FX_BOOL bCompressed, FX_BOOL bKeepBuf)
+void CPDF_Stream::SetData(const uint8_t* pData, FX_DWORD size, FX_BOOL bCompressed, FX_BOOL bKeepBuf)
{
if (m_GenNum == (FX_DWORD) - 1) {
if (m_pDataBuf) {
@@ -916,7 +916,7 @@ void CPDF_Stream::SetData(FX_LPCBYTE pData, FX_DWORD size, FX_BOOL bCompressed,
m_pCryptoHandler = NULL;
}
if (bKeepBuf) {
- m_pDataBuf = (FX_LPBYTE)pData;
+ m_pDataBuf = (uint8_t*)pData;
} else {
m_pDataBuf = FX_Alloc(uint8_t, size);
if (pData) {
@@ -933,7 +933,7 @@ void CPDF_Stream::SetData(FX_LPCBYTE pData, FX_DWORD size, FX_BOOL bCompressed,
m_pDict->RemoveAt(FX_BSTRC("DecodeParms"));
}
}
-FX_BOOL CPDF_Stream::ReadRawData(FX_FILESIZE offset, FX_LPBYTE buf, FX_DWORD size) const
+FX_BOOL CPDF_Stream::ReadRawData(FX_FILESIZE offset, uint8_t* buf, FX_DWORD size) const
{
if ((m_GenNum != (FX_DWORD) - 1) && m_pFile) {
return m_pFile->ReadBlock(buf, m_FileOffset + offset, size);
@@ -993,7 +993,7 @@ FX_BOOL CPDF_Stream::Identical(CPDF_Stream* pOther) const
}
if (m_GenNum != (FX_DWORD) - 1 || pOther->m_GenNum != (FX_DWORD) - 1) {
IFX_FileRead* pFile = NULL;
- FX_LPBYTE pBuf = NULL;
+ uint8_t* pBuf = NULL;
FX_DWORD offset = 0;
if (m_GenNum != (FX_DWORD) - 1) {
pFile = m_pFile;
@@ -1024,7 +1024,7 @@ FX_BOOL CPDF_Stream::Identical(CPDF_Stream* pOther) const
}
return FXSYS_memcmp32(m_pDataBuf, pOther->m_pDataBuf, m_dwSize) == 0;
}
-CPDF_Stream* CPDF_Stream::Clone(FX_BOOL bDirect, FPDF_LPFCloneStreamCallback lpfCallback, FX_LPVOID pUserData) const
+CPDF_Stream* CPDF_Stream::Clone(FX_BOOL bDirect, FPDF_LPFCloneStreamCallback lpfCallback, void* pUserData) const
{
CPDF_Dictionary *pCloneDict = (CPDF_Dictionary*)m_pDict->Clone(bDirect);
IFX_FileStream *pFS = NULL;
@@ -1040,7 +1040,7 @@ CPDF_Stream* CPDF_Stream::Clone(FX_BOOL bDirect, FPDF_LPFCloneStreamCallback lpf
CPDF_Stream* pObj = new CPDF_Stream(NULL, 0, NULL);
CPDF_StreamFilter *pSF = GetStreamFilter(TRUE);
if (pSF) {
- FX_LPBYTE pBuf = FX_Alloc(uint8_t, 4096);
+ uint8_t* pBuf = FX_Alloc(uint8_t, 4096);
FX_DWORD dwRead;
do {
dwRead = pSF->ReadBlock(pBuf, 4096);
@@ -1055,8 +1055,8 @@ CPDF_Stream* CPDF_Stream::Clone(FX_BOOL bDirect, FPDF_LPFCloneStreamCallback lpf
pObj->InitStream((IFX_FileRead*)pFS, pCloneDict);
return pObj;
}
-extern FX_BOOL PDF_DataDecode(FX_LPCBYTE src_buf, FX_DWORD src_size, const CPDF_Dictionary* pDict,
- FX_LPBYTE& dest_buf, FX_DWORD& dest_size, CFX_ByteString& ImageEncoding,
+extern FX_BOOL PDF_DataDecode(const uint8_t* src_buf, FX_DWORD src_size, const CPDF_Dictionary* pDict,
+ uint8_t*& dest_buf, FX_DWORD& dest_size, CFX_ByteString& ImageEncoding,
CPDF_Dictionary*& pImageParms, FX_DWORD estimated_size, FX_BOOL bImageAcc);
CPDF_StreamAcc::CPDF_StreamAcc()
{
@@ -1077,10 +1077,10 @@ void CPDF_StreamAcc::LoadAllData(const CPDF_Stream* pStream, FX_BOOL bRawAccess,
if (pStream->IsMemoryBased() &&
(!pStream->GetDict()->KeyExist(FX_BSTRC("Filter")) || bRawAccess)) {
m_dwSize = pStream->m_dwSize;
- m_pData = (FX_LPBYTE)pStream->m_pDataBuf;
+ m_pData = (uint8_t*)pStream->m_pDataBuf;
return;
}
- FX_LPBYTE pSrcData;
+ uint8_t* pSrcData;
FX_DWORD dwSrcSize = pStream->m_dwSize;
if (dwSrcSize == 0) {
return;
@@ -1093,12 +1093,12 @@ void CPDF_StreamAcc::LoadAllData(const CPDF_Stream* pStream, FX_BOOL bRawAccess,
} else {
pSrcData = pStream->m_pDataBuf;
}
- FX_LPBYTE pDecryptedData;
+ uint8_t* pDecryptedData;
FX_DWORD dwDecryptedSize;
if (pStream->m_pCryptoHandler) {
CFX_BinaryBuf dest_buf;
dest_buf.EstimateSize(pStream->m_pCryptoHandler->DecryptGetSize(dwSrcSize));
- FX_LPVOID context = pStream->m_pCryptoHandler->DecryptStart(pStream->GetObjNum(), pStream->m_GenNum);
+ void* context = pStream->m_pCryptoHandler->DecryptStart(pStream->GetObjNum(), pStream->m_GenNum);
pStream->m_pCryptoHandler->DecryptStream(context, pSrcData, dwSrcSize, dest_buf);
pStream->m_pCryptoHandler->DecryptFinish(context, dest_buf);
pDecryptedData = dest_buf.GetBuffer();
@@ -1137,7 +1137,7 @@ CPDF_StreamAcc::~CPDF_StreamAcc()
FX_Free(m_pSrcData);
}
}
-FX_LPCBYTE CPDF_StreamAcc::GetData() const
+const uint8_t* CPDF_StreamAcc::GetData() const
{
if (m_bNewBuf) {
return m_pData;
@@ -1157,15 +1157,15 @@ FX_DWORD CPDF_StreamAcc::GetSize() const
}
return m_pStream->m_dwSize;
}
-FX_LPBYTE CPDF_StreamAcc::DetachData()
+uint8_t* CPDF_StreamAcc::DetachData()
{
if (m_bNewBuf) {
- FX_LPBYTE p = m_pData;
+ uint8_t* p = m_pData;
m_pData = NULL;
m_dwSize = 0;
return p;
}
- FX_LPBYTE p = FX_Alloc(uint8_t, m_dwSize);
+ uint8_t* p = FX_Alloc(uint8_t, m_dwSize);
FXSYS_memcpy32(p, m_pData, m_dwSize);
return p;
}
@@ -1188,7 +1188,8 @@ CPDF_IndirectObjects::~CPDF_IndirectObjects()
{
FX_POSITION pos = m_IndirectObjs.GetStartPosition();
while (pos) {
- FX_LPVOID key, value;
+ void* key;
+ void* value;
m_IndirectObjs.GetNextAssoc(pos, key, value);
((CPDF_Object*)value)->Destroy();
}
@@ -1198,9 +1199,9 @@ CPDF_Object* CPDF_IndirectObjects::GetIndirectObject(FX_DWORD objnum, struct PAR
if (objnum == 0) {
return NULL;
}
- FX_LPVOID value;
+ void* value;
{
- if (m_IndirectObjs.Lookup((FX_LPVOID)(uintptr_t)objnum, value)) {
+ if (m_IndirectObjs.Lookup((void*)(uintptr_t)objnum, value)) {
if (((CPDF_Object*)value)->GetObjNum() == -1) {
return NULL;
}
@@ -1218,18 +1219,18 @@ CPDF_Object* CPDF_IndirectObjects::GetIndirectObject(FX_DWORD objnum, struct PAR
if (m_LastObjNum < objnum) {
m_LastObjNum = objnum;
}
- if (m_IndirectObjs.Lookup((FX_LPVOID)(uintptr_t)objnum, value)) {
+ if (m_IndirectObjs.Lookup((void*)(uintptr_t)objnum, value)) {
if (value) {
((CPDF_Object *)value)->Destroy();
}
}
- m_IndirectObjs.SetAt((FX_LPVOID)(uintptr_t)objnum, pObj);
+ m_IndirectObjs.SetAt((void*)(uintptr_t)objnum, pObj);
return pObj;
}
int CPDF_IndirectObjects::GetIndirectType(FX_DWORD objnum)
{
- FX_LPVOID value;
- if (m_IndirectObjs.Lookup((FX_LPVOID)(uintptr_t)objnum, value)) {
+ void* value;
+ if (m_IndirectObjs.Lookup((void*)(uintptr_t)objnum, value)) {
return ((CPDF_Object*)value)->GetType();
}
if (m_pParser) {
@@ -1246,29 +1247,29 @@ FX_DWORD CPDF_IndirectObjects::AddIndirectObject(CPDF_Object* pObj)
return pObj->m_ObjNum;
}
m_LastObjNum ++;
- m_IndirectObjs.SetAt((FX_LPVOID)(uintptr_t)m_LastObjNum, pObj);
+ m_IndirectObjs.SetAt((void*)(uintptr_t)m_LastObjNum, pObj);
pObj->m_ObjNum = m_LastObjNum;
return m_LastObjNum;
}
void CPDF_IndirectObjects::ReleaseIndirectObject(FX_DWORD objnum)
{
- FX_LPVOID value;
- if (!m_IndirectObjs.Lookup((FX_LPVOID)(uintptr_t)objnum, value)) {
+ void* value;
+ if (!m_IndirectObjs.Lookup((void*)(uintptr_t)objnum, value)) {
return;
}
if (((CPDF_Object*)value)->GetObjNum() == -1) {
return;
}
((CPDF_Object*)value)->Destroy();
- m_IndirectObjs.RemoveKey((FX_LPVOID)(uintptr_t)objnum);
+ m_IndirectObjs.RemoveKey((void*)(uintptr_t)objnum);
}
void CPDF_IndirectObjects::InsertIndirectObject(FX_DWORD objnum, CPDF_Object* pObj)
{
if (objnum == 0 || pObj == NULL) {
return;
}
- FX_LPVOID value = NULL;
- if (m_IndirectObjs.Lookup((FX_LPVOID)(uintptr_t)objnum, value)) {
+ void* value = NULL;
+ if (m_IndirectObjs.Lookup((void*)(uintptr_t)objnum, value)) {
if (value)
{
if (pObj->GetGenNum() <= ((CPDF_Object*)value)->GetGenNum())
@@ -1278,7 +1279,7 @@ void CPDF_IndirectObjects::InsertIndirectObject(FX_DWORD objnum, CPDF_Object* pO
}
}
pObj->m_ObjNum = objnum;
- m_IndirectObjs.SetAt((FX_LPVOID)(uintptr_t)objnum, pObj);
+ m_IndirectObjs.SetAt((void*)(uintptr_t)objnum, pObj);
if (m_LastObjNum < objnum) {
m_LastObjNum = objnum;
}
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
index 4afc3a668b..09c5c39e4f 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
@@ -88,7 +88,7 @@ void CPDF_Parser::CloseParser(FX_BOOL bReParse)
}
FX_POSITION pos = m_ObjectStreamMap.GetStartPosition();
while (pos) {
- FX_LPVOID objnum;
+ void* objnum;
CPDF_StreamAcc* pStream;
m_ObjectStreamMap.GetNextAssoc(pos, objnum, (void*&)pStream);
delete pStream;
@@ -128,7 +128,7 @@ static int32_t GetHeaderOffset(IFX_FileRead* pFile)
}
return -1;
}
-FX_DWORD CPDF_Parser::StartParse(FX_LPCSTR filename, FX_BOOL bReParse)
+FX_DWORD CPDF_Parser::StartParse(const FX_CHAR* filename, FX_BOOL bReParse)
{
IFX_FileRead* pFileAccess = FX_CreateFileRead(filename);
if (!pFileAccess) {
@@ -136,7 +136,7 @@ FX_DWORD CPDF_Parser::StartParse(FX_LPCSTR filename, FX_BOOL bReParse)
}
return StartParse(pFileAccess, bReParse);
}
-FX_DWORD CPDF_Parser::StartParse(FX_LPCWSTR filename, FX_BOOL bReParse)
+FX_DWORD CPDF_Parser::StartParse(const FX_WCHAR* filename, FX_BOOL bReParse)
{
IFX_FileRead* pFileAccess = FX_CreateFileRead(filename);
if (!pFileAccess) {
@@ -183,7 +183,7 @@ FX_DWORD CPDF_Parser::StartParse(IFX_FileRead* pFileAccess, FX_BOOL bReParse, FX
FX_BOOL bXRefRebuilt = FALSE;
if (m_Syntax.SearchWord(FX_BSTRC("startxref"), TRUE, FALSE, 4096)) {
FX_FILESIZE startxref_offset = m_Syntax.SavePos();
- FX_LPVOID pResult = FXSYS_bsearch(&startxref_offset, m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
+ void* pResult = FXSYS_bsearch(&startxref_offset, m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
if (pResult == NULL) {
m_SortedOffset.Add(startxref_offset);
}
@@ -444,7 +444,7 @@ FX_BOOL CPDF_Parser::LoadLinearizedCrossRefV4(FX_FILESIZE pos, FX_DWORD dwObjCou
{
FX_FILESIZE dwStartPos = pos - m_Syntax.m_HeaderOffset;
m_Syntax.RestorePos(dwStartPos);
- FX_LPVOID pResult = FXSYS_bsearch(&pos, m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
+ void* pResult = FXSYS_bsearch(&pos, m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
if (pResult == NULL) {
m_SortedOffset.Add(pos);
}
@@ -462,7 +462,7 @@ FX_BOOL CPDF_Parser::LoadLinearizedCrossRefV4(FX_FILESIZE pos, FX_DWORD dwObjCou
FX_Free(pBuf);
return FALSE;
}
- if (!m_Syntax.ReadBlock((FX_LPBYTE)pBuf, dwReadSize)) {
+ if (!m_Syntax.ReadBlock((uint8_t*)pBuf, dwReadSize)) {
FX_Free(pBuf);
return FALSE;
}
@@ -489,7 +489,7 @@ FX_BOOL CPDF_Parser::LoadLinearizedCrossRefV4(FX_FILESIZE pos, FX_DWORD dwObjCou
}
m_ObjVersion.SetAtGrow(objnum, version);
if (m_CrossRef[objnum] < m_Syntax.m_FileLen) {
- FX_LPVOID pResult = FXSYS_bsearch(&m_CrossRef[objnum], m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
+ void* pResult = FXSYS_bsearch(&m_CrossRef[objnum], m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
if (pResult == NULL) {
m_SortedOffset.Add(m_CrossRef[objnum]);
}
@@ -508,12 +508,12 @@ FX_BOOL CPDF_Parser::LoadCrossRefV4(FX_FILESIZE pos, FX_FILESIZE streampos, FX_B
if (m_Syntax.GetKeyword() != FX_BSTRC("xref")) {
return FALSE;
}
- FX_LPVOID pResult = FXSYS_bsearch(&pos, m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
+ void* pResult = FXSYS_bsearch(&pos, m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
if (pResult == NULL) {
m_SortedOffset.Add(pos);
}
if (streampos) {
- FX_LPVOID pResult = FXSYS_bsearch(&streampos, m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
+ void* pResult = FXSYS_bsearch(&streampos, m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
if (pResult == NULL) {
m_SortedOffset.Add(streampos);
}
@@ -549,7 +549,7 @@ FX_BOOL CPDF_Parser::LoadCrossRefV4(FX_FILESIZE pos, FX_FILESIZE streampos, FX_B
FX_BOOL bFirstBlock = TRUE;
for (int32_t block = 0; block < nBlocks; block ++) {
int32_t block_size = block == nBlocks - 1 ? count % 1024 : 1024;
- m_Syntax.ReadBlock((FX_LPBYTE)pBuf, block_size * recordsize);
+ m_Syntax.ReadBlock((uint8_t*)pBuf, block_size * recordsize);
for (int32_t i = 0; i < block_size; i ++) {
FX_DWORD objnum = start_objnum + block * 1024 + i;
char* pEntry = pBuf + i * recordsize;
@@ -585,7 +585,7 @@ FX_BOOL CPDF_Parser::LoadCrossRefV4(FX_FILESIZE pos, FX_FILESIZE streampos, FX_B
}
m_ObjVersion.SetAtGrow(objnum, version);
if (m_CrossRef[objnum] < m_Syntax.m_FileLen) {
- FX_LPVOID pResult = FXSYS_bsearch(&m_CrossRef[objnum], m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
+ void* pResult = FXSYS_bsearch(&m_CrossRef[objnum], m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
if (pResult == NULL) {
m_SortedOffset.Add(m_CrossRef[objnum]);
}
@@ -634,7 +634,7 @@ FX_BOOL CPDF_Parser::RebuildCrossRef()
int32_t inside_index = 0;
FX_DWORD objnum = 0, gennum = 0;
int32_t depth = 0;
- FX_LPBYTE buffer = FX_Alloc(uint8_t, 4096);
+ uint8_t* buffer = FX_Alloc(uint8_t, 4096);
FX_FILESIZE pos = m_Syntax.m_HeaderOffset;
FX_FILESIZE start_pos = 0, start_pos1 = 0;
FX_FILESIZE last_obj = -1, last_xref = -1, last_trailer = -1;
@@ -780,7 +780,7 @@ FX_BOOL CPDF_Parser::RebuildCrossRef()
}
FX_FILESIZE obj_pos = start_pos - m_Syntax.m_HeaderOffset;
last_obj = start_pos;
- FX_LPVOID pResult = FXSYS_bsearch(&obj_pos, m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
+ void* pResult = FXSYS_bsearch(&obj_pos, m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
if (pResult == NULL) {
m_SortedOffset.Add(obj_pos);
}
@@ -983,14 +983,14 @@ FX_BOOL CPDF_Parser::RebuildCrossRef()
last_trailer = m_Syntax.m_FileLen;
}
FX_FILESIZE offset = last_trailer - m_Syntax.m_HeaderOffset;
- FX_LPVOID pResult = FXSYS_bsearch(&offset, m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
+ void* pResult = FXSYS_bsearch(&offset, m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
if (pResult == NULL) {
m_SortedOffset.Add(offset);
}
FX_Free(buffer);
return TRUE;
}
-static FX_DWORD _GetVarInt(FX_LPCBYTE p, int32_t n)
+static FX_DWORD _GetVarInt(const uint8_t* p, int32_t n)
{
FX_DWORD result = 0;
for (int32_t i = 0; i < n; i ++) {
@@ -1071,7 +1071,7 @@ FX_BOOL CPDF_Parser::LoadCrossRefV5(FX_FILESIZE pos, FX_FILESIZE& prev, FX_BOOL
FX_DWORD totalWidth = dwAccWidth.ValueOrDie();
CPDF_StreamAcc acc;
acc.LoadAllData(pStream);
- FX_LPCBYTE pData = acc.GetData();
+ const uint8_t* pData = acc.GetData();
FX_DWORD dwTotalSize = acc.GetSize();
FX_DWORD segindex = 0;
for (FX_DWORD i = 0; i < arrIndex.size(); i ++) {
@@ -1087,7 +1087,7 @@ FX_BOOL CPDF_Parser::LoadCrossRefV5(FX_FILESIZE pos, FX_FILESIZE& prev, FX_BOOL
if (!dwCaculatedSize.IsValid() || dwCaculatedSize.ValueOrDie() > dwTotalSize) {
continue;
}
- FX_LPCBYTE segstart = pData + segindex * totalWidth;
+ const uint8_t* segstart = pData + segindex * totalWidth;
FX_SAFE_DWORD dwMaxObjNum = startnum;
dwMaxObjNum += count;
FX_DWORD dwV5Size = pdfium::base::checked_cast<FX_DWORD, int32_t> (m_V5Type.GetSize());
@@ -1096,14 +1096,14 @@ FX_BOOL CPDF_Parser::LoadCrossRefV5(FX_FILESIZE pos, FX_FILESIZE& prev, FX_BOOL
}
for (FX_DWORD j = 0; j < count; j ++) {
int32_t type = 1;
- FX_LPCBYTE entrystart = segstart + j * totalWidth;
+ const uint8_t* entrystart = segstart + j * totalWidth;
if (WidthArray[0]) {
type = _GetVarInt(entrystart, WidthArray[0]);
}
if (m_V5Type[startnum + j] == 255) {
FX_FILESIZE offset = _GetVarInt(entrystart + WidthArray[0], WidthArray[1]);
m_CrossRef[startnum + j] = offset;
- FX_LPVOID pResult = FXSYS_bsearch(&offset, m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
+ void* pResult = FXSYS_bsearch(&offset, m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
if (pResult == NULL) {
m_SortedOffset.Add(offset);
}
@@ -1119,7 +1119,7 @@ FX_BOOL CPDF_Parser::LoadCrossRefV5(FX_FILESIZE pos, FX_FILESIZE& prev, FX_BOOL
FX_FILESIZE offset = _GetVarInt(entrystart + WidthArray[0], WidthArray[1]);
m_CrossRef[startnum + j] = offset;
if (type == 1) {
- FX_LPVOID pResult = FXSYS_bsearch(&offset, m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
+ void* pResult = FXSYS_bsearch(&offset, m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
if (pResult == NULL) {
m_SortedOffset.Add(offset);
}
@@ -1181,7 +1181,7 @@ FX_BOOL CPDF_Parser::IsFormStream(FX_DWORD objnum, FX_BOOL& bForm)
return TRUE;
}
FX_FILESIZE pos = m_CrossRef[objnum];
- FX_LPVOID pResult = FXSYS_bsearch(&pos, m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
+ void* pResult = FXSYS_bsearch(&pos, m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
if (pResult == NULL) {
return TRUE;
}
@@ -1215,7 +1215,7 @@ CPDF_Object* CPDF_Parser::ParseIndirectObject(CPDF_IndirectObjects* pObjList, FX
int32_t n = pObjStream->GetDict()->GetInteger(FX_BSTRC("N"));
int32_t offset = pObjStream->GetDict()->GetInteger(FX_BSTRC("First"));
CPDF_SyntaxParser syntax;
- CFX_SmartPointer<IFX_FileStream> file(FX_CreateMemoryStream((FX_LPBYTE)pObjStream->GetData(), (size_t)pObjStream->GetSize(), FALSE));
+ CFX_SmartPointer<IFX_FileStream> file(FX_CreateMemoryStream((uint8_t*)pObjStream->GetData(), (size_t)pObjStream->GetSize(), FALSE));
syntax.InitParser(file.Get(), 0);
CPDF_Object* pRet = NULL;
while (n) {
@@ -1260,7 +1260,7 @@ FX_FILESIZE CPDF_Parser::GetObjectSize(FX_DWORD objnum)
if (offset == 0) {
return 0;
}
- FX_LPVOID pResult = FXSYS_bsearch(&offset, m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
+ void* pResult = FXSYS_bsearch(&offset, m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
if (pResult == NULL) {
return 0;
}
@@ -1271,7 +1271,7 @@ FX_FILESIZE CPDF_Parser::GetObjectSize(FX_DWORD objnum)
}
return 0;
}
-void CPDF_Parser::GetIndirectBinary(FX_DWORD objnum, FX_LPBYTE& pBuffer, FX_DWORD& size)
+void CPDF_Parser::GetIndirectBinary(FX_DWORD objnum, uint8_t*& pBuffer, FX_DWORD& size)
{
pBuffer = NULL;
size = 0;
@@ -1286,9 +1286,9 @@ void CPDF_Parser::GetIndirectBinary(FX_DWORD objnum, FX_LPBYTE& pBuffer, FX_DWOR
int32_t n = pObjStream->GetDict()->GetInteger(FX_BSTRC("N"));
int32_t offset = pObjStream->GetDict()->GetInteger(FX_BSTRC("First"));
CPDF_SyntaxParser syntax;
- FX_LPCBYTE pData = pObjStream->GetData();
+ const uint8_t* pData = pObjStream->GetData();
FX_DWORD totalsize = pObjStream->GetSize();
- CFX_SmartPointer<IFX_FileStream> file(FX_CreateMemoryStream((FX_LPBYTE)pData, (size_t)totalsize, FALSE));
+ CFX_SmartPointer<IFX_FileStream> file(FX_CreateMemoryStream((uint8_t*)pData, (size_t)totalsize, FALSE));
syntax.InitParser(file.Get(), 0);
while (n) {
FX_DWORD thisnum = syntax.GetDirectNum();
@@ -1336,7 +1336,7 @@ void CPDF_Parser::GetIndirectBinary(FX_DWORD objnum, FX_LPBYTE& pBuffer, FX_DWOR
m_Syntax.RestorePos(SavedPos);
return;
}
- FX_LPVOID pResult = FXSYS_bsearch(&pos, m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
+ void* pResult = FXSYS_bsearch(&pos, m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
if (pResult == NULL) {
m_Syntax.RestorePos(SavedPos);
return;
@@ -1666,7 +1666,7 @@ FX_DWORD CPDF_Parser::LoadLinearizedMainXRefTable()
m_LastXRefOffset += dwCount;
FX_POSITION pos = m_ObjectStreamMap.GetStartPosition();
while (pos) {
- FX_LPVOID objnum;
+ void* objnum;
CPDF_StreamAcc* pStream;
m_ObjectStreamMap.GetNextAssoc(pos, objnum, (void*&)pStream);
delete pStream;
@@ -1769,7 +1769,7 @@ FX_BOOL CPDF_SyntaxParser::GetCharAtBackward(FX_FILESIZE pos, uint8_t& ch)
ch = m_pFileBuf[pos - m_BufOffset];
return TRUE;
}
-FX_BOOL CPDF_SyntaxParser::ReadBlock(FX_LPBYTE pBuf, FX_DWORD size)
+FX_BOOL CPDF_SyntaxParser::ReadBlock(uint8_t* pBuf, FX_DWORD size)
{
if (!m_pFileAccess->ReadBlock(pBuf, m_Pos + m_HeaderOffset, size)) {
return FALSE;
@@ -2051,12 +2051,12 @@ CFX_ByteString CPDF_SyntaxParser::GetNextWord(FX_BOOL& bIsNumber)
{
GetNextWord();
bIsNumber = m_bIsNumber;
- return CFX_ByteString((FX_LPCSTR)m_WordBuffer, m_WordSize);
+ return CFX_ByteString((const FX_CHAR*)m_WordBuffer, m_WordSize);
}
CFX_ByteString CPDF_SyntaxParser::GetKeyword()
{
GetNextWord();
- return CFX_ByteString((FX_LPCSTR)m_WordBuffer, m_WordSize);
+ return CFX_ByteString((const FX_CHAR*)m_WordBuffer, m_WordSize);
}
CPDF_Object* CPDF_SyntaxParser::GetObject(CPDF_IndirectObjects* pObjList, FX_DWORD objnum, FX_DWORD gennum, PARSE_CONTEXT* pContext, FX_BOOL bDecrypt)
{
@@ -2481,12 +2481,12 @@ CPDF_Stream* CPDF_SyntaxParser::ReadStream(CPDF_Dictionary* pDict, PARSE_CONTEXT
m_Pos = StreamStartPos;
}
CPDF_Stream* pStream;
- FX_LPBYTE pData = FX_Alloc(uint8_t, len);
+ uint8_t* pData = FX_Alloc(uint8_t, len);
ReadBlock(pData, len);
if (pCryptoHandler) {
CFX_BinaryBuf dest_buf;
dest_buf.EstimateSize(pCryptoHandler->DecryptGetSize(len));
- FX_LPVOID context = pCryptoHandler->DecryptStart(objnum, gennum);
+ void* context = pCryptoHandler->DecryptStart(objnum, gennum);
pCryptoHandler->DecryptStream(context, pData, len, dest_buf);
pCryptoHandler->DecryptFinish(context, dest_buf);
FX_Free(pData);
@@ -2526,9 +2526,9 @@ int32_t CPDF_SyntaxParser::GetDirectNum()
return 0;
}
m_WordBuffer[m_WordSize] = 0;
- return FXSYS_atoi((FX_LPCSTR)m_WordBuffer);
+ return FXSYS_atoi((const FX_CHAR*)m_WordBuffer);
}
-FX_BOOL CPDF_SyntaxParser::IsWholeWord(FX_FILESIZE startpos, FX_FILESIZE limit, FX_LPCBYTE tag, FX_DWORD taglen)
+FX_BOOL CPDF_SyntaxParser::IsWholeWord(FX_FILESIZE startpos, FX_FILESIZE limit, const uint8_t* tag, FX_DWORD taglen)
{
uint8_t type = PDF_CharType[tag[0]];
FX_BOOL bCheckLeft = type != 'D' && type != 'W';
@@ -2560,7 +2560,7 @@ FX_BOOL CPDF_SyntaxParser::SearchWord(FX_BSTR tag, FX_BOOL bWholeWord, FX_BOOL b
if (!bForward) {
offset = taglen - 1;
}
- FX_LPCBYTE tag_data = tag.GetPtr();
+ const uint8_t* tag_data = tag.GetPtr();
uint8_t byte;
while (1) {
if (bForward) {
@@ -2616,7 +2616,7 @@ FX_BOOL CPDF_SyntaxParser::SearchWord(FX_BSTR tag, FX_BOOL bWholeWord, FX_BOOL b
return FALSE;
}
struct _SearchTagRecord {
- FX_LPCBYTE m_pTag;
+ const uint8_t* m_pTag;
FX_DWORD m_Len;
FX_DWORD m_Offset;
};
@@ -2771,7 +2771,7 @@ protected:
FX_BOOL CheckAllCrossRefStream(IFX_DownloadHints *pHints);
int32_t CheckCrossRefStream(IFX_DownloadHints *pHints, FX_FILESIZE &xref_offset);
- FX_BOOL IsLinearizedFile(FX_LPBYTE pData, FX_DWORD dwLen);
+ FX_BOOL IsLinearizedFile(uint8_t* pData, FX_DWORD dwLen);
void SetStartOffset(FX_FILESIZE dwOffset);
FX_BOOL GetNextToken(CFX_ByteString &token);
FX_BOOL GetNextChar(uint8_t &ch);
@@ -3021,7 +3021,7 @@ FX_DWORD CPDF_DataAvail::GetObjectSize(FX_DWORD objnum, FX_FILESIZE& offset)
if (offset == 0) {
return 0;
}
- FX_LPVOID pResult = FXSYS_bsearch(&offset, pParser->m_SortedOffset.GetData(), pParser->m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
+ void* pResult = FXSYS_bsearch(&offset, pParser->m_SortedOffset.GetData(), pParser->m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
if (pResult == NULL) {
return 0;
}
@@ -3710,7 +3710,7 @@ int32_t CPDF_DataAvail::IsLinearizedPDF()
}
return PDF_NOT_LINEARIZED;
}
-FX_BOOL CPDF_DataAvail::IsLinearizedFile(FX_LPBYTE pData, FX_DWORD dwLen)
+FX_BOOL CPDF_DataAvail::IsLinearizedFile(uint8_t* pData, FX_DWORD dwLen)
{
CFX_SmartPointer<IFX_FileStream> file(FX_CreateMemoryStream(pData, (size_t)dwLen, FALSE));
int32_t offset = GetHeaderOffset(file.Get());
@@ -3794,7 +3794,7 @@ int32_t CPDF_DataAvail::CheckCrossRefStream(IFX_DownloadHints* pHints, FX_FILESI
if (m_pFileAvail->IsDataAvail(m_Pos, req_size)) {
int32_t iSize = (int32_t)(m_Pos + req_size - m_dwCurrentXRefSteam);
CFX_BinaryBuf buf(iSize);
- FX_LPBYTE pBuf = buf.GetBuffer();
+ uint8_t* pBuf = buf.GetBuffer();
m_pFileRead->ReadBlock(pBuf, m_dwCurrentXRefSteam, iSize);
CFX_SmartPointer<IFX_FileStream> file(FX_CreateMemoryStream(pBuf, (size_t)iSize, FALSE));
m_parser.m_Syntax.InitParser(file.Get(), 0);
@@ -4032,7 +4032,7 @@ FX_BOOL CPDF_DataAvail::CheckTrailer(IFX_DownloadHints* pHints)
if (m_pFileAvail->IsDataAvail(m_Pos, iTrailerSize)) {
int32_t iSize = (int32_t)(m_Pos + iTrailerSize - m_dwTrailerOffset);
CFX_BinaryBuf buf(iSize);
- FX_LPBYTE pBuf = buf.GetBuffer();
+ uint8_t* pBuf = buf.GetBuffer();
if (!pBuf) {
m_docStatus = PDF_DATAAVAIL_ERROR;
return FALSE;
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
index b02139db0f..e6474550a2 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
@@ -43,7 +43,7 @@ const char PDF_CharType[256] = {
#ifndef MAX_PATH
#define MAX_PATH 4096
#endif
-CPDF_SimpleParser::CPDF_SimpleParser(FX_LPCBYTE pData, FX_DWORD dwSize)
+CPDF_SimpleParser::CPDF_SimpleParser(const uint8_t* pData, FX_DWORD dwSize)
{
m_pData = pData;
m_dwSize = dwSize;
@@ -55,7 +55,7 @@ CPDF_SimpleParser::CPDF_SimpleParser(FX_BSTR str)
m_dwSize = str.GetLength();
m_dwCurPos = 0;
}
-void CPDF_SimpleParser::ParseWord(FX_LPCBYTE& pStart, FX_DWORD& dwSize, int& type)
+void CPDF_SimpleParser::ParseWord(const uint8_t*& pStart, FX_DWORD& dwSize, int& type)
{
pStart = NULL;
dwSize = 0;
@@ -153,7 +153,7 @@ void CPDF_SimpleParser::ParseWord(FX_LPCBYTE& pStart, FX_DWORD& dwSize, int& typ
}
CFX_ByteStringC CPDF_SimpleParser::GetWord()
{
- FX_LPCBYTE pStart;
+ const uint8_t* pStart;
FX_DWORD dwSize;
int type;
ParseWord(pStart, dwSize, type);
@@ -290,13 +290,13 @@ static int _hex2dec(char ch)
CFX_ByteString PDF_NameDecode(FX_BSTR bstr)
{
int size = bstr.GetLength();
- FX_LPCSTR pSrc = bstr.GetCStr();
+ const FX_CHAR* pSrc = bstr.GetCStr();
if (FXSYS_memchr(pSrc, '#', size) == NULL) {
return bstr;
}
CFX_ByteString result;
- FX_LPSTR pDestStart = result.GetBuffer(size);
- FX_LPSTR pDest = pDestStart;
+ FX_CHAR* pDestStart = result.GetBuffer(size);
+ FX_CHAR* pDest = pDestStart;
for (int i = 0; i < size; i ++) {
if (pSrc[i] == '#' && i < size - 2) {
*pDest ++ = _hex2dec(pSrc[i + 1]) * 16 + _hex2dec(pSrc[i + 2]);
@@ -317,7 +317,7 @@ CFX_ByteString PDF_NameDecode(const CFX_ByteString& orig)
}
CFX_ByteString PDF_NameEncode(const CFX_ByteString& orig)
{
- FX_LPBYTE src_buf = (FX_LPBYTE)orig.c_str();
+ uint8_t* src_buf = (uint8_t*)orig.c_str();
int src_len = orig.GetLength();
int dest_len = 0;
int i;
@@ -334,7 +334,7 @@ CFX_ByteString PDF_NameEncode(const CFX_ByteString& orig)
return orig;
}
CFX_ByteString res;
- FX_LPSTR dest_buf = res.GetBuffer(dest_len);
+ FX_CHAR* dest_buf = res.GetBuffer(dest_len);
dest_len = 0;
for (i = 0; i < src_len; i ++) {
uint8_t ch = src_buf[i];
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp
index d22bd4b760..46f1640793 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp
@@ -29,7 +29,8 @@ void CPDF_PageRenderCache::ClearAll()
{
FX_POSITION pos = m_ImageCaches.GetStartPosition();
while (pos) {
- FX_LPVOID key, value;
+ void* key;
+ void* value;
m_ImageCaches.GetNextAssoc(pos, key, value);
delete (CPDF_ImageCache*)value;
}
@@ -47,7 +48,8 @@ void CPDF_PageRenderCache::CacheOptimization(int32_t dwLimitCacheSize)
FX_POSITION pos = m_ImageCaches.GetStartPosition();
int i = 0;
while (pos) {
- FX_LPVOID key, value;
+ void* key;
+ void* value;
m_ImageCaches.GetNextAssoc(pos, key, value);
pCACHEINFO[i].time = ((CPDF_ImageCache*)value)->GetTimeCount();
pCACHEINFO[i++].pStream = ((CPDF_ImageCache*)value)->GetStream();
@@ -72,7 +74,7 @@ void CPDF_PageRenderCache::CacheOptimization(int32_t dwLimitCacheSize)
}
void CPDF_PageRenderCache::ClearImageCache(CPDF_Stream* pStream)
{
- FX_LPVOID value = m_ImageCaches.GetValueAt(pStream);
+ void* value = m_ImageCaches.GetValueAt(pStream);
if (value == NULL) {
m_ImageCaches.RemoveKey(pStream);
return;
@@ -86,7 +88,8 @@ FX_DWORD CPDF_PageRenderCache::EstimateSize()
FX_DWORD dwSize = 0;
FX_POSITION pos = m_ImageCaches.GetStartPosition();
while (pos) {
- FX_LPVOID key, value;
+ void* key;
+ void* value;
m_ImageCaches.GetNextAssoc(pos, key, value);
dwSize += ((CPDF_ImageCache*)value)->EstimateSize();
}
@@ -99,7 +102,7 @@ FX_DWORD CPDF_PageRenderCache::GetCachedSize(CPDF_Stream* pStream) const
return m_nCacheSize;
}
CPDF_ImageCache* pImageCache;
- if (!m_ImageCaches.Lookup(pStream, (FX_LPVOID&)pImageCache)) {
+ if (!m_ImageCaches.Lookup(pStream, (void*&)pImageCache)) {
return 0;
}
return pImageCache->EstimateSize();
@@ -109,7 +112,7 @@ void CPDF_PageRenderCache::GetCachedBitmap(CPDF_Stream* pStream, CFX_DIBSource*&
int32_t downsampleWidth, int32_t downsampleHeight)
{
CPDF_ImageCache* pImageCache;
- FX_BOOL bFind = m_ImageCaches.Lookup(pStream, (FX_LPVOID&)pImageCache);
+ FX_BOOL bFind = m_ImageCaches.Lookup(pStream, (void*&)pImageCache);
if (!bFind) {
pImageCache = new CPDF_ImageCache(m_pPage->m_pDocument, pStream);
}
@@ -124,7 +127,7 @@ void CPDF_PageRenderCache::GetCachedBitmap(CPDF_Stream* pStream, CFX_DIBSource*&
}
FX_BOOL CPDF_PageRenderCache::StartGetCachedBitmap(CPDF_Stream* pStream, FX_BOOL bStdCS, FX_DWORD GroupFamily, FX_BOOL bLoadMask, CPDF_RenderStatus* pRenderStatus, int32_t downsampleWidth, int32_t downsampleHeight)
{
- m_bCurFindCache = m_ImageCaches.Lookup(pStream, (FX_LPVOID&)m_pCurImageCache);
+ m_bCurFindCache = m_ImageCaches.Lookup(pStream, (void*&)m_pCurImageCache);
if (!m_bCurFindCache) {
m_pCurImageCache = new CPDF_ImageCache(m_pPage->m_pDocument, pStream);
}
@@ -159,7 +162,7 @@ FX_BOOL CPDF_PageRenderCache::Continue(IFX_Pause* pPause)
void CPDF_PageRenderCache::ResetBitmap(CPDF_Stream* pStream, const CFX_DIBitmap* pBitmap)
{
CPDF_ImageCache* pImageCache;
- if (!m_ImageCaches.Lookup(pStream, (FX_LPVOID&)pImageCache)) {
+ if (!m_ImageCaches.Lookup(pStream, (void*&)pImageCache)) {
if (pBitmap == NULL) {
return;
}
@@ -209,7 +212,8 @@ void CPDF_PageRenderCache::ClearImageData()
{
FX_POSITION pos = m_ImageCaches.GetStartPosition();
while (pos) {
- FX_LPVOID key, value;
+ void* key;
+ void* value;
m_ImageCaches.GetNextAssoc(pos, key, value);
((CPDF_ImageCache*)value)->ClearImageData();
}
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp
index 699f84830f..669ba4da49 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp
@@ -141,7 +141,7 @@ CPDF_DIBTransferFunc::CPDF_DIBTransferFunc(const CPDF_TransferFunc* pTransferFun
m_RampG = &pTransferFunc->m_Samples[256];
m_RampB = &pTransferFunc->m_Samples[512];
}
-void CPDF_DIBTransferFunc::TranslateScanline(FX_LPBYTE dest_buf, FX_LPCBYTE src_buf) const
+void CPDF_DIBTransferFunc::TranslateScanline(uint8_t* dest_buf, const uint8_t* src_buf) const
{
int i;
FX_BOOL bSkip = FALSE;
@@ -234,7 +234,7 @@ void CPDF_DIBTransferFunc::TranslateScanline(FX_LPBYTE dest_buf, FX_LPCBYTE src_
break;
}
}
-void CPDF_DIBTransferFunc::TranslateDownSamples(FX_LPBYTE dest_buf, FX_LPCBYTE src_buf, int pixels, int Bpp) const
+void CPDF_DIBTransferFunc::TranslateDownSamples(uint8_t* dest_buf, const uint8_t* src_buf, int pixels, int Bpp) const
{
if (Bpp == 8) {
for (int i = 0; i < pixels; i ++) {
@@ -519,8 +519,8 @@ FX_BOOL CPDF_ImageRenderer::DrawPatternImage(const CFX_Matrix* pObj2Device)
int matte_g = FXARGB_G(m_Loader.m_MatteColor);
int matte_b = FXARGB_B(m_Loader.m_MatteColor);
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = (FX_LPBYTE)bitmap_device1.GetBitmap()->GetScanline(row);
- FX_LPCBYTE mask_scan = bitmap_device2.GetBitmap()->GetScanline(row);
+ uint8_t* dest_scan = (uint8_t*)bitmap_device1.GetBitmap()->GetScanline(row);
+ const uint8_t* mask_scan = bitmap_device2.GetBitmap()->GetScanline(row);
for (int col = 0; col < width; col ++) {
int alpha = *mask_scan ++;
if (alpha) {
@@ -606,8 +606,8 @@ FX_BOOL CPDF_ImageRenderer::DrawMaskedImage()
int matte_g = FXARGB_G(m_Loader.m_MatteColor);
int matte_b = FXARGB_B(m_Loader.m_MatteColor);
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = (FX_LPBYTE)bitmap_device1.GetBitmap()->GetScanline(row);
- FX_LPCBYTE mask_scan = bitmap_device2.GetBitmap()->GetScanline(row);
+ uint8_t* dest_scan = (uint8_t*)bitmap_device1.GetBitmap()->GetScanline(row);
+ const uint8_t* mask_scan = bitmap_device2.GetBitmap()->GetScanline(row);
for (int col = 0; col < width; col ++) {
int alpha = *mask_scan ++;
if (alpha) {
@@ -823,7 +823,7 @@ CPDF_QuickStretcher::~CPDF_QuickStretcher()
delete m_pDecoder;
}
}
-ICodec_ScanlineDecoder* FPDFAPI_CreateFlateDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height,
+ICodec_ScanlineDecoder* FPDFAPI_CreateFlateDecoder(const uint8_t* src_buf, FX_DWORD src_size, int width, int height,
int nComps, int bpc, const CPDF_Dictionary* pParams);
FX_BOOL CPDF_QuickStretcher::Start(CPDF_ImageObject* pImageObj, CFX_AffineMatrix* pImage2Device, const FX_RECT* pClipBox)
{
@@ -903,7 +903,7 @@ FX_BOOL CPDF_QuickStretcher::Start(CPDF_ImageObject* pImageObj, CFX_AffineMatrix
}
FX_BOOL CPDF_QuickStretcher::Continue(IFX_Pause* pPause)
{
- FX_LPBYTE result_buf = m_pBitmap->GetBuffer();
+ uint8_t* result_buf = m_pBitmap->GetBuffer();
int src_width = m_pDecoder ? m_pDecoder->GetWidth() : m_SrcWidth;
int src_height = m_pDecoder ? m_pDecoder->GetHeight() : m_SrcHeight;
int src_pitch = src_width * m_Bpp;
@@ -916,7 +916,7 @@ FX_BOOL CPDF_QuickStretcher::Continue(IFX_Pause* pPause)
dest_y = m_LineIndex;
src_y = (dest_y + m_ClipTop) * src_height / m_DestHeight;
}
- FX_LPCBYTE src_scan;
+ const uint8_t* src_scan;
if (m_pDecoder) {
src_scan = m_pDecoder->GetScanline(src_y);
if (src_scan == NULL) {
@@ -929,11 +929,11 @@ FX_BOOL CPDF_QuickStretcher::Continue(IFX_Pause* pPause)
}
src_scan += src_y * src_pitch;
}
- FX_LPBYTE result_scan = result_buf + dest_y * m_pBitmap->GetPitch();
+ uint8_t* result_scan = result_buf + dest_y * m_pBitmap->GetPitch();
for (int x = 0; x < m_ResultWidth; x ++) {
int dest_x = m_ClipLeft + x;
int src_x = (m_bFlipX ? (m_DestWidth - dest_x - 1) : dest_x) * src_width / m_DestWidth;
- FX_LPCBYTE src_pixel = src_scan + src_x * m_Bpp;
+ const uint8_t* src_pixel = src_scan + src_x * m_Bpp;
if (m_pCS == NULL) {
*result_scan = src_pixel[2];
result_scan ++;
@@ -1049,11 +1049,11 @@ CFX_DIBitmap* CPDF_RenderStatus::LoadSMask(CPDF_Dictionary* pSMaskDict,
delete pMask;
return NULL;
}
- FX_LPBYTE dest_buf = pMask->GetBuffer();
+ uint8_t* dest_buf = pMask->GetBuffer();
int dest_pitch = pMask->GetPitch();
- FX_LPBYTE src_buf = bitmap.GetBuffer();
+ uint8_t* src_buf = bitmap.GetBuffer();
int src_pitch = bitmap.GetPitch();
- FX_LPBYTE pTransfer = FX_Alloc(uint8_t, 256);
+ uint8_t* pTransfer = FX_Alloc(uint8_t, 256);
if (pFunc) {
CFX_FixedBufGrow<FX_FLOAT, 16> results(pFunc->CountOutputs());
for (int i = 0; i < 256; i ++) {
@@ -1070,8 +1070,8 @@ CFX_DIBitmap* CPDF_RenderStatus::LoadSMask(CPDF_Dictionary* pSMaskDict,
if (bLuminosity) {
int Bpp = bitmap.GetBPP() / 8;
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_pos = dest_buf + row * dest_pitch;
- FX_LPBYTE src_pos = src_buf + row * src_pitch;
+ uint8_t* dest_pos = dest_buf + row * dest_pitch;
+ uint8_t* src_pos = src_buf + row * src_pitch;
for (int col = 0; col < width; col ++) {
*dest_pos ++ = pTransfer[FXRGB2GRAY(src_pos[2], src_pos[1], *src_pos)];
src_pos += Bpp;
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
index d45cc1151f..2cbe2e8eb6 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
@@ -16,7 +16,7 @@
namespace {
-unsigned int _GetBits8(FX_LPCBYTE pData, int bitpos, int nbits)
+unsigned int _GetBits8(const uint8_t* pData, int bitpos, int nbits)
{
unsigned int byte = pData[bitpos / 8];
if (nbits == 8) {
@@ -584,9 +584,9 @@ DIB_COMP_DATA* CPDF_DIBSource::GetDecodeAndMaskArray(FX_BOOL& bDefaultDecode, FX
}
return pCompData;
}
-ICodec_ScanlineDecoder* FPDFAPI_CreateFaxDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height,
+ICodec_ScanlineDecoder* FPDFAPI_CreateFaxDecoder(const uint8_t* src_buf, FX_DWORD src_size, int width, int height,
const CPDF_Dictionary* pParams);
-ICodec_ScanlineDecoder* FPDFAPI_CreateFlateDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height,
+ICodec_ScanlineDecoder* FPDFAPI_CreateFlateDecoder(const uint8_t* src_buf, FX_DWORD src_size, int width, int height,
int nComps, int bpc, const CPDF_Dictionary* pParams);
int CPDF_DIBSource::CreateDecoder()
{
@@ -597,7 +597,7 @@ int CPDF_DIBSource::CreateDecoder()
if (m_bDoBpcCheck && m_bpc == 0) {
return 0;
}
- FX_LPCBYTE src_data = m_pStreamAcc->GetData();
+ const uint8_t* src_data = m_pStreamAcc->GetData();
FX_DWORD src_size = m_pStreamAcc->GetSize();
const CPDF_Dictionary* pParams = m_pStreamAcc->GetImageParam();
if (decoder == FX_BSTRC("CCITTFaxDecode")) {
@@ -750,7 +750,7 @@ void CPDF_DIBSource::LoadJpxBitmap()
m_bpc < 8) {
int scale = 8 - m_bpc;
for (FX_DWORD row = 0; row < height; ++row) {
- FX_LPBYTE scanline = (FX_LPBYTE)m_pCachedBitmap->GetScanline(row);
+ uint8_t* scanline = (uint8_t*)m_pCachedBitmap->GetScanline(row);
for (FX_DWORD col = 0; col < width; ++col) {
*scanline = (*scanline) >> scale;
++scanline;
@@ -960,7 +960,7 @@ void CPDF_DIBSource::ValidateDictParam()
}
}
#define NORMALCOLOR_MAX(color, max) (color) > (max) ? (max) : (color) < 0 ? 0 : (color);
-void CPDF_DIBSource::TranslateScanline24bpp(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan) const
+void CPDF_DIBSource::TranslateScanline24bpp(uint8_t* dest_scan, const uint8_t* src_scan) const
{
if (m_bpc == 0) {
return;
@@ -968,7 +968,7 @@ void CPDF_DIBSource::TranslateScanline24bpp(FX_LPBYTE dest_scan, FX_LPCBYTE src_
int max_data = (1 << m_bpc) - 1;
if (m_bDefaultDecode) {
if (m_Family == PDFCS_DEVICERGB || m_Family == PDFCS_CALRGB) {
- FX_LPCBYTE src_pos = src_scan;
+ const uint8_t* src_pos = src_scan;
switch (m_bpc) {
case 16:
for (int col = 0; col < m_Width; col ++) {
@@ -1070,14 +1070,14 @@ void CPDF_DIBSource::TranslateScanline24bpp(FX_LPBYTE dest_scan, FX_LPCBYTE src_
}
}
}
-FX_LPBYTE CPDF_DIBSource::GetBuffer() const
+uint8_t* CPDF_DIBSource::GetBuffer() const
{
if (m_pCachedBitmap) {
return m_pCachedBitmap->GetBuffer();
}
return NULL;
}
-FX_LPCBYTE CPDF_DIBSource::GetScanline(int line) const
+const uint8_t* CPDF_DIBSource::GetScanline(int line) const
{
if (m_bpc == 0) {
return NULL;
@@ -1086,7 +1086,7 @@ FX_LPCBYTE CPDF_DIBSource::GetScanline(int line) const
if (!src_pitch.IsValid())
return NULL;
FX_DWORD src_pitch_value = src_pitch.ValueOrDie();
- FX_LPCBYTE pSrcLine = NULL;
+ const uint8_t* pSrcLine = NULL;
if (m_pCachedBitmap) {
if (line >= m_pCachedBitmap->GetHeight()) {
line = m_pCachedBitmap->GetHeight() - 1;
@@ -1100,7 +1100,7 @@ FX_LPCBYTE CPDF_DIBSource::GetScanline(int line) const
}
}
if (pSrcLine == NULL) {
- FX_LPBYTE pLineBuf = m_pMaskedLine ? m_pMaskedLine : m_pLineBuf;
+ uint8_t* pLineBuf = m_pMaskedLine ? m_pMaskedLine : m_pLineBuf;
FXSYS_memset8(pLineBuf, 0xff, m_Pitch);
return pLineBuf;
}
@@ -1152,8 +1152,8 @@ FX_LPCBYTE CPDF_DIBSource::GetScanline(int line) const
}
}
if (m_bColorKey) {
- FX_LPBYTE pDestPixel = m_pMaskedLine;
- FX_LPCBYTE pSrcPixel = m_pLineBuf;
+ uint8_t* pDestPixel = m_pMaskedLine;
+ const uint8_t* pSrcPixel = m_pLineBuf;
for (int col = 0; col < m_Width; col ++) {
uint8_t index = *pSrcPixel++;
if (m_pPalette) {
@@ -1174,9 +1174,9 @@ FX_LPCBYTE CPDF_DIBSource::GetScanline(int line) const
}
if (m_bColorKey) {
if (m_nComponents == 3 && m_bpc == 8) {
- FX_LPBYTE alpha_channel = m_pMaskedLine + 3;
+ uint8_t* alpha_channel = m_pMaskedLine + 3;
for (int col = 0; col < m_Width; col ++) {
- FX_LPCBYTE pPixel = pSrcLine + col * 3;
+ const uint8_t* pPixel = pSrcLine + col * 3;
alpha_channel[col * 4] = (pPixel[0] < m_pCompData[0].m_ColorKeyMin || pPixel[0] > m_pCompData[0].m_ColorKeyMax ||
pPixel[1] < m_pCompData[1].m_ColorKeyMin || pPixel[1] > m_pCompData[1].m_ColorKeyMax ||
pPixel[2] < m_pCompData[2].m_ColorKeyMin || pPixel[2] > m_pCompData[2].m_ColorKeyMax) ? 0xff : 0;
@@ -1190,8 +1190,8 @@ FX_LPCBYTE CPDF_DIBSource::GetScanline(int line) const
pSrcLine = m_pLineBuf;
}
if (m_bColorKey) {
- FX_LPCBYTE pSrcPixel = pSrcLine;
- FX_LPBYTE pDestPixel = m_pMaskedLine;
+ const uint8_t* pSrcPixel = pSrcLine;
+ uint8_t* pDestPixel = m_pMaskedLine;
for (int col = 0; col < m_Width; col ++) {
*pDestPixel++ = *pSrcPixel++;
*pDestPixel++ = *pSrcPixel++;
@@ -1209,7 +1209,7 @@ FX_BOOL CPDF_DIBSource::SkipToScanline(int line, IFX_Pause* pPause) const
}
return FALSE;
}
-void CPDF_DIBSource::DownSampleScanline(int line, FX_LPBYTE dest_scan, int dest_bpp,
+void CPDF_DIBSource::DownSampleScanline(int line, uint8_t* dest_scan, int dest_bpp,
int dest_width, FX_BOOL bFlipX, int clip_left, int clip_width) const
{
if (line < 0 || dest_scan == NULL || dest_bpp <= 0 ||
@@ -1223,7 +1223,7 @@ void CPDF_DIBSource::DownSampleScanline(int line, FX_LPBYTE dest_scan, int dest_
return;
}
- FX_LPCBYTE pSrcLine = NULL;
+ const uint8_t* pSrcLine = NULL;
if (m_pCachedBitmap) {
pSrcLine = m_pCachedBitmap->GetScanline(line);
} else if (m_pDecoder) {
@@ -1344,7 +1344,7 @@ void CPDF_DIBSource::DownSampleScanline(int line, FX_LPBYTE dest_scan, int dest_
src_x = src_width - src_x - 1;
}
src_x %= src_width;
- FX_LPBYTE pDestPixel = dest_scan + i * 4;
+ uint8_t* pDestPixel = dest_scan + i * 4;
uint8_t index = pSrcLine[src_x];
if (m_pPalette) {
*pDestPixel++ = FXARGB_B(m_pPalette[index]);
@@ -1386,13 +1386,13 @@ void CPDF_DIBSource::DownSampleScanline(int line, FX_LPBYTE dest_scan, int dest_
int dest_x = clip_left + i;
FX_DWORD src_x = (bFlipX ? (dest_width - dest_x - 1) : dest_x) * (int64_t)src_width / dest_width;
src_x %= src_width;
- FX_LPCBYTE pSrcPixel = NULL;
+ const uint8_t* pSrcPixel = NULL;
if (m_bpc % 8 == 0) {
pSrcPixel = pSrcLine + src_x * orig_Bpp;
} else {
pSrcPixel = pSrcLine + (int)(src_x * orig_Not8Bpp);
}
- FX_LPBYTE pDestPixel = dest_scan + i * dest_Bpp;
+ uint8_t* pDestPixel = dest_scan + i * dest_Bpp;
FX_ARGB argb;
if (src_x == last_src_x) {
argb = last_argb;
@@ -1536,7 +1536,7 @@ FX_BOOL CPDF_ImageLoader::Load(const CPDF_ImageObject* pImage, CPDF_PageRenderCa
}
return FALSE;
}
-FX_BOOL CPDF_ImageLoader::StartLoadImage(const CPDF_ImageObject* pImage, CPDF_PageRenderCache* pCache, FX_LPVOID& LoadHandle, FX_BOOL bStdCS, FX_DWORD GroupFamily, FX_BOOL bLoadMask, CPDF_RenderStatus* pRenderStatus, int32_t nDownsampleWidth, int32_t nDownsampleHeight)
+FX_BOOL CPDF_ImageLoader::StartLoadImage(const CPDF_ImageObject* pImage, CPDF_PageRenderCache* pCache, void*& LoadHandle, FX_BOOL bStdCS, FX_DWORD GroupFamily, FX_BOOL bLoadMask, CPDF_RenderStatus* pRenderStatus, int32_t nDownsampleWidth, int32_t nDownsampleHeight)
{
m_nDownsampleWidth = nDownsampleWidth;
m_nDownsampleHeight = nDownsampleHeight;
@@ -1545,7 +1545,7 @@ FX_BOOL CPDF_ImageLoader::StartLoadImage(const CPDF_ImageObject* pImage, CPDF_Pa
LoadHandle = pLoaderHandle;
return ret;
}
-FX_BOOL CPDF_ImageLoader::Continue(FX_LPVOID LoadHandle, IFX_Pause* pPause)
+FX_BOOL CPDF_ImageLoader::Continue(void* LoadHandle, IFX_Pause* pPause)
{
return ((CPDF_ProgressiveImageLoaderHandle*)LoadHandle)->Continue(pPause);
}
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
index e02cd421ff..2243bff979 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
@@ -357,7 +357,7 @@ static void _DrawGouraud(CFX_DIBitmap* pBitmap, int alpha, CPDF_MeshVertex trian
if (end_x > pBitmap->GetWidth()) {
end_x = pBitmap->GetWidth();
}
- FX_LPBYTE dib_buf = pBitmap->GetBuffer() + y * pBitmap->GetPitch() + start_x * 4;
+ uint8_t* dib_buf = pBitmap->GetBuffer() + y * pBitmap->GetPitch() + start_x * 4;
FX_FLOAT r_unit = (r[end_index] - r[start_index]) / (max_x - min_x);
FX_FLOAT g_unit = (g[end_index] - g[start_index]) / (max_x - min_x);
FX_FLOAT b_unit = (b[end_index] - b[start_index]) / (max_x - min_x);
@@ -1066,7 +1066,7 @@ void CPDF_RenderStatus::DrawTilingPattern(CPDF_TilingPattern* pPattern, CPDF_Pag
if (pPattern->m_bColored) {
*dest_buf = *src_buf;
} else {
- *dest_buf = (*(FX_LPBYTE)src_buf << 24) | (fill_argb & 0xffffff);
+ *dest_buf = (*(uint8_t*)src_buf << 24) | (fill_argb & 0xffffff);
}
} else {
if (pPattern->m_bColored) {
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp
index 410e78a67b..e8ef861ba1 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp
@@ -33,17 +33,17 @@ CFX_GlyphBitmap* CPDF_Type3Cache::LoadGlyph(FX_DWORD charcode, const CFX_AffineM
m_SizeMap.SetAt(FaceGlyphsKey, pSizeCache);
}
CFX_GlyphBitmap* pGlyphBitmap;
- if(pSizeCache->m_GlyphMap.Lookup((FX_LPVOID)(uintptr_t)charcode, (void*&)pGlyphBitmap)) {
+ if(pSizeCache->m_GlyphMap.Lookup((void*)(uintptr_t)charcode, (void*&)pGlyphBitmap)) {
return pGlyphBitmap;
}
pGlyphBitmap = RenderGlyph(pSizeCache, charcode, pMatrix, retinaScaleX, retinaScaleY);
- pSizeCache->m_GlyphMap.SetAt((FX_LPVOID)(uintptr_t)charcode, pGlyphBitmap);
+ pSizeCache->m_GlyphMap.SetAt((void*)(uintptr_t)charcode, pGlyphBitmap);
return pGlyphBitmap;
}
CPDF_Type3Glyphs::~CPDF_Type3Glyphs()
{
FX_POSITION pos = m_GlyphMap.GetStartPosition();
- FX_LPVOID Key;
+ void* Key;
CFX_GlyphBitmap* pGlyphBitmap;
while(pos) {
m_GlyphMap.GetNextAssoc(pos, Key, (void*&)pGlyphBitmap);
@@ -76,7 +76,7 @@ void CPDF_Type3Glyphs::AdjustBlue(FX_FLOAT top, FX_FLOAT bottom, int& top_line,
top_line = _AdjustBlue(top, m_TopBlueCount, m_TopBlue);
bottom_line = _AdjustBlue(bottom, m_BottomBlueCount, m_BottomBlue);
}
-static FX_BOOL _IsScanLine1bpp(FX_LPBYTE pBuf, int width)
+static FX_BOOL _IsScanLine1bpp(uint8_t* pBuf, int width)
{
int size = width / 8;
for (int i = 0; i < size; i ++)
@@ -89,7 +89,7 @@ static FX_BOOL _IsScanLine1bpp(FX_LPBYTE pBuf, int width)
}
return FALSE;
}
-static FX_BOOL _IsScanLine8bpp(FX_LPBYTE pBuf, int width)
+static FX_BOOL _IsScanLine8bpp(uint8_t* pBuf, int width)
{
for (int i = 0; i < width; i ++)
if (pBuf[i] > 0x40) {
@@ -104,7 +104,7 @@ static int _DetectFirstLastScan(const CFX_DIBitmap* pBitmap, FX_BOOL bFirst)
if (bpp > 8) {
width *= bpp / 8;
}
- FX_LPBYTE pBuf = pBitmap->GetBuffer();
+ uint8_t* pBuf = pBitmap->GetBuffer();
int line = bFirst ? 0 : height - 1;
int line_step = bFirst ? 1 : -1;
int line_end = bFirst ? height : -1;
@@ -564,7 +564,7 @@ void CPDF_CharPosList::Load(int nChars, FX_DWORD* pCharCodes, FX_FLOAT* pCharPos
charpos.m_OriginX -= FontSize * vx / 1000;
charpos.m_OriginY -= FontSize * vy / 1000;
}
- FX_LPCBYTE pTransform = pCIDFont->GetCIDTransform(CID);
+ const uint8_t* pTransform = pCIDFont->GetCIDTransform(CID);
if (pTransform && !bVert) {
charpos.m_AdjustMatrix[0] = _CIDTransformToFloat(pTransform[0]);
charpos.m_AdjustMatrix[2] = _CIDTransformToFloat(pTransform[2]);
diff --git a/core/src/fpdfapi/fpdf_render/render_int.h b/core/src/fpdfapi/fpdf_render/render_int.h
index 0b6873409b..8d40b17f85 100644
--- a/core/src/fpdfapi/fpdf_render/render_int.h
+++ b/core/src/fpdfapi/fpdf_render/render_int.h
@@ -197,8 +197,8 @@ public:
FX_BOOL Load(const CPDF_ImageObject* pImage, CPDF_PageRenderCache* pCache, FX_BOOL bStdCS = FALSE, FX_DWORD GroupFamily = 0, FX_BOOL bLoadMask = FALSE, CPDF_RenderStatus* pRenderStatus = NULL);
- FX_BOOL StartLoadImage(const CPDF_ImageObject* pImage, CPDF_PageRenderCache* pCache, FX_LPVOID& LoadHandle, FX_BOOL bStdCS = FALSE, FX_DWORD GroupFamily = 0, FX_BOOL bLoadMask = FALSE, CPDF_RenderStatus* pRenderStatus = NULL, int32_t nDownsampleWidth = 0, int32_t nDownsampleHeight = 0);
- FX_BOOL Continue(FX_LPVOID LoadHandle, IFX_Pause* pPause);
+ FX_BOOL StartLoadImage(const CPDF_ImageObject* pImage, CPDF_PageRenderCache* pCache, void*& LoadHandle, FX_BOOL bStdCS = FALSE, FX_DWORD GroupFamily = 0, FX_BOOL bLoadMask = FALSE, CPDF_RenderStatus* pRenderStatus = NULL, int32_t nDownsampleWidth = 0, int32_t nDownsampleHeight = 0);
+ FX_BOOL Continue(void* LoadHandle, IFX_Pause* pPause);
~CPDF_ImageLoader();
CFX_DIBSource* m_pBitmap;
CFX_DIBSource* m_pMask;
@@ -250,8 +250,8 @@ protected:
CPDF_QuickStretcher* m_pQuickStretcher;
CFX_ImageTransformer* m_pTransformer;
CPDF_ImageRenderer* m_pRenderer2;
- FX_LPVOID m_DeviceHandle;
- FX_LPVOID m_LoadHandle;
+ void* m_DeviceHandle;
+ void* m_LoadHandle;
FX_BOOL m_bStdCS;
int m_BlendType;
FX_BOOL StartBitmapAlpha();
@@ -390,9 +390,9 @@ public:
CPDF_Dictionary* pFormResources, CPDF_Dictionary* pPageResources,
FX_BOOL bStdCS = FALSE, FX_DWORD GroupFamily = 0, FX_BOOL bLoadMask = FALSE);
virtual FX_BOOL SkipToScanline(int line, IFX_Pause* pPause) const;
- virtual FX_LPBYTE GetBuffer() const;
- virtual FX_LPCBYTE GetScanline(int line) const;
- virtual void DownSampleScanline(int line, FX_LPBYTE dest_scan, int dest_bpp,
+ virtual uint8_t* GetBuffer() const;
+ virtual const uint8_t* GetScanline(int line) const;
+ virtual void DownSampleScanline(int line, uint8_t* dest_scan, int dest_bpp,
int dest_width, FX_BOOL bFlipX, int clip_left, int clip_width) const;
virtual void SetDownSampleSize(int dest_width, int dest_height) const;
CFX_DIBitmap* GetBitmap() const;
@@ -410,7 +410,7 @@ public:
CPDF_DIBSource* DetachMask();
CPDF_DIBSource* m_pMask;
FX_DWORD m_MatteColor;
- FX_LPVOID m_pJbig2Context;
+ void* m_pJbig2Context;
CPDF_StreamAcc* m_pGlobalStream;
FX_BOOL m_bStdCS;
int m_Status;
@@ -424,7 +424,7 @@ protected:
void LoadJpxBitmap();
void LoadPalette();
int CreateDecoder();
- void TranslateScanline24bpp(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan) const;
+ void TranslateScanline24bpp(uint8_t* dest_scan, const uint8_t* src_scan) const;
void ValidateDictParam();
CPDF_Document* m_pDocument;
const CPDF_Stream* m_pStream;
@@ -442,8 +442,8 @@ protected:
FX_BOOL m_bDoBpcCheck;
FX_BOOL m_bColorKey;
DIB_COMP_DATA* m_pCompData;
- FX_LPBYTE m_pLineBuf;
- FX_LPBYTE m_pMaskedLine;
+ uint8_t* m_pLineBuf;
+ uint8_t* m_pMaskedLine;
nonstd::unique_ptr<CFX_DIBitmap> m_pCachedBitmap;
ICodec_ScanlineDecoder* m_pDecoder;
};
@@ -457,11 +457,11 @@ public:
{
return NULL;
}
- virtual void TranslateScanline(FX_LPBYTE dest_buf, FX_LPCBYTE src_buf) const;
- virtual void TranslateDownSamples(FX_LPBYTE dest_buf, FX_LPCBYTE src_buf, int pixels, int Bpp) const;
- FX_LPCBYTE m_RampR;
- FX_LPCBYTE m_RampG;
- FX_LPCBYTE m_RampB;
+ virtual void TranslateScanline(uint8_t* dest_buf, const uint8_t* src_buf) const;
+ virtual void TranslateDownSamples(uint8_t* dest_buf, const uint8_t* src_buf, int pixels, int Bpp) const;
+ const uint8_t* m_RampR;
+ const uint8_t* m_RampG;
+ const uint8_t* m_RampB;
};
struct _CPDF_UniqueKeyGen {
void Generate(int count, ...);
diff --git a/core/src/fpdfdoc/doc_annot.cpp b/core/src/fpdfdoc/doc_annot.cpp
index ef6c34701b..a72285c478 100644
--- a/core/src/fpdfdoc/doc_annot.cpp
+++ b/core/src/fpdfdoc/doc_annot.cpp
@@ -129,7 +129,7 @@ void CPDF_AnnotList::DisplayAnnots(const CPDF_Page* pPage, CFX_RenderDevice* pDe
int CPDF_AnnotList::GetIndex(CPDF_Annot* pAnnot)
{
for (int i = 0; i < m_AnnotList.GetSize(); ++i)
- if (m_AnnotList[i] == (FX_LPVOID)pAnnot) {
+ if (m_AnnotList[i] == (void*)pAnnot) {
return i;
}
return -1;
diff --git a/core/src/fpdfdoc/doc_basic.cpp b/core/src/fpdfdoc/doc_basic.cpp
index dfa2e6718a..f9e692cb69 100644
--- a/core/src/fpdfdoc/doc_basic.cpp
+++ b/core/src/fpdfdoc/doc_basic.cpp
@@ -251,7 +251,7 @@ CPDF_Array* CPDF_NameTree::LookupNamedDest(CPDF_Document* pDoc, FX_BSTR sName)
return NULL;
}
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
-static CFX_WideString ChangeSlashToPlatform(FX_LPCWSTR str)
+static CFX_WideString ChangeSlashToPlatform(const FX_WCHAR* str)
{
CFX_WideString result;
while (*str) {
@@ -268,7 +268,7 @@ static CFX_WideString ChangeSlashToPlatform(FX_LPCWSTR str)
}
return result;
}
-static CFX_WideString ChangeSlashToPDF(FX_LPCWSTR str)
+static CFX_WideString ChangeSlashToPDF(const FX_WCHAR* str)
{
CFX_WideString result;
while (*str) {
diff --git a/core/src/fpdfdoc/doc_form.cpp b/core/src/fpdfdoc/doc_form.cpp
index 0fbbd1d38f..8dab922d74 100644
--- a/core/src/fpdfdoc/doc_form.cpp
+++ b/core/src/fpdfdoc/doc_form.cpp
@@ -19,7 +19,7 @@ public:
m_pEnd = m_pStart + full_name.GetLength();
m_pCur = m_pStart;
}
- void GetNext(FX_LPCWSTR &pSubName, FX_STRSIZE& size)
+ void GetNext(const FX_WCHAR* &pSubName, FX_STRSIZE& size)
{
pSubName = m_pCur;
while (m_pCur < m_pEnd && m_pCur[0] != L'.') {
@@ -31,9 +31,9 @@ public:
}
}
protected:
- FX_LPCWSTR m_pStart;
- FX_LPCWSTR m_pEnd;
- FX_LPCWSTR m_pCur;
+ const FX_WCHAR* m_pStart;
+ const FX_WCHAR* m_pEnd;
+ const FX_WCHAR* m_pCur;
};
class CFieldTree
{
@@ -162,7 +162,7 @@ void CFieldTree::SetField(const CFX_WideString &full_name, CPDF_FormField *field
return;
}
_CFieldNameExtractor name_extractor(full_name);
- FX_LPCWSTR pName;
+ const FX_WCHAR* pName;
FX_STRSIZE nLength;
name_extractor.GetNext(pName, nLength);
_Node *pNode = &m_Root, *pLast = NULL;
@@ -185,7 +185,7 @@ CPDF_FormField *CFieldTree::GetField(const CFX_WideString &full_name)
return NULL;
}
_CFieldNameExtractor name_extractor(full_name);
- FX_LPCWSTR pName;
+ const FX_WCHAR* pName;
FX_STRSIZE nLength;
name_extractor.GetNext(pName, nLength);
_Node *pNode = &m_Root, *pLast = NULL;
@@ -203,7 +203,7 @@ CPDF_FormField *CFieldTree::RemoveField(const CFX_WideString & full_name)
return NULL;
}
_CFieldNameExtractor name_extractor(full_name);
- FX_LPCWSTR pName;
+ const FX_WCHAR* pName;
FX_STRSIZE nLength;
name_extractor.GetNext(pName, nLength);
_Node *pNode = &m_Root, *pLast = NULL;
@@ -233,7 +233,7 @@ CFieldTree::_Node *CFieldTree::FindNode(const CFX_WideString& full_name)
return NULL;
}
_CFieldNameExtractor name_extractor(full_name);
- FX_LPCWSTR pName;
+ const FX_WCHAR* pName;
FX_STRSIZE nLength;
name_extractor.GetNext(pName, nLength);
_Node *pNode = &m_Root, *pLast = NULL;
@@ -270,7 +270,8 @@ CPDF_InterForm::~CPDF_InterForm()
{
FX_POSITION pos = m_ControlMap.GetStartPosition();
while (pos) {
- FX_LPVOID key, value;
+ void* key;
+ void* value;
m_ControlMap.GetNextAssoc(pos, key, value);
delete (CPDF_FormControl*)value;
}
@@ -292,7 +293,7 @@ void CPDF_InterForm::EnableUpdateAP(FX_BOOL bUpdateAP)
{
m_bUpdateAP = bUpdateAP;
}
-CFX_ByteString CPDF_InterForm::GenerateNewResourceName(const CPDF_Dictionary* pResDict, FX_LPCSTR csType, int iMinLen, FX_LPCSTR csPrefix)
+CFX_ByteString CPDF_InterForm::GenerateNewResourceName(const CPDF_Dictionary* pResDict, const FX_CHAR* csType, int iMinLen, const FX_CHAR* csPrefix)
{
CFX_ByteString csStr = csPrefix;
CFX_ByteString csBType = csType;
@@ -476,7 +477,7 @@ CPDF_Font* CPDF_InterForm::AddStandardFont(const CPDF_Document* pDocument, CFX_B
}
return pFont;
}
-CFX_ByteString CPDF_InterForm::GetNativeFont(uint8_t charSet, FX_LPVOID pLogFont)
+CFX_ByteString CPDF_InterForm::GetNativeFont(uint8_t charSet, void* pLogFont)
{
CFX_ByteString csFontName;
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
@@ -513,7 +514,7 @@ CFX_ByteString CPDF_InterForm::GetNativeFont(uint8_t charSet, FX_LPVOID pLogFont
#endif
return csFontName;
}
-CFX_ByteString CPDF_InterForm::GetNativeFont(FX_LPVOID pLogFont)
+CFX_ByteString CPDF_InterForm::GetNativeFont(void* pLogFont)
{
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
uint8_t charSet = GetNativeCharSet();
@@ -698,7 +699,8 @@ FX_BOOL CPDF_InterForm::ValidateFieldName(const CPDF_FormControl* pControl, CFX_
}
int CPDF_InterForm::CompareFieldName(const CFX_ByteString& name1, const CFX_ByteString& name2)
{
- FX_LPCSTR ptr1 = name1, ptr2 = name2;
+ const FX_CHAR* ptr1 = name1;
+ const FX_CHAR* ptr2 = name2;
if (name1.GetLength() != name2.GetLength()) {
int i = 0;
while (ptr1[i] == ptr2[i]) {
@@ -717,8 +719,8 @@ int CPDF_InterForm::CompareFieldName(const CFX_ByteString& name1, const CFX_Byte
}
int CPDF_InterForm::CompareFieldName(const CFX_WideString& name1, const CFX_WideString& name2)
{
- FX_LPCWSTR ptr1 = name1.c_str();
- FX_LPCWSTR ptr2 = name2.c_str();
+ const FX_WCHAR* ptr1 = name1.c_str();
+ const FX_WCHAR* ptr2 = name2.c_str();
if (name1.GetLength() != name2.GetLength()) {
int i = 0;
while (ptr1[i] == ptr2[i]) {
@@ -822,7 +824,7 @@ FX_BOOL CPDF_InterForm::IsValidFormControl(const void* pControl)
while (pos) {
CPDF_Dictionary* pWidgetDict = NULL;
void* pFormControl = NULL;
- m_ControlMap.GetNextAssoc(pos, (FX_LPVOID&)pWidgetDict, pFormControl);
+ m_ControlMap.GetNextAssoc(pos, (void*&)pWidgetDict, pFormControl);
if (pControl == pFormControl) {
return TRUE;
}
@@ -842,7 +844,7 @@ int CPDF_InterForm::CountPageControls(CPDF_Page* pPage) const
continue;
}
CPDF_FormControl* pControl;
- if (!m_ControlMap.Lookup(pAnnot, (FX_LPVOID&)pControl)) {
+ if (!m_ControlMap.Lookup(pAnnot, (void*&)pControl)) {
continue;
}
count ++;
@@ -862,7 +864,7 @@ CPDF_FormControl* CPDF_InterForm::GetPageControl(CPDF_Page* pPage, int index) co
continue;
}
CPDF_FormControl* pControl;
- if (!m_ControlMap.Lookup(pAnnot, (FX_LPVOID&)pControl)) {
+ if (!m_ControlMap.Lookup(pAnnot, (void*&)pControl)) {
continue;
}
if (index == count) {
@@ -884,7 +886,7 @@ CPDF_FormControl* CPDF_InterForm::GetControlAtPoint(CPDF_Page* pPage, FX_FLOAT p
continue;
}
CPDF_FormControl* pControl;
- if (!m_ControlMap.Lookup(pAnnot, (FX_LPVOID&)pControl)) {
+ if (!m_ControlMap.Lookup(pAnnot, (void*&)pControl)) {
continue;
}
CFX_FloatRect rect = pControl->GetRect();
@@ -897,7 +899,7 @@ CPDF_FormControl* CPDF_InterForm::GetControlAtPoint(CPDF_Page* pPage, FX_FLOAT p
CPDF_FormControl* CPDF_InterForm::GetControlByDict(CPDF_Dictionary* pWidgetDict) const
{
CPDF_FormControl* pControl = NULL;
- m_ControlMap.Lookup(pWidgetDict, (FX_LPVOID&)pControl);
+ m_ControlMap.Lookup(pWidgetDict, (void*&)pControl);
return pControl;
}
FX_DWORD CPDF_InterForm::CountInternalFields(const CFX_WideString& csFieldName) const
@@ -1205,7 +1207,7 @@ void CPDF_InterForm::ReloadForm()
while (pos) {
CPDF_Dictionary* pWidgetDict;
CPDF_FormControl* pControl;
- m_ControlMap.GetNextAssoc(pos, (FX_LPVOID&)pWidgetDict, (FX_LPVOID&)pControl);
+ m_ControlMap.GetNextAssoc(pos, (void*&)pWidgetDict, (void*&)pControl);
delete pControl;
}
m_ControlMap.RemoveAll();
@@ -1471,7 +1473,7 @@ CFDF_Document* CPDF_InterForm::ExportToFDF(FX_WSTR pdf_path, CFX_PtrArray& field
return pDoc;
}
const struct _SupportFieldEncoding {
- FX_LPCSTR m_name;
+ const FX_CHAR* m_name;
int32_t m_codePage;
} g_fieldEncoding[] = {
{ "BigFive", 950 },
diff --git a/core/src/fpdfdoc/doc_link.cpp b/core/src/fpdfdoc/doc_link.cpp
index 71be0c36ab..e614af3ec8 100644
--- a/core/src/fpdfdoc/doc_link.cpp
+++ b/core/src/fpdfdoc/doc_link.cpp
@@ -11,7 +11,8 @@ CPDF_LinkList::~CPDF_LinkList()
{
FX_POSITION pos = m_PageMap.GetStartPosition();
while (pos) {
- FX_LPVOID key, value;
+ void* key;
+ void* value;
m_PageMap.GetNextAssoc(pos, key, value);
delete (CFX_PtrArray*)value;
}
@@ -23,12 +24,9 @@ CFX_PtrArray* CPDF_LinkList::GetPageLinks(CPDF_Page* pPage)
return NULL;
}
CFX_PtrArray* pPageLinkList = NULL;
- if (!m_PageMap.Lookup((FX_LPVOID)(uintptr_t)objnum, (FX_LPVOID&)pPageLinkList)) {
- pPageLinkList = FX_NEW CFX_PtrArray;
- if (pPageLinkList == NULL) {
- return NULL;
- }
- m_PageMap.SetAt((FX_LPVOID)(uintptr_t)objnum, pPageLinkList);
+ if (!m_PageMap.Lookup((void*)(uintptr_t)objnum, (void*&)pPageLinkList)) {
+ pPageLinkList = new CFX_PtrArray;
+ m_PageMap.SetAt((void*)(uintptr_t)objnum, pPageLinkList);
LoadPageLinks(pPage, pPageLinkList);
}
return pPageLinkList;
diff --git a/core/src/fpdfdoc/doc_metadata.cpp b/core/src/fpdfdoc/doc_metadata.cpp
index 677d0e91af..07cba96e61 100644
--- a/core/src/fpdfdoc/doc_metadata.cpp
+++ b/core/src/fpdfdoc/doc_metadata.cpp
@@ -13,7 +13,7 @@ typedef struct _PDFDOC_METADATA {
CFX_CMapByteStringToPtr *m_pStringMap;
} PDFDOC_METADATA, * PDFDOC_LPMETADATA;
typedef PDFDOC_METADATA const * PDFDOC_LPCMETADATA;
-const FX_LPCSTR gs_FPDFDOC_Metadata_Titles[] = {
+const FX_CHAR* const gs_FPDFDOC_Metadata_Titles[] = {
"Title", "title",
"Subject", "description",
"Author", "creator",
@@ -61,7 +61,7 @@ void CPDF_Metadata::LoadDoc(CPDF_Document *pDoc)
CPDF_StreamAcc acc;
acc.LoadAllData(pStream, FALSE);
int size = acc.GetSize();
- FX_LPCBYTE pBuf = acc.GetData();
+ const uint8_t* pBuf = acc.GetData();
CXML_Element *&pXmlElmnt = ((PDFDOC_LPMETADATA)m_pData)->m_pXmlElmnt;
pXmlElmnt = CXML_Element::Parse(pBuf, size);
if (!pXmlElmnt) {
@@ -86,7 +86,7 @@ int32_t CPDF_Metadata::GetString(FX_BSTR bsItem, CFX_WideString &wsStr)
if (!((PDFDOC_LPMETADATA)m_pData)->m_pStringMap->Lookup(bsItem, szTag)) {
return -1;
}
- CFX_ByteString bsTag = (FX_LPCSTR)szTag;
+ CFX_ByteString bsTag = (const FX_CHAR*)szTag;
wsStr = L"";
CXML_Element *pElmntRdf = ((PDFDOC_LPMETADATA)m_pData)->m_pElmntRdf;
if (!pElmntRdf) {
diff --git a/core/src/fpdfdoc/doc_ocg.cpp b/core/src/fpdfdoc/doc_ocg.cpp
index c2f77a58fa..318e9318ce 100644
--- a/core/src/fpdfdoc/doc_ocg.cpp
+++ b/core/src/fpdfdoc/doc_ocg.cpp
@@ -179,11 +179,11 @@ FX_BOOL CPDF_OCContext::GetOCGVisible(const CPDF_Dictionary *pOCGDict)
if (!pOCGDict) {
return FALSE;
}
- FX_LPVOID bState = NULL;
+ void* bState = NULL;
if (m_OCGStates.Lookup(pOCGDict, bState)) {
return (uintptr_t)bState != 0;
}
- bState = (FX_LPVOID)(uintptr_t)LoadOCGState(pOCGDict);
+ bState = (void*)(uintptr_t)LoadOCGState(pOCGDict);
m_OCGStates.SetAt(pOCGDict, bState);
return (uintptr_t)bState != 0;
}
diff --git a/core/src/fpdfdoc/doc_tagged.cpp b/core/src/fpdfdoc/doc_tagged.cpp
index c5fe39b6ee..0bf229e7d8 100644
--- a/core/src/fpdfdoc/doc_tagged.cpp
+++ b/core/src/fpdfdoc/doc_tagged.cpp
@@ -137,7 +137,7 @@ CPDF_StructElementImpl* CPDF_StructTreeImpl::AddPageNode(CPDF_Dictionary* pDict,
return NULL;
}
CPDF_StructElementImpl* pElement = NULL;
- if (map.Lookup(pDict, (FX_LPVOID&)pElement)) {
+ if (map.Lookup(pDict, (void*&)pElement)) {
return pElement;
}
pElement = FX_NEW CPDF_StructElementImpl(this, NULL, pDict);
diff --git a/core/src/fpdfdoc/doc_vt.cpp b/core/src/fpdfdoc/doc_vt.cpp
index 7ed5b4ad3c..94dc1126da 100644
--- a/core/src/fpdfdoc/doc_vt.cpp
+++ b/core/src/fpdfdoc/doc_vt.cpp
@@ -920,7 +920,7 @@ CPVT_WordPlace CPDF_VariableText::InsertSection(const CPVT_WordPlace & place, co
}
return newplace;
}
-CPVT_WordPlace CPDF_VariableText::InsertText(const CPVT_WordPlace & place, FX_LPCWSTR text, int32_t charset,
+CPVT_WordPlace CPDF_VariableText::InsertText(const CPVT_WordPlace & place, const FX_WCHAR* text, int32_t charset,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pProps)
{
CFX_WideString swText = text;
@@ -980,7 +980,7 @@ CPVT_WordPlace CPDF_VariableText::BackSpaceWord(const CPVT_WordPlace & place)
{
return ClearLeftWord(AjustLineHeader(place, TRUE));
}
-void CPDF_VariableText::SetText(FX_LPCWSTR text, int32_t charset, const CPVT_SecProps * pSecProps,
+void CPDF_VariableText::SetText(const FX_WCHAR* text, int32_t charset, const CPVT_SecProps * pSecProps,
const CPVT_WordProps * pWordProps)
{
DeleteWords(CPVT_WordRange(GetBeginWordPlace(), GetEndWordPlace()));
diff --git a/core/src/fpdfdoc/pdf_vt.h b/core/src/fpdfdoc/pdf_vt.h
index 5d8b20cf52..b66c2ed3b5 100644
--- a/core/src/fpdfdoc/pdf_vt.h
+++ b/core/src/fpdfdoc/pdf_vt.h
@@ -474,13 +474,13 @@ public:
void RearrangeAll();
void RearrangePart(const CPVT_WordRange & PlaceRange);
void ResetAll();
- void SetText(FX_LPCWSTR text, int32_t charset = 1, const CPVT_SecProps * pSecProps = NULL,
+ void SetText(const FX_WCHAR* text, int32_t charset = 1, const CPVT_SecProps * pSecProps = NULL,
const CPVT_WordProps * pWordProps = NULL);
CPVT_WordPlace InsertWord(const CPVT_WordPlace & place, FX_WORD word, int32_t charset = 1,
const CPVT_WordProps * pWordProps = NULL);
CPVT_WordPlace InsertSection(const CPVT_WordPlace & place, const CPVT_SecProps * pSecProps = NULL,
const CPVT_WordProps * pWordProps = NULL);
- CPVT_WordPlace InsertText(const CPVT_WordPlace & place, FX_LPCWSTR text, int32_t charset = 1,
+ CPVT_WordPlace InsertText(const CPVT_WordPlace & place, const FX_WCHAR* text, int32_t charset = 1,
const CPVT_SecProps * pSecProps = NULL, const CPVT_WordProps * pWordProps = NULL);
CPVT_WordPlace DeleteWords(const CPVT_WordRange & PlaceRange);
CPVT_WordPlace DeleteWord(const CPVT_WordPlace & place);
diff --git a/core/src/fpdftext/fpdf_text.cpp b/core/src/fpdftext/fpdf_text.cpp
index 5efbe51c03..181118d2f0 100644
--- a/core/src/fpdftext/fpdf_text.cpp
+++ b/core/src/fpdftext/fpdf_text.cpp
@@ -9,14 +9,14 @@
#include "../../include/fpdftext/fpdf_text.h"
#include "txtproc.h"
#include "text_int.h"
-extern FX_LPCSTR FCS_GetAltStr(FX_WCHAR);
-CFX_ByteString CharFromUnicodeAlt(FX_WCHAR unicode, int destcp, FX_LPCSTR defchar)
+extern const FX_CHAR* FCS_GetAltStr(FX_WCHAR);
+CFX_ByteString CharFromUnicodeAlt(FX_WCHAR unicode, int destcp, const FX_CHAR* defchar)
{
if (destcp == 0) {
if (unicode < 0x80) {
return CFX_ByteString((char)unicode);
}
- FX_LPCSTR altstr = FCS_GetAltStr(unicode);
+ const FX_CHAR* altstr = FCS_GetAltStr(unicode);
if (altstr) {
return CFX_ByteString(altstr, -1);
}
@@ -28,7 +28,7 @@ CFX_ByteString CharFromUnicodeAlt(FX_WCHAR unicode, int destcp, FX_LPCSTR defcha
if (ret && !bDef) {
return CFX_ByteString(buf, ret);
}
- FX_LPCSTR altstr = FCS_GetAltStr(unicode);
+ const FX_CHAR* altstr = FCS_GetAltStr(unicode);
if (altstr) {
return CFX_ByteString(altstr, -1);
}
@@ -176,7 +176,7 @@ CTextBaseLine* CTextPage::InsertTextBox(CTextBaseLine* pBaseLine, FX_FLOAT basey
}
}
CFX_WideString text;
- FX_LPCSTR pStr = str;
+ const FX_CHAR* pStr = str;
int len = str.GetLength(), offset = 0;
while (offset < len) {
FX_DWORD ch = pFont->GetNextChar(pStr, len, offset);
@@ -289,7 +289,7 @@ void CTextPage::WriteOutput(CFX_WideStringArray& lines, int iMinWidth)
void NormalizeCompositeChar(FX_WCHAR wChar, CFX_WideString& sDest)
{
wChar = FX_GetMirrorChar(wChar, TRUE, FALSE);
- FX_LPWSTR pDst = NULL;
+ FX_WCHAR* pDst = NULL;
FX_STRSIZE nCount = FX_Unicode_GetNormalization(wChar, pDst);
if (nCount < 1 ) {
sDest += wChar;
diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp
index 10bd3c8b36..0bdbfa91ea 100644
--- a/core/src/fpdftext/fpdf_text_int.cpp
+++ b/core/src/fpdftext/fpdf_text_int.cpp
@@ -1163,7 +1163,7 @@ void CPDF_TextPage::AddCharInfoByLRDirection(CFX_WideString& str, int i)
if(!IsControlChar(&Info)) {
Info.m_Index = m_TextBuf.GetLength();
if (wChar >= 0xFB00 && wChar <= 0xFB06) {
- FX_LPWSTR pDst = NULL;
+ FX_WCHAR* pDst = NULL;
FX_STRSIZE nCount = FX_Unicode_GetNormalization(wChar, pDst);
if (nCount >= 1) {
pDst = FX_Alloc(FX_WCHAR, nCount);
@@ -1195,7 +1195,7 @@ void CPDF_TextPage::AddCharInfoByRLDirection(CFX_WideString& str, int i)
if(!IsControlChar(&Info)) {
Info.m_Index = m_TextBuf.GetLength();
FX_WCHAR wChar = FX_GetMirrorChar(str.GetAt(i), TRUE, FALSE);
- FX_LPWSTR pDst = NULL;
+ FX_WCHAR* pDst = NULL;
FX_STRSIZE nCount = FX_Unicode_GetNormalization(wChar, pDst);
if (nCount >= 1) {
pDst = FX_Alloc(FX_WCHAR, nCount);
@@ -2557,7 +2557,7 @@ FX_BOOL CPDF_TextPageFind::IsMatchWholeWord(const CFX_WideString& csPageText, in
}
return TRUE;
}
-FX_BOOL CPDF_TextPageFind::ExtractSubString(CFX_WideString& rString, FX_LPCWSTR lpszFullString,
+FX_BOOL CPDF_TextPageFind::ExtractSubString(CFX_WideString& rString, const FX_WCHAR* lpszFullString,
int iSubString, FX_WCHAR chSep)
{
if (lpszFullString == NULL) {
@@ -2574,7 +2574,7 @@ FX_BOOL CPDF_TextPageFind::ExtractSubString(CFX_WideString& rString, FX_LPCWSTR
lpszFullString++;
}
}
- FX_LPCWSTR lpchEnd = FXSYS_wcschr(lpszFullString, chSep);
+ const FX_WCHAR* lpchEnd = FXSYS_wcschr(lpszFullString, chSep);
int nLen = (lpchEnd == NULL) ?
(int)FXSYS_wcslen(lpszFullString) : (int)(lpchEnd - lpszFullString);
ASSERT(nLen >= 0);
diff --git a/core/src/fpdftext/text_int.h b/core/src/fpdftext/text_int.h
index 03f6ce1dc8..f59d3513db 100644
--- a/core/src/fpdftext/text_int.h
+++ b/core/src/fpdftext/text_int.h
@@ -152,7 +152,7 @@ public:
protected:
void ExtractFindWhat(const CFX_WideString& findwhat);
FX_BOOL IsMatchWholeWord(const CFX_WideString& csPageText, int startPos, int endPos);
- FX_BOOL ExtractSubString(CFX_WideString& rString, FX_LPCWSTR lpszFullString,
+ FX_BOOL ExtractSubString(CFX_WideString& rString, const FX_WCHAR* lpszFullString,
int iSubString, FX_WCHAR chSep);
CFX_WideString MakeReverse(const CFX_WideString& str);
int ReverseFind(const CFX_WideString& csPageText, const CFX_WideString& csWord, int nStartPos, int& WordLength);
@@ -210,7 +210,7 @@ private:
CFX_WideString m_strPageText;
FX_BOOL m_IsParserd;
};
-FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_LPWSTR pDst);
+FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_WCHAR* pDst);
void NormalizeString(CFX_WideString& str);
void NormalizeCompositeChar(FX_WCHAR wChar, CFX_WideString& sDest);
diff --git a/core/src/fpdftext/unicodenormalization.cpp b/core/src/fpdftext/unicodenormalization.cpp
index ad2f3f6aea..7b01830582 100644
--- a/core/src/fpdftext/unicodenormalization.cpp
+++ b/core/src/fpdftext/unicodenormalization.cpp
@@ -10,14 +10,14 @@ extern const FX_WCHAR g_UnicodeData_Normalization_Map1[];
extern const FX_WCHAR g_UnicodeData_Normalization_Map2[];
extern const FX_WCHAR g_UnicodeData_Normalization_Map3[];
extern const FX_WCHAR g_UnicodeData_Normalization_Map4[];
-FX_LPCWSTR g_UnicodeData_Normalization_Maps[5] = {
+const FX_WCHAR* g_UnicodeData_Normalization_Maps[5] = {
NULL,
g_UnicodeData_Normalization_Map1,
g_UnicodeData_Normalization_Map2,
g_UnicodeData_Normalization_Map3,
g_UnicodeData_Normalization_Map4
};
-FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_LPWSTR pDst)
+FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_WCHAR* pDst)
{
wch = wch & 0xFFFF;
FX_WCHAR wFind = g_UnicodeData_Normalization[wch];
@@ -34,7 +34,7 @@ FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_LPWSTR pDst)
wch = wFind & 0x0FFF;
wFind >>= 12;
}
- FX_LPCWSTR pMap = g_UnicodeData_Normalization_Maps[wFind];
+ const FX_WCHAR* pMap = g_UnicodeData_Normalization_Maps[wFind];
if (pMap == g_UnicodeData_Normalization_Map4) {
pMap = g_UnicodeData_Normalization_Map4 + wch;
wFind = (FX_WCHAR)(*pMap ++);
@@ -49,7 +49,7 @@ FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_LPWSTR pDst)
}
return (FX_STRSIZE)wFind;
}
-FX_STRSIZE FX_WideString_GetNormalization(FX_WSTR wsSrc, FX_LPWSTR pDst)
+FX_STRSIZE FX_WideString_GetNormalization(FX_WSTR wsSrc, FX_WCHAR* pDst)
{
FX_STRSIZE nCount = 0;
for (FX_STRSIZE len = 0; len < wsSrc.GetLength(); len ++) {
@@ -64,11 +64,11 @@ FX_STRSIZE FX_WideString_GetNormalization(FX_WSTR wsSrc, FX_LPWSTR pDst)
}
FX_STRSIZE FX_WideString_GetNormalization(FX_WSTR wsSrc, CFX_WideString &wsDst)
{
- FX_STRSIZE nLen = FX_WideString_GetNormalization(wsSrc, (FX_LPWSTR)NULL);
+ FX_STRSIZE nLen = FX_WideString_GetNormalization(wsSrc, (FX_WCHAR*)NULL);
if (!nLen) {
return 0;
}
- FX_LPWSTR pBuf = wsDst.GetBuffer(nLen);
+ FX_WCHAR* pBuf = wsDst.GetBuffer(nLen);
FX_WideString_GetNormalization(wsSrc, pBuf);
wsDst.ReleaseBuffer(nLen);
return nLen;
diff --git a/core/src/fxcodec/codec/codec_int.h b/core/src/fxcodec/codec/codec_int.h
index c50faaa936..90e8b8c02c 100644
--- a/core/src/fxcodec/codec/codec_int.h
+++ b/core/src/fxcodec/codec/codec_int.h
@@ -17,11 +17,11 @@
class CCodec_BasicModule : public ICodec_BasicModule
{
public:
- virtual FX_BOOL RunLengthEncode(const uint8_t* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf,
+ virtual FX_BOOL RunLengthEncode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_buf,
FX_DWORD& dest_size);
- virtual FX_BOOL A85Encode(const uint8_t* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf,
+ virtual FX_BOOL A85Encode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_buf,
FX_DWORD& dest_size);
- virtual ICodec_ScanlineDecoder* CreateRunLengthDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height,
+ virtual ICodec_ScanlineDecoder* CreateRunLengthDecoder(const uint8_t* src_buf, FX_DWORD src_size, int width, int height,
int nComps, int bpc);
};
struct CCodec_ImageDataCache {
@@ -44,7 +44,7 @@ public:
virtual void DownScale(int dest_width, int dest_height);
- FX_LPBYTE GetScanline(int line);
+ uint8_t* GetScanline(int line);
FX_BOOL SkipToScanline(int line, IFX_Pause* pPause);
@@ -100,39 +100,39 @@ protected:
FX_BOOL m_bColorTransformed;
- FX_LPBYTE ReadNextLine();
+ uint8_t* ReadNextLine();
virtual FX_BOOL v_Rewind() = 0;
- virtual FX_LPBYTE v_GetNextLine() = 0;
+ virtual uint8_t* v_GetNextLine() = 0;
virtual void v_DownScale(int dest_width, int dest_height) = 0;
int m_NextLine;
- FX_LPBYTE m_pLastScanline;
+ uint8_t* m_pLastScanline;
CCodec_ImageDataCache* m_pDataCache;
};
class CCodec_FaxModule : public ICodec_FaxModule
{
public:
- virtual ICodec_ScanlineDecoder* CreateDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height,
+ virtual ICodec_ScanlineDecoder* CreateDecoder(const uint8_t* src_buf, FX_DWORD src_size, int width, int height,
int K, FX_BOOL EndOfLine, FX_BOOL EncodedByteAlign, FX_BOOL BlackIs1, int Columns, int Rows);
- FX_BOOL Encode(FX_LPCBYTE src_buf, int width, int height, int pitch, FX_LPBYTE& dest_buf, FX_DWORD& dest_size);
+ FX_BOOL Encode(const uint8_t* src_buf, int width, int height, int pitch, uint8_t*& dest_buf, FX_DWORD& dest_size);
};
class CCodec_FlateModule : public ICodec_FlateModule
{
public:
- virtual ICodec_ScanlineDecoder* CreateDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height,
+ virtual ICodec_ScanlineDecoder* CreateDecoder(const uint8_t* src_buf, FX_DWORD src_size, int width, int height,
int nComps, int bpc, int predictor, int Colors, int BitsPerComponent, int Columns);
virtual FX_DWORD FlateOrLZWDecode(FX_BOOL bLZW, const uint8_t* src_buf, FX_DWORD src_size, FX_BOOL bEarlyChange,
int predictor, int Colors, int BitsPerComponent, int Columns,
- FX_DWORD estimated_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size);
+ FX_DWORD estimated_size, uint8_t*& dest_buf, FX_DWORD& dest_size);
virtual FX_BOOL Encode(const uint8_t* src_buf, FX_DWORD src_size,
int predictor, int Colors, int BitsPerComponent, int Columns,
- FX_LPBYTE& dest_buf, FX_DWORD& dest_size);
- virtual FX_BOOL Encode(FX_LPCBYTE src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size);
+ uint8_t*& dest_buf, FX_DWORD& dest_size);
+ virtual FX_BOOL Encode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_buf, FX_DWORD& dest_size);
};
class CCodec_JpegModule : public ICodec_JpegModule
{
@@ -142,19 +142,19 @@ public:
{
m_pExtProvider = pJP;
}
- ICodec_ScanlineDecoder* CreateDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size,
+ ICodec_ScanlineDecoder* CreateDecoder(const uint8_t* src_buf, FX_DWORD src_size,
int width, int height, int nComps, FX_BOOL ColorTransform);
- FX_BOOL LoadInfo(FX_LPCBYTE src_buf, FX_DWORD src_size, int& width, int& height,
+ FX_BOOL LoadInfo(const uint8_t* src_buf, FX_DWORD src_size, int& width, int& height,
int& num_components, int& bits_per_components, FX_BOOL& color_transform,
- FX_LPBYTE* icc_buf_ptr, FX_DWORD* icc_length);
- FX_BOOL Encode(const CFX_DIBSource* pSource, FX_LPBYTE& dest_buf, FX_STRSIZE& dest_size, int quality, FX_LPCBYTE icc_buf, FX_DWORD icc_length);
+ uint8_t** icc_buf_ptr, FX_DWORD* icc_length);
+ FX_BOOL Encode(const CFX_DIBSource* pSource, uint8_t*& dest_buf, FX_STRSIZE& dest_size, int quality, const uint8_t* icc_buf, FX_DWORD icc_length);
virtual void* Start();
virtual void Finish(void* pContext);
- virtual void Input(void* pContext, FX_LPCBYTE src_buf, FX_DWORD src_size);
+ virtual void Input(void* pContext, const uint8_t* src_buf, FX_DWORD src_size);
virtual int ReadHeader(void* pContext, int* width, int* height, int* nComps, CFX_DIBAttribute* pAttribute = NULL);
virtual FX_BOOL StartScanline(void* pContext, int down_scale);
- virtual FX_BOOL ReadScanline(void* pContext, FX_LPBYTE dest_buf);
- virtual FX_DWORD GetAvailInput(void* pContext, FX_LPBYTE* avail_buf_ptr);
+ virtual FX_BOOL ReadScanline(void* pContext, uint8_t* dest_buf);
+ virtual FX_DWORD GetAvailInput(void* pContext, uint8_t** avail_buf_ptr);
protected:
IFX_JpegProvider* m_pExtProvider;
};
@@ -169,7 +169,7 @@ public:
virtual void* Start(void* pModule);
virtual void Finish(void* pContext);
- virtual FX_BOOL Input(void* pContext, FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_DIBAttribute* pAttribute);
+ virtual FX_BOOL Input(void* pContext, const uint8_t* src_buf, FX_DWORD src_size, CFX_DIBAttribute* pAttribute);
protected:
FX_CHAR m_szLastError[PNG_ERROR_SIZE];
};
@@ -182,8 +182,8 @@ public:
}
virtual void* Start(void* pModule);
virtual void Finish(void* pContext);
- virtual FX_DWORD GetAvailInput(void* pContext, FX_LPBYTE* avail_buf_ptr);
- virtual void Input(void* pContext, FX_LPCBYTE src_buf, FX_DWORD src_size);
+ virtual FX_DWORD GetAvailInput(void* pContext, uint8_t** avail_buf_ptr);
+ virtual void Input(void* pContext, const uint8_t* src_buf, FX_DWORD src_size);
virtual int32_t ReadHeader(void* pContext, int* width, int* height,
int* pal_num, void** pal_pp, int* bg_index, CFX_DIBAttribute* pAttribute);
@@ -204,8 +204,8 @@ public:
}
virtual void* Start(void* pModule);
virtual void Finish(void* pContext);
- virtual FX_DWORD GetAvailInput(void* pContext, FX_LPBYTE* avail_buf_ptr);
- virtual void Input(void* pContext, FX_LPCBYTE src_buf, FX_DWORD src_size);
+ virtual FX_DWORD GetAvailInput(void* pContext, uint8_t** avail_buf_ptr);
+ virtual void Input(void* pContext, const uint8_t* src_buf, FX_DWORD src_size);
virtual int32_t ReadHeader(void* pContext, int32_t* width, int32_t* height, FX_BOOL* tb_flag, int32_t* components, int32_t* pal_num, FX_DWORD** pal_pp, CFX_DIBAttribute* pAttribute);
virtual int32_t LoadImage(void* pContext);
@@ -215,9 +215,9 @@ protected:
class CCodec_IccModule : public ICodec_IccModule
{
public:
- virtual IccCS GetProfileCS(FX_LPCBYTE pProfileData, unsigned int dwProfileSize);
+ virtual IccCS GetProfileCS(const uint8_t* pProfileData, unsigned int dwProfileSize);
virtual IccCS GetProfileCS(IFX_FileRead* pFile);
- virtual FX_LPVOID CreateTransform(ICodec_IccModule::IccParam* pInputParam,
+ virtual void* CreateTransform(ICodec_IccModule::IccParam* pInputParam,
ICodec_IccModule::IccParam* pOutputParam,
ICodec_IccModule::IccParam* pProofParam = NULL,
FX_DWORD dwIntent = Icc_INTENT_PERCEPTUAL,
@@ -225,16 +225,16 @@ public:
FX_DWORD dwPrfIntent = Icc_INTENT_ABSOLUTE_COLORIMETRIC,
FX_DWORD dwPrfFlag = Icc_FLAGS_SOFTPROOFING
);
- virtual FX_LPVOID CreateTransform_sRGB(FX_LPCBYTE pProfileData, FX_DWORD dwProfileSize, int32_t& nComponents, int32_t intent = 0,
+ virtual void* CreateTransform_sRGB(const uint8_t* pProfileData, FX_DWORD dwProfileSize, int32_t& nComponents, int32_t intent = 0,
FX_DWORD dwSrcFormat = Icc_FORMAT_DEFAULT);
- virtual FX_LPVOID CreateTransform_CMYK(FX_LPCBYTE pSrcProfileData, FX_DWORD dwSrcProfileSize, int32_t& nSrcComponents,
- FX_LPCBYTE pDstProfileData, FX_DWORD dwDstProfileSize, int32_t intent = 0,
+ virtual void* CreateTransform_CMYK(const uint8_t* pSrcProfileData, FX_DWORD dwSrcProfileSize, int32_t& nSrcComponents,
+ const uint8_t* pDstProfileData, FX_DWORD dwDstProfileSize, int32_t intent = 0,
FX_DWORD dwSrcFormat = Icc_FORMAT_DEFAULT,
FX_DWORD dwDstFormat = Icc_FORMAT_DEFAULT
);
- virtual void DestroyTransform(FX_LPVOID pTransform);
- virtual void Translate(FX_LPVOID pTransform, FX_FLOAT* pSrcValues, FX_FLOAT* pDestValues);
- virtual void TranslateScanline(FX_LPVOID pTransform, FX_LPBYTE pDest, FX_LPCBYTE pSrc, int pixels);
+ virtual void DestroyTransform(void* pTransform);
+ virtual void Translate(void* pTransform, FX_FLOAT* pSrcValues, FX_FLOAT* pDestValues);
+ virtual void TranslateScanline(void* pTransform, uint8_t* pDest, const uint8_t* pSrc, int pixels);
virtual void SetComponents(FX_DWORD nComponents) {m_nComponents = nComponents;}
virtual ~CCodec_IccModule();
protected:
@@ -247,26 +247,26 @@ protected:
Icc_CLASS_PROOF,
Icc_CLASS_MAX
} Icc_CLASS;
- FX_LPVOID CreateProfile(ICodec_IccModule::IccParam* pIccParam, Icc_CLASS ic, CFX_BinaryBuf* pTransformKey);
+ void* CreateProfile(ICodec_IccModule::IccParam* pIccParam, Icc_CLASS ic, CFX_BinaryBuf* pTransformKey);
};
class CCodec_JpxModule : public ICodec_JpxModule
{
public:
CCodec_JpxModule();
- void* CreateDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size, FX_BOOL useColorSpace = FALSE);
- void GetImageInfo(FX_LPVOID ctx, FX_DWORD& width, FX_DWORD& height,
+ void* CreateDecoder(const uint8_t* src_buf, FX_DWORD src_size, FX_BOOL useColorSpace = FALSE);
+ void GetImageInfo(void* ctx, FX_DWORD& width, FX_DWORD& height,
FX_DWORD& codestream_nComps, FX_DWORD& output_nComps);
- FX_BOOL Decode(void* ctx, FX_LPBYTE dest_data, int pitch, FX_BOOL bTranslateColor, FX_LPBYTE offsets);
+ FX_BOOL Decode(void* ctx, uint8_t* dest_data, int pitch, FX_BOOL bTranslateColor, uint8_t* offsets);
void DestroyDecoder(void* ctx);
};
class CCodec_TiffModule : public ICodec_TiffModule
{
public:
- virtual FX_LPVOID CreateDecoder(IFX_FileRead* file_ptr);
- virtual void GetFrames(FX_LPVOID ctx, int32_t& frames);
- virtual FX_BOOL LoadFrameInfo(FX_LPVOID ctx, int32_t frame, FX_DWORD& width, FX_DWORD& height, FX_DWORD& comps, FX_DWORD& bpc, CFX_DIBAttribute* pAttribute = NULL);
- virtual FX_BOOL Decode(FX_LPVOID ctx, class CFX_DIBitmap* pDIBitmap);
- virtual void DestroyDecoder(FX_LPVOID ctx);
+ virtual void* CreateDecoder(IFX_FileRead* file_ptr);
+ virtual void GetFrames(void* ctx, int32_t& frames);
+ virtual FX_BOOL LoadFrameInfo(void* ctx, int32_t frame, FX_DWORD& width, FX_DWORD& height, FX_DWORD& comps, FX_DWORD& bpc, CFX_DIBAttribute* pAttribute = NULL);
+ virtual FX_BOOL Decode(void* ctx, class CFX_DIBitmap* pDIBitmap);
+ virtual void DestroyDecoder(void* ctx);
};
class CPDF_Jbig2Interface : public CJBig2_Module
{
@@ -293,11 +293,11 @@ public:
}
return FX_Alloc(uint8_t, num * size);
}
- virtual void *JBig2_Realloc(FX_LPVOID pMem, FX_DWORD dwSize)
+ virtual void *JBig2_Realloc(void* pMem, FX_DWORD dwSize)
{
return FX_Realloc(uint8_t, pMem, dwSize);
}
- virtual void JBig2_Free(FX_LPVOID pMem)
+ virtual void JBig2_Free(void* pMem)
{
FX_Free(pMem);
}
@@ -310,11 +310,11 @@ public:
IFX_FileRead* m_file_ptr;
FX_DWORD m_width;
FX_DWORD m_height;
- FX_LPBYTE m_src_buf;
+ uint8_t* m_src_buf;
FX_DWORD m_src_size;
- FX_LPCBYTE m_global_data;
+ const uint8_t* m_global_data;
FX_DWORD m_global_size;
- FX_LPBYTE m_dest_buf;
+ uint8_t* m_dest_buf;
FX_DWORD m_dest_pitch;
FX_BOOL m_bFileReader;
IFX_Pause* m_pPause;
@@ -326,16 +326,16 @@ class CCodec_Jbig2Module : public ICodec_Jbig2Module
public:
CCodec_Jbig2Module() {};
~CCodec_Jbig2Module();
- FX_BOOL Decode(FX_DWORD width, FX_DWORD height, FX_LPCBYTE src_buf, FX_DWORD src_size,
- FX_LPCBYTE global_data, FX_DWORD global_size, FX_LPBYTE dest_buf, FX_DWORD dest_pitch);
+ FX_BOOL Decode(FX_DWORD width, FX_DWORD height, const uint8_t* src_buf, FX_DWORD src_size,
+ const uint8_t* global_data, FX_DWORD global_size, uint8_t* dest_buf, FX_DWORD dest_pitch);
FX_BOOL Decode(IFX_FileRead* file_ptr,
- FX_DWORD& width, FX_DWORD& height, FX_DWORD& pitch, FX_LPBYTE& dest_buf);
+ FX_DWORD& width, FX_DWORD& height, FX_DWORD& pitch, uint8_t*& dest_buf);
void* CreateJbig2Context();
- FXCODEC_STATUS StartDecode(void* pJbig2Context, FX_DWORD width, FX_DWORD height, FX_LPCBYTE src_buf, FX_DWORD src_size,
- FX_LPCBYTE global_data, FX_DWORD global_size, FX_LPBYTE dest_buf, FX_DWORD dest_pitch, IFX_Pause* pPause);
+ FXCODEC_STATUS StartDecode(void* pJbig2Context, FX_DWORD width, FX_DWORD height, const uint8_t* src_buf, FX_DWORD src_size,
+ const uint8_t* global_data, FX_DWORD global_size, uint8_t* dest_buf, FX_DWORD dest_pitch, IFX_Pause* pPause);
FXCODEC_STATUS StartDecode(void* pJbig2Context, IFX_FileRead* file_ptr,
- FX_DWORD& width, FX_DWORD& height, FX_DWORD& pitch, FX_LPBYTE& dest_buf, IFX_Pause* pPause);
+ FX_DWORD& width, FX_DWORD& height, FX_DWORD& pitch, uint8_t*& dest_buf, IFX_Pause* pPause);
FXCODEC_STATUS ContinueDecode(void* pJbig2Context, IFX_Pause* pPause);
void DestroyJbig2Context(void* pJbig2Context);
CPDF_Jbig2Interface m_Module;
@@ -347,24 +347,24 @@ class CFX_DIBAttributeExif : public IFX_DIBAttributeExif
public:
CFX_DIBAttributeExif();
~CFX_DIBAttributeExif();
- virtual FX_BOOL GetInfo(FX_WORD tag, FX_LPVOID val);
+ virtual FX_BOOL GetInfo(FX_WORD tag, void* val);
- FX_BOOL ParseExif(CFX_MapPtrTemplate<FX_DWORD, FX_LPBYTE>* pHead, FX_LPBYTE data, FX_DWORD len, CFX_MapPtrTemplate<FX_DWORD, FX_LPBYTE>* pVal);
+ FX_BOOL ParseExif(CFX_MapPtrTemplate<FX_DWORD, uint8_t*>* pHead, uint8_t* data, FX_DWORD len, CFX_MapPtrTemplate<FX_DWORD, uint8_t*>* pVal);
- typedef FX_WORD (*_Read2Bytes)(FX_LPBYTE data);
- typedef FX_DWORD (*_Read4Bytes)(FX_LPBYTE data);
- FX_LPBYTE ParseExifIFH(FX_LPBYTE data, FX_DWORD len, _Read2Bytes* pReadWord, _Read4Bytes* pReadDword);
- FX_BOOL ParseExifIFD(CFX_MapPtrTemplate<FX_DWORD, FX_LPBYTE>* pMap, FX_LPBYTE data, FX_DWORD len);
+ typedef FX_WORD (*_Read2Bytes)(uint8_t* data);
+ typedef FX_DWORD (*_Read4Bytes)(uint8_t* data);
+ uint8_t* ParseExifIFH(uint8_t* data, FX_DWORD len, _Read2Bytes* pReadWord, _Read4Bytes* pReadDword);
+ FX_BOOL ParseExifIFD(CFX_MapPtrTemplate<FX_DWORD, uint8_t*>* pMap, uint8_t* data, FX_DWORD len);
- FX_LPBYTE m_pExifData;
+ uint8_t* m_pExifData;
FX_DWORD m_dwExifDataLen;
void clear();
_Read2Bytes m_readWord;
_Read4Bytes m_readDword;
- CFX_MapPtrTemplate<FX_DWORD, FX_LPBYTE> m_TagHead;
- CFX_MapPtrTemplate<FX_DWORD, FX_LPBYTE> m_TagVal;
+ CFX_MapPtrTemplate<FX_DWORD, uint8_t*> m_TagHead;
+ CFX_MapPtrTemplate<FX_DWORD, uint8_t*> m_TagVal;
};
struct DecodeData {
diff --git a/core/src/fxcodec/codec/fx_codec.cpp b/core/src/fxcodec/codec/fx_codec.cpp
index 5676e46be0..ed007fdcb1 100644
--- a/core/src/fxcodec/codec/fx_codec.cpp
+++ b/core/src/fxcodec/codec/fx_codec.cpp
@@ -51,7 +51,7 @@ CCodec_ScanlineDecoder::~CCodec_ScanlineDecoder()
FX_Free(m_pDataCache);
}
}
-FX_LPBYTE CCodec_ScanlineDecoder::GetScanline(int line)
+uint8_t* CCodec_ScanlineDecoder::GetScanline(int line)
{
if (m_pDataCache && line < m_pDataCache->m_nCachedLines) {
return &m_pDataCache->m_Data + line * m_Pitch;
@@ -95,9 +95,9 @@ FX_BOOL CCodec_ScanlineDecoder::SkipToScanline(int line, IFX_Pause* pPause)
}
return FALSE;
}
-FX_LPBYTE CCodec_ScanlineDecoder::ReadNextLine()
+uint8_t* CCodec_ScanlineDecoder::ReadNextLine()
{
- FX_LPBYTE pLine = v_GetNextLine();
+ uint8_t* pLine = v_GetNextLine();
if (pLine == NULL) {
return NULL;
}
@@ -131,7 +131,7 @@ void CCodec_ScanlineDecoder::DownScale(int dest_width, int dest_height)
m_pDataCache->m_Width = m_OutputWidth;
m_pDataCache->m_nCachedLines = 0;
}
-FX_BOOL CCodec_BasicModule::RunLengthEncode(const uint8_t* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf,
+FX_BOOL CCodec_BasicModule::RunLengthEncode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_buf,
FX_DWORD& dest_size)
{
return FALSE;
@@ -240,7 +240,7 @@ extern "C" double FXstrtod(const char* nptr, char** endptr)
}
return is_negative ? -ret : ret;
}
-FX_BOOL CCodec_BasicModule::A85Encode(const uint8_t* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf,
+FX_BOOL CCodec_BasicModule::A85Encode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_buf,
FX_DWORD& dest_size)
{
return FALSE;
@@ -283,7 +283,7 @@ void CFX_DIBAttributeExif::clear()
}
m_pExifData = NULL;
FX_DWORD key = 0;
- FX_LPBYTE buf = NULL;
+ uint8_t* buf = NULL;
FX_POSITION pos = NULL;
pos = m_TagHead.GetStartPosition();
while (pos) {
@@ -302,29 +302,29 @@ void CFX_DIBAttributeExif::clear()
}
m_TagVal.RemoveAll();
}
-static FX_WORD _Read2BytesL(FX_LPBYTE data)
+static FX_WORD _Read2BytesL(uint8_t* data)
{
ASSERT(data);
return data[0] | (data[1] << 8);
}
-static FX_WORD _Read2BytesB(FX_LPBYTE data)
+static FX_WORD _Read2BytesB(uint8_t* data)
{
ASSERT(data);
return data[1] | (data[0] << 8);
}
-static FX_DWORD _Read4BytesL(FX_LPBYTE data)
+static FX_DWORD _Read4BytesL(uint8_t* data)
{
return _Read2BytesL(data) | (_Read2BytesL(data + 2) << 16);
}
-static FX_DWORD _Read4BytesB(FX_LPBYTE data)
+static FX_DWORD _Read4BytesB(uint8_t* data)
{
return _Read2BytesB(data + 2) | (_Read2BytesB(data) << 16);
}
-typedef FX_WORD (*_Read2Bytes) (FX_LPBYTE data);
-typedef FX_DWORD (*_Read4Bytes) (FX_LPBYTE data);
-typedef void (*_Write2Bytes) (FX_LPBYTE data, FX_WORD val);
-typedef void (*_Write4Bytes) (FX_LPBYTE data, FX_DWORD val);
-FX_LPBYTE CFX_DIBAttributeExif::ParseExifIFH(FX_LPBYTE data, FX_DWORD len, _Read2Bytes* pReadWord, _Read4Bytes* pReadDword)
+typedef FX_WORD (*_Read2Bytes) (uint8_t* data);
+typedef FX_DWORD (*_Read4Bytes) (uint8_t* data);
+typedef void (*_Write2Bytes) (uint8_t* data, FX_WORD val);
+typedef void (*_Write4Bytes) (uint8_t* data, FX_DWORD val);
+uint8_t* CFX_DIBAttributeExif::ParseExifIFH(uint8_t* data, FX_DWORD len, _Read2Bytes* pReadWord, _Read4Bytes* pReadDword)
{
if (len > 8) {
FX_BOOL tag = FALSE;
@@ -356,14 +356,14 @@ FX_LPBYTE CFX_DIBAttributeExif::ParseExifIFH(FX_LPBYTE data, FX_DWORD len, _Read
}
return data;
}
-FX_BOOL CFX_DIBAttributeExif::ParseExifIFD(CFX_MapPtrTemplate<FX_DWORD, FX_LPBYTE>* pMap, FX_LPBYTE data, FX_DWORD len)
+FX_BOOL CFX_DIBAttributeExif::ParseExifIFD(CFX_MapPtrTemplate<FX_DWORD, uint8_t*>* pMap, uint8_t* data, FX_DWORD len)
{
if (pMap && data) {
if (len > 8) {
FX_WORD wTagNum = m_readWord(data);
data += 2;
FX_DWORD wTag;
- FX_LPBYTE buf;
+ uint8_t* buf;
while (wTagNum--) {
wTag = m_readWord(data);
data += 2;
@@ -417,11 +417,11 @@ enum FX_ExifDataType {
FX_SignedFloat,
FX_DoubleFloat
};
-FX_BOOL CFX_DIBAttributeExif::ParseExif(CFX_MapPtrTemplate<FX_DWORD, FX_LPBYTE>* pHead, FX_LPBYTE data, FX_DWORD len, CFX_MapPtrTemplate<FX_DWORD, FX_LPBYTE>* pVal)
+FX_BOOL CFX_DIBAttributeExif::ParseExif(CFX_MapPtrTemplate<FX_DWORD, uint8_t*>* pHead, uint8_t* data, FX_DWORD len, CFX_MapPtrTemplate<FX_DWORD, uint8_t*>* pVal)
{
if (pHead && data && pVal) {
if (len > 8) {
- FX_LPBYTE old_data = data;
+ uint8_t* old_data = data;
data = ParseExifIFH(data, len, &m_readWord, &m_readDword);
if (data == old_data) {
return FALSE;
@@ -435,11 +435,13 @@ FX_BOOL CFX_DIBAttributeExif::ParseExif(CFX_MapPtrTemplate<FX_DWORD, FX_LPBYTE>*
FX_WORD type;
FX_DWORD dwSize;
FX_DWORD tag;
- FX_LPBYTE head;
+ uint8_t* head;
FX_POSITION pos = pHead->GetStartPosition();
while (pos) {
pHead->GetNextAssoc(pos, tag, head);
- FX_LPBYTE val = NULL, buf = NULL, temp = NULL;
+ uint8_t* val = NULL;
+ uint8_t* buf = NULL;
+ uint8_t* temp = NULL;
int i;
if (head) {
type = m_readWord(head);
@@ -558,14 +560,14 @@ FX_BOOL CFX_DIBAttributeExif::ParseExif(CFX_MapPtrTemplate<FX_DWORD, FX_LPBYTE>*
return FALSE;
}
#define FXEXIF_INFOCONVERT(T) {T* src = (T*)ptr; T* dst = (T*)val; *dst = *src;}
-FX_BOOL CFX_DIBAttributeExif::GetInfo( FX_WORD tag, FX_LPVOID val )
+FX_BOOL CFX_DIBAttributeExif::GetInfo( FX_WORD tag, void* val )
{
if (m_TagVal.GetCount() == 0) {
if (!ParseExif(&m_TagHead, m_pExifData, m_dwExifDataLen, &m_TagVal)) {
return FALSE;
}
}
- FX_LPBYTE ptr = NULL;
+ uint8_t* ptr = NULL;
if (m_TagVal.Lookup(tag, ptr)) {
switch (tag) {
case EXIFTAG_USHORT_RESUNIT:
@@ -583,7 +585,7 @@ FX_BOOL CFX_DIBAttributeExif::GetInfo( FX_WORD tag, FX_LPVOID val )
FXEXIF_INFOCONVERT(FX_WORD);
break;
default: {
- FX_LPBYTE* dst = (FX_LPBYTE*)val;
+ uint8_t** dst = (uint8_t**)val;
*dst = ptr;
}
}
@@ -595,10 +597,10 @@ class CCodec_RLScanlineDecoder : public CCodec_ScanlineDecoder
public:
CCodec_RLScanlineDecoder();
virtual ~CCodec_RLScanlineDecoder();
- FX_BOOL Create(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height, int nComps, int bpc);
+ FX_BOOL Create(const uint8_t* src_buf, FX_DWORD src_size, int width, int height, int nComps, int bpc);
virtual void v_DownScale(int dest_width, int dest_height) {}
virtual FX_BOOL v_Rewind();
- virtual FX_LPBYTE v_GetNextLine();
+ virtual uint8_t* v_GetNextLine();
virtual FX_DWORD GetSrcOffset()
{
return m_SrcOffset;
@@ -608,8 +610,8 @@ protected:
void GetNextOperator();
void UpdateOperator(uint8_t used_bytes);
- FX_LPBYTE m_pScanline;
- FX_LPCBYTE m_pSrcBuf;
+ uint8_t* m_pScanline;
+ const uint8_t* m_pSrcBuf;
FX_DWORD m_SrcSize;
FX_DWORD m_dwLineBytes;
FX_DWORD m_SrcOffset;
@@ -661,7 +663,7 @@ FX_BOOL CCodec_RLScanlineDecoder::CheckDestSize()
}
return TRUE;
}
-FX_BOOL CCodec_RLScanlineDecoder::Create(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height, int nComps, int bpc)
+FX_BOOL CCodec_RLScanlineDecoder::Create(const uint8_t* src_buf, FX_DWORD src_size, int width, int height, int nComps, int bpc)
{
m_pSrcBuf = src_buf;
m_SrcSize = src_size;
@@ -684,7 +686,7 @@ FX_BOOL CCodec_RLScanlineDecoder::v_Rewind()
m_Operator = 0;
return TRUE;
}
-FX_LPBYTE CCodec_RLScanlineDecoder::v_GetNextLine()
+uint8_t* CCodec_RLScanlineDecoder::v_GetNextLine()
{
if (m_SrcOffset == 0) {
GetNextOperator();
@@ -768,7 +770,7 @@ void CCodec_RLScanlineDecoder::UpdateOperator(uint8_t used_bytes)
count -= used_bytes;
m_Operator = 257 - count;
}
-ICodec_ScanlineDecoder* CCodec_BasicModule::CreateRunLengthDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height,
+ICodec_ScanlineDecoder* CCodec_BasicModule::CreateRunLengthDecoder(const uint8_t* src_buf, FX_DWORD src_size, int width, int height,
int nComps, int bpc)
{
CCodec_RLScanlineDecoder* pRLScanlineDecoder = new CCodec_RLScanlineDecoder;
diff --git a/core/src/fxcodec/codec/fx_codec_bmp.cpp b/core/src/fxcodec/codec/fx_codec_bmp.cpp
index 924eaa91a4..554ce358e0 100644
--- a/core/src/fxcodec/codec/fx_codec_bmp.cpp
+++ b/core/src/fxcodec/codec/fx_codec_bmp.cpp
@@ -28,12 +28,12 @@ extern "C" {
}
}
};
-static void _bmp_error_data(bmp_decompress_struct_p bmp_ptr, FX_LPCSTR err_msg)
+static void _bmp_error_data(bmp_decompress_struct_p bmp_ptr, const FX_CHAR* err_msg)
{
FXSYS_strncpy((char*)bmp_ptr->err_ptr, err_msg, BMP_MAX_ERROR_SIZE - 1);
longjmp(bmp_ptr->jmpbuf, 1);
}
-static void _bmp_read_scanline(bmp_decompress_struct_p bmp_ptr, int32_t row_num, FX_LPBYTE row_buf)
+static void _bmp_read_scanline(bmp_decompress_struct_p bmp_ptr, int32_t row_num, uint8_t* row_buf)
{
FXBMP_Context* p = (FXBMP_Context*)bmp_ptr->context_ptr;
CCodec_BmpModule* pModule = (CCodec_BmpModule*)p->parent_ptr;
@@ -112,13 +112,13 @@ int32_t CCodec_BmpModule::LoadImage(void* pContext)
}
return _bmp_decode_image(p->bmp_ptr);
}
-FX_DWORD CCodec_BmpModule::GetAvailInput(void* pContext, FX_LPBYTE* avial_buf_ptr)
+FX_DWORD CCodec_BmpModule::GetAvailInput(void* pContext, uint8_t** avial_buf_ptr)
{
FXBMP_Context* p = (FXBMP_Context*)pContext;
return _bmp_get_avail_input(p->bmp_ptr, avial_buf_ptr);
}
-void CCodec_BmpModule::Input(void* pContext, FX_LPCBYTE src_buf, FX_DWORD src_size)
+void CCodec_BmpModule::Input(void* pContext, const uint8_t* src_buf, FX_DWORD src_size)
{
FXBMP_Context* p = (FXBMP_Context*)pContext;
- _bmp_input_buffer(p->bmp_ptr, (FX_LPBYTE)src_buf, src_size);
+ _bmp_input_buffer(p->bmp_ptr, (uint8_t*)src_buf, src_size);
}
diff --git a/core/src/fxcodec/codec/fx_codec_fax.cpp b/core/src/fxcodec/codec/fx_codec_fax.cpp
index 869751e05b..40502362d5 100644
--- a/core/src/fxcodec/codec/fx_codec_fax.cpp
+++ b/core/src/fxcodec/codec/fx_codec_fax.cpp
@@ -48,7 +48,7 @@ int _FindBit(const uint8_t* data_buf, int max_pos, int start_pos, int bit)
if (start_pos >= max_pos) {
return max_pos;
}
- FX_LPCBYTE leading_pos = bit ? OneLeadPos : ZeroLeadPos;
+ const uint8_t* leading_pos = bit ? OneLeadPos : ZeroLeadPos;
if (start_pos % 8) {
uint8_t data = data_buf[start_pos / 8];
if (bit) {
@@ -100,7 +100,7 @@ void _FaxG4FindB1B2(const uint8_t* ref_buf, int columns, int a0, FX_BOOL a0color
}
b2 = _FindBit(ref_buf, columns, b1 + 1, first_bit);
}
-void _FaxFillBits(FX_LPBYTE dest_buf, int columns, int startpos, int endpos)
+void _FaxFillBits(uint8_t* dest_buf, int columns, int startpos, int endpos)
{
if (startpos < 0) {
startpos = 0;
@@ -375,7 +375,7 @@ static const uint8_t FaxWhiteRunIns[] = {
0x1f, 2560 % 256, 2560 / 256,
0xff,
};
-int _FaxGetRun(FX_LPCBYTE ins_array, const uint8_t* src_buf, int& bitpos, int bitsize)
+int _FaxGetRun(const uint8_t* ins_array, const uint8_t* src_buf, int& bitpos, int bitsize)
{
FX_DWORD code = 0;
int ins_off = 0;
@@ -400,7 +400,7 @@ int _FaxGetRun(FX_LPCBYTE ins_array, const uint8_t* src_buf, int& bitpos, int bi
}
}
}
-FX_BOOL _FaxG4GetRow(const uint8_t* src_buf, int bitsize, int& bitpos, FX_LPBYTE dest_buf, const uint8_t* ref_buf, int columns)
+FX_BOOL _FaxG4GetRow(const uint8_t* src_buf, int bitsize, int& bitpos, uint8_t* dest_buf, const uint8_t* ref_buf, int columns)
{
int a0 = -1, a0color = 1;
while (1) {
@@ -536,7 +536,7 @@ FX_BOOL _FaxSkipEOL(const uint8_t* src_buf, int bitsize, int& bitpos)
}
return FALSE;
}
-FX_BOOL _FaxGet1DLine(const uint8_t* src_buf, int bitsize, int& bitpos, FX_LPBYTE dest_buf, int columns)
+FX_BOOL _FaxGet1DLine(const uint8_t* src_buf, int bitsize, int& bitpos, uint8_t* dest_buf, int columns)
{
int color = TRUE;
int startpos = 0;
@@ -577,17 +577,18 @@ class CCodec_FaxDecoder : public CCodec_ScanlineDecoder
public:
CCodec_FaxDecoder();
virtual ~CCodec_FaxDecoder();
- FX_BOOL Create(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height,
+ FX_BOOL Create(const uint8_t* src_buf, FX_DWORD src_size, int width, int height,
int K, FX_BOOL EndOfLine, FX_BOOL EncodedByteAlign, FX_BOOL BlackIs1, int Columns, int Rows);
virtual void v_DownScale(int dest_width, int dest_height) {}
virtual FX_BOOL v_Rewind();
- virtual FX_LPBYTE v_GetNextLine();
+ virtual uint8_t* v_GetNextLine();
virtual FX_DWORD GetSrcOffset();
int m_Encoding, m_bEndOfLine, m_bByteAlign, m_bBlack;
int bitpos;
- FX_LPCBYTE m_pSrcBuf;
+ const uint8_t* m_pSrcBuf;
FX_DWORD m_SrcSize;
- FX_LPBYTE m_pScanlineBuf, m_pRefBuf;
+ uint8_t* m_pScanlineBuf;
+ uint8_t* m_pRefBuf;
};
CCodec_FaxDecoder::CCodec_FaxDecoder()
{
@@ -603,7 +604,7 @@ CCodec_FaxDecoder::~CCodec_FaxDecoder()
FX_Free(m_pRefBuf);
}
}
-FX_BOOL CCodec_FaxDecoder::Create(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height,
+FX_BOOL CCodec_FaxDecoder::Create(const uint8_t* src_buf, FX_DWORD src_size, int width, int height,
int K, FX_BOOL EndOfLine, FX_BOOL EncodedByteAlign, FX_BOOL BlackIs1, int Columns, int Rows)
{
m_Encoding = K;
@@ -636,7 +637,7 @@ FX_BOOL CCodec_FaxDecoder::v_Rewind()
bitpos = 0;
return TRUE;
}
-FX_LPBYTE CCodec_FaxDecoder::v_GetNextLine()
+uint8_t* CCodec_FaxDecoder::v_GetNextLine()
{
int bitsize = m_SrcSize * 8;
_FaxSkipEOL(m_pSrcBuf, bitsize, bitpos);
@@ -693,16 +694,16 @@ FX_DWORD CCodec_FaxDecoder::GetSrcOffset()
return ret;
}
extern "C" {
- void _FaxG4Decode(void*, FX_LPCBYTE src_buf, FX_DWORD src_size, int* pbitpos, FX_LPBYTE dest_buf, int width, int height, int pitch)
+ void _FaxG4Decode(void*, const uint8_t* src_buf, FX_DWORD src_size, int* pbitpos, uint8_t* dest_buf, int width, int height, int pitch)
{
if (pitch == 0) {
pitch = (width + 7) / 8;
}
- FX_LPBYTE ref_buf = FX_Alloc(uint8_t, pitch);
+ uint8_t* ref_buf = FX_Alloc(uint8_t, pitch);
FXSYS_memset8(ref_buf, 0xff, pitch);
int bitpos = *pbitpos;
for (int iRow = 0; iRow < height; iRow ++) {
- FX_LPBYTE line_buf = dest_buf + iRow * pitch;
+ uint8_t* line_buf = dest_buf + iRow * pitch;
FXSYS_memset8(line_buf, 0xff, pitch);
_FaxG4GetRow(src_buf, src_size << 3, bitpos, line_buf, ref_buf, width);
FXSYS_memcpy32(ref_buf, line_buf, pitch);
@@ -836,7 +837,7 @@ static const uint8_t WhiteRunMarkup[80] = {
0x1e, 12,
0x1f, 12,
};
-static void _AddBitStream(FX_LPBYTE dest_buf, int& dest_bitpos, int data, int bitlen)
+static void _AddBitStream(uint8_t* dest_buf, int& dest_bitpos, int data, int bitlen)
{
for (int i = bitlen - 1; i >= 0; i --) {
if (data & (1 << i)) {
@@ -845,7 +846,7 @@ static void _AddBitStream(FX_LPBYTE dest_buf, int& dest_bitpos, int data, int bi
dest_bitpos ++;
}
}
-static void _FaxEncodeRun(FX_LPBYTE dest_buf, int& dest_bitpos, int run, FX_BOOL bWhite)
+static void _FaxEncodeRun(uint8_t* dest_buf, int& dest_bitpos, int run, FX_BOOL bWhite)
{
while (run >= 2560) {
_AddBitStream(dest_buf, dest_bitpos, 0x1f, 12);
@@ -853,16 +854,16 @@ static void _FaxEncodeRun(FX_LPBYTE dest_buf, int& dest_bitpos, int run, FX_BOOL
}
if (run >= 64) {
int markup = run - run % 64;
- FX_LPCBYTE p = bWhite ? WhiteRunMarkup : BlackRunMarkup;
+ const uint8_t* p = bWhite ? WhiteRunMarkup : BlackRunMarkup;
p += (markup / 64 - 1) * 2;
_AddBitStream(dest_buf, dest_bitpos, *p, p[1]);
}
run %= 64;
- FX_LPCBYTE p = bWhite ? WhiteRunTerminator : BlackRunTerminator;
+ const uint8_t* p = bWhite ? WhiteRunTerminator : BlackRunTerminator;
p += run * 2;
_AddBitStream(dest_buf, dest_bitpos, *p, p[1]);
}
-static void _FaxEncode2DLine(FX_LPBYTE dest_buf, int& dest_bitpos, FX_LPCBYTE src_buf, FX_LPCBYTE ref_buf, int cols)
+static void _FaxEncode2DLine(uint8_t* dest_buf, int& dest_bitpos, const uint8_t* src_buf, const uint8_t* ref_buf, int cols)
{
int a0 = -1, a0color = 1;
while (1) {
@@ -920,16 +921,17 @@ static void _FaxEncode2DLine(FX_LPBYTE dest_buf, int& dest_bitpos, FX_LPCBYTE sr
class CCodec_FaxEncoder
{
public:
- CCodec_FaxEncoder(FX_LPCBYTE src_buf, int width, int height, int pitch);
+ CCodec_FaxEncoder(const uint8_t* src_buf, int width, int height, int pitch);
~CCodec_FaxEncoder();
- void Encode(FX_LPBYTE& dest_buf, FX_DWORD& dest_size);
- void Encode2DLine(FX_LPCBYTE scan_line);
+ void Encode(uint8_t*& dest_buf, FX_DWORD& dest_size);
+ void Encode2DLine(const uint8_t* scan_line);
CFX_BinaryBuf m_DestBuf;
- FX_LPBYTE m_pRefLine, m_pLineBuf;
+ uint8_t* m_pRefLine;
+ uint8_t* m_pLineBuf;
int m_Cols, m_Rows, m_Pitch;
- FX_LPCBYTE m_pSrcBuf;
+ const uint8_t* m_pSrcBuf;
};
-CCodec_FaxEncoder::CCodec_FaxEncoder(FX_LPCBYTE src_buf, int width, int height, int pitch)
+CCodec_FaxEncoder::CCodec_FaxEncoder(const uint8_t* src_buf, int width, int height, int pitch)
{
m_pSrcBuf = src_buf;
m_Cols = width;
@@ -949,12 +951,12 @@ CCodec_FaxEncoder::~CCodec_FaxEncoder()
FX_Free(m_pLineBuf);
}
}
-void CCodec_FaxEncoder::Encode(FX_LPBYTE& dest_buf, FX_DWORD& dest_size)
+void CCodec_FaxEncoder::Encode(uint8_t*& dest_buf, FX_DWORD& dest_size)
{
int dest_bitpos = 0;
uint8_t last_byte = 0;
for (int i = 0; i < m_Rows; i ++) {
- FX_LPCBYTE scan_line = m_pSrcBuf + i * m_Pitch;
+ const uint8_t* scan_line = m_pSrcBuf + i * m_Pitch;
FXSYS_memset32(m_pLineBuf, 0, m_Pitch * 8);
m_pLineBuf[0] = last_byte;
_FaxEncode2DLine(m_pLineBuf, dest_bitpos, scan_line, m_pRefLine, m_Cols);
@@ -970,13 +972,13 @@ void CCodec_FaxEncoder::Encode(FX_LPBYTE& dest_buf, FX_DWORD& dest_size)
dest_size = m_DestBuf.GetSize();
m_DestBuf.DetachBuffer();
}
-FX_BOOL CCodec_FaxModule::Encode(FX_LPCBYTE src_buf, int width, int height, int pitch, FX_LPBYTE& dest_buf, FX_DWORD& dest_size)
+FX_BOOL CCodec_FaxModule::Encode(const uint8_t* src_buf, int width, int height, int pitch, uint8_t*& dest_buf, FX_DWORD& dest_size)
{
CCodec_FaxEncoder encoder(src_buf, width, height, pitch);
encoder.Encode(dest_buf, dest_size);
return TRUE;
}
-ICodec_ScanlineDecoder* CCodec_FaxModule::CreateDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height,
+ICodec_ScanlineDecoder* CCodec_FaxModule::CreateDecoder(const uint8_t* src_buf, FX_DWORD src_size, int width, int height,
int K, FX_BOOL EndOfLine, FX_BOOL EncodedByteAlign, FX_BOOL BlackIs1, int Columns, int Rows)
{
CCodec_FaxDecoder* pDecoder = new CCodec_FaxDecoder;
diff --git a/core/src/fxcodec/codec/fx_codec_flate.cpp b/core/src/fxcodec/codec/fx_codec_flate.cpp
index 9997a570d6..2e6cf4e8db 100644
--- a/core/src/fxcodec/codec/fx_codec_flate.cpp
+++ b/core/src/fxcodec/codec/fx_codec_flate.cpp
@@ -79,11 +79,11 @@ extern "C"
class CLZWDecoder
{
public:
- FX_BOOL Decode(FX_LPBYTE output, FX_DWORD& outlen, const uint8_t* input, FX_DWORD& size, FX_BOOL bEarlyChange);
+ FX_BOOL Decode(uint8_t* output, FX_DWORD& outlen, const uint8_t* input, FX_DWORD& size, FX_BOOL bEarlyChange);
private:
FX_DWORD m_InPos;
FX_DWORD m_OutPos;
- FX_LPBYTE m_pOutput;
+ uint8_t* m_pOutput;
const uint8_t* m_pInput;
FX_BOOL m_Early;
void AddCode(FX_DWORD prefix_code, uint8_t append_char);
@@ -127,7 +127,7 @@ void CLZWDecoder::DecodeString(FX_DWORD code)
}
m_DecodeStack[m_StackLen++] = (uint8_t)code;
}
-int CLZWDecoder::Decode(FX_LPBYTE dest_buf, FX_DWORD& dest_size, const uint8_t* src_buf, FX_DWORD& src_size, FX_BOOL bEarlyChange)
+int CLZWDecoder::Decode(uint8_t* dest_buf, FX_DWORD& dest_size, const uint8_t* src_buf, FX_DWORD& src_size, FX_BOOL bEarlyChange)
{
m_CodeLen = 9;
m_InPos = 0;
@@ -231,7 +231,7 @@ static uint8_t PaethPredictor(int a, int b, int c)
}
return (uint8_t)c;
}
-static FX_BOOL PNG_PredictorEncode(FX_LPBYTE& data_buf, FX_DWORD& data_size,
+static FX_BOOL PNG_PredictorEncode(uint8_t*& data_buf, FX_DWORD& data_size,
int predictor, int Colors,
int BitsPerComponent, int Columns)
{
@@ -241,10 +241,10 @@ static FX_BOOL PNG_PredictorEncode(FX_LPBYTE& data_buf, FX_DWORD& data_size,
return FALSE;
const int row_count = (data_size + row_size - 1) / row_size;
const int last_row_size = data_size % row_size;
- FX_LPBYTE dest_buf = FX_Alloc2D(uint8_t, row_size + 1, row_count);
+ uint8_t* dest_buf = FX_Alloc2D(uint8_t, row_size + 1, row_count);
int byte_cnt = 0;
- FX_LPBYTE pSrcData = data_buf;
- FX_LPBYTE pDestData = dest_buf;
+ uint8_t* pSrcData = data_buf;
+ uint8_t* pDestData = dest_buf;
for (int row = 0; row < row_count; row++) {
if (predictor == 10) {
pDestData[0] = 0;
@@ -323,7 +323,7 @@ static FX_BOOL PNG_PredictorEncode(FX_LPBYTE& data_buf, FX_DWORD& data_size,
data_size = (row_size + 1) * row_count - (last_row_size > 0 ? (row_size - last_row_size) : 0);
return TRUE;
}
-static void PNG_PredictLine(FX_LPBYTE pDestData, FX_LPCBYTE pSrcData, FX_LPCBYTE pLastLine,
+static void PNG_PredictLine(uint8_t* pDestData, const uint8_t* pSrcData, const uint8_t* pLastLine,
int bpc, int nColors, int nPixels)
{
int row_size = (nPixels * bpc * nColors + 7) / 8;
@@ -386,7 +386,7 @@ static void PNG_PredictLine(FX_LPBYTE pDestData, FX_LPCBYTE pSrcData, FX_LPCBYTE
}
}
}
-static FX_BOOL PNG_Predictor(FX_LPBYTE& data_buf, FX_DWORD& data_size,
+static FX_BOOL PNG_Predictor(uint8_t*& data_buf, FX_DWORD& data_size,
int Colors, int BitsPerComponent, int Columns)
{
const int BytesPerPixel = (Colors * BitsPerComponent + 7) / 8;
@@ -395,10 +395,10 @@ static FX_BOOL PNG_Predictor(FX_LPBYTE& data_buf, FX_DWORD& data_size,
return FALSE;
const int row_count = (data_size + row_size) / (row_size + 1);
const int last_row_size = data_size % (row_size + 1);
- FX_LPBYTE dest_buf = FX_Alloc2D(uint8_t, row_size, row_count);
+ uint8_t* dest_buf = FX_Alloc2D(uint8_t, row_size, row_count);
int byte_cnt = 0;
- FX_LPBYTE pSrcData = data_buf;
- FX_LPBYTE pDestData = dest_buf;
+ uint8_t* pSrcData = data_buf;
+ uint8_t* pDestData = dest_buf;
for (int row = 0; row < row_count; row ++) {
uint8_t tag = pSrcData[0];
byte_cnt++;
@@ -474,7 +474,7 @@ static FX_BOOL PNG_Predictor(FX_LPBYTE& data_buf, FX_DWORD& data_size,
data_size = row_size * row_count - (last_row_size > 0 ? (row_size + 1 - last_row_size) : 0);
return TRUE;
}
-static void TIFF_PredictorEncodeLine(FX_LPBYTE dest_buf, int row_size, int BitsPerComponent, int Colors, int Columns)
+static void TIFF_PredictorEncodeLine(uint8_t* dest_buf, int row_size, int BitsPerComponent, int Colors, int Columns)
{
int BytesPerPixel = BitsPerComponent * Colors / 8;
if (BitsPerComponent < 8) {
@@ -511,7 +511,7 @@ static void TIFF_PredictorEncodeLine(FX_LPBYTE dest_buf, int row_size, int BitsP
}
}
}
-static FX_BOOL TIFF_PredictorEncode(FX_LPBYTE& data_buf, FX_DWORD& data_size,
+static FX_BOOL TIFF_PredictorEncode(uint8_t*& data_buf, FX_DWORD& data_size,
int Colors, int BitsPerComponent, int Columns)
{
int row_size = (Colors * BitsPerComponent * Columns + 7) / 8;
@@ -520,7 +520,7 @@ static FX_BOOL TIFF_PredictorEncode(FX_LPBYTE& data_buf, FX_DWORD& data_size,
const int row_count = (data_size + row_size - 1) / row_size;
const int last_row_size = data_size % row_size;
for (int row = 0; row < row_count; row++) {
- FX_LPBYTE scan_line = data_buf + row * row_size;
+ uint8_t* scan_line = data_buf + row * row_size;
if ((row + 1) * row_size > (int)data_size) {
row_size = last_row_size;
}
@@ -528,7 +528,7 @@ static FX_BOOL TIFF_PredictorEncode(FX_LPBYTE& data_buf, FX_DWORD& data_size,
}
return TRUE;
}
-static void TIFF_PredictLine(FX_LPBYTE dest_buf, int row_size, int BitsPerComponent, int Colors, int Columns)
+static void TIFF_PredictLine(uint8_t* dest_buf, int row_size, int BitsPerComponent, int Colors, int Columns)
{
if (BitsPerComponent == 1) {
int row_bits = FX_MIN(BitsPerComponent * Colors * Columns, row_size * 8);
@@ -561,7 +561,7 @@ static void TIFF_PredictLine(FX_LPBYTE dest_buf, int row_size, int BitsPerCompon
}
}
}
-static FX_BOOL TIFF_Predictor(FX_LPBYTE& data_buf, FX_DWORD& data_size,
+static FX_BOOL TIFF_Predictor(uint8_t*& data_buf, FX_DWORD& data_size,
int Colors, int BitsPerComponent, int Columns)
{
int row_size = (Colors * BitsPerComponent * Columns + 7) / 8;
@@ -570,7 +570,7 @@ static FX_BOOL TIFF_Predictor(FX_LPBYTE& data_buf, FX_DWORD& data_size,
const int row_count = (data_size + row_size - 1) / row_size;
const int last_row_size = data_size % row_size;
for (int row = 0; row < row_count; row ++) {
- FX_LPBYTE scan_line = data_buf + row * row_size;
+ uint8_t* scan_line = data_buf + row * row_size;
if ((row + 1) * row_size > (int)data_size) {
row_size = last_row_size;
}
@@ -583,7 +583,7 @@ class CCodec_FlateScanlineDecoder : public CCodec_ScanlineDecoder
public:
CCodec_FlateScanlineDecoder();
~CCodec_FlateScanlineDecoder();
- void Create(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height, int nComps, int bpc,
+ void Create(const uint8_t* src_buf, FX_DWORD src_size, int width, int height, int nComps, int bpc,
int predictor, int Colors, int BitsPerComponent, int Columns);
virtual void Destroy()
{
@@ -591,15 +591,15 @@ public:
}
virtual void v_DownScale(int dest_width, int dest_height) {}
virtual FX_BOOL v_Rewind();
- virtual FX_LPBYTE v_GetNextLine();
+ virtual uint8_t* v_GetNextLine();
virtual FX_DWORD GetSrcOffset();
void* m_pFlate;
- FX_LPCBYTE m_SrcBuf;
+ const uint8_t* m_SrcBuf;
FX_DWORD m_SrcSize;
- FX_LPBYTE m_pScanline;
- FX_LPBYTE m_pLastLine;
- FX_LPBYTE m_pPredictBuffer;
- FX_LPBYTE m_pPredictRaw;
+ uint8_t* m_pScanline;
+ uint8_t* m_pLastLine;
+ uint8_t* m_pPredictBuffer;
+ uint8_t* m_pPredictRaw;
int m_Predictor;
int m_Colors, m_BitsPerComponent, m_Columns, m_PredictPitch, m_LeftOver;
};
@@ -630,7 +630,7 @@ CCodec_FlateScanlineDecoder::~CCodec_FlateScanlineDecoder()
FPDFAPI_FlateEnd(m_pFlate);
}
}
-void CCodec_FlateScanlineDecoder::Create(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height,
+void CCodec_FlateScanlineDecoder::Create(const uint8_t* src_buf, FX_DWORD src_size, int width, int height,
int nComps, int bpc, int predictor, int Colors, int BitsPerComponent, int Columns)
{
m_SrcBuf = src_buf;
@@ -678,7 +678,7 @@ FX_BOOL CCodec_FlateScanlineDecoder::v_Rewind()
m_LeftOver = 0;
return TRUE;
}
-FX_LPBYTE CCodec_FlateScanlineDecoder::v_GetNextLine()
+uint8_t* CCodec_FlateScanlineDecoder::v_GetNextLine()
{
if (m_Predictor) {
if (m_Pitch == m_PredictPitch) {
@@ -722,8 +722,8 @@ FX_DWORD CCodec_FlateScanlineDecoder::GetSrcOffset()
{
return FPDFAPI_FlateGetTotalIn(m_pFlate);
}
-static void FlateUncompress(FX_LPCBYTE src_buf, FX_DWORD src_size, FX_DWORD orig_size,
- FX_LPBYTE& dest_buf, FX_DWORD& dest_size, FX_DWORD& offset)
+static void FlateUncompress(const uint8_t* src_buf, FX_DWORD src_size, FX_DWORD orig_size,
+ uint8_t*& dest_buf, FX_DWORD& dest_size, FX_DWORD& offset)
{
const FX_BOOL useOldImpl = src_size < 10240;
FX_DWORD guess_size = orig_size ? orig_size : src_size * 2;
@@ -737,8 +737,8 @@ static void FlateUncompress(FX_LPCBYTE src_buf, FX_DWORD src_size, FX_DWORD orig
FX_DWORD last_buf_size = buf_size;
void* context = nullptr;
- FX_LPBYTE guess_buf = FX_Alloc(uint8_t, guess_size + 1);
- FX_LPBYTE cur_buf = guess_buf;
+ uint8_t* guess_buf = FX_Alloc(uint8_t, guess_size + 1);
+ uint8_t* cur_buf = guess_buf;
guess_buf[guess_size] = '\0';
context = FPDFAPI_FlateInit(my_alloc_func, my_free_func);
if (!context)
@@ -776,7 +776,7 @@ static void FlateUncompress(FX_LPCBYTE src_buf, FX_DWORD src_size, FX_DWORD orig
}
dest_buf = guess_buf;
} else {
- CFX_ArrayTemplate<FX_LPBYTE> result_tmp_bufs;
+ CFX_ArrayTemplate<uint8_t*> result_tmp_bufs;
while (1) {
int32_t ret = FPDFAPI_FlateOutput(context, cur_buf, buf_size);
int32_t avail_buf_size = FPDFAPI_FlateGetAvailOut(context);
@@ -801,10 +801,10 @@ static void FlateUncompress(FX_LPCBYTE src_buf, FX_DWORD src_size, FX_DWORD orig
if (result_tmp_bufs.GetSize() == 1) {
dest_buf = result_tmp_bufs[0];
} else {
- FX_LPBYTE result_buf = FX_Alloc(uint8_t, dest_size);
+ uint8_t* result_buf = FX_Alloc(uint8_t, dest_size);
FX_DWORD result_pos = 0;
for (int32_t i = 0; i < result_tmp_bufs.GetSize(); i++) {
- FX_LPBYTE tmp_buf = result_tmp_bufs[i];
+ uint8_t* tmp_buf = result_tmp_bufs[i];
FX_DWORD tmp_buf_size = buf_size;
if (i == result_tmp_bufs.GetSize() - 1) {
tmp_buf_size = last_buf_size;
@@ -825,7 +825,7 @@ fail:
dest_size = 0;
return;
}
-ICodec_ScanlineDecoder* CCodec_FlateModule::CreateDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height,
+ICodec_ScanlineDecoder* CCodec_FlateModule::CreateDecoder(const uint8_t* src_buf, FX_DWORD src_size, int width, int height,
int nComps, int bpc, int predictor, int Colors, int BitsPerComponent, int Columns)
{
CCodec_FlateScanlineDecoder* pDecoder = new CCodec_FlateScanlineDecoder;
@@ -834,7 +834,7 @@ ICodec_ScanlineDecoder* CCodec_FlateModule::CreateDecoder(FX_LPCBYTE src_buf, FX
}
FX_DWORD CCodec_FlateModule::FlateOrLZWDecode(FX_BOOL bLZW, const uint8_t* src_buf, FX_DWORD src_size, FX_BOOL bEarlyChange,
int predictor, int Colors, int BitsPerComponent, int Columns,
- FX_DWORD estimated_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size)
+ FX_DWORD estimated_size, uint8_t*& dest_buf, FX_DWORD& dest_size)
{
dest_buf = NULL;
FX_DWORD offset = 0;
@@ -881,12 +881,12 @@ FX_DWORD CCodec_FlateModule::FlateOrLZWDecode(FX_BOOL bLZW, const uint8_t* src_b
}
FX_BOOL CCodec_FlateModule::Encode(const uint8_t* src_buf, FX_DWORD src_size,
int predictor, int Colors, int BitsPerComponent, int Columns,
- FX_LPBYTE& dest_buf, FX_DWORD& dest_size)
+ uint8_t*& dest_buf, FX_DWORD& dest_size)
{
if (predictor != 2 && predictor < 10) {
return Encode(src_buf, src_size, dest_buf, dest_size);
}
- FX_LPBYTE pSrcBuf = NULL;
+ uint8_t* pSrcBuf = NULL;
pSrcBuf = FX_Alloc(uint8_t, src_size);
FXSYS_memcpy32(pSrcBuf, src_buf, src_size);
FX_BOOL ret = TRUE;
@@ -902,7 +902,7 @@ FX_BOOL CCodec_FlateModule::Encode(const uint8_t* src_buf, FX_DWORD src_size,
FX_Free(pSrcBuf);
return ret;
}
-FX_BOOL CCodec_FlateModule::Encode(FX_LPCBYTE src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size)
+FX_BOOL CCodec_FlateModule::Encode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_buf, FX_DWORD& dest_size)
{
dest_size = src_size + src_size / 1000 + 12;
dest_buf = FX_Alloc( uint8_t, dest_size);
diff --git a/core/src/fxcodec/codec/fx_codec_gif.cpp b/core/src/fxcodec/codec/fx_codec_gif.cpp
index 218b58a946..d22c156fdb 100644
--- a/core/src/fxcodec/codec/fx_codec_gif.cpp
+++ b/core/src/fxcodec/codec/fx_codec_gif.cpp
@@ -28,12 +28,12 @@ extern "C" {
}
}
};
-static void _gif_error_data(gif_decompress_struct_p gif_ptr, FX_LPCSTR err_msg)
+static void _gif_error_data(gif_decompress_struct_p gif_ptr, const FX_CHAR* err_msg)
{
FXSYS_strncpy((char*)gif_ptr->err_ptr, err_msg, GIF_MAX_ERROR_SIZE - 1);
longjmp(gif_ptr->jmpbuf, 1);
}
-static FX_LPBYTE _gif_ask_buf_for_pal(gif_decompress_struct_p gif_ptr, int32_t pal_size)
+static uint8_t* _gif_ask_buf_for_pal(gif_decompress_struct_p gif_ptr, int32_t pal_size)
{
FXGIF_Context* p = (FXGIF_Context*)gif_ptr->context_ptr;
CCodec_GifModule* pModule = (CCodec_GifModule*)p->parent_ptr;
@@ -47,7 +47,7 @@ static void _gif_record_current_position(gif_decompress_struct_p gif_ptr, FX_DWO
CCodec_GifModule* pModule = (CCodec_GifModule*)p->parent_ptr;
pModule->RecordCurrentPositionCallback(p->child_ptr, *cur_pos_ptr);
}
-static void _gif_read_scanline(gif_decompress_struct_p gif_ptr, int32_t row_num, FX_LPBYTE row_buf)
+static void _gif_read_scanline(gif_decompress_struct_p gif_ptr, int32_t row_num, uint8_t* row_buf)
{
FXGIF_Context* p = (FXGIF_Context*)gif_ptr->context_ptr;
CCodec_GifModule* pModule = (CCodec_GifModule*)p->parent_ptr;
@@ -144,7 +144,7 @@ int32_t CCodec_GifModule::LoadFrame(void* pContext, int frame_num, CFX_DIBAttrib
pAttribute->m_nGifTop = p->gif_ptr->img_ptr_arr_ptr->GetAt(frame_num)->image_info_ptr->top;
pAttribute->m_fAspectRatio = p->gif_ptr->pixel_aspect;
if (p->gif_ptr->cmt_data_ptr) {
- FX_LPCBYTE buf = (FX_LPCBYTE)p->gif_ptr->cmt_data_ptr->GetBuffer(0);
+ const uint8_t* buf = (const uint8_t*)p->gif_ptr->cmt_data_ptr->GetBuffer(0);
FX_DWORD len = p->gif_ptr->cmt_data_ptr->GetLength();
if (len > 21) {
uint8_t size = *buf++;
@@ -164,13 +164,13 @@ int32_t CCodec_GifModule::LoadFrame(void* pContext, int frame_num, CFX_DIBAttrib
}
return ret;
}
-FX_DWORD CCodec_GifModule::GetAvailInput(void* pContext, FX_LPBYTE* avial_buf_ptr)
+FX_DWORD CCodec_GifModule::GetAvailInput(void* pContext, uint8_t** avial_buf_ptr)
{
FXGIF_Context* p = (FXGIF_Context*)pContext;
return _gif_get_avail_input(p->gif_ptr, avial_buf_ptr);
}
-void CCodec_GifModule::Input(void* pContext, FX_LPCBYTE src_buf, FX_DWORD src_size)
+void CCodec_GifModule::Input(void* pContext, const uint8_t* src_buf, FX_DWORD src_size)
{
FXGIF_Context* p = (FXGIF_Context*)pContext;
- _gif_input_buffer(p->gif_ptr, (FX_LPBYTE)src_buf, src_size);
+ _gif_input_buffer(p->gif_ptr, (uint8_t*)src_buf, src_size);
}
diff --git a/core/src/fxcodec/codec/fx_codec_icc.cpp b/core/src/fxcodec/codec/fx_codec_icc.cpp
index cde5d4c1bd..6fe92ff240 100644
--- a/core/src/fxcodec/codec/fx_codec_icc.cpp
+++ b/core/src/fxcodec/codec/fx_codec_icc.cpp
@@ -13,7 +13,7 @@ const FX_DWORD N_COMPONENT_RGB = 3;
const FX_DWORD N_COMPONENT_CMYK = 4;
const FX_DWORD N_COMPONENT_DEFAULT = 3;
-FX_BOOL MD5ComputeID( FX_LPCVOID buf, FX_DWORD dwSize, uint8_t ID[16] )
+FX_BOOL MD5ComputeID( const void* buf, FX_DWORD dwSize, uint8_t ID[16] )
{
return cmsMD5computeIDExt(buf, dwSize, ID);
}
@@ -218,7 +218,7 @@ void IccLib_TranslateImage(void* pTransform, unsigned char* pDest, const unsigne
{
cmsDoTransform(((CLcmsCmm*)pTransform)->m_hTransform, (void*)pSrc, pDest, pixels);
}
-FX_LPVOID CreateProfile_Gray(double gamma)
+void* CreateProfile_Gray(double gamma)
{
cmsCIExyY* D50 = (cmsCIExyY*)cmsD50_xyY();
if (!cmsWhitePointFromTemp(D50, 6504)) {
@@ -228,11 +228,11 @@ FX_LPVOID CreateProfile_Gray(double gamma)
if (curve == NULL) {
return NULL;
}
- FX_LPVOID profile = cmsCreateGrayProfile(D50, curve);
+ void* profile = cmsCreateGrayProfile(D50, curve);
cmsFreeToneCurve(curve);
return profile;
}
-ICodec_IccModule::IccCS GetProfileCSFromHandle(FX_LPVOID pProfile)
+ICodec_IccModule::IccCS GetProfileCSFromHandle(void* pProfile)
{
if (pProfile == NULL) {
return ICodec_IccModule::IccCS_Unknown;
@@ -264,7 +264,7 @@ ICodec_IccModule::IccCS GetProfileCSFromHandle(FX_LPVOID pProfile)
return ICodec_IccModule::IccCS_Unknown;
}
}
-ICodec_IccModule::IccCS CCodec_IccModule::GetProfileCS(FX_LPCBYTE pProfileData, FX_DWORD dwProfileSize)
+ICodec_IccModule::IccCS CCodec_IccModule::GetProfileCS(const uint8_t* pProfileData, FX_DWORD dwProfileSize)
{
ICodec_IccModule::IccCS cs;
cmsHPROFILE hProfile = cmsOpenProfileFromMem((void*)pProfileData, dwProfileSize);
@@ -284,13 +284,13 @@ ICodec_IccModule::IccCS CCodec_IccModule::GetProfileCS(IFX_FileRead* pFile)
}
ICodec_IccModule::IccCS cs;
FX_DWORD dwSize = (FX_DWORD)pFile->GetSize();
- FX_LPBYTE pBuf = FX_Alloc(uint8_t, dwSize);
+ uint8_t* pBuf = FX_Alloc(uint8_t, dwSize);
pFile->ReadBlock(pBuf, 0, dwSize);
cs = GetProfileCS(pBuf, dwSize);
FX_Free(pBuf);
return cs;
}
-FX_DWORD TransferProfileType(FX_LPVOID pProfile, FX_DWORD dwFormat)
+FX_DWORD TransferProfileType(void* pProfile, FX_DWORD dwFormat)
{
cmsColorSpaceSignature cs = cmsGetColorSpace(pProfile);
switch (cs) {
@@ -341,7 +341,7 @@ class CFX_IccProfileCache
public:
CFX_IccProfileCache();
~CFX_IccProfileCache();
- FX_LPVOID m_pProfile;
+ void* m_pProfile;
FX_DWORD m_dwRate;
protected:
void Purge();
@@ -365,7 +365,7 @@ class CFX_IccTransformCache
public:
CFX_IccTransformCache(CLcmsCmm* pCmm = NULL);
~CFX_IccTransformCache();
- FX_LPVOID m_pIccTransform;
+ void* m_pIccTransform;
FX_DWORD m_dwRate;
CLcmsCmm* m_pCmm;
protected:
@@ -400,7 +400,7 @@ CFX_ByteStringKey& CFX_ByteStringKey::operator << (FX_DWORD i)
AppendBlock(&i, sizeof(FX_DWORD));
return *this;
}
-FX_LPVOID CCodec_IccModule::CreateProfile(ICodec_IccModule::IccParam* pIccParam, Icc_CLASS ic, CFX_BinaryBuf* pTransformKey)
+void* CCodec_IccModule::CreateProfile(ICodec_IccModule::IccParam* pIccParam, Icc_CLASS ic, CFX_BinaryBuf* pTransformKey)
{
CFX_IccProfileCache* pCache = NULL;
CFX_ByteStringKey key;
@@ -431,7 +431,7 @@ FX_LPVOID CCodec_IccModule::CreateProfile(ICodec_IccModule::IccParam* pIccParam,
CFX_ByteString ProfileKey(key.GetBuffer(), key.GetSize());
ASSERT(pTransformKey);
pTransformKey->AppendBlock(ProfileKey.GetBuffer(0), ProfileKey.GetLength());
- if (!m_MapProfile.Lookup(ProfileKey, (FX_LPVOID&)pCache)) {
+ if (!m_MapProfile.Lookup(ProfileKey, (void*&)pCache)) {
pCache = new CFX_IccProfileCache;
switch (pIccParam->dwProfileType) {
case Icc_PARAMTYPE_BUFFER:
@@ -458,7 +458,7 @@ FX_LPVOID CCodec_IccModule::CreateProfile(ICodec_IccModule::IccParam* pIccParam,
}
return pCache->m_pProfile;
}
-FX_LPVOID CCodec_IccModule::CreateTransform(ICodec_IccModule::IccParam* pInputParam,
+void* CCodec_IccModule::CreateTransform(ICodec_IccModule::IccParam* pInputParam,
ICodec_IccModule::IccParam* pOutputParam,
ICodec_IccModule::IccParam* pProofParam,
FX_DWORD dwIntent, FX_DWORD dwFlag, FX_DWORD dwPrfIntent, FX_DWORD dwPrfFlag)
@@ -466,11 +466,11 @@ FX_LPVOID CCodec_IccModule::CreateTransform(ICodec_IccModule::IccParam* pInputPa
CLcmsCmm* pCmm = NULL;
ASSERT(pInputParam && pOutputParam);
CFX_ByteStringKey key;
- FX_LPVOID pInputProfile = CreateProfile(pInputParam, Icc_CLASS_INPUT, &key);
+ void* pInputProfile = CreateProfile(pInputParam, Icc_CLASS_INPUT, &key);
if (pInputProfile == NULL) {
return NULL;
}
- FX_LPVOID pOutputProfile = CreateProfile(pOutputParam, Icc_CLASS_OUTPUT, &key);
+ void* pOutputProfile = CreateProfile(pOutputParam, Icc_CLASS_OUTPUT, &key);
if (pOutputProfile == NULL) {
return NULL;
}
@@ -479,14 +479,14 @@ FX_LPVOID CCodec_IccModule::CreateTransform(ICodec_IccModule::IccParam* pInputPa
if (dwInputProfileType == 0 || dwOutputProfileType == 0) {
return NULL;
}
- FX_LPVOID pProofProfile = NULL;
+ void* pProofProfile = NULL;
if (pProofParam) {
pProofProfile = CreateProfile(pProofParam, Icc_CLASS_PROOF, &key);
}
key << dwInputProfileType << dwOutputProfileType << dwIntent << dwFlag << (pProofProfile != NULL) << dwPrfIntent << dwPrfFlag;
CFX_ByteStringC TransformKey(key.GetBuffer(), key.GetSize());
CFX_IccTransformCache* pTransformCache;
- if (!m_MapTranform.Lookup(TransformKey, (FX_LPVOID&)pTransformCache)) {
+ if (!m_MapTranform.Lookup(TransformKey, (void*&)pTransformCache)) {
pCmm = FX_Alloc(CLcmsCmm, 1);
pCmm->m_nSrcComponents = T_CHANNELS(dwInputProfileType);
pCmm->m_nDstComponents = T_CHANNELS(dwOutputProfileType);
@@ -512,7 +512,7 @@ CCodec_IccModule::~CCodec_IccModule()
CFX_ByteString key;
CFX_IccProfileCache* pProfileCache;
while (pos) {
- m_MapProfile.GetNextAssoc(pos, key, (FX_LPVOID&)pProfileCache);
+ m_MapProfile.GetNextAssoc(pos, key, (void*&)pProfileCache);
if (pProfileCache) {
delete pProfileCache;
}
@@ -520,18 +520,18 @@ CCodec_IccModule::~CCodec_IccModule()
pos = m_MapTranform.GetStartPosition();
CFX_IccTransformCache* pTransformCache;
while (pos) {
- m_MapTranform.GetNextAssoc(pos, key, (FX_LPVOID&)pTransformCache);
+ m_MapTranform.GetNextAssoc(pos, key, (void*&)pTransformCache);
if (pTransformCache) {
delete pTransformCache;
}
}
}
-void* CCodec_IccModule::CreateTransform_sRGB(FX_LPCBYTE pProfileData, FX_DWORD dwProfileSize, int32_t& nComponents, int32_t intent, FX_DWORD dwSrcFormat)
+void* CCodec_IccModule::CreateTransform_sRGB(const uint8_t* pProfileData, FX_DWORD dwProfileSize, int32_t& nComponents, int32_t intent, FX_DWORD dwSrcFormat)
{
return IccLib_CreateTransform_sRGB(pProfileData, dwProfileSize, nComponents, intent, dwSrcFormat);
}
-void* CCodec_IccModule::CreateTransform_CMYK(FX_LPCBYTE pSrcProfileData, FX_DWORD dwSrcProfileSize, int32_t& nSrcComponents,
- FX_LPCBYTE pDstProfileData, FX_DWORD dwDstProfileSize, int32_t intent,
+void* CCodec_IccModule::CreateTransform_CMYK(const uint8_t* pSrcProfileData, FX_DWORD dwSrcProfileSize, int32_t& nSrcComponents,
+ const uint8_t* pDstProfileData, FX_DWORD dwDstProfileSize, int32_t intent,
FX_DWORD dwSrcFormat , FX_DWORD dwDstFormat)
{
return IccLib_CreateTransform(pSrcProfileData, dwSrcProfileSize, nSrcComponents,
@@ -545,7 +545,7 @@ void CCodec_IccModule::Translate(void* pTransform, FX_FLOAT* pSrcValues, FX_FLOA
{
IccLib_Translate(pTransform, m_nComponents, pSrcValues, pDestValues);
}
-void CCodec_IccModule::TranslateScanline(void* pTransform, FX_LPBYTE pDest, FX_LPCBYTE pSrc, int32_t pixels)
+void CCodec_IccModule::TranslateScanline(void* pTransform, uint8_t* pDest, const uint8_t* pSrc, int32_t pixels)
{
IccLib_TranslateImage(pTransform, pDest, pSrc, pixels);
}
diff --git a/core/src/fxcodec/codec/fx_codec_jbig.cpp b/core/src/fxcodec/codec/fx_codec_jbig.cpp
index 622448d659..b908915227 100644
--- a/core/src/fxcodec/codec/fx_codec_jbig.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jbig.cpp
@@ -25,12 +25,12 @@ void CCodec_Jbig2Module::DestroyJbig2Context(void* pJbig2Content)
}
pJbig2Content = NULL;
}
-FX_BOOL CCodec_Jbig2Module::Decode(FX_DWORD width, FX_DWORD height, FX_LPCBYTE src_buf, FX_DWORD src_size,
- FX_LPCBYTE global_data, FX_DWORD global_size, FX_LPBYTE dest_buf, FX_DWORD dest_pitch)
+FX_BOOL CCodec_Jbig2Module::Decode(FX_DWORD width, FX_DWORD height, const uint8_t* src_buf, FX_DWORD src_size,
+ const uint8_t* global_data, FX_DWORD global_size, uint8_t* dest_buf, FX_DWORD dest_pitch)
{
FXSYS_memset32(dest_buf, 0, height * dest_pitch);
CJBig2_Context* pContext = CJBig2_Context::CreateContext(&m_Module,
- (FX_LPBYTE)global_data, global_size, (FX_LPBYTE)src_buf, src_size, JBIG2_EMBED_STREAM, &m_SymbolDictCache);
+ (uint8_t*)global_data, global_size, (uint8_t*)src_buf, src_size, JBIG2_EMBED_STREAM, &m_SymbolDictCache);
if (pContext == NULL) {
return FALSE;
}
@@ -47,12 +47,12 @@ FX_BOOL CCodec_Jbig2Module::Decode(FX_DWORD width, FX_DWORD height, FX_LPCBYTE s
return TRUE;
}
FX_BOOL CCodec_Jbig2Module::Decode(IFX_FileRead* file_ptr,
- FX_DWORD& width, FX_DWORD& height, FX_DWORD& pitch, FX_LPBYTE& dest_buf)
+ FX_DWORD& width, FX_DWORD& height, FX_DWORD& pitch, uint8_t*& dest_buf)
{
CJBig2_Context* pContext = NULL;
CJBig2_Image* dest_image = NULL;
FX_DWORD src_size = (FX_DWORD)file_ptr->GetSize();
- FX_LPBYTE src_buf = FX_Alloc(uint8_t, src_size);
+ uint8_t* src_buf = FX_Alloc(uint8_t, src_size);
int ret = 0;
if(!file_ptr->ReadBlock(src_buf, 0, src_size)) {
goto failed;
@@ -80,8 +80,8 @@ failed:
}
return FALSE;
}
-FXCODEC_STATUS CCodec_Jbig2Module::StartDecode(void* pJbig2Context, FX_DWORD width, FX_DWORD height, FX_LPCBYTE src_buf, FX_DWORD src_size,
- FX_LPCBYTE global_data, FX_DWORD global_size, FX_LPBYTE dest_buf, FX_DWORD dest_pitch, IFX_Pause* pPause)
+FXCODEC_STATUS CCodec_Jbig2Module::StartDecode(void* pJbig2Context, FX_DWORD width, FX_DWORD height, const uint8_t* src_buf, FX_DWORD src_size,
+ const uint8_t* global_data, FX_DWORD global_size, uint8_t* dest_buf, FX_DWORD dest_pitch, IFX_Pause* pPause)
{
if(!pJbig2Context) {
return FXCODEC_STATUS_ERR_PARAMS;
@@ -99,7 +99,7 @@ FXCODEC_STATUS CCodec_Jbig2Module::StartDecode(void* pJbig2Context, FX_DWORD wid
m_pJbig2Context->m_bFileReader = FALSE;
FXSYS_memset32(dest_buf, 0, height * dest_pitch);
m_pJbig2Context->m_pContext = CJBig2_Context::CreateContext(&m_Module,
- (FX_LPBYTE)global_data, global_size, (FX_LPBYTE)src_buf, src_size, JBIG2_EMBED_STREAM, &m_SymbolDictCache, pPause);
+ (uint8_t*)global_data, global_size, (uint8_t*)src_buf, src_size, JBIG2_EMBED_STREAM, &m_SymbolDictCache, pPause);
if(!m_pJbig2Context->m_pContext) {
return FXCODEC_STATUS_ERROR;
}
@@ -120,7 +120,7 @@ FXCODEC_STATUS CCodec_Jbig2Module::StartDecode(void* pJbig2Context, FX_DWORD wid
return m_pJbig2Context->m_pContext->GetProcessiveStatus();
}
FXCODEC_STATUS CCodec_Jbig2Module::StartDecode(void* pJbig2Context, IFX_FileRead* file_ptr,
- FX_DWORD& width, FX_DWORD& height, FX_DWORD& pitch, FX_LPBYTE& dest_buf, IFX_Pause* pPause)
+ FX_DWORD& width, FX_DWORD& height, FX_DWORD& pitch, uint8_t*& dest_buf, IFX_Pause* pPause)
{
if(!pJbig2Context) {
return FXCODEC_STATUS_ERR_PARAMS;
diff --git a/core/src/fxcodec/codec/fx_codec_jpeg.cpp b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
index 4d06a77067..df0ef5e9b6 100644
--- a/core/src/fxcodec/codec/fx_codec_jpeg.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
@@ -86,14 +86,14 @@ static FX_BOOL _JpegIsIccMarker(jpeg_saved_marker_ptr marker)
}
return FALSE;
}
-static FX_BOOL _JpegLoadIccProfile(j_decompress_ptr cinfo, FX_LPBYTE* icc_buf_ptr, FX_DWORD* icc_length)
+static FX_BOOL _JpegLoadIccProfile(j_decompress_ptr cinfo, uint8_t** icc_buf_ptr, FX_DWORD* icc_length)
{
if(icc_buf_ptr == NULL || icc_length == NULL) {
return FALSE;
}
*icc_buf_ptr = NULL;
*icc_length = 0;
- FX_LPBYTE icc_data_ptr = NULL;
+ uint8_t* icc_data_ptr = NULL;
FX_DWORD icc_data_len = 0;
uint8_t count_icc_marker = 0;
uint8_t num_icc_marker = 0;
@@ -139,7 +139,7 @@ static FX_BOOL _JpegLoadIccProfile(j_decompress_ptr cinfo, FX_LPBYTE* icc_buf_pt
}
return TRUE;
}
-static FX_BOOL _JpegEmbedIccProfile(j_compress_ptr cinfo, FX_LPCBYTE icc_buf_ptr, FX_DWORD icc_length)
+static FX_BOOL _JpegEmbedIccProfile(j_compress_ptr cinfo, const uint8_t* icc_buf_ptr, FX_DWORD icc_length)
{
if(icc_buf_ptr == NULL || icc_length == 0) {
return FALSE;
@@ -150,7 +150,7 @@ static FX_BOOL _JpegEmbedIccProfile(j_compress_ptr cinfo, FX_LPCBYTE icc_buf_ptr
return FALSE;
}
FX_DWORD icc_data_length = JPEG_OVERHEAD_LEN + (icc_segment_num > 1 ? icc_segment_size : icc_length);
- FX_LPBYTE icc_data = FX_Alloc(uint8_t, icc_data_length);
+ uint8_t* icc_data = FX_Alloc(uint8_t, icc_data_length);
FXSYS_memcpy32(icc_data, "\x49\x43\x43\x5f\x50\x52\x4f\x46\x49\x4c\x45\x00", 12);
icc_data[13] = (uint8_t)icc_segment_num;
for (uint8_t i = 0; i < (icc_segment_num - 1); i++) {
@@ -175,7 +175,7 @@ extern "C" {
}
};
#define JPEG_BLOCK_SIZE 1048576
-static void _JpegEncode(const CFX_DIBSource* pSource, FX_LPBYTE& dest_buf, FX_STRSIZE& dest_size, int quality, FX_LPCBYTE icc_buf, FX_DWORD icc_length)
+static void _JpegEncode(const CFX_DIBSource* pSource, uint8_t*& dest_buf, FX_STRSIZE& dest_size, int quality, const uint8_t* icc_buf, FX_DWORD icc_length)
{
struct jpeg_error_mgr jerr;
jerr.error_exit = _error_do_nothing;
@@ -233,7 +233,7 @@ static void _JpegEncode(const CFX_DIBSource* pSource, FX_LPBYTE& dest_buf, FX_ST
} else {
cinfo.in_color_space = JCS_CMYK;
}
- FX_LPBYTE line_buf = NULL;
+ uint8_t* line_buf = NULL;
if (nComponents > 1) {
line_buf = FX_Alloc2D(uint8_t, width, nComponents);
}
@@ -246,9 +246,9 @@ static void _JpegEncode(const CFX_DIBSource* pSource, FX_LPBYTE& dest_buf, FX_ST
JSAMPROW row_pointer[1];
JDIMENSION row;
while (cinfo.next_scanline < cinfo.image_height) {
- FX_LPCBYTE src_scan = pSource->GetScanline(cinfo.next_scanline);
+ const uint8_t* src_scan = pSource->GetScanline(cinfo.next_scanline);
if (nComponents > 1) {
- FX_LPBYTE dest_scan = line_buf;
+ uint8_t* dest_scan = line_buf;
if (nComponents == 3) {
for (int i = 0; i < width; i ++) {
dest_scan[0] = src_scan[2];
@@ -264,7 +264,7 @@ static void _JpegEncode(const CFX_DIBSource* pSource, FX_LPBYTE& dest_buf, FX_ST
}
row_pointer[0] = line_buf;
} else {
- row_pointer[0] = (FX_LPBYTE)src_scan;
+ row_pointer[0] = (uint8_t*)src_scan;
}
row = cinfo.next_scanline;
jpeg_write_scanlines(&cinfo, row_pointer, 1);
@@ -293,9 +293,9 @@ static void _JpegLoadAttribute(struct jpeg_decompress_struct* pInfo, CFX_DIBAttr
pAttribute->m_wDPIUnit = pInfo->density_unit;
}
}
-static FX_BOOL _JpegLoadInfo(FX_LPCBYTE src_buf, FX_DWORD src_size, int& width, int& height,
+static FX_BOOL _JpegLoadInfo(const uint8_t* src_buf, FX_DWORD src_size, int& width, int& height,
int& num_components, int& bits_per_components, FX_BOOL& color_transform,
- FX_LPBYTE* icc_buf_ptr, FX_DWORD* icc_length)
+ uint8_t** icc_buf_ptr, FX_DWORD* icc_length)
{
_JpegScanSOI(src_buf, src_size);
struct jpeg_decompress_struct cinfo;
@@ -353,7 +353,7 @@ class CCodec_JpegDecoder : public CCodec_ScanlineDecoder
public:
CCodec_JpegDecoder();
~CCodec_JpegDecoder();
- FX_BOOL Create(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height, int nComps,
+ FX_BOOL Create(const uint8_t* src_buf, FX_DWORD src_size, int width, int height, int nComps,
FX_BOOL ColorTransform, IFX_JpegProvider* pJP);
virtual void Destroy()
{
@@ -361,15 +361,15 @@ public:
}
virtual void v_DownScale(int dest_width, int dest_height);
virtual FX_BOOL v_Rewind();
- virtual FX_LPBYTE v_GetNextLine();
+ virtual uint8_t* v_GetNextLine();
virtual FX_DWORD GetSrcOffset();
jmp_buf m_JmpBuf;
struct jpeg_decompress_struct cinfo;
struct jpeg_error_mgr jerr;
struct jpeg_source_mgr src;
- FX_LPCBYTE m_SrcBuf;
+ const uint8_t* m_SrcBuf;
FX_DWORD m_SrcSize;
- FX_LPBYTE m_pScanlineBuf;
+ uint8_t* m_pScanlineBuf;
FX_BOOL InitDecode();
FX_BOOL m_bInited, m_bStarted, m_bJpegTransform;
protected:
@@ -439,7 +439,7 @@ FX_BOOL CCodec_JpegDecoder::InitDecode()
m_nDefaultScaleDenom = cinfo.scale_denom;
return TRUE;
}
-FX_BOOL CCodec_JpegDecoder::Create(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height,
+FX_BOOL CCodec_JpegDecoder::Create(const uint8_t* src_buf, FX_DWORD src_size, int width, int height,
int nComps, FX_BOOL ColorTransform, IFX_JpegProvider* pJP)
{
if (pJP) {
@@ -462,8 +462,8 @@ FX_BOOL CCodec_JpegDecoder::Create(FX_LPCBYTE src_buf, FX_DWORD src_size, int wi
src.resync_to_restart = _src_resync;
m_bJpegTransform = ColorTransform;
if(src_size > 1 && FXSYS_memcmp32(src_buf + src_size - 2, "\xFF\xD9", 2) != 0) {
- ((FX_LPBYTE)src_buf)[src_size - 2] = 0xFF;
- ((FX_LPBYTE)src_buf)[src_size - 1] = 0xD9;
+ ((uint8_t*)src_buf)[src_size - 2] = 0xFF;
+ ((uint8_t*)src_buf)[src_size - 1] = 0xD9;
}
m_OutputWidth = m_OrigWidth = width;
m_OutputHeight = m_OrigHeight = height;
@@ -543,7 +543,7 @@ FX_BOOL CCodec_JpegDecoder::v_Rewind()
m_bStarted = TRUE;
return TRUE;
}
-FX_LPBYTE CCodec_JpegDecoder::v_GetNextLine()
+uint8_t* CCodec_JpegDecoder::v_GetNextLine()
{
if (m_pExtProvider) {
return m_pExtProvider->GetNextLine(m_pExtContext);
@@ -561,7 +561,7 @@ FX_DWORD CCodec_JpegDecoder::GetSrcOffset()
}
return (FX_DWORD)(m_SrcSize - src.bytes_in_buffer);
}
-ICodec_ScanlineDecoder* CCodec_JpegModule::CreateDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size,
+ICodec_ScanlineDecoder* CCodec_JpegModule::CreateDecoder(const uint8_t* src_buf, FX_DWORD src_size,
int width, int height, int nComps, FX_BOOL ColorTransform)
{
if (src_buf == NULL || src_size == 0) {
@@ -574,9 +574,9 @@ ICodec_ScanlineDecoder* CCodec_JpegModule::CreateDecoder(FX_LPCBYTE src_buf, FX_
}
return pDecoder;
}
-FX_BOOL CCodec_JpegModule::LoadInfo(FX_LPCBYTE src_buf, FX_DWORD src_size, int& width, int& height,
+FX_BOOL CCodec_JpegModule::LoadInfo(const uint8_t* src_buf, FX_DWORD src_size, int& width, int& height,
int& num_components, int& bits_per_components, FX_BOOL& color_transform,
- FX_LPBYTE* icc_buf_ptr, FX_DWORD* icc_length)
+ uint8_t** icc_buf_ptr, FX_DWORD* icc_length)
{
if (m_pExtProvider) {
return m_pExtProvider->LoadInfo(src_buf, src_size, width, height,
@@ -585,7 +585,7 @@ FX_BOOL CCodec_JpegModule::LoadInfo(FX_LPCBYTE src_buf, FX_DWORD src_size, int&
}
return _JpegLoadInfo(src_buf, src_size, width, height, num_components, bits_per_components, color_transform, icc_buf_ptr, icc_length);
}
-FX_BOOL CCodec_JpegModule::Encode(const CFX_DIBSource* pSource, FX_LPBYTE& dest_buf, FX_STRSIZE& dest_size, int quality, FX_LPCBYTE icc_buf, FX_DWORD icc_length)
+FX_BOOL CCodec_JpegModule::Encode(const CFX_DIBSource* pSource, uint8_t*& dest_buf, FX_STRSIZE& dest_size, int quality, const uint8_t* icc_buf, FX_DWORD icc_length)
{
if (m_pExtProvider) {
return m_pExtProvider->Encode(pSource, dest_buf, dest_size, quality, icc_buf, icc_length);
@@ -736,7 +736,7 @@ FX_BOOL CCodec_JpegModule::ReadScanline(void* pContext, unsigned char* dest_buf)
int nlines = jpeg_read_scanlines(&p->m_Info, &dest_buf, 1);
return nlines == 1;
}
-FX_DWORD CCodec_JpegModule::GetAvailInput(void* pContext, FX_LPBYTE* avail_buf_ptr)
+FX_DWORD CCodec_JpegModule::GetAvailInput(void* pContext, uint8_t** avail_buf_ptr)
{
if (m_pExtProvider) {
return m_pExtProvider->GetAvailInput(pContext, avail_buf_ptr);
@@ -744,7 +744,7 @@ FX_DWORD CCodec_JpegModule::GetAvailInput(void* pContext, FX_LPBYTE* avail_buf_p
if(avail_buf_ptr != NULL) {
*avail_buf_ptr = NULL;
if(((FXJPEG_Context*)pContext)->m_SrcMgr.bytes_in_buffer > 0) {
- *avail_buf_ptr = (FX_LPBYTE)((FXJPEG_Context*)pContext)->m_SrcMgr.next_input_byte;
+ *avail_buf_ptr = (uint8_t*)((FXJPEG_Context*)pContext)->m_SrcMgr.next_input_byte;
}
}
return (FX_DWORD)((FXJPEG_Context*)pContext)->m_SrcMgr.bytes_in_buffer;
diff --git a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
index 01faf67a30..312ce78759 100644
--- a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
@@ -589,8 +589,8 @@ public:
~CJPX_Decoder();
FX_BOOL Init(const unsigned char* src_data, int src_size);
void GetInfo(FX_DWORD& width, FX_DWORD& height, FX_DWORD& codestream_nComps, FX_DWORD& output_nComps);
- FX_BOOL Decode(FX_LPBYTE dest_buf, int pitch, FX_BOOL bTranslateColor, FX_LPBYTE offsets);
- FX_LPCBYTE m_SrcData;
+ FX_BOOL Decode(uint8_t* dest_buf, int pitch, FX_BOOL bTranslateColor, uint8_t* offsets);
+ const uint8_t* m_SrcData;
int m_SrcSize;
opj_image_t *image;
opj_codec_t* l_codec;
@@ -702,10 +702,12 @@ void CJPX_Decoder::GetInfo(FX_DWORD& width, FX_DWORD& height, FX_DWORD& codestre
height = (FX_DWORD)image->y1;
output_nComps = codestream_nComps = (FX_DWORD)image->numcomps;
}
-FX_BOOL CJPX_Decoder::Decode(FX_LPBYTE dest_buf, int pitch, FX_BOOL bTranslateColor, FX_LPBYTE offsets)
+FX_BOOL CJPX_Decoder::Decode(uint8_t* dest_buf, int pitch, FX_BOOL bTranslateColor, uint8_t* offsets)
{
int i, wid, hei, row, col, channel, src;
- FX_LPBYTE pChannel, pScanline, pPixel;
+ uint8_t* pChannel;
+ uint8_t* pScanline;
+ uint8_t* pPixel;
if(image->comps[0].w != image->x1 || image->comps[0].h != image->y1) {
return FALSE;
@@ -784,7 +786,7 @@ void initialize_sign_lut();
CCodec_JpxModule::CCodec_JpxModule()
{
}
-void* CCodec_JpxModule::CreateDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size , FX_BOOL useColorSpace)
+void* CCodec_JpxModule::CreateDecoder(const uint8_t* src_buf, FX_DWORD src_size , FX_BOOL useColorSpace)
{
CJPX_Decoder* pDecoder = new CJPX_Decoder;
pDecoder->m_useColorSpace = useColorSpace;
@@ -794,13 +796,13 @@ void* CCodec_JpxModule::CreateDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size , FX
}
return pDecoder;
}
-void CCodec_JpxModule::GetImageInfo(FX_LPVOID ctx, FX_DWORD& width, FX_DWORD& height,
+void CCodec_JpxModule::GetImageInfo(void* ctx, FX_DWORD& width, FX_DWORD& height,
FX_DWORD& codestream_nComps, FX_DWORD& output_nComps)
{
CJPX_Decoder* pDecoder = (CJPX_Decoder*)ctx;
pDecoder->GetInfo(width, height, codestream_nComps, output_nComps);
}
-FX_BOOL CCodec_JpxModule::Decode(void* ctx, FX_LPBYTE dest_data, int pitch, FX_BOOL bTranslateColor, FX_LPBYTE offsets)
+FX_BOOL CCodec_JpxModule::Decode(void* ctx, uint8_t* dest_data, int pitch, FX_BOOL bTranslateColor, uint8_t* offsets)
{
CJPX_Decoder* pDecoder = (CJPX_Decoder*)ctx;
return pDecoder->Decode(dest_data, pitch, bTranslateColor, offsets);
diff --git a/core/src/fxcodec/codec/fx_codec_png.cpp b/core/src/fxcodec/codec/fx_codec_png.cpp
index 8cb24ba2fa..55d66a3ccf 100644
--- a/core/src/fxcodec/codec/fx_codec_png.cpp
+++ b/core/src/fxcodec/codec/fx_codec_png.cpp
@@ -51,7 +51,7 @@ static void _png_load_bmp_attribute(png_structp png_ptr, png_infop info_ptr, CFX
png_get_tIME(png_ptr, info_ptr, &t);
if (t) {
FXSYS_memset32(pAttribute->m_strTime, 0, sizeof(pAttribute->m_strTime));
- FXSYS_snprintf((FX_LPSTR)pAttribute->m_strTime, sizeof(pAttribute->m_strTime), "%4d:%2d:%2d %2d:%2d:%2d",
+ FXSYS_snprintf((FX_CHAR*)pAttribute->m_strTime, sizeof(pAttribute->m_strTime), "%4d:%2d:%2d %2d:%2d:%2d",
t->year, t->month, t->day, t->hour, t->minute, t->second);
pAttribute->m_strTime[sizeof(pAttribute->m_strTime) - 1] = 0;
bTime = 1;
@@ -60,7 +60,7 @@ static void _png_load_bmp_attribute(png_structp png_ptr, png_infop info_ptr, CFX
#if defined(PNG_TEXT_SUPPORTED)
int i;
FX_DWORD len;
- FX_LPCSTR buf;
+ const FX_CHAR* buf;
int num_text;
png_textp text = NULL;
png_get_text(png_ptr, info_ptr, &text, &num_text);
@@ -77,7 +77,7 @@ static void _png_load_bmp_attribute(png_structp png_ptr, png_infop info_ptr, CFX
buf = "Author";
if (!FXSYS_memcmp32(buf, text[i].key, FX_MIN(len, FXSYS_strlen(buf)))) {
pAttribute->m_strAuthor.Empty();
- pAttribute->m_strAuthor.Load((FX_LPBYTE)text[i].text, (FX_STRSIZE)text[i].text_length);
+ pAttribute->m_strAuthor.Load((uint8_t*)text[i].text, (FX_STRSIZE)text[i].text_length);
}
}
}
@@ -180,7 +180,7 @@ static void _png_get_row_func(png_structp png_ptr, png_bytep new_row, png_uint_3
return;
}
CCodec_PngModule* pModule = (CCodec_PngModule*)p->parent_ptr;
- FX_LPBYTE src_buf = NULL;
+ uint8_t* src_buf = NULL;
if(!pModule->AskScanlineBufCallback(p->child_ptr, row_num, src_buf)) {
png_error(png_ptr, "Ask Scanline buffer Callback Error");
}
@@ -234,7 +234,7 @@ void CCodec_PngModule::Finish(void* pContext)
p->m_FreeFunc(p);
}
}
-FX_BOOL CCodec_PngModule::Input(void* pContext, FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_DIBAttribute* pAttribute)
+FX_BOOL CCodec_PngModule::Input(void* pContext, const uint8_t* src_buf, FX_DWORD src_size, CFX_DIBAttribute* pAttribute)
{
FXPNG_Context* p = (FXPNG_Context*)pContext;
if(setjmp(png_jmpbuf(p->png_ptr))) {
@@ -243,6 +243,6 @@ FX_BOOL CCodec_PngModule::Input(void* pContext, FX_LPCBYTE src_buf, FX_DWORD src
}
return FALSE;
}
- png_process_data(p->png_ptr, p->info_ptr, (FX_LPBYTE)src_buf, src_size);
+ png_process_data(p->png_ptr, p->info_ptr, (uint8_t*)src_buf, src_size);
return TRUE;
}
diff --git a/core/src/fxcodec/codec/fx_codec_progress.cpp b/core/src/fxcodec/codec/fx_codec_progress.cpp
index d6ef06311c..da64eed42f 100644
--- a/core/src/fxcodec/codec/fx_codec_progress.cpp
+++ b/core/src/fxcodec/codec/fx_codec_progress.cpp
@@ -350,7 +350,7 @@ FX_BOOL CCodec_ProgressiveDecoder::PngReadHeaderFunc(void* pModule, int width, i
*gamma = FXCODEC_PNG_GAMMA;
return TRUE;
}
-FX_BOOL CCodec_ProgressiveDecoder::PngAskScanlineBufFunc(void* pModule, int line, FX_LPBYTE& src_buf)
+FX_BOOL CCodec_ProgressiveDecoder::PngAskScanlineBufFunc(void* pModule, int line, uint8_t*& src_buf)
{
CCodec_ProgressiveDecoder* pCodec = (CCodec_ProgressiveDecoder*)pModule;
CFX_DIBitmap* pDIBitmap = pCodec->m_pDeviceBitmap;
@@ -361,8 +361,8 @@ FX_BOOL CCodec_ProgressiveDecoder::PngAskScanlineBufFunc(void* pModule, int line
if(line >= pCodec->m_clipBox.top && line < pCodec->m_clipBox.bottom) {
double scale_y = (double)pCodec->m_sizeY / (double)pCodec->m_clipBox.Height();
int32_t row = (int32_t)((line - pCodec->m_clipBox.top) * scale_y) + pCodec->m_startY;
- FX_LPBYTE src_scan = (FX_LPBYTE)pDIBitmap->GetScanline(row);
- FX_LPBYTE des_scan = pCodec->m_pDecodeBuf;
+ uint8_t* src_scan = (uint8_t*)pDIBitmap->GetScanline(row);
+ uint8_t* des_scan = pCodec->m_pDecodeBuf;
src_buf = pCodec->m_pDecodeBuf;
int32_t src_Bpp = pDIBitmap->GetBPP() >> 3;
int32_t des_Bpp = (pCodec->m_SrcFormat & 0xff) >> 3;
@@ -393,11 +393,11 @@ FX_BOOL CCodec_ProgressiveDecoder::PngAskScanlineBufFunc(void* pModule, int line
case FXDIB_Rgb:
case FXDIB_Rgb32: {
FX_DWORD des_b = 0, des_g = 0, des_r = 0;
- FX_LPCBYTE p = src_scan + src_col * src_Bpp;
+ const uint8_t* p = src_scan + src_col * src_Bpp;
des_b += pPixelWeights->m_Weights[0] * (*p++);
des_g += pPixelWeights->m_Weights[0] * (*p++);
des_r += pPixelWeights->m_Weights[0] * (*p);
- FX_LPBYTE pDes = &des_scan[pPixelWeights->m_SrcStart * des_Bpp];
+ uint8_t* pDes = &des_scan[pPixelWeights->m_SrcStart * des_Bpp];
*pDes++ = (uint8_t)((des_b) >> 16);
*pDes++ = (uint8_t)((des_g) >> 16);
*pDes = (uint8_t)((des_r) >> 16);
@@ -405,11 +405,11 @@ FX_BOOL CCodec_ProgressiveDecoder::PngAskScanlineBufFunc(void* pModule, int line
break;
case FXDIB_Argb: {
FX_DWORD des_r = 0, des_g = 0, des_b = 0;
- FX_LPCBYTE p = src_scan + src_col * src_Bpp;
+ const uint8_t* p = src_scan + src_col * src_Bpp;
des_b += pPixelWeights->m_Weights[0] * (*p++);
des_g += pPixelWeights->m_Weights[0] * (*p++);
des_r += pPixelWeights->m_Weights[0] * (*p++);
- FX_LPBYTE pDes = &des_scan[pPixelWeights->m_SrcStart * des_Bpp];
+ uint8_t* pDes = &des_scan[pPixelWeights->m_SrcStart * des_Bpp];
*pDes++ = (uint8_t)((des_b) >> 16);
*pDes++ = (uint8_t)((des_g) >> 16);
*pDes++ = (uint8_t)((des_r) >> 16);
@@ -423,9 +423,9 @@ FX_BOOL CCodec_ProgressiveDecoder::PngAskScanlineBufFunc(void* pModule, int line
}
return TRUE;
}
-void CCodec_ProgressiveDecoder::PngOneOneMapResampleHorz(CFX_DIBitmap* pDeviceBitmap, int32_t des_line, FX_LPBYTE src_scan, FXCodec_Format src_format)
+void CCodec_ProgressiveDecoder::PngOneOneMapResampleHorz(CFX_DIBitmap* pDeviceBitmap, int32_t des_line, uint8_t* src_scan, FXCodec_Format src_format)
{
- FX_LPBYTE des_scan = (FX_LPBYTE)pDeviceBitmap->GetScanline(des_line);
+ uint8_t* des_scan = (uint8_t*)pDeviceBitmap->GetScanline(des_line);
int32_t src_Bpp = (m_SrcFormat & 0xff) >> 3;
int32_t des_Bpp = pDeviceBitmap->GetBPP() >> 3;
int32_t src_left = m_clipBox.left;
@@ -453,7 +453,7 @@ void CCodec_ProgressiveDecoder::PngOneOneMapResampleHorz(CFX_DIBitmap* pDeviceBi
case FXDIB_Rgb:
case FXDIB_Rgb32: {
FX_DWORD des_b = 0, des_g = 0, des_r = 0;
- FX_LPCBYTE p = src_scan;
+ const uint8_t* p = src_scan;
p = src_scan + pPixelWeights->m_SrcStart * src_Bpp;
des_b += pPixelWeights->m_Weights[0] * (*p++);
des_g += pPixelWeights->m_Weights[0] * (*p++);
@@ -470,7 +470,7 @@ void CCodec_ProgressiveDecoder::PngOneOneMapResampleHorz(CFX_DIBitmap* pDeviceBi
break;
case FXDIB_Argb: {
FX_DWORD des_a = 0, des_b = 0, des_g = 0, des_r = 0;
- FX_LPCBYTE p = src_scan;
+ const uint8_t* p = src_scan;
p = src_scan + pPixelWeights->m_SrcStart * src_Bpp;
des_b += pPixelWeights->m_Weights[0] * (*p++);
des_g += pPixelWeights->m_Weights[0] * (*p++);
@@ -560,7 +560,7 @@ void CCodec_ProgressiveDecoder::GifRecordCurrentPositionCallback(void* pModule,
FX_DWORD remain_size = pCodec->m_pCodecMgr->GetGifModule()->GetAvailInput(pCodec->m_pGifContext);
cur_pos = pCodec->m_offSet - remain_size;
}
-FX_LPBYTE CCodec_ProgressiveDecoder::GifAskLocalPaletteBufCallback(void* pModule, int32_t frame_num, int32_t pal_size)
+uint8_t* CCodec_ProgressiveDecoder::GifAskLocalPaletteBufCallback(void* pModule, int32_t frame_num, int32_t pal_size)
{
return FX_Alloc(uint8_t, pal_size);
}
@@ -575,9 +575,9 @@ FX_BOOL CCodec_ProgressiveDecoder::GifInputRecordPositionBufCallback(void* pModu
if(!pCodec->GifReadMoreData(pCodec->m_pCodecMgr->GetGifModule(), error_status)) {
return FALSE;
}
- FX_LPBYTE pPalette = NULL;
+ uint8_t* pPalette = NULL;
if(pal_num != 0 && pal_ptr) {
- pPalette = (FX_LPBYTE)pal_ptr;
+ pPalette = (uint8_t*)pal_ptr;
} else {
pal_num = pCodec->m_GifPltNumber;
pPalette = pCodec->m_pGifPalette;
@@ -617,7 +617,7 @@ FX_BOOL CCodec_ProgressiveDecoder::GifInputRecordPositionBufCallback(void* pModu
int Bpp = pDevice->GetBPP() / 8;
FX_ARGB argb = pCodec->m_pSrcPalette[pal_index];
for (int row = 0; row < sizeY; row ++) {
- FX_LPBYTE pScanline = (FX_LPBYTE)pDevice->GetScanline(row + startY) + startX * Bpp;
+ uint8_t* pScanline = (uint8_t*)pDevice->GetScanline(row + startY) + startX * Bpp;
switch(pCodec->m_TransMethod) {
case 3: {
uint8_t gray = FXRGB2GRAY(FXARGB_R(argb), FXARGB_G(argb), FXARGB_B(argb));
@@ -644,14 +644,14 @@ FX_BOOL CCodec_ProgressiveDecoder::GifInputRecordPositionBufCallback(void* pModu
}
return TRUE;
}
-void CCodec_ProgressiveDecoder::GifReadScanlineCallback(void* pModule, int32_t row_num, FX_LPBYTE row_buf)
+void CCodec_ProgressiveDecoder::GifReadScanlineCallback(void* pModule, int32_t row_num, uint8_t* row_buf)
{
CCodec_ProgressiveDecoder* pCodec = (CCodec_ProgressiveDecoder*)pModule;
CFX_DIBitmap* pDIBitmap = pCodec->m_pDeviceBitmap;
ASSERT(pDIBitmap != NULL);
int32_t img_width = pCodec->m_GifFrameRect.Width();
if (!pDIBitmap->HasAlpha()) {
- FX_LPBYTE byte_ptr = row_buf;
+ uint8_t* byte_ptr = row_buf;
for (int i = 0; i < img_width; i++ ) {
if(*byte_ptr == pCodec->m_GifTransIndex) {
*byte_ptr = pCodec->m_GifBgIndex;
@@ -690,10 +690,10 @@ void CCodec_ProgressiveDecoder::GifReadScanlineCallback(void* pModule, int32_t r
int des_Bpp = pDIBitmap->GetBPP() >> 3;
FX_DWORD des_ScanOffet = pCodec->m_startX * des_Bpp;
if(des_row + (int)scale_y >= des_bottom - 1) {
- FX_LPBYTE scan_src = (FX_LPBYTE)pDIBitmap->GetScanline(des_row) + des_ScanOffet;
+ uint8_t* scan_src = (uint8_t*)pDIBitmap->GetScanline(des_row) + des_ScanOffet;
int cur_row = des_row;
while (++cur_row < des_bottom) {
- FX_LPBYTE scan_des = (FX_LPBYTE)pDIBitmap->GetScanline(cur_row) + des_ScanOffet;
+ uint8_t* scan_des = (uint8_t*)pDIBitmap->GetScanline(cur_row) + des_ScanOffet;
FX_DWORD size = pCodec->m_sizeX * des_Bpp;
FXSYS_memcpy32(scan_des, scan_src, size);
}
@@ -714,10 +714,10 @@ void CCodec_ProgressiveDecoder::GifDoubleLineResampleVert(CFX_DIBitmap* pDeviceB
des_row_1 = des_top;
}
for (; des_row_1 < des_row; des_row_1++) {
- FX_LPBYTE scan_des = (FX_LPBYTE)pDeviceBitmap->GetScanline(des_row_1) + des_ScanOffet;
+ uint8_t* scan_des = (uint8_t*)pDeviceBitmap->GetScanline(des_row_1) + des_ScanOffet;
PixelWeight* pWeight = m_WeightVert.GetPixelWeight(des_row_1 - des_top);
- FX_LPCBYTE scan_src1 = pDeviceBitmap->GetScanline(pWeight->m_SrcStart + des_top) + des_ScanOffet;
- FX_LPCBYTE scan_src2 = pDeviceBitmap->GetScanline(pWeight->m_SrcEnd + des_top) + des_ScanOffet;
+ const uint8_t* scan_src1 = pDeviceBitmap->GetScanline(pWeight->m_SrcStart + des_top) + des_ScanOffet;
+ const uint8_t* scan_src2 = pDeviceBitmap->GetScanline(pWeight->m_SrcEnd + des_top) + des_ScanOffet;
for (int des_col = 0; des_col < m_sizeX; des_col++) {
switch(pDeviceBitmap->GetFormat()) {
case FXDIB_Invalid:
@@ -823,7 +823,7 @@ FX_BOOL CCodec_ProgressiveDecoder::BmpInputImagePositionBufCallback(void* pModul
}
return TRUE;
}
-void CCodec_ProgressiveDecoder::BmpReadScanlineCallback(void* pModule, int32_t row_num, FX_LPBYTE row_buf)
+void CCodec_ProgressiveDecoder::BmpReadScanlineCallback(void* pModule, int32_t row_num, uint8_t* row_buf)
{
CCodec_ProgressiveDecoder* pCodec = (CCodec_ProgressiveDecoder*)pModule;
CFX_DIBitmap* pDIBitmap = pCodec->m_pDeviceBitmap;
@@ -860,19 +860,19 @@ void CCodec_ProgressiveDecoder::ResampleVertBT(CFX_DIBitmap* pDeviceBitmap, doub
int des_bottom = m_startY + m_sizeY;
int des_row_1 = des_row + int(scale_y);
if(des_row_1 >= des_bottom - 1) {
- FX_LPBYTE scan_src = (FX_LPBYTE)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
+ uint8_t* scan_src = (uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
while (++des_row < des_bottom) {
- FX_LPBYTE scan_des = (FX_LPBYTE)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
+ uint8_t* scan_des = (uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
FX_DWORD size = m_sizeX * des_Bpp;
FXSYS_memcpy32(scan_des, scan_src, size);
}
return;
}
for (; des_row_1 > des_row; des_row_1--) {
- FX_LPBYTE scan_des = (FX_LPBYTE)pDeviceBitmap->GetScanline(des_row_1) + des_ScanOffet;
+ uint8_t* scan_des = (uint8_t*)pDeviceBitmap->GetScanline(des_row_1) + des_ScanOffet;
PixelWeight* pWeight = m_WeightVert.GetPixelWeight(des_row_1 - des_top);
- FX_LPCBYTE scan_src1 = pDeviceBitmap->GetScanline(pWeight->m_SrcStart + des_top) + des_ScanOffet;
- FX_LPCBYTE scan_src2 = pDeviceBitmap->GetScanline(pWeight->m_SrcEnd + des_top) + des_ScanOffet;
+ const uint8_t* scan_src1 = pDeviceBitmap->GetScanline(pWeight->m_SrcStart + des_top) + des_ScanOffet;
+ const uint8_t* scan_src2 = pDeviceBitmap->GetScanline(pWeight->m_SrcEnd + des_top) + des_ScanOffet;
for (int des_col = 0; des_col < m_sizeX; des_col++) {
switch(pDeviceBitmap->GetFormat()) {
case FXDIB_Invalid:
@@ -1377,7 +1377,7 @@ void CCodec_ProgressiveDecoder::GetTransMethod(FXDIB_Format des_format, FXCodec_
m_TransMethod = -1;
}
}
-void _RGB2BGR(FX_LPBYTE buffer, int width = 1)
+void _RGB2BGR(uint8_t* buffer, int width = 1)
{
if (buffer && width > 0) {
uint8_t temp;
@@ -1390,11 +1390,11 @@ void _RGB2BGR(FX_LPBYTE buffer, int width = 1)
}
}
}
-void CCodec_ProgressiveDecoder::ReSampleScanline(CFX_DIBitmap* pDeviceBitmap, int des_line, FX_LPBYTE src_scan, FXCodec_Format src_format)
+void CCodec_ProgressiveDecoder::ReSampleScanline(CFX_DIBitmap* pDeviceBitmap, int des_line, uint8_t* src_scan, FXCodec_Format src_format)
{
int src_left = m_clipBox.left;
int des_left = m_startX;
- FX_LPBYTE des_scan = pDeviceBitmap->GetBuffer() + des_line * pDeviceBitmap->GetPitch();
+ uint8_t* des_scan = pDeviceBitmap->GetBuffer() + des_line * pDeviceBitmap->GetPitch();
int src_bpp = src_format & 0xff;
int des_bpp = pDeviceBitmap->GetBPP();
int src_Bpp = src_bpp >> 3;
@@ -1435,7 +1435,7 @@ void CCodec_ProgressiveDecoder::ReSampleScanline(CFX_DIBitmap* pDeviceBitmap, in
FX_DWORD des_b = 0, des_g = 0, des_r = 0;
for (int j = pPixelWeights->m_SrcStart; j <= pPixelWeights->m_SrcEnd; j++) {
int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];
- FX_LPCBYTE src_pixel = src_scan + j * src_Bpp;
+ const uint8_t* src_pixel = src_scan + j * src_Bpp;
des_b += pixel_weight * (*src_pixel++);
des_g += pixel_weight * (*src_pixel++);
des_r += pixel_weight * (*src_pixel);
@@ -1447,7 +1447,7 @@ void CCodec_ProgressiveDecoder::ReSampleScanline(CFX_DIBitmap* pDeviceBitmap, in
FX_DWORD des_b = 0, des_g = 0, des_r = 0;
for (int j = pPixelWeights->m_SrcStart; j <= pPixelWeights->m_SrcEnd; j++) {
int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];
- FX_LPCBYTE src_pixel = src_scan + j * src_Bpp;
+ const uint8_t* src_pixel = src_scan + j * src_Bpp;
uint8_t src_b = 0, src_g = 0, src_r = 0;
AdobeCMYK_to_sRGB1(255 - src_pixel[0], 255 - src_pixel[1], 255 - src_pixel[2], 255 - src_pixel[3],
src_r, src_g, src_b);
@@ -1520,7 +1520,7 @@ void CCodec_ProgressiveDecoder::ReSampleScanline(CFX_DIBitmap* pDeviceBitmap, in
FX_DWORD des_b = 0, des_g = 0, des_r = 0;
for (int j = pPixelWeights->m_SrcStart; j <= pPixelWeights->m_SrcEnd; j++) {
int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];
- FX_LPCBYTE src_pixel = src_scan + j * src_Bpp;
+ const uint8_t* src_pixel = src_scan + j * src_Bpp;
des_b += pixel_weight * (*src_pixel++);
des_g += pixel_weight * (*src_pixel++);
des_r += pixel_weight * (*src_pixel);
@@ -1535,7 +1535,7 @@ void CCodec_ProgressiveDecoder::ReSampleScanline(CFX_DIBitmap* pDeviceBitmap, in
FX_DWORD des_b = 0, des_g = 0, des_r = 0;
for (int j = pPixelWeights->m_SrcStart; j <= pPixelWeights->m_SrcEnd; j++) {
int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];
- FX_LPCBYTE src_pixel = src_scan + j * src_Bpp;
+ const uint8_t* src_pixel = src_scan + j * src_Bpp;
uint8_t src_b = 0, src_g = 0, src_r = 0;
AdobeCMYK_to_sRGB1(255 - src_pixel[0], 255 - src_pixel[1], 255 - src_pixel[2], 255 - src_pixel[3],
src_r, src_g, src_b);
@@ -1553,7 +1553,7 @@ void CCodec_ProgressiveDecoder::ReSampleScanline(CFX_DIBitmap* pDeviceBitmap, in
FX_DWORD des_alpha = 0, des_r = 0, des_g = 0, des_b = 0;
for (int j = pPixelWeights->m_SrcStart; j <= pPixelWeights->m_SrcEnd; j ++) {
int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];
- FX_LPCBYTE src_pixel = src_scan + j * src_Bpp;
+ const uint8_t* src_pixel = src_scan + j * src_Bpp;
pixel_weight = pixel_weight * src_pixel[3] / 255;
des_b += pixel_weight * (*src_pixel++);
des_g += pixel_weight * (*src_pixel++);
@@ -1581,9 +1581,9 @@ void CCodec_ProgressiveDecoder::ResampleVert(CFX_DIBitmap* pDeviceBitmap, double
if(des_row_1 < des_top) {
int des_bottom = des_top + m_sizeY;
if(des_row + (int)scale_y >= des_bottom - 1) {
- FX_LPBYTE scan_src = (FX_LPBYTE)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
+ uint8_t* scan_src = (uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
while (++des_row < des_bottom) {
- FX_LPBYTE scan_des = (FX_LPBYTE)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
+ uint8_t* scan_des = (uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
FX_DWORD size = m_sizeX * des_Bpp;
FXSYS_memcpy32(scan_des, scan_src, size);
}
@@ -1591,10 +1591,10 @@ void CCodec_ProgressiveDecoder::ResampleVert(CFX_DIBitmap* pDeviceBitmap, double
return;
}
for (; des_row_1 < des_row; des_row_1++) {
- FX_LPBYTE scan_des = (FX_LPBYTE)pDeviceBitmap->GetScanline(des_row_1) + des_ScanOffet;
+ uint8_t* scan_des = (uint8_t*)pDeviceBitmap->GetScanline(des_row_1) + des_ScanOffet;
PixelWeight* pWeight = m_WeightVert.GetPixelWeight(des_row_1 - des_top);
- FX_LPCBYTE scan_src1 = pDeviceBitmap->GetScanline(pWeight->m_SrcStart + des_top) + des_ScanOffet;
- FX_LPCBYTE scan_src2 = pDeviceBitmap->GetScanline(pWeight->m_SrcEnd + des_top) + des_ScanOffet;
+ const uint8_t* scan_src1 = pDeviceBitmap->GetScanline(pWeight->m_SrcStart + des_top) + des_ScanOffet;
+ const uint8_t* scan_src2 = pDeviceBitmap->GetScanline(pWeight->m_SrcEnd + des_top) + des_ScanOffet;
for (int des_col = 0; des_col < m_sizeX; des_col++) {
switch(pDeviceBitmap->GetFormat()) {
case FXDIB_Invalid:
@@ -1652,9 +1652,9 @@ void CCodec_ProgressiveDecoder::ResampleVert(CFX_DIBitmap* pDeviceBitmap, double
}
int des_bottom = des_top + m_sizeY;
if(des_row + (int)scale_y >= des_bottom - 1) {
- FX_LPBYTE scan_src = (FX_LPBYTE)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
+ uint8_t* scan_src = (uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
while (++des_row < des_bottom) {
- FX_LPBYTE scan_des = (FX_LPBYTE)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
+ uint8_t* scan_des = (uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
FX_DWORD size = m_sizeX * des_Bpp;
FXSYS_memcpy32(scan_des, scan_src, size);
}
@@ -1663,18 +1663,18 @@ void CCodec_ProgressiveDecoder::ResampleVert(CFX_DIBitmap* pDeviceBitmap, double
}
int multiple = (int)FXSYS_ceil((FX_FLOAT)scale_y - 1);
if(multiple > 0) {
- FX_LPBYTE scan_src = (FX_LPBYTE)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
+ uint8_t* scan_src = (uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
for (int i = 1; i <= multiple; i++) {
if(des_row + i >= m_startY + m_sizeY) {
return;
}
- FX_LPBYTE scan_des = (FX_LPBYTE)pDeviceBitmap->GetScanline(des_row + i) + des_ScanOffet;
+ uint8_t* scan_des = (uint8_t*)pDeviceBitmap->GetScanline(des_row + i) + des_ScanOffet;
FX_DWORD size = m_sizeX * des_Bpp;
FXSYS_memcpy32(scan_des, scan_src, size);
}
}
}
-void CCodec_ProgressiveDecoder::Resample(CFX_DIBitmap* pDeviceBitmap, int32_t src_line, FX_LPBYTE src_scan, FXCodec_Format src_format)
+void CCodec_ProgressiveDecoder::Resample(CFX_DIBitmap* pDeviceBitmap, int32_t src_line, uint8_t* src_scan, FXCodec_Format src_format)
{
int src_top = m_clipBox.top;
int des_top = m_startY;
@@ -2166,8 +2166,8 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::ContinueDecode(IFX_Pause* pPause)
case FXDIB_8bppRgb:
case FXDIB_8bppMask: {
for (int32_t row = 0; row < pClipBitmap->GetHeight(); row++) {
- FX_LPBYTE src_line = (FX_LPBYTE)pClipBitmap->GetScanline(row);
- FX_LPBYTE des_line = (FX_LPBYTE)pFormatBitmap->GetScanline(row);
+ uint8_t* src_line = (uint8_t*)pClipBitmap->GetScanline(row);
+ uint8_t* des_line = (uint8_t*)pFormatBitmap->GetScanline(row);
for (int32_t col = 0; col < pClipBitmap->GetWidth(); col++) {
uint8_t _a = 255 - src_line[3];
uint8_t b = (src_line[0] * src_line[3] + 0xFF * _a) / 255;
@@ -2183,8 +2183,8 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::ContinueDecode(IFX_Pause* pPause)
case FXDIB_Rgb32: {
int32_t desBpp = (m_pDeviceBitmap->GetFormat() == FXDIB_Rgb) ? 3 : 4;
for (int32_t row = 0; row < pClipBitmap->GetHeight(); row++) {
- FX_LPBYTE src_line = (FX_LPBYTE)pClipBitmap->GetScanline(row);
- FX_LPBYTE des_line = (FX_LPBYTE)pFormatBitmap->GetScanline(row);
+ uint8_t* src_line = (uint8_t*)pClipBitmap->GetScanline(row);
+ uint8_t* des_line = (uint8_t*)pFormatBitmap->GetScanline(row);
for (int32_t col = 0; col < pClipBitmap->GetWidth(); col++) {
uint8_t _a = 255 - src_line[3];
uint8_t b = (src_line[0] * src_line[3] + 0xFF * _a) / 255;
diff --git a/core/src/fxcodec/codec/fx_codec_progress.h b/core/src/fxcodec/codec/fx_codec_progress.h
index e5a4e53376..8a32f97be4 100644
--- a/core/src/fxcodec/codec/fx_codec_progress.h
+++ b/core/src/fxcodec/codec/fx_codec_progress.h
@@ -38,7 +38,7 @@ public:
}
int m_DestMin, m_ItemSize;
- FX_LPBYTE m_pWeightTables;
+ uint8_t* m_pWeightTables;
};
class CFXCODEC_HorzTable
{
@@ -61,7 +61,7 @@ public:
}
int m_ItemSize;
- FX_LPBYTE m_pWeightTables;
+ uint8_t* m_pWeightTables;
};
class CFXCODEC_VertTable
{
@@ -82,7 +82,7 @@ public:
return (PixelWeight*)(m_pWeightTables + pixel * m_ItemSize);
}
int m_ItemSize;
- FX_LPBYTE m_pWeightTables;
+ uint8_t* m_pWeightTables;
};
enum FXCodec_Format {
FXCodec_Invalid = 0,
@@ -137,41 +137,41 @@ protected:
FX_BOOL DetectImageType(FXCODEC_IMAGE_TYPE imageType, CFX_DIBAttribute* pAttribute = NULL);
void GetDownScale(int& down_scale);
void GetTransMethod(FXDIB_Format des_format, FXCodec_Format src_format);
- void ReSampleScanline(CFX_DIBitmap* pDeviceBitmap, int32_t des_line, FX_LPBYTE src_scan, FXCodec_Format src_format);
- void Resample(CFX_DIBitmap* pDeviceBitmap, int32_t src_line, FX_LPBYTE src_scan, FXCodec_Format src_format);
+ void ReSampleScanline(CFX_DIBitmap* pDeviceBitmap, int32_t des_line, uint8_t* src_scan, FXCodec_Format src_format);
+ void Resample(CFX_DIBitmap* pDeviceBitmap, int32_t src_line, uint8_t* src_scan, FXCodec_Format src_format);
void ResampleVert(CFX_DIBitmap* pDeviceBitmap, double scale_y, int des_row);
FX_BOOL JpegReadMoreData(ICodec_JpegModule* pJpegModule, FXCODEC_STATUS& err_status);
static FX_BOOL PngReadHeaderFunc(void* pModule, int width, int height, int bpc, int pass, int* color_type, double* gamma);
- static FX_BOOL PngAskScanlineBufFunc(void* pModule, int line, FX_LPBYTE& src_buf);
+ static FX_BOOL PngAskScanlineBufFunc(void* pModule, int line, uint8_t*& src_buf);
static void PngFillScanlineBufCompletedFunc(void* pModule, int pass, int line);
- void PngOneOneMapResampleHorz(CFX_DIBitmap* pDeviceBitmap, int32_t des_line, FX_LPBYTE src_scan, FXCodec_Format src_format);
+ void PngOneOneMapResampleHorz(CFX_DIBitmap* pDeviceBitmap, int32_t des_line, uint8_t* src_scan, FXCodec_Format src_format);
FX_BOOL GifReadMoreData(ICodec_GifModule* pGifModule, FXCODEC_STATUS& err_status);
static void GifRecordCurrentPositionCallback(void* pModule, FX_DWORD& cur_pos);
- static FX_LPBYTE GifAskLocalPaletteBufCallback(void* pModule, int32_t frame_num, int32_t pal_size);
+ static uint8_t* GifAskLocalPaletteBufCallback(void* pModule, int32_t frame_num, int32_t pal_size);
static FX_BOOL GifInputRecordPositionBufCallback(void* pModule, FX_DWORD rcd_pos, const FX_RECT& img_rc,
int32_t pal_num, void* pal_ptr,
int32_t delay_time, FX_BOOL user_input,
int32_t trans_index, int32_t disposal_method, FX_BOOL interlace);
- static void GifReadScanlineCallback(void* pModule, int32_t row_num, FX_LPBYTE row_buf);
+ static void GifReadScanlineCallback(void* pModule, int32_t row_num, uint8_t* row_buf);
void GifDoubleLineResampleVert(CFX_DIBitmap* pDeviceBitmap, double scale_y, int des_row);
FX_BOOL BmpReadMoreData(ICodec_BmpModule* pBmpModule, FXCODEC_STATUS& err_status);
static FX_BOOL BmpInputImagePositionBufCallback(void* pModule, FX_DWORD rcd_pos);
- static void BmpReadScanlineCallback(void* pModule, int32_t row_num, FX_LPBYTE row_buf);
+ static void BmpReadScanlineCallback(void* pModule, int32_t row_num, uint8_t* row_buf);
void ResampleVertBT(CFX_DIBitmap* pDeviceBitmap, double scale_y, int des_row);
public:
IFX_FileRead* m_pFile;
CCodec_ModuleMgr* m_pCodecMgr;
- FX_LPVOID m_pJpegContext;
- FX_LPVOID m_pPngContext;
- FX_LPVOID m_pGifContext;
- FX_LPVOID m_pBmpContext;
- FX_LPVOID m_pTiffContext;
+ void* m_pJpegContext;
+ void* m_pPngContext;
+ void* m_pGifContext;
+ void* m_pBmpContext;
+ void* m_pTiffContext;
FXCODEC_IMAGE_TYPE m_imagType;
FX_DWORD m_offSet;
- FX_LPBYTE m_pSrcBuf;
+ uint8_t* m_pSrcBuf;
FX_DWORD m_SrcSize;
- FX_LPBYTE m_pDecodeBuf;
+ uint8_t* m_pDecodeBuf;
int m_ScanlineSize;
CFX_DIBitmap* m_pDeviceBitmap;
FX_BOOL m_bInterpol;
@@ -196,7 +196,7 @@ public:
int m_FrameNumber;
int m_FrameCur;
int m_GifBgIndex;
- FX_LPBYTE m_pGifPalette;
+ uint8_t* m_pGifPalette;
int32_t m_GifPltNumber;
int m_GifTransIndex;
FX_RECT m_GifFrameRect;
diff --git a/core/src/fxcodec/codec/fx_codec_tiff.cpp b/core/src/fxcodec/codec/fx_codec_tiff.cpp
index 8e9dd10f29..d057ff8020 100644
--- a/core/src/fxcodec/codec/fx_codec_tiff.cpp
+++ b/core/src/fxcodec/codec/fx_codec_tiff.cpp
@@ -223,7 +223,7 @@ void CCodec_TiffContext::GetFrames(int32_t& frames)
(key) = NULL;
#define TIFF_EXIF_GETSTRINGINFO(key, tag) {\
FX_DWORD size = 0;\
- FX_LPBYTE buf = NULL;\
+ uint8_t* buf = NULL;\
TIFFGetField(tif_ctx,tag,&size, &buf);\
if (size && buf) {\
(key) = FX_Alloc(uint8_t,size);\
@@ -234,7 +234,7 @@ void CCodec_TiffContext::GetFrames(int32_t& frames)
template <class T>
static FX_BOOL Tiff_Exif_GetInfo(TIFF* tif_ctx, ttag_t tag, CFX_DIBAttributeExif* pExif)
{
- FX_LPBYTE key = NULL;
+ uint8_t* key = NULL;
T val = (T)0;
TIFFGetField(tif_ctx, tag, &val);
if (val) {
@@ -251,8 +251,8 @@ static FX_BOOL Tiff_Exif_GetInfo(TIFF* tif_ctx, ttag_t tag, CFX_DIBAttributeExif
}
static void Tiff_Exif_GetStringInfo(TIFF* tif_ctx, ttag_t tag, CFX_DIBAttributeExif* pExif)
{
- FX_LPSTR buf = NULL;
- FX_LPBYTE key = NULL;
+ FX_CHAR* buf = NULL;
+ uint8_t* key = NULL;
TIFFGetField(tif_ctx, tag, &buf);
if (buf) {
int32_t size = (int32_t)FXSYS_strlen(buf);
@@ -272,7 +272,7 @@ FX_BOOL CCodec_TiffContext::LoadFrameInfo(int32_t frame, FX_DWORD& width, FX_DWO
}
FX_WORD tif_cs;
FX_DWORD tif_icc_size = 0;
- FX_LPBYTE tif_icc_buf = NULL;
+ uint8_t* tif_icc_buf = NULL;
FX_WORD tif_bpc = 0;
FX_WORD tif_cps;
FX_DWORD tif_rps;
@@ -313,7 +313,7 @@ FX_BOOL CCodec_TiffContext::LoadFrameInfo(int32_t frame, FX_DWORD& width, FX_DWO
}
return TRUE;
}
-void _TiffBGRA2RGBA(FX_LPBYTE pBuf, int32_t pixel, int32_t spp)
+void _TiffBGRA2RGBA(uint8_t* pBuf, int32_t pixel, int32_t spp)
{
register uint8_t tmp;
for (int32_t n = 0; n < pixel; n++) {
@@ -383,12 +383,12 @@ FX_BOOL CCodec_TiffContext::Decode1bppRGB(CFX_DIBitmap* pDIBitmap, int32_t heigh
}
SetPalette(pDIBitmap, bps);
int32_t size = (int32_t)TIFFScanlineSize(tif_ctx);
- FX_LPBYTE buf = (FX_LPBYTE)_TIFFmalloc(size);
+ uint8_t* buf = (uint8_t*)_TIFFmalloc(size);
if (buf == NULL) {
TIFFError(TIFFFileName(tif_ctx), "No space for scanline buffer");
return FALSE;
}
- FX_LPBYTE bitMapbuffer = (FX_LPBYTE)pDIBitmap->GetBuffer();
+ uint8_t* bitMapbuffer = (uint8_t*)pDIBitmap->GetBuffer();
FX_DWORD pitch = pDIBitmap->GetPitch();
for(int32_t row = 0; row < height; row++) {
TIFFReadScanline(tif_ctx, buf, row, 0);
@@ -406,12 +406,12 @@ FX_BOOL CCodec_TiffContext::Decode8bppRGB(CFX_DIBitmap* pDIBitmap, int32_t heigh
}
SetPalette(pDIBitmap, bps);
int32_t size = (int32_t)TIFFScanlineSize(tif_ctx);
- FX_LPBYTE buf = (FX_LPBYTE)_TIFFmalloc(size);
+ uint8_t* buf = (uint8_t*)_TIFFmalloc(size);
if (buf == NULL) {
TIFFError(TIFFFileName(tif_ctx), "No space for scanline buffer");
return FALSE;
}
- FX_LPBYTE bitMapbuffer = (FX_LPBYTE)pDIBitmap->GetBuffer();
+ uint8_t* bitMapbuffer = (uint8_t*)pDIBitmap->GetBuffer();
FX_DWORD pitch = pDIBitmap->GetPitch();
for(int32_t row = 0; row < height; row++) {
TIFFReadScanline(tif_ctx, buf, row, 0);
@@ -436,12 +436,12 @@ FX_BOOL CCodec_TiffContext::Decode24bppRGB(CFX_DIBitmap* pDIBitmap, int32_t heig
return FALSE;
}
int32_t size = (int32_t)TIFFScanlineSize(tif_ctx);
- FX_LPBYTE buf = (FX_LPBYTE)_TIFFmalloc(size);
+ uint8_t* buf = (uint8_t*)_TIFFmalloc(size);
if (buf == NULL) {
TIFFError(TIFFFileName(tif_ctx), "No space for scanline buffer");
return FALSE;
}
- FX_LPBYTE bitMapbuffer = (FX_LPBYTE)pDIBitmap->GetBuffer();
+ uint8_t* bitMapbuffer = (uint8_t*)pDIBitmap->GetBuffer();
FX_DWORD pitch = pDIBitmap->GetPitch();
for(int32_t row = 0; row < height; row++) {
TIFFReadScanline(tif_ctx, buf, row, 0);
@@ -471,7 +471,7 @@ FX_BOOL CCodec_TiffContext::Decode(CFX_DIBitmap* pDIBitmap)
if(TIFFReadRGBAImageOriented(tif_ctx, img_wid, img_hei,
(uint32*)pDIBitmap->GetBuffer(), rotation, 1)) {
for (FX_DWORD row = 0; row < img_hei; row++) {
- FX_LPBYTE row_buf = (FX_LPBYTE)pDIBitmap->GetScanline(row);
+ uint8_t* row_buf = (uint8_t*)pDIBitmap->GetScanline(row);
_TiffBGRA2RGBA(row_buf, img_wid, 4);
}
return TRUE;
@@ -490,7 +490,7 @@ FX_BOOL CCodec_TiffContext::Decode(CFX_DIBitmap* pDIBitmap)
}
return FALSE;
}
-FX_LPVOID CCodec_TiffModule::CreateDecoder(IFX_FileRead* file_ptr)
+void* CCodec_TiffModule::CreateDecoder(IFX_FileRead* file_ptr)
{
CCodec_TiffContext* pDecoder = new CCodec_TiffContext;
if (!pDecoder->InitDecoder(file_ptr)) {
@@ -499,12 +499,12 @@ FX_LPVOID CCodec_TiffModule::CreateDecoder(IFX_FileRead* file_ptr)
}
return pDecoder;
}
-void CCodec_TiffModule::GetFrames(FX_LPVOID ctx, int32_t& frames)
+void CCodec_TiffModule::GetFrames(void* ctx, int32_t& frames)
{
CCodec_TiffContext* pDecoder = (CCodec_TiffContext*)ctx;
pDecoder->GetFrames(frames);
}
-FX_BOOL CCodec_TiffModule::LoadFrameInfo(FX_LPVOID ctx, int32_t frame, FX_DWORD& width, FX_DWORD& height, FX_DWORD& comps, FX_DWORD& bpc, CFX_DIBAttribute* pAttribute)
+FX_BOOL CCodec_TiffModule::LoadFrameInfo(void* ctx, int32_t frame, FX_DWORD& width, FX_DWORD& height, FX_DWORD& comps, FX_DWORD& bpc, CFX_DIBAttribute* pAttribute)
{
CCodec_TiffContext* pDecoder = (CCodec_TiffContext*)ctx;
return pDecoder->LoadFrameInfo(frame, width, height, comps, bpc, pAttribute);
diff --git a/core/src/fxcodec/jbig2/JBig2_Define.h b/core/src/fxcodec/jbig2/JBig2_Define.h
index 46c6e2b532..cc1e3904bd 100644
--- a/core/src/fxcodec/jbig2/JBig2_Define.h
+++ b/core/src/fxcodec/jbig2/JBig2_Define.h
@@ -24,7 +24,7 @@ typedef struct {
int32_t code;
} JBig2HuffmanCode;
extern "C" {
- void _FaxG4Decode(void *pModule, FX_LPCBYTE src_buf, FX_DWORD src_size, int* pbitpos, FX_LPBYTE dest_buf, int width, int height, int pitch = 0);
+ void _FaxG4Decode(void *pModule, const uint8_t* src_buf, FX_DWORD src_size, int* pbitpos, uint8_t* dest_buf, int width, int height, int pitch = 0);
};
#define JBIG2_MAX_REFERRED_SEGMENT_COUNT 64
#define JBIG2_MAX_EXPORT_SYSMBOLS 65535
diff --git a/core/src/fxcodec/jbig2/JBig2_Module.h b/core/src/fxcodec/jbig2/JBig2_Module.h
index aef31bb49f..5a96f4395e 100644
--- a/core/src/fxcodec/jbig2/JBig2_Module.h
+++ b/core/src/fxcodec/jbig2/JBig2_Module.h
@@ -18,16 +18,16 @@ public:
virtual void *JBig2_Malloc3(FX_DWORD num, FX_DWORD dwSize, FX_DWORD dwSize2) = 0;
- virtual void *JBig2_Realloc(FX_LPVOID pMem, FX_DWORD dwSize) = 0;
+ virtual void *JBig2_Realloc(void* pMem, FX_DWORD dwSize) = 0;
- virtual void JBig2_Free(FX_LPVOID pMem) = 0;
+ virtual void JBig2_Free(void* pMem) = 0;
virtual void JBig2_Assert(int32_t nExpression) {};
- virtual void JBig2_Error(FX_LPCSTR format, ...) {};
+ virtual void JBig2_Error(const FX_CHAR* format, ...) {};
- virtual void JBig2_Warn(FX_LPCSTR format, ...) {};
+ virtual void JBig2_Warn(const FX_CHAR* format, ...) {};
- virtual void JBig2_Log(FX_LPCSTR format, ...) {};
+ virtual void JBig2_Log(const FX_CHAR* format, ...) {};
};
#endif
diff --git a/core/src/fxcodec/jbig2/JBig2_Object.cpp b/core/src/fxcodec/jbig2/JBig2_Object.cpp
index 4bb00b897b..1429a91644 100644
--- a/core/src/fxcodec/jbig2/JBig2_Object.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_Object.cpp
@@ -6,14 +6,14 @@
#include "JBig2_Object.h"
#include "JBig2_Module.h"
-void *CJBig2_Object::operator new(size_t size, CJBig2_Module *pModule, FX_LPCSTR filename, int line)
+void *CJBig2_Object::operator new(size_t size, CJBig2_Module *pModule, const FX_CHAR* filename, int line)
{
CJBig2_Object *p;
p = (CJBig2_Object *)pModule->JBig2_Malloc((FX_DWORD)size);
p->m_pModule = pModule;
return p;
}
-void CJBig2_Object::operator delete(void *p, CJBig2_Module *pModule, FX_LPCSTR filename, int line)
+void CJBig2_Object::operator delete(void *p, CJBig2_Module *pModule, const FX_CHAR* filename, int line)
{
pModule->JBig2_Free(p);
}
@@ -33,7 +33,7 @@ void CJBig2_Object::operator delete(void *p, CJBig2_Module *pModule)
pModule->JBig2_Free(p);
}
void *CJBig2_Object::operator new[](size_t size, CJBig2_Module *pModule, size_t unit_size,
- FX_LPCSTR filename, int line)
+ const FX_CHAR* filename, int line)
{
void *p;
uint8_t *pCur, *pEnd;
@@ -46,7 +46,7 @@ void *CJBig2_Object::operator new[](size_t size, CJBig2_Module *pModule, size_t
return p;
}
void CJBig2_Object::operator delete[](void *p, CJBig2_Module *pModule, size_t unit_size,
- FX_LPCSTR filename, int line)
+ const FX_CHAR* filename, int line)
{
pModule->JBig2_Free(p);
}
diff --git a/core/src/fxcodec/jbig2/JBig2_Object.h b/core/src/fxcodec/jbig2/JBig2_Object.h
index 23eecbf171..150a8e7e99 100644
--- a/core/src/fxcodec/jbig2/JBig2_Object.h
+++ b/core/src/fxcodec/jbig2/JBig2_Object.h
@@ -13,9 +13,9 @@ class CJBig2_Object
{
public:
- void *operator new(size_t size, CJBig2_Module *pModule, FX_LPCSTR filename, int line);
+ void *operator new(size_t size, CJBig2_Module *pModule, const FX_CHAR* filename, int line);
- void operator delete(void *p, CJBig2_Module *pModule, FX_LPCSTR filename, int line);
+ void operator delete(void *p, CJBig2_Module *pModule, const FX_CHAR* filename, int line);
void *operator new(size_t size, CJBig2_Module *pModule);
@@ -24,10 +24,10 @@ public:
void operator delete(void *p, CJBig2_Module *pModule);
void *operator new[](size_t size, CJBig2_Module *pModule, size_t unit_size,
- FX_LPCSTR filename, int line);
+ const FX_CHAR* filename, int line);
void operator delete[](void *p, CJBig2_Module *pModule, size_t unit_size,
- FX_LPCSTR filename, int line);
+ const FX_CHAR* filename, int line);
void *operator new[](size_t size, CJBig2_Module *pModule, size_t unit_size);
diff --git a/core/src/fxcodec/jbig2/JBig2_Segment.h b/core/src/fxcodec/jbig2/JBig2_Segment.h
index fe44bc962d..b61e8e5075 100644
--- a/core/src/fxcodec/jbig2/JBig2_Segment.h
+++ b/core/src/fxcodec/jbig2/JBig2_Segment.h
@@ -62,7 +62,7 @@ public:
CJBig2_PatternDict *pd;
CJBig2_Image *im;
CJBig2_HuffmanTable *ht;
- FX_LPVOID vd;
+ void* vd;
} m_Result;
};
#endif
diff --git a/core/src/fxcodec/lbmp/fx_bmp.cpp b/core/src/fxcodec/lbmp/fx_bmp.cpp
index 3a6e3816ff..986a3272c4 100644
--- a/core/src/fxcodec/lbmp/fx_bmp.cpp
+++ b/core/src/fxcodec/lbmp/fx_bmp.cpp
@@ -5,27 +5,27 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "fx_bmp.h"
-FX_DWORD _GetDWord_LSBFirst(FX_LPBYTE p)
+FX_DWORD _GetDWord_LSBFirst(uint8_t* p)
{
return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
}
-FX_WORD _GetWord_LSBFirst(FX_LPBYTE p)
+FX_WORD _GetWord_LSBFirst(uint8_t* p)
{
return p[0] | (p[1] << 8);
}
-void _SetDWord_LSBFirst(FX_LPBYTE p, FX_DWORD v)
+void _SetDWord_LSBFirst(uint8_t* p, FX_DWORD v)
{
p[0] = (uint8_t)v;
p[1] = (uint8_t)(v >> 8);
p[2] = (uint8_t)(v >> 16);
p[3] = (uint8_t)(v >> 24);
}
-void _SetWord_LSBFirst(FX_LPBYTE p, FX_WORD v)
+void _SetWord_LSBFirst(uint8_t* p, FX_WORD v)
{
p[0] = (uint8_t)v;
p[1] = (uint8_t)(v >> 8);
}
-void _bmp_error(bmp_decompress_struct_p bmp_ptr, FX_LPCSTR err_msg)
+void _bmp_error(bmp_decompress_struct_p bmp_ptr, const FX_CHAR* err_msg)
{
if(bmp_ptr != NULL && bmp_ptr->_bmp_error_fn != NULL) {
bmp_ptr->_bmp_error_fn(bmp_ptr, err_msg);
@@ -69,12 +69,12 @@ int32_t _bmp_read_header(bmp_decompress_struct_p bmp_ptr)
if(bmp_ptr->decode_status == BMP_D_STATUS_HEADER) {
ASSERT(sizeof(BmpFileHeader) == 14);
BmpFileHeader* bmp_header_ptr = NULL;
- if(_bmp_read_data(bmp_ptr, (FX_LPBYTE*)&bmp_header_ptr, 14) == NULL) {
+ if(_bmp_read_data(bmp_ptr, (uint8_t**)&bmp_header_ptr, 14) == NULL) {
return 2;
}
- bmp_ptr->bmp_header_ptr->bfType = _GetWord_LSBFirst((FX_LPBYTE)&bmp_header_ptr->bfType);
- bmp_ptr->bmp_header_ptr->bfOffBits = _GetDWord_LSBFirst((FX_LPBYTE)&bmp_header_ptr->bfOffBits);
- bmp_ptr->data_size = _GetDWord_LSBFirst((FX_LPBYTE)&bmp_header_ptr->bfSize);
+ bmp_ptr->bmp_header_ptr->bfType = _GetWord_LSBFirst((uint8_t*)&bmp_header_ptr->bfType);
+ bmp_ptr->bmp_header_ptr->bfOffBits = _GetDWord_LSBFirst((uint8_t*)&bmp_header_ptr->bfOffBits);
+ bmp_ptr->data_size = _GetDWord_LSBFirst((uint8_t*)&bmp_header_ptr->bfSize);
if(bmp_ptr->bmp_header_ptr->bfType != BMP_SIGNATURE) {
_bmp_error(bmp_ptr, "Not A Bmp Image");
return 0;
@@ -91,30 +91,30 @@ int32_t _bmp_read_header(bmp_decompress_struct_p bmp_ptr)
case FX_MIN(12, sizeof(BmpCoreHeader)): {
bmp_ptr->pal_type = 1;
BmpCoreHeaderPtr bmp_core_header_ptr = NULL;
- if(_bmp_read_data(bmp_ptr, (FX_LPBYTE*)&bmp_core_header_ptr, bmp_ptr->img_ifh_size) == NULL) {
+ if(_bmp_read_data(bmp_ptr, (uint8_t**)&bmp_core_header_ptr, bmp_ptr->img_ifh_size) == NULL) {
bmp_ptr->skip_size = skip_size_org;
return 2;
}
- bmp_ptr->width = (FX_DWORD)_GetWord_LSBFirst((FX_LPBYTE)&bmp_core_header_ptr->bcWidth);
- bmp_ptr->height = (FX_DWORD)_GetWord_LSBFirst((FX_LPBYTE)&bmp_core_header_ptr->bcHeight);
- bmp_ptr->bitCounts = _GetWord_LSBFirst((FX_LPBYTE)&bmp_core_header_ptr->bcBitCount);
+ bmp_ptr->width = (FX_DWORD)_GetWord_LSBFirst((uint8_t*)&bmp_core_header_ptr->bcWidth);
+ bmp_ptr->height = (FX_DWORD)_GetWord_LSBFirst((uint8_t*)&bmp_core_header_ptr->bcHeight);
+ bmp_ptr->bitCounts = _GetWord_LSBFirst((uint8_t*)&bmp_core_header_ptr->bcBitCount);
bmp_ptr->compress_flag = BMP_RGB;
bmp_ptr->imgTB_flag = FALSE;
}
break;
case FX_MIN(40, sizeof(BmpInfoHeader)): {
BmpInfoHeaderPtr bmp_info_header_ptr = NULL;
- if(_bmp_read_data(bmp_ptr, (FX_LPBYTE*)&bmp_info_header_ptr, bmp_ptr->img_ifh_size) == NULL) {
+ if(_bmp_read_data(bmp_ptr, (uint8_t**)&bmp_info_header_ptr, bmp_ptr->img_ifh_size) == NULL) {
bmp_ptr->skip_size = skip_size_org;
return 2;
}
- bmp_ptr->width = _GetDWord_LSBFirst((FX_LPBYTE)&bmp_info_header_ptr->biWidth);
- bmp_ptr->height = _GetDWord_LSBFirst((FX_LPBYTE)&bmp_info_header_ptr->biHeight);
- bmp_ptr->bitCounts = _GetWord_LSBFirst((FX_LPBYTE)&bmp_info_header_ptr->biBitCount);
- bmp_ptr->compress_flag = _GetDWord_LSBFirst((FX_LPBYTE)&bmp_info_header_ptr->biCompression);
- bmp_ptr->color_used = _GetDWord_LSBFirst((FX_LPBYTE)&bmp_info_header_ptr->biClrUsed);
- bmp_ptr->dpi_x = (int32_t)_GetDWord_LSBFirst((FX_LPBYTE)&bmp_info_header_ptr->biXPelsPerMeter);
- bmp_ptr->dpi_y = (int32_t)_GetDWord_LSBFirst((FX_LPBYTE)&bmp_info_header_ptr->biYPelsPerMeter);
+ bmp_ptr->width = _GetDWord_LSBFirst((uint8_t*)&bmp_info_header_ptr->biWidth);
+ bmp_ptr->height = _GetDWord_LSBFirst((uint8_t*)&bmp_info_header_ptr->biHeight);
+ bmp_ptr->bitCounts = _GetWord_LSBFirst((uint8_t*)&bmp_info_header_ptr->biBitCount);
+ bmp_ptr->compress_flag = _GetDWord_LSBFirst((uint8_t*)&bmp_info_header_ptr->biCompression);
+ bmp_ptr->color_used = _GetDWord_LSBFirst((uint8_t*)&bmp_info_header_ptr->biClrUsed);
+ bmp_ptr->dpi_x = (int32_t)_GetDWord_LSBFirst((uint8_t*)&bmp_info_header_ptr->biXPelsPerMeter);
+ bmp_ptr->dpi_y = (int32_t)_GetDWord_LSBFirst((uint8_t*)&bmp_info_header_ptr->biYPelsPerMeter);
if(bmp_ptr->height < 0) {
bmp_ptr->height = -bmp_ptr->height;
bmp_ptr->imgTB_flag = TRUE;
@@ -124,19 +124,19 @@ int32_t _bmp_read_header(bmp_decompress_struct_p bmp_ptr)
default: {
if(bmp_ptr->img_ifh_size > FX_MIN(40, sizeof(BmpInfoHeader))) {
BmpInfoHeaderPtr bmp_info_header_ptr = NULL;
- if(_bmp_read_data(bmp_ptr, (FX_LPBYTE*)&bmp_info_header_ptr, bmp_ptr->img_ifh_size) == NULL) {
+ if(_bmp_read_data(bmp_ptr, (uint8_t**)&bmp_info_header_ptr, bmp_ptr->img_ifh_size) == NULL) {
bmp_ptr->skip_size = skip_size_org;
return 2;
}
FX_WORD biPlanes;
- bmp_ptr->width = _GetDWord_LSBFirst((FX_LPBYTE)&bmp_info_header_ptr->biWidth);
- bmp_ptr->height = _GetDWord_LSBFirst((FX_LPBYTE)&bmp_info_header_ptr->biHeight);
- bmp_ptr->bitCounts = _GetWord_LSBFirst((FX_LPBYTE)&bmp_info_header_ptr->biBitCount);
- bmp_ptr->compress_flag = _GetDWord_LSBFirst((FX_LPBYTE)&bmp_info_header_ptr->biCompression);
- bmp_ptr->color_used = _GetDWord_LSBFirst((FX_LPBYTE)&bmp_info_header_ptr->biClrUsed);
- biPlanes = _GetWord_LSBFirst((FX_LPBYTE)&bmp_info_header_ptr->biPlanes);
- bmp_ptr->dpi_x = _GetDWord_LSBFirst((FX_LPBYTE)&bmp_info_header_ptr->biXPelsPerMeter);
- bmp_ptr->dpi_y = _GetDWord_LSBFirst((FX_LPBYTE)&bmp_info_header_ptr->biYPelsPerMeter);
+ bmp_ptr->width = _GetDWord_LSBFirst((uint8_t*)&bmp_info_header_ptr->biWidth);
+ bmp_ptr->height = _GetDWord_LSBFirst((uint8_t*)&bmp_info_header_ptr->biHeight);
+ bmp_ptr->bitCounts = _GetWord_LSBFirst((uint8_t*)&bmp_info_header_ptr->biBitCount);
+ bmp_ptr->compress_flag = _GetDWord_LSBFirst((uint8_t*)&bmp_info_header_ptr->biCompression);
+ bmp_ptr->color_used = _GetDWord_LSBFirst((uint8_t*)&bmp_info_header_ptr->biClrUsed);
+ biPlanes = _GetWord_LSBFirst((uint8_t*)&bmp_info_header_ptr->biPlanes);
+ bmp_ptr->dpi_x = _GetDWord_LSBFirst((uint8_t*)&bmp_info_header_ptr->biXPelsPerMeter);
+ bmp_ptr->dpi_y = _GetDWord_LSBFirst((uint8_t*)&bmp_info_header_ptr->biYPelsPerMeter);
if(bmp_ptr->height < 0) {
bmp_ptr->height = -bmp_ptr->height;
bmp_ptr->imgTB_flag = TRUE;
@@ -211,13 +211,13 @@ int32_t _bmp_read_header(bmp_decompress_struct_p bmp_ptr)
return 0;
}
FX_DWORD* mask;
- if(_bmp_read_data(bmp_ptr, (FX_LPBYTE*)&mask, 3 * sizeof(FX_DWORD)) == NULL) {
+ if(_bmp_read_data(bmp_ptr, (uint8_t**)&mask, 3 * sizeof(FX_DWORD)) == NULL) {
bmp_ptr->skip_size = skip_size_org;
return 2;
}
- bmp_ptr->mask_red = _GetDWord_LSBFirst((FX_LPBYTE)&mask[0]);
- bmp_ptr->mask_green = _GetDWord_LSBFirst((FX_LPBYTE)&mask[1]);
- bmp_ptr->mask_blue = _GetDWord_LSBFirst((FX_LPBYTE)&mask[2]);
+ bmp_ptr->mask_red = _GetDWord_LSBFirst((uint8_t*)&mask[0]);
+ bmp_ptr->mask_green = _GetDWord_LSBFirst((uint8_t*)&mask[1]);
+ bmp_ptr->mask_blue = _GetDWord_LSBFirst((uint8_t*)&mask[2]);
if(bmp_ptr->mask_red & bmp_ptr->mask_green ||
bmp_ptr->mask_red & bmp_ptr->mask_blue ||
bmp_ptr->mask_green & bmp_ptr->mask_blue) {
@@ -246,9 +246,9 @@ int32_t _bmp_read_header(bmp_decompress_struct_p bmp_ptr)
if(bmp_ptr->color_used != 0) {
bmp_ptr->pal_num = bmp_ptr->color_used;
}
- FX_LPBYTE src_pal_ptr = NULL;
+ uint8_t* src_pal_ptr = NULL;
FX_DWORD src_pal_size = bmp_ptr->pal_num * (bmp_ptr->pal_type ? 3 : 4);
- if(_bmp_read_data(bmp_ptr, (FX_LPBYTE*)&src_pal_ptr, src_pal_size) == NULL) {
+ if(_bmp_read_data(bmp_ptr, (uint8_t**)&src_pal_ptr, src_pal_size) == NULL) {
bmp_ptr->skip_size = skip_size_org;
return 2;
}
@@ -306,8 +306,8 @@ int32_t _bmp_decode_image(bmp_decompress_struct_p bmp_ptr)
}
int32_t _bmp_decode_rgb(bmp_decompress_struct_p bmp_ptr)
{
- FX_LPBYTE row_buf = bmp_ptr->out_row_buffer;
- FX_LPBYTE des_buf = NULL;
+ uint8_t* row_buf = bmp_ptr->out_row_buffer;
+ uint8_t* des_buf = NULL;
while (bmp_ptr->row_num < bmp_ptr->height) {
if(_bmp_read_data(bmp_ptr, &des_buf, bmp_ptr->src_row_bytes) == NULL) {
return 2;
@@ -351,7 +351,7 @@ int32_t _bmp_decode_rgb(bmp_decompress_struct_p bmp_ptr)
green_bits -= 8;
red_bits -= 8;
for (int32_t col = 0; col < bmp_ptr->width; col++) {
- *buf = _GetWord_LSBFirst((FX_LPBYTE)buf);
+ *buf = _GetWord_LSBFirst((uint8_t*)buf);
*row_buf++ = (uint8_t)((*buf & bmp_ptr->mask_blue) << blue_bits);
*row_buf++ = (uint8_t)((*buf & bmp_ptr->mask_green) >> green_bits);
*row_buf++ = (uint8_t)((*buf++ & bmp_ptr->mask_red) >> red_bits);
@@ -375,8 +375,8 @@ int32_t _bmp_decode_rgb(bmp_decompress_struct_p bmp_ptr)
}
int32_t _bmp_decode_rle8(bmp_decompress_struct_p bmp_ptr)
{
- FX_LPBYTE first_byte_ptr = NULL;
- FX_LPBYTE second_byte_ptr = NULL;
+ uint8_t* first_byte_ptr = NULL;
+ uint8_t* second_byte_ptr = NULL;
bmp_ptr->col_num = 0;
while(TRUE) {
FX_DWORD skip_size_org = bmp_ptr->skip_size;
@@ -414,7 +414,7 @@ int32_t _bmp_decode_rle8(bmp_decompress_struct_p bmp_ptr)
return 1;
}
case RLE_DELTA: {
- FX_LPBYTE delta_ptr;
+ uint8_t* delta_ptr;
if(_bmp_read_data(bmp_ptr, &delta_ptr, 2) == NULL) {
bmp_ptr->skip_size = skip_size_org;
return 2;
@@ -468,8 +468,8 @@ int32_t _bmp_decode_rle8(bmp_decompress_struct_p bmp_ptr)
}
int32_t _bmp_decode_rle4(bmp_decompress_struct_p bmp_ptr)
{
- FX_LPBYTE first_byte_ptr = NULL;
- FX_LPBYTE second_byte_ptr = NULL;
+ uint8_t* first_byte_ptr = NULL;
+ uint8_t* second_byte_ptr = NULL;
bmp_ptr->col_num = 0;
while (TRUE) {
FX_DWORD skip_size_org = bmp_ptr->skip_size;
@@ -507,7 +507,7 @@ int32_t _bmp_decode_rle4(bmp_decompress_struct_p bmp_ptr)
return 1;
}
case RLE_DELTA: {
- FX_LPBYTE delta_ptr;
+ uint8_t* delta_ptr;
if(_bmp_read_data(bmp_ptr, &delta_ptr, 2) == NULL) {
bmp_ptr->skip_size = skip_size_org;
return 2;
@@ -576,7 +576,7 @@ int32_t _bmp_decode_rle4(bmp_decompress_struct_p bmp_ptr)
_bmp_error(bmp_ptr, "Any Uncontrol Error");
return 0;
}
-FX_LPBYTE _bmp_read_data(bmp_decompress_struct_p bmp_ptr, FX_LPBYTE* des_buf_pp, FX_DWORD data_size)
+uint8_t* _bmp_read_data(bmp_decompress_struct_p bmp_ptr, uint8_t** des_buf_pp, FX_DWORD data_size)
{
if(bmp_ptr == NULL ||
bmp_ptr->avail_in < bmp_ptr->skip_size + data_size) {
@@ -593,13 +593,13 @@ void _bmp_save_decoding_status(bmp_decompress_struct_p bmp_ptr, int32_t status)
bmp_ptr->avail_in -= bmp_ptr->skip_size;
bmp_ptr->skip_size = 0;
}
-void _bmp_input_buffer(bmp_decompress_struct_p bmp_ptr, FX_LPBYTE src_buf, FX_DWORD src_size)
+void _bmp_input_buffer(bmp_decompress_struct_p bmp_ptr, uint8_t* src_buf, FX_DWORD src_size)
{
bmp_ptr->next_in = src_buf;
bmp_ptr->avail_in = src_size;
bmp_ptr->skip_size = 0;
}
-FX_DWORD _bmp_get_avail_input(bmp_decompress_struct_p bmp_ptr, FX_LPBYTE* avial_buf_ptr)
+FX_DWORD _bmp_get_avail_input(bmp_decompress_struct_p bmp_ptr, uint8_t** avial_buf_ptr)
{
if(avial_buf_ptr != NULL) {
*avial_buf_ptr = NULL;
@@ -627,7 +627,7 @@ void _bmp_destroy_compress(bmp_compress_struct_p bmp_ptr)
FX_Free(bmp_ptr);
}
}
-static void WriteFileHeader(BmpFileHeaderPtr head_ptr, FX_LPBYTE dst_buf)
+static void WriteFileHeader(BmpFileHeaderPtr head_ptr, uint8_t* dst_buf)
{
FX_DWORD offset;
offset = 0;
@@ -642,7 +642,7 @@ static void WriteFileHeader(BmpFileHeaderPtr head_ptr, FX_LPBYTE dst_buf)
_SetDWord_LSBFirst(&dst_buf[offset], head_ptr->bfOffBits);
offset += 4;
}
-static void WriteInfoHeader(BmpInfoHeaderPtr info_head_ptr, FX_LPBYTE dst_buf)
+static void WriteInfoHeader(BmpInfoHeaderPtr info_head_ptr, uint8_t* dst_buf)
{
FX_DWORD offset;
offset = sizeof(BmpFileHeader);
@@ -670,7 +670,7 @@ static void WriteInfoHeader(BmpInfoHeaderPtr info_head_ptr, FX_LPBYTE dst_buf)
offset += 4;
}
#ifdef BMP_SUPPORT_BITFIELD
-static void _bmp_encode_bitfields(bmp_compress_struct_p bmp_ptr, FX_LPBYTE& dst_buf, FX_DWORD& dst_size)
+static void _bmp_encode_bitfields(bmp_compress_struct_p bmp_ptr, uint8_t*& dst_buf, FX_DWORD& dst_size)
{
if (bmp_ptr->info_header.biBitCount != 16 && bmp_ptr->info_header.biBitCount != 32) {
return;
@@ -753,7 +753,7 @@ static void _bmp_encode_bitfields(bmp_compress_struct_p bmp_ptr, FX_LPBYTE& dst_
dst_size = dst_pos;
}
#endif
-static void _bmp_encode_rgb(bmp_compress_struct_p bmp_ptr, FX_LPBYTE& dst_buf, FX_DWORD& dst_size)
+static void _bmp_encode_rgb(bmp_compress_struct_p bmp_ptr, uint8_t*& dst_buf, FX_DWORD& dst_size)
{
if (bmp_ptr->info_header.biBitCount == 16) {
#ifdef BMP_SUPPORT_BITFIELD
@@ -777,7 +777,7 @@ static void _bmp_encode_rgb(bmp_compress_struct_p bmp_ptr, FX_LPBYTE& dst_buf, F
}
dst_size = dst_pos;
}
-static uint8_t _bmp_rle8_search(FX_LPCBYTE buf, int32_t len)
+static uint8_t _bmp_rle8_search(const uint8_t* buf, int32_t len)
{
uint8_t num;
num = 1;
@@ -789,7 +789,7 @@ static uint8_t _bmp_rle8_search(FX_LPCBYTE buf, int32_t len)
}
return num;
}
-static void _bmp_encode_rle8(bmp_compress_struct_p bmp_ptr, FX_LPBYTE& dst_buf, FX_DWORD& dst_size)
+static void _bmp_encode_rle8(bmp_compress_struct_p bmp_ptr, uint8_t*& dst_buf, FX_DWORD& dst_size)
{
FX_DWORD size, dst_pos, index;
uint8_t rle[2] = {0};
@@ -825,7 +825,7 @@ static void _bmp_encode_rle8(bmp_compress_struct_p bmp_ptr, FX_LPBYTE& dst_buf,
dst_buf[dst_pos++] = RLE_EOI;
dst_size = dst_pos;
}
-static uint8_t _bmp_rle4_search(FX_LPCBYTE buf, int32_t len)
+static uint8_t _bmp_rle4_search(const uint8_t* buf, int32_t len)
{
uint8_t num;
num = 2;
@@ -837,7 +837,7 @@ static uint8_t _bmp_rle4_search(FX_LPCBYTE buf, int32_t len)
}
return num;
}
-static void _bmp_encode_rle4(bmp_compress_struct_p bmp_ptr, FX_LPBYTE& dst_buf, FX_DWORD& dst_size)
+static void _bmp_encode_rle4(bmp_compress_struct_p bmp_ptr, uint8_t*& dst_buf, FX_DWORD& dst_size)
{
FX_DWORD size, dst_pos, index;
uint8_t rle[2] = {0};
@@ -874,7 +874,7 @@ static void _bmp_encode_rle4(bmp_compress_struct_p bmp_ptr, FX_LPBYTE& dst_buf,
dst_buf[dst_pos++] = RLE_EOI;
dst_size = dst_pos;
}
-FX_BOOL _bmp_encode_image( bmp_compress_struct_p bmp_ptr, FX_LPBYTE& dst_buf, FX_DWORD& dst_size )
+FX_BOOL _bmp_encode_image( bmp_compress_struct_p bmp_ptr, uint8_t*& dst_buf, FX_DWORD& dst_size )
{
FX_DWORD head_size = sizeof(BmpFileHeader) + sizeof(BmpInfoHeader);
FX_DWORD pal_size = sizeof(FX_DWORD) * bmp_ptr->pal_num;
diff --git a/core/src/fxcodec/lbmp/fx_bmp.h b/core/src/fxcodec/lbmp/fx_bmp.h
index 553a1501db..f3c6e5b133 100644
--- a/core/src/fxcodec/lbmp/fx_bmp.h
+++ b/core/src/fxcodec/lbmp/fx_bmp.h
@@ -64,8 +64,8 @@ typedef bmp_decompress_struct *bmp_decompress_struct_p;
typedef bmp_decompress_struct_p *bmp_decompress_struct_pp;
struct tag_bmp_decompress_struct {
jmp_buf jmpbuf;
- FX_LPSTR err_ptr;
- void (*_bmp_error_fn)(bmp_decompress_struct_p gif_ptr, FX_LPCSTR err_msg);
+ FX_CHAR* err_ptr;
+ void (*_bmp_error_fn)(bmp_decompress_struct_p gif_ptr, const FX_CHAR* err_msg);
void* context_ptr;
@@ -77,7 +77,7 @@ struct tag_bmp_decompress_struct {
int32_t components;
int32_t src_row_bytes;
int32_t out_row_bytes;
- FX_LPBYTE out_row_buffer;
+ uint8_t* out_row_buffer;
FX_WORD bitCounts;
FX_DWORD color_used;
FX_BOOL imgTB_flag;
@@ -98,13 +98,13 @@ struct tag_bmp_decompress_struct {
#endif
FX_BOOL (*_bmp_get_data_position_fn)(bmp_decompress_struct_p bmp_ptr, FX_DWORD cur_pos);
- void (*_bmp_get_row_fn)(bmp_decompress_struct_p bmp_ptr, int32_t row_num, FX_LPBYTE row_buf);
- FX_LPBYTE next_in;
+ void (*_bmp_get_row_fn)(bmp_decompress_struct_p bmp_ptr, int32_t row_num, uint8_t* row_buf);
+ uint8_t* next_in;
FX_DWORD avail_in;
FX_DWORD skip_size;
int32_t decode_status;
};
-void _bmp_error(bmp_decompress_struct_p bmp_ptr, FX_LPCSTR err_msg);
+void _bmp_error(bmp_decompress_struct_p bmp_ptr, const FX_CHAR* err_msg);
bmp_decompress_struct_p _bmp_create_decompress();
void _bmp_destroy_decompress(bmp_decompress_struct_pp bmp_ptr_ptr);
int32_t _bmp_read_header(bmp_decompress_struct_p bmp_ptr);
@@ -112,10 +112,10 @@ int32_t _bmp_decode_image(bmp_decompress_struct_p bmp_ptr);
int32_t _bmp_decode_rgb(bmp_decompress_struct_p bmp_ptr);
int32_t _bmp_decode_rle8(bmp_decompress_struct_p bmp_ptr);
int32_t _bmp_decode_rle4(bmp_decompress_struct_p bmp_ptr);
-FX_LPBYTE _bmp_read_data(bmp_decompress_struct_p bmp_ptr, FX_LPBYTE* des_buf_pp, FX_DWORD data_size);
+uint8_t* _bmp_read_data(bmp_decompress_struct_p bmp_ptr, uint8_t** des_buf_pp, FX_DWORD data_size);
void _bmp_save_decoding_status(bmp_decompress_struct_p bmp_ptr, int32_t status);
-void _bmp_input_buffer(bmp_decompress_struct_p bmp_ptr, FX_LPBYTE src_buf, FX_DWORD src_size);
-FX_DWORD _bmp_get_avail_input(bmp_decompress_struct_p bmp_ptr, FX_LPBYTE* avial_buf_ptr);
+void _bmp_input_buffer(bmp_decompress_struct_p bmp_ptr, uint8_t* src_buf, FX_DWORD src_size);
+FX_DWORD _bmp_get_avail_input(bmp_decompress_struct_p bmp_ptr, uint8_t** avial_buf_ptr);
#define BMP_PTR_NOT_NULL(ptr,bmp_ptr) if(ptr == NULL){ \
_bmp_error(bmp_ptr,"Out Of Memory");\
return 0; \
@@ -126,7 +126,7 @@ typedef bmp_compress_struct_p *bmp_compress_struct_pp;
struct tag_bmp_compress_struct {
BmpFileHeader file_header;
BmpInfoHeader info_header;
- FX_LPBYTE src_buf;
+ uint8_t* src_buf;
FX_DWORD src_pitch;
FX_DWORD src_row;
uint8_t src_bpp;
@@ -140,4 +140,4 @@ struct tag_bmp_compress_struct {
};
bmp_compress_struct_p _bmp_create_compress();
void _bmp_destroy_compress(bmp_compress_struct_p bmp_ptr);
-FX_BOOL _bmp_encode_image(bmp_compress_struct_p bmp_ptr, FX_LPBYTE& dst_buf, FX_DWORD& dst_size);
+FX_BOOL _bmp_encode_image(bmp_compress_struct_p bmp_ptr, uint8_t*& dst_buf, FX_DWORD& dst_size);
diff --git a/core/src/fxcodec/lgif/fx_gif.cpp b/core/src/fxcodec/lgif/fx_gif.cpp
index 1eb4a75f1a..29e99f2abf 100644
--- a/core/src/fxcodec/lgif/fx_gif.cpp
+++ b/core/src/fxcodec/lgif/fx_gif.cpp
@@ -5,7 +5,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "fx_gif.h"
-void CGifLZWDecoder::Input(FX_LPBYTE src_buf, FX_DWORD src_size)
+void CGifLZWDecoder::Input(uint8_t* src_buf, FX_DWORD src_size)
{
next_in = src_buf;
avail_in = src_size;
@@ -65,7 +65,7 @@ void CGifLZWDecoder::AddCode(FX_WORD prefix_code, uint8_t append_char)
}
}
}
-int32_t CGifLZWDecoder::Decode(FX_LPBYTE des_buf, FX_DWORD& des_size)
+int32_t CGifLZWDecoder::Decode(uint8_t* des_buf, FX_DWORD& des_size)
{
if(des_size == 0) {
return 3;
@@ -144,7 +144,7 @@ int32_t CGifLZWDecoder::Decode(FX_LPBYTE des_buf, FX_DWORD& des_size)
}
return 0;
}
-static FX_BOOL _gif_grow_buf(FX_LPBYTE& dst_buf, FX_DWORD& dst_len, FX_DWORD size)
+static FX_BOOL _gif_grow_buf(uint8_t*& dst_buf, FX_DWORD& dst_len, FX_DWORD size)
{
if (dst_len < size) {
FX_DWORD len_org = dst_len;
@@ -169,7 +169,7 @@ static inline void _gif_cut_index(uint8_t& val, FX_DWORD index, uint8_t index_bi
FX_DWORD cut = ((1 << (index_bit - index_bit_use)) - 1) << index_bit_use;
val |= ((index & cut) >> index_bit_use) << bit_use;
}
-static inline uint8_t _gif_cut_buf(FX_LPCBYTE buf, FX_DWORD& offset, uint8_t bit_cut, uint8_t& bit_offset, FX_DWORD& bit_num)
+static inline uint8_t _gif_cut_buf(const uint8_t* buf, FX_DWORD& offset, uint8_t bit_cut, uint8_t& bit_offset, FX_DWORD& bit_num)
{
if (bit_cut != 8) {
FX_WORD index = 0;
@@ -206,7 +206,7 @@ void CGifLZWEncoder::ClearTable()
code_table[i].suffix = 0;
}
}
-void CGifLZWEncoder::Start( uint8_t code_len, FX_LPCBYTE src_buf, FX_LPBYTE& dst_buf, FX_DWORD& offset)
+void CGifLZWEncoder::Start( uint8_t code_len, const uint8_t* src_buf, uint8_t*& dst_buf, FX_DWORD& offset)
{
code_size = code_len + 1;
src_bit_cut = code_size;
@@ -225,7 +225,7 @@ void CGifLZWEncoder::Start( uint8_t code_len, FX_LPCBYTE src_buf, FX_LPBYTE& dst
code_table[index_num].prefix = _gif_cut_buf(src_buf, src_offset, src_bit_cut, src_bit_offset, src_bit_num);
code_table[index_num].suffix = _gif_cut_buf(src_buf, src_offset, src_bit_cut, src_bit_offset, src_bit_num);
}
-void CGifLZWEncoder::WriteBlock(FX_LPBYTE& dst_buf, FX_DWORD& dst_len, FX_DWORD& offset)
+void CGifLZWEncoder::WriteBlock(uint8_t*& dst_buf, FX_DWORD& dst_len, FX_DWORD& offset)
{
if (!_gif_grow_buf(dst_buf, dst_len, offset + GIF_DATA_BLOCK + 1)) {
longjmp(jmp, 1);
@@ -236,7 +236,7 @@ void CGifLZWEncoder::WriteBlock(FX_LPBYTE& dst_buf, FX_DWORD& dst_len, FX_DWORD&
FXSYS_memset32(index_buf, 0, GIF_DATA_BLOCK);
index_buf_len = 0;
}
-void CGifLZWEncoder::EncodeString( FX_DWORD index, FX_LPBYTE& dst_buf, FX_DWORD& dst_len, FX_DWORD& offset )
+void CGifLZWEncoder::EncodeString( FX_DWORD index, uint8_t*& dst_buf, FX_DWORD& dst_len, FX_DWORD& offset )
{
uint8_t index_bit_use;
index_bit_use = 0;
@@ -287,7 +287,7 @@ void CGifLZWEncoder::EncodeString( FX_DWORD index, FX_LPBYTE& dst_buf, FX_DWORD&
index_bit_cur++;
}
}
-FX_BOOL CGifLZWEncoder::Encode( FX_LPCBYTE src_buf, FX_DWORD src_len, FX_LPBYTE& dst_buf, FX_DWORD& dst_len, FX_DWORD& offset )
+FX_BOOL CGifLZWEncoder::Encode( const uint8_t* src_buf, FX_DWORD src_len, uint8_t*& dst_buf, FX_DWORD& dst_len, FX_DWORD& offset )
{
uint8_t suffix;
if (setjmp(jmp)) {
@@ -313,7 +313,7 @@ FX_BOOL CGifLZWEncoder::Encode( FX_LPCBYTE src_buf, FX_DWORD src_len, FX_LPBYTE&
src_bit_num = 0;
return TRUE;
}
-FX_BOOL CGifLZWEncoder::LookUpInTable( FX_LPCBYTE buf, FX_DWORD& offset, uint8_t& bit_offset )
+FX_BOOL CGifLZWEncoder::LookUpInTable( const uint8_t* buf, FX_DWORD& offset, uint8_t& bit_offset )
{
for (FX_WORD i = table_cur; i < index_num; i++) {
if (code_table[i].prefix == code_table[index_num].prefix &&
@@ -327,7 +327,7 @@ FX_BOOL CGifLZWEncoder::LookUpInTable( FX_LPCBYTE buf, FX_DWORD& offset, uint8_t
table_cur = code_end + 1;
return FALSE;
}
-void CGifLZWEncoder::Finish(FX_LPBYTE& dst_buf, FX_DWORD& dst_len, FX_DWORD& offset)
+void CGifLZWEncoder::Finish(uint8_t*& dst_buf, FX_DWORD& dst_len, FX_DWORD& offset)
{
EncodeString(code_table[index_num].prefix, dst_buf, dst_len, offset);
EncodeString(code_end, dst_buf, dst_len, offset);
@@ -532,13 +532,13 @@ void _gif_destroy_compress(gif_compress_struct_pp gif_ptr_ptr)
#endif
FX_Free(gif_ptr);
}
-void _gif_error(gif_decompress_struct_p gif_ptr, FX_LPCSTR err_msg)
+void _gif_error(gif_decompress_struct_p gif_ptr, const FX_CHAR* err_msg)
{
if(gif_ptr != NULL && gif_ptr->_gif_error_fn != NULL) {
gif_ptr->_gif_error_fn(gif_ptr, err_msg);
}
}
-void _gif_warn(gif_decompress_struct_p gif_ptr, FX_LPCSTR err_msg) {}
+void _gif_warn(gif_decompress_struct_p gif_ptr, const FX_CHAR* err_msg) {}
int32_t _gif_read_header(gif_decompress_struct_p gif_ptr)
{
if(gif_ptr == NULL) {
@@ -547,7 +547,7 @@ int32_t _gif_read_header(gif_decompress_struct_p gif_ptr)
FX_DWORD skip_size_org = gif_ptr->skip_size;
ASSERT(sizeof(GifHeader) == 6);
GifHeader* gif_header_ptr = NULL;
- if(_gif_read_data(gif_ptr, (FX_LPBYTE*)&gif_header_ptr, 6) == NULL) {
+ if(_gif_read_data(gif_ptr, (uint8_t**)&gif_header_ptr, 6) == NULL) {
return 2;
}
if(FXSYS_strncmp(gif_header_ptr->signature, GIF_SIGNATURE, 3) != 0 ||
@@ -558,7 +558,7 @@ int32_t _gif_read_header(gif_decompress_struct_p gif_ptr)
}
ASSERT(sizeof(GifLSD) == 7);
GifLSD* gif_lsd_ptr = NULL;
- if(_gif_read_data(gif_ptr, (FX_LPBYTE*)&gif_lsd_ptr, 7) == NULL) {
+ if(_gif_read_data(gif_ptr, (uint8_t**)&gif_lsd_ptr, 7) == NULL) {
gif_ptr->skip_size = skip_size_org;
return 2;
}
@@ -566,7 +566,7 @@ int32_t _gif_read_header(gif_decompress_struct_p gif_ptr)
gif_ptr->global_pal_num = 2 << ((GifGF*)&gif_lsd_ptr->global_flag)->pal_bits;
ASSERT(sizeof(GifPalette) == 3);
int32_t global_pal_size = gif_ptr->global_pal_num * 3;
- FX_LPBYTE global_pal_ptr = NULL;
+ uint8_t* global_pal_ptr = NULL;
if (_gif_read_data(gif_ptr, &global_pal_ptr, global_pal_size) == NULL) {
gif_ptr->skip_size = skip_size_org;
return 2;
@@ -581,8 +581,8 @@ int32_t _gif_read_header(gif_decompress_struct_p gif_ptr)
GIF_PTR_NOT_NULL(gif_ptr->global_pal_ptr, gif_ptr);
FXSYS_memcpy32(gif_ptr->global_pal_ptr, global_pal_ptr, global_pal_size);
}
- gif_ptr->width = (int)_GetWord_LSBFirst((FX_LPBYTE)&gif_lsd_ptr->width);
- gif_ptr->height = (int)_GetWord_LSBFirst((FX_LPBYTE)&gif_lsd_ptr->height);
+ gif_ptr->width = (int)_GetWord_LSBFirst((uint8_t*)&gif_lsd_ptr->width);
+ gif_ptr->height = (int)_GetWord_LSBFirst((uint8_t*)&gif_lsd_ptr->height);
gif_ptr->bc_index = gif_lsd_ptr->bc_index;
gif_ptr->pixel_aspect = gif_lsd_ptr->pixel_aspect;
return 1;
@@ -598,7 +598,7 @@ int32_t _gif_get_frame(gif_decompress_struct_p gif_ptr)
case GIF_D_STATUS_TAIL:
return 1;
case GIF_D_STATUS_SIG: {
- FX_LPBYTE sig_ptr = NULL;
+ uint8_t* sig_ptr = NULL;
if(_gif_read_data(gif_ptr, &sig_ptr, 1) == NULL) {
return 2;
}
@@ -623,7 +623,7 @@ int32_t _gif_get_frame(gif_decompress_struct_p gif_ptr)
}
}
case GIF_D_STATUS_EXT: {
- FX_LPBYTE ext_ptr = NULL;
+ uint8_t* ext_ptr = NULL;
if(_gif_read_data(gif_ptr, &ext_ptr, 1) == NULL) {
return 2;
}
@@ -668,8 +668,8 @@ int32_t _gif_get_frame(gif_decompress_struct_p gif_ptr)
continue;
}
case GIF_D_STATUS_IMG_DATA: {
- FX_LPBYTE data_size_ptr = NULL;
- FX_LPBYTE data_ptr = NULL;
+ uint8_t* data_size_ptr = NULL;
+ uint8_t* data_ptr = NULL;
FX_DWORD skip_size_org = gif_ptr->skip_size;
if(_gif_read_data(gif_ptr, &data_size_ptr, 1) == NULL) {
return 2;
@@ -711,15 +711,15 @@ void _gif_takeover_gce_ptr(gif_decompress_struct_p gif_ptr, GifGCE** gce_ptr_ptr
}
int32_t _gif_decode_extension(gif_decompress_struct_p gif_ptr)
{
- FX_LPBYTE data_size_ptr = NULL;
- FX_LPBYTE data_ptr = NULL;
+ uint8_t* data_size_ptr = NULL;
+ uint8_t* data_ptr = NULL;
FX_DWORD skip_size_org = gif_ptr->skip_size;
switch(gif_ptr->decode_status) {
#ifdef GIF_SUPPORT_APPLICATION_EXTENSION
case GIF_D_STATUS_EXT_AE: {
ASSERT(sizeof(GifAE) == 12);
GifAE* gif_ae_ptr = NULL;
- if(_gif_read_data(gif_ptr, (FX_LPBYTE*)&gif_ae_ptr, 12) == NULL) {
+ if(_gif_read_data(gif_ptr, (uint8_t**)&gif_ae_ptr, 12) == NULL) {
return 2;
}
CFX_ByteString gif_ae_data_str;
@@ -734,7 +734,7 @@ int32_t _gif_decode_extension(gif_decompress_struct_p gif_ptr)
gif_ptr->skip_size = skip_size_org;
return 2;
}
- gif_ae_data_str += CFX_ByteString((FX_LPCBYTE)data_ptr, data_size);
+ gif_ae_data_str += CFX_ByteString((const uint8_t*)data_ptr, data_size);
}
FXSYS_memcpy32(gif_ptr->app_identify, gif_ae_ptr->app_identify, 8);
FXSYS_memcpy32(gif_ptr->app_authentication, gif_ae_ptr->app_authentication, 3);
@@ -745,7 +745,7 @@ int32_t _gif_decode_extension(gif_decompress_struct_p gif_ptr)
}
gif_ptr->app_data = FX_Alloc(uint8_t, gif_ptr->app_data_size);
GIF_PTR_NOT_NULL(gif_ptr->app_data, gif_ptr);
- FXSYS_memcpy32(gif_ptr->app_data, FX_LPCBYTE(gif_ae_data_str), gif_ptr->app_data_size);
+ FXSYS_memcpy32(gif_ptr->app_data, const uint8_t*(gif_ae_data_str), gif_ptr->app_data_size);
}
break;
#endif
@@ -763,7 +763,7 @@ int32_t _gif_decode_extension(gif_decompress_struct_p gif_ptr)
gif_ptr->skip_size = skip_size_org;
return 2;
}
- *(gif_ptr->cmt_data_ptr) += CFX_ByteString((FX_LPCSTR)data_ptr, data_size);
+ *(gif_ptr->cmt_data_ptr) += CFX_ByteString((const FX_CHAR*)data_ptr, data_size);
}
}
break;
@@ -772,7 +772,7 @@ int32_t _gif_decode_extension(gif_decompress_struct_p gif_ptr)
case GIF_D_STATUS_EXT_PTE: {
ASSERT(sizeof(GifPTE) == 13);
GifPTE* gif_pte_ptr = NULL;
- if(_gif_read_data(gif_ptr, (FX_LPBYTE*)&gif_pte_ptr, 13) == NULL) {
+ if(_gif_read_data(gif_ptr, (uint8_t**)&gif_pte_ptr, 13) == NULL) {
return 2;
}
GifPlainText* gif_pt_ptr = FX_Alloc(GifPlainText, 1);
@@ -784,10 +784,10 @@ int32_t _gif_decode_extension(gif_decompress_struct_p gif_ptr)
gif_pt_ptr->string_ptr = new CFX_ByteString;
GIF_PTR_NOT_NULL(gif_pt_ptr->string_ptr, gif_ptr);
gif_pt_ptr->pte_ptr->block_size = gif_pte_ptr->block_size;
- gif_pt_ptr->pte_ptr->grid_left = _GetWord_LSBFirst((FX_LPBYTE)&gif_pte_ptr->grid_left);
- gif_pt_ptr->pte_ptr->grid_top = _GetWord_LSBFirst((FX_LPBYTE)&gif_pte_ptr->grid_top);
- gif_pt_ptr->pte_ptr->grid_width = _GetWord_LSBFirst((FX_LPBYTE)&gif_pte_ptr->grid_width);
- gif_pt_ptr->pte_ptr->grid_height = _GetWord_LSBFirst((FX_LPBYTE)&gif_pte_ptr->grid_height);
+ gif_pt_ptr->pte_ptr->grid_left = _GetWord_LSBFirst((uint8_t*)&gif_pte_ptr->grid_left);
+ gif_pt_ptr->pte_ptr->grid_top = _GetWord_LSBFirst((uint8_t*)&gif_pte_ptr->grid_top);
+ gif_pt_ptr->pte_ptr->grid_width = _GetWord_LSBFirst((uint8_t*)&gif_pte_ptr->grid_width);
+ gif_pt_ptr->pte_ptr->grid_height = _GetWord_LSBFirst((uint8_t*)&gif_pte_ptr->grid_height);
gif_pt_ptr->pte_ptr->char_width = gif_pte_ptr->char_width;
gif_pt_ptr->pte_ptr->char_height = gif_pte_ptr->char_height;
gif_pt_ptr->pte_ptr->fc_index = gif_pte_ptr->fc_index;
@@ -827,7 +827,7 @@ int32_t _gif_decode_extension(gif_decompress_struct_p gif_ptr)
}
return 2;
}
- *(gif_pt_ptr->string_ptr) += CFX_ByteString((FX_LPCSTR)data_ptr, data_size);
+ *(gif_pt_ptr->string_ptr) += CFX_ByteString((const FX_CHAR*)data_ptr, data_size);
}
gif_ptr->pt_ptr_arr_ptr->Add(gif_pt_ptr);
}
@@ -837,7 +837,7 @@ int32_t _gif_decode_extension(gif_decompress_struct_p gif_ptr)
case GIF_D_STATUS_EXT_GCE: {
ASSERT(sizeof(GifGCE) == 5);
GifGCE* gif_gce_ptr = NULL;
- if(_gif_read_data(gif_ptr, (FX_LPBYTE*)&gif_gce_ptr, 6) == NULL) {
+ if(_gif_read_data(gif_ptr, (uint8_t**)&gif_gce_ptr, 6) == NULL) {
return 2;
}
if(gif_ptr->gce_ptr == NULL) {
@@ -846,7 +846,7 @@ int32_t _gif_decode_extension(gif_decompress_struct_p gif_ptr)
}
gif_ptr->gce_ptr->block_size = gif_gce_ptr->block_size;
gif_ptr->gce_ptr->gce_flag = gif_gce_ptr->gce_flag;
- gif_ptr->gce_ptr->delay_time = _GetWord_LSBFirst((FX_LPBYTE)&gif_gce_ptr->delay_time);
+ gif_ptr->gce_ptr->delay_time = _GetWord_LSBFirst((uint8_t*)&gif_gce_ptr->delay_time);
gif_ptr->gce_ptr->trans_index = gif_gce_ptr->trans_index;
}
break;
@@ -886,7 +886,7 @@ int32_t _gif_decode_image_info(gif_decompress_struct_p gif_ptr)
FX_DWORD skip_size_org = gif_ptr->skip_size;
ASSERT(sizeof(GifImageInfo) == 9);
GifImageInfo* gif_img_info_ptr = NULL;
- if(_gif_read_data(gif_ptr, (FX_LPBYTE*)&gif_img_info_ptr, 9) == NULL) {
+ if(_gif_read_data(gif_ptr, (uint8_t**)&gif_img_info_ptr, 9) == NULL) {
return 2;
}
GifImage* gif_image_ptr = (GifImage*)FX_Alloc(uint8_t, sizeof(GifImage));
@@ -894,10 +894,10 @@ int32_t _gif_decode_image_info(gif_decompress_struct_p gif_ptr)
FXSYS_memset32(gif_image_ptr, 0, sizeof(GifImage));
gif_image_ptr->image_info_ptr = (GifImageInfo*)FX_Alloc(uint8_t, sizeof(GifImageInfo));
GIF_PTR_NOT_NULL(gif_image_ptr->image_info_ptr, gif_ptr);
- gif_image_ptr->image_info_ptr->left = _GetWord_LSBFirst((FX_LPBYTE)&gif_img_info_ptr->left);
- gif_image_ptr->image_info_ptr->top = _GetWord_LSBFirst((FX_LPBYTE)&gif_img_info_ptr->top);
- gif_image_ptr->image_info_ptr->width = _GetWord_LSBFirst((FX_LPBYTE)&gif_img_info_ptr->width);
- gif_image_ptr->image_info_ptr->height = _GetWord_LSBFirst((FX_LPBYTE)&gif_img_info_ptr->height);
+ gif_image_ptr->image_info_ptr->left = _GetWord_LSBFirst((uint8_t*)&gif_img_info_ptr->left);
+ gif_image_ptr->image_info_ptr->top = _GetWord_LSBFirst((uint8_t*)&gif_img_info_ptr->top);
+ gif_image_ptr->image_info_ptr->width = _GetWord_LSBFirst((uint8_t*)&gif_img_info_ptr->width);
+ gif_image_ptr->image_info_ptr->height = _GetWord_LSBFirst((uint8_t*)&gif_img_info_ptr->height);
gif_image_ptr->image_info_ptr->local_flag = gif_img_info_ptr->local_flag;
if(gif_image_ptr->image_info_ptr->left + gif_image_ptr->image_info_ptr->width > gif_ptr->width ||
gif_image_ptr->image_info_ptr->top + gif_image_ptr->image_info_ptr->height > gif_ptr->height) {
@@ -915,7 +915,7 @@ int32_t _gif_decode_image_info(gif_decompress_struct_p gif_ptr)
if(gif_img_info_lf_ptr->local_pal) {
ASSERT(sizeof(GifPalette) == 3);
int32_t loc_pal_size = (2 << gif_img_info_lf_ptr->pal_bits) * 3;
- FX_LPBYTE loc_pal_ptr = NULL;
+ uint8_t* loc_pal_ptr = NULL;
if(_gif_read_data(gif_ptr, &loc_pal_ptr, loc_pal_size) == NULL) {
gif_ptr->skip_size = skip_size_org;
if(gif_image_ptr->image_info_ptr != NULL) {
@@ -929,10 +929,10 @@ int32_t _gif_decode_image_info(gif_decompress_struct_p gif_ptr)
}
gif_image_ptr->local_pal_ptr = (GifPalette*)gif_ptr->_gif_ask_buf_for_pal_fn(gif_ptr, loc_pal_size);
if(gif_image_ptr->local_pal_ptr != NULL) {
- FXSYS_memcpy32((FX_LPBYTE)gif_image_ptr->local_pal_ptr, loc_pal_ptr, loc_pal_size);
+ FXSYS_memcpy32((uint8_t*)gif_image_ptr->local_pal_ptr, loc_pal_ptr, loc_pal_size);
}
}
- FX_LPBYTE code_size_ptr = NULL;
+ uint8_t* code_size_ptr = NULL;
if(_gif_read_data(gif_ptr, &code_size_ptr, 1) == NULL) {
gif_ptr->skip_size = skip_size_org;
if(gif_image_ptr->image_info_ptr != NULL) {
@@ -963,8 +963,8 @@ int32_t _gif_load_frame(gif_decompress_struct_p gif_ptr, int32_t frame_num)
) {
return 0;
}
- FX_LPBYTE data_size_ptr = NULL;
- FX_LPBYTE data_ptr = NULL;
+ uint8_t* data_size_ptr = NULL;
+ uint8_t* data_ptr = NULL;
FX_DWORD skip_size_org = gif_ptr->skip_size;
GifImage* gif_image_ptr = gif_ptr->img_ptr_arr_ptr->GetAt(frame_num);
FX_DWORD gif_img_row_bytes = gif_image_ptr->image_info_ptr->width;
@@ -1111,7 +1111,7 @@ void _gif_save_decoding_status(gif_decompress_struct_p gif_ptr, int32_t status)
gif_ptr->avail_in -= gif_ptr->skip_size;
gif_ptr->skip_size = 0;
}
-FX_LPBYTE _gif_read_data(gif_decompress_struct_p gif_ptr, FX_LPBYTE* des_buf_pp, FX_DWORD data_size)
+uint8_t* _gif_read_data(gif_decompress_struct_p gif_ptr, uint8_t** des_buf_pp, FX_DWORD data_size)
{
if(gif_ptr == NULL ||
gif_ptr->avail_in < gif_ptr->skip_size + data_size) {
@@ -1121,13 +1121,13 @@ FX_LPBYTE _gif_read_data(gif_decompress_struct_p gif_ptr, FX_LPBYTE* des_buf_pp,
gif_ptr->skip_size += data_size;
return *des_buf_pp;
}
-void _gif_input_buffer(gif_decompress_struct_p gif_ptr, FX_LPBYTE src_buf, FX_DWORD src_size)
+void _gif_input_buffer(gif_decompress_struct_p gif_ptr, uint8_t* src_buf, FX_DWORD src_size)
{
gif_ptr->next_in = src_buf;
gif_ptr->avail_in = src_size;
gif_ptr->skip_size = 0;
}
-FX_DWORD _gif_get_avail_input(gif_decompress_struct_p gif_ptr, FX_LPBYTE* avial_buf_ptr)
+FX_DWORD _gif_get_avail_input(gif_decompress_struct_p gif_ptr, uint8_t** avial_buf_ptr)
{
if(avial_buf_ptr != NULL) {
*avial_buf_ptr = NULL;
@@ -1141,7 +1141,7 @@ int32_t _gif_get_frame_num(gif_decompress_struct_p gif_ptr)
{
return gif_ptr->img_ptr_arr_ptr->GetSize();
}
-static FX_BOOL _gif_write_header( gif_compress_struct_p gif_ptr, FX_LPBYTE& dst_buf, FX_DWORD& dst_len )
+static FX_BOOL _gif_write_header( gif_compress_struct_p gif_ptr, uint8_t*& dst_buf, FX_DWORD& dst_len )
{
if (gif_ptr->cur_offset) {
return TRUE;
@@ -1171,13 +1171,13 @@ static FX_BOOL _gif_write_header( gif_compress_struct_p gif_ptr, FX_LPBYTE& dst_
}
return TRUE;
}
-void interlace_buf(FX_LPCBYTE buf, FX_DWORD pitch, FX_DWORD height)
+void interlace_buf(const uint8_t* buf, FX_DWORD pitch, FX_DWORD height)
{
- CFX_ArrayTemplate<FX_LPBYTE> pass[4];
+ CFX_ArrayTemplate<uint8_t*> pass[4];
int i, j;
FX_DWORD row;
row = 0;
- FX_LPBYTE temp;
+ uint8_t* temp;
while (row < height) {
if (row % 8 == 0) {
j = 0;
@@ -1198,12 +1198,12 @@ void interlace_buf(FX_LPCBYTE buf, FX_DWORD pitch, FX_DWORD height)
}
for (i = 0, row = 0; i < 4; i++) {
for (j = 0; j < pass[i].GetSize(); j++, row++) {
- FXSYS_memcpy32((FX_LPBYTE)&buf[pitch * row], pass[i].GetAt(j), pitch);
+ FXSYS_memcpy32((uint8_t*)&buf[pitch * row], pass[i].GetAt(j), pitch);
FX_Free(pass[i].GetAt(j));
}
}
}
-static void _gif_write_block_data(FX_LPCBYTE src_buf, FX_DWORD src_len, FX_LPBYTE& dst_buf, FX_DWORD& dst_len, FX_DWORD& dst_offset)
+static void _gif_write_block_data(const uint8_t* src_buf, FX_DWORD src_len, uint8_t*& dst_buf, FX_DWORD& dst_len, FX_DWORD& dst_offset)
{
FX_DWORD src_offset = 0;
while (src_len > GIF_DATA_BLOCK) {
@@ -1217,7 +1217,7 @@ static void _gif_write_block_data(FX_LPCBYTE src_buf, FX_DWORD src_len, FX_LPBYT
FXSYS_memcpy32(&dst_buf[dst_offset], &src_buf[src_offset], src_len);
dst_offset += src_len;
}
-static FX_BOOL _gif_write_data( gif_compress_struct_p gif_ptr, FX_LPBYTE& dst_buf, FX_DWORD& dst_len )
+static FX_BOOL _gif_write_data( gif_compress_struct_p gif_ptr, uint8_t*& dst_buf, FX_DWORD& dst_len )
{
if (!_gif_grow_buf(dst_buf, dst_len, gif_ptr->cur_offset + GIF_DATA_BLOCK)) {
return FALSE;
@@ -1326,7 +1326,7 @@ static FX_BOOL _gif_write_data( gif_compress_struct_p gif_ptr, FX_LPBYTE& dst_bu
dst_buf[gif_ptr->cur_offset++] = GIF_SIG_TRAILER;
return TRUE;
}
-FX_BOOL _gif_encode( gif_compress_struct_p gif_ptr, FX_LPBYTE& dst_buf, FX_DWORD& dst_len )
+FX_BOOL _gif_encode( gif_compress_struct_p gif_ptr, uint8_t*& dst_buf, FX_DWORD& dst_len )
{
if (!_gif_write_header(gif_ptr, dst_buf, dst_len)) {
return FALSE;
diff --git a/core/src/fxcodec/lgif/fx_gif.h b/core/src/fxcodec/lgif/fx_gif.h
index 10aaf5f98f..031e4a4f8f 100644
--- a/core/src/fxcodec/lgif/fx_gif.h
+++ b/core/src/fxcodec/lgif/fx_gif.h
@@ -8,10 +8,10 @@
#include "../../../include/fxcrt/fx_basic.h"
-extern FX_WORD _GetWord_LSBFirst(FX_LPBYTE p);
-extern void _SetWord_LSBFirst(FX_LPBYTE p, FX_WORD v);
-extern void _BpcConvert(FX_LPCBYTE src_buf, FX_DWORD src_len, int32_t src_bpc, int32_t dst_bpc,
- FX_LPBYTE& dst_buf, FX_DWORD& dst_len);
+extern FX_WORD _GetWord_LSBFirst(uint8_t* p);
+extern void _SetWord_LSBFirst(uint8_t* p, FX_WORD v);
+extern void _BpcConvert(const uint8_t* src_buf, FX_DWORD src_len, int32_t src_bpc, int32_t dst_bpc,
+ uint8_t*& dst_buf, FX_DWORD& dst_len);
#define GIF_SUPPORT_COMMENT_EXTENSION
#define GIF_SUPPORT_GRAPHIC_CONTROL_EXTENSION
#define GIF_SUPPORT_PLAIN_TEXT_EXTENSION
@@ -110,7 +110,7 @@ typedef struct tagGifImage {
GifImageInfo* image_info_ptr;
uint8_t image_code_size;
FX_DWORD image_data_pos;
- FX_LPBYTE image_row_buf;
+ uint8_t* image_row_buf;
int32_t image_row_num;
} GifImage;
typedef struct tagGifPlainText {
@@ -125,15 +125,15 @@ public:
FX_WORD prefix;
uint8_t suffix;
};
- CGifLZWDecoder(FX_LPSTR error_ptr = NULL)
+ CGifLZWDecoder(FX_CHAR* error_ptr = NULL)
{
err_msg_ptr = error_ptr;
}
void InitTable(uint8_t code_len);
- int32_t Decode(FX_LPBYTE des_buf, FX_DWORD& des_size);
+ int32_t Decode(uint8_t* des_buf, FX_DWORD& des_size);
- void Input(FX_LPBYTE src_buf, FX_DWORD src_size);
+ void Input(uint8_t* src_buf, FX_DWORD src_size);
FX_DWORD GetAvailInput();
private:
@@ -151,13 +151,13 @@ private:
tag_Table code_table[GIF_MAX_LZW_CODE];
FX_WORD code_old;
- FX_LPBYTE next_in;
+ uint8_t* next_in;
FX_DWORD avail_in;
uint8_t bits_left;
FX_DWORD code_store;
- FX_LPSTR err_msg_ptr;
+ FX_CHAR* err_msg_ptr;
};
class CGifLZWEncoder
{
@@ -168,14 +168,14 @@ public:
};
CGifLZWEncoder();
~CGifLZWEncoder();
- void Start(uint8_t code_len, FX_LPCBYTE src_buf, FX_LPBYTE& dst_buf, FX_DWORD& offset);
- FX_BOOL Encode(FX_LPCBYTE src_buf, FX_DWORD src_len, FX_LPBYTE& dst_buf, FX_DWORD& dst_len, FX_DWORD& offset);
- void Finish(FX_LPBYTE& dst_buf, FX_DWORD& dst_len, FX_DWORD& offset);
+ void Start(uint8_t code_len, const uint8_t* src_buf, uint8_t*& dst_buf, FX_DWORD& offset);
+ FX_BOOL Encode(const uint8_t* src_buf, FX_DWORD src_len, uint8_t*& dst_buf, FX_DWORD& dst_len, FX_DWORD& offset);
+ void Finish(uint8_t*& dst_buf, FX_DWORD& dst_len, FX_DWORD& offset);
private:
void ClearTable();
- FX_BOOL LookUpInTable(FX_LPCBYTE buf, FX_DWORD& offset, uint8_t& bit_offset);
- void EncodeString(FX_DWORD index, FX_LPBYTE& dst_buf, FX_DWORD& dst_len, FX_DWORD& offset);
- void WriteBlock(FX_LPBYTE& dst_buf, FX_DWORD& dst_len, FX_DWORD& offset);
+ FX_BOOL LookUpInTable(const uint8_t* buf, FX_DWORD& offset, uint8_t& bit_offset);
+ void EncodeString(FX_DWORD index, uint8_t*& dst_buf, FX_DWORD& dst_len, FX_DWORD& offset);
+ void WriteBlock(uint8_t*& dst_buf, FX_DWORD& dst_len, FX_DWORD& offset);
jmp_buf jmp;
FX_DWORD src_offset;
uint8_t src_bit_offset;
@@ -198,8 +198,8 @@ typedef gif_decompress_struct_p *gif_decompress_struct_pp;
static int32_t s_gif_interlace_step[4] = {8, 8, 4, 2};
struct tag_gif_decompress_struct {
jmp_buf jmpbuf;
- FX_LPSTR err_ptr;
- void (*_gif_error_fn)(gif_decompress_struct_p gif_ptr, FX_LPCSTR err_msg);
+ FX_CHAR* err_ptr;
+ void (*_gif_error_fn)(gif_decompress_struct_p gif_ptr, const FX_CHAR* err_msg);
void* context_ptr;
int width;
int height;
@@ -215,13 +215,13 @@ struct tag_gif_decompress_struct {
FX_DWORD img_row_avail_size;
uint8_t img_pass_num;
CFX_ArrayTemplate<GifImage*>* img_ptr_arr_ptr;
- FX_LPBYTE (*_gif_ask_buf_for_pal_fn)(gif_decompress_struct_p gif_ptr, int32_t pal_size);
- FX_LPBYTE next_in;
+ uint8_t* (*_gif_ask_buf_for_pal_fn)(gif_decompress_struct_p gif_ptr, int32_t pal_size);
+ uint8_t* next_in;
FX_DWORD avail_in;
int32_t decode_status;
FX_DWORD skip_size;
void (*_gif_record_current_position_fn)(gif_decompress_struct_p gif_ptr, FX_DWORD* cur_pos_ptr);
- void (*_gif_get_row_fn)(gif_decompress_struct_p gif_ptr, int32_t row_num, FX_LPBYTE row_buf);
+ void (*_gif_get_row_fn)(gif_decompress_struct_p gif_ptr, int32_t row_num, uint8_t* row_buf);
FX_BOOL (*_gif_get_record_position_fn)(gif_decompress_struct_p gif_ptr, FX_DWORD cur_pos,
int32_t left, int32_t top, int32_t width, int32_t height,
int32_t pal_num, void* pal_ptr,
@@ -231,7 +231,7 @@ struct tag_gif_decompress_struct {
uint8_t app_identify[8];
uint8_t app_authentication[3];
FX_DWORD app_data_size;
- FX_LPBYTE app_data;
+ uint8_t* app_data;
#endif
#ifdef GIF_SUPPORT_COMMENT_EXTENSION
CFX_ByteString* cmt_data_ptr;
@@ -247,7 +247,7 @@ typedef struct tag_gif_compress_struct gif_compress_struct;
typedef gif_compress_struct *gif_compress_struct_p;
typedef gif_compress_struct_p *gif_compress_struct_pp;
struct tag_gif_compress_struct {
- FX_LPCBYTE src_buf;
+ const uint8_t* src_buf;
FX_DWORD src_pitch;
FX_DWORD src_width;
FX_DWORD src_row;
@@ -265,11 +265,11 @@ struct tag_gif_compress_struct {
uint8_t app_identify[8];
uint8_t app_authentication[3];
FX_DWORD app_data_size;
- FX_LPBYTE app_data;
+ uint8_t* app_data;
#endif
#ifdef GIF_SUPPORT_COMMENT_EXTENSION
- FX_LPBYTE cmt_data_ptr;
+ uint8_t* cmt_data_ptr;
FX_DWORD cmt_data_len;
#endif
@@ -279,12 +279,12 @@ struct tag_gif_compress_struct {
#ifdef GIF_SUPPORT_PLAIN_TEXT_EXTENSION
GifPTE* pte_ptr;
- FX_LPCBYTE pte_data_ptr;
+ const uint8_t* pte_data_ptr;
FX_DWORD pte_data_len;
#endif
};
-void _gif_error(gif_decompress_struct_p gif_ptr, FX_LPCSTR err_msg);
-void _gif_warn(gif_decompress_struct_p gif_ptr, FX_LPCSTR err_msg);
+void _gif_error(gif_decompress_struct_p gif_ptr, const FX_CHAR* err_msg);
+void _gif_warn(gif_decompress_struct_p gif_ptr, const FX_CHAR* err_msg);
gif_decompress_struct_p _gif_create_decompress();
void _gif_destroy_decompress(gif_decompress_struct_pp gif_ptr_ptr);
gif_compress_struct_p _gif_create_compress();
@@ -296,12 +296,12 @@ int32_t _gif_decode_extension(gif_decompress_struct_p gif_ptr);
int32_t _gif_decode_image_info(gif_decompress_struct_p gif_ptr);
void _gif_takeover_gce_ptr(gif_decompress_struct_p gif_ptr, GifGCE** gce_ptr_ptr);
int32_t _gif_load_frame(gif_decompress_struct_p gif_ptr, int32_t frame_num);
-FX_LPBYTE _gif_read_data(gif_decompress_struct_p gif_ptr, FX_LPBYTE* des_buf_pp, FX_DWORD data_size);
+uint8_t* _gif_read_data(gif_decompress_struct_p gif_ptr, uint8_t** des_buf_pp, FX_DWORD data_size);
void _gif_save_decoding_status(gif_decompress_struct_p gif_ptr, int32_t status);
-void _gif_input_buffer(gif_decompress_struct_p gif_ptr, FX_LPBYTE src_buf, FX_DWORD src_size);
-FX_DWORD _gif_get_avail_input(gif_decompress_struct_p gif_ptr, FX_LPBYTE* avial_buf_ptr);
-void interlace_buf(FX_LPCBYTE buf, FX_DWORD width, FX_DWORD height);
-FX_BOOL _gif_encode( gif_compress_struct_p gif_ptr, FX_LPBYTE& dst_buf, FX_DWORD& dst_len );
+void _gif_input_buffer(gif_decompress_struct_p gif_ptr, uint8_t* src_buf, FX_DWORD src_size);
+FX_DWORD _gif_get_avail_input(gif_decompress_struct_p gif_ptr, uint8_t** avial_buf_ptr);
+void interlace_buf(const uint8_t* buf, FX_DWORD width, FX_DWORD height);
+FX_BOOL _gif_encode( gif_compress_struct_p gif_ptr, uint8_t*& dst_buf, FX_DWORD& dst_len );
#define GIF_PTR_NOT_NULL(ptr,gif_ptr) if(ptr == NULL){ \
_gif_error(gif_ptr,"Out Of Memory");\
return 0; \
diff --git a/core/src/fxcrt/extension.h b/core/src/fxcrt/extension.h
index 99a5cf3c4e..c526a2ea6e 100644
--- a/core/src/fxcrt/extension.h
+++ b/core/src/fxcrt/extension.h
@@ -184,7 +184,7 @@ public:
{
m_dwFlags = FX_MEMSTREAM_TakeOver | (bConsecutive ? FX_MEMSTREAM_Consecutive : 0);
}
- CFX_MemoryStream(FX_LPBYTE pBuffer, size_t nSize, FX_BOOL bTakeOver)
+ CFX_MemoryStream(uint8_t* pBuffer, size_t nSize, FX_BOOL bTakeOver)
: m_dwCount(1)
, m_nTotalSize(nSize)
, m_nCurSize(nSize)
@@ -199,7 +199,7 @@ public:
{
if (m_dwFlags & FX_MEMSTREAM_TakeOver) {
for (int32_t i = 0; i < m_Blocks.GetSize(); i++) {
- FX_Free((FX_LPBYTE)m_Blocks[i]);
+ FX_Free((uint8_t*)m_Blocks[i]);
}
}
m_Blocks.RemoveAll();
@@ -278,7 +278,7 @@ public:
m_nCurPos = newPos.ValueOrDie();
if (m_dwFlags & FX_MEMSTREAM_Consecutive) {
- FXSYS_memcpy32(buffer, (FX_LPBYTE)m_Blocks[0] + (size_t)offset, size);
+ FXSYS_memcpy32(buffer, (uint8_t*)m_Blocks[0] + (size_t)offset, size);
return TRUE;
}
size_t nStartBlock = (size_t)offset / m_nGrowSize;
@@ -288,8 +288,8 @@ public:
if (nRead > size) {
nRead = size;
}
- FXSYS_memcpy32(buffer, (FX_LPBYTE)m_Blocks[(int)nStartBlock] + (size_t)offset, nRead);
- buffer = ((FX_LPBYTE)buffer) + nRead;
+ FXSYS_memcpy32(buffer, (uint8_t*)m_Blocks[(int)nStartBlock] + (size_t)offset, nRead);
+ buffer = ((uint8_t*)buffer) + nRead;
size -= nRead;
nStartBlock ++;
offset = 0;
@@ -341,7 +341,7 @@ public:
return FALSE;
}
}
- FXSYS_memcpy32((FX_LPBYTE)m_Blocks[0] + (size_t)offset, buffer, size);
+ FXSYS_memcpy32((uint8_t*)m_Blocks[0] + (size_t)offset, buffer, size);
if (m_nCurSize < m_nCurPos) {
m_nCurSize = m_nCurPos;
}
@@ -365,8 +365,8 @@ public:
if (nWrite > size) {
nWrite = size;
}
- FXSYS_memcpy32((FX_LPBYTE)m_Blocks[(int)nStartBlock] + (size_t)offset, buffer, nWrite);
- buffer = ((FX_LPBYTE)buffer) + nWrite;
+ FXSYS_memcpy32((uint8_t*)m_Blocks[(int)nStartBlock] + (size_t)offset, buffer, nWrite);
+ buffer = ((uint8_t*)buffer) + nWrite;
size -= nWrite;
nStartBlock ++;
offset = 0;
@@ -385,7 +385,7 @@ public:
{
if (m_dwFlags & FX_MEMSTREAM_Consecutive) {
if (m_Blocks.GetSize() < 1) {
- FX_LPBYTE pBlock = FX_Alloc(uint8_t, FX_MAX(nInitSize, 4096));
+ uint8_t* pBlock = FX_Alloc(uint8_t, FX_MAX(nInitSize, 4096));
m_Blocks.Add(pBlock);
}
m_nGrowSize = FX_MAX(nGrowSize, 4096);
@@ -393,11 +393,11 @@ public:
m_nGrowSize = FX_MAX(nGrowSize, 4096);
}
}
- virtual FX_LPBYTE GetBuffer() const override
+ virtual uint8_t* GetBuffer() const override
{
- return m_Blocks.GetSize() ? (FX_LPBYTE)m_Blocks[0] : NULL;
+ return m_Blocks.GetSize() ? (uint8_t*)m_Blocks[0] : NULL;
}
- virtual void AttachBuffer(FX_LPBYTE pBuffer, size_t nSize, FX_BOOL bTakeOver = FALSE) override
+ virtual void AttachBuffer(uint8_t* pBuffer, size_t nSize, FX_BOOL bTakeOver = FALSE) override
{
if (!(m_dwFlags & FX_MEMSTREAM_Consecutive)) {
return;
@@ -442,7 +442,7 @@ protected:
size = (size - m_nTotalSize + m_nGrowSize - 1) / m_nGrowSize;
m_Blocks.SetSize(m_Blocks.GetSize() + (int32_t)size);
while (size --) {
- FX_LPBYTE pBlock = FX_Alloc(uint8_t, m_nGrowSize);
+ uint8_t* pBlock = FX_Alloc(uint8_t, m_nGrowSize);
m_Blocks.SetAt(iCount ++, pBlock);
m_nTotalSize += m_nGrowSize;
}
@@ -469,7 +469,7 @@ typedef struct _FX_MTRANDOMCONTEXT {
} FX_MTRANDOMCONTEXT, * FX_LPMTRANDOMCONTEXT;
typedef FX_MTRANDOMCONTEXT const * FX_LPCMTRANDOMCONTEXT;
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
-FX_BOOL FX_GenerateCryptoRandom(FX_LPDWORD pBuffer, int32_t iCount);
+FX_BOOL FX_GenerateCryptoRandom(FX_DWORD* pBuffer, int32_t iCount);
#endif
#ifdef __cplusplus
}
diff --git a/core/src/fxcrt/fx_arabic.cpp b/core/src/fxcrt/fx_arabic.cpp
index 81c86542c7..b8e8f41612 100644
--- a/core/src/fxcrt/fx_arabic.cpp
+++ b/core/src/fxcrt/fx_arabic.cpp
@@ -312,9 +312,9 @@ void FX_BidiReverseString(CFX_WideString &wsText, int32_t iStart, int32_t iCount
FXSYS_assert(iStart > -1 && iStart < wsText.GetLength());
FXSYS_assert(iCount >= 0 && iStart + iCount <= wsText.GetLength());
FX_WCHAR wch;
- FX_LPWSTR pStart = (FX_LPWSTR)(FX_LPCWSTR)wsText;
+ FX_WCHAR* pStart = (FX_WCHAR*)(const FX_WCHAR*)wsText;
pStart += iStart;
- FX_LPWSTR pEnd = pStart + iCount - 1;
+ FX_WCHAR* pEnd = pStart + iCount - 1;
while (pStart < pEnd) {
wch = *pStart;
*pStart ++ = *pEnd;
@@ -355,7 +355,7 @@ void FX_BidiClassify(const CFX_WideString &wsText, CFX_Int32Array &classes, FX_B
{
FXSYS_assert(wsText.GetLength() == classes.GetSize());
int32_t iCount = wsText.GetLength();
- FX_LPCWSTR pwsStart = (FX_LPCWSTR)wsText;
+ const FX_WCHAR* pwsStart = (const FX_WCHAR*)wsText;
FX_WCHAR wch;
int32_t iCls;
if (bWS) {
diff --git a/core/src/fxcrt/fx_basic_array.cpp b/core/src/fxcrt/fx_basic_array.cpp
index 315c83e53a..d21909f861 100644
--- a/core/src/fxcrt/fx_basic_array.cpp
+++ b/core/src/fxcrt/fx_basic_array.cpp
@@ -52,7 +52,7 @@ FX_BOOL CFX_BasicArray::SetSize(int nNewSize)
if (!totalSize.IsValid() || nNewMax < m_nSize) {
return FALSE;
}
- FX_LPBYTE pNewData = FX_Realloc(uint8_t, m_pData, totalSize.ValueOrDie());
+ uint8_t* pNewData = FX_Realloc(uint8_t, m_pData, totalSize.ValueOrDie());
if (pNewData == NULL) {
return FALSE;
}
@@ -83,7 +83,7 @@ FX_BOOL CFX_BasicArray::Copy(const CFX_BasicArray& src)
FXSYS_memcpy32(m_pData, src.m_pData, src.m_nSize * m_nUnitSize);
return TRUE;
}
-FX_LPBYTE CFX_BasicArray::InsertSpaceAt(int nIndex, int nCount)
+uint8_t* CFX_BasicArray::InsertSpaceAt(int nIndex, int nCount)
{
if (nIndex < 0 || nCount <= 0) {
return NULL;
@@ -259,7 +259,7 @@ void** CFX_BaseSegmentedArray::GetIndex(int seg_index) const
}
return pSpot;
}
-void* CFX_BaseSegmentedArray::IterateSegment(FX_LPCBYTE pSegment, int count, FX_BOOL (*callback)(void* param, void* pData), void* param) const
+void* CFX_BaseSegmentedArray::IterateSegment(const uint8_t* pSegment, int count, FX_BOOL (*callback)(void* param, void* pData), void* param) const
{
for (int i = 0; i < count; i ++) {
if (!callback(param, (void*)(pSegment + i * m_UnitSize))) {
@@ -276,7 +276,7 @@ void* CFX_BaseSegmentedArray::IterateIndex(int level, int& start, void** pIndex,
count = m_SegmentSize;
}
start += count;
- return IterateSegment((FX_LPCBYTE)pIndex, count, callback, param);
+ return IterateSegment((const uint8_t*)pIndex, count, callback, param);
}
for (int i = 0; i < m_IndexSize; i ++) {
if (pIndex[i] == NULL) {
@@ -303,10 +303,10 @@ void* CFX_BaseSegmentedArray::GetAt(int index) const
return NULL;
}
if (m_IndexDepth == 0) {
- return (FX_LPBYTE)m_pIndex + m_UnitSize * index;
+ return (uint8_t*)m_pIndex + m_UnitSize * index;
}
int seg_index = index / m_SegmentSize;
- return (FX_LPBYTE)GetIndex(seg_index)[seg_index % m_IndexSize] + (index % m_SegmentSize) * m_UnitSize;
+ return (uint8_t*)GetIndex(seg_index)[seg_index % m_IndexSize] + (index % m_SegmentSize) * m_UnitSize;
}
void CFX_BaseSegmentedArray::Delete(int index, int count)
{
diff --git a/core/src/fxcrt/fx_basic_bstring.cpp b/core/src/fxcrt/fx_basic_bstring.cpp
index 78698fc6d0..2baeb83b5d 100644
--- a/core/src/fxcrt/fx_basic_bstring.cpp
+++ b/core/src/fxcrt/fx_basic_bstring.cpp
@@ -22,7 +22,7 @@ static int _Buffer_itoa(char* buf, int i, FX_DWORD flags)
u = -i;
}
int base = 10;
- FX_LPCSTR string = "0123456789abcdef";
+ const FX_CHAR* string = "0123456789abcdef";
if (flags & FXFORMAT_HEX) {
base = 16;
if (flags & FXFORMAT_CAPITAL) {
@@ -81,7 +81,7 @@ CFX_ByteString::~CFX_ByteString()
m_pData->Release();
}
}
-CFX_ByteString::CFX_ByteString(FX_LPCSTR lpsz, FX_STRSIZE nLen)
+CFX_ByteString::CFX_ByteString(const FX_CHAR* lpsz, FX_STRSIZE nLen)
{
if (nLen < 0) {
nLen = lpsz ? FXSYS_strlen(lpsz) : 0;
@@ -95,7 +95,7 @@ CFX_ByteString::CFX_ByteString(FX_LPCSTR lpsz, FX_STRSIZE nLen)
m_pData = NULL;
}
}
-CFX_ByteString::CFX_ByteString(FX_LPCBYTE lpsz, FX_STRSIZE nLen)
+CFX_ByteString::CFX_ByteString(const uint8_t* lpsz, FX_STRSIZE nLen)
{
if (nLen > 0) {
m_pData = StringData::Create(nLen);
@@ -150,7 +150,7 @@ CFX_ByteString::CFX_ByteString(FX_BSTR str1, FX_BSTR str2)
FXSYS_memcpy32(m_pData->m_String + str1.GetLength(), str2.GetCStr(), str2.GetLength());
}
}
-const CFX_ByteString& CFX_ByteString::operator=(FX_LPCSTR lpsz)
+const CFX_ByteString& CFX_ByteString::operator=(const FX_CHAR* lpsz)
{
if (lpsz == NULL || lpsz[0] == 0) {
Empty();
@@ -192,7 +192,7 @@ const CFX_ByteString& CFX_ByteString::operator=(const CFX_BinaryBuf& buf)
Load(buf.GetBuffer(), buf.GetSize());
return *this;
}
-void CFX_ByteString::Load(FX_LPCBYTE buf, FX_STRSIZE len)
+void CFX_ByteString::Load(const uint8_t* buf, FX_STRSIZE len)
{
Empty();
if (len) {
@@ -204,7 +204,7 @@ void CFX_ByteString::Load(FX_LPCBYTE buf, FX_STRSIZE len)
m_pData = NULL;
}
}
-const CFX_ByteString& CFX_ByteString::operator+=(FX_LPCSTR lpsz)
+const CFX_ByteString& CFX_ByteString::operator+=(const FX_CHAR* lpsz)
{
if (lpsz) {
ConcatInPlace(FXSYS_strlen(lpsz), lpsz);
@@ -280,8 +280,8 @@ bool CFX_ByteString::EqualNoCase(FX_BSTR str) const
if (m_pData->m_nDataLength != len) {
return false;
}
- FX_LPCBYTE pThis = (FX_LPCBYTE)m_pData->m_String;
- FX_LPCBYTE pThat = str.GetPtr();
+ const uint8_t* pThis = (const uint8_t*)m_pData->m_String;
+ const uint8_t* pThat = str.GetPtr();
for (FX_STRSIZE i = 0; i < len; i ++) {
if ((*pThis) != (*pThat)) {
uint8_t bThis = *pThis;
@@ -301,7 +301,7 @@ bool CFX_ByteString::EqualNoCase(FX_BSTR str) const
}
return true;
}
-void CFX_ByteString::AssignCopy(FX_STRSIZE nSrcLen, FX_LPCSTR lpszSrcData)
+void CFX_ByteString::AssignCopy(FX_STRSIZE nSrcLen, const FX_CHAR* lpszSrcData)
{
AllocBeforeWrite(nSrcLen);
FXSYS_memcpy32(m_pData->m_String, lpszSrcData, nSrcLen);
@@ -336,7 +336,7 @@ void CFX_ByteString::ReleaseBuffer(FX_STRSIZE nNewLength)
}
CopyBeforeWrite();
if (nNewLength == -1) {
- nNewLength = FXSYS_strlen((FX_LPCSTR)m_pData->m_String);
+ nNewLength = FXSYS_strlen((const FX_CHAR*)m_pData->m_String);
}
if (nNewLength == 0) {
Empty();
@@ -351,7 +351,7 @@ void CFX_ByteString::Reserve(FX_STRSIZE len)
GetBuffer(len);
ReleaseBuffer(GetLength());
}
-FX_LPSTR CFX_ByteString::GetBuffer(FX_STRSIZE nMinBufLength)
+FX_CHAR* CFX_ByteString::GetBuffer(FX_STRSIZE nMinBufLength)
{
if (m_pData == NULL && nMinBufLength == 0) {
return NULL;
@@ -405,7 +405,7 @@ FX_STRSIZE CFX_ByteString::Delete(FX_STRSIZE nIndex, FX_STRSIZE nCount)
}
return m_pData->m_nDataLength;
}
-void CFX_ByteString::ConcatInPlace(FX_STRSIZE nSrcLen, FX_LPCSTR lpszSrcData)
+void CFX_ByteString::ConcatInPlace(FX_STRSIZE nSrcLen, const FX_CHAR* lpszSrcData)
{
if (nSrcLen == 0 || lpszSrcData == NULL) {
return;
@@ -426,8 +426,8 @@ void CFX_ByteString::ConcatInPlace(FX_STRSIZE nSrcLen, FX_LPCSTR lpszSrcData)
m_pData->m_String[m_pData->m_nDataLength] = 0;
}
}
-void CFX_ByteString::ConcatCopy(FX_STRSIZE nSrc1Len, FX_LPCSTR lpszSrc1Data,
- FX_STRSIZE nSrc2Len, FX_LPCSTR lpszSrc2Data)
+void CFX_ByteString::ConcatCopy(FX_STRSIZE nSrc1Len, const FX_CHAR* lpszSrc1Data,
+ FX_STRSIZE nSrc2Len, const FX_CHAR* lpszSrc2Data)
{
int nNewLen = nSrc1Len + nSrc2Len;
if (nNewLen <= 0) {
@@ -486,7 +486,7 @@ void CFX_ByteString::AllocCopy(CFX_ByteString& dest, FX_STRSIZE nCopyLen, FX_STR
#define FORCE_ANSI 0x10000
#define FORCE_UNICODE 0x20000
#define FORCE_INT64 0x40000
-void CFX_ByteString::FormatV(FX_LPCSTR lpszFormat, va_list argList)
+void CFX_ByteString::FormatV(const FX_CHAR* lpszFormat, va_list argList)
{
va_list argListSave;
#if defined(__ARMCC_VERSION) || (!defined(_MSC_VER) && (_FX_CPU_ == _FX_X64_ || _FX_CPU_ == _FX_IA64_ || _FX_CPU_ == _FX_ARM64_)) || defined(__native_client__)
@@ -495,7 +495,7 @@ void CFX_ByteString::FormatV(FX_LPCSTR lpszFormat, va_list argList)
argListSave = argList;
#endif
int nMaxLen = 0;
- for (FX_LPCSTR lpsz = lpszFormat; *lpsz != 0; lpsz ++) {
+ for (const FX_CHAR* lpsz = lpszFormat; *lpsz != 0; lpsz ++) {
if (*lpsz != '%' || *(lpsz = lpsz + 1) == '%') {
nMaxLen += FXSYS_strlen(lpsz);
continue;
@@ -579,7 +579,7 @@ void CFX_ByteString::FormatV(FX_LPCSTR lpszFormat, va_list argList)
va_arg(argList, int);
break;
case 's': {
- FX_LPCSTR pstrNextArg = va_arg(argList, FX_LPCSTR);
+ const FX_CHAR* pstrNextArg = va_arg(argList, const FX_CHAR*);
if (pstrNextArg == NULL) {
nItemLen = 6;
} else {
@@ -591,7 +591,7 @@ void CFX_ByteString::FormatV(FX_LPCSTR lpszFormat, va_list argList)
}
break;
case 'S': {
- FX_LPWSTR pstrNextArg = va_arg(argList, FX_LPWSTR);
+ FX_WCHAR* pstrNextArg = va_arg(argList, FX_WCHAR*);
if (pstrNextArg == NULL) {
nItemLen = 6;
} else {
@@ -604,7 +604,7 @@ void CFX_ByteString::FormatV(FX_LPCSTR lpszFormat, va_list argList)
break;
case 's'|FORCE_ANSI:
case 'S'|FORCE_ANSI: {
- FX_LPCSTR pstrNextArg = va_arg(argList, FX_LPCSTR);
+ const FX_CHAR* pstrNextArg = va_arg(argList, const FX_CHAR*);
if (pstrNextArg == NULL) {
nItemLen = 6;
} else {
@@ -617,7 +617,7 @@ void CFX_ByteString::FormatV(FX_LPCSTR lpszFormat, va_list argList)
break;
case 's'|FORCE_UNICODE:
case 'S'|FORCE_UNICODE: {
- FX_LPWSTR pstrNextArg = va_arg(argList, FX_LPWSTR);
+ FX_WCHAR* pstrNextArg = va_arg(argList, FX_WCHAR*);
if (pstrNextArg == NULL) {
nItemLen = 6;
} else {
@@ -700,7 +700,7 @@ void CFX_ByteString::FormatV(FX_LPCSTR lpszFormat, va_list argList)
}
va_end(argListSave);
}
-void CFX_ByteString::Format(FX_LPCSTR lpszFormat, ...)
+void CFX_ByteString::Format(const FX_CHAR* lpszFormat, ...)
{
va_list argList;
va_start(argList, lpszFormat);
@@ -720,7 +720,7 @@ FX_STRSIZE CFX_ByteString::Insert(FX_STRSIZE nIndex, FX_CHAR ch)
nNewLength++;
if (m_pData == NULL || m_pData->m_nAllocLength < nNewLength) {
StringData* pOldData = m_pData;
- FX_LPCSTR pstr = m_pData->m_String;
+ const FX_CHAR* pstr = m_pData->m_String;
m_pData = StringData::Create(nNewLength);
if (!m_pData) {
return 0;
@@ -777,7 +777,7 @@ FX_STRSIZE CFX_ByteString::Find(FX_CHAR ch, FX_STRSIZE nStart) const
if (nStart >= nLength) {
return -1;
}
- FX_LPCSTR lpsz = FXSYS_strchr(m_pData->m_String + nStart, ch);
+ const FX_CHAR* lpsz = FXSYS_strchr(m_pData->m_String + nStart, ch);
return (lpsz == NULL) ? -1 : (int)(lpsz - m_pData->m_String);
}
FX_STRSIZE CFX_ByteString::ReverseFind(FX_CHAR ch) const
@@ -794,12 +794,12 @@ FX_STRSIZE CFX_ByteString::ReverseFind(FX_CHAR ch) const
}
return -1;
}
-FX_LPCSTR FX_strstr(FX_LPCSTR str1, int len1, FX_LPCSTR str2, int len2)
+const FX_CHAR* FX_strstr(const FX_CHAR* str1, int len1, const FX_CHAR* str2, int len2)
{
if (len2 > len1 || len2 == 0) {
return NULL;
}
- FX_LPCSTR end_ptr = str1 + len1 - len2;
+ const FX_CHAR* end_ptr = str1 + len1 - len2;
while (str1 <= end_ptr) {
int i = 0;
while (1) {
@@ -824,7 +824,7 @@ FX_STRSIZE CFX_ByteString::Find(FX_BSTR lpszSub, FX_STRSIZE nStart) const
if (nStart > nLength) {
return -1;
}
- FX_LPCSTR lpsz = FX_strstr(m_pData->m_String + nStart, m_pData->m_nDataLength - nStart,
+ const FX_CHAR* lpsz = FX_strstr(m_pData->m_String + nStart, m_pData->m_nDataLength - nStart,
lpszSub.GetCStr(), lpszSub.GetLength());
return (lpsz == NULL) ? -1 : (int)(lpsz - m_pData->m_String);
}
@@ -859,9 +859,9 @@ FX_STRSIZE CFX_ByteString::Remove(FX_CHAR chRemove)
if (GetLength() < 1) {
return 0;
}
- FX_LPSTR pstrSource = m_pData->m_String;
- FX_LPSTR pstrDest = m_pData->m_String;
- FX_LPSTR pstrEnd = m_pData->m_String + m_pData->m_nDataLength;
+ FX_CHAR* pstrSource = m_pData->m_String;
+ FX_CHAR* pstrDest = m_pData->m_String;
+ FX_CHAR* pstrEnd = m_pData->m_String + m_pData->m_nDataLength;
while (pstrSource < pstrEnd) {
if (*pstrSource != chRemove) {
*pstrDest = *pstrSource;
@@ -885,10 +885,10 @@ FX_STRSIZE CFX_ByteString::Replace(FX_BSTR lpszOld, FX_BSTR lpszNew)
FX_STRSIZE nSourceLen = lpszOld.GetLength();
FX_STRSIZE nReplacementLen = lpszNew.GetLength();
FX_STRSIZE nCount = 0;
- FX_LPCSTR pStart = m_pData->m_String;
- FX_LPSTR pEnd = m_pData->m_String + m_pData->m_nDataLength;
+ const FX_CHAR* pStart = m_pData->m_String;
+ FX_CHAR* pEnd = m_pData->m_String + m_pData->m_nDataLength;
while (1) {
- FX_LPCSTR pTarget = FX_strstr(pStart, (FX_STRSIZE)(pEnd - pStart), lpszOld.GetCStr(), nSourceLen);
+ const FX_CHAR* pTarget = FX_strstr(pStart, (FX_STRSIZE)(pEnd - pStart), lpszOld.GetCStr(), nSourceLen);
if (pTarget == NULL) {
break;
}
@@ -908,9 +908,9 @@ FX_STRSIZE CFX_ByteString::Replace(FX_BSTR lpszOld, FX_BSTR lpszNew)
return 0;
}
pStart = m_pData->m_String;
- FX_LPSTR pDest = pNewData->m_String;
+ FX_CHAR* pDest = pNewData->m_String;
for (FX_STRSIZE i = 0; i < nCount; i ++) {
- FX_LPCSTR pTarget = FX_strstr(pStart, (FX_STRSIZE)(pEnd - pStart), lpszOld.GetCStr(), nSourceLen);
+ const FX_CHAR* pTarget = FX_strstr(pStart, (FX_STRSIZE)(pEnd - pStart), lpszOld.GetCStr(), nSourceLen);
FXSYS_memcpy32(pDest, pStart, pTarget - pStart);
pDest += pTarget - pStart;
FXSYS_memcpy32(pDest, lpszNew.GetCStr(), lpszNew.GetLength());
@@ -940,7 +940,7 @@ CFX_WideString CFX_ByteString::UTF8Decode() const
}
return decoder.GetResult();
}
-CFX_ByteString CFX_ByteString::FromUnicode(FX_LPCWSTR str, FX_STRSIZE len)
+CFX_ByteString CFX_ByteString::FromUnicode(const FX_WCHAR* str, FX_STRSIZE len)
{
if (len < 0) {
len = FXSYS_wcslen(str);
@@ -1078,7 +1078,7 @@ FX_DWORD CFX_ByteStringC::GetID(FX_STRSIZE start_pos) const
}
return strid;
}
-FX_STRSIZE FX_ftoa(FX_FLOAT d, FX_LPSTR buf)
+FX_STRSIZE FX_ftoa(FX_FLOAT d, FX_CHAR* buf)
{
buf[0] = '0';
buf[1] = '\0';
diff --git a/core/src/fxcrt/fx_basic_bstring_unittest.cpp b/core/src/fxcrt/fx_basic_bstring_unittest.cpp
index bcdd33b8b8..9d8f376544 100644
--- a/core/src/fxcrt/fx_basic_bstring_unittest.cpp
+++ b/core/src/fxcrt/fx_basic_bstring_unittest.cpp
@@ -278,7 +278,7 @@ TEST(fxcrt, ByteStringCNull) {
EXPECT_EQ(null_string, assigned_null_string);
CFX_ByteStringC assigned_nullptr_string("initially not NULL");
- assigned_nullptr_string = (FX_LPCSTR)nullptr;
+ assigned_nullptr_string = (const FX_CHAR*)nullptr;
EXPECT_EQ(assigned_nullptr_string.GetPtr(), nullptr);
EXPECT_EQ(assigned_nullptr_string.GetLength(), 0);
EXPECT_TRUE(assigned_nullptr_string.IsEmpty());
diff --git a/core/src/fxcrt/fx_basic_buffer.cpp b/core/src/fxcrt/fx_basic_buffer.cpp
index 7d45a43128..f56c4299cc 100644
--- a/core/src/fxcrt/fx_basic_buffer.cpp
+++ b/core/src/fxcrt/fx_basic_buffer.cpp
@@ -5,7 +5,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../../include/fxcrt/fx_basic.h"
-FX_STRSIZE FX_ftoa(FX_FLOAT f, FX_LPSTR buf);
+FX_STRSIZE FX_ftoa(FX_FLOAT f, FX_CHAR* buf);
CFX_BinaryBuf::CFX_BinaryBuf()
: m_AllocStep(0)
, m_pBuffer(NULL)
@@ -50,7 +50,7 @@ void CFX_BinaryBuf::AttachData(void* buffer, FX_STRSIZE size)
FX_Free(m_pBuffer);
}
m_DataSize = size;
- m_pBuffer = (FX_LPBYTE)buffer;
+ m_pBuffer = (uint8_t*)buffer;
m_AllocSize = size;
}
void CFX_BinaryBuf::TakeOver(CFX_BinaryBuf& other)
@@ -82,7 +82,7 @@ void CFX_BinaryBuf::ExpandBuf(FX_STRSIZE add_size)
alloc_step = m_AllocStep;
}
new_size = (new_size + alloc_step - 1) / alloc_step * alloc_step;
- FX_LPBYTE pNewBuffer = m_pBuffer;
+ uint8_t* pNewBuffer = m_pBuffer;
if (pNewBuffer) {
pNewBuffer = FX_Realloc(uint8_t, m_pBuffer, new_size);
} else {
@@ -202,7 +202,7 @@ CFX_WideTextBuf& CFX_WideTextBuf::operator << (int i)
ExpandBuf(len * sizeof(FX_WCHAR));
}
ASSERT(m_pBuffer != NULL);
- FX_LPWSTR str = (FX_WCHAR*)(m_pBuffer + m_DataSize);
+ FX_WCHAR* str = (FX_WCHAR*)(m_pBuffer + m_DataSize);
for (FX_STRSIZE j = 0; j < len; j ++) {
*str ++ = buf[j];
}
@@ -217,14 +217,14 @@ CFX_WideTextBuf& CFX_WideTextBuf::operator << (double f)
ExpandBuf(len * sizeof(FX_WCHAR));
}
ASSERT(m_pBuffer != NULL);
- FX_LPWSTR str = (FX_WCHAR*)(m_pBuffer + m_DataSize);
+ FX_WCHAR* str = (FX_WCHAR*)(m_pBuffer + m_DataSize);
for (FX_STRSIZE i = 0; i < len; i ++) {
*str ++ = buf[i];
}
m_DataSize += len * sizeof(FX_WCHAR);
return *this;
}
-CFX_WideTextBuf& CFX_WideTextBuf::operator << (FX_LPCWSTR lpsz)
+CFX_WideTextBuf& CFX_WideTextBuf::operator << (const FX_WCHAR* lpsz)
{
AppendBlock(lpsz, FXSYS_wcslen(lpsz)*sizeof(FX_WCHAR));
return *this;
@@ -240,7 +240,7 @@ void CFX_WideTextBuf::operator =(FX_WSTR str)
}
CFX_WideStringC CFX_WideTextBuf::GetWideString() const
{
- return CFX_WideStringC((FX_LPCWSTR)m_pBuffer, m_DataSize / sizeof(FX_WCHAR));
+ return CFX_WideStringC((const FX_WCHAR*)m_pBuffer, m_DataSize / sizeof(FX_WCHAR));
}
CFX_ArchiveSaver& CFX_ArchiveSaver::operator << (uint8_t i)
{
@@ -290,7 +290,7 @@ CFX_ArchiveSaver& CFX_ArchiveSaver::operator << (FX_BSTR bstr)
}
return *this;
}
-CFX_ArchiveSaver& CFX_ArchiveSaver::operator << (FX_LPCWSTR wstr)
+CFX_ArchiveSaver& CFX_ArchiveSaver::operator << (const FX_WCHAR* wstr)
{
FX_STRSIZE len = FXSYS_wcslen(wstr);
if (m_pStream) {
@@ -315,7 +315,7 @@ void CFX_ArchiveSaver::Write(const void* pData, FX_STRSIZE dwSize)
m_SavingBuf.AppendBlock(pData, dwSize);
}
}
-CFX_ArchiveLoader::CFX_ArchiveLoader(FX_LPCBYTE pData, FX_DWORD dwSize)
+CFX_ArchiveLoader::CFX_ArchiveLoader(const uint8_t* pData, FX_DWORD dwSize)
{
m_pLoadingBuf = pData;
m_LoadingPos = 0;
@@ -359,7 +359,7 @@ CFX_ArchiveLoader& CFX_ArchiveLoader::operator >> (CFX_ByteString& str)
if (len <= 0 || m_LoadingPos + len > m_LoadingSize) {
return *this;
}
- FX_LPSTR buffer = str.GetBuffer(len);
+ FX_CHAR* buffer = str.GetBuffer(len);
FXSYS_memcpy32(buffer, m_pLoadingBuf + m_LoadingPos, len);
str.ReleaseBuffer(len);
m_LoadingPos += len;
@@ -381,7 +381,7 @@ FX_BOOL CFX_ArchiveLoader::Read(void* pBuf, FX_DWORD dwSize)
m_LoadingPos += dwSize;
return TRUE;
}
-void CFX_BitStream::Init(FX_LPCBYTE pData, FX_DWORD dwSize)
+void CFX_BitStream::Init(const uint8_t* pData, FX_DWORD dwSize)
{
m_pData = pData;
m_BitSize = dwSize * 8;
@@ -455,7 +455,7 @@ int32_t IFX_BufferArchive::AppendBlock(const void* pBuf, size_t size)
if (!m_pBuffer) {
m_pBuffer = FX_Alloc(uint8_t, m_BufSize);
}
- FX_LPBYTE buffer = (FX_LPBYTE)pBuf;
+ uint8_t* buffer = (uint8_t*)pBuf;
FX_STRSIZE temp_size = (FX_STRSIZE)size;
while (temp_size > 0) {
FX_STRSIZE buf_size = FX_MIN(m_BufSize - m_Length, (FX_STRSIZE)temp_size);
@@ -516,7 +516,7 @@ FX_BOOL CFX_FileBufferArchive::AttachFile(IFX_StreamWrite *pFile, FX_BOOL bTakeo
m_bTakeover = bTakeover;
return TRUE;
}
-FX_BOOL CFX_FileBufferArchive::AttachFile(FX_LPCWSTR filename)
+FX_BOOL CFX_FileBufferArchive::AttachFile(const FX_WCHAR* filename)
{
if (!filename) {
return FALSE;
@@ -531,7 +531,7 @@ FX_BOOL CFX_FileBufferArchive::AttachFile(FX_LPCWSTR filename)
m_bTakeover = TRUE;
return TRUE;
}
-FX_BOOL CFX_FileBufferArchive::AttachFile(FX_LPCSTR filename)
+FX_BOOL CFX_FileBufferArchive::AttachFile(const FX_CHAR* filename)
{
if (!filename) {
return FALSE;
diff --git a/core/src/fxcrt/fx_basic_gcc.cpp b/core/src/fxcrt/fx_basic_gcc.cpp
index caa99926a6..02a336af75 100644
--- a/core/src/fxcrt/fx_basic_gcc.cpp
+++ b/core/src/fxcrt/fx_basic_gcc.cpp
@@ -58,29 +58,29 @@ STR_T FXSYS_IntToStr(T value, STR_T string, int radix)
#ifdef __cplusplus
extern "C" {
#endif
-int32_t FXSYS_atoi(FX_LPCSTR str)
+int32_t FXSYS_atoi(const FX_CHAR* str)
{
- return FXSYS_StrToInt<int32_t, FX_LPCSTR>(str);
+ return FXSYS_StrToInt<int32_t, const FX_CHAR*>(str);
}
-int32_t FXSYS_wtoi(FX_LPCWSTR str)
+int32_t FXSYS_wtoi(const FX_WCHAR* str)
{
- return FXSYS_StrToInt<int32_t, FX_LPCWSTR>(str);
+ return FXSYS_StrToInt<int32_t, const FX_WCHAR*>(str);
}
-int64_t FXSYS_atoi64(FX_LPCSTR str)
+int64_t FXSYS_atoi64(const FX_CHAR* str)
{
- return FXSYS_StrToInt<int64_t, FX_LPCSTR>(str);
+ return FXSYS_StrToInt<int64_t, const FX_CHAR*>(str);
}
-int64_t FXSYS_wtoi64(FX_LPCWSTR str)
+int64_t FXSYS_wtoi64(const FX_WCHAR* str)
{
- return FXSYS_StrToInt<int64_t, FX_LPCWSTR>(str);
+ return FXSYS_StrToInt<int64_t, const FX_WCHAR*>(str);
}
-FX_LPCSTR FXSYS_i64toa(int64_t value, FX_LPSTR str, int radix)
+const FX_CHAR* FXSYS_i64toa(int64_t value, FX_CHAR* str, int radix)
{
- return FXSYS_IntToStr<int64_t, FX_LPSTR>(value, str, radix);
+ return FXSYS_IntToStr<int64_t, FX_CHAR*>(value, str, radix);
}
-FX_LPCWSTR FXSYS_i64tow(int64_t value, FX_LPWSTR str, int radix)
+const FX_WCHAR* FXSYS_i64tow(int64_t value, FX_WCHAR* str, int radix)
{
- return FXSYS_IntToStr<int64_t, FX_LPWSTR>(value, str, radix);
+ return FXSYS_IntToStr<int64_t, FX_WCHAR*>(value, str, radix);
}
#ifdef __cplusplus
}
@@ -93,7 +93,7 @@ int FXSYS_GetACP()
{
return 0;
}
-FX_DWORD FXSYS_GetFullPathName(FX_LPCSTR filename, FX_DWORD buflen, FX_LPSTR buf, FX_LPSTR* filepart)
+FX_DWORD FXSYS_GetFullPathName(const FX_CHAR* filename, FX_DWORD buflen, FX_CHAR* buf, FX_CHAR** filepart)
{
int srclen = FXSYS_strlen(filename);
if (buf == NULL || (int)buflen < srclen + 1) {
@@ -102,7 +102,7 @@ FX_DWORD FXSYS_GetFullPathName(FX_LPCSTR filename, FX_DWORD buflen, FX_LPSTR buf
FXSYS_strcpy(buf, filename);
return srclen;
}
-FX_DWORD FXSYS_GetModuleFileName(FX_LPVOID hModule, char* buf, FX_DWORD bufsize)
+FX_DWORD FXSYS_GetModuleFileName(void* hModule, char* buf, FX_DWORD bufsize)
{
return (FX_DWORD) - 1;
}
@@ -114,7 +114,7 @@ FX_DWORD FXSYS_GetModuleFileName(FX_LPVOID hModule, char* buf, FX_DWORD bufsize)
#ifdef __cplusplus
extern "C" {
#endif
-FXSYS_FILE* FXSYS_wfopen(FX_LPCWSTR filename, FX_LPCWSTR mode)
+FXSYS_FILE* FXSYS_wfopen(const FX_WCHAR* filename, const FX_WCHAR* mode)
{
return FXSYS_fopen(CFX_ByteString::FromUnicode(filename), CFX_ByteString::FromUnicode(mode));
}
@@ -194,7 +194,7 @@ int FXSYS_wcsicmp(const FX_WCHAR *dst, const FX_WCHAR *src)
}
char* FXSYS_itoa(int value, char* string, int radix)
{
- return FXSYS_IntToStr<int32_t, FX_LPSTR>(value, string, radix);
+ return FXSYS_IntToStr<int32_t, FX_CHAR*>(value, string, radix);
}
#ifdef __cplusplus
}
@@ -204,8 +204,8 @@ char* FXSYS_itoa(int value, char* string, int radix)
#ifdef __cplusplus
extern "C" {
#endif
-int FXSYS_WideCharToMultiByte(FX_DWORD codepage, FX_DWORD dwFlags, FX_LPCWSTR wstr, int wlen,
- FX_LPSTR buf, int buflen, FX_LPCSTR default_str, FX_BOOL* pUseDefault)
+int FXSYS_WideCharToMultiByte(FX_DWORD codepage, FX_DWORD dwFlags, const FX_WCHAR* wstr, int wlen,
+ FX_CHAR* buf, int buflen, const FX_CHAR* default_str, FX_BOOL* pUseDefault)
{
int len = 0;
for (int i = 0; i < wlen; i ++) {
@@ -218,8 +218,8 @@ int FXSYS_WideCharToMultiByte(FX_DWORD codepage, FX_DWORD dwFlags, FX_LPCWSTR ws
}
return len;
}
-int FXSYS_MultiByteToWideChar(FX_DWORD codepage, FX_DWORD dwFlags, FX_LPCSTR bstr, int blen,
- FX_LPWSTR buf, int buflen)
+int FXSYS_MultiByteToWideChar(FX_DWORD codepage, FX_DWORD dwFlags, const FX_CHAR* bstr, int blen,
+ FX_WCHAR* buf, int buflen)
{
int wlen = 0;
for (int i = 0; i < blen; i ++) {
diff --git a/core/src/fxcrt/fx_basic_maps.cpp b/core/src/fxcrt/fx_basic_maps.cpp
index c0c394583e..7df4cdb8ed 100644
--- a/core/src/fxcrt/fx_basic_maps.cpp
+++ b/core/src/fxcrt/fx_basic_maps.cpp
@@ -238,7 +238,7 @@ void CFX_MapByteStringToPtr::GetNextAssoc(FX_POSITION& rNextPosition,
rKey = pAssocRet->key;
rValue = pAssocRet->value;
}
-FX_LPVOID CFX_MapByteStringToPtr::GetNextValue(FX_POSITION& rNextPosition) const
+void* CFX_MapByteStringToPtr::GetNextValue(FX_POSITION& rNextPosition) const
{
ASSERT(m_pHashTable != NULL);
CAssoc* pAssocRet = (CAssoc*)rNextPosition;
@@ -352,7 +352,7 @@ inline FX_DWORD CFX_MapByteStringToPtr::HashKey(FX_BSTR key) const
{
FX_DWORD nHash = 0;
int len = key.GetLength();
- FX_LPCBYTE buf = key.GetPtr();
+ const uint8_t* buf = key.GetPtr();
for (int i = 0; i < len; i ++) {
nHash = (nHash << 5) + nHash + buf[i];
}
@@ -381,7 +381,7 @@ struct _CompactString {
uint8_t m_LenHigh;
uint8_t m_LenLow;
uint8_t m_Unused;
- FX_LPBYTE m_pBuffer;
+ uint8_t* m_pBuffer;
};
static void _CompactStringRelease(_CompactString* pCompact)
{
@@ -389,7 +389,7 @@ static void _CompactStringRelease(_CompactString* pCompact)
FX_Free(pCompact->m_pBuffer);
}
}
-static FX_BOOL _CompactStringSame(_CompactString* pCompact, FX_LPCBYTE pStr, int len)
+static FX_BOOL _CompactStringSame(_CompactString* pCompact, const uint8_t* pStr, int len)
{
if (len < sizeof(_CompactString)) {
if (pCompact->m_CompactLen != len) {
@@ -402,7 +402,7 @@ static FX_BOOL _CompactStringSame(_CompactString* pCompact, FX_LPCBYTE pStr, int
}
return FXSYS_memcmp32(pCompact->m_pBuffer, pStr, len) == 0;
}
-static void _CompactStringStore(_CompactString* pCompact, FX_LPCBYTE pStr, int len)
+static void _CompactStringStore(_CompactString* pCompact, const uint8_t* pStr, int len)
{
if (len < (int)sizeof(_CompactString)) {
pCompact->m_CompactLen = (uint8_t)len;
@@ -475,14 +475,14 @@ void CFX_CMapByteStringToPtr::GetNextAssoc(FX_POSITION& rNextPosition, CFX_ByteS
}
rNextPosition = NULL;
}
-FX_LPVOID CFX_CMapByteStringToPtr::GetNextValue(FX_POSITION& rNextPosition) const
+void* CFX_CMapByteStringToPtr::GetNextValue(FX_POSITION& rNextPosition) const
{
if (rNextPosition == NULL) {
return NULL;
}
int index = (int)(uintptr_t)rNextPosition - 1;
_CompactString* pKey = (_CompactString*)m_Buffer.GetAt(index);
- FX_LPVOID rValue = *(void**)(pKey + 1);
+ void* rValue = *(void**)(pKey + 1);
index ++;
int size = m_Buffer.GetSize();
while (index < size) {
@@ -580,7 +580,7 @@ struct _DWordPair {
};
FX_BOOL CFX_CMapDWordToDWord::Lookup(FX_DWORD key, FX_DWORD& value) const
{
- FX_LPVOID pResult = FXSYS_bsearch(&key, m_Buffer.GetBuffer(), m_Buffer.GetSize() / sizeof(_DWordPair),
+ void* pResult = FXSYS_bsearch(&key, m_Buffer.GetBuffer(), m_Buffer.GetSize() / sizeof(_DWordPair),
sizeof(_DWordPair), _CompareDWord);
if (pResult == NULL) {
return FALSE;
diff --git a/core/src/fxcrt/fx_basic_memmgr.cpp b/core/src/fxcrt/fx_basic_memmgr.cpp
index a381fa4ef5..2ae9075f04 100644
--- a/core/src/fxcrt/fx_basic_memmgr.cpp
+++ b/core/src/fxcrt/fx_basic_memmgr.cpp
@@ -56,7 +56,7 @@ void* CFX_GrowOnlyPool::Alloc(size_t size)
_FX_GrowOnlyTrunk* pTrunk = (_FX_GrowOnlyTrunk*)m_pFirstTrunk;
while (pTrunk) {
if (pTrunk->m_Size - pTrunk->m_Allocated >= size) {
- void* p = (FX_LPBYTE)(pTrunk + 1) + pTrunk->m_Allocated;
+ void* p = (uint8_t*)(pTrunk + 1) + pTrunk->m_Allocated;
pTrunk->m_Allocated += size;
return p;
}
diff --git a/core/src/fxcrt/fx_basic_utf.cpp b/core/src/fxcrt/fx_basic_utf.cpp
index 1422b7abd4..5413ead0d5 100644
--- a/core/src/fxcrt/fx_basic_utf.cpp
+++ b/core/src/fxcrt/fx_basic_utf.cpp
@@ -76,7 +76,7 @@ void CFX_UTF8Encoder::Input(FX_WCHAR unicode)
}
}
}
-CFX_ByteString FX_UTF8Encode(FX_LPCWSTR pwsStr, FX_STRSIZE len)
+CFX_ByteString FX_UTF8Encode(const FX_WCHAR* pwsStr, FX_STRSIZE len)
{
FXSYS_assert(pwsStr != NULL);
if (len < 0) {
diff --git a/core/src/fxcrt/fx_basic_util.cpp b/core/src/fxcrt/fx_basic_util.cpp
index 615b297421..5870baa020 100644
--- a/core/src/fxcrt/fx_basic_util.cpp
+++ b/core/src/fxcrt/fx_basic_util.cpp
@@ -26,7 +26,7 @@ void FX_PRIVATEDATA::FreeData()
m_pCallback(m_pData);
}
}
-void CFX_PrivateData::AddData(FX_LPVOID pModuleId, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback, FX_BOOL bSelfDestruct)
+void CFX_PrivateData::AddData(void* pModuleId, void* pData, PD_CALLBACK_FREEDATA callback, FX_BOOL bSelfDestruct)
{
if (pModuleId == NULL) {
return;
@@ -44,15 +44,15 @@ void CFX_PrivateData::AddData(FX_LPVOID pModuleId, FX_LPVOID pData, PD_CALLBACK_
FX_PRIVATEDATA data = {pModuleId, pData, callback, bSelfDestruct};
m_DataList.Add(data);
}
-void CFX_PrivateData::SetPrivateData(FX_LPVOID pModuleId, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback)
+void CFX_PrivateData::SetPrivateData(void* pModuleId, void* pData, PD_CALLBACK_FREEDATA callback)
{
AddData(pModuleId, pData, callback, FALSE);
}
-void CFX_PrivateData::SetPrivateObj(FX_LPVOID pModuleId, CFX_DestructObject* pObj)
+void CFX_PrivateData::SetPrivateObj(void* pModuleId, CFX_DestructObject* pObj)
{
AddData(pModuleId, pObj, NULL, TRUE);
}
-FX_BOOL CFX_PrivateData::RemovePrivateData(FX_LPVOID pModuleId)
+FX_BOOL CFX_PrivateData::RemovePrivateData(void* pModuleId)
{
if (pModuleId == NULL) {
return FALSE;
@@ -67,7 +67,7 @@ FX_BOOL CFX_PrivateData::RemovePrivateData(FX_LPVOID pModuleId)
}
return FALSE;
}
-FX_LPVOID CFX_PrivateData::GetPrivateData(FX_LPVOID pModuleId)
+void* CFX_PrivateData::GetPrivateData(void* pModuleId)
{
if (pModuleId == NULL) {
return NULL;
@@ -95,7 +95,7 @@ void FX_atonum(FX_BSTR strc, FX_BOOL& bInteger, void* pData)
if (FXSYS_memchr(strc.GetPtr(), '.', strc.GetLength()) == NULL) {
bInteger = TRUE;
int cc = 0, integer = 0;
- FX_LPCSTR str = strc.GetCStr();
+ const FX_CHAR* str = strc.GetCStr();
int len = strc.GetLength();
FX_BOOL bNegative = FALSE;
if (str[0] == '+') {
@@ -130,7 +130,7 @@ FX_FLOAT FX_atof(FX_BSTR strc)
}
int cc = 0;
FX_BOOL bNegative = FALSE;
- FX_LPCSTR str = strc.GetCStr();
+ const FX_CHAR* str = strc.GetCStr();
int len = strc.GetLength();
if (str[0] == '+') {
cc++;
@@ -314,7 +314,7 @@ public:
WIN32_FIND_DATAW m_FindData;
};
#endif
-void* FX_OpenFolder(FX_LPCSTR path)
+void* FX_OpenFolder(const FX_CHAR* path)
{
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
#ifndef _WIN32_WCE
@@ -345,7 +345,7 @@ void* FX_OpenFolder(FX_LPCSTR path)
return dir;
#endif
}
-void* FX_OpenFolder(FX_LPCWSTR path)
+void* FX_OpenFolder(const FX_WCHAR* path)
{
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
CFindFileDataW* pData = FX_NEW CFindFileDataW;
diff --git a/core/src/fxcrt/fx_basic_wstring.cpp b/core/src/fxcrt/fx_basic_wstring.cpp
index aeb366338e..1108a3ca52 100644
--- a/core/src/fxcrt/fx_basic_wstring.cpp
+++ b/core/src/fxcrt/fx_basic_wstring.cpp
@@ -56,7 +56,7 @@ CFX_WideString::CFX_WideString(const CFX_WideString& stringSrc)
*this = stringSrc;
}
}
-CFX_WideString::CFX_WideString(FX_LPCWSTR lpsz, FX_STRSIZE nLen) {
+CFX_WideString::CFX_WideString(const FX_WCHAR* lpsz, FX_STRSIZE nLen) {
if (nLen < 0) {
nLen = lpsz ? FXSYS_wcslen(lpsz) : 0;
}
@@ -117,7 +117,7 @@ void CFX_WideString::ReleaseBuffer(FX_STRSIZE nNewLength)
m_pData->m_nDataLength = nNewLength;
m_pData->m_String[nNewLength] = 0;
}
-const CFX_WideString& CFX_WideString::operator=(FX_LPCWSTR lpsz)
+const CFX_WideString& CFX_WideString::operator=(const FX_WCHAR* lpsz)
{
if (lpsz == NULL || lpsz[0] == 0) {
Empty();
@@ -159,7 +159,7 @@ const CFX_WideString& CFX_WideString::operator+=(FX_WCHAR ch)
ConcatInPlace(1, &ch);
return *this;
}
-const CFX_WideString& CFX_WideString::operator+=(FX_LPCWSTR lpsz)
+const CFX_WideString& CFX_WideString::operator+=(const FX_WCHAR* lpsz)
{
if (lpsz) {
ConcatInPlace(FXSYS_wcslen(lpsz), lpsz);
@@ -221,7 +221,7 @@ void CFX_WideString::Empty()
m_pData = NULL;
}
}
-void CFX_WideString::ConcatInPlace(FX_STRSIZE nSrcLen, FX_LPCWSTR lpszSrcData)
+void CFX_WideString::ConcatInPlace(FX_STRSIZE nSrcLen, const FX_WCHAR* lpszSrcData)
{
if (nSrcLen == 0 || lpszSrcData == NULL) {
return;
@@ -241,8 +241,8 @@ void CFX_WideString::ConcatInPlace(FX_STRSIZE nSrcLen, FX_LPCWSTR lpszSrcData)
m_pData->m_String[m_pData->m_nDataLength] = 0;
}
}
-void CFX_WideString::ConcatCopy(FX_STRSIZE nSrc1Len, FX_LPCWSTR lpszSrc1Data,
- FX_STRSIZE nSrc2Len, FX_LPCWSTR lpszSrc2Data)
+void CFX_WideString::ConcatCopy(FX_STRSIZE nSrc1Len, const FX_WCHAR* lpszSrc1Data,
+ FX_STRSIZE nSrc2Len, const FX_WCHAR* lpszSrc2Data)
{
FX_STRSIZE nNewLen = nSrc1Len + nSrc2Len;
if (nNewLen <= 0) {
@@ -278,14 +278,14 @@ void CFX_WideString::AllocBeforeWrite(FX_STRSIZE nLen)
Empty();
m_pData = StringData::Create(nLen);
}
-void CFX_WideString::AssignCopy(FX_STRSIZE nSrcLen, FX_LPCWSTR lpszSrcData)
+void CFX_WideString::AssignCopy(FX_STRSIZE nSrcLen, const FX_WCHAR* lpszSrcData)
{
AllocBeforeWrite(nSrcLen);
FXSYS_memcpy32(m_pData->m_String, lpszSrcData, nSrcLen * sizeof(FX_WCHAR));
m_pData->m_nDataLength = nSrcLen;
m_pData->m_String[nSrcLen] = 0;
}
-int CFX_WideString::Compare(FX_LPCWSTR lpsz) const
+int CFX_WideString::Compare(const FX_WCHAR* lpsz) const
{
if (m_pData == NULL) {
return (lpsz == NULL || lpsz[0] == 0) ? 0 : -1;
@@ -303,7 +303,7 @@ CFX_ByteString CFX_WideString::UTF16LE_Encode() const
}
int len = m_pData->m_nDataLength;
CFX_ByteString result;
- FX_LPSTR buffer = result.GetBuffer(len * 2 + 2);
+ FX_CHAR* buffer = result.GetBuffer(len * 2 + 2);
for (int i = 0; i < len; i ++) {
buffer[i * 2] = m_pData->m_String[i] & 0xff;
buffer[i * 2 + 1] = m_pData->m_String[i] >> 8;
@@ -325,7 +325,7 @@ void CFX_WideString::Reserve(FX_STRSIZE len)
GetBuffer(len);
ReleaseBuffer(GetLength());
}
-FX_LPWSTR CFX_WideString::GetBuffer(FX_STRSIZE nMinBufLength)
+FX_WCHAR* CFX_WideString::GetBuffer(FX_STRSIZE nMinBufLength)
{
if (m_pData == NULL && nMinBufLength == 0) {
return NULL;
@@ -471,7 +471,7 @@ CFX_WideString CFX_WideString::Right(FX_STRSIZE nCount) const
AllocCopy(dest, nCount, m_pData->m_nDataLength - nCount);
return dest;
}
-int CFX_WideString::CompareNoCase(FX_LPCWSTR lpsz) const
+int CFX_WideString::CompareNoCase(const FX_WCHAR* lpsz) const
{
if (m_pData == NULL) {
return (lpsz == NULL || lpsz[0] == 0) ? 0 : -1;
@@ -537,13 +537,13 @@ void CFX_WideString::MakeUpper()
}
FXSYS_wcsupr(m_pData->m_String);
}
-FX_STRSIZE CFX_WideString::Find(FX_LPCWSTR lpszSub, FX_STRSIZE nStart) const
+FX_STRSIZE CFX_WideString::Find(const FX_WCHAR* lpszSub, FX_STRSIZE nStart) const
{
FX_STRSIZE nLength = GetLength();
if (nLength < 1 || nStart > nLength) {
return -1;
}
- FX_LPCWSTR lpsz = FXSYS_wcsstr(m_pData->m_String + nStart, lpszSub);
+ const FX_WCHAR* lpsz = FXSYS_wcsstr(m_pData->m_String + nStart, lpszSub);
return (lpsz == NULL) ? -1 : (int)(lpsz - m_pData->m_String);
}
FX_STRSIZE CFX_WideString::Find(FX_WCHAR ch, FX_STRSIZE nStart) const
@@ -555,10 +555,10 @@ FX_STRSIZE CFX_WideString::Find(FX_WCHAR ch, FX_STRSIZE nStart) const
if (nStart >= nLength) {
return -1;
}
- FX_LPCWSTR lpsz = FXSYS_wcschr(m_pData->m_String + nStart, ch);
+ const FX_WCHAR* lpsz = FXSYS_wcschr(m_pData->m_String + nStart, ch);
return (lpsz == NULL) ? -1 : (int)(lpsz - m_pData->m_String);
}
-void CFX_WideString::TrimRight(FX_LPCWSTR lpszTargetList)
+void CFX_WideString::TrimRight(const FX_WCHAR* lpszTargetList)
{
FXSYS_assert(lpszTargetList != NULL);
if (m_pData == NULL || *lpszTargetList == 0) {
@@ -590,7 +590,7 @@ void CFX_WideString::TrimRight()
{
TrimRight(L"\x09\x0a\x0b\x0c\x0d\x20");
}
-void CFX_WideString::TrimLeft(FX_LPCWSTR lpszTargets)
+void CFX_WideString::TrimLeft(const FX_WCHAR* lpszTargets)
{
FXSYS_assert(lpszTargets != NULL);
if (m_pData == NULL || *lpszTargets == 0) {
@@ -600,7 +600,7 @@ void CFX_WideString::TrimLeft(FX_LPCWSTR lpszTargets)
if (GetLength() < 1) {
return;
}
- FX_LPCWSTR lpsz = m_pData->m_String;
+ const FX_WCHAR* lpsz = m_pData->m_String;
while (*lpsz != 0) {
if (FXSYS_wcschr(lpszTargets, *lpsz) == NULL) {
break;
@@ -622,7 +622,7 @@ void CFX_WideString::TrimLeft()
{
TrimLeft(L"\x09\x0a\x0b\x0c\x0d\x20");
}
-FX_STRSIZE CFX_WideString::Replace(FX_LPCWSTR lpszOld, FX_LPCWSTR lpszNew)
+FX_STRSIZE CFX_WideString::Replace(const FX_WCHAR* lpszOld, const FX_WCHAR* lpszNew)
{
if (GetLength() < 1) {
return 0;
@@ -636,11 +636,11 @@ FX_STRSIZE CFX_WideString::Replace(FX_LPCWSTR lpszOld, FX_LPCWSTR lpszNew)
}
FX_STRSIZE nReplacementLen = lpszNew ? FXSYS_wcslen(lpszNew) : 0;
FX_STRSIZE nCount = 0;
- FX_LPWSTR lpszStart = m_pData->m_String;
- FX_LPWSTR lpszEnd = m_pData->m_String + m_pData->m_nDataLength;
- FX_LPWSTR lpszTarget;
+ FX_WCHAR* lpszStart = m_pData->m_String;
+ FX_WCHAR* lpszEnd = m_pData->m_String + m_pData->m_nDataLength;
+ FX_WCHAR* lpszTarget;
{
- while ((lpszTarget = (FX_LPWSTR)FXSYS_wcsstr(lpszStart, lpszOld)) != NULL && lpszStart < lpszEnd) {
+ while ((lpszTarget = (FX_WCHAR*)FXSYS_wcsstr(lpszStart, lpszOld)) != NULL && lpszStart < lpszEnd) {
nCount++;
lpszStart = lpszTarget + nSourceLen;
}
@@ -651,7 +651,7 @@ FX_STRSIZE CFX_WideString::Replace(FX_LPCWSTR lpszOld, FX_LPCWSTR lpszNew)
FX_STRSIZE nNewLength = nOldLength + (nReplacementLen - nSourceLen) * nCount;
if (m_pData->m_nAllocLength < nNewLength || m_pData->m_nRefs > 1) {
StringData* pOldData = m_pData;
- FX_LPCWSTR pstr = m_pData->m_String;
+ const FX_WCHAR* pstr = m_pData->m_String;
m_pData = StringData::Create(nNewLength);
if (!m_pData) {
return 0;
@@ -662,7 +662,7 @@ FX_STRSIZE CFX_WideString::Replace(FX_LPCWSTR lpszOld, FX_LPCWSTR lpszNew)
lpszStart = m_pData->m_String;
lpszEnd = m_pData->m_String + FX_MAX(m_pData->m_nDataLength, nNewLength);
{
- while ((lpszTarget = (FX_LPWSTR)FXSYS_wcsstr(lpszStart, lpszOld)) != NULL && lpszStart < lpszEnd) {
+ while ((lpszTarget = (FX_WCHAR*)FXSYS_wcsstr(lpszStart, lpszOld)) != NULL && lpszStart < lpszEnd) {
FX_STRSIZE nBalance = nOldLength - (FX_STRSIZE)(lpszTarget - m_pData->m_String + nSourceLen);
FXSYS_memmove32(lpszTarget + nReplacementLen, lpszTarget + nSourceLen, nBalance * sizeof(FX_WCHAR));
FXSYS_memcpy32(lpszTarget, lpszNew, nReplacementLen * sizeof(FX_WCHAR));
@@ -689,7 +689,7 @@ FX_STRSIZE CFX_WideString::Insert(FX_STRSIZE nIndex, FX_WCHAR ch)
nNewLength++;
if (m_pData == NULL || m_pData->m_nAllocLength < nNewLength) {
StringData* pOldData = m_pData;
- FX_LPCWSTR pstr = m_pData->m_String;
+ const FX_WCHAR* pstr = m_pData->m_String;
m_pData = StringData::Create(nNewLength);
if (!m_pData) {
return 0;
@@ -734,9 +734,9 @@ FX_STRSIZE CFX_WideString::Remove(FX_WCHAR chRemove)
if (GetLength() < 1) {
return 0;
}
- FX_LPWSTR pstrSource = m_pData->m_String;
- FX_LPWSTR pstrDest = m_pData->m_String;
- FX_LPWSTR pstrEnd = m_pData->m_String + m_pData->m_nDataLength;
+ FX_WCHAR* pstrSource = m_pData->m_String;
+ FX_WCHAR* pstrDest = m_pData->m_String;
+ FX_WCHAR* pstrEnd = m_pData->m_String + m_pData->m_nDataLength;
while (pstrSource < pstrEnd) {
if (*pstrSource != chRemove) {
*pstrDest = *pstrSource;
@@ -752,7 +752,7 @@ FX_STRSIZE CFX_WideString::Remove(FX_WCHAR chRemove)
#define FORCE_ANSI 0x10000
#define FORCE_UNICODE 0x20000
#define FORCE_INT64 0x40000
-void CFX_WideString::FormatV(FX_LPCWSTR lpszFormat, va_list argList)
+void CFX_WideString::FormatV(const FX_WCHAR* lpszFormat, va_list argList)
{
va_list argListSave;
#if defined(__ARMCC_VERSION) || (!defined(_MSC_VER) && (_FX_CPU_ == _FX_X64_ || _FX_CPU_ == _FX_IA64_ || _FX_CPU_ == _FX_ARM64_)) || defined(__native_client__)
@@ -761,7 +761,7 @@ void CFX_WideString::FormatV(FX_LPCWSTR lpszFormat, va_list argList)
argListSave = argList;
#endif
int nMaxLen = 0;
- for (FX_LPCWSTR lpsz = lpszFormat; *lpsz != 0; lpsz ++) {
+ for (const FX_WCHAR* lpsz = lpszFormat; *lpsz != 0; lpsz ++) {
if (*lpsz != '%' || *(lpsz = lpsz + 1) == '%') {
nMaxLen += FXSYS_wcslen(lpsz);
continue;
@@ -845,7 +845,7 @@ void CFX_WideString::FormatV(FX_LPCWSTR lpszFormat, va_list argList)
va_arg(argList, int);
break;
case 's': {
- FX_LPCWSTR pstrNextArg = va_arg(argList, FX_LPCWSTR);
+ const FX_WCHAR* pstrNextArg = va_arg(argList, const FX_WCHAR*);
if (pstrNextArg == NULL) {
nItemLen = 6;
} else {
@@ -857,7 +857,7 @@ void CFX_WideString::FormatV(FX_LPCWSTR lpszFormat, va_list argList)
}
break;
case 'S': {
- FX_LPCSTR pstrNextArg = va_arg(argList, FX_LPCSTR);
+ const FX_CHAR* pstrNextArg = va_arg(argList, const FX_CHAR*);
if (pstrNextArg == NULL) {
nItemLen = 6;
} else {
@@ -870,7 +870,7 @@ void CFX_WideString::FormatV(FX_LPCWSTR lpszFormat, va_list argList)
break;
case 's'|FORCE_ANSI:
case 'S'|FORCE_ANSI: {
- FX_LPCSTR pstrNextArg = va_arg(argList, FX_LPCSTR);
+ const FX_CHAR* pstrNextArg = va_arg(argList, const FX_CHAR*);
if (pstrNextArg == NULL) {
nItemLen = 6;
} else {
@@ -883,7 +883,7 @@ void CFX_WideString::FormatV(FX_LPCWSTR lpszFormat, va_list argList)
break;
case 's'|FORCE_UNICODE:
case 'S'|FORCE_UNICODE: {
- FX_LPWSTR pstrNextArg = va_arg(argList, FX_LPWSTR);
+ FX_WCHAR* pstrNextArg = va_arg(argList, FX_WCHAR*);
if (pstrNextArg == NULL) {
nItemLen = 6;
} else {
@@ -964,14 +964,14 @@ void CFX_WideString::FormatV(FX_LPCWSTR lpszFormat, va_list argList)
}
va_end(argListSave);
}
-void CFX_WideString::Format(FX_LPCWSTR lpszFormat, ...)
+void CFX_WideString::Format(const FX_WCHAR* lpszFormat, ...)
{
va_list argList;
va_start(argList, lpszFormat);
FormatV(lpszFormat, argList);
va_end(argList);
}
-FX_FLOAT FX_wtof(FX_LPCWSTR str, int len)
+FX_FLOAT FX_wtof(const FX_WCHAR* str, int len)
{
if (len == 0) {
return 0.0;
@@ -1028,7 +1028,7 @@ static CFX_ByteString _DefMap_GetByteString(CFX_CharMap* pCharMap, const CFX_Wid
return CFX_ByteString();
}
CFX_ByteString bytestr;
- FX_LPSTR dest_buf = bytestr.GetBuffer(dest_len);
+ FX_CHAR* dest_buf = bytestr.GetBuffer(dest_len);
FXSYS_WideCharToMultiByte(codepage, 0, widestr.c_str(), src_len, dest_buf, dest_len, NULL, NULL);
bytestr.ReleaseBuffer(dest_len);
return bytestr;
@@ -1042,7 +1042,7 @@ static CFX_WideString _DefMap_GetWideString(CFX_CharMap* pCharMap, const CFX_Byt
return CFX_WideString();
}
CFX_WideString widestr;
- FX_LPWSTR dest_buf = widestr.GetBuffer(dest_len);
+ FX_WCHAR* dest_buf = widestr.GetBuffer(dest_len);
FXSYS_MultiByteToWideChar(codepage, 0, bytestr, src_len, dest_buf, dest_len);
widestr.ReleaseBuffer(dest_len);
return widestr;
diff --git a/core/src/fxcrt/fx_extension.cpp b/core/src/fxcrt/fx_extension.cpp
index 9490f3603c..21aeffddc6 100644
--- a/core/src/fxcrt/fx_extension.cpp
+++ b/core/src/fxcrt/fx_extension.cpp
@@ -80,19 +80,19 @@ FX_BOOL FX_File_Truncate(FX_HFILE hFile, FX_FILESIZE szFile)
FXSYS_assert(hFile != NULL);
return ((IFXCRT_FileAccess*)hFile)->Truncate(szFile);
}
-IFX_FileAccess* FX_CreateDefaultFileAccess(FX_WSTR wsPath)
-{
- if (wsPath.GetLength() == 0)
- return NULL;
-
- CFX_CRTFileAccess* pFA = NULL;
- pFA = FX_NEW CFX_CRTFileAccess;
- if (NULL == pFA) return NULL;
-
- pFA->Init(wsPath);
- return pFA;
-}
-IFX_FileStream* FX_CreateFileStream(FX_LPCSTR filename, FX_DWORD dwModes)
+IFX_FileAccess* FX_CreateDefaultFileAccess(FX_WSTR wsPath)
+{
+ if (wsPath.GetLength() == 0)
+ return NULL;
+
+ CFX_CRTFileAccess* pFA = NULL;
+ pFA = FX_NEW CFX_CRTFileAccess;
+ if (NULL == pFA) return NULL;
+
+ pFA->Init(wsPath);
+ return pFA;
+}
+IFX_FileStream* FX_CreateFileStream(const FX_CHAR* filename, FX_DWORD dwModes)
{
IFXCRT_FileAccess* pFA = FXCRT_FileAccess_Create();
if (!pFA) {
@@ -104,7 +104,7 @@ IFX_FileStream* FX_CreateFileStream(FX_LPCSTR filename, FX_DWORD dwModes)
}
return FX_NEW CFX_CRTFileStream(pFA);
}
-IFX_FileStream* FX_CreateFileStream(FX_LPCWSTR filename, FX_DWORD dwModes)
+IFX_FileStream* FX_CreateFileStream(const FX_WCHAR* filename, FX_DWORD dwModes)
{
IFXCRT_FileAccess* pFA = FXCRT_FileAccess_Create();
if (!pFA) {
@@ -116,23 +116,23 @@ IFX_FileStream* FX_CreateFileStream(FX_LPCWSTR filename, FX_DWORD dwModes)
}
return FX_NEW CFX_CRTFileStream(pFA);
}
-IFX_FileWrite* FX_CreateFileWrite(FX_LPCSTR filename)
+IFX_FileWrite* FX_CreateFileWrite(const FX_CHAR* filename)
{
return FX_CreateFileStream(filename, FX_FILEMODE_Truncate);
}
-IFX_FileWrite* FX_CreateFileWrite(FX_LPCWSTR filename)
+IFX_FileWrite* FX_CreateFileWrite(const FX_WCHAR* filename)
{
return FX_CreateFileStream(filename, FX_FILEMODE_Truncate);
}
-IFX_FileRead* FX_CreateFileRead(FX_LPCSTR filename)
+IFX_FileRead* FX_CreateFileRead(const FX_CHAR* filename)
{
return FX_CreateFileStream(filename, FX_FILEMODE_ReadOnly);
}
-IFX_FileRead* FX_CreateFileRead(FX_LPCWSTR filename)
+IFX_FileRead* FX_CreateFileRead(const FX_WCHAR* filename)
{
return FX_CreateFileStream(filename, FX_FILEMODE_ReadOnly);
}
-IFX_MemoryStream* FX_CreateMemoryStream(FX_LPBYTE pBuffer, size_t dwSize, FX_BOOL bTakeOver)
+IFX_MemoryStream* FX_CreateMemoryStream(uint8_t* pBuffer, size_t dwSize, FX_BOOL bTakeOver)
{
return FX_NEW CFX_MemoryStream(pBuffer, dwSize, bTakeOver);
}
@@ -151,7 +151,7 @@ FX_FLOAT FXSYS_logb(FX_FLOAT b, FX_FLOAT x)
{
return FXSYS_log(x) / FXSYS_log(b);
}
-FX_FLOAT FXSYS_strtof(FX_LPCSTR pcsStr, int32_t iLength, int32_t *pUsedLen)
+FX_FLOAT FXSYS_strtof(const FX_CHAR* pcsStr, int32_t iLength, int32_t *pUsedLen)
{
FXSYS_assert(pcsStr != NULL);
if (iLength < 0) {
@@ -160,7 +160,7 @@ FX_FLOAT FXSYS_strtof(FX_LPCSTR pcsStr, int32_t iLength, int32_t *pUsedLen)
CFX_WideString ws = CFX_WideString::FromLocal(pcsStr, iLength);
return FXSYS_wcstof(ws.c_str(), iLength, pUsedLen);
}
-FX_FLOAT FXSYS_wcstof(FX_LPCWSTR pwsStr, int32_t iLength, int32_t *pUsedLen)
+FX_FLOAT FXSYS_wcstof(const FX_WCHAR* pwsStr, int32_t iLength, int32_t *pUsedLen)
{
FXSYS_assert(pwsStr != NULL);
if (iLength < 0) {
@@ -205,7 +205,7 @@ FX_FLOAT FXSYS_wcstof(FX_LPCWSTR pwsStr, int32_t iLength, int32_t *pUsedLen)
}
return bNegtive ? -fValue : fValue;
}
-FX_LPWSTR FXSYS_wcsncpy(FX_LPWSTR dstStr, FX_LPCWSTR srcStr, size_t count)
+FX_WCHAR* FXSYS_wcsncpy(FX_WCHAR* dstStr, const FX_WCHAR* srcStr, size_t count)
{
FXSYS_assert(dstStr != NULL && srcStr != NULL && count > 0);
for (size_t i = 0; i < count; ++i)
@@ -214,7 +214,7 @@ FX_LPWSTR FXSYS_wcsncpy(FX_LPWSTR dstStr, FX_LPCWSTR srcStr, size_t count)
}
return dstStr;
}
-int32_t FXSYS_wcsnicmp(FX_LPCWSTR s1, FX_LPCWSTR s2, size_t count)
+int32_t FXSYS_wcsnicmp(const FX_WCHAR* s1, const FX_WCHAR* s2, size_t count)
{
FXSYS_assert(s1 != NULL && s2 != NULL && count > 0);
FX_WCHAR wch1 = 0, wch2 = 0;
@@ -227,7 +227,7 @@ int32_t FXSYS_wcsnicmp(FX_LPCWSTR s1, FX_LPCWSTR s2, size_t count)
}
return wch1 - wch2;
}
-int32_t FXSYS_strnicmp(FX_LPCSTR s1, FX_LPCSTR s2, size_t count)
+int32_t FXSYS_strnicmp(const FX_CHAR* s1, const FX_CHAR* s2, size_t count)
{
FXSYS_assert(s1 != NULL && s2 != NULL && count > 0);
FX_CHAR ch1 = 0, ch2 = 0;
@@ -240,13 +240,13 @@ int32_t FXSYS_strnicmp(FX_LPCSTR s1, FX_LPCSTR s2, size_t count)
}
return ch1 - ch2;
}
-FX_DWORD FX_HashCode_String_GetA(FX_LPCSTR pStr, int32_t iLength, FX_BOOL bIgnoreCase)
+FX_DWORD FX_HashCode_String_GetA(const FX_CHAR* pStr, int32_t iLength, FX_BOOL bIgnoreCase)
{
FXSYS_assert(pStr != NULL);
if (iLength < 0) {
iLength = (int32_t)FXSYS_strlen(pStr);
}
- FX_LPCSTR pStrEnd = pStr + iLength;
+ const FX_CHAR* pStrEnd = pStr + iLength;
FX_DWORD dwHashCode = 0;
if (bIgnoreCase) {
while (pStr < pStrEnd) {
@@ -259,13 +259,13 @@ FX_DWORD FX_HashCode_String_GetA(FX_LPCSTR pStr, int32_t iLength, FX_BOOL bIgnor
}
return dwHashCode;
}
-FX_DWORD FX_HashCode_String_GetW(FX_LPCWSTR pStr, int32_t iLength, FX_BOOL bIgnoreCase)
+FX_DWORD FX_HashCode_String_GetW(const FX_WCHAR* pStr, int32_t iLength, FX_BOOL bIgnoreCase)
{
FXSYS_assert(pStr != NULL);
if (iLength < 0) {
iLength = (int32_t)FXSYS_wcslen(pStr);
}
- FX_LPCWSTR pStrEnd = pStr + iLength;
+ const FX_WCHAR* pStrEnd = pStr + iLength;
FX_DWORD dwHashCode = 0;
if (bIgnoreCase) {
while (pStr < pStrEnd) {
@@ -284,26 +284,26 @@ FX_DWORD FX_HashCode_String_GetW(FX_LPCWSTR pStr, int32_t iLength, FX_BOOL bIgno
#ifdef __cplusplus
extern "C" {
#endif
-FX_LPVOID FX_Random_MT_Start(FX_DWORD dwSeed)
+void* FX_Random_MT_Start(FX_DWORD dwSeed)
{
FX_LPMTRANDOMCONTEXT pContext = FX_Alloc(FX_MTRANDOMCONTEXT, 1);
pContext->mt[0] = dwSeed;
FX_DWORD &i = pContext->mti;
- FX_LPDWORD pBuf = pContext->mt;
+ FX_DWORD* pBuf = pContext->mt;
for (i = 1; i < MT_N; i ++) {
pBuf[i] = (1812433253UL * (pBuf[i - 1] ^ (pBuf[i - 1] >> 30)) + i);
}
pContext->bHaveSeed = TRUE;
return pContext;
}
-FX_DWORD FX_Random_MT_Generate(FX_LPVOID pContext)
+FX_DWORD FX_Random_MT_Generate(void* pContext)
{
FXSYS_assert(pContext != NULL);
FX_LPMTRANDOMCONTEXT pMTC = (FX_LPMTRANDOMCONTEXT)pContext;
FX_DWORD v;
static FX_DWORD mag[2] = {0, MT_Matrix_A};
FX_DWORD &mti = pMTC->mti;
- FX_LPDWORD pBuf = pMTC->mt;
+ FX_DWORD* pBuf = pMTC->mt;
if ((int)mti < 0 || mti >= MT_N) {
if (mti > MT_N && !pMTC->bHaveSeed) {
return 0;
@@ -328,12 +328,12 @@ FX_DWORD FX_Random_MT_Generate(FX_LPVOID pContext)
v ^= (v >> 18);
return v;
}
-void FX_Random_MT_Close(FX_LPVOID pContext)
+void FX_Random_MT_Close(void* pContext)
{
FXSYS_assert(pContext != NULL);
FX_Free(pContext);
}
-void FX_Random_GenerateMT(FX_LPDWORD pBuffer, int32_t iCount)
+void FX_Random_GenerateMT(FX_DWORD* pBuffer, int32_t iCount)
{
FX_DWORD dwSeed;
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
@@ -343,13 +343,13 @@ void FX_Random_GenerateMT(FX_LPDWORD pBuffer, int32_t iCount)
#else
FX_Random_GenerateBase(&dwSeed, 1);
#endif
- FX_LPVOID pContext = FX_Random_MT_Start(dwSeed);
+ void* pContext = FX_Random_MT_Start(dwSeed);
while (iCount -- > 0) {
*pBuffer ++ = FX_Random_MT_Generate(pContext);
}
FX_Random_MT_Close(pContext);
}
-void FX_Random_GenerateBase(FX_LPDWORD pBuffer, int32_t iCount)
+void FX_Random_GenerateBase(FX_DWORD* pBuffer, int32_t iCount)
{
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
SYSTEMTIME st1, st2;
@@ -357,8 +357,8 @@ void FX_Random_GenerateBase(FX_LPDWORD pBuffer, int32_t iCount)
do {
::GetSystemTime(&st2);
} while (FXSYS_memcmp32(&st1, &st2, sizeof(SYSTEMTIME)) == 0);
- FX_DWORD dwHash1 = FX_HashCode_String_GetA((FX_LPCSTR)&st1, sizeof(st1), TRUE);
- FX_DWORD dwHash2 = FX_HashCode_String_GetA((FX_LPCSTR)&st2, sizeof(st2), TRUE);
+ FX_DWORD dwHash1 = FX_HashCode_String_GetA((const FX_CHAR*)&st1, sizeof(st1), TRUE);
+ FX_DWORD dwHash2 = FX_HashCode_String_GetA((const FX_CHAR*)&st2, sizeof(st2), TRUE);
::srand((dwHash1 << 16) | (FX_DWORD)dwHash2);
#else
time_t tmLast = time(NULL), tmCur;
@@ -370,18 +370,18 @@ void FX_Random_GenerateBase(FX_LPDWORD pBuffer, int32_t iCount)
}
}
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
-FX_BOOL FX_GenerateCryptoRandom(FX_LPDWORD pBuffer, int32_t iCount)
+FX_BOOL FX_GenerateCryptoRandom(FX_DWORD* pBuffer, int32_t iCount)
{
HCRYPTPROV hCP = NULL;
if (!::CryptAcquireContext(&hCP, NULL, NULL, PROV_RSA_FULL, 0) || hCP == NULL) {
return FALSE;
}
- ::CryptGenRandom(hCP, iCount * sizeof(FX_DWORD), (FX_LPBYTE)pBuffer);
+ ::CryptGenRandom(hCP, iCount * sizeof(FX_DWORD), (uint8_t*)pBuffer);
::CryptReleaseContext(hCP, 0);
return TRUE;
}
#endif
-void FX_Random_GenerateCrypto(FX_LPDWORD pBuffer, int32_t iCount)
+void FX_Random_GenerateCrypto(FX_DWORD* pBuffer, int32_t iCount)
{
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
FX_GenerateCryptoRandom(pBuffer, iCount);
@@ -399,25 +399,25 @@ void FX_GUID_CreateV4(FX_LPGUID pGUID)
{
#if (_FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN32_MOBILE_ || _FX_OS_ == _FX_WIN64_)
#ifdef _FX_WINAPI_PARTITION_DESKTOP_
- if (!FX_GenerateCryptoRandom((FX_LPDWORD)pGUID, 4)) {
- FX_Random_GenerateMT((FX_LPDWORD)pGUID, 4);
+ if (!FX_GenerateCryptoRandom((FX_DWORD*)pGUID, 4)) {
+ FX_Random_GenerateMT((FX_DWORD*)pGUID, 4);
}
#else
- FX_Random_GenerateMT((FX_LPDWORD)pGUID, 4);
+ FX_Random_GenerateMT((FX_DWORD*)pGUID, 4);
#endif
#else
- FX_Random_GenerateMT((FX_LPDWORD)pGUID, 4);
+ FX_Random_GenerateMT((FX_DWORD*)pGUID, 4);
#endif
- uint8_t &b = ((FX_LPBYTE)pGUID)[6];
+ uint8_t &b = ((uint8_t*)pGUID)[6];
b = (b & 0x0F) | 0x40;
}
-FX_LPCSTR gs_FX_pHexChars = "0123456789ABCDEF";
+const FX_CHAR* gs_FX_pHexChars = "0123456789ABCDEF";
void FX_GUID_ToString(FX_LPCGUID pGUID, CFX_ByteString &bsStr, FX_BOOL bSeparator)
{
- FX_LPSTR pBuf = bsStr.GetBuffer(40);
+ FX_CHAR* pBuf = bsStr.GetBuffer(40);
uint8_t b;
for (int32_t i = 0; i < 16; i ++) {
- b = ((FX_LPCBYTE)pGUID)[i];
+ b = ((const uint8_t*)pGUID)[i];
*pBuf ++ = gs_FX_pHexChars[b >> 4];
*pBuf ++ = gs_FX_pHexChars[b & 0x0F];
if (bSeparator && (i == 3 || i == 5 || i == 7 || i == 9)) {
diff --git a/core/src/fxcrt/fx_xml_parser.cpp b/core/src/fxcrt/fx_xml_parser.cpp
index 040fefab63..1eec20c371 100644
--- a/core/src/fxcrt/fx_xml_parser.cpp
+++ b/core/src/fxcrt/fx_xml_parser.cpp
@@ -12,7 +12,7 @@ CXML_Parser::~CXML_Parser()
m_pDataAcc->Release();
}
}
-FX_BOOL CXML_Parser::Init(FX_LPBYTE pBuffer, size_t size)
+FX_BOOL CXML_Parser::Init(uint8_t* pBuffer, size_t size)
{
m_pDataAcc = FX_NEW CXML_DataBufAcc(pBuffer, size);
if (!m_pDataAcc) {
@@ -485,7 +485,7 @@ CXML_Element* CXML_Parser::ParseElement(CXML_Element* pParent, FX_BOOL bStartTag
break;
}
pSubElement->m_pParent = pElement;
- pElement->m_Children.Add((FX_LPVOID)CXML_Element::Element);
+ pElement->m_Children.Add((void*)CXML_Element::Element);
pElement->m_Children.Add(pSubElement);
SkipWhiteSpaces();
}
@@ -535,7 +535,7 @@ void CXML_Parser::InsertContentSegment(FX_BOOL bCDATA, FX_WSTR content, CXML_Ele
return;
}
pContent->Set(bCDATA, content);
- pElement->m_Children.Add((FX_LPVOID)CXML_Element::Content);
+ pElement->m_Children.Add((void*)CXML_Element::Content);
pElement->m_Children.Add(pContent);
}
static CXML_Element* XML_ContinueParse(CXML_Parser &parser, FX_BOOL bSaveSpaceChars, FX_FILESIZE* pParsedSize)
@@ -550,7 +550,7 @@ static CXML_Element* XML_ContinueParse(CXML_Parser &parser, FX_BOOL bSaveSpaceCh
CXML_Element* CXML_Element::Parse(const void* pBuffer, size_t size, FX_BOOL bSaveSpaceChars, FX_FILESIZE* pParsedSize)
{
CXML_Parser parser;
- if (!parser.Init((FX_LPBYTE)pBuffer, size)) {
+ if (!parser.Init((uint8_t*)pBuffer, size)) {
return NULL;
}
return XML_ContinueParse(parser, bSaveSpaceChars, pParsedSize);
diff --git a/core/src/fxcrt/fxcrt_platforms.cpp b/core/src/fxcrt/fxcrt_platforms.cpp
index 74affbe4b9..e5259c2b54 100644
--- a/core/src/fxcrt/fxcrt_platforms.cpp
+++ b/core/src/fxcrt/fxcrt_platforms.cpp
@@ -168,7 +168,7 @@ FX_BOOL FX_File_Copy(FX_BSTR fileNameSrc, FX_BSTR fileNameDst)
return FALSE;
}
FX_FILESIZE num = 0;
- FX_LPBYTE pBuffer = FX_Alloc(uint8_t, 32768);
+ uint8_t* pBuffer = FX_Alloc(uint8_t, 32768);
while (num = src.Read(pBuffer, 32768)) {
if (dst.Write(pBuffer, num) != num) {
break;
diff --git a/core/src/fxcrt/fxcrt_posix.cpp b/core/src/fxcrt/fxcrt_posix.cpp
index 701c910551..dd2aaf27d0 100644
--- a/core/src/fxcrt/fxcrt_posix.cpp
+++ b/core/src/fxcrt/fxcrt_posix.cpp
@@ -164,7 +164,7 @@ FX_BOOL FX_File_Copy(FX_BSTR fileNameSrc, FX_BSTR fileNameDst)
return FALSE;
}
size_t num = 0;
- FX_LPBYTE pBuffer = FX_Alloc(uint8_t, 32768);
+ uint8_t* pBuffer = FX_Alloc(uint8_t, 32768);
num = src.Read(pBuffer, 32768);
while (num) {
if (dst.Write(pBuffer, num) != num) {
diff --git a/core/src/fxcrt/fxcrt_windows.h b/core/src/fxcrt/fxcrt_windows.h
index 1919f3e4d7..32531d568f 100644
--- a/core/src/fxcrt/fxcrt_windows.h
+++ b/core/src/fxcrt/fxcrt_windows.h
@@ -29,7 +29,7 @@ public:
virtual FX_BOOL Flush();
virtual FX_BOOL Truncate(FX_FILESIZE szFile);
protected:
- FX_LPVOID m_hFile;
+ void* m_hFile;
};
#endif
diff --git a/core/src/fxcrt/xml_int.h b/core/src/fxcrt/xml_int.h
index 4155a39ffa..0220301d17 100644
--- a/core/src/fxcrt/xml_int.h
+++ b/core/src/fxcrt/xml_int.h
@@ -10,7 +10,7 @@
class CXML_DataBufAcc : public IFX_BufferRead
{
public:
- CXML_DataBufAcc(FX_LPCBYTE pBuffer, size_t size)
+ CXML_DataBufAcc(const uint8_t* pBuffer, size_t size)
: m_pBuffer(pBuffer)
, m_dwSize(size)
, m_dwCurPos(0)
@@ -44,7 +44,7 @@ public:
}
return FALSE;
}
- virtual FX_LPCBYTE GetBlockBuffer()
+ virtual const uint8_t* GetBlockBuffer()
{
return m_pBuffer;
}
@@ -57,7 +57,7 @@ public:
return 0;
}
protected:
- FX_LPCBYTE m_pBuffer;
+ const uint8_t* m_pBuffer;
size_t m_dwSize;
size_t m_dwCurPos;
};
@@ -111,9 +111,9 @@ public:
}
return m_pFileRead->ReadBlock(m_pBuffer, m_nStart, m_dwSize);
}
- virtual FX_LPCBYTE GetBlockBuffer()
+ virtual const uint8_t* GetBlockBuffer()
{
- return (FX_LPCBYTE)m_pBuffer;
+ return (const uint8_t*)m_pBuffer;
}
virtual size_t GetBlockSize()
{
@@ -125,7 +125,7 @@ public:
}
protected:
IFX_FileRead *m_pFileRead;
- FX_LPBYTE m_pBuffer;
+ uint8_t* m_pBuffer;
FX_FILESIZE m_nStart;
size_t m_dwSize;
};
@@ -137,11 +137,11 @@ public:
FX_BOOL m_bOwnedStream;
FX_FILESIZE m_nOffset;
FX_BOOL m_bSaveSpaceChars;
- FX_LPCBYTE m_pBuffer;
+ const uint8_t* m_pBuffer;
size_t m_dwBufferSize;
FX_FILESIZE m_nBufferOffset;
size_t m_dwIndex;
- FX_BOOL Init(FX_LPBYTE pBuffer, size_t size);
+ FX_BOOL Init(uint8_t* pBuffer, size_t size);
FX_BOOL Init(IFX_FileRead *pFileRead);
FX_BOOL Init(IFX_BufferRead *pBuffer);
FX_BOOL Init(FX_BOOL bOwndedStream);
diff --git a/core/src/fxge/agg/agg23/fx_agg_driver.cpp b/core/src/fxge/agg/agg23/fx_agg_driver.cpp
index 978756cd64..e11259e07d 100644
--- a/core/src/fxge/agg/agg23/fx_agg_driver.cpp
+++ b/core/src/fxge/agg/agg23/fx_agg_driver.cpp
@@ -385,12 +385,12 @@ private:
const CFX_DIBitmap* m_pClipMask;
CFX_DIBitmap* m_pDevice;
const CFX_ClipRgn* m_pClipRgn;
- void (CFX_Renderer::*composite_span)(FX_LPBYTE, int, int, int, FX_LPBYTE, int, int, FX_LPBYTE, FX_LPBYTE);
+ void (CFX_Renderer::*composite_span)(uint8_t*, int, int, int, uint8_t*, int, int, uint8_t*, uint8_t*);
public:
void prepare(unsigned) {}
- void CompositeSpan(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan, int Bpp, FX_BOOL bDestAlpha,
- int span_left, int span_len, FX_LPBYTE cover_scan,
- int clip_left, int clip_right, FX_LPBYTE clip_scan)
+ void CompositeSpan(uint8_t* dest_scan, uint8_t* ori_scan, int Bpp, FX_BOOL bDestAlpha,
+ int span_left, int span_len, uint8_t* cover_scan,
+ int clip_left, int clip_right, uint8_t* clip_scan)
{
ASSERT(!m_pDevice->IsCmykImage());
int col_start = span_left < clip_left ? clip_left - span_left : 0;
@@ -551,7 +551,7 @@ public:
index = i;
}
}
- FX_LPBYTE dest_scan1 = dest_scan;
+ uint8_t* dest_scan1 = dest_scan;
for (int col = col_start; col < col_end; col ++) {
int src_alpha;
if (clip_scan) {
@@ -570,10 +570,10 @@ public:
}
}
}
- void CompositeSpan1bpp(FX_LPBYTE dest_scan, int Bpp,
- int span_left, int span_len, FX_LPBYTE cover_scan,
- int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ void CompositeSpan1bpp(uint8_t* dest_scan, int Bpp,
+ int span_left, int span_len, uint8_t* cover_scan,
+ int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_bRgbByteOrder);
ASSERT(!m_pDevice->IsCmykImage());
@@ -589,7 +589,7 @@ public:
index = i;
}
}
- FX_LPBYTE dest_scan1 = dest_scan;
+ uint8_t* dest_scan1 = dest_scan;
for (int col = col_start; col < col_end; col ++) {
int src_alpha;
if (clip_scan) {
@@ -607,10 +607,10 @@ public:
dest_scan1 = dest_scan + (span_left % 8 + col - col_start + 1) / 8;
}
}
- void CompositeSpanGray(FX_LPBYTE dest_scan, int Bpp,
- int span_left, int span_len, FX_LPBYTE cover_scan,
- int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ void CompositeSpanGray(uint8_t* dest_scan, int Bpp,
+ int span_left, int span_len, uint8_t* cover_scan,
+ int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_bRgbByteOrder);
int col_start = span_left < clip_left ? clip_left - span_left : 0;
@@ -668,10 +668,10 @@ public:
}
}
}
- void CompositeSpanARGB(FX_LPBYTE dest_scan, int Bpp,
- int span_left, int span_len, FX_LPBYTE cover_scan,
- int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ void CompositeSpanARGB(uint8_t* dest_scan, int Bpp,
+ int span_left, int span_len, uint8_t* cover_scan,
+ int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
int col_start = span_left < clip_left ? clip_left - span_left : 0;
int col_end = (span_left + span_len) < clip_right ? span_len : (clip_right - span_left);
@@ -754,10 +754,10 @@ public:
dest_scan += Bpp;
}
}
- void CompositeSpanRGB(FX_LPBYTE dest_scan, int Bpp,
- int span_left, int span_len, FX_LPBYTE cover_scan,
- int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ void CompositeSpanRGB(uint8_t* dest_scan, int Bpp,
+ int span_left, int span_len, uint8_t* cover_scan,
+ int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
int col_start = span_left < clip_left ? clip_left - span_left : 0;
int col_end = (span_left + span_len) < clip_right ? span_len : (clip_right - span_left);
@@ -874,10 +874,10 @@ public:
}
}
}
- void CompositeSpanCMYK(FX_LPBYTE dest_scan, int Bpp,
- int span_left, int span_len, FX_LPBYTE cover_scan,
- int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ void CompositeSpanCMYK(uint8_t* dest_scan, int Bpp,
+ int span_left, int span_len, uint8_t* cover_scan,
+ int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_bRgbByteOrder);
int col_start = span_left < clip_left ? clip_left - span_left : 0;
@@ -958,13 +958,13 @@ public:
if (y < m_ClipBox.top || y >= m_ClipBox.bottom) {
return;
}
- FX_LPBYTE dest_scan = m_pDevice->GetBuffer() + m_pDevice->GetPitch() * y;
- FX_LPBYTE dest_scan_extra_alpha = NULL;
+ uint8_t* dest_scan = m_pDevice->GetBuffer() + m_pDevice->GetPitch() * y;
+ uint8_t* dest_scan_extra_alpha = NULL;
CFX_DIBitmap* pAlphaMask = m_pDevice->m_pAlphaMask;
if (pAlphaMask) {
dest_scan_extra_alpha = pAlphaMask->GetBuffer() + pAlphaMask->GetPitch() * y;
}
- FX_LPBYTE ori_scan = NULL;
+ uint8_t* ori_scan = NULL;
if (m_pOriDevice) {
ori_scan = m_pOriDevice->GetBuffer() + m_pOriDevice->GetPitch() * y;
}
@@ -975,9 +975,9 @@ public:
while (1) {
int x = span->x;
ASSERT(span->len > 0);
- FX_LPBYTE dest_pos = NULL;
- FX_LPBYTE dest_extra_alpha_pos = NULL;
- FX_LPBYTE ori_pos = NULL;
+ uint8_t* dest_pos = NULL;
+ uint8_t* dest_extra_alpha_pos = NULL;
+ uint8_t* ori_pos = NULL;
if (Bpp) {
ori_pos = ori_scan ? ori_scan + x * Bpp : NULL;
dest_pos = dest_scan + x * Bpp;
@@ -986,7 +986,7 @@ public:
dest_pos = dest_scan + x / 8;
ori_pos = ori_scan ? ori_scan + x / 8 : NULL;
}
- FX_LPBYTE clip_pos = NULL;
+ uint8_t* clip_pos = NULL;
if (m_pClipMask) {
clip_pos = m_pClipMask->GetBuffer() + (y - m_ClipBox.top) * m_pClipMask->GetPitch() + x - m_ClipBox.left;
}
@@ -1040,7 +1040,7 @@ public:
if (pIccTransform) {
uint8_t gray;
color = bObjectCMYK ? FXCMYK_TODIB(color) : FXARGB_TODIB(color);
- pIccModule->TranslateScanline(pIccTransform, &gray, (FX_LPCBYTE)&color, 1);
+ pIccModule->TranslateScanline(pIccTransform, &gray, (const uint8_t*)&color, 1);
m_Gray = gray;
} else {
if (bObjectCMYK) {
@@ -1061,28 +1061,28 @@ public:
if (bObjectCMYK) {
m_Color = FXCMYK_TODIB(color);
if (pIccTransform) {
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)&m_Color, (FX_LPCBYTE)&m_Color, 1);
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&m_Color, (const uint8_t*)&m_Color, 1);
}
} else {
if (!pIccTransform) {
return FALSE;
}
color = FXARGB_TODIB(color);
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)&m_Color, (FX_LPCBYTE)&color, 1);
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&m_Color, (const uint8_t*)&color, 1);
}
- m_Red = ((FX_LPBYTE)&m_Color)[0];
- m_Green = ((FX_LPBYTE)&m_Color)[1];
- m_Blue = ((FX_LPBYTE)&m_Color)[2];
- m_Gray = ((FX_LPBYTE)&m_Color)[3];
+ m_Red = ((uint8_t*)&m_Color)[0];
+ m_Green = ((uint8_t*)&m_Color)[1];
+ m_Blue = ((uint8_t*)&m_Color)[2];
+ m_Gray = ((uint8_t*)&m_Color)[3];
} else {
composite_span = (pDevice->GetFormat() == FXDIB_Argb) ? &CFX_Renderer::CompositeSpanARGB : &CFX_Renderer::CompositeSpanRGB;
if (pIccTransform) {
color = bObjectCMYK ? FXCMYK_TODIB(color) : FXARGB_TODIB(color);
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)&m_Color, (FX_LPCBYTE)&color, 1);
- ((FX_LPBYTE)&m_Color)[3] = m_Alpha;
- m_Red = ((FX_LPBYTE)&m_Color)[2];
- m_Green = ((FX_LPBYTE)&m_Color)[1];
- m_Blue = ((FX_LPBYTE)&m_Color)[0];
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&m_Color, (const uint8_t*)&color, 1);
+ ((uint8_t*)&m_Color)[3] = m_Alpha;
+ m_Red = ((uint8_t*)&m_Color)[2];
+ m_Green = ((uint8_t*)&m_Color)[1];
+ m_Blue = ((uint8_t*)&m_Color)[0];
if (m_bRgbByteOrder) {
m_Color = FXARGB_TODIB(m_Color);
m_Color = FXARGB_TOBGRORDERDIB(m_Color);
@@ -1201,7 +1201,7 @@ void RgbByteOrderSetPixel(CFX_DIBitmap* pBitmap, int x, int y, FX_DWORD argb)
if (x < 0 || x >= pBitmap->GetWidth() || y < 0 || y >= pBitmap->GetHeight()) {
return;
}
- FX_LPBYTE pos = (uint8_t*)pBitmap->GetBuffer() + y * pBitmap->GetPitch() + x * pBitmap->GetBPP() / 8;
+ uint8_t* pos = (uint8_t*)pBitmap->GetBuffer() + y * pBitmap->GetPitch() + x * pBitmap->GetBPP() / 8;
if (pBitmap->GetFormat() == FXDIB_Argb) {
FXARGB_SETRGBORDERDIB(pos, ArgbGamma(argb));
} else {
@@ -1227,7 +1227,7 @@ void RgbByteOrderCompositeRect(CFX_DIBitmap* pBitmap, int left, int top, int wid
uint8_t* pBuffer = pBitmap->GetBuffer();
if (src_alpha == 255) {
for (int row = rect.top; row < rect.bottom; row ++) {
- FX_LPBYTE dest_scan = pBuffer + row * pBitmap->GetPitch() + rect.left * Bpp;
+ uint8_t* dest_scan = pBuffer + row * pBitmap->GetPitch() + rect.left * Bpp;
if (Bpp == 4) {
FX_DWORD* scan = (FX_DWORD*)dest_scan;
for (int col = 0; col < width; col ++) {
@@ -1247,7 +1247,7 @@ void RgbByteOrderCompositeRect(CFX_DIBitmap* pBitmap, int left, int top, int wid
src_g = FX_GAMMA(src_g);
src_b = FX_GAMMA(src_b);
for (int row = rect.top; row < rect.bottom; row ++) {
- FX_LPBYTE dest_scan = pBuffer + row * pBitmap->GetPitch() + rect.left * Bpp;
+ uint8_t* dest_scan = pBuffer + row * pBitmap->GetPitch() + rect.left * Bpp;
if (bAlpha) {
for (int col = 0; col < width; col ++) {
uint8_t back_alpha = dest_scan[3];
@@ -1298,8 +1298,8 @@ void RgbByteOrderTransferBitmap(CFX_DIBitmap* pBitmap, int dest_left, int dest_t
uint8_t* buffer = pBitmap->GetBuffer();
if (dest_format == src_format) {
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = buffer + (dest_top + row) * pitch + dest_left * Bpp;
- FX_LPBYTE src_scan = (FX_LPBYTE)pSrcBitmap->GetScanline(src_top + row) + src_left * Bpp;
+ uint8_t* dest_scan = buffer + (dest_top + row) * pitch + dest_left * Bpp;
+ uint8_t* src_scan = (uint8_t*)pSrcBitmap->GetScanline(src_top + row) + src_left * Bpp;
if (Bpp == 4) {
for (int col = 0; col < width; col ++) {
FXARGB_SETDIB(dest_scan, FXARGB_MAKE(src_scan[3], src_scan[0], src_scan[1], src_scan[2]));
@@ -1317,12 +1317,12 @@ void RgbByteOrderTransferBitmap(CFX_DIBitmap* pBitmap, int dest_left, int dest_t
}
return;
}
- FX_LPBYTE dest_buf = buffer + dest_top * pitch + dest_left * Bpp;
+ uint8_t* dest_buf = buffer + dest_top * pitch + dest_left * Bpp;
if (dest_format == FXDIB_Rgb) {
if (src_format == FXDIB_Rgb32) {
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * pitch;
- FX_LPBYTE src_scan = (uint8_t*)pSrcBitmap->GetScanline(src_top + row) + src_left * 4;
+ uint8_t* dest_scan = dest_buf + row * pitch;
+ uint8_t* src_scan = (uint8_t*)pSrcBitmap->GetScanline(src_top + row) + src_left * 4;
for (int col = 0; col < width; col ++) {
*dest_scan++ = src_scan[2];
*dest_scan++ = src_scan[1];
@@ -1337,7 +1337,7 @@ void RgbByteOrderTransferBitmap(CFX_DIBitmap* pBitmap, int dest_left, int dest_t
if (src_format == FXDIB_Rgb) {
for (int row = 0; row < height; row ++) {
uint8_t* dest_scan = (uint8_t*)(dest_buf + row * pitch);
- FX_LPBYTE src_scan = (uint8_t*)pSrcBitmap->GetScanline(src_top + row) + src_left * 3;
+ uint8_t* src_scan = (uint8_t*)pSrcBitmap->GetScanline(src_top + row) + src_left * 3;
if (src_format == FXDIB_Argb) {
for (int col = 0; col < width; col ++) {
FXARGB_SETDIB(dest_scan, FXARGB_MAKE(0xff, FX_GAMMA(src_scan[0]), FX_GAMMA(src_scan[1]), FX_GAMMA(src_scan[2])));
@@ -1355,8 +1355,8 @@ void RgbByteOrderTransferBitmap(CFX_DIBitmap* pBitmap, int dest_left, int dest_t
} else if (src_format == FXDIB_Rgb32) {
ASSERT(dest_format == FXDIB_Argb);
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * pitch;
- FX_LPBYTE src_scan = (FX_LPBYTE)(pSrcBitmap->GetScanline(src_top + row) + src_left * 4);
+ uint8_t* dest_scan = dest_buf + row * pitch;
+ uint8_t* src_scan = (uint8_t*)(pSrcBitmap->GetScanline(src_top + row) + src_left * 4);
for (int col = 0; col < width; col++) {
FXARGB_SETDIB(dest_scan, FXARGB_MAKE(0xff, src_scan[0], src_scan[1], src_scan[2]));
src_scan += 4;
@@ -1382,7 +1382,7 @@ FX_BOOL _DibSetPixel(CFX_DIBitmap* pDevice, int x, int y, FX_DWORD color, int al
if (pIccTransform) {
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
color = bObjCMYK ? FXCMYK_TODIB(color) : FXARGB_TODIB(color);
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)&color, (FX_LPBYTE)&color, 1);
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&color, (uint8_t*)&color, 1);
color = bObjCMYK ? FXCMYK_TODIB(color) : FXARGB_TODIB(color);
if (!pDevice->IsCmykImage()) {
color = (color & 0xffffff) | (alpha << 24);
@@ -1559,7 +1559,7 @@ FX_BOOL CFX_AggDeviceDriver::StretchDIBits(const CFX_DIBSource* pSource, FX_DWOR
return TRUE;
}
FX_BOOL CFX_AggDeviceDriver::StartDIBits(const CFX_DIBSource* pSource, int bitmap_alpha, FX_DWORD argb,
- const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, FX_LPVOID& handle,
+ const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, void*& handle,
int alpha_flag, void* pIccTransform, int blend_type)
{
if (m_pBitmap->GetBuffer() == NULL) {
@@ -1573,14 +1573,14 @@ FX_BOOL CFX_AggDeviceDriver::StartDIBits(const CFX_DIBSource* pSource, int bitma
handle = pRenderer;
return TRUE;
}
-FX_BOOL CFX_AggDeviceDriver::ContinueDIBits(FX_LPVOID pHandle, IFX_Pause* pPause)
+FX_BOOL CFX_AggDeviceDriver::ContinueDIBits(void* pHandle, IFX_Pause* pPause)
{
if (m_pBitmap->GetBuffer() == NULL) {
return TRUE;
}
return ((CFX_ImageRenderer*)pHandle)->Continue(pPause);
}
-void CFX_AggDeviceDriver::CancelDIBits(FX_LPVOID pHandle)
+void CFX_AggDeviceDriver::CancelDIBits(void* pHandle)
{
if (m_pBitmap->GetBuffer() == NULL) {
return;
diff --git a/core/src/fxge/agg/include/fx_agg_driver.h b/core/src/fxge/agg/include/fx_agg_driver.h
index f4b9368eff..803227e044 100644
--- a/core/src/fxge/agg/include/fx_agg_driver.h
+++ b/core/src/fxge/agg/include/fx_agg_driver.h
@@ -86,10 +86,10 @@ public:
int alpha_flag, void* pIccTransform, int blend_type);
virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color,
- const CFX_AffineMatrix* pMatrix, FX_DWORD flags, FX_LPVOID& handle,
+ const CFX_AffineMatrix* pMatrix, FX_DWORD flags, void*& handle,
int alpha_flag, void* pIccTransform, int blend_type);
- virtual FX_BOOL ContinueDIBits(FX_LPVOID handle, IFX_Pause* pPause);
- virtual void CancelDIBits(FX_LPVOID handle);
+ virtual FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause);
+ virtual void CancelDIBits(void* handle);
virtual FX_BOOL DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont,
CFX_FontCache* pCache, const CFX_AffineMatrix* pObject2Device, FX_FLOAT font_size, FX_DWORD color,
@@ -99,7 +99,7 @@ public:
void SetClipMask(FX_NAMESPACE_DECLARE(agg, rasterizer_scanline_aa)& rasterizer);
- virtual FX_LPBYTE GetBuffer() const
+ virtual uint8_t* GetBuffer() const
{
return m_pBitmap->GetBuffer();
}
diff --git a/core/src/fxge/android/fpf_skiafont.cpp b/core/src/fxge/android/fpf_skiafont.cpp
index 290d989851..213a6595aa 100644
--- a/core/src/fxge/android/fpf_skiafont.cpp
+++ b/core/src/fxge/android/fpf_skiafont.cpp
@@ -156,7 +156,7 @@ int32_t CFPF_SkiaFont::GetItalicAngle() const
}
return 0;
}
-FX_DWORD CFPF_SkiaFont::GetFontData(FX_DWORD dwTable, FX_LPBYTE pBuffer, FX_DWORD dwSize)
+FX_DWORD CFPF_SkiaFont::GetFontData(FX_DWORD dwTable, uint8_t* pBuffer, FX_DWORD dwSize)
{
if (!m_Face) {
return FALSE;
@@ -184,7 +184,7 @@ FX_BOOL CFPF_SkiaFont::InitFont(CFPF_SkiaFontMgr *pFontMgr, CFPF_SkiaFontDescrip
break;
case FPF_SKIAFONTTYPE_Buffer: {
CFPF_SkiaBufferFont *pFont = (CFPF_SkiaBufferFont*)pFontDes;
- m_Face = pFontMgr->GetFontFace((FX_LPCBYTE)pFont->m_pBuffer, pFont->m_szBuffer, pFont->m_iFaceIndex);
+ m_Face = pFontMgr->GetFontFace((const uint8_t*)pFont->m_pBuffer, pFont->m_szBuffer, pFont->m_iFaceIndex);
}
break;
default:
diff --git a/core/src/fxge/android/fpf_skiafont.h b/core/src/fxge/android/fpf_skiafont.h
index 72b569fe2e..af33402846 100644
--- a/core/src/fxge/android/fpf_skiafont.h
+++ b/core/src/fxge/android/fpf_skiafont.h
@@ -44,7 +44,7 @@ public:
virtual int32_t GetHeight() const;
virtual int32_t GetItalicAngle() const;
- virtual FX_DWORD GetFontData(FX_DWORD dwTable, FX_LPBYTE pBuffer, FX_DWORD dwSize);
+ virtual FX_DWORD GetFontData(FX_DWORD dwTable, uint8_t* pBuffer, FX_DWORD dwSize);
FX_BOOL InitFont(CFPF_SkiaFontMgr *pFontMgr, CFPF_SkiaFontDescriptor *pFontDes, FX_BSTR bsFamily, FX_DWORD dwStyle, uint8_t uCharset);
protected:
CFPF_SkiaFontMgr *m_pFontMgr;
diff --git a/core/src/fxge/android/fpf_skiafontmgr.cpp b/core/src/fxge/android/fpf_skiafontmgr.cpp
index 6b27f073e5..df9ce8983a 100644
--- a/core/src/fxge/android/fpf_skiafontmgr.cpp
+++ b/core/src/fxge/android/fpf_skiafontmgr.cpp
@@ -103,7 +103,7 @@ FX_DWORD FPF_SkiaGetSansFont(FX_DWORD dwHash)
}
return 0;
}
-static uint32_t FPF_GetHashCode_StringA(FX_LPCSTR pStr, int32_t iLength, FX_BOOL bIgnoreCase = FALSE)
+static uint32_t FPF_GetHashCode_StringA(const FX_CHAR* pStr, int32_t iLength, FX_BOOL bIgnoreCase = FALSE)
{
if (!pStr) {
return 0;
@@ -111,7 +111,7 @@ static uint32_t FPF_GetHashCode_StringA(FX_LPCSTR pStr, int32_t iLength, FX_BOOL
if (iLength < 0) {
iLength = FXSYS_strlen(pStr);
}
- FX_LPCSTR pStrEnd = pStr + iLength;
+ const FX_CHAR* pStrEnd = pStr + iLength;
uint32_t uHashCode = 0;
if (bIgnoreCase) {
while (pStr < pStrEnd) {
@@ -185,7 +185,7 @@ static FX_DWORD FPF_SKIANormalizeFontName(FX_BSTR bsfamily)
{
FX_DWORD dwHash = 0;
int32_t iLength = bsfamily.GetLength();
- FX_LPCSTR pBuffer = bsfamily.GetCStr();
+ const FX_CHAR* pBuffer = bsfamily.GetCStr();
for (int32_t i = 0; i < iLength; i++) {
FX_CHAR ch = pBuffer[i];
if (ch == ' ' || ch == '-' || ch == ',') {
@@ -276,7 +276,7 @@ void CFPF_SkiaFontMgr::LoadPrivateFont(IFX_FileRead* pFontFile)
void CFPF_SkiaFontMgr::LoadPrivateFont(FX_BSTR bsFileName)
{
}
-void CFPF_SkiaFontMgr::LoadPrivateFont(FX_LPVOID pBuffer, size_t szBuffer)
+void CFPF_SkiaFontMgr::LoadPrivateFont(void* pBuffer, size_t szBuffer)
{
}
IFPF_Font* CFPF_SkiaFontMgr::CreateFont(FX_BSTR bsFamilyname, uint8_t uCharset, FX_DWORD dwStyle, FX_DWORD dwMatch)
@@ -417,7 +417,7 @@ FXFT_Face CFPF_SkiaFontMgr::GetFontFace(FX_BSTR bsFile, int32_t iFaceIndex )
FXFT_Set_Pixel_Sizes(face, 0, 64);
return face;
}
-FXFT_Face CFPF_SkiaFontMgr::GetFontFace(FX_LPCBYTE pBuffer, size_t szBuffer, int32_t iFaceIndex )
+FXFT_Face CFPF_SkiaFontMgr::GetFontFace(const uint8_t* pBuffer, size_t szBuffer, int32_t iFaceIndex )
{
if (!pBuffer || szBuffer < 1) {
return NULL;
diff --git a/core/src/fxge/android/fpf_skiafontmgr.h b/core/src/fxge/android/fpf_skiafontmgr.h
index 44d427f8af..ba9ea9134a 100644
--- a/core/src/fxge/android/fpf_skiafontmgr.h
+++ b/core/src/fxge/android/fpf_skiafontmgr.h
@@ -26,7 +26,7 @@ public:
{
return FPF_SKIAFONTTYPE_Unknown;
}
- void SetFamily(FX_LPCSTR pFamily)
+ void SetFamily(const FX_CHAR* pFamily)
{
if (m_pFamily) {
FX_Free(m_pFamily);
@@ -36,7 +36,7 @@ public:
FXSYS_memcpy32(m_pFamily, pFamily, iSize * sizeof(FX_CHAR));
m_pFamily[iSize] = 0;
}
- FX_LPSTR m_pFamily;
+ FX_CHAR* m_pFamily;
FX_DWORD m_dwStyle;
int32_t m_iFaceIndex;
FX_DWORD m_dwCharsets;
@@ -56,7 +56,7 @@ public:
{
return FPF_SKIAFONTTYPE_Path;
}
- void SetPath(FX_LPCSTR pPath)
+ void SetPath(const FX_CHAR* pPath)
{
if (m_pPath) {
FX_Free(m_pPath);
@@ -66,7 +66,7 @@ public:
FXSYS_memcpy32(m_pPath, pPath, iSize * sizeof(FX_CHAR));
m_pPath[iSize] = 0;
}
- FX_LPSTR m_pPath;
+ FX_CHAR* m_pPath;
};
class CFPF_SkiaFileFont : public CFPF_SkiaFontDescriptor
{
@@ -86,7 +86,7 @@ public:
{
return FPF_SKIAFONTTYPE_Buffer;
}
- FX_LPVOID m_pBuffer;
+ void* m_pBuffer;
size_t m_szBuffer;
};
class CFPF_SkiaFontMgr : public IFPF_FontMgr
@@ -98,12 +98,12 @@ public:
virtual void LoadSystemFonts();
virtual void LoadPrivateFont(IFX_FileRead* pFontFile);
virtual void LoadPrivateFont(FX_BSTR bsFileName);
- virtual void LoadPrivateFont(FX_LPVOID pBuffer, size_t szBuffer);
+ virtual void LoadPrivateFont(void* pBuffer, size_t szBuffer);
virtual IFPF_Font* CreateFont(FX_BSTR bsFamilyname, uint8_t uCharset, FX_DWORD dwStyle, FX_DWORD dwMatch = 0);
FXFT_Face GetFontFace(IFX_FileRead *pFileRead, int32_t iFaceIndex = 0);
FXFT_Face GetFontFace(FX_BSTR bsFile, int32_t iFaceIndex = 0);
- FXFT_Face GetFontFace(FX_LPCBYTE pBuffer, size_t szBuffer, int32_t iFaceIndex = 0);
+ FXFT_Face GetFontFace(const uint8_t* pBuffer, size_t szBuffer, int32_t iFaceIndex = 0);
protected:
void ScanPath(FX_BSTR path);
void ScanFile(FX_BSTR file);
diff --git a/core/src/fxge/android/fx_android_font.cpp b/core/src/fxge/android/fx_android_font.cpp
index 5f8aafc393..48331c2dd0 100644
--- a/core/src/fxge/android/fx_android_font.cpp
+++ b/core/src/fxge/android/fx_android_font.cpp
@@ -23,7 +23,7 @@ FX_BOOL CFX_AndroidFontInfo::EnumFontList(CFX_FontMapper* pMapper)
{
return FALSE;
}
-void* CFX_AndroidFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR face, FX_BOOL& bExact)
+void* CFX_AndroidFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* face, FX_BOOL& bExact)
{
if (!m_pFontMgr) {
return NULL;
@@ -46,11 +46,11 @@ void* CFX_AndroidFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int
}
return m_pFontMgr->CreateFont(face, charset, dwStyle, FPF_MATCHFONT_REPLACEANSI);
}
-void* CFX_AndroidFontInfo::GetFont(FX_LPCSTR face)
+void* CFX_AndroidFontInfo::GetFont(const FX_CHAR* face)
{
return NULL;
}
-FX_DWORD CFX_AndroidFontInfo::GetFontData(void* hFont, FX_DWORD table, FX_LPBYTE buffer, FX_DWORD size)
+FX_DWORD CFX_AndroidFontInfo::GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer, FX_DWORD size)
{
if (!hFont) {
return 0;
diff --git a/core/src/fxge/android/fx_android_font.h b/core/src/fxge/android/fx_android_font.h
index fb7ff7cd92..0e79abaa9f 100644
--- a/core/src/fxge/android/fx_android_font.h
+++ b/core/src/fxge/android/fx_android_font.h
@@ -20,10 +20,10 @@ public:
virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper);
- virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR face, FX_BOOL& bExact);
+ virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* face, FX_BOOL& bExact);
- virtual void* GetFont(FX_LPCSTR face);
- virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, FX_LPBYTE buffer, FX_DWORD size);
+ virtual void* GetFont(const FX_CHAR* face);
+ virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer, FX_DWORD size);
virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name);
virtual FX_BOOL GetFontCharset(void* hFont, int& charset);
diff --git a/core/src/fxge/apple/apple_int.h b/core/src/fxge/apple/apple_int.h
index 6cd880603a..1e620a3a4f 100644
--- a/core/src/fxge/apple/apple_int.h
+++ b/core/src/fxge/apple/apple_int.h
@@ -48,7 +48,7 @@ public:
void* createGraphics(CFX_DIBitmap* bitmap);
void destroyGraphics(void* graphics);
- void* CreateFont(FX_LPCBYTE pFontData, FX_DWORD dwFontSize);
+ void* CreateFont(const uint8_t* pFontData, FX_DWORD dwFontSize);
void DestroyFont(void* pFont);
void setGraphicsTextMatrix(void* graphics, CFX_AffineMatrix* matrix);
FX_BOOL drawGraphicsString(void* graphics,
@@ -141,17 +141,17 @@ public:
int dest_width, int dest_height, const FX_RECT* pClipRect, FX_DWORD flags,
int alpha_flag = 0, void* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL);
virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color,
- const CFX_AffineMatrix* pMatrix, FX_DWORD flags, FX_LPVOID& handle,
+ const CFX_AffineMatrix* pMatrix, FX_DWORD flags, void*& handle,
int alpha_flag = 0, void* pIccTransform = NULL,
int blend_type = FXDIB_BLEND_NORMAL)
{
return FALSE;
}
- virtual FX_BOOL ContinueDIBits(FX_LPVOID handle, IFX_Pause* pPause)
+ virtual FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause)
{
return FALSE;
}
- virtual void CancelDIBits(FX_LPVOID handle) {}
+ virtual void CancelDIBits(void* handle) {}
virtual FX_BOOL DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont,
CFX_FontCache* pCache, const CFX_AffineMatrix* pObject2Device, FX_FLOAT font_size, FX_DWORD color,
int alpha_flag = 0, void* pIccTransform = NULL);
@@ -239,10 +239,10 @@ private:
int _tableCount;
int _totalSize;
};
-uint32_t FX_GetHashCode( FX_LPCSTR pStr);
-FX_DWORD FX_IOSGetMatchFamilyNameHashcode(FX_LPCSTR pFontName);
+uint32_t FX_GetHashCode( const FX_CHAR* pStr);
+FX_DWORD FX_IOSGetMatchFamilyNameHashcode(const FX_CHAR* pFontName);
uint32_t FX_IOSGetFamilyNamesCount();
-FX_LPCSTR FX_IOSGetFamilyName( uint32_t uIndex);
+const FX_CHAR* FX_IOSGetFamilyName( uint32_t uIndex);
#endif
#endif // CORE_SRC_FXGE_APPLE_APPLE_INT_H_
diff --git a/core/src/fxge/apple/fx_mac_imp.cpp b/core/src/fxge/apple/fx_mac_imp.cpp
index 5acedc0bd9..41b8632965 100644
--- a/core/src/fxge/apple/fx_mac_imp.cpp
+++ b/core/src/fxge/apple/fx_mac_imp.cpp
@@ -8,8 +8,8 @@
#include "apple_int.h"
#if _FX_OS_ == _FX_MACOSX_
static const struct {
- FX_LPCSTR m_pName;
- FX_LPCSTR m_pSubstName;
+ const FX_CHAR* m_pName;
+ const FX_CHAR* m_pSubstName;
}
Base14Substs[] = {
{"Courier", "Courier New"},
@@ -28,7 +28,7 @@ Base14Substs[] = {
class CFX_MacFontInfo : public CFX_FolderFontInfo
{
public:
- virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR family, FX_BOOL& bExact);
+ virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* family, FX_BOOL& bExact);
};
#define JAPAN_GOTHIC "Hiragino Kaku Gothic Pro W6"
#define JAPAN_MINCHO "Hiragino Mincho Pro W6"
@@ -44,7 +44,7 @@ static void GetJapanesePreference(CFX_ByteString& face, int weight, int picth_fa
face = JAPAN_MINCHO;
}
}
-void* CFX_MacFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR cstr_face, FX_BOOL& bExact)
+void* CFX_MacFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* cstr_face, FX_BOOL& bExact)
{
CFX_ByteString face = cstr_face;
int iBaseFont;
@@ -57,7 +57,7 @@ void* CFX_MacFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pit
if (iBaseFont < 12) {
return GetFont(face);
}
- FX_LPVOID p;
+ void* p;
if (m_FontList.Lookup(face, p)) {
return p;
}
diff --git a/core/src/fxge/apple/fx_quartz_device.cpp b/core/src/fxge/apple/fx_quartz_device.cpp
index fa63d22028..7ecce7e0ef 100644
--- a/core/src/fxge/apple/fx_quartz_device.cpp
+++ b/core/src/fxge/apple/fx_quartz_device.cpp
@@ -48,7 +48,7 @@ void CQuartz2D::destroyGraphics(void* graphics)
CGContextRelease((CGContextRef) graphics);
}
}
-void* CQuartz2D::CreateFont(FX_LPCBYTE pFontData, FX_DWORD dwFontSize)
+void* CQuartz2D::CreateFont(const uint8_t* pFontData, FX_DWORD dwFontSize)
{
CGDataProviderRef pDataProvider = CGDataProviderCreateWithData(NULL, pFontData, (size_t)dwFontSize, NULL);
if (NULL == pDataProvider) {
@@ -541,7 +541,7 @@ FX_BOOL CFX_QuartzDeviceDriver::GetDIBits(CFX_DIBitmap* bitmap,
CGImageRelease(image);
if (bitmap->HasAlpha()) {
for (int row = 0; row < bitmap->GetHeight(); row ++) {
- FX_LPBYTE pScanline = (FX_LPBYTE)bitmap->GetScanline(row);
+ uint8_t* pScanline = (uint8_t*)bitmap->GetScanline(row);
for (int col = 0; col < bitmap->GetWidth(); col ++) {
if (pScanline[3] > 0) {
pScanline[0] = (pScanline[0] * 255.f / pScanline[3] + .5f);
@@ -654,7 +654,7 @@ FX_BOOL CFX_QuartzDeviceDriver::SetDIBits(const CFX_DIBSource* pBitmap,
}
}
for (int row = 0; row < pBitmap1->GetHeight(); row ++) {
- FX_LPBYTE pScanline = (FX_LPBYTE)pBitmap1->GetScanline(row);
+ uint8_t* pScanline = (uint8_t*)pBitmap1->GetScanline(row);
for (int col = 0; col < pBitmap1->GetWidth(); col ++) {
pScanline[0] = (uint8_t)(pScanline[0] * pScanline[3] / 255.f + .5f);
pScanline[1] = (uint8_t)(pScanline[1] * pScanline[3] / 255.f + .5f);
@@ -779,7 +779,7 @@ FX_BOOL CFX_QuartzDeviceDriver::StretchDIBits(const CFX_DIBSource* pBitmap,
}
}
for (int row = 0; row < pBitmap1->GetHeight(); row ++) {
- FX_LPBYTE pScanline = (FX_LPBYTE)pBitmap1->GetScanline(row);
+ uint8_t* pScanline = (uint8_t*)pBitmap1->GetScanline(row);
for (int col = 0; col < pBitmap1->GetWidth(); col ++) {
pScanline[0] = (uint8_t)(pScanline[0] * pScanline[3] / 255.f + .5f);
pScanline[1] = (uint8_t)(pScanline[1] * pScanline[3] / 255.f + .5f);
diff --git a/core/src/fxge/dib/dib_int.h b/core/src/fxge/dib/dib_int.h
index c82a0378b8..9eeb0fddc0 100644
--- a/core/src/fxge/dib/dib_int.h
+++ b/core/src/fxge/dib/dib_int.h
@@ -54,7 +54,7 @@ public:
return (PixelWeight*)(m_pWeightTables + (pixel - m_DestMin) * m_ItemSize);
}
int m_DestMin, m_ItemSize;
- FX_LPBYTE m_pWeightTables;
+ uint8_t* m_pWeightTables;
};
class CStretchEngine
{
@@ -70,8 +70,8 @@ public:
IFX_ScanlineComposer* m_pDestBitmap;
int m_DestWidth, m_DestHeight;
FX_RECT m_DestClip;
- FX_LPBYTE m_pDestScanline;
- FX_LPBYTE m_pDestMaskScanline;
+ uint8_t* m_pDestScanline;
+ uint8_t* m_pDestMaskScanline;
FX_RECT m_SrcClip;
const CFX_DIBSource* m_pSource;
FX_DWORD* m_pSrcPalette;
diff --git a/core/src/fxge/dib/fx_dib_composite.cpp b/core/src/fxge/dib/fx_dib_composite.cpp
index 970325a2d4..aeee91bb4b 100644
--- a/core/src/fxge/dib/fx_dib_composite.cpp
+++ b/core/src/fxge/dib/fx_dib_composite.cpp
@@ -227,7 +227,7 @@ static _RGB _SetSat(_RGB color, int s)
}
return color;
}
-void _RGB_Blend(int blend_mode, FX_LPCBYTE src_scan, uint8_t* dest_scan, int results[3])
+void _RGB_Blend(int blend_mode, const uint8_t* src_scan, uint8_t* dest_scan, int results[3])
{
_RGB src, back, result;
src.red = src_scan[2];
@@ -254,7 +254,7 @@ void _RGB_Blend(int blend_mode, FX_LPCBYTE src_scan, uint8_t* dest_scan, int res
results[1] = result.green;
results[2] = result.red;
}
-inline void _CompositeRow_Argb2Mask(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int pixel_count, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_Argb2Mask(uint8_t* dest_scan, const uint8_t* src_scan, int pixel_count, const uint8_t* clip_scan)
{
src_scan += 3;
for (int col = 0; col < pixel_count; col ++) {
@@ -272,7 +272,7 @@ inline void _CompositeRow_Argb2Mask(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, in
src_scan += 4;
}
}
-void _CompositeRow_Rgba2Mask(FX_LPBYTE dest_scan, FX_LPCBYTE src_alpha_scan, int pixel_count, FX_LPCBYTE clip_scan)
+void _CompositeRow_Rgba2Mask(uint8_t* dest_scan, const uint8_t* src_alpha_scan, int pixel_count, const uint8_t* clip_scan)
{
for (int col = 0; col < pixel_count; col ++) {
int src_alpha = *src_alpha_scan++;
@@ -288,7 +288,7 @@ void _CompositeRow_Rgba2Mask(FX_LPBYTE dest_scan, FX_LPCBYTE src_alpha_scan, int
dest_scan ++;
}
}
-void _CompositeRow_Rgb2Mask(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, FX_LPCBYTE clip_scan)
+void _CompositeRow_Rgb2Mask(uint8_t* dest_scan, const uint8_t* src_scan, int width, const uint8_t* clip_scan)
{
if (clip_scan) {
for (int i = 0; i < width; i ++) {
@@ -300,8 +300,8 @@ void _CompositeRow_Rgb2Mask(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width,
FXSYS_memset8(dest_scan, 0xff, width);
}
}
-void _CompositeRow_Argb2Graya(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int pixel_count, int blend_type, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_alpha_scan, FX_LPBYTE dst_alpha_scan, void* pIccTransform)
+void _CompositeRow_Argb2Graya(uint8_t* dest_scan, const uint8_t* src_scan, int pixel_count, int blend_type, const uint8_t* clip_scan,
+ const uint8_t* src_alpha_scan, uint8_t* dst_alpha_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = NULL;
if (pIccTransform) {
@@ -493,9 +493,9 @@ void _CompositeRow_Argb2Graya(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int pixe
src_scan += 4;
}
}
-inline void _CompositeRow_Argb2Gray(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int pixel_count,
- int blend_type, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_alpha_scan, void* pIccTransform)
+inline void _CompositeRow_Argb2Gray(uint8_t* dest_scan, const uint8_t* src_scan, int pixel_count,
+ int blend_type, const uint8_t* clip_scan,
+ const uint8_t* src_alpha_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = NULL;
uint8_t gray;
@@ -584,8 +584,8 @@ inline void _CompositeRow_Argb2Gray(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, in
src_scan += 4;
}
}
-inline void _CompositeRow_Rgb2Gray(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_Bpp, int pixel_count,
- int blend_type, FX_LPCBYTE clip_scan,
+inline void _CompositeRow_Rgb2Gray(uint8_t* dest_scan, const uint8_t* src_scan, int src_Bpp, int pixel_count,
+ int blend_type, const uint8_t* clip_scan,
void* pIccTransform)
{
ICodec_IccModule* pIccModule = NULL;
@@ -631,9 +631,9 @@ inline void _CompositeRow_Rgb2Gray(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int
src_scan += src_Bpp;
}
}
-void _CompositeRow_Rgb2Graya(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_Bpp, int pixel_count,
- int blend_type, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan, void* pIccTransform)
+void _CompositeRow_Rgb2Graya(uint8_t* dest_scan, const uint8_t* src_scan, int src_Bpp, int pixel_count,
+ int blend_type, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = NULL;
if (pIccTransform) {
@@ -721,8 +721,8 @@ void _CompositeRow_Rgb2Graya(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_B
src_scan += src_Bpp;
}
}
-void _CompositeRow_Argb2Argb(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int pixel_count, int blend_type, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan, FX_LPCBYTE src_alpha_scan)
+void _CompositeRow_Argb2Argb(uint8_t* dest_scan, const uint8_t* src_scan, int pixel_count, int blend_type, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan, const uint8_t* src_alpha_scan)
{
int blended_colors[3];
FX_BOOL bNonseparableBlend = blend_type >= FXDIB_BLEND_NONSEPARABLE;
@@ -928,8 +928,8 @@ void _CompositeRow_Argb2Argb(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int pixel
}
}
}
-void _CompositeRow_Rgb2Argb_Blend_NoClip(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int src_Bpp,
- FX_LPBYTE dest_alpha_scan)
+void _CompositeRow_Rgb2Argb_Blend_NoClip(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int src_Bpp,
+ uint8_t* dest_alpha_scan)
{
int blended_colors[3];
FX_BOOL bNonseparableBlend = blend_type >= FXDIB_BLEND_NONSEPARABLE;
@@ -989,8 +989,8 @@ void _CompositeRow_Rgb2Argb_Blend_NoClip(FX_LPBYTE dest_scan, FX_LPCBYTE src_sca
}
}
}
-inline void _CompositeRow_Rgb2Argb_Blend_Clip(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int src_Bpp, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan)
+inline void _CompositeRow_Rgb2Argb_Blend_Clip(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int src_Bpp, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan)
{
int blended_colors[3];
FX_BOOL bNonseparableBlend = blend_type >= FXDIB_BLEND_NONSEPARABLE;
@@ -1067,8 +1067,8 @@ inline void _CompositeRow_Rgb2Argb_Blend_Clip(FX_LPBYTE dest_scan, FX_LPCBYTE sr
}
}
}
-inline void _CompositeRow_Rgb2Argb_NoBlend_Clip(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int src_Bpp, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan)
+inline void _CompositeRow_Rgb2Argb_NoBlend_Clip(uint8_t* dest_scan, const uint8_t* src_scan, int width, int src_Bpp, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan)
{
int src_gap = src_Bpp - 3;
if (dest_alpha_scan == NULL) {
@@ -1129,8 +1129,8 @@ inline void _CompositeRow_Rgb2Argb_NoBlend_Clip(FX_LPBYTE dest_scan, FX_LPCBYTE
}
}
}
-inline void _CompositeRow_Rgb2Argb_NoBlend_NoClip(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int src_Bpp,
- FX_LPBYTE dest_alpha_scan)
+inline void _CompositeRow_Rgb2Argb_NoBlend_NoClip(uint8_t* dest_scan, const uint8_t* src_scan, int width, int src_Bpp,
+ uint8_t* dest_alpha_scan)
{
if (dest_alpha_scan == NULL) {
for (int col = 0; col < width; col ++) {
@@ -1153,8 +1153,8 @@ inline void _CompositeRow_Rgb2Argb_NoBlend_NoClip(FX_LPBYTE dest_scan, FX_LPCBYT
}
}
}
-inline void _CompositeRow_Argb2Rgb_Blend(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int dest_Bpp, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_alpha_scan)
+inline void _CompositeRow_Argb2Rgb_Blend(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int dest_Bpp, const uint8_t* clip_scan,
+ const uint8_t* src_alpha_scan)
{
int blended_colors[3];
FX_BOOL bNonseparableBlend = blend_type >= FXDIB_BLEND_NONSEPARABLE;
@@ -1214,8 +1214,8 @@ inline void _CompositeRow_Argb2Rgb_Blend(FX_LPBYTE dest_scan, FX_LPCBYTE src_sca
}
}
}
-inline void _CompositeRow_Argb2Rgb_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int dest_Bpp, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_alpha_scan)
+inline void _CompositeRow_Argb2Rgb_NoBlend(uint8_t* dest_scan, const uint8_t* src_scan, int width, int dest_Bpp, const uint8_t* clip_scan,
+ const uint8_t* src_alpha_scan)
{
int dest_gap = dest_Bpp - 3;
if (src_alpha_scan == NULL) {
@@ -1276,7 +1276,7 @@ inline void _CompositeRow_Argb2Rgb_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE src_s
}
}
}
-inline void _CompositeRow_Rgb2Rgb_Blend_NoClip(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int dest_Bpp, int src_Bpp)
+inline void _CompositeRow_Rgb2Rgb_Blend_NoClip(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int dest_Bpp, int src_Bpp)
{
int blended_colors[3];
FX_BOOL bNonseparableBlend = blend_type >= FXDIB_BLEND_NONSEPARABLE;
@@ -1299,7 +1299,7 @@ inline void _CompositeRow_Rgb2Rgb_Blend_NoClip(FX_LPBYTE dest_scan, FX_LPCBYTE s
src_scan += src_gap;
}
}
-inline void _CompositeRow_Rgb2Rgb_Blend_Clip(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int dest_Bpp, int src_Bpp, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_Rgb2Rgb_Blend_Clip(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int dest_Bpp, int src_Bpp, const uint8_t* clip_scan)
{
int blended_colors[3];
FX_BOOL bNonseparableBlend = blend_type >= FXDIB_BLEND_NONSEPARABLE;
@@ -1328,7 +1328,7 @@ inline void _CompositeRow_Rgb2Rgb_Blend_Clip(FX_LPBYTE dest_scan, FX_LPCBYTE src
src_scan += src_gap;
}
}
-inline void _CompositeRow_Rgb2Rgb_NoBlend_NoClip(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int dest_Bpp, int src_Bpp)
+inline void _CompositeRow_Rgb2Rgb_NoBlend_NoClip(uint8_t* dest_scan, const uint8_t* src_scan, int width, int dest_Bpp, int src_Bpp)
{
if (dest_Bpp == src_Bpp) {
FXSYS_memcpy32(dest_scan, src_scan, width * dest_Bpp);
@@ -1342,7 +1342,7 @@ inline void _CompositeRow_Rgb2Rgb_NoBlend_NoClip(FX_LPBYTE dest_scan, FX_LPCBYTE
src_scan += src_Bpp;
}
}
-inline void _CompositeRow_Rgb2Rgb_NoBlend_Clip(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int dest_Bpp, int src_Bpp, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_Rgb2Rgb_NoBlend_Clip(uint8_t* dest_scan, const uint8_t* src_scan, int width, int dest_Bpp, int src_Bpp, const uint8_t* clip_scan)
{
for (int col = 0; col < width; col ++) {
int src_alpha = clip_scan[col];
@@ -1366,10 +1366,10 @@ inline void _CompositeRow_Rgb2Rgb_NoBlend_Clip(FX_LPBYTE dest_scan, FX_LPCBYTE s
src_scan += src_Bpp;
}
}
-void _CompositeRow_Argb2Argb_Transform(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int pixel_count, int blend_type, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan, FX_LPCBYTE src_alpha_scan, FX_LPBYTE src_cache_scan, void* pIccTransform)
+void _CompositeRow_Argb2Argb_Transform(uint8_t* dest_scan, const uint8_t* src_scan, int pixel_count, int blend_type, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan, const uint8_t* src_alpha_scan, uint8_t* src_cache_scan, void* pIccTransform)
{
- FX_LPBYTE dp = src_cache_scan;
+ uint8_t* dp = src_cache_scan;
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
if (src_alpha_scan) {
if (dest_alpha_scan == NULL) {
@@ -1451,14 +1451,14 @@ void _CompositeRow_Argb2Argb_Transform(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan,
}
_CompositeRow_Argb2Argb(dest_scan, src_cache_scan, pixel_count, blend_type, clip_scan, dest_alpha_scan, src_alpha_scan);
}
-void _CompositeRow_Rgb2Argb_Blend_NoClip_Transform(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int src_Bpp,
- FX_LPBYTE dest_alpha_scan, FX_LPBYTE src_cache_scan, void* pIccTransform)
+void _CompositeRow_Rgb2Argb_Blend_NoClip_Transform(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int src_Bpp,
+ uint8_t* dest_alpha_scan, uint8_t* src_cache_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
if (src_Bpp == 3) {
pIccModule->TranslateScanline(pIccTransform, src_cache_scan, src_scan, width);
} else {
- FX_LPBYTE dp = src_cache_scan;
+ uint8_t* dp = src_cache_scan;
for (int col = 0; col < width; col ++) {
pIccModule->TranslateScanline(pIccTransform, dp, src_scan, 1);
src_scan += 4;
@@ -1467,14 +1467,14 @@ void _CompositeRow_Rgb2Argb_Blend_NoClip_Transform(FX_LPBYTE dest_scan, FX_LPCBY
}
_CompositeRow_Rgb2Argb_Blend_NoClip(dest_scan, src_cache_scan, width, blend_type, 3, dest_alpha_scan);
}
-inline void _CompositeRow_Rgb2Argb_Blend_Clip_Transform(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int src_Bpp, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan, FX_LPBYTE src_cache_scan, void* pIccTransform)
+inline void _CompositeRow_Rgb2Argb_Blend_Clip_Transform(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int src_Bpp, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan, uint8_t* src_cache_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
if (src_Bpp == 3) {
pIccModule->TranslateScanline(pIccTransform, src_cache_scan, src_scan, width);
} else {
- FX_LPBYTE dp = src_cache_scan;
+ uint8_t* dp = src_cache_scan;
for (int col = 0; col < width; col ++) {
pIccModule->TranslateScanline(pIccTransform, dp, src_scan, 1);
src_scan += 4;
@@ -1483,14 +1483,14 @@ inline void _CompositeRow_Rgb2Argb_Blend_Clip_Transform(FX_LPBYTE dest_scan, FX_
}
_CompositeRow_Rgb2Argb_Blend_Clip(dest_scan, src_cache_scan, width, blend_type, 3, clip_scan, dest_alpha_scan);
}
-inline void _CompositeRow_Rgb2Argb_NoBlend_Clip_Transform(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int src_Bpp, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan, FX_LPBYTE src_cache_scan, void* pIccTransform)
+inline void _CompositeRow_Rgb2Argb_NoBlend_Clip_Transform(uint8_t* dest_scan, const uint8_t* src_scan, int width, int src_Bpp, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan, uint8_t* src_cache_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
if (src_Bpp == 3) {
pIccModule->TranslateScanline(pIccTransform, src_cache_scan, src_scan, width);
} else {
- FX_LPBYTE dp = src_cache_scan;
+ uint8_t* dp = src_cache_scan;
for (int col = 0; col < width; col ++) {
pIccModule->TranslateScanline(pIccTransform, dp, src_scan, 1);
src_scan += 4;
@@ -1499,14 +1499,14 @@ inline void _CompositeRow_Rgb2Argb_NoBlend_Clip_Transform(FX_LPBYTE dest_scan, F
}
_CompositeRow_Rgb2Argb_NoBlend_Clip(dest_scan, src_cache_scan, width, 3, clip_scan, dest_alpha_scan);
}
-inline void _CompositeRow_Rgb2Argb_NoBlend_NoClip_Transform(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int src_Bpp,
- FX_LPBYTE dest_alpha_scan, FX_LPBYTE src_cache_scan, void* pIccTransform)
+inline void _CompositeRow_Rgb2Argb_NoBlend_NoClip_Transform(uint8_t* dest_scan, const uint8_t* src_scan, int width, int src_Bpp,
+ uint8_t* dest_alpha_scan, uint8_t* src_cache_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
if (src_Bpp == 3) {
pIccModule->TranslateScanline(pIccTransform, src_cache_scan, src_scan, width);
} else {
- FX_LPBYTE dp = src_cache_scan;
+ uint8_t* dp = src_cache_scan;
for (int col = 0; col < width; col ++) {
pIccModule->TranslateScanline(pIccTransform, dp, src_scan, 1);
src_scan += 4;
@@ -1515,8 +1515,8 @@ inline void _CompositeRow_Rgb2Argb_NoBlend_NoClip_Transform(FX_LPBYTE dest_scan,
}
_CompositeRow_Rgb2Argb_NoBlend_NoClip(dest_scan, src_cache_scan, width, 3, dest_alpha_scan);
}
-inline void _CompositeRow_Argb2Rgb_Blend_Transform(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int dest_Bpp, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_alpha_scan, FX_LPBYTE src_cache_scan, void* pIccTransform)
+inline void _CompositeRow_Argb2Rgb_Blend_Transform(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int dest_Bpp, const uint8_t* clip_scan,
+ const uint8_t* src_alpha_scan, uint8_t* src_cache_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
if (src_alpha_scan) {
@@ -1556,8 +1556,8 @@ inline void _CompositeRow_Argb2Rgb_Blend_Transform(FX_LPBYTE dest_scan, FX_LPCBY
}
_CompositeRow_Argb2Rgb_Blend(dest_scan, src_cache_scan, width, blend_type, dest_Bpp, clip_scan, src_alpha_scan);
}
-inline void _CompositeRow_Argb2Rgb_NoBlend_Transform(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int dest_Bpp, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_alpha_scan, FX_LPBYTE src_cache_scan, void* pIccTransform)
+inline void _CompositeRow_Argb2Rgb_NoBlend_Transform(uint8_t* dest_scan, const uint8_t* src_scan, int width, int dest_Bpp, const uint8_t* clip_scan,
+ const uint8_t* src_alpha_scan, uint8_t* src_cache_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
if (src_alpha_scan) {
@@ -1596,14 +1596,14 @@ inline void _CompositeRow_Argb2Rgb_NoBlend_Transform(FX_LPBYTE dest_scan, FX_LPC
}
_CompositeRow_Argb2Rgb_NoBlend(dest_scan, src_cache_scan, width, dest_Bpp, clip_scan, src_alpha_scan);
}
-inline void _CompositeRow_Rgb2Rgb_Blend_NoClip_Transform(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int dest_Bpp, int src_Bpp,
- FX_LPBYTE src_cache_scan, void* pIccTransform)
+inline void _CompositeRow_Rgb2Rgb_Blend_NoClip_Transform(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int dest_Bpp, int src_Bpp,
+ uint8_t* src_cache_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
if (src_Bpp == 3) {
pIccModule->TranslateScanline(pIccTransform, src_cache_scan, src_scan, width);
} else {
- FX_LPBYTE dp = src_cache_scan;
+ uint8_t* dp = src_cache_scan;
for (int col = 0; col < width; col ++) {
pIccModule->TranslateScanline(pIccTransform, dp, src_scan, 1);
src_scan += 4;
@@ -1612,14 +1612,14 @@ inline void _CompositeRow_Rgb2Rgb_Blend_NoClip_Transform(FX_LPBYTE dest_scan, FX
}
_CompositeRow_Rgb2Rgb_Blend_NoClip(dest_scan, src_cache_scan, width, blend_type, dest_Bpp, 3);
}
-inline void _CompositeRow_Rgb2Rgb_Blend_Clip_Transform(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int dest_Bpp, int src_Bpp, FX_LPCBYTE clip_scan,
- FX_LPBYTE src_cache_scan, void* pIccTransform)
+inline void _CompositeRow_Rgb2Rgb_Blend_Clip_Transform(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int dest_Bpp, int src_Bpp, const uint8_t* clip_scan,
+ uint8_t* src_cache_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
if (src_Bpp == 3) {
pIccModule->TranslateScanline(pIccTransform, src_cache_scan, src_scan, width);
} else {
- FX_LPBYTE dp = src_cache_scan;
+ uint8_t* dp = src_cache_scan;
for (int col = 0; col < width; col ++) {
pIccModule->TranslateScanline(pIccTransform, dp, src_scan, 1);
src_scan += 4;
@@ -1628,14 +1628,14 @@ inline void _CompositeRow_Rgb2Rgb_Blend_Clip_Transform(FX_LPBYTE dest_scan, FX_L
}
_CompositeRow_Rgb2Rgb_Blend_Clip(dest_scan, src_cache_scan, width, blend_type, dest_Bpp, 3, clip_scan);
}
-inline void _CompositeRow_Rgb2Rgb_NoBlend_NoClip_Transform(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int dest_Bpp, int src_Bpp,
- FX_LPBYTE src_cache_scan, void* pIccTransform)
+inline void _CompositeRow_Rgb2Rgb_NoBlend_NoClip_Transform(uint8_t* dest_scan, const uint8_t* src_scan, int width, int dest_Bpp, int src_Bpp,
+ uint8_t* src_cache_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
if (src_Bpp == 3) {
pIccModule->TranslateScanline(pIccTransform, src_cache_scan, src_scan, width);
} else {
- FX_LPBYTE dp = src_cache_scan;
+ uint8_t* dp = src_cache_scan;
for (int col = 0; col < width; col ++) {
pIccModule->TranslateScanline(pIccTransform, dp, src_scan, 1);
src_scan += 4;
@@ -1644,14 +1644,14 @@ inline void _CompositeRow_Rgb2Rgb_NoBlend_NoClip_Transform(FX_LPBYTE dest_scan,
}
_CompositeRow_Rgb2Rgb_NoBlend_NoClip(dest_scan, src_cache_scan, width, dest_Bpp, 3);
}
-inline void _CompositeRow_Rgb2Rgb_NoBlend_Clip_Transform(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int dest_Bpp, int src_Bpp, FX_LPCBYTE clip_scan,
- FX_LPBYTE src_cache_scan, void* pIccTransform)
+inline void _CompositeRow_Rgb2Rgb_NoBlend_Clip_Transform(uint8_t* dest_scan, const uint8_t* src_scan, int width, int dest_Bpp, int src_Bpp, const uint8_t* clip_scan,
+ uint8_t* src_cache_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
if (src_Bpp == 3) {
pIccModule->TranslateScanline(pIccTransform, src_cache_scan, src_scan, width);
} else {
- FX_LPBYTE dp = src_cache_scan;
+ uint8_t* dp = src_cache_scan;
for (int col = 0; col < width; col ++) {
pIccModule->TranslateScanline(pIccTransform, dp, src_scan, 1);
src_scan += 4;
@@ -1660,9 +1660,9 @@ inline void _CompositeRow_Rgb2Rgb_NoBlend_Clip_Transform(FX_LPBYTE dest_scan, FX
}
_CompositeRow_Rgb2Rgb_NoBlend_Clip(dest_scan, src_cache_scan, width, dest_Bpp, 3, clip_scan);
}
-inline void _CompositeRow_8bppPal2Gray(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, FX_LPCBYTE pPalette, int pixel_count,
- int blend_type, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_alpha_scan)
+inline void _CompositeRow_8bppPal2Gray(uint8_t* dest_scan, const uint8_t* src_scan, const uint8_t* pPalette, int pixel_count,
+ int blend_type, const uint8_t* clip_scan,
+ const uint8_t* src_alpha_scan)
{
if (src_alpha_scan) {
if (blend_type) {
@@ -1734,9 +1734,9 @@ inline void _CompositeRow_8bppPal2Gray(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan,
}
}
}
-inline void _CompositeRow_8bppPal2Graya(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, FX_LPCBYTE pPalette, int pixel_count,
- int blend_type, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan, FX_LPCBYTE src_alpha_scan)
+inline void _CompositeRow_8bppPal2Graya(uint8_t* dest_scan, const uint8_t* src_scan, const uint8_t* pPalette, int pixel_count,
+ int blend_type, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan, const uint8_t* src_alpha_scan)
{
if (src_alpha_scan) {
if (blend_type) {
@@ -1866,8 +1866,8 @@ inline void _CompositeRow_8bppPal2Graya(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan
}
}
}
-inline void _CompositeRow_1bppPal2Gray(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_left,
- FX_LPCBYTE pPalette, int pixel_count, int blend_type, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_1bppPal2Gray(uint8_t* dest_scan, const uint8_t* src_scan, int src_left,
+ const uint8_t* pPalette, int pixel_count, int blend_type, const uint8_t* clip_scan)
{
int reset_gray = pPalette[0];
int set_gray = pPalette[1];
@@ -1899,9 +1899,9 @@ inline void _CompositeRow_1bppPal2Gray(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan,
dest_scan ++;
}
}
-inline void _CompositeRow_1bppPal2Graya(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_left,
- FX_LPCBYTE pPalette, int pixel_count, int blend_type, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan)
+inline void _CompositeRow_1bppPal2Graya(uint8_t* dest_scan, const uint8_t* src_scan, int src_left,
+ const uint8_t* pPalette, int pixel_count, int blend_type, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan)
{
int reset_gray = pPalette[0];
int set_gray = pPalette[1];
@@ -1955,9 +1955,9 @@ inline void _CompositeRow_1bppPal2Graya(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan
dest_scan ++;
}
}
-inline void _CompositeRow_8bppRgb2Rgb_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, FX_DWORD* pPalette, int pixel_count,
- int DestBpp, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_alpha_scan)
+inline void _CompositeRow_8bppRgb2Rgb_NoBlend(uint8_t* dest_scan, const uint8_t* src_scan, FX_DWORD* pPalette, int pixel_count,
+ int DestBpp, const uint8_t* clip_scan,
+ const uint8_t* src_alpha_scan)
{
if (src_alpha_scan) {
int dest_gap = DestBpp - 3;
@@ -2019,8 +2019,8 @@ inline void _CompositeRow_8bppRgb2Rgb_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE sr
}
}
}
-inline void _CompositeRow_1bppRgb2Rgb_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_left,
- FX_DWORD* pPalette, int pixel_count, int DestBpp, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_1bppRgb2Rgb_NoBlend(uint8_t* dest_scan, const uint8_t* src_scan, int src_left,
+ FX_DWORD* pPalette, int pixel_count, int DestBpp, const uint8_t* clip_scan)
{
int reset_r, reset_g, reset_b;
int set_r, set_g, set_b;
@@ -2058,9 +2058,9 @@ inline void _CompositeRow_1bppRgb2Rgb_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE sr
}
}
}
-inline void _CompositeRow_8bppRgb2Argb_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width,
- FX_DWORD* pPalette, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_alpha_scan)
+inline void _CompositeRow_8bppRgb2Argb_NoBlend(uint8_t* dest_scan, const uint8_t* src_scan, int width,
+ FX_DWORD* pPalette, const uint8_t* clip_scan,
+ const uint8_t* src_alpha_scan)
{
if (src_alpha_scan) {
for (int col = 0; col < width; col ++) {
@@ -2136,9 +2136,9 @@ inline void _CompositeRow_8bppRgb2Argb_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE s
src_scan ++;
}
}
-void _CompositeRow_8bppRgb2Rgba_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width,
- FX_DWORD* pPalette, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan, FX_LPCBYTE src_alpha_scan)
+void _CompositeRow_8bppRgb2Rgba_NoBlend(uint8_t* dest_scan, const uint8_t* src_scan, int width,
+ FX_DWORD* pPalette, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan, const uint8_t* src_alpha_scan)
{
if (src_alpha_scan) {
for (int col = 0; col < width; col ++) {
@@ -2216,8 +2216,8 @@ void _CompositeRow_8bppRgb2Rgba_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan
src_scan ++;
}
}
-inline void _CompositeRow_1bppRgb2Argb_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_left, int width,
- FX_DWORD* pPalette, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_1bppRgb2Argb_NoBlend(uint8_t* dest_scan, const uint8_t* src_scan, int src_left, int width,
+ FX_DWORD* pPalette, const uint8_t* clip_scan)
{
int reset_r, reset_g, reset_b;
int set_r, set_g, set_b;
@@ -2263,9 +2263,9 @@ inline void _CompositeRow_1bppRgb2Argb_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE s
dest_scan ++;
}
}
-void _CompositeRow_1bppRgb2Rgba_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_left, int width,
- FX_DWORD* pPalette, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan)
+void _CompositeRow_1bppRgb2Rgba_NoBlend(uint8_t* dest_scan, const uint8_t* src_scan, int src_left, int width,
+ FX_DWORD* pPalette, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan)
{
int reset_r, reset_g, reset_b;
int set_r, set_g, set_b;
@@ -2311,8 +2311,8 @@ void _CompositeRow_1bppRgb2Rgba_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan
dest_scan ++;
}
}
-void _CompositeRow_ByteMask2Argb(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_r, int src_g, int src_b, int pixel_count,
- int blend_type, FX_LPCBYTE clip_scan)
+void _CompositeRow_ByteMask2Argb(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_r, int src_g, int src_b, int pixel_count,
+ int blend_type, const uint8_t* clip_scan)
{
for (int col = 0; col < pixel_count; col ++) {
int src_alpha;
@@ -2368,9 +2368,9 @@ void _CompositeRow_ByteMask2Argb(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int m
dest_scan += 2;
}
}
-void _CompositeRow_ByteMask2Rgba(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_r, int src_g, int src_b, int pixel_count,
- int blend_type, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan)
+void _CompositeRow_ByteMask2Rgba(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_r, int src_g, int src_b, int pixel_count,
+ int blend_type, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan)
{
for (int col = 0; col < pixel_count; col ++) {
int src_alpha;
@@ -2431,8 +2431,8 @@ void _CompositeRow_ByteMask2Rgba(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int m
}
}
}
-void _CompositeRow_ByteMask2Rgb(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_r, int src_g, int src_b, int pixel_count,
- int blend_type, int Bpp, FX_LPCBYTE clip_scan)
+void _CompositeRow_ByteMask2Rgb(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_r, int src_g, int src_b, int pixel_count,
+ int blend_type, int Bpp, const uint8_t* clip_scan)
{
for (int col = 0; col < pixel_count; col ++) {
int src_alpha;
@@ -2476,8 +2476,8 @@ void _CompositeRow_ByteMask2Rgb(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int ma
dest_scan += Bpp - 2;
}
}
-void _CompositeRow_ByteMask2Mask(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int pixel_count,
- FX_LPCBYTE clip_scan)
+void _CompositeRow_ByteMask2Mask(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int pixel_count,
+ const uint8_t* clip_scan)
{
for (int col = 0; col < pixel_count; col ++) {
int src_alpha;
@@ -2495,8 +2495,8 @@ void _CompositeRow_ByteMask2Mask(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int m
dest_scan ++;
}
}
-void _CompositeRow_ByteMask2Gray(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_gray,
- int pixel_count, FX_LPCBYTE clip_scan)
+void _CompositeRow_ByteMask2Gray(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_gray,
+ int pixel_count, const uint8_t* clip_scan)
{
for (int col = 0; col < pixel_count; col ++) {
int src_alpha;
@@ -2511,9 +2511,9 @@ void _CompositeRow_ByteMask2Gray(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int m
dest_scan ++;
}
}
-void _CompositeRow_ByteMask2Graya(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_gray,
- int pixel_count, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan)
+void _CompositeRow_ByteMask2Graya(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_gray,
+ int pixel_count, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan)
{
for (int col = 0; col < pixel_count; col ++) {
int src_alpha;
@@ -2540,8 +2540,8 @@ void _CompositeRow_ByteMask2Graya(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int
dest_scan ++;
}
}
-void _CompositeRow_BitMask2Argb(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_r, int src_g, int src_b,
- int src_left, int pixel_count, int blend_type, FX_LPCBYTE clip_scan)
+void _CompositeRow_BitMask2Argb(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_r, int src_g, int src_b,
+ int src_left, int pixel_count, int blend_type, const uint8_t* clip_scan)
{
if (blend_type == FXDIB_BLEND_NORMAL && clip_scan == NULL && mask_alpha == 255) {
FX_ARGB argb = FXARGB_MAKE(0xff, src_r, src_g, src_b);
@@ -2607,9 +2607,9 @@ void _CompositeRow_BitMask2Argb(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int ma
dest_scan += 2;
}
}
-void _CompositeRow_BitMask2Rgba(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_r, int src_g, int src_b,
- int src_left, int pixel_count, int blend_type, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan)
+void _CompositeRow_BitMask2Rgba(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_r, int src_g, int src_b,
+ int src_left, int pixel_count, int blend_type, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan)
{
if (blend_type == FXDIB_BLEND_NORMAL && clip_scan == NULL && mask_alpha == 255) {
for (int col = 0; col < pixel_count; col ++) {
@@ -2683,8 +2683,8 @@ void _CompositeRow_BitMask2Rgba(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int ma
}
}
}
-void _CompositeRow_BitMask2Rgb(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_r, int src_g, int src_b,
- int src_left, int pixel_count, int blend_type, int Bpp, FX_LPCBYTE clip_scan)
+void _CompositeRow_BitMask2Rgb(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_r, int src_g, int src_b,
+ int src_left, int pixel_count, int blend_type, int Bpp, const uint8_t* clip_scan)
{
if (blend_type == FXDIB_BLEND_NORMAL && clip_scan == NULL && mask_alpha == 255) {
for (int col = 0; col < pixel_count; col ++) {
@@ -2743,8 +2743,8 @@ void _CompositeRow_BitMask2Rgb(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mas
dest_scan += Bpp - 2;
}
}
-void _CompositeRow_BitMask2Mask(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_left,
- int pixel_count, FX_LPCBYTE clip_scan)
+void _CompositeRow_BitMask2Mask(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_left,
+ int pixel_count, const uint8_t* clip_scan)
{
for (int col = 0; col < pixel_count; col ++) {
if (!(src_scan[(src_left + col) / 8] & (1 << (7 - (src_left + col) % 8)))) {
@@ -2766,8 +2766,8 @@ void _CompositeRow_BitMask2Mask(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int ma
dest_scan ++;
}
}
-void _CompositeRow_BitMask2Gray(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_gray,
- int src_left, int pixel_count, FX_LPCBYTE clip_scan)
+void _CompositeRow_BitMask2Gray(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_gray,
+ int src_left, int pixel_count, const uint8_t* clip_scan)
{
for (int col = 0; col < pixel_count; col ++) {
if (!(src_scan[(src_left + col) / 8] & (1 << (7 - (src_left + col) % 8)))) {
@@ -2786,9 +2786,9 @@ void _CompositeRow_BitMask2Gray(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int ma
dest_scan ++;
}
}
-void _CompositeRow_BitMask2Graya(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_gray,
- int src_left, int pixel_count, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan)
+void _CompositeRow_BitMask2Graya(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_gray,
+ int src_left, int pixel_count, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan)
{
for (int col = 0; col < pixel_count; col ++) {
if (!(src_scan[(src_left + col) / 8] & (1 << (7 - (src_left + col) % 8)))) {
@@ -2820,7 +2820,7 @@ void _CompositeRow_BitMask2Graya(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int m
dest_scan ++;
}
}
-void _CompositeRow_Argb2Argb_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int pixel_count, int blend_type, FX_LPCBYTE clip_scan)
+void _CompositeRow_Argb2Argb_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int pixel_count, int blend_type, const uint8_t* clip_scan)
{
int blended_colors[3];
FX_BOOL bNonseparableBlend = blend_type >= FXDIB_BLEND_NONSEPARABLE;
@@ -2877,7 +2877,7 @@ void _CompositeRow_Argb2Argb_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_sc
src_scan++;
}
}
-void _CompositeRow_Rgb2Argb_Blend_NoClip_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int src_Bpp)
+void _CompositeRow_Rgb2Argb_Blend_NoClip_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int src_Bpp)
{
int blended_colors[3];
FX_BOOL bNonseparableBlend = blend_type >= FXDIB_BLEND_NONSEPARABLE;
@@ -2914,7 +2914,7 @@ void _CompositeRow_Rgb2Argb_Blend_NoClip_RgbByteOrder(FX_LPBYTE dest_scan, FX_LP
src_scan += src_gap;
}
}
-inline void _CompositeRow_Argb2Rgb_Blend_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int dest_Bpp, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_Argb2Rgb_Blend_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int dest_Bpp, const uint8_t* clip_scan)
{
int blended_colors[3];
FX_BOOL bNonseparableBlend = blend_type >= FXDIB_BLEND_NONSEPARABLE;
@@ -2949,7 +2949,7 @@ inline void _CompositeRow_Argb2Rgb_Blend_RgbByteOrder(FX_LPBYTE dest_scan, FX_LP
src_scan ++;
}
}
-inline void _CompositeRow_Rgb2Argb_NoBlend_NoClip_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int src_Bpp)
+inline void _CompositeRow_Rgb2Argb_NoBlend_NoClip_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int width, int src_Bpp)
{
for (int col = 0; col < width; col ++) {
if (src_Bpp == 4) {
@@ -2961,7 +2961,7 @@ inline void _CompositeRow_Rgb2Argb_NoBlend_NoClip_RgbByteOrder(FX_LPBYTE dest_sc
src_scan += src_Bpp;
}
}
-inline void _CompositeRow_Rgb2Rgb_Blend_NoClip_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int dest_Bpp, int src_Bpp)
+inline void _CompositeRow_Rgb2Rgb_Blend_NoClip_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int dest_Bpp, int src_Bpp)
{
int blended_colors[3];
FX_BOOL bNonseparableBlend = blend_type >= FXDIB_BLEND_NONSEPARABLE;
@@ -2987,7 +2987,7 @@ inline void _CompositeRow_Rgb2Rgb_Blend_NoClip_RgbByteOrder(FX_LPBYTE dest_scan,
src_scan += src_gap;
}
}
-inline void _CompositeRow_Argb2Rgb_NoBlend_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int dest_Bpp, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_Argb2Rgb_NoBlend_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int width, int dest_Bpp, const uint8_t* clip_scan)
{
for (int col = 0; col < width; col ++) {
uint8_t src_alpha;
@@ -3018,7 +3018,7 @@ inline void _CompositeRow_Argb2Rgb_NoBlend_RgbByteOrder(FX_LPBYTE dest_scan, FX_
src_scan ++;
}
}
-inline void _CompositeRow_Rgb2Rgb_NoBlend_NoClip_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int dest_Bpp, int src_Bpp)
+inline void _CompositeRow_Rgb2Rgb_NoBlend_NoClip_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int width, int dest_Bpp, int src_Bpp)
{
for (int col = 0; col < width; col ++) {
dest_scan[2] = src_scan[0];
@@ -3028,7 +3028,7 @@ inline void _CompositeRow_Rgb2Rgb_NoBlend_NoClip_RgbByteOrder(FX_LPBYTE dest_sca
src_scan += src_Bpp;
}
}
-inline void _CompositeRow_Rgb2Argb_Blend_Clip_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int src_Bpp, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_Rgb2Argb_Blend_Clip_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int src_Bpp, const uint8_t* clip_scan)
{
int blended_colors[3];
FX_BOOL bNonseparableBlend = blend_type >= FXDIB_BLEND_NONSEPARABLE;
@@ -3072,7 +3072,7 @@ inline void _CompositeRow_Rgb2Argb_Blend_Clip_RgbByteOrder(FX_LPBYTE dest_scan,
src_scan += src_gap;
}
}
-inline void _CompositeRow_Rgb2Rgb_Blend_Clip_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int dest_Bpp, int src_Bpp, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_Rgb2Rgb_Blend_Clip_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int dest_Bpp, int src_Bpp, const uint8_t* clip_scan)
{
int blended_colors[3];
FX_BOOL bNonseparableBlend = blend_type >= FXDIB_BLEND_NONSEPARABLE;
@@ -3104,7 +3104,7 @@ inline void _CompositeRow_Rgb2Rgb_Blend_Clip_RgbByteOrder(FX_LPBYTE dest_scan, F
src_scan += src_gap;
}
}
-inline void _CompositeRow_Rgb2Argb_NoBlend_Clip_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int src_Bpp, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_Rgb2Argb_NoBlend_Clip_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int width, int src_Bpp, const uint8_t* clip_scan)
{
int src_gap = src_Bpp - 3;
for (int col = 0; col < width; col ++) {
@@ -3136,7 +3136,7 @@ inline void _CompositeRow_Rgb2Argb_NoBlend_Clip_RgbByteOrder(FX_LPBYTE dest_scan
src_scan += src_gap;
}
}
-inline void _CompositeRow_Rgb2Rgb_NoBlend_Clip_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int dest_Bpp, int src_Bpp, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_Rgb2Rgb_NoBlend_Clip_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int width, int dest_Bpp, int src_Bpp, const uint8_t* clip_scan)
{
for (int col = 0; col < width; col ++) {
int src_alpha = clip_scan[col];
@@ -3158,8 +3158,8 @@ inline void _CompositeRow_Rgb2Rgb_NoBlend_Clip_RgbByteOrder(FX_LPBYTE dest_scan,
src_scan += src_Bpp;
}
}
-inline void _CompositeRow_8bppRgb2Rgb_NoBlend_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, FX_ARGB* pPalette, int pixel_count,
- int DestBpp, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_8bppRgb2Rgb_NoBlend_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, FX_ARGB* pPalette, int pixel_count,
+ int DestBpp, const uint8_t* clip_scan)
{
for (int col = 0; col < pixel_count; col ++) {
FX_ARGB argb = pPalette ? pPalette[*src_scan] : (*src_scan) * 0x010101;
@@ -3179,8 +3179,8 @@ inline void _CompositeRow_8bppRgb2Rgb_NoBlend_RgbByteOrder(FX_LPBYTE dest_scan,
src_scan ++;
}
}
-inline void _CompositeRow_1bppRgb2Rgb_NoBlend_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_left,
- FX_ARGB* pPalette, int pixel_count, int DestBpp, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_1bppRgb2Rgb_NoBlend_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int src_left,
+ FX_ARGB* pPalette, int pixel_count, int DestBpp, const uint8_t* clip_scan)
{
int reset_r, reset_g, reset_b;
int set_r, set_g, set_b;
@@ -3218,8 +3218,8 @@ inline void _CompositeRow_1bppRgb2Rgb_NoBlend_RgbByteOrder(FX_LPBYTE dest_scan,
dest_scan += DestBpp;
}
}
-inline void _CompositeRow_8bppRgb2Argb_NoBlend_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width,
- FX_ARGB* pPalette, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_8bppRgb2Argb_NoBlend_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int width,
+ FX_ARGB* pPalette, const uint8_t* clip_scan)
{
for (int col = 0; col < width; col ++) {
int src_r, src_g, src_b;
@@ -3257,8 +3257,8 @@ inline void _CompositeRow_8bppRgb2Argb_NoBlend_RgbByteOrder(FX_LPBYTE dest_scan,
src_scan ++;
}
}
-inline void _CompositeRow_1bppRgb2Argb_NoBlend_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_left, int width,
- FX_ARGB* pPalette, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_1bppRgb2Argb_NoBlend_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int src_left, int width,
+ FX_ARGB* pPalette, const uint8_t* clip_scan)
{
int reset_r, reset_g, reset_b;
int set_r, set_g, set_b;
@@ -3307,8 +3307,8 @@ inline void _CompositeRow_1bppRgb2Argb_NoBlend_RgbByteOrder(FX_LPBYTE dest_scan,
dest_scan += 4;
}
}
-void _CompositeRow_ByteMask2Argb_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_r, int src_g, int src_b, int pixel_count,
- int blend_type, FX_LPCBYTE clip_scan)
+void _CompositeRow_ByteMask2Argb_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_r, int src_g, int src_b, int pixel_count,
+ int blend_type, const uint8_t* clip_scan)
{
for (int col = 0; col < pixel_count; col ++) {
int src_alpha;
@@ -3362,8 +3362,8 @@ void _CompositeRow_ByteMask2Argb_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE sr
dest_scan += 4;
}
}
-void _CompositeRow_ByteMask2Rgb_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_r, int src_g, int src_b, int pixel_count,
- int blend_type, int Bpp, FX_LPCBYTE clip_scan)
+void _CompositeRow_ByteMask2Rgb_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_r, int src_g, int src_b, int pixel_count,
+ int blend_type, int Bpp, const uint8_t* clip_scan)
{
for (int col = 0; col < pixel_count; col ++) {
int src_alpha;
@@ -3405,8 +3405,8 @@ void _CompositeRow_ByteMask2Rgb_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src
dest_scan += Bpp;
}
}
-void _CompositeRow_BitMask2Argb_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_r, int src_g, int src_b,
- int src_left, int pixel_count, int blend_type, FX_LPCBYTE clip_scan)
+void _CompositeRow_BitMask2Argb_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_r, int src_g, int src_b,
+ int src_left, int pixel_count, int blend_type, const uint8_t* clip_scan)
{
if (blend_type == FXDIB_BLEND_NORMAL && clip_scan == NULL && mask_alpha == 255) {
FX_ARGB argb = FXARGB_MAKE(0xff, src_r, src_g, src_b);
@@ -3470,8 +3470,8 @@ void _CompositeRow_BitMask2Argb_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src
dest_scan += 4;
}
}
-void _CompositeRow_BitMask2Rgb_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_r, int src_g, int src_b,
- int src_left, int pixel_count, int blend_type, int Bpp, FX_LPCBYTE clip_scan)
+void _CompositeRow_BitMask2Rgb_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_r, int src_g, int src_b,
+ int src_left, int pixel_count, int blend_type, int Bpp, const uint8_t* clip_scan)
{
if (blend_type == FXDIB_BLEND_NORMAL && clip_scan == NULL && mask_alpha == 255) {
for (int col = 0; col < pixel_count; col ++) {
@@ -3554,7 +3554,7 @@ inline FX_BOOL _ScanlineCompositor_InitSourceMask(FXDIB_Format dest_format, int
if ((dest_format & 0xff) == 8) {
if (pIccTransform) {
mask_color = (alpha_flag >> 8) ? FXCMYK_TODIB(mask_color) : FXARGB_TODIB(mask_color);
- FX_LPBYTE gray_p = (FX_LPBYTE)&mask_color;
+ uint8_t* gray_p = (uint8_t*)&mask_color;
pIccModule->TranslateScanline(pIccTransform, gray_p, gray_p, 1);
mask_red = dest_format & 0x0400 ? FX_CCOLOR(gray_p[0]) : gray_p[0];
} else {
@@ -3571,7 +3571,7 @@ inline FX_BOOL _ScanlineCompositor_InitSourceMask(FXDIB_Format dest_format, int
}
}
} else {
- FX_LPBYTE mask_color_p = (FX_LPBYTE)&mask_color;
+ uint8_t* mask_color_p = (uint8_t*)&mask_color;
mask_color = (alpha_flag >> 8) ? FXCMYK_TODIB(mask_color) : FXARGB_TODIB(mask_color);
if (pIccTransform) {
pIccModule->TranslateScanline(pIccTransform, mask_color_p, mask_color_p, 1);
@@ -3600,11 +3600,11 @@ inline void _ScanlineCompositor_InitSourcePalette(FXDIB_Format src_format, FXDIB
if (pSrcPalette) {
if ((dest_format & 0xff) == 8) {
int pal_count = 1 << (src_format & 0xff);
- FX_LPBYTE gray_pal = FX_Alloc(uint8_t, pal_count);
+ uint8_t* gray_pal = FX_Alloc(uint8_t, pal_count);
pDestPalette = (FX_DWORD*)gray_pal;
for (int i = 0; i < pal_count; i ++) {
FX_DWORD color = isSrcCmyk ? FXCMYK_TODIB(pSrcPalette[i]) : FXARGB_TODIB(pSrcPalette[i]);
- pIccModule->TranslateScanline(pIccTransform, gray_pal, (FX_LPCBYTE)&color, 1);
+ pIccModule->TranslateScanline(pIccTransform, gray_pal, (const uint8_t*)&color, 1);
gray_pal ++;
}
} else {
@@ -3612,13 +3612,13 @@ inline void _ScanlineCompositor_InitSourcePalette(FXDIB_Format src_format, FXDIB
pDestPalette = FX_Alloc(FX_DWORD, palsize);
for (int i = 0; i < palsize; i ++) {
FX_DWORD color = isSrcCmyk ? FXCMYK_TODIB(pSrcPalette[i]) : FXARGB_TODIB(pSrcPalette[i]);
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)&color, (FX_LPCBYTE)&color, 1);
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&color, (const uint8_t*)&color, 1);
pDestPalette[i] = isDstCmyk ? FXCMYK_TODIB(color) : FXARGB_TODIB(color);
}
}
} else {
int pal_count = 1 << (src_format & 0xff);
- FX_LPBYTE gray_pal = FX_Alloc(uint8_t, pal_count);
+ uint8_t* gray_pal = FX_Alloc(uint8_t, pal_count);
if (pal_count == 2) {
gray_pal[0] = 0;
gray_pal[1] = 255;
@@ -3633,7 +3633,7 @@ inline void _ScanlineCompositor_InitSourcePalette(FXDIB_Format src_format, FXDIB
} else {
pDestPalette = FX_Alloc(FX_DWORD, pal_count);
for (int i = 0; i < pal_count; i ++) {
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)&pDestPalette[i], &gray_pal[i], 1);
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&pDestPalette[i], &gray_pal[i], 1);
pDestPalette[i] = isDstCmyk ? FXCMYK_TODIB(pDestPalette[i]) : FXARGB_TODIB(pDestPalette[i]);
}
FX_Free(gray_pal);
@@ -3643,7 +3643,7 @@ inline void _ScanlineCompositor_InitSourcePalette(FXDIB_Format src_format, FXDIB
if (pSrcPalette) {
if ((dest_format & 0xff) == 8) {
int pal_count = 1 << (src_format & 0xff);
- FX_LPBYTE gray_pal = FX_Alloc(uint8_t, pal_count);
+ uint8_t* gray_pal = FX_Alloc(uint8_t, pal_count);
pDestPalette = (FX_DWORD*)gray_pal;
if (isSrcCmyk) {
for (int i = 0; i < pal_count; i ++) {
@@ -3676,7 +3676,7 @@ inline void _ScanlineCompositor_InitSourcePalette(FXDIB_Format src_format, FXDIB
} else {
if ((dest_format & 0xff) == 8) {
int pal_count = 1 << (src_format & 0xff);
- FX_LPBYTE gray_pal = FX_Alloc(uint8_t, pal_count);
+ uint8_t* gray_pal = FX_Alloc(uint8_t, pal_count);
if (pal_count == 2) {
gray_pal[0] = 0;
gray_pal[1] = 255;
@@ -3774,8 +3774,8 @@ FX_BOOL CFX_ScanlineCompositor::Init(FXDIB_Format dest_format, FXDIB_Format src_
+ (pIccTransform ? 64 : 0);
return TRUE;
}
-void CFX_ScanlineCompositor::CompositeRgbBitmapLine(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_extra_alpha, FX_LPBYTE dst_extra_alpha)
+void CFX_ScanlineCompositor::CompositeRgbBitmapLine(uint8_t* dest_scan, const uint8_t* src_scan, int width, const uint8_t* clip_scan,
+ const uint8_t* src_extra_alpha, uint8_t* dst_extra_alpha)
{
int src_Bpp = (m_SrcFormat & 0xff) >> 3;
int dest_Bpp = (m_DestFormat & 0xff) >> 3;
@@ -3967,8 +3967,8 @@ void CFX_ScanlineCompositor::CompositeRgbBitmapLine(FX_LPBYTE dest_scan, FX_LPCB
}
}
}
-void CFX_ScanlineCompositor::CompositePalBitmapLine(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_left, int width, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_extra_alpha, FX_LPBYTE dst_extra_alpha)
+void CFX_ScanlineCompositor::CompositePalBitmapLine(uint8_t* dest_scan, const uint8_t* src_scan, int src_left, int width, const uint8_t* clip_scan,
+ const uint8_t* src_extra_alpha, uint8_t* dst_extra_alpha)
{
if (m_bRgbByteOrder) {
if (m_SrcFormat == FXDIB_1bppRgb) {
@@ -3996,16 +3996,16 @@ void CFX_ScanlineCompositor::CompositePalBitmapLine(FX_LPBYTE dest_scan, FX_LPCB
} else if ((m_DestFormat & 0xff) == 8) {
if (m_Transparency & 8) {
if (m_DestFormat & 0x0200) {
- _CompositeRow_1bppPal2Graya(dest_scan, src_scan, src_left, (FX_LPCBYTE)m_pSrcPalette, width, m_BlendType, clip_scan, dst_extra_alpha);
+ _CompositeRow_1bppPal2Graya(dest_scan, src_scan, src_left, (const uint8_t*)m_pSrcPalette, width, m_BlendType, clip_scan, dst_extra_alpha);
} else {
- _CompositeRow_1bppPal2Gray(dest_scan, src_scan, src_left, (FX_LPCBYTE)m_pSrcPalette, width, m_BlendType, clip_scan);
+ _CompositeRow_1bppPal2Gray(dest_scan, src_scan, src_left, (const uint8_t*)m_pSrcPalette, width, m_BlendType, clip_scan);
}
} else {
if (m_DestFormat & 0x0200)
- _CompositeRow_8bppPal2Graya(dest_scan, src_scan, (FX_LPCBYTE)m_pSrcPalette, width, m_BlendType, clip_scan,
+ _CompositeRow_8bppPal2Graya(dest_scan, src_scan, (const uint8_t*)m_pSrcPalette, width, m_BlendType, clip_scan,
dst_extra_alpha, src_extra_alpha);
else
- _CompositeRow_8bppPal2Gray(dest_scan, src_scan, (FX_LPCBYTE)m_pSrcPalette, width, m_BlendType, clip_scan,
+ _CompositeRow_8bppPal2Gray(dest_scan, src_scan, (const uint8_t*)m_pSrcPalette, width, m_BlendType, clip_scan,
src_extra_alpha);
}
} else {
@@ -4036,8 +4036,8 @@ void CFX_ScanlineCompositor::CompositePalBitmapLine(FX_LPBYTE dest_scan, FX_LPCB
}
}
}
-void CFX_ScanlineCompositor::CompositeByteMaskLine(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, FX_LPCBYTE clip_scan,
- FX_LPBYTE dst_extra_alpha)
+void CFX_ScanlineCompositor::CompositeByteMaskLine(uint8_t* dest_scan, const uint8_t* src_scan, int width, const uint8_t* clip_scan,
+ uint8_t* dst_extra_alpha)
{
if (m_DestFormat == FXDIB_8bppMask) {
_CompositeRow_ByteMask2Mask(dest_scan, src_scan, m_MaskAlpha, width, clip_scan);
@@ -4065,8 +4065,8 @@ void CFX_ScanlineCompositor::CompositeByteMaskLine(FX_LPBYTE dest_scan, FX_LPCBY
_CompositeRow_ByteMask2Rgba(dest_scan, src_scan, m_MaskAlpha, m_MaskRed, m_MaskGreen, m_MaskBlue,
width, m_BlendType, clip_scan, dst_extra_alpha);
}
-void CFX_ScanlineCompositor::CompositeBitMaskLine(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_left, int width, FX_LPCBYTE clip_scan,
- FX_LPBYTE dst_extra_alpha)
+void CFX_ScanlineCompositor::CompositeBitMaskLine(uint8_t* dest_scan, const uint8_t* src_scan, int src_left, int width, const uint8_t* clip_scan,
+ uint8_t* dst_extra_alpha)
{
if (m_DestFormat == FXDIB_8bppMask) {
_CompositeRow_BitMask2Mask(dest_scan, src_scan, m_MaskAlpha, src_left, width, clip_scan);
@@ -4126,11 +4126,11 @@ FX_BOOL CFX_DIBitmap::CompositeBitmap(int dest_left, int dest_top, int width, in
FX_BOOL bRgb = src_Bpp > 1 && !pSrcBitmap->IsCmykImage();
CFX_DIBitmap* pSrcAlphaMask = pSrcBitmap->m_pAlphaMask;
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = m_pBuffer + (dest_top + row) * m_Pitch + dest_left * dest_Bpp;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * src_Bpp;
- FX_LPCBYTE src_scan_extra_alpha = pSrcAlphaMask ? pSrcAlphaMask->GetScanline(src_top + row) + src_left : NULL;
- FX_LPBYTE dst_scan_extra_alpha = m_pAlphaMask ? (FX_LPBYTE)m_pAlphaMask->GetScanline(dest_top + row) + dest_left : NULL;
- FX_LPCBYTE clip_scan = NULL;
+ uint8_t* dest_scan = m_pBuffer + (dest_top + row) * m_Pitch + dest_left * dest_Bpp;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * src_Bpp;
+ const uint8_t* src_scan_extra_alpha = pSrcAlphaMask ? pSrcAlphaMask->GetScanline(src_top + row) + src_left : NULL;
+ uint8_t* dst_scan_extra_alpha = m_pAlphaMask ? (uint8_t*)m_pAlphaMask->GetScanline(dest_top + row) + dest_left : NULL;
+ const uint8_t* clip_scan = NULL;
if (pClipMask) {
clip_scan = pClipMask->m_pBuffer + (dest_top + row - clip_box.top) * pClipMask->m_Pitch + (dest_left - clip_box.left);
}
@@ -4176,10 +4176,10 @@ FX_BOOL CFX_DIBitmap::CompositeMask(int dest_left, int dest_top, int width, int
return FALSE;
}
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = m_pBuffer + (dest_top + row) * m_Pitch + dest_left * Bpp;
- FX_LPCBYTE src_scan = pMask->GetScanline(src_top + row);
- FX_LPBYTE dst_scan_extra_alpha = m_pAlphaMask ? (FX_LPBYTE)m_pAlphaMask->GetScanline(dest_top + row) + dest_left : NULL;
- FX_LPCBYTE clip_scan = NULL;
+ uint8_t* dest_scan = m_pBuffer + (dest_top + row) * m_Pitch + dest_left * Bpp;
+ const uint8_t* src_scan = pMask->GetScanline(src_top + row);
+ uint8_t* dst_scan_extra_alpha = m_pAlphaMask ? (uint8_t*)m_pAlphaMask->GetScanline(dest_top + row) + dest_left : NULL;
+ const uint8_t* clip_scan = NULL;
if (pClipMask) {
clip_scan = pClipMask->m_pBuffer + (dest_top + row - clip_box.top) * pClipMask->m_Pitch + (dest_left - clip_box.left);
}
@@ -4212,7 +4212,7 @@ FX_BOOL CFX_DIBitmap::CompositeRect(int left, int top, int width, int height, FX
} else {
dst_color = FXARGB_TODIB(color);
}
- FX_LPBYTE color_p = (FX_LPBYTE)&dst_color;
+ uint8_t* color_p = (uint8_t*)&dst_color;
if (m_bpp == 8) {
uint8_t gray = 255;
if (!IsAlphaMask()) {
@@ -4234,7 +4234,7 @@ FX_BOOL CFX_DIBitmap::CompositeRect(int left, int top, int width, int height, FX
}
}
for (int row = rect.top; row < rect.bottom; row ++) {
- FX_LPBYTE dest_scan = m_pBuffer + row * m_Pitch + rect.left;
+ uint8_t* dest_scan = m_pBuffer + row * m_Pitch + rect.left;
if (src_alpha == 255) {
FXSYS_memset8(dest_scan, gray, width);
} else
@@ -4305,8 +4305,8 @@ FX_BOOL CFX_DIBitmap::CompositeRect(int left, int top, int width, int height, FX
FX_BOOL bArgb = GetFormat() == FXDIB_Argb ? TRUE : FALSE;
if (src_alpha == 255) {
for (int row = rect.top; row < rect.bottom; row ++) {
- FX_LPBYTE dest_scan = m_pBuffer + row * m_Pitch + rect.left * Bpp;
- FX_LPBYTE dest_scan_alpha = m_pAlphaMask ? (FX_LPBYTE)m_pAlphaMask->GetScanline(row) + rect.left : NULL;
+ uint8_t* dest_scan = m_pBuffer + row * m_Pitch + rect.left * Bpp;
+ uint8_t* dest_scan_alpha = m_pAlphaMask ? (uint8_t*)m_pAlphaMask->GetScanline(row) + rect.left : NULL;
if (dest_scan_alpha) {
FXSYS_memset8(dest_scan_alpha, 0xff, width);
}
@@ -4326,7 +4326,7 @@ FX_BOOL CFX_DIBitmap::CompositeRect(int left, int top, int width, int height, FX
return TRUE;
}
for (int row = rect.top; row < rect.bottom; row ++) {
- FX_LPBYTE dest_scan = m_pBuffer + row * m_Pitch + rect.left * Bpp;
+ uint8_t* dest_scan = m_pBuffer + row * m_Pitch + rect.left * Bpp;
if (bAlpha) {
if (bArgb) {
for (int col = 0; col < width; col ++) {
@@ -4347,7 +4347,7 @@ FX_BOOL CFX_DIBitmap::CompositeRect(int left, int top, int width, int height, FX
*dest_scan++ = dest_alpha;
}
} else {
- FX_LPBYTE dest_scan_alpha = (FX_LPBYTE)m_pAlphaMask->GetScanline(row) + rect.left;
+ uint8_t* dest_scan_alpha = (uint8_t*)m_pAlphaMask->GetScanline(row) + rect.left;
for (int col = 0; col < width; col ++) {
uint8_t back_alpha = *dest_scan_alpha;
if (back_alpha == 0) {
@@ -4448,8 +4448,8 @@ FX_BOOL CFX_BitmapComposer::SetInfo(int width, int height, FXDIB_Format src_form
}
return TRUE;
}
-void CFX_BitmapComposer::DoCompose(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int dest_width, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_extra_alpha, FX_LPBYTE dst_extra_alpha)
+void CFX_BitmapComposer::DoCompose(uint8_t* dest_scan, const uint8_t* src_scan, int dest_width, const uint8_t* clip_scan,
+ const uint8_t* src_extra_alpha, uint8_t* dst_extra_alpha)
{
if (m_BitmapAlpha < 255) {
if (clip_scan) {
@@ -4469,31 +4469,31 @@ void CFX_BitmapComposer::DoCompose(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int
m_Compositor.CompositeRgbBitmapLine(dest_scan, src_scan, dest_width, clip_scan, src_extra_alpha, dst_extra_alpha);
}
}
-void CFX_BitmapComposer::ComposeScanline(int line, FX_LPCBYTE scanline, FX_LPCBYTE scan_extra_alpha)
+void CFX_BitmapComposer::ComposeScanline(int line, const uint8_t* scanline, const uint8_t* scan_extra_alpha)
{
if (m_bVertical) {
ComposeScanlineV(line, scanline, scan_extra_alpha);
return;
}
- FX_LPCBYTE clip_scan = NULL;
+ const uint8_t* clip_scan = NULL;
if (m_pClipMask)
clip_scan = m_pClipMask->GetBuffer() + (m_DestTop + line - m_pClipRgn->GetBox().top) *
m_pClipMask->GetPitch() + (m_DestLeft - m_pClipRgn->GetBox().left);
- FX_LPBYTE dest_scan = (FX_LPBYTE)m_pBitmap->GetScanline(line + m_DestTop) +
+ uint8_t* dest_scan = (uint8_t*)m_pBitmap->GetScanline(line + m_DestTop) +
m_DestLeft * m_pBitmap->GetBPP() / 8;
- FX_LPBYTE dest_alpha_scan = m_pBitmap->m_pAlphaMask ?
- (FX_LPBYTE)m_pBitmap->m_pAlphaMask->GetScanline(line + m_DestTop) + m_DestLeft : NULL;
+ uint8_t* dest_alpha_scan = m_pBitmap->m_pAlphaMask ?
+ (uint8_t*)m_pBitmap->m_pAlphaMask->GetScanline(line + m_DestTop) + m_DestLeft : NULL;
DoCompose(dest_scan, scanline, m_DestWidth, clip_scan, scan_extra_alpha, dest_alpha_scan);
}
-void CFX_BitmapComposer::ComposeScanlineV(int line, FX_LPCBYTE scanline, FX_LPCBYTE scan_extra_alpha)
+void CFX_BitmapComposer::ComposeScanlineV(int line, const uint8_t* scanline, const uint8_t* scan_extra_alpha)
{
int i;
int Bpp = m_pBitmap->GetBPP() / 8;
int dest_pitch = m_pBitmap->GetPitch();
int dest_alpha_pitch = m_pBitmap->m_pAlphaMask ? m_pBitmap->m_pAlphaMask->GetPitch() : 0;
int dest_x = m_DestLeft + (m_bFlipX ? (m_DestWidth - line - 1) : line);
- FX_LPBYTE dest_buf = m_pBitmap->GetBuffer() + dest_x * Bpp + m_DestTop * dest_pitch;
- FX_LPBYTE dest_alpha_buf = m_pBitmap->m_pAlphaMask ?
+ uint8_t* dest_buf = m_pBitmap->GetBuffer() + dest_x * Bpp + m_DestTop * dest_pitch;
+ uint8_t* dest_alpha_buf = m_pBitmap->m_pAlphaMask ?
m_pBitmap->m_pAlphaMask->GetBuffer() + dest_x + m_DestTop * dest_alpha_pitch : NULL;
if (m_bFlipY) {
dest_buf += dest_pitch * (m_DestHeight - 1);
@@ -4505,27 +4505,27 @@ void CFX_BitmapComposer::ComposeScanlineV(int line, FX_LPCBYTE scanline, FX_LPCB
y_step = -y_step;
y_alpha_step = -y_alpha_step;
}
- FX_LPBYTE src_scan = m_pScanlineV;
- FX_LPBYTE dest_scan = dest_buf;
+ uint8_t* src_scan = m_pScanlineV;
+ uint8_t* dest_scan = dest_buf;
for (i = 0; i < m_DestHeight; i ++) {
for (int j = 0; j < Bpp; j ++) {
*src_scan++ = dest_scan[j];
}
dest_scan += y_step;
}
- FX_LPBYTE src_alpha_scan = m_pScanlineAlphaV;
- FX_LPBYTE dest_alpha_scan = dest_alpha_buf;
+ uint8_t* src_alpha_scan = m_pScanlineAlphaV;
+ uint8_t* dest_alpha_scan = dest_alpha_buf;
if (dest_alpha_scan) {
for (i = 0; i < m_DestHeight; i ++) {
*src_alpha_scan++ = *dest_alpha_scan;
dest_alpha_scan += y_alpha_step;
}
}
- FX_LPBYTE clip_scan = NULL;
+ uint8_t* clip_scan = NULL;
if (m_pClipMask) {
clip_scan = m_pClipScanV;
int clip_pitch = m_pClipMask->GetPitch();
- FX_LPCBYTE src_clip = m_pClipMask->GetBuffer() + (m_DestTop - m_pClipRgn->GetBox().top) *
+ const uint8_t* src_clip = m_pClipMask->GetBuffer() + (m_DestTop - m_pClipRgn->GetBox().top) *
clip_pitch + (dest_x - m_pClipRgn->GetBox().left);
if (m_bFlipY) {
src_clip += clip_pitch * (m_DestHeight - 1);
diff --git a/core/src/fxge/dib/fx_dib_convert.cpp b/core/src/fxge/dib/fx_dib_convert.cpp
index b4fdd3a1ba..ef4f7e40b5 100644
--- a/core/src/fxge/dib/fx_dib_convert.cpp
+++ b/core/src/fxge/dib/fx_dib_convert.cpp
@@ -279,16 +279,16 @@ FX_BOOL CFX_Palette::BuildPalette(const CFX_DIBSource* pBitmap, int pal_type)
_Obtain_Pal(m_aLut, m_cLut, m_pPalette, pal_type, win_mac_pal, m_lut);
return TRUE;
}
-FX_BOOL _ConvertBuffer_1bppMask2Gray(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_1bppMask2Gray(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top)
{
uint8_t set_gray, reset_gray;
set_gray = 0xff;
reset_gray = 0x00;
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
FXSYS_memset8(dest_scan, reset_gray, width);
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row);
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row);
for (int col = src_left; col < src_left + width; col ++) {
if (src_scan[col / 8] & (1 << (7 - col % 8))) {
*dest_scan = set_gray;
@@ -298,17 +298,17 @@ FX_BOOL _ConvertBuffer_1bppMask2Gray(FX_LPBYTE dest_buf, int dest_pitch, int wid
}
return TRUE;
}
-FX_BOOL _ConvertBuffer_8bppMask2Gray(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_8bppMask2Gray(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top)
{
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left;
FXSYS_memcpy32(dest_scan, src_scan, width);
}
return TRUE;
}
-FX_BOOL _ConvertBuffer_1bppPlt2Gray(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_1bppPlt2Gray(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, void* pIccTransform)
{
FX_DWORD* src_plt = pSrcBitmap->GetPalette();
@@ -319,7 +319,7 @@ FX_BOOL _ConvertBuffer_1bppPlt2Gray(FX_LPBYTE dest_buf, int dest_pitch, int widt
plt[0] = FXCMYK_TODIB(src_plt[0]);
plt[1] = FXCMYK_TODIB(src_plt[1]);
} else {
- FX_LPBYTE bgr_ptr = (FX_LPBYTE)plt;
+ uint8_t* bgr_ptr = (uint8_t*)plt;
bgr_ptr[0] = FXARGB_B(src_plt[0]);
bgr_ptr[1] = FXARGB_G(src_plt[0]);
bgr_ptr[2] = FXARGB_R(src_plt[0]);
@@ -328,7 +328,7 @@ FX_BOOL _ConvertBuffer_1bppPlt2Gray(FX_LPBYTE dest_buf, int dest_pitch, int widt
bgr_ptr[5] = FXARGB_R(src_plt[1]);
}
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
- pIccModule->TranslateScanline(pIccTransform, gray, (FX_LPCBYTE)plt, 2);
+ pIccModule->TranslateScanline(pIccTransform, gray, (const uint8_t*)plt, 2);
} else {
uint8_t reset_r, reset_g, reset_b,
set_r, set_g, set_b;
@@ -349,9 +349,9 @@ FX_BOOL _ConvertBuffer_1bppPlt2Gray(FX_LPBYTE dest_buf, int dest_pitch, int widt
gray[1] = FXRGB2GRAY(set_r, set_g, set_b);
}
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
FXSYS_memset8(dest_scan, gray[0], width);
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row);
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row);
for (int col = src_left; col < src_left + width; col ++) {
if (src_scan[col / 8] & (1 << (7 - col % 8))) {
*dest_scan = gray[1];
@@ -361,7 +361,7 @@ FX_BOOL _ConvertBuffer_1bppPlt2Gray(FX_LPBYTE dest_buf, int dest_pitch, int widt
}
return TRUE;
}
-FX_BOOL _ConvertBuffer_8bppPlt2Gray(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_8bppPlt2Gray(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, void* pIccTransform)
{
FX_DWORD* src_plt = pSrcBitmap->GetPalette();
@@ -373,7 +373,7 @@ FX_BOOL _ConvertBuffer_8bppPlt2Gray(FX_LPBYTE dest_buf, int dest_pitch, int widt
plt[i] = FXCMYK_TODIB(src_plt[i]);
}
} else {
- FX_LPBYTE bgr_ptr = (FX_LPBYTE)plt;
+ uint8_t* bgr_ptr = (uint8_t*)plt;
for (int i = 0; i < 256; i ++) {
*bgr_ptr++ = FXARGB_B(src_plt[i]);
*bgr_ptr++ = FXARGB_G(src_plt[i]);
@@ -381,7 +381,7 @@ FX_BOOL _ConvertBuffer_8bppPlt2Gray(FX_LPBYTE dest_buf, int dest_pitch, int widt
}
}
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
- pIccModule->TranslateScanline(pIccTransform, gray, (FX_LPCBYTE)plt, 256);
+ pIccModule->TranslateScanline(pIccTransform, gray, (const uint8_t*)plt, 256);
} else {
if (pSrcBitmap->IsCmykImage()) {
uint8_t r, g, b;
@@ -396,15 +396,15 @@ FX_BOOL _ConvertBuffer_8bppPlt2Gray(FX_LPBYTE dest_buf, int dest_pitch, int widt
}
}
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left;
for (int col = 0; col < width; col ++) {
*dest_scan++ = gray[*src_scan++];
}
}
return TRUE;
}
-FX_BOOL _ConvertBuffer_RgbOrCmyk2Gray(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_RgbOrCmyk2Gray(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, void* pIccTransform)
{
int Bpp = pSrcBitmap->GetBPP() / 8;
@@ -412,14 +412,14 @@ FX_BOOL _ConvertBuffer_RgbOrCmyk2Gray(FX_LPBYTE dest_buf, int dest_pitch, int wi
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
if (Bpp == 3 || pSrcBitmap->IsCmykImage()) {
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * Bpp;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * Bpp;
pIccModule->TranslateScanline(pIccTransform, dest_scan, src_scan, width);
}
} else {
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 4;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 4;
for (int col = 0; col < width; col ++) {
pIccModule->TranslateScanline(pIccTransform, dest_scan, src_scan, 1);
dest_scan++;
@@ -430,8 +430,8 @@ FX_BOOL _ConvertBuffer_RgbOrCmyk2Gray(FX_LPBYTE dest_buf, int dest_pitch, int wi
} else {
if (pSrcBitmap->IsCmykImage()) {
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 4;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 4;
for (int col = 0; col < width; col ++) {
uint8_t r, g, b;
AdobeCMYK_to_sRGB1(FXSYS_GetCValue((FX_DWORD)src_scan[0]), FXSYS_GetMValue((FX_DWORD)src_scan[1]), FXSYS_GetYValue((FX_DWORD)src_scan[2]), FXSYS_GetKValue((FX_DWORD)src_scan[3]),
@@ -442,8 +442,8 @@ FX_BOOL _ConvertBuffer_RgbOrCmyk2Gray(FX_LPBYTE dest_buf, int dest_pitch, int wi
}
} else {
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * Bpp;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * Bpp;
for (int col = 0; col < width; col ++) {
*dest_scan++ = FXRGB2GRAY(src_scan[2], src_scan[1], src_scan[0]);
src_scan += Bpp;
@@ -453,14 +453,14 @@ FX_BOOL _ConvertBuffer_RgbOrCmyk2Gray(FX_LPBYTE dest_buf, int dest_pitch, int wi
}
return TRUE;
}
-inline void _ConvertBuffer_IndexCopy(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+inline void _ConvertBuffer_IndexCopy(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top)
{
if (pSrcBitmap->GetBPP() == 1) {
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
FXSYS_memset32(dest_scan, 0, width);
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row);
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row);
for (int col = src_left; col < src_left + width; col ++) {
if (src_scan[col / 8] & (1 << (7 - col % 8))) {
*dest_scan = 1;
@@ -470,13 +470,13 @@ inline void _ConvertBuffer_IndexCopy(FX_LPBYTE dest_buf, int dest_pitch, int wid
}
} else {
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left;
FXSYS_memcpy32(dest_scan, src_scan, width);
}
}
}
-FX_BOOL _ConvertBuffer_Plt2PltRgb8(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_Plt2PltRgb8(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, FX_DWORD* dst_plt, void* pIccTransform)
{
_ConvertBuffer_IndexCopy(dest_buf, dest_pitch, width, height, pSrcBitmap, src_left, src_top);
@@ -484,7 +484,7 @@ FX_BOOL _ConvertBuffer_Plt2PltRgb8(FX_LPBYTE dest_buf, int dest_pitch, int width
int plt_size = pSrcBitmap->GetPaletteSize();
if (pIccTransform) {
FX_DWORD plt[256];
- FX_LPBYTE bgr_ptr = (FX_LPBYTE)plt;
+ uint8_t* bgr_ptr = (uint8_t*)plt;
if (pSrcBitmap->IsCmykImage()) {
for (int i = 0; i < plt_size; i ++) {
plt[i] = FXCMYK_TODIB(src_plt[i]);
@@ -495,10 +495,10 @@ FX_BOOL _ConvertBuffer_Plt2PltRgb8(FX_LPBYTE dest_buf, int dest_pitch, int width
*bgr_ptr++ = FXARGB_G(src_plt[i]);
*bgr_ptr++ = FXARGB_R(src_plt[i]);
}
- bgr_ptr = (FX_LPBYTE)plt;
+ bgr_ptr = (uint8_t*)plt;
}
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)plt, (FX_LPCBYTE)plt, plt_size);
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)plt, (const uint8_t*)plt, plt_size);
for (int i = 0; i < plt_size; i ++) {
dst_plt[i] = FXARGB_MAKE(0xff, bgr_ptr[2], bgr_ptr[1], bgr_ptr[0]);
bgr_ptr += 3;
@@ -517,7 +517,7 @@ FX_BOOL _ConvertBuffer_Plt2PltRgb8(FX_LPBYTE dest_buf, int dest_pitch, int width
}
return TRUE;
}
-inline FX_BOOL _ConvertBuffer_Rgb2PltRgb8_NoTransform(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+inline FX_BOOL _ConvertBuffer_Rgb2PltRgb8_NoTransform(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, FX_DWORD* dst_plt)
{
int bpp = pSrcBitmap->GetBPP() / 8;
@@ -573,7 +573,7 @@ inline FX_BOOL _ConvertBuffer_Rgb2PltRgb8_NoTransform(FX_LPBYTE dest_buf, int de
FXSYS_memcpy32(dst_plt, pPalette, sizeof(FX_DWORD) * 256);
return TRUE;
}
-FX_BOOL _ConvertBuffer_Rgb2PltRgb8(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_Rgb2PltRgb8(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, FX_DWORD* dst_plt, void* pIccTransform)
{
ICodec_IccModule* pIccModule = NULL;
@@ -586,13 +586,13 @@ FX_BOOL _ConvertBuffer_Rgb2PltRgb8(FX_LPBYTE dest_buf, int dest_pitch, int width
for (int i = 0; i < 256; i++) {
FX_ARGB* plt = dst_plt + i;
FX_ARGB plt_entry = FXARGB_TODIB(*plt);
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)&plt_entry, (FX_LPCBYTE)&plt_entry, 1);
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&plt_entry, (const uint8_t*)&plt_entry, 1);
*plt = FXARGB_TODIB(plt_entry);
}
}
return ret;
}
-FX_BOOL _ConvertBuffer_1bppMask2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_1bppMask2Rgb(FXDIB_Format dst_format, uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top)
{
int comps = (dst_format & 0xff) / 8;
@@ -600,8 +600,8 @@ FX_BOOL _ConvertBuffer_1bppMask2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf,
set_gray = 0xff;
reset_gray = 0x00;
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row);
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row);
for (int col = src_left; col < src_left + width; col ++) {
if (src_scan[col / 8] & (1 << (7 - col % 8))) {
dest_scan[0] = set_gray;
@@ -617,13 +617,13 @@ FX_BOOL _ConvertBuffer_1bppMask2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf,
}
return TRUE;
}
-FX_BOOL _ConvertBuffer_8bppMask2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_8bppMask2Rgb(FXDIB_Format dst_format, uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top)
{
int comps = (dst_format & 0xff) / 8;
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left;
uint8_t src_pixel;
for (int col = 0; col < width; col ++) {
src_pixel = *src_scan++;
@@ -635,13 +635,13 @@ FX_BOOL _ConvertBuffer_8bppMask2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf,
}
return TRUE;
}
-FX_BOOL _ConvertBuffer_1bppPlt2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_1bppPlt2Rgb(FXDIB_Format dst_format, uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, void* pIccTransform)
{
int comps = (dst_format & 0xff) / 8;
FX_DWORD* src_plt = pSrcBitmap->GetPalette();
FX_DWORD plt[2];
- FX_LPBYTE bgr_ptr = (FX_LPBYTE)plt;
+ uint8_t* bgr_ptr = (uint8_t*)plt;
if (pSrcBitmap->IsCmykImage()) {
plt[0] = FXCMYK_TODIB(src_plt[0]);
plt[1] = FXCMYK_TODIB(src_plt[1]);
@@ -655,7 +655,7 @@ FX_BOOL _ConvertBuffer_1bppPlt2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf,
}
if (pIccTransform) {
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)plt, (FX_LPCBYTE)plt, 2);
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)plt, (const uint8_t*)plt, 2);
} else {
if (pSrcBitmap->IsCmykImage()) {
AdobeCMYK_to_sRGB1(FXSYS_GetCValue(src_plt[0]), FXSYS_GetMValue(src_plt[0]), FXSYS_GetYValue(src_plt[0]), FXSYS_GetKValue(src_plt[0]),
@@ -665,8 +665,8 @@ FX_BOOL _ConvertBuffer_1bppPlt2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf,
}
}
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row);
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row);
for (int col = src_left; col < src_left + width; col ++) {
if (src_scan[col / 8] & (1 << (7 - col % 8))) {
*dest_scan++ = bgr_ptr[3];
@@ -682,20 +682,20 @@ FX_BOOL _ConvertBuffer_1bppPlt2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf,
}
return TRUE;
}
-FX_BOOL _ConvertBuffer_8bppPlt2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_8bppPlt2Rgb(FXDIB_Format dst_format, uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, void* pIccTransform)
{
int comps = (dst_format & 0xff) / 8;
FX_DWORD* src_plt = pSrcBitmap->GetPalette();
FX_DWORD plt[256];
- FX_LPBYTE bgr_ptr = (FX_LPBYTE)plt;
+ uint8_t* bgr_ptr = (uint8_t*)plt;
if (!pSrcBitmap->IsCmykImage()) {
for (int i = 0; i < 256; i++) {
*bgr_ptr++ = FXARGB_B(src_plt[i]);
*bgr_ptr++ = FXARGB_G(src_plt[i]);
*bgr_ptr++ = FXARGB_R(src_plt[i]);
}
- bgr_ptr = (FX_LPBYTE)plt;
+ bgr_ptr = (uint8_t*)plt;
}
if (pIccTransform) {
if (pSrcBitmap->IsCmykImage()) {
@@ -704,7 +704,7 @@ FX_BOOL _ConvertBuffer_8bppPlt2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf,
}
}
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)plt, (FX_LPCBYTE)plt, 256);
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)plt, (const uint8_t*)plt, 256);
} else {
if (pSrcBitmap->IsCmykImage()) {
for (int i = 0; i < 256; i++) {
@@ -712,14 +712,14 @@ FX_BOOL _ConvertBuffer_8bppPlt2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf,
bgr_ptr[2], bgr_ptr[1], bgr_ptr[0]);
bgr_ptr += 3;
}
- bgr_ptr = (FX_LPBYTE)plt;
+ bgr_ptr = (uint8_t*)plt;
}
}
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left;
for (int col = 0; col < width; col ++) {
- FX_LPBYTE src_pixel = bgr_ptr + 3 * (*src_scan++);
+ uint8_t* src_pixel = bgr_ptr + 3 * (*src_scan++);
*dest_scan++ = *src_pixel++;
*dest_scan++ = *src_pixel++;
*dest_scan = *src_pixel++;
@@ -728,31 +728,31 @@ FX_BOOL _ConvertBuffer_8bppPlt2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf,
}
return TRUE;
}
-FX_BOOL _ConvertBuffer_24bppRgb2Rgb24(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_24bppRgb2Rgb24(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, void* pIccTransform)
{
if (pIccTransform) {
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 3;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 3;
pIccModule->TranslateScanline(pIccTransform, dest_scan, src_scan, width);
}
} else {
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 3;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 3;
FXSYS_memcpy32(dest_scan, src_scan, width * 3);
}
}
return TRUE;
}
-FX_BOOL _ConvertBuffer_32bppRgb2Rgb24(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_32bppRgb2Rgb24(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, void* pIccTransform)
{
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 4;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 4;
for (int col = 0; col < width; col ++) {
*dest_scan++ = *src_scan++;
*dest_scan++ = *src_scan++;
@@ -763,21 +763,21 @@ FX_BOOL _ConvertBuffer_32bppRgb2Rgb24(FX_LPBYTE dest_buf, int dest_pitch, int wi
if (pIccTransform) {
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
pIccModule->TranslateScanline(pIccTransform, dest_scan, dest_scan, width);
}
}
return TRUE;
}
-FX_BOOL _ConvertBuffer_Rgb2Rgb32(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_Rgb2Rgb32(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, void* pIccTransform)
{
int comps = pSrcBitmap->GetBPP() / 8;
if (pIccTransform) {
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * comps;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * comps;
for (int col = 0; col < width; col ++) {
pIccModule->TranslateScanline(pIccTransform, dest_scan, src_scan, 1);
dest_scan += 4;
@@ -786,8 +786,8 @@ FX_BOOL _ConvertBuffer_Rgb2Rgb32(FX_LPBYTE dest_buf, int dest_pitch, int width,
}
} else {
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * comps;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * comps;
for (int col = 0; col < width; col ++) {
*dest_scan++ = *src_scan++;
*dest_scan++ = *src_scan++;
@@ -799,14 +799,14 @@ FX_BOOL _ConvertBuffer_Rgb2Rgb32(FX_LPBYTE dest_buf, int dest_pitch, int width,
}
return TRUE;
}
-FX_BOOL _ConvertBuffer_32bppCmyk2Rgb32(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_32bppCmyk2Rgb32(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, void* pIccTransform)
{
if (pIccTransform) {
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 4;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 4;
for (int col = 0; col < width; col ++) {
pIccModule->TranslateScanline(pIccTransform, dest_scan, src_scan, 1);
dest_scan += 4;
@@ -815,8 +815,8 @@ FX_BOOL _ConvertBuffer_32bppCmyk2Rgb32(FX_LPBYTE dest_buf, int dest_pitch, int w
}
} else {
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 4;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 4;
for (int col = 0; col < width; col ++) {
AdobeCMYK_to_sRGB1(src_scan[0], src_scan[1], src_scan[2], src_scan[3],
dest_scan[2], dest_scan[1], dest_scan[0]);
@@ -827,7 +827,7 @@ FX_BOOL _ConvertBuffer_32bppCmyk2Rgb32(FX_LPBYTE dest_buf, int dest_pitch, int w
}
return TRUE;
}
-FX_BOOL ConvertBuffer(FXDIB_Format dest_format, FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL ConvertBuffer(FXDIB_Format dest_format, uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, FX_DWORD*& d_pal, void* pIccTransform)
{
FXDIB_Format src_format = pSrcBitmap->GetFormat();
@@ -993,7 +993,7 @@ FX_BOOL CFX_DIBitmap::ConvertFormat(FXDIB_Format dest_format, void* pIccTransfor
if (dest_format == FXDIB_Argb && src_format == FXDIB_Rgb32 && pIccTransform == NULL) {
m_AlphaFlag = 2;
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE scanline = m_pBuffer + row * m_Pitch + 3;
+ uint8_t* scanline = m_pBuffer + row * m_Pitch + 3;
for (int col = 0; col < m_Width; col ++) {
*scanline = 0xff;
scanline += 4;
@@ -1003,7 +1003,7 @@ FX_BOOL CFX_DIBitmap::ConvertFormat(FXDIB_Format dest_format, void* pIccTransfor
}
int dest_bpp = dest_format & 0xff;
int dest_pitch = (dest_bpp * m_Width + 31) / 32 * 4;
- FX_LPBYTE dest_buf = FX_TryAlloc(uint8_t, dest_pitch * m_Height + 4);
+ uint8_t* dest_buf = FX_TryAlloc(uint8_t, dest_pitch * m_Height + 4);
if (dest_buf == NULL) {
return FALSE;
}
@@ -1012,8 +1012,8 @@ FX_BOOL CFX_DIBitmap::ConvertFormat(FXDIB_Format dest_format, void* pIccTransfor
FXSYS_memset8(dest_buf, 0xff, dest_pitch * m_Height + 4);
if (m_pAlphaMask) {
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE pDstScanline = dest_buf + row * dest_pitch + 3;
- FX_LPCBYTE pSrcScanline = m_pAlphaMask->GetScanline(row);
+ uint8_t* pDstScanline = dest_buf + row * dest_pitch + 3;
+ const uint8_t* pSrcScanline = m_pAlphaMask->GetScanline(row);
for (int col = 0; col < m_Width; col ++) {
*pDstScanline = *pSrcScanline++;
pDstScanline += 4;
diff --git a/core/src/fxge/dib/fx_dib_engine.cpp b/core/src/fxge/dib/fx_dib_engine.cpp
index e0b21d2f59..fc36b95581 100644
--- a/core/src/fxge/dib/fx_dib_engine.cpp
+++ b/core/src/fxge/dib/fx_dib_engine.cpp
@@ -350,10 +350,10 @@ FX_BOOL CStretchEngine::ContinueStretchHorz(IFX_Pause* pPause)
rows_to_go = FX_STRECH_PAUSE_ROWS;
}
}
- FX_LPCBYTE src_scan = m_pSource->GetScanline(m_CurRow);
- FX_LPBYTE dest_scan = m_pInterBuf + (m_CurRow - m_SrcClip.top) * m_InterPitch;
- FX_LPCBYTE src_scan_mask = NULL;
- FX_LPBYTE dest_scan_mask = NULL;
+ const uint8_t* src_scan = m_pSource->GetScanline(m_CurRow);
+ uint8_t* dest_scan = m_pInterBuf + (m_CurRow - m_SrcClip.top) * m_InterPitch;
+ const uint8_t* src_scan_mask = NULL;
+ uint8_t* dest_scan_mask = NULL;
if (m_pExtraAlphaBuf) {
src_scan_mask = m_pSource->m_pAlphaMask->GetScanline(m_CurRow);
dest_scan_mask = m_pExtraAlphaBuf + (m_CurRow - m_SrcClip.top) * m_ExtraMaskPitch;
@@ -477,7 +477,7 @@ FX_BOOL CStretchEngine::ContinueStretchHorz(IFX_Pause* pPause)
int dest_r_y = 0, dest_g_m = 0, dest_b_c = 0;
for (int j = pPixelWeights->m_SrcStart; j <= pPixelWeights->m_SrcEnd; j ++) {
int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];
- FX_LPCBYTE src_pixel = src_scan + j * Bpp;
+ const uint8_t* src_pixel = src_scan + j * Bpp;
dest_b_c += pixel_weight * (*src_pixel++);
dest_g_m += pixel_weight * (*src_pixel++);
dest_r_y += pixel_weight * (*src_pixel);
@@ -500,7 +500,7 @@ FX_BOOL CStretchEngine::ContinueStretchHorz(IFX_Pause* pPause)
int dest_a = 0, dest_r_y = 0, dest_g_m = 0, dest_b_c = 0;
for (int j = pPixelWeights->m_SrcStart; j <= pPixelWeights->m_SrcEnd; j ++) {
int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];
- FX_LPCBYTE src_pixel = src_scan + j * Bpp;
+ const uint8_t* src_pixel = src_scan + j * Bpp;
if (m_DestFormat == FXDIB_Argb) {
pixel_weight = pixel_weight * src_pixel[3] / 255;
} else {
@@ -596,7 +596,7 @@ void CStretchEngine::StretchVert()
int dest_r_y = 0, dest_g_m = 0, dest_b_c = 0;
for (int j = pPixelWeights->m_SrcStart; j <= pPixelWeights->m_SrcEnd; j ++) {
int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];
- FX_LPCBYTE src_pixel = src_scan + (j - m_SrcClip.top) * m_InterPitch;
+ const uint8_t* src_pixel = src_scan + (j - m_SrcClip.top) * m_InterPitch;
dest_b_c += pixel_weight * (*src_pixel++);
dest_g_m += pixel_weight * (*src_pixel++);
dest_r_y += pixel_weight * (*src_pixel);
@@ -624,7 +624,7 @@ void CStretchEngine::StretchVert()
int dest_a = 0, dest_r_y = 0, dest_g_m = 0, dest_b_c = 0;
for (int j = pPixelWeights->m_SrcStart; j <= pPixelWeights->m_SrcEnd; j ++) {
int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];
- FX_LPCBYTE src_pixel = src_scan + (j - m_SrcClip.top) * m_InterPitch;
+ const uint8_t* src_pixel = src_scan + (j - m_SrcClip.top) * m_InterPitch;
int mask_v = 255;
if (src_scan_mask) {
mask_v = src_scan_mask[(j - m_SrcClip.top) * m_ExtraMaskPitch];
diff --git a/core/src/fxge/dib/fx_dib_main.cpp b/core/src/fxge/dib/fx_dib_main.cpp
index 74c4276695..db9b43412a 100644
--- a/core/src/fxge/dib/fx_dib_main.cpp
+++ b/core/src/fxge/dib/fx_dib_main.cpp
@@ -9,7 +9,7 @@
#include "../../../include/fxcodec/fx_codec.h"
#include "dib_int.h"
#include <limits.h>
-FX_BOOL ConvertBuffer(FXDIB_Format dest_format, FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL ConvertBuffer(FXDIB_Format dest_format, uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, FX_DWORD*& pal, void* pIccTransform);
void CmykDecode(FX_DWORD cmyk, int& c, int& m, int& y, int& k)
{
@@ -59,7 +59,7 @@ CFX_DIBitmap::CFX_DIBitmap()
m_pPalette = NULL;
}
#define _MAX_OOM_LIMIT_ 12000000
-FX_BOOL CFX_DIBitmap::Create(int width, int height, FXDIB_Format format, FX_LPBYTE pBuffer, int pitch)
+FX_BOOL CFX_DIBitmap::Create(int width, int height, FXDIB_Format format, uint8_t* pBuffer, int pitch)
{
m_pBuffer = NULL;
m_bpp = (uint8_t)format;
@@ -191,8 +191,8 @@ CFX_DIBitmap* CFX_DIBSource::Clone(const FX_RECT* pClip) const
copy_len = m_Pitch;
}
for (int row = rect.top; row < rect.bottom; row ++) {
- FX_LPCBYTE src_scan = GetScanline(row) + rect.left * m_bpp / 8;
- FX_LPBYTE dest_scan = (FX_LPBYTE)pNewBitmap->GetScanline(row - rect.top);
+ const uint8_t* src_scan = GetScanline(row) + rect.left * m_bpp / 8;
+ uint8_t* dest_scan = (uint8_t*)pNewBitmap->GetScanline(row - rect.top);
FXSYS_memcpy32(dest_scan, src_scan, copy_len);
}
}
@@ -392,8 +392,8 @@ FX_BOOL CFX_DIBitmap::TransferBitmap(int dest_left, int dest_top, int width, int
if (dest_format == src_format && pIccTransform == NULL) {
if (GetBPP() == 1) {
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = m_pBuffer + (dest_top + row) * m_Pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row);
+ uint8_t* dest_scan = m_pBuffer + (dest_top + row) * m_Pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row);
for (int col = 0; col < width; col ++) {
if (src_scan[(src_left + col) / 8] & (1 << (7 - (src_left + col) % 8))) {
dest_scan[(dest_left + col) / 8] |= 1 << (7 - (dest_left + col) % 8);
@@ -405,8 +405,8 @@ FX_BOOL CFX_DIBitmap::TransferBitmap(int dest_left, int dest_top, int width, int
} else {
int Bpp = GetBPP() / 8;
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = m_pBuffer + (dest_top + row) * m_Pitch + dest_left * Bpp;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * Bpp;
+ uint8_t* dest_scan = m_pBuffer + (dest_top + row) * m_Pitch + dest_left * Bpp;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * Bpp;
FXSYS_memcpy32(dest_scan, src_scan, width * Bpp);
}
}
@@ -417,7 +417,7 @@ FX_BOOL CFX_DIBitmap::TransferBitmap(int dest_left, int dest_top, int width, int
if (m_bpp == 8) {
dest_format = FXDIB_8bppMask;
}
- FX_LPBYTE dest_buf = m_pBuffer + dest_top * m_Pitch + dest_left * GetBPP() / 8;
+ uint8_t* dest_buf = m_pBuffer + dest_top * m_Pitch + dest_left * GetBPP() / 8;
FX_DWORD* d_plt = NULL;
if(!ConvertBuffer(dest_format, dest_buf, m_Pitch, width, height, pSrcBitmap, src_left, src_top, d_plt, pIccTransform)) {
return FALSE;
@@ -450,7 +450,7 @@ FX_BOOL CFX_DIBitmap::TransferMask(int dest_left, int dest_top, int width, int h
alpha = FXARGB_A(color);
dst_color = FXARGB_TODIB(color);
}
- FX_LPBYTE color_p = (FX_LPBYTE)&dst_color;
+ uint8_t* color_p = (uint8_t*)&dst_color;
if (pIccTransform && CFX_GEModule::Get()->GetCodecModule() && CFX_GEModule::Get()->GetCodecModule()->GetIccModule()) {
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
pIccModule->TranslateScanline(pIccTransform, color_p, color_p, 1);
@@ -468,7 +468,7 @@ FX_BOOL CFX_DIBitmap::TransferMask(int dest_left, int dest_top, int width, int h
if (GetFormat() == FXDIB_Argb) {
for (int row = 0; row < height; row ++) {
FX_DWORD* dest_pos = (FX_DWORD*)(m_pBuffer + (dest_top + row) * m_Pitch + dest_left * 4);
- FX_LPCBYTE src_scan = pMask->GetScanline(src_top + row);
+ const uint8_t* src_scan = pMask->GetScanline(src_top + row);
if (src_bpp == 1) {
for (int col = 0; col < width; col ++) {
int src_bitpos = src_left + col;
@@ -491,9 +491,9 @@ FX_BOOL CFX_DIBitmap::TransferMask(int dest_left, int dest_top, int width, int h
} else {
int comps = m_bpp / 8;
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_color_pos = m_pBuffer + (dest_top + row) * m_Pitch + dest_left * comps;
- FX_LPBYTE dest_alpha_pos = (FX_LPBYTE)m_pAlphaMask->GetScanline(dest_top + row) + dest_left;
- FX_LPCBYTE src_scan = pMask->GetScanline(src_top + row);
+ uint8_t* dest_color_pos = m_pBuffer + (dest_top + row) * m_Pitch + dest_left * comps;
+ uint8_t* dest_alpha_pos = (uint8_t*)m_pAlphaMask->GetScanline(dest_top + row) + dest_left;
+ const uint8_t* src_scan = pMask->GetScanline(src_top + row);
if (src_bpp == 1) {
for (int col = 0; col < width; col ++) {
int src_bitpos = src_left + col;
@@ -574,8 +574,8 @@ CFX_DIBitmap* CFX_DIBSource::GetAlphaMask(const FX_RECT* pClip) const
return NULL;
}
for (int row = rect.top; row < rect.bottom; row ++) {
- FX_LPCBYTE src_scan = GetScanline(row) + rect.left * 4 + 3;
- FX_LPBYTE dest_scan = (FX_LPBYTE)pMask->GetScanline(row - rect.top);
+ const uint8_t* src_scan = GetScanline(row) + rect.left * 4 + 3;
+ uint8_t* dest_scan = (uint8_t*)pMask->GetScanline(row - rect.top);
for (int col = rect.left; col < rect.right; col ++) {
*dest_scan ++ = *src_scan;
src_scan += 4;
@@ -734,8 +734,8 @@ FX_BOOL CFX_DIBitmap::LoadChannel(FXDIB_Channel destChannel, const CFX_DIBSource
int srcBytes = pSrcClone->GetBPP() / 8;
int destBytes = pDst->GetBPP() / 8;
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE dest_pos = (FX_LPBYTE)pDst->GetScanline(row) + destOffset;
- FX_LPCBYTE src_pos = pSrcClone->GetScanline(row) + srcOffset;
+ uint8_t* dest_pos = (uint8_t*)pDst->GetScanline(row) + destOffset;
+ const uint8_t* src_pos = pSrcClone->GetScanline(row) + srcOffset;
for (int col = 0; col < m_Width; col ++) {
*dest_pos = *src_pos;
dest_pos += destBytes;
@@ -800,7 +800,7 @@ FX_BOOL CFX_DIBitmap::LoadChannel(FXDIB_Channel destChannel, int value)
return TRUE;
}
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE scan_line = m_pBuffer + row * m_Pitch + destOffset;
+ uint8_t* scan_line = m_pBuffer + row * m_Pitch + destOffset;
for (int col = 0; col < m_Width; col ++) {
*scan_line = value;
scan_line += Bpp;
@@ -836,8 +836,8 @@ FX_BOOL CFX_DIBitmap::MultiplyAlpha(const CFX_DIBSource* pSrcBitmap)
return FALSE;
}
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE dest_scan = m_pBuffer + m_Pitch * row;
- FX_LPBYTE src_scan = pSrcClone->m_pBuffer + pSrcClone->m_Pitch * row;
+ uint8_t* dest_scan = m_pBuffer + m_Pitch * row;
+ uint8_t* src_scan = pSrcClone->m_pBuffer + pSrcClone->m_Pitch * row;
if (pSrcClone->GetBPP() == 1) {
for (int col = 0; col < m_Width; col ++) {
if (!((1 << (7 - col % 8)) & src_scan[col / 8])) {
@@ -860,8 +860,8 @@ FX_BOOL CFX_DIBitmap::MultiplyAlpha(const CFX_DIBSource* pSrcBitmap)
return FALSE;
}
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE dest_scan = m_pBuffer + m_Pitch * row + 3;
- FX_LPBYTE src_scan = pSrcClone->m_pBuffer + pSrcClone->m_Pitch * row;
+ uint8_t* dest_scan = m_pBuffer + m_Pitch * row + 3;
+ uint8_t* src_scan = pSrcClone->m_pBuffer + pSrcClone->m_Pitch * row;
for (int col = 0; col < m_Width; col ++) {
*dest_scan = (*dest_scan) * src_scan[col] / 255;
dest_scan += 4;
@@ -903,8 +903,8 @@ FX_BOOL CFX_DIBitmap::GetGrayData(void* pIccTransform)
}
FXSYS_memset8(pMask->GetBuffer(), gray[0], pMask->GetPitch() * m_Height);
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE src_pos = m_pBuffer + row * m_Pitch;
- FX_LPBYTE dest_pos = (FX_LPBYTE)pMask->GetScanline(row);
+ uint8_t* src_pos = m_pBuffer + row * m_Pitch;
+ uint8_t* dest_pos = (uint8_t*)pMask->GetScanline(row);
for (int col = 0; col < m_Width; col ++) {
if (src_pos[col / 8] & (1 << (7 - col % 8))) {
*dest_pos = gray[1];
@@ -936,8 +936,8 @@ FX_BOOL CFX_DIBitmap::GetGrayData(void* pIccTransform)
return FALSE;
}
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE dest_pos = pMask->GetBuffer() + row * pMask->GetPitch();
- FX_LPBYTE src_pos = m_pBuffer + row * m_Pitch;
+ uint8_t* dest_pos = pMask->GetBuffer() + row * pMask->GetPitch();
+ uint8_t* src_pos = m_pBuffer + row * m_Pitch;
for (int col = 0; col < m_Width; col ++) {
*dest_pos ++ = gray[*src_pos ++];
}
@@ -956,8 +956,8 @@ FX_BOOL CFX_DIBitmap::GetGrayData(void* pIccTransform)
return FALSE;
}
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE src_pos = m_pBuffer + row * m_Pitch;
- FX_LPBYTE dest_pos = pMask->GetBuffer() + row * pMask->GetPitch();
+ uint8_t* src_pos = m_pBuffer + row * m_Pitch;
+ uint8_t* dest_pos = pMask->GetBuffer() + row * pMask->GetPitch();
for (int col = 0; col < m_Width; col ++) {
*dest_pos ++ = FXRGB2GRAY(src_pos[2], src_pos[1], *src_pos);
src_pos += 3;
@@ -977,8 +977,8 @@ FX_BOOL CFX_DIBitmap::GetGrayData(void* pIccTransform)
return FALSE;
}
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE src_pos = m_pBuffer + row * m_Pitch;
- FX_LPBYTE dest_pos = pMask->GetBuffer() + row * pMask->GetPitch();
+ uint8_t* src_pos = m_pBuffer + row * m_Pitch;
+ uint8_t* dest_pos = pMask->GetBuffer() + row * pMask->GetPitch();
for (int col = 0; col < m_Width; col ++) {
*dest_pos ++ = FXRGB2GRAY(src_pos[2], src_pos[1], *src_pos);
src_pos += 4;
@@ -1007,7 +1007,7 @@ FX_BOOL CFX_DIBitmap::MultiplyAlpha(int alpha)
break;
case FXDIB_8bppMask: {
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE scan_line = m_pBuffer + row * m_Pitch;
+ uint8_t* scan_line = m_pBuffer + row * m_Pitch;
for (int col = 0; col < m_Width; col ++) {
scan_line[col] = scan_line[col] * alpha / 255;
}
@@ -1016,7 +1016,7 @@ FX_BOOL CFX_DIBitmap::MultiplyAlpha(int alpha)
}
case FXDIB_Argb: {
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE scan_line = m_pBuffer + row * m_Pitch + 3;
+ uint8_t* scan_line = m_pBuffer + row * m_Pitch + 3;
for (int col = 0; col < m_Width; col ++) {
*scan_line = (*scan_line) * alpha / 255;
scan_line += 4;
@@ -1047,7 +1047,7 @@ FX_DWORD CFX_DIBitmap::GetPixel(int x, int y) const
if (m_pBuffer == NULL) {
return 0;
}
- FX_LPBYTE pos = m_pBuffer + y * m_Pitch + x * GetBPP() / 8;
+ uint8_t* pos = m_pBuffer + y * m_Pitch + x * GetBPP() / 8;
switch (GetFormat()) {
case FXDIB_1bppMask: {
if ((*pos) & (1 << (7 - x % 8))) {
@@ -1086,7 +1086,7 @@ void CFX_DIBitmap::SetPixel(int x, int y, FX_DWORD color)
if (x < 0 || x >= m_Width || y < 0 || y >= m_Height) {
return;
}
- FX_LPBYTE pos = m_pBuffer + y * m_Pitch + x * GetBPP() / 8;
+ uint8_t* pos = m_pBuffer + y * m_Pitch + x * GetBPP() / 8;
switch (GetFormat()) {
case FXDIB_1bppMask:
if (color >> 24) {
@@ -1148,14 +1148,14 @@ void CFX_DIBitmap::SetPixel(int x, int y, FX_DWORD color)
break;
}
}
-void CFX_DIBitmap::DownSampleScanline(int line, FX_LPBYTE dest_scan, int dest_bpp,
+void CFX_DIBitmap::DownSampleScanline(int line, uint8_t* dest_scan, int dest_bpp,
int dest_width, FX_BOOL bFlipX, int clip_left, int clip_width) const
{
if (m_pBuffer == NULL) {
return;
}
int src_Bpp = m_bpp / 8;
- FX_LPBYTE scanline = m_pBuffer + line * m_Pitch;
+ uint8_t* scanline = m_pBuffer + line * m_Pitch;
if (src_Bpp == 0) {
for (int i = 0; i < clip_width; i ++) {
FX_DWORD dest_x = clip_left + i;
@@ -1264,7 +1264,7 @@ FX_BOOL CFX_DIBitmap::ConvertColorScale(FX_DWORD forecolor, FX_DWORD backcolor)
if (isCmykImage) {
if (forecolor == 0xff && backcolor == 0x00) {
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE scanline = m_pBuffer + row * m_Pitch;
+ uint8_t* scanline = m_pBuffer + row * m_Pitch;
for (int col = 0; col < m_Width; col ++) {
uint8_t b, g, r;
AdobeCMYK_to_sRGB1(scanline[0], scanline[1], scanline[2], scanline[3],
@@ -1279,7 +1279,7 @@ FX_BOOL CFX_DIBitmap::ConvertColorScale(FX_DWORD forecolor, FX_DWORD backcolor)
}
} else if (forecolor == 0 && backcolor == 0xffffff) {
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE scanline = m_pBuffer + row * m_Pitch;
+ uint8_t* scanline = m_pBuffer + row * m_Pitch;
int gap = m_bpp / 8 - 2;
for (int col = 0; col < m_Width; col ++) {
int gray = FXRGB2GRAY(scanline[2], scanline[1], scanline[0]);
@@ -1293,7 +1293,7 @@ FX_BOOL CFX_DIBitmap::ConvertColorScale(FX_DWORD forecolor, FX_DWORD backcolor)
}
if (isCmykImage) {
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE scanline = m_pBuffer + row * m_Pitch;
+ uint8_t* scanline = m_pBuffer + row * m_Pitch;
for (int col = 0; col < m_Width; col ++) {
uint8_t b, g, r;
AdobeCMYK_to_sRGB1(scanline[0], scanline[1], scanline[2], scanline[3],
@@ -1307,7 +1307,7 @@ FX_BOOL CFX_DIBitmap::ConvertColorScale(FX_DWORD forecolor, FX_DWORD backcolor)
}
} else {
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE scanline = m_pBuffer + row * m_Pitch;
+ uint8_t* scanline = m_pBuffer + row * m_Pitch;
int gap = m_bpp / 8 - 2;
for (int col = 0; col < m_Width; col ++) {
int gray = FXRGB2GRAY(scanline[2], scanline[1], scanline[0]);
@@ -1348,8 +1348,8 @@ FX_BOOL CFX_DIBitmap::DitherFS(const FX_DWORD* pPalette, int pal_size, const FX_
}
}
for (int row = rect.top; row < rect.bottom; row ++) {
- FX_LPBYTE scan = m_pBuffer + row * m_Pitch;
- FX_LPBYTE next_scan = m_pBuffer + (row + 1) * m_Pitch;
+ uint8_t* scan = m_pBuffer + row * m_Pitch;
+ uint8_t* next_scan = m_pBuffer + (row + 1) * m_Pitch;
for (int col = rect.left; col < rect.right; col ++) {
int src_pixel = scan[col];
int dest_pixel = translate[src_pixel];
@@ -1414,11 +1414,11 @@ CFX_DIBitmap* CFX_DIBSource::FlipImage(FX_BOOL bXFlip, FX_BOOL bYFlip) const
return NULL;
}
pFlipped->CopyPalette(m_pPalette);
- FX_LPBYTE pDestBuffer = pFlipped->GetBuffer();
+ uint8_t* pDestBuffer = pFlipped->GetBuffer();
int Bpp = m_bpp / 8;
for (int row = 0; row < m_Height; row ++) {
- FX_LPCBYTE src_scan = GetScanline(row);
- FX_LPBYTE dest_scan = pDestBuffer + m_Pitch * (bYFlip ? (m_Height - row - 1) : row);
+ const uint8_t* src_scan = GetScanline(row);
+ uint8_t* dest_scan = pDestBuffer + m_Pitch * (bYFlip ? (m_Height - row - 1) : row);
if (!bXFlip) {
FXSYS_memcpy32(dest_scan, src_scan, m_Pitch);
continue;
@@ -1460,8 +1460,8 @@ CFX_DIBitmap* CFX_DIBSource::FlipImage(FX_BOOL bXFlip, FX_BOOL bYFlip) const
pDestBuffer = pFlipped->m_pAlphaMask->GetBuffer();
FX_DWORD dest_pitch = pFlipped->m_pAlphaMask->GetPitch();
for (int row = 0; row < m_Height; row ++) {
- FX_LPCBYTE src_scan = m_pAlphaMask->GetScanline(row);
- FX_LPBYTE dest_scan = pDestBuffer + dest_pitch * (bYFlip ? (m_Height - row - 1) : row);
+ const uint8_t* src_scan = m_pAlphaMask->GetScanline(row);
+ uint8_t* dest_scan = pDestBuffer + dest_pitch * (bYFlip ? (m_Height - row - 1) : row);
if (!bXFlip) {
FXSYS_memcpy32(dest_scan, src_scan, dest_pitch);
continue;
@@ -1528,12 +1528,12 @@ void CFX_FilteredDIB::LoadSrc(const CFX_DIBSource* pSrc, FX_BOOL bAutoDropSrc)
m_pPalette = GetDestPalette();
m_pScanline = FX_Alloc(uint8_t, m_Pitch);
}
-FX_LPCBYTE CFX_FilteredDIB::GetScanline(int line) const
+const uint8_t* CFX_FilteredDIB::GetScanline(int line) const
{
TranslateScanline(m_pScanline, m_pSrc->GetScanline(line));
return m_pScanline;
}
-void CFX_FilteredDIB::DownSampleScanline(int line, FX_LPBYTE dest_scan, int dest_bpp,
+void CFX_FilteredDIB::DownSampleScanline(int line, uint8_t* dest_scan, int dest_bpp,
int dest_width, FX_BOOL bFlipX, int clip_left, int clip_width) const
{
m_pSrc->DownSampleScanline(line, dest_scan, dest_bpp, dest_width, bFlipX, clip_left, clip_width);
@@ -1684,11 +1684,11 @@ void CFX_BitmapStorer::Replace(CFX_DIBitmap* pBitmap)
}
m_pBitmap = pBitmap;
}
-void CFX_BitmapStorer::ComposeScanline(int line, FX_LPCBYTE scanline, FX_LPCBYTE scan_extra_alpha)
+void CFX_BitmapStorer::ComposeScanline(int line, const uint8_t* scanline, const uint8_t* scan_extra_alpha)
{
- FX_LPBYTE dest_buf = (FX_LPBYTE)m_pBitmap->GetScanline(line);
- FX_LPBYTE dest_alpha_buf = m_pBitmap->m_pAlphaMask ?
- (FX_LPBYTE)m_pBitmap->m_pAlphaMask->GetScanline(line) : NULL;
+ uint8_t* dest_buf = (uint8_t*)m_pBitmap->GetScanline(line);
+ uint8_t* dest_alpha_buf = m_pBitmap->m_pAlphaMask ?
+ (uint8_t*)m_pBitmap->m_pAlphaMask->GetScanline(line) : NULL;
if (dest_buf) {
FXSYS_memcpy32(dest_buf, scanline, m_pBitmap->GetPitch());
}
diff --git a/core/src/fxge/dib/fx_dib_transform.cpp b/core/src/fxge/dib/fx_dib_transform.cpp
index 7d91cdba4b..b8109756e7 100644
--- a/core/src/fxge/dib/fx_dib_transform.cpp
+++ b/core/src/fxge/dib/fx_dib_transform.cpp
@@ -74,7 +74,7 @@ CFX_DIBitmap* CFX_DIBSource::SwapXY(FX_BOOL bXFlip, FX_BOOL bYFlip, const FX_REC
}
pTransBitmap->CopyPalette(m_pPalette);
int dest_pitch = pTransBitmap->GetPitch();
- FX_LPBYTE dest_buf = pTransBitmap->GetBuffer();
+ uint8_t* dest_buf = pTransBitmap->GetBuffer();
int row_start = bXFlip ? m_Height - dest_clip.right : dest_clip.left;
int row_end = bXFlip ? m_Height - dest_clip.left : dest_clip.right;
int col_start = bYFlip ? m_Width - dest_clip.bottom : dest_clip.top;
@@ -82,9 +82,9 @@ CFX_DIBitmap* CFX_DIBSource::SwapXY(FX_BOOL bXFlip, FX_BOOL bYFlip, const FX_REC
if (GetBPP() == 1) {
FXSYS_memset8(dest_buf, 0xff, dest_pitch * result_height);
for (int row = row_start; row < row_end; row ++) {
- FX_LPCBYTE src_scan = GetScanline(row);
+ const uint8_t* src_scan = GetScanline(row);
int dest_col = (bXFlip ? dest_clip.right - (row - row_start) - 1 : row) - dest_clip.left;
- FX_LPBYTE dest_scan = dest_buf;
+ uint8_t* dest_scan = dest_buf;
if (bYFlip) {
dest_scan += (result_height - 1) * dest_pitch;
}
@@ -104,7 +104,7 @@ CFX_DIBitmap* CFX_DIBSource::SwapXY(FX_BOOL bXFlip, FX_BOOL bYFlip, const FX_REC
}
for (int row = row_start; row < row_end; row ++) {
int dest_col = (bXFlip ? dest_clip.right - (row - row_start) - 1 : row) - dest_clip.left;
- FX_LPBYTE dest_scan = dest_buf + dest_col * nBytes;
+ uint8_t* dest_scan = dest_buf + dest_col * nBytes;
if (bYFlip) {
dest_scan += (result_height - 1) * dest_pitch;
}
@@ -115,7 +115,7 @@ CFX_DIBitmap* CFX_DIBSource::SwapXY(FX_BOOL bXFlip, FX_BOOL bYFlip, const FX_REC
dest_scan += dest_step;
}
} else {
- FX_LPCBYTE src_scan = GetScanline(row) + col_start * nBytes;
+ const uint8_t* src_scan = GetScanline(row) + col_start * nBytes;
if (nBytes == 1)
for (int col = col_start; col < col_end; col ++) {
*dest_scan = *src_scan++;
@@ -137,11 +137,11 @@ CFX_DIBitmap* CFX_DIBSource::SwapXY(FX_BOOL bXFlip, FX_BOOL bYFlip, const FX_REC
int dest_step = bYFlip ? -dest_pitch : dest_pitch;
for (int row = row_start; row < row_end; row ++) {
int dest_col = (bXFlip ? dest_clip.right - (row - row_start) - 1 : row) - dest_clip.left;
- FX_LPBYTE dest_scan = dest_buf + dest_col;
+ uint8_t* dest_scan = dest_buf + dest_col;
if (bYFlip) {
dest_scan += (result_height - 1) * dest_pitch;
}
- FX_LPCBYTE src_scan = m_pAlphaMask->GetScanline(row) + col_start;
+ const uint8_t* src_scan = m_pAlphaMask->GetScanline(row) + col_start;
for (int col = col_start; col < col_end; col ++) {
*dest_scan = *src_scan++;
dest_scan += dest_step;
@@ -259,24 +259,24 @@ FX_BOOL CFX_ImageTransformer::Start(const CFX_DIBSource* pSrc, const CFX_AffineM
m_Status = 3;
return TRUE;
}
-uint8_t _bilinear_interpol(FX_LPCBYTE buf, int row_offset_l, int row_offset_r,
+uint8_t _bilinear_interpol(const uint8_t* buf, int row_offset_l, int row_offset_r,
int src_col_l, int src_col_r, int res_x, int res_y,
int bpp, int c_offset)
{
int i_resx = 255 - res_x;
int col_bpp_l = src_col_l * bpp;
int col_bpp_r = src_col_r * bpp;
- FX_LPCBYTE buf_u = buf + row_offset_l + c_offset;
- FX_LPCBYTE buf_d = buf + row_offset_r + c_offset;
- FX_LPCBYTE src_pos0 = buf_u + col_bpp_l;
- FX_LPCBYTE src_pos1 = buf_u + col_bpp_r;
- FX_LPCBYTE src_pos2 = buf_d + col_bpp_l;
- FX_LPCBYTE src_pos3 = buf_d + col_bpp_r;
+ const uint8_t* buf_u = buf + row_offset_l + c_offset;
+ const uint8_t* buf_d = buf + row_offset_r + c_offset;
+ const uint8_t* src_pos0 = buf_u + col_bpp_l;
+ const uint8_t* src_pos1 = buf_u + col_bpp_r;
+ const uint8_t* src_pos2 = buf_d + col_bpp_l;
+ const uint8_t* src_pos3 = buf_d + col_bpp_r;
uint8_t r_pos_0 = (*src_pos0 * i_resx + *src_pos1 * res_x) >> 8;
uint8_t r_pos_1 = (*src_pos2 * i_resx + *src_pos3 * res_x) >> 8;
return (r_pos_0 * (255 - res_y) + r_pos_1 * res_y) >> 8;
}
-uint8_t _bicubic_interpol(FX_LPCBYTE buf, int pitch, int pos_pixel[], int u_w[], int v_w[], int res_x, int res_y,
+uint8_t _bicubic_interpol(const uint8_t* buf, int pitch, int pos_pixel[], int u_w[], int v_w[], int res_x, int res_y,
int bpp, int c_offset)
{
int s_result = 0;
@@ -361,8 +361,8 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause)
if (m_Storer.GetBitmap() == NULL) {
return FALSE;
}
- FX_LPCBYTE stretch_buf = m_Storer.GetBitmap()->GetBuffer();
- FX_LPCBYTE stretch_buf_mask = NULL;
+ const uint8_t* stretch_buf = m_Storer.GetBitmap()->GetBuffer();
+ const uint8_t* stretch_buf_mask = NULL;
if (m_Storer.GetBitmap()->m_pAlphaMask) {
stretch_buf_mask = m_Storer.GetBitmap()->m_pAlphaMask->GetBuffer();
}
@@ -463,7 +463,7 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause)
if (!(m_Flags & FXDIB_DOWNSAMPLE) && !(m_Flags & FXDIB_BICUBIC_INTERPOL)) {
CFX_BilinearMatrix result2stretch_fix(result2stretch, 8);
for (int row = 0; row < m_ResultHeight; row ++) {
- FX_LPBYTE dest_scan = (FX_LPBYTE)pTransformed->GetScanline(row);
+ uint8_t* dest_scan = (uint8_t*)pTransformed->GetScanline(row);
for (int col = 0; col < m_ResultWidth; col ++) {
int src_col_l, src_row_l, res_x, res_y;
result2stretch_fix.Transform(col, row, src_col_l, src_row_l, res_x, res_y);
@@ -492,7 +492,7 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause)
} else if (m_Flags & FXDIB_BICUBIC_INTERPOL) {
CFX_BilinearMatrix result2stretch_fix(result2stretch, 8);
for (int row = 0; row < m_ResultHeight; row ++) {
- FX_LPBYTE dest_scan = (FX_LPBYTE)pTransformed->GetScanline(row);
+ uint8_t* dest_scan = (uint8_t*)pTransformed->GetScanline(row);
for (int col = 0; col < m_ResultWidth; col ++) {
int src_col_l, src_row_l, res_x, res_y;
result2stretch_fix.Transform(col, row, src_col_l, src_row_l, res_x, res_y);
@@ -514,7 +514,7 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause)
} else {
CPDF_FixedMatrix result2stretch_fix(result2stretch, 8);
for (int row = 0; row < m_ResultHeight; row ++) {
- FX_LPBYTE dest_scan = (FX_LPBYTE)pTransformed->GetScanline(row);
+ uint8_t* dest_scan = (uint8_t*)pTransformed->GetScanline(row);
for (int col = 0; col < m_ResultWidth; col ++) {
int src_col, src_row;
result2stretch_fix.Transform(col, row, src_col, src_row);
@@ -525,7 +525,7 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause)
if (src_row == stretch_height) {
src_row --;
}
- FX_LPCBYTE src_pixel = stretch_buf + stretch_pitch * src_row + src_col;
+ const uint8_t* src_pixel = stretch_buf + stretch_pitch * src_row + src_col;
*dest_scan = *src_pixel;
}
dest_scan ++;
@@ -762,7 +762,7 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause)
if (src_row == stretch_height) {
src_row --;
}
- FX_LPCBYTE src_pos = stretch_buf + src_row * stretch_pitch + src_col * Bpp;
+ const uint8_t* src_pos = stretch_buf + src_row * stretch_pitch + src_col * Bpp;
if (bHasAlpha) {
if (transformF != FXDIB_Argb) {
if (transformF == FXDIB_Rgba) {
diff --git a/core/src/fxge/ge/fx_ge.cpp b/core/src/fxge/ge/fx_ge.cpp
index 4cfa95b881..5a9c8f53e5 100644
--- a/core/src/fxge/ge/fx_ge.cpp
+++ b/core/src/fxge/ge/fx_ge.cpp
@@ -68,7 +68,7 @@ void CFX_GEModule::SetTextGamma(FX_FLOAT gammaValue)
i++;
}
}
-FX_LPCBYTE CFX_GEModule::GetTextGammaTable()
+const uint8_t* CFX_GEModule::GetTextGammaTable()
{
return m_GammaValue;
}
diff --git a/core/src/fxge/ge/fx_ge_device.cpp b/core/src/fxge/ge/fx_ge_device.cpp
index 0b4ffd5f4c..8461396c1f 100644
--- a/core/src/fxge/ge/fx_ge_device.cpp
+++ b/core/src/fxge/ge/fx_ge_device.cpp
@@ -390,16 +390,16 @@ FX_BOOL CFX_RenderDevice::StretchBitMask(const CFX_DIBSource* pBitmap, int left,
return m_pDeviceDriver->StretchDIBits(pBitmap, argb, left, top, dest_width, dest_height, &clip_box, flags, alpha_flag, pIccTransform);
}
FX_BOOL CFX_RenderDevice::StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD argb,
- const CFX_AffineMatrix* pMatrix, FX_DWORD flags, FX_LPVOID& handle,
+ const CFX_AffineMatrix* pMatrix, FX_DWORD flags, void*& handle,
int alpha_flag, void* pIccTransform, int blend_mode)
{
return m_pDeviceDriver->StartDIBits(pBitmap, bitmap_alpha, argb, pMatrix, flags, handle, alpha_flag, pIccTransform, blend_mode);
}
-FX_BOOL CFX_RenderDevice::ContinueDIBits(FX_LPVOID handle, IFX_Pause* pPause)
+FX_BOOL CFX_RenderDevice::ContinueDIBits(void* handle, IFX_Pause* pPause)
{
return m_pDeviceDriver->ContinueDIBits(handle, pPause);
}
-void CFX_RenderDevice::CancelDIBits(FX_LPVOID handle)
+void CFX_RenderDevice::CancelDIBits(void* handle)
{
m_pDeviceDriver->CancelDIBits(handle);
}
diff --git a/core/src/fxge/ge/fx_ge_font.cpp b/core/src/fxge/ge/fx_ge_font.cpp
index 4c6da4edc3..c61119d5fe 100644
--- a/core/src/fxge/ge/fx_ge_font.cpp
+++ b/core/src/fxge/ge/fx_ge_font.cpp
@@ -8,7 +8,7 @@
#include "../../../include/fxge/fx_freetype.h"
#include "text_int.h"
#define EM_ADJUST(em, a) (em == 0?(a): (a)*1000/em)
-extern void _FPDFAPI_GetInternalFontData(int id1, FX_LPCBYTE& data, FX_DWORD& size);
+extern void _FPDFAPI_GetInternalFontData(int id1, const uint8_t*& data, FX_DWORD& size);
CFX_Font::CFX_Font()
{
m_pSubstFont = NULL;
@@ -189,7 +189,7 @@ int CFX_Font::GetGlyphWidth(FX_DWORD glyph_index)
int width = EM_ADJUST(FXFT_Get_Face_UnitsPerEM(m_Face), FXFT_Get_Glyph_HoriAdvance(m_Face));
return width;
}
-static FXFT_Face FT_LoadFont(FX_LPBYTE pData, int size)
+static FXFT_Face FT_LoadFont(uint8_t* pData, int size)
{
FXFT_Library library;
if (CFX_GEModule::Get()->GetFontMgr()->m_FTLibrary == NULL) {
@@ -207,12 +207,12 @@ static FXFT_Face FT_LoadFont(FX_LPBYTE pData, int size)
}
return face;
}
-FX_BOOL CFX_Font::LoadEmbedded(FX_LPCBYTE data, FX_DWORD size)
+FX_BOOL CFX_Font::LoadEmbedded(const uint8_t* data, FX_DWORD size)
{
m_pFontDataAllocation = FX_Alloc(uint8_t, size);
FXSYS_memcpy32(m_pFontDataAllocation, data, size);
- m_Face = FT_LoadFont((FX_LPBYTE)m_pFontDataAllocation, size);
- m_pFontData = (FX_LPBYTE)m_pFontDataAllocation;
+ m_Face = FT_LoadFont((uint8_t*)m_pFontDataAllocation, size);
+ m_pFontData = (uint8_t*)m_pFontDataAllocation;
m_bEmbedded = TRUE;
m_dwSize = size;
return m_Face != NULL;
@@ -540,7 +540,7 @@ FX_BOOL CFX_FontEncodingEX::IsUnicodeCompatible() const
{
return m_nEncodingID == FXFM_ENCODING_UNICODE;
}
-FX_DWORD CFX_FontEncodingEX::GlyphIndexFromName(FX_LPCSTR pStrName)
+FX_DWORD CFX_FontEncodingEX::GlyphIndexFromName(const FX_CHAR* pStrName)
{
FXFT_Face face = m_pFont->m_Face;
return FT_Get_Name_Index(face, (FT_String*)pStrName);
@@ -550,7 +550,7 @@ CFX_ByteString CFX_FontEncodingEX::NameFromGlyphIndex(FX_DWORD dwGlyphIndex)
FXFT_Face face = m_pFont->m_Face;
CFX_ByteString glyphName(" ");
if (FT_HAS_GLYPH_NAMES(((FT_Face)face))) {
- if (FT_Get_Glyph_Name((FT_Face)face, dwGlyphIndex, (FT_Pointer)(FX_LPCSTR)glyphName, 16)) {
+ if (FT_Get_Glyph_Name((FT_Face)face, dwGlyphIndex, (FT_Pointer)(const FX_CHAR*)glyphName, 16)) {
glyphName.Empty();
return glyphName;
}
diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp
index 4df7def3b9..620b82953c 100644
--- a/core/src/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/src/fxge/ge/fx_ge_fontmap.cpp
@@ -120,7 +120,7 @@ FXFT_Face CFX_FontMgr::FindSubstFont(const CFX_ByteString& face_name, FX_BOOL bT
CharsetCP, pSubstFont);
}
FXFT_Face CFX_FontMgr::GetCachedFace(const CFX_ByteString& face_name,
- int weight, FX_BOOL bItalic, FX_LPBYTE& pFontData)
+ int weight, FX_BOOL bItalic, uint8_t*& pFontData)
{
CFX_ByteString key(face_name);
key += ',';
@@ -136,7 +136,7 @@ FXFT_Face CFX_FontMgr::GetCachedFace(const CFX_ByteString& face_name,
return NULL;
}
FXFT_Face CFX_FontMgr::AddCachedFace(const CFX_ByteString& face_name,
- int weight, FX_BOOL bItalic, FX_LPBYTE pData, FX_DWORD size, int face_index)
+ int weight, FX_BOOL bItalic, uint8_t* pData, FX_DWORD size, int face_index)
{
CTTFontDesc* pFontDesc = FX_NEW CTTFontDesc;
if (!pFontDesc) {
@@ -170,7 +170,7 @@ FXFT_Face CFX_FontMgr::AddCachedFace(const CFX_ByteString& face_name,
m_FaceMap.SetAt(key, pFontDesc);
return pFontDesc->m_SingleFace.m_pFace;
}
-const FX_LPCSTR g_Base14FontNames[14] = {
+const FX_CHAR* const g_Base14FontNames[14] = {
"Courier",
"Courier-Bold",
"Courier-BoldOblique",
@@ -284,7 +284,7 @@ g_AltFontNames[] = {
extern "C" {
static int compareString(const void* key, const void* element)
{
- return FXSYS_stricmp((FX_LPCSTR)key, ((_AltFontName*)element)->m_pName);
+ return FXSYS_stricmp((const FX_CHAR*)key, ((_AltFontName*)element)->m_pName);
}
}
int _PDF_GetStandardFontName(CFX_ByteString& name)
@@ -297,10 +297,10 @@ int _PDF_GetStandardFontName(CFX_ByteString& name)
name = g_Base14FontNames[found->m_Index];
return found->m_Index;
}
-int GetTTCIndex(FX_LPCBYTE pFontData, FX_DWORD ttc_size, FX_DWORD font_offset)
+int GetTTCIndex(const uint8_t* pFontData, FX_DWORD ttc_size, FX_DWORD font_offset)
{
int face_index = 0;
- FX_LPCBYTE p = pFontData + 8;
+ const uint8_t* p = pFontData + 8;
FX_DWORD nfont = GET_TT_LONG(p);
FX_DWORD index;
for (index = 0; index < nfont; index ++) {
@@ -317,7 +317,7 @@ int GetTTCIndex(FX_LPCBYTE pFontData, FX_DWORD ttc_size, FX_DWORD font_offset)
return face_index;
}
FXFT_Face CFX_FontMgr::GetCachedTTCFace(int ttc_size, FX_DWORD checksum,
- int font_offset, FX_LPBYTE& pFontData)
+ int font_offset, uint8_t*& pFontData)
{
CFX_ByteString key;
key.Format("%d:%d", ttc_size, checksum);
@@ -335,7 +335,7 @@ FXFT_Face CFX_FontMgr::GetCachedTTCFace(int ttc_size, FX_DWORD checksum,
return pFontDesc->m_TTCFace.m_pFaces[face_index];
}
FXFT_Face CFX_FontMgr::AddCachedTTCFace(int ttc_size, FX_DWORD checksum,
- FX_LPBYTE pData, FX_DWORD size, int font_offset)
+ uint8_t* pData, FX_DWORD size, int font_offset)
{
CFX_ByteString key;
key.Format("%d:%d", ttc_size, checksum);
@@ -355,7 +355,7 @@ FXFT_Face CFX_FontMgr::AddCachedTTCFace(int ttc_size, FX_DWORD checksum,
pFontDesc->m_TTCFace.m_pFaces[face_index] = GetFixedFace(pFontDesc->m_pFontData, ttc_size, face_index);
return pFontDesc->m_TTCFace.m_pFaces[face_index];
}
-FXFT_Face CFX_FontMgr::GetFixedFace(FX_LPCBYTE pData, FX_DWORD size, int face_index)
+FXFT_Face CFX_FontMgr::GetFixedFace(const uint8_t* pData, FX_DWORD size, int face_index)
{
FXFT_Library library;
if (m_FTLibrary == NULL) {
@@ -373,7 +373,7 @@ FXFT_Face CFX_FontMgr::GetFixedFace(FX_LPCBYTE pData, FX_DWORD size, int face_in
}
return face;
}
-FXFT_Face CFX_FontMgr::GetFileFace(FX_LPCSTR filename, int face_index)
+FXFT_Face CFX_FontMgr::GetFileFace(const FX_CHAR* filename, int face_index)
{
FXFT_Library library;
if (m_FTLibrary == NULL) {
@@ -448,11 +448,11 @@ const FoxitFonts g_FoxitFonts[14] = {
{g_FoxitSymbolFontData, 16729},
{g_FoxitDingbatsFontData, 29513},
};
-void _FPDFAPI_GetInternalFontData(int id, FX_LPCBYTE& data, FX_DWORD& size)
+void _FPDFAPI_GetInternalFontData(int id, const uint8_t*& data, FX_DWORD& size)
{
CFX_GEModule::Get()->GetFontMgr()->GetStandardFont(data, size, id);
}
-FX_BOOL CFX_FontMgr::GetStandardFont(FX_LPCBYTE& pFontData, FX_DWORD& size, int index)
+FX_BOOL CFX_FontMgr::GetStandardFont(const uint8_t*& pFontData, FX_DWORD& size, int index)
{
if (index > 15 || index < 0) {
return FALSE;
@@ -507,7 +507,7 @@ void CFX_FontMapper::SetSystemFontInfo(IFX_SystemFontInfo* pFontInfo)
}
m_pFontInfo = pFontInfo;
}
-static CFX_ByteString _TT_NormalizeName(FX_LPCSTR family)
+static CFX_ByteString _TT_NormalizeName(const FX_CHAR* family)
{
CFX_ByteString norm(family, -1);
norm.Remove(' ');
@@ -520,12 +520,12 @@ static CFX_ByteString _TT_NormalizeName(FX_LPCSTR family)
norm.MakeLower();
return norm;
}
-CFX_ByteString _FPDF_GetNameFromTT(FX_LPCBYTE name_table, FX_DWORD name_id)
+CFX_ByteString _FPDF_GetNameFromTT(const uint8_t* name_table, FX_DWORD name_id)
{
- FX_LPCBYTE ptr = name_table + 2;
+ const uint8_t* ptr = name_table + 2;
int name_count = GET_TT_SHORT(ptr);
int string_offset = GET_TT_SHORT(ptr + 2);
- FX_LPCBYTE string_ptr = name_table + string_offset;
+ const uint8_t* string_ptr = name_table + string_offset;
ptr += 4;
for (int i = 0; i < name_count; i ++) {
if (GET_TT_SHORT(ptr + 6) == name_id && GET_TT_SHORT(ptr) == 1 && GET_TT_SHORT(ptr + 2) == 0) {
@@ -544,10 +544,10 @@ static CFX_ByteString _FPDF_ReadStringFromFile(FXSYS_FILE* pFile, FX_DWORD size)
buffer.ReleaseBuffer(size);
return buffer;
}
-CFX_ByteString _FPDF_LoadTableFromTT(FXSYS_FILE* pFile, FX_LPCBYTE pTables, FX_DWORD nTables, FX_DWORD tag)
+CFX_ByteString _FPDF_LoadTableFromTT(FXSYS_FILE* pFile, const uint8_t* pTables, FX_DWORD nTables, FX_DWORD tag)
{
for (FX_DWORD i = 0; i < nTables; i ++) {
- FX_LPCBYTE p = pTables + i * 16;
+ const uint8_t* p = pTables + i * 16;
if (GET_TT_LONG(p) == tag) {
FX_DWORD offset = GET_TT_LONG(p + 8);
FX_DWORD size = GET_TT_LONG(p + 12);
@@ -557,10 +557,10 @@ CFX_ByteString _FPDF_LoadTableFromTT(FXSYS_FILE* pFile, FX_LPCBYTE pTables, FX_D
}
return CFX_ByteString();
}
-CFX_ByteString _FPDF_LoadTableFromTTStreamFile(IFX_FileStream* pFile, FX_LPCBYTE pTables, FX_DWORD nTables, FX_DWORD tag)
+CFX_ByteString _FPDF_LoadTableFromTTStreamFile(IFX_FileStream* pFile, const uint8_t* pTables, FX_DWORD nTables, FX_DWORD tag)
{
for (FX_DWORD i = 0; i < nTables; i ++) {
- FX_LPCBYTE p = pTables + i * 16;
+ const uint8_t* p = pTables + i * 16;
if (GET_TT_LONG(p) == tag) {
FX_DWORD offset = GET_TT_LONG(p + 8);
FX_DWORD size = GET_TT_LONG(p + 12);
@@ -582,7 +582,7 @@ CFX_ByteString CFX_FontMapper::GetPSNameFromTT(void* hFont)
CFX_ByteString result;
FX_DWORD size = m_pFontInfo->GetFontData(hFont, 0x6e616d65, NULL, 0);
if (size) {
- FX_LPBYTE buffer = FX_Alloc(uint8_t, size);
+ uint8_t* buffer = FX_Alloc(uint8_t, size);
m_pFontInfo->GetFontData(hFont, 0x6e616d65, buffer, size);
result = _FPDF_GetNameFromTT(buffer, 6);
FX_Free(buffer);
@@ -601,7 +601,7 @@ void CFX_FontMapper::AddInstalledFont(const CFX_ByteString& name, int charset)
if (name == m_LastFamily) {
return;
}
- FX_LPCBYTE ptr = name;
+ const uint8_t* ptr = name;
FX_BOOL bLocalized = FALSE;
for (int i = 0; i < name.GetLength(); i ++)
if (ptr[i] > 0x80) {
@@ -761,7 +761,7 @@ FXFT_Face CFX_FontMapper::UseInternalSubst(CFX_SubstFont* pSubstFont, int iBaseF
if (m_FoxitFaces[iBaseFont]) {
return m_FoxitFaces[iBaseFont];
}
- FX_LPCBYTE pFontData = NULL;
+ const uint8_t* pFontData = NULL;
FX_DWORD size = 0;
if (m_pFontMgr->GetStandardFont(pFontData, size, iBaseFont)) {
m_FoxitFaces[iBaseFont] = m_pFontMgr->GetFixedFace(pFontData, size, 0);
@@ -779,7 +779,7 @@ FXFT_Face CFX_FontMapper::UseInternalSubst(CFX_SubstFont* pSubstFont, int iBaseF
if (m_MMFaces[1]) {
return m_MMFaces[1];
}
- FX_LPCBYTE pFontData = NULL;
+ const uint8_t* pFontData = NULL;
FX_DWORD size;
m_pFontMgr->GetStandardFont(pFontData, size, 14);
m_MMFaces[1] = m_pFontMgr->GetFixedFace(pFontData, size, 0);
@@ -789,15 +789,15 @@ FXFT_Face CFX_FontMapper::UseInternalSubst(CFX_SubstFont* pSubstFont, int iBaseF
if (m_MMFaces[0]) {
return m_MMFaces[0];
}
- FX_LPCBYTE pFontData = NULL;
+ const uint8_t* pFontData = NULL;
FX_DWORD size = 0;
m_pFontMgr->GetStandardFont(pFontData, size, 15);
m_MMFaces[0] = m_pFontMgr->GetFixedFace(pFontData, size, 0);
return m_MMFaces[0];
}
const struct _AltFontFamily {
- FX_LPCSTR m_pFontName;
- FX_LPCSTR m_pFontFamily;
+ const FX_CHAR* m_pFontName;
+ const FX_CHAR* m_pFontFamily;
}
g_AltFontFamilies[] = {
{"AGaramondPro", "Adobe Garamond Pro"},
@@ -807,11 +807,11 @@ g_AltFontFamilies[] = {
extern "C" {
static int compareFontFamilyString(const void* key, const void* element)
{
- CFX_ByteString str_key((FX_LPCSTR)key);
+ CFX_ByteString str_key((const FX_CHAR*)key);
if (str_key.Find(((_AltFontFamily*)element)->m_pFontName) != -1) {
return 0;
}
- return FXSYS_stricmp((FX_LPCSTR)key, ((_AltFontFamily*)element)->m_pFontName);
+ return FXSYS_stricmp((const FX_CHAR*)key, ((_AltFontFamily*)element)->m_pFontName);
}
}
#define FX_FONT_STYLE_None 0x00
@@ -840,7 +840,7 @@ static CFX_ByteString _GetFontFamily(CFX_ByteString fontName, int nStyle)
return found->m_pFontFamily;
};
typedef struct _FX_FontStyle {
- FX_LPCSTR style;
+ const FX_CHAR* style;
int32_t len;
} FX_FontStyle;
const FX_FontStyle g_FontStyles[] = {
@@ -850,7 +850,7 @@ const FX_FontStyle g_FontStyles[] = {
{ "Reg", 3 },
{ "Regular", 7 },
};
-CFX_ByteString ParseStyle(FX_LPCSTR pStyle, int iLen, int iIndex)
+CFX_ByteString ParseStyle(const FX_CHAR* pStyle, int iLen, int iIndex)
{
CFX_ByteTextBuf buf;
if (!iLen || iLen <= iIndex) {
@@ -920,7 +920,7 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name, FX_BOOL bTru
if (m_FoxitFaces[12]) {
return m_FoxitFaces[12];
}
- FX_LPCBYTE pFontData = NULL;
+ const uint8_t* pFontData = NULL;
FX_DWORD size = 0;
m_pFontMgr->GetStandardFont(pFontData, size, 12);
m_FoxitFaces[12] = m_pFontMgr->GetFixedFace(pFontData, size, 0);
@@ -933,7 +933,7 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name, FX_BOOL bTru
if (m_FoxitFaces[13]) {
return m_FoxitFaces[13];
}
- FX_LPCBYTE pFontData = NULL;
+ const uint8_t* pFontData = NULL;
FX_DWORD size = 0;
m_pFontMgr->GetStandardFont(pFontData, size, 13);
m_FoxitFaces[13] = m_pFontMgr->GetFixedFace(pFontData, size, 0);
@@ -1011,7 +1011,7 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name, FX_BOOL bTru
}
if (!style.IsEmpty()) {
int nLen = style.GetLength();
- FX_LPCSTR pStyle = style;
+ const FX_CHAR* pStyle = style;
int i = 0;
FX_BOOL bFirstItem = TRUE;
CFX_ByteString buf;
@@ -1176,7 +1176,7 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name, FX_BOOL bTru
if (m_FoxitFaces[12]) {
return m_FoxitFaces[12];
}
- FX_LPCBYTE pFontData = NULL;
+ const uint8_t* pFontData = NULL;
FX_DWORD size = 0;
m_pFontMgr->GetStandardFont(pFontData, size, 12);
m_FoxitFaces[12] = m_pFontMgr->GetFixedFace(pFontData, size, 0);
@@ -1224,7 +1224,7 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name, FX_BOOL bTru
for (int i = 0; i < 256; i ++) {
checksum += ((FX_DWORD*)temp)[i];
}
- FX_LPBYTE pFontData;
+ uint8_t* pFontData;
face = m_pFontMgr->GetCachedTTCFace(ttc_size, checksum, ttc_size - font_size, pFontData);
if (face == NULL) {
pFontData = FX_Alloc(uint8_t, ttc_size);
@@ -1233,7 +1233,7 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name, FX_BOOL bTru
ttc_size - font_size);
}
} else {
- FX_LPBYTE pFontData;
+ uint8_t* pFontData;
face = m_pFontMgr->GetCachedFace(SubstName, weight, bItalic, pFontData);
if (face == NULL) {
pFontData = FX_Alloc(uint8_t, font_size);
@@ -1309,7 +1309,7 @@ FXFT_Face CFX_FontMapper::FindSubstFontByUnicode(FX_DWORD dwUnicode, FX_DWORD fl
for (int i = 0; i < 256; i ++) {
checksum += ((FX_DWORD*)temp)[i];
}
- FX_LPBYTE pFontData;
+ uint8_t* pFontData;
face = m_pFontMgr->GetCachedTTCFace(ttc_size, checksum, ttc_size - font_size, pFontData);
if (face == NULL) {
pFontData = FX_Alloc(uint8_t, ttc_size);
@@ -1322,7 +1322,7 @@ FXFT_Face CFX_FontMapper::FindSubstFontByUnicode(FX_DWORD dwUnicode, FX_DWORD fl
} else {
CFX_ByteString SubstName;
m_pFontInfo->GetFaceName(hFont, SubstName);
- FX_LPBYTE pFontData;
+ uint8_t* pFontData;
face = m_pFontMgr->GetCachedFace(SubstName, weight, bItalic, pFontData);
if (face == NULL) {
pFontData = FX_Alloc(uint8_t, font_size);
@@ -1390,7 +1390,7 @@ CFX_FolderFontInfo::~CFX_FolderFontInfo()
FX_POSITION pos = m_FontList.GetStartPosition();
while (pos) {
CFX_ByteString key;
- FX_LPVOID value;
+ void* value;
m_FontList.GetNextAssoc(pos, key, value);
delete (CFontFaceInfo*)value;
}
@@ -1469,7 +1469,7 @@ void CFX_FolderFontInfo::ScanFile(CFX_ByteString& path)
return;
}
FX_DWORD face_bytes = nFaces * 4;
- FX_LPBYTE offsets = FX_Alloc(uint8_t, face_bytes);
+ uint8_t* offsets = FX_Alloc(uint8_t, face_bytes);
readCnt = FXSYS_fread(offsets, face_bytes, 1, pFile);
if (readCnt != face_bytes) {
FX_Free(offsets);
@@ -1477,7 +1477,7 @@ void CFX_FolderFontInfo::ScanFile(CFX_ByteString& path)
return;
}
for (FX_DWORD i = 0; i < nFaces; i ++) {
- FX_LPBYTE p = offsets + i * 4;
+ uint8_t* p = offsets + i * 4;
ReportFace(path, pFile, filesize, GET_TT_LONG(p));
}
FX_Free(offsets);
@@ -1504,7 +1504,7 @@ void CFX_FolderFontInfo::ReportFace(CFX_ByteString& path, FXSYS_FILE* pFile, FX_
if (style != "Regular") {
facename += " " + style;
}
- FX_LPVOID p;
+ void* p;
if (m_FontList.Lookup(facename, p)) {
return;
}
@@ -1520,7 +1520,7 @@ void CFX_FolderFontInfo::ReportFace(CFX_ByteString& path, FXSYS_FILE* pFile, FX_
pInfo->m_Charsets = 0;
CFX_ByteString os2 = _FPDF_LoadTableFromTT(pFile, tables, nTables, 0x4f532f32);
if (os2.GetLength() >= 86) {
- FX_LPCBYTE p = (FX_LPCBYTE)os2 + 78;
+ const uint8_t* p = (const uint8_t*)os2 + 78;
FX_DWORD codepages = GET_TT_LONG(p);
if (codepages & (1 << 17)) {
m_pMapper->AddInstalledFont(facename, FXFONT_SHIFTJIS_CHARSET);
@@ -1557,23 +1557,23 @@ void CFX_FolderFontInfo::ReportFace(CFX_ByteString& path, FXSYS_FILE* pFile, FX_
}
m_FontList.SetAt(facename, pInfo);
}
-void* CFX_FolderFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR family, FX_BOOL& bExact)
+void* CFX_FolderFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* family, FX_BOOL& bExact)
{
return NULL;
}
void* CFX_FolderFontInfo::MapFontByUnicode(FX_DWORD dwUnicode, int weight, FX_BOOL bItalic, int pitch_family)
-{
- return NULL;
-}
-void* CFX_FolderFontInfo::GetFont(FX_LPCSTR face)
{
- FX_LPVOID p;
+ return NULL;
+}
+void* CFX_FolderFontInfo::GetFont(const FX_CHAR* face)
+{
+ void* p;
if (!m_FontList.Lookup(face, p)) {
return NULL;
}
return p;
}
-FX_DWORD CFX_FolderFontInfo::GetFontData(void* hFont, FX_DWORD table, FX_LPBYTE buffer, FX_DWORD size)
+FX_DWORD CFX_FolderFontInfo::GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer, FX_DWORD size)
{
if (hFont == NULL) {
return 0;
@@ -1597,7 +1597,7 @@ FX_DWORD CFX_FolderFontInfo::GetFontData(void* hFont, FX_DWORD table, FX_LPBYTE
} else {
FX_DWORD nTables = pFont->m_FontTables.GetLength() / 16;
for (FX_DWORD i = 0; i < nTables; i ++) {
- FX_LPCBYTE p = (FX_LPCBYTE)pFont->m_FontTables + i * 16;
+ const uint8_t* p = (const uint8_t*)pFont->m_FontTables + i * 16;
if (GET_TT_LONG(p) == table) {
offset = GET_TT_LONG(p + 8);
datasize = GET_TT_LONG(p + 12);
diff --git a/core/src/fxge/ge/fx_ge_linux.cpp b/core/src/fxge/ge/fx_ge_linux.cpp
index 5a0f0dffa5..5eac00f8dd 100644
--- a/core/src/fxge/ge/fx_ge_linux.cpp
+++ b/core/src/fxge/ge/fx_ge_linux.cpp
@@ -9,8 +9,8 @@
#include "text_int.h"
#if _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_
static const struct {
- FX_LPCSTR m_pName;
- FX_LPCSTR m_pSubstName;
+ const FX_CHAR* m_pName;
+ const FX_CHAR* m_pSubstName;
}
Base14Substs[] = {
{"Courier", "Courier New"},
@@ -29,13 +29,13 @@ Base14Substs[] = {
class CFX_LinuxFontInfo : public CFX_FolderFontInfo
{
public:
- virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR family, FX_BOOL& bExact);
+ virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* family, FX_BOOL& bExact);
FX_BOOL ParseFontCfg();
- void* FindFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR family, FX_BOOL bMatchName);
+ void* FindFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* family, FX_BOOL bMatchName);
};
#define LINUX_GPNAMESIZE 6
static const struct {
- FX_LPCSTR NameArr[LINUX_GPNAMESIZE];
+ const FX_CHAR* NameArr[LINUX_GPNAMESIZE];
}
LinuxGpFontList[] = {
{{"TakaoPGothic", "VL PGothic", "IPAPGothic", "VL Gothic", "Kochi Gothic", "VL Gothic regular"}},
@@ -43,20 +43,20 @@ LinuxGpFontList[] = {
{{"TakaoPMincho", "IPAPMincho", "VL Gothic", "Kochi Mincho", NULL, "VL Gothic regular"}},
{{"TakaoMincho", "IPAMincho", "VL Gothic", "Kochi Mincho", NULL, "VL Gothic regular"}},
};
-static const FX_LPCSTR g_LinuxGbFontList[] = {
+static const FX_CHAR* const g_LinuxGbFontList[] = {
"AR PL UMing CN Light",
"WenQuanYi Micro Hei",
"AR PL UKai CN",
};
-static const FX_LPCSTR g_LinuxB5FontList[] = {
+static const FX_CHAR* const g_LinuxB5FontList[] = {
"AR PL UMing TW Light",
"WenQuanYi Micro Hei",
"AR PL UKai TW",
};
-static const FX_LPCSTR g_LinuxHGFontList[] = {
+static const FX_CHAR* const g_LinuxHGFontList[] = {
"UnDotum",
};
-static int32_t GetJapanesePreference(FX_LPCSTR facearr, int weight, int picth_family)
+static int32_t GetJapanesePreference(const FX_CHAR* facearr, int weight, int picth_family)
{
CFX_ByteString face = facearr;
if (face.Find("Gothic") >= 0 || face.Find("\x83\x53\x83\x56\x83\x62\x83\x4e") >= 0) {
@@ -77,7 +77,7 @@ static int32_t GetJapanesePreference(FX_LPCSTR facearr, int weight, int picth_fa
}
return 2;
}
-void* CFX_LinuxFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR cstr_face, FX_BOOL& bExact)
+void* CFX_LinuxFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* cstr_face, FX_BOOL& bExact)
{
CFX_ByteString face = cstr_face;
int iBaseFont;
@@ -90,7 +90,7 @@ void* CFX_LinuxFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int p
if (iBaseFont < 12) {
return GetFont(face);
}
- FX_LPVOID p = NULL;
+ void* p = NULL;
FX_BOOL bCJK = TRUE;
switch (charset) {
case FXFONT_SHIFTJIS_CHARSET: {
@@ -105,7 +105,7 @@ void* CFX_LinuxFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int p
}
break;
case FXFONT_GB2312_CHARSET: {
- static int32_t s_gbCount = sizeof(g_LinuxGbFontList) / sizeof(FX_LPCSTR);
+ static int32_t s_gbCount = sizeof(g_LinuxGbFontList) / sizeof(const FX_CHAR*);
for (int32_t i = 0; i < s_gbCount; i++)
if (m_FontList.Lookup(g_LinuxGbFontList[i], p)) {
return p;
@@ -113,7 +113,7 @@ void* CFX_LinuxFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int p
}
break;
case FXFONT_CHINESEBIG5_CHARSET: {
- static int32_t s_b5Count = sizeof(g_LinuxB5FontList) / sizeof(FX_LPCSTR);
+ static int32_t s_b5Count = sizeof(g_LinuxB5FontList) / sizeof(const FX_CHAR*);
for (int32_t i = 0; i < s_b5Count; i++)
if (m_FontList.Lookup(g_LinuxB5FontList[i], p)) {
return p;
@@ -121,7 +121,7 @@ void* CFX_LinuxFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int p
}
break;
case FXFONT_HANGEUL_CHARSET: {
- static int32_t s_hgCount = sizeof(g_LinuxHGFontList) / sizeof(FX_LPCSTR);
+ static int32_t s_hgCount = sizeof(g_LinuxHGFontList) / sizeof(const FX_CHAR*);
for (int32_t i = 0; i < s_hgCount; i++)
if (m_FontList.Lookup(g_LinuxHGFontList[i], p)) {
return p;
@@ -177,7 +177,7 @@ static int32_t _LinuxGetSimilarValue(int weight, FX_BOOL bItalic, int pitch_fami
}
return iSimilarValue;
}
-void* CFX_LinuxFontInfo::FindFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR family, FX_BOOL bMatchName)
+void* CFX_LinuxFontInfo::FindFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* family, FX_BOOL bMatchName)
{
CFontFaceInfo* pFind = NULL;
FX_DWORD charset_flag = _LinuxGetCharset(charset);
@@ -186,7 +186,7 @@ void* CFX_LinuxFontInfo::FindFont(int weight, FX_BOOL bItalic, int charset, int
while (pos) {
CFX_ByteString bsName;
CFontFaceInfo* pFont = NULL;
- m_FontList.GetNextAssoc(pos, bsName, (FX_LPVOID&)pFont);
+ m_FontList.GetNextAssoc(pos, bsName, (void*&)pFont);
if (!(pFont->m_Charsets & charset_flag) && charset != FXFONT_DEFAULT_CHARSET) {
continue;
}
diff --git a/core/src/fxge/ge/fx_ge_path.cpp b/core/src/fxge/ge/fx_ge_path.cpp
index 51d5908a81..4ae7b42b39 100644
--- a/core/src/fxge/ge/fx_ge_path.cpp
+++ b/core/src/fxge/ge/fx_ge_path.cpp
@@ -65,8 +65,8 @@ void CFX_ClipRgn::IntersectMaskRect(FX_RECT rect, FX_RECT mask_rect, CFX_DIBitma
}
new_dib->Create(m_Box.Width(), m_Box.Height(), FXDIB_8bppMask);
for (int row = m_Box.top; row < m_Box.bottom; row ++) {
- FX_LPBYTE dest_scan = new_dib->GetBuffer() + new_dib->GetPitch() * (row - m_Box.top);
- FX_LPBYTE src_scan = mask_dib->GetBuffer() + mask_dib->GetPitch() * (row - mask_rect.top);
+ uint8_t* dest_scan = new_dib->GetBuffer() + new_dib->GetPitch() * (row - m_Box.top);
+ uint8_t* src_scan = mask_dib->GetBuffer() + mask_dib->GetPitch() * (row - mask_rect.top);
for (int col = m_Box.left; col < m_Box.right; col ++) {
dest_scan[col - m_Box.left] = src_scan[col - mask_rect.left];
}
@@ -98,9 +98,9 @@ void CFX_ClipRgn::IntersectMaskF(int left, int top, CFX_DIBitmapRef Mask)
new_dib->Create(new_box.Width(), new_box.Height(), FXDIB_8bppMask);
const CFX_DIBitmap* old_dib = m_Mask;
for (int row = new_box.top; row < new_box.bottom; row ++) {
- FX_LPBYTE old_scan = old_dib->GetBuffer() + (row - m_Box.top) * old_dib->GetPitch();
- FX_LPBYTE mask_scan = mask_dib->GetBuffer() + (row - top) * mask_dib->GetPitch();
- FX_LPBYTE new_scan = new_dib->GetBuffer() + (row - new_box.top) * new_dib->GetPitch();
+ uint8_t* old_scan = old_dib->GetBuffer() + (row - m_Box.top) * old_dib->GetPitch();
+ uint8_t* mask_scan = mask_dib->GetBuffer() + (row - top) * mask_dib->GetPitch();
+ uint8_t* new_scan = new_dib->GetBuffer() + (row - new_box.top) * new_dib->GetPitch();
for (int col = new_box.left; col < new_box.right; col ++) {
new_scan[col - new_box.left] = old_scan[col - m_Box.left] * mask_scan[col - left] / 255;
}
diff --git a/core/src/fxge/ge/fx_ge_ps.cpp b/core/src/fxge/ge/fx_ge_ps.cpp
index 4ff40211d0..0e25d7e2e8 100644
--- a/core/src/fxge/ge/fx_ge_ps.cpp
+++ b/core/src/fxge/ge/fx_ge_ps.cpp
@@ -131,7 +131,7 @@ void CFX_PSRenderer::OutputPath(const CFX_PathData* pPathData, const CFX_AffineM
}
}
}
- m_pOutput->OutputPS((FX_LPCSTR)buf.GetBuffer(), buf.GetSize());
+ m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize());
}
void CFX_PSRenderer::SetClip_PathFill(const CFX_PathData* pPathData,
const CFX_AffineMatrix* pObject2Device,
@@ -163,7 +163,7 @@ void CFX_PSRenderer::SetClip_PathStroke(const CFX_PathData* pPathData,
buf << FX_BSTRC("mx Cm [") << pObject2Device->a << FX_BSTRC(" ") << pObject2Device->b << FX_BSTRC(" ") <<
pObject2Device->c << FX_BSTRC(" ") << pObject2Device->d << FX_BSTRC(" ") << pObject2Device->e <<
FX_BSTRC(" ") << pObject2Device->f << FX_BSTRC("]cm ");
- m_pOutput->OutputPS((FX_LPCSTR)buf.GetBuffer(), buf.GetSize());
+ m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize());
}
OutputPath(pPathData, NULL);
CFX_FloatRect rect = pPathData->GetBoundingBox(pGraphState->m_LineWidth, pGraphState->m_MiterLimit);
@@ -204,7 +204,7 @@ FX_BOOL CFX_PSRenderer::DrawPath(const CFX_PathData* pPathData,
buf << FX_BSTRC("mx Cm [") << pObject2Device->a << FX_BSTRC(" ") << pObject2Device->b << FX_BSTRC(" ") <<
pObject2Device->c << FX_BSTRC(" ") << pObject2Device->d << FX_BSTRC(" ") << pObject2Device->e <<
FX_BSTRC(" ") << pObject2Device->f << FX_BSTRC("]cm ");
- m_pOutput->OutputPS((FX_LPCSTR)buf.GetBuffer(), buf.GetSize());
+ m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize());
}
}
OutputPath(pPathData, stroke_alpha ? NULL : pObject2Device);
@@ -261,10 +261,10 @@ void CFX_PSRenderer::SetGraphState(const CFX_GraphStateData* pGraphState)
m_CurGraphState.Copy(*pGraphState);
m_bGraphStateSet = TRUE;
if (buf.GetSize()) {
- m_pOutput->OutputPS((FX_LPCSTR)buf.GetBuffer(), buf.GetSize());
+ m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize());
}
}
-static void FaxCompressData(FX_LPBYTE src_buf, int width, int height, FX_LPBYTE& dest_buf, FX_DWORD& dest_size)
+static void FaxCompressData(uint8_t* src_buf, int width, int height, uint8_t*& dest_buf, FX_DWORD& dest_size)
{
CCodec_ModuleMgr* pEncoders = CFX_GEModule::Get()->GetCodecModule();
if (width * height > 128 && pEncoders && pEncoders->GetFaxModule()->Encode(src_buf, width, height, (width + 7) / 8, dest_buf, dest_size)) {
@@ -274,8 +274,8 @@ static void FaxCompressData(FX_LPBYTE src_buf, int width, int height, FX_LPBYTE&
dest_size = (width + 7) / 8 * height;
}
}
-static void PSCompressData(int PSLevel, FX_LPBYTE src_buf, FX_DWORD src_size,
- FX_LPBYTE& output_buf, FX_DWORD& output_size, FX_LPCSTR& filter)
+static void PSCompressData(int PSLevel, uint8_t* src_buf, FX_DWORD src_size,
+ uint8_t*& output_buf, FX_DWORD& output_size, const FX_CHAR*& filter)
{
output_buf = src_buf;
output_size = src_size;
@@ -284,7 +284,7 @@ static void PSCompressData(int PSLevel, FX_LPBYTE src_buf, FX_DWORD src_size,
return;
}
CCodec_ModuleMgr* pEncoders = CFX_GEModule::Get()->GetCodecModule();
- FX_LPBYTE dest_buf = NULL;
+ uint8_t* dest_buf = NULL;
FX_DWORD dest_size = src_size;
if (PSLevel >= 3) {
if (pEncoders && pEncoders->GetFlateModule()->Encode(src_buf, src_size, dest_buf, dest_size)) {
@@ -348,12 +348,12 @@ FX_BOOL CFX_PSRenderer::DrawDIBits(const CFX_DIBSource* pSource, FX_DWORD color,
if (pSource->GetBPP() == 1 && pSource->GetPalette() == NULL) {
int pitch = (width + 7) / 8;
FX_DWORD src_size = height * pitch;
- FX_LPBYTE src_buf = FX_Alloc(uint8_t, src_size);
+ uint8_t* src_buf = FX_Alloc(uint8_t, src_size);
for (int row = 0; row < height; row ++) {
- FX_LPCBYTE src_scan = pSource->GetScanline(row);
+ const uint8_t* src_scan = pSource->GetScanline(row);
FXSYS_memcpy32(src_buf + row * pitch, src_scan, pitch);
}
- FX_LPBYTE output_buf;
+ uint8_t* output_buf;
FX_DWORD output_size;
FaxCompressData(src_buf, width, height, output_buf, output_size);
if (pSource->IsAlphaMask()) {
@@ -373,7 +373,7 @@ FX_BOOL CFX_PSRenderer::DrawDIBits(const CFX_DIBSource* pSource, FX_DWORD color,
} else {
buf << FX_BSTRC("false 1 colorimage\n");
}
- m_pOutput->OutputPS((FX_LPCSTR)buf.GetBuffer(), buf.GetSize());
+ m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize());
WritePSBinary(output_buf, output_size);
FX_Free(output_buf);
} else {
@@ -409,9 +409,9 @@ FX_BOOL CFX_PSRenderer::DrawDIBits(const CFX_DIBSource* pSource, FX_DWORD color,
return FALSE;
}
int Bpp = pConverted->GetBPP() / 8;
- FX_LPBYTE output_buf = NULL;
+ uint8_t* output_buf = NULL;
FX_STRSIZE output_size = 0;
- FX_LPCSTR filter = NULL;
+ const FX_CHAR* filter = NULL;
if (flags & FXRENDER_IMAGE_LOSSY) {
CCodec_ModuleMgr* pEncoders = CFX_GEModule::Get()->GetCodecModule();
if (pEncoders && pEncoders->GetJpegModule()->Encode(pConverted, output_buf, output_size)) {
@@ -423,8 +423,8 @@ FX_BOOL CFX_PSRenderer::DrawDIBits(const CFX_DIBSource* pSource, FX_DWORD color,
output_size = height * src_pitch;
output_buf = FX_Alloc(uint8_t, output_size);
for (int row = 0; row < height; row ++) {
- FX_LPCBYTE src_scan = pConverted->GetScanline(row);
- FX_LPBYTE dest_scan = output_buf + row * src_pitch;
+ const uint8_t* src_scan = pConverted->GetScanline(row);
+ uint8_t* dest_scan = output_buf + row * src_pitch;
if (Bpp == 3) {
for (int col = 0; col < width; col ++) {
*dest_scan++ = src_scan[2];
@@ -436,7 +436,7 @@ FX_BOOL CFX_PSRenderer::DrawDIBits(const CFX_DIBSource* pSource, FX_DWORD color,
FXSYS_memcpy32(dest_scan, src_scan, src_pitch);
}
}
- FX_LPBYTE compressed_buf;
+ uint8_t* compressed_buf;
FX_DWORD compressed_size;
PSCompressData(m_PSLevel, output_buf, output_size, compressed_buf, compressed_size, filter);
if (output_buf != compressed_buf) {
@@ -457,7 +457,7 @@ FX_BOOL CFX_PSRenderer::DrawDIBits(const CFX_DIBSource* pSource, FX_DWORD color,
}
buf << FX_BSTRC("false ") << Bpp;
buf << FX_BSTRC(" colorimage\n");
- m_pOutput->OutputPS((FX_LPCSTR)buf.GetBuffer(), buf.GetSize());
+ m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize());
WritePSBinary(output_buf, output_size);
FX_Free(output_buf);
}
@@ -473,7 +473,7 @@ void CFX_PSRenderer::SetColor(FX_DWORD color, int alpha_flag, void* pIccTransfor
if (pIccTransform) {
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
color = FXGETFLAG_COLORTYPE(alpha_flag) ? FXCMYK_TODIB(color) : FXARGB_TODIB(color);
- FX_LPBYTE pColor = (FX_LPBYTE)&color;
+ uint8_t* pColor = (uint8_t*)&color;
pIccModule->TranslateScanline(pIccTransform, pColor, pColor, 1);
color = m_bCmykOutput ? FXCMYK_TODIB(color) : FXARGB_TODIB(color);
bCMYK = m_bCmykOutput;
@@ -493,7 +493,7 @@ void CFX_PSRenderer::SetColor(FX_DWORD color, int alpha_flag, void* pIccTransfor
m_bColorSet = TRUE;
m_LastColor = color;
}
- m_pOutput->OutputPS((FX_LPCSTR)buf.GetBuffer(), buf.GetSize());
+ m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize());
}
}
void CFX_PSRenderer::FindPSFontGlyph(CFX_FaceCache* pFaceCache, CFX_Font* pFont, const FXTEXT_CHARPOS& charpos,
@@ -530,7 +530,7 @@ void CFX_PSRenderer::FindPSFontGlyph(CFX_FaceCache* pFaceCache, CFX_Font* pFont,
"/BuildChar{1 index/Encoding get exch get 1 index/BuildGlyph get exec}bind def\n"
"currentdict end\n");
buf << FX_BSTRC("/X") << m_PSFontList.GetSize() - 1 << FX_BSTRC(" exch definefont pop\n");
- m_pOutput->OutputPS((FX_LPCSTR)buf.GetBuffer(), buf.GetSize());
+ m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize());
buf.Clear();
}
ps_fontnum = m_PSFontList.GetSize() - 1;
@@ -589,7 +589,7 @@ void CFX_PSRenderer::FindPSFontGlyph(CFX_FaceCache* pFaceCache, CFX_Font* pFont,
buf << FX_BSTRC("}bind def end\n");
buf << FX_BSTRC("/X") << ps_fontnum << FX_BSTRC(" Ff/Encoding get ") << ps_glyphindex
<< FX_BSTRC("/") << ps_glyphindex << FX_BSTRC(" put\n");
- m_pOutput->OutputPS((FX_LPCSTR)buf.GetBuffer(), buf.GetSize());
+ m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize());
}
FX_BOOL CFX_PSRenderer::DrawText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont,
CFX_FontCache* pCache, const CFX_AffineMatrix* pObject2Device,
@@ -630,18 +630,18 @@ FX_BOOL CFX_PSRenderer::DrawText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX
buf << hex << FX_BSTRC("Tj\n");
}
buf << FX_BSTRC("Q\n");
- m_pOutput->OutputPS((FX_LPCSTR)buf.GetBuffer(), buf.GetSize());
+ m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize());
return TRUE;
}
-void CFX_PSRenderer::WritePSBinary(FX_LPCBYTE data, int len)
+void CFX_PSRenderer::WritePSBinary(const uint8_t* data, int len)
{
- FX_LPBYTE dest_buf;
+ uint8_t* dest_buf;
FX_DWORD dest_size;
CCodec_ModuleMgr* pEncoders = CFX_GEModule::Get()->GetCodecModule();
if (pEncoders && pEncoders->GetBasicModule()->A85Encode(data, len, dest_buf, dest_size)) {
- m_pOutput->OutputPS((FX_LPCSTR)dest_buf, dest_size);
+ m_pOutput->OutputPS((const FX_CHAR*)dest_buf, dest_size);
FX_Free(dest_buf);
} else {
- m_pOutput->OutputPS((FX_LPCSTR)data, len);
+ m_pOutput->OutputPS((const FX_CHAR*)data, len);
}
}
diff --git a/core/src/fxge/ge/fx_ge_text.cpp b/core/src/fxge/ge/fx_ge_text.cpp
index 1aabbedd5b..151b7099a5 100644
--- a/core/src/fxge/ge/fx_ge_text.cpp
+++ b/core/src/fxge/ge/fx_ge_text.cpp
@@ -111,7 +111,7 @@ void _Color2Argb(FX_ARGB& argb, FX_DWORD color, int alpha_flag, void* pIccTransf
if (pIccTransform) {
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
color = FXGETFLAG_COLORTYPE(alpha_flag) ? FXCMYK_TODIB(color) : FXARGB_TODIB(color);
- pIccModule->TranslateScanline(pIccTransform, bgra, (FX_LPCBYTE)&color, 1);
+ pIccModule->TranslateScanline(pIccTransform, bgra, (const uint8_t*)&color, 1);
bgra[3] = FXGETFLAG_COLORTYPE(alpha_flag) ?
(alpha_flag >> 24) ? FXGETFLAG_ALPHA_FILL(alpha_flag) : FXGETFLAG_ALPHA_STROKE(alpha_flag) :
FXARGB_A(color);
@@ -294,7 +294,7 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars, const FXTEXT_CHARPOS* pChar
}
}
int dest_width = pixel_width;
- FX_LPBYTE dest_buf = bitmap.GetBuffer();
+ uint8_t* dest_buf = bitmap.GetBuffer();
int dest_pitch = bitmap.GetPitch();
int Bpp = bitmap.GetBPP() / 8;
int a, r, g, b;
@@ -326,7 +326,7 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars, const FXTEXT_CHARPOS* pChar
FX_BOOL bBGRStripe = text_flags & FXTEXT_BGR_STRIPE;
ncols /= 3;
int x_subpixel = (int)(glyph.m_fOriginX * 3) % 3;
- FX_LPBYTE src_buf = pGlyph->GetBuffer();
+ uint8_t* src_buf = pGlyph->GetBuffer();
int src_pitch = pGlyph->GetPitch();
int start_col = left;
if (start_col < 0) {
@@ -345,8 +345,8 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars, const FXTEXT_CHARPOS* pChar
if (dest_row < 0 || dest_row >= bitmap.GetHeight()) {
continue;
}
- FX_LPBYTE src_scan = src_buf + row * src_pitch + (start_col - left) * 3;
- FX_LPBYTE dest_scan = dest_buf + dest_row * dest_pitch + (start_col << 2);
+ uint8_t* src_scan = src_buf + row * src_pitch + (start_col - left) * 3;
+ uint8_t* dest_scan = dest_buf + dest_row * dest_pitch + (start_col << 2);
if (bBGRStripe) {
if (x_subpixel == 0) {
for (int col = start_col; col < end_col; col ++) {
@@ -658,8 +658,8 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars, const FXTEXT_CHARPOS* pChar
if (dest_row < 0 || dest_row >= bitmap.GetHeight()) {
continue;
}
- FX_LPBYTE src_scan = src_buf + row * src_pitch + (start_col - left) * 3;
- FX_LPBYTE dest_scan = dest_buf + dest_row * dest_pitch + start_col * Bpp;
+ uint8_t* src_scan = src_buf + row * src_pitch + (start_col - left) * 3;
+ uint8_t* dest_scan = dest_buf + dest_row * dest_pitch + start_col * Bpp;
if (bBGRStripe) {
if (x_subpixel == 0) {
for (int col = start_col; col < end_col; col ++) {
@@ -1052,10 +1052,10 @@ CFX_FaceCache::~CFX_FaceCache()
}
m_SizeMap.RemoveAll();
pos = m_PathMap.GetStartPosition();
- FX_LPVOID key1;
+ void* key1;
CFX_PathData* pPath;
while (pos) {
- m_PathMap.GetNextAssoc(pos, key1, (FX_LPVOID&)pPath);
+ m_PathMap.GetNextAssoc(pos, key1, (void*&)pPath);
delete pPath;
}
if (m_pBitmap) {
@@ -1081,14 +1081,14 @@ CFX_GlyphBitmap* CFX_FaceCache::LookUpGlyphBitmap(CFX_Font* pFont, const CFX_Aff
m_SizeMap.SetAt(FaceGlyphsKey, pSizeCache);
}
CFX_GlyphBitmap* pGlyphBitmap = NULL;
- if (pSizeCache->m_GlyphMap.Lookup((FX_LPVOID)(uintptr_t)glyph_index, (void*&)pGlyphBitmap)) {
+ if (pSizeCache->m_GlyphMap.Lookup((void*)(uintptr_t)glyph_index, (void*&)pGlyphBitmap)) {
return pGlyphBitmap;
}
pGlyphBitmap = RenderGlyph(pFont, glyph_index, bFontStyle, pMatrix, dest_width, anti_alias);
if (pGlyphBitmap == NULL) {
return NULL;
}
- pSizeCache->m_GlyphMap.SetAt((FX_LPVOID)(uintptr_t)glyph_index, pGlyphBitmap);
+ pSizeCache->m_GlyphMap.SetAt((void*)(uintptr_t)glyph_index, pGlyphBitmap);
return pGlyphBitmap;
}
const CFX_GlyphBitmap* CFX_FaceCache::LoadGlyphBitmap(CFX_Font* pFont, FX_DWORD glyph_index, FX_BOOL bFontStyle, const CFX_AffineMatrix* pMatrix,
@@ -1135,12 +1135,12 @@ const CFX_GlyphBitmap* CFX_FaceCache::LoadGlyphBitmap(CFX_Font* pFont, FX_DWORD
CFX_GlyphBitmap* pGlyphBitmap;
CFX_SizeGlyphCache* pSizeCache = NULL;
if (m_SizeMap.Lookup(FaceGlyphsKey, (void*&)pSizeCache)) {
- if (pSizeCache->m_GlyphMap.Lookup((FX_LPVOID)(uintptr_t)glyph_index, (void*&)pGlyphBitmap)) {
+ if (pSizeCache->m_GlyphMap.Lookup((void*)(uintptr_t)glyph_index, (void*&)pGlyphBitmap)) {
return pGlyphBitmap;
}
pGlyphBitmap = RenderGlyph_Nativetext(pFont, glyph_index, pMatrix, dest_width, anti_alias);
if (pGlyphBitmap) {
- pSizeCache->m_GlyphMap.SetAt((FX_LPVOID)(uintptr_t)glyph_index, pGlyphBitmap);
+ pSizeCache->m_GlyphMap.SetAt((void*)(uintptr_t)glyph_index, pGlyphBitmap);
return pGlyphBitmap;
}
} else {
@@ -1151,7 +1151,7 @@ const CFX_GlyphBitmap* CFX_FaceCache::LoadGlyphBitmap(CFX_Font* pFont, FX_DWORD
return NULL;
}
m_SizeMap.SetAt(FaceGlyphsKey, pSizeCache);
- pSizeCache->m_GlyphMap.SetAt((FX_LPVOID)(uintptr_t)glyph_index, pGlyphBitmap);
+ pSizeCache->m_GlyphMap.SetAt((void*)(uintptr_t)glyph_index, pGlyphBitmap);
return pGlyphBitmap;
}
}
@@ -1171,7 +1171,7 @@ const CFX_GlyphBitmap* CFX_FaceCache::LoadGlyphBitmap(CFX_Font* pFont, FX_DWORD
CFX_SizeGlyphCache::~CFX_SizeGlyphCache()
{
FX_POSITION pos = m_GlyphMap.GetStartPosition();
- FX_LPVOID Key;
+ void* Key;
CFX_GlyphBitmap* pGlyphBitmap = NULL;
while(pos) {
m_GlyphMap.GetNextAssoc(pos, Key, (void*&)pGlyphBitmap);
@@ -1245,20 +1245,20 @@ static const uint8_t g_WeightPow_SHIFTJIS[WEIGHTPOW_ARRAY_SIZE] = {
55, 55, 55, 56, 56, 56, 56, 56 , 56, 57, 57, 57 , 57 , 57, 57, 57, 58, 58, 58, 58, 58,
58, 58, 59, 59, 59, 59, 59, 59, 59, 60, 60, 60, 60, 60, 60, 60, 60,
};
-static void _GammaAdjust(FX_LPBYTE pData, int nWid, int nHei, int src_pitch, FX_LPCBYTE gammaTable)
+static void _GammaAdjust(uint8_t* pData, int nWid, int nHei, int src_pitch, const uint8_t* gammaTable)
{
int count = nHei * src_pitch;
for(int i = 0; i < count; i++) {
pData[i] = gammaTable[pData[i]];
}
}
-static void _ContrastAdjust(FX_LPBYTE pDataIn, FX_LPBYTE pDataOut, int nWid, int nHei, int nSrcRowBytes, int nDstRowBytes)
+static void _ContrastAdjust(uint8_t* pDataIn, uint8_t* pDataOut, int nWid, int nHei, int nSrcRowBytes, int nDstRowBytes)
{
int col, row, temp;
int max = 0, min = 255;
FX_FLOAT rate;
for (row = 0; row < nHei; row ++) {
- FX_LPBYTE pRow = pDataIn + row * nSrcRowBytes;
+ uint8_t* pRow = pDataIn + row * nSrcRowBytes;
for (col = 0; col < nWid; col++) {
temp = *pRow ++;
if (temp > max) {
@@ -1279,8 +1279,8 @@ static void _ContrastAdjust(FX_LPBYTE pDataIn, FX_LPBYTE pDataOut, int nWid, int
}
rate = 255.f / temp;
for (row = 0; row < nHei; row ++) {
- FX_LPBYTE pSrcRow = pDataIn + row * nSrcRowBytes;
- FX_LPBYTE pDstRow = pDataOut + row * nDstRowBytes;
+ uint8_t* pSrcRow = pDataIn + row * nSrcRowBytes;
+ uint8_t* pDstRow = pDataOut + row * nDstRowBytes;
for (col = 0; col < nWid; col ++) {
temp = (int)((*(pSrcRow++) - min) * rate + 0.5);
if (temp > 255) {
@@ -1423,15 +1423,15 @@ FX_BOOL _OutputGlyph(void* dib, int x, int y, CFX_Font* pFont,
int bmheight = FXFT_Get_Bitmap_Rows(FXFT_Get_Glyph_Bitmap(face));
int left = FXFT_Get_Glyph_BitmapLeft(face);
int top = FXFT_Get_Glyph_BitmapTop(face);
- FX_LPCBYTE src_buf = (FX_LPCBYTE)FXFT_Get_Bitmap_Buffer(FXFT_Get_Glyph_Bitmap(face));
+ const uint8_t* src_buf = (const uint8_t*)FXFT_Get_Bitmap_Buffer(FXFT_Get_Glyph_Bitmap(face));
int src_pitch = FXFT_Get_Bitmap_Pitch(FXFT_Get_Glyph_Bitmap(face));
CFX_DIBitmap mask;
mask.Create(bmwidth, bmheight, FXDIB_8bppMask);
- FX_LPBYTE dest_buf = mask.GetBuffer();
+ uint8_t* dest_buf = mask.GetBuffer();
int dest_pitch = mask.GetPitch();
for (int row = 0; row < bmheight; row ++) {
- FX_LPCBYTE src_scan = src_buf + row * src_pitch;
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = src_buf + row * src_pitch;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
FXSYS_memcpy32(dest_scan, src_scan, dest_pitch);
}
pDib->CompositeMask(x + left, y - top, bmwidth, bmheight, &mask, argb, 0, 0);
@@ -1499,15 +1499,15 @@ const CFX_PathData* CFX_FaceCache::LoadGlyphPath(CFX_Font* pFont, FX_DWORD glyph
return NULL;
}
CFX_PathData* pGlyphPath = NULL;
- FX_LPVOID key;
+ void* key;
if (pFont->GetSubstFont())
- key = (FX_LPVOID)(uintptr_t)(glyph_index + ((pFont->GetSubstFont()->m_Weight / 16) << 15) +
+ key = (void*)(uintptr_t)(glyph_index + ((pFont->GetSubstFont()->m_Weight / 16) << 15) +
((pFont->GetSubstFont()->m_ItalicAngle / 2) << 21) + ((dest_width / 16) << 25) +
(pFont->IsVertical() << 31));
else {
- key = (FX_LPVOID)(uintptr_t)glyph_index;
+ key = (void*)(uintptr_t)glyph_index;
}
- if (m_PathMap.Lookup(key, (FX_LPVOID&)pGlyphPath)) {
+ if (m_PathMap.Lookup(key, (void*&)pGlyphPath)) {
return pGlyphPath;
}
pGlyphPath = pFont->LoadGlyphPath(glyph_index, dest_width);
diff --git a/core/src/fxge/ge/text_int.h b/core/src/fxge/ge/text_int.h
index 39f6cb8567..bcc2b05042 100644
--- a/core/src/fxge/ge/text_int.h
+++ b/core/src/fxge/ge/text_int.h
@@ -106,7 +106,7 @@ class CFX_FontEncodingEX : public IFX_FontEncodingEx
public:
CFX_FontEncodingEX();
FX_BOOL Init(CFX_Font* pFont, FX_DWORD EncodingID);
- virtual FX_DWORD GlyphIndexFromName(FX_LPCSTR pStrName);
+ virtual FX_DWORD GlyphIndexFromName(const FX_CHAR* pStrName);
virtual CFX_ByteString NameFromGlyphIndex(FX_DWORD dwGlyphIndex);
virtual FX_DWORD CharCodeFromGlyphIndex(FX_DWORD dwGlyphIndex);
virtual FX_DWORD GlyphFromCharCode(FX_DWORD charcode);
diff --git a/core/src/fxge/skia/fx_skia_blitter_new.cpp b/core/src/fxge/skia/fx_skia_blitter_new.cpp
index 3b3bd3349c..362e8bf59f 100644
--- a/core/src/fxge/skia/fx_skia_blitter_new.cpp
+++ b/core/src/fxge/skia/fx_skia_blitter_new.cpp
@@ -73,10 +73,10 @@
blitV(x, y, height, rightAlpha);
}
/*---------------------------------------------------------------------------------------------------*/
- void CFX_SkiaRenderer::CompositeSpan1bpp_0(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpan1bpp_0(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_bRgbByteOrder);
ASSERT(!m_pDevice->IsCmykImage());
@@ -94,7 +94,7 @@
if (FXARGB_TODIB(m_pDevice->GetPalette()[i]) == m_Color)
index = i;
}
- FX_LPBYTE dest_scan1 = dest_scan;
+ uint8_t* dest_scan1 = dest_scan;
int src_alpha = m_Alpha * cover_scan / 255;
for (int col = col_start; col < col_end; col ++) {
if (src_alpha) {
@@ -106,10 +106,10 @@
dest_scan1 = dest_scan+(span_left%8+col-col_start+1)/8;
}
}
- void CFX_SkiaRenderer::CompositeSpan1bpp_4(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpan1bpp_4(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_bRgbByteOrder);
ASSERT(!m_pDevice->IsCmykImage());
@@ -128,7 +128,7 @@
if (FXARGB_TODIB(m_pDevice->GetPalette()[i]) == m_Color)
index = i;
}
- FX_LPBYTE dest_scan1 = dest_scan;
+ uint8_t* dest_scan1 = dest_scan;
int src_alpha = m_Alpha * cover_scan / 255;
for (int col = col_start; col < col_end; col ++) {
int src_alpha1 = src_alpha * clip_scan[col] / 255;
@@ -142,10 +142,10 @@
}
}
/*-----------------------------------------------------------------------------------------------------*/
- void CFX_SkiaRenderer::CompositeSpanGray_2(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanGray_2(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_pDevice->IsCmykImage());
ASSERT(!m_bRgbByteOrder);
@@ -164,10 +164,10 @@
dest_scan++;
}
}
- void CFX_SkiaRenderer::CompositeSpanGray_3(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanGray_3(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_pDevice->IsCmykImage());
ASSERT(!m_bRgbByteOrder);
@@ -207,10 +207,10 @@
}
}
- void CFX_SkiaRenderer::CompositeSpanGray_6(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanGray_6(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_bRgbByteOrder);
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + span_left;
@@ -235,10 +235,10 @@
}
}
- void CFX_SkiaRenderer::CompositeSpanGray_7(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanGray_7(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_pDevice->IsCmykImage());
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + span_left;
@@ -295,10 +295,10 @@
}
/*--------------------------------------------------------------------------------------------------*/
- void CFX_SkiaRenderer::CompositeSpanARGB_2(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanARGB_2(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + (span_left<<2);
int col_start = span_left < clip_left ? clip_left - span_left : 0;
@@ -343,10 +343,10 @@
}
}
- void CFX_SkiaRenderer::CompositeSpanARGB_3(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanARGB_3(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_pDevice->IsCmykImage());
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + (span_left<<2);
@@ -392,10 +392,10 @@
dest_scan += 2;
}
}
- void CFX_SkiaRenderer::CompositeSpanARGB_6(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanARGB_6(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + (span_left<<2);
clip_scan = (uint8_t*)m_pClipMask->GetScanline(span_top-clip_top) - clip_left + span_left;
@@ -507,10 +507,10 @@
#endif
}
- void CFX_SkiaRenderer::CompositeSpanARGB_7(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanARGB_7(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_pDevice->IsCmykImage());
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + (span_left<<2);
@@ -557,10 +557,10 @@
}
/*-----------------------------------------------------------------------------------------------------------*/
- void CFX_SkiaRenderer::CompositeSpanRGB32_2(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanRGB32_2(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + (span_left<<2);
int col_start = span_left < clip_left ? clip_left - span_left : 0;
@@ -588,10 +588,10 @@
dest_scan += 2;
}
}
- void CFX_SkiaRenderer::CompositeSpanRGB32_3(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanRGB32_3(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + (span_left<<2);
ori_scan = (uint8_t*)m_pOriDevice->GetScanline(span_top) + (span_left<<2);
@@ -627,10 +627,10 @@
dest_scan += 2;
}
}
- void CFX_SkiaRenderer::CompositeSpanRGB32_6(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanRGB32_6(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + (span_left<<2);
clip_scan = (uint8_t*)m_pClipMask->GetScanline(span_top-clip_top) - clip_left + span_left;
@@ -705,10 +705,10 @@
}
#endif
}
- void CFX_SkiaRenderer::CompositeSpanRGB32_7(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanRGB32_7(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_pDevice->IsCmykImage());
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + (span_left<<2);
@@ -784,10 +784,10 @@
#endif
}
/*-----------------------------------------------------------------------------------------------------*/
- void CFX_SkiaRenderer::CompositeSpanRGB24_2(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanRGB24_2(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + span_left + (span_left<<1);
int col_start = span_left < clip_left ? clip_left - span_left : 0;
@@ -818,10 +818,10 @@
dest_scan ++;
}
}
- void CFX_SkiaRenderer::CompositeSpanRGB24_3(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanRGB24_3(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_pDevice->IsCmykImage());
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + span_left + (span_left<<1);
@@ -859,10 +859,10 @@
dest_scan ++;
}
}
- void CFX_SkiaRenderer::CompositeSpanRGB24_6(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanRGB24_6(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + span_left+(span_left<<1);
clip_scan = (uint8_t*)m_pClipMask->GetScanline(span_top-clip_top) - clip_left + span_left;
@@ -939,10 +939,10 @@
}
#endif
}
- void CFX_SkiaRenderer::CompositeSpanRGB24_7(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanRGB24_7(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_pDevice->IsCmykImage());
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + span_left+(span_left<<1);
@@ -1017,10 +1017,10 @@
}
#endif
}
- void CFX_SkiaRenderer::CompositeSpanRGB24_10(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanRGB24_10(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + span_left+(span_left<<1);
dest_extra_alpha_scan = (uint8_t*)m_pDevice->m_pAlphaMask->GetScanline(span_top)+span_left;
@@ -1106,10 +1106,10 @@
}
#endif
}
- void CFX_SkiaRenderer::CompositeSpanRGB24_14(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanRGB24_14(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + span_left+(span_left<<1);
dest_extra_alpha_scan = (uint8_t*)m_pDevice->m_pAlphaMask->GetScanline(span_top)+span_left;
@@ -1211,10 +1211,10 @@
/*-----------------------------------------------------------------------------------------------------*/
// A general alpha merge function (with clipping mask). Cmyka/Cmyk device.
- void CFX_SkiaRenderer::CompositeSpanCMYK(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanCMYK(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_bRgbByteOrder);
// Cmyk(a)
@@ -1353,7 +1353,7 @@
if (pIccTransform) {
uint8_t gray;
color = bObjectCMYK ? FXCMYK_TODIB(color) : FXARGB_TODIB(color);
- pIccModule->TranslateScanline(pIccTransform, &gray, (FX_LPCBYTE)&color, 1);
+ pIccModule->TranslateScanline(pIccTransform, &gray, (const uint8_t*)&color, 1);
m_Gray = gray;
} else {
if (bObjectCMYK) {
@@ -1374,31 +1374,31 @@
if (bObjectCMYK) {
m_Color = FXCMYK_TODIB(color);
if (pIccTransform)
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)&m_Color, (FX_LPCBYTE)&m_Color, 1);
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&m_Color, (const uint8_t*)&m_Color, 1);
} else { // Object RGB
if (!pIccTransform)
return FALSE;
color = FXARGB_TODIB(color);
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)&m_Color, (FX_LPCBYTE)&color, 1);
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&m_Color, (const uint8_t*)&color, 1);
}
- m_Red = ((FX_LPBYTE)&m_Color)[0];
- m_Green = ((FX_LPBYTE)&m_Color)[1];
- m_Blue = ((FX_LPBYTE)&m_Color)[2];
- m_Gray = ((FX_LPBYTE)&m_Color)[3];
+ m_Red = ((uint8_t*)&m_Color)[0];
+ m_Green = ((uint8_t*)&m_Color)[1];
+ m_Blue = ((uint8_t*)&m_Color)[2];
+ m_Gray = ((uint8_t*)&m_Color)[3];
return TRUE;
} else {
if (pIccTransform) {
color = bObjectCMYK ? FXCMYK_TODIB(color) : FXARGB_TODIB(color);
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)&m_Color, (FX_LPCBYTE)&color, 1);
- ((FX_LPBYTE)&m_Color)[3] = m_Alpha;
- m_Red = ((FX_LPBYTE)&m_Color)[2];
- m_Green = ((FX_LPBYTE)&m_Color)[1];
- m_Blue = ((FX_LPBYTE)&m_Color)[0];
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&m_Color, (const uint8_t*)&color, 1);
+ ((uint8_t*)&m_Color)[3] = m_Alpha;
+ m_Red = ((uint8_t*)&m_Color)[2];
+ m_Green = ((uint8_t*)&m_Color)[1];
+ m_Blue = ((uint8_t*)&m_Color)[0];
// Need Johnson to improvement it.
if (m_bRgbByteOrder) {
// swap
- m_Red = ((FX_LPBYTE)&m_Color)[0];
- m_Blue = ((FX_LPBYTE)&m_Color)[2];
+ m_Red = ((uint8_t*)&m_Color)[0];
+ m_Blue = ((uint8_t*)&m_Color)[2];
m_Color = FXARGB_TODIB(m_Color);
m_Color = FXARGB_TOBGRORDERDIB(m_Color);
}
@@ -1509,8 +1509,8 @@
if (dst_y < 0 || dst_y >= m_pDevice->GetHeight())
return;
- FX_LPBYTE dest_scan = m_pDevice->GetBuffer() + m_pDevice->GetPitch() * dst_y;
- FX_LPBYTE dest_pos = dest_scan;
+ uint8_t* dest_scan = m_pDevice->GetBuffer() + m_pDevice->GetPitch() * dst_y;
+ uint8_t* dest_pos = dest_scan;
while (1)
{
if (x >= m_dstWidth)
@@ -1546,7 +1546,7 @@
return;
if (x >= m_dstWidth)
return;
- FX_LPBYTE dest_scan = m_pDevice->GetBuffer() + m_pDevice->GetPitch() * dst_y;
+ uint8_t* dest_scan = m_pDevice->GetBuffer() + m_pDevice->GetPitch() * dst_y;
int col_start = x < m_Left ? 0 : x - m_Left;
int col_end = x + width;
col_end = col_end < m_dstWidth ? col_end - m_Left: m_pDevice->GetWidth();
diff --git a/core/src/fxge/skia/fx_skia_blitter_new.h b/core/src/fxge/skia/fx_skia_blitter_new.h
index a80e56b2aa..8372ca3355 100644
--- a/core/src/fxge/skia/fx_skia_blitter_new.h
+++ b/core/src/fxge/skia/fx_skia_blitter_new.h
@@ -25,12 +25,12 @@ protected:
const CFX_ClipRgn* m_pClipRgn;
const CFX_DIBitmap* m_pClipMask;
- FX_LPBYTE m_pDestScan;
- FX_LPBYTE m_pDestExtraAlphaScan;
- FX_LPBYTE m_pOriScan;
- FX_LPBYTE m_pClipScan;
+ uint8_t* m_pDestScan;
+ uint8_t* m_pDestExtraAlphaScan;
+ uint8_t* m_pOriScan;
+ uint8_t* m_pClipScan;
- void (CFX_SkiaRenderer::*composite_span)(FX_LPBYTE,FX_LPBYTE,int,int,int,int,uint8_t,int,int,int,FX_LPBYTE,FX_LPBYTE);
+ void (CFX_SkiaRenderer::*composite_span)(uint8_t*,uint8_t*,int,int,int,int,uint8_t,int,int,int,uint8_t*,uint8_t*);
public:
//--------------------------------------------------------------------
@@ -42,166 +42,166 @@ public:
/*------------------------------------------------------------------------------------------------------*/
// A general alpha merge function (with clipping mask). Gray device.
- void CompositeSpan1bpp_0(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpan1bpp_0(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpan1bpp_1(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpan1bpp_1(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpan1bpp_4(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpan1bpp_4(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpan1bpp_5(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpan1bpp_5(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpan1bpp_8(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpan1bpp_8(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpan1bpp_9(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpan1bpp_9(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpan1bpp_12(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpan1bpp_12(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpan1bpp_13(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpan1bpp_13(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
/*--------------------------------------------------------------------------------------------------------*/
// A general alpha merge function (with clipping mask). Gray device.
- void CompositeSpanGray_2(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanGray_2(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
- void CompositeSpanGray_3(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanGray_3(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
- void CompositeSpanGray_6(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanGray_6(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
- void CompositeSpanGray_7(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanGray_7(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
- void CompositeSpanGray_10(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanGray_10(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
- void CompositeSpanGray_11(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanGray_11(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
- void CompositeSpanGray_14(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanGray_14(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
- void CompositeSpanGray_15(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanGray_15(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
/*--------------------------------------------------------------------------------------------------------*/
- void CompositeSpanARGB_2(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanARGB_2(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
- void CompositeSpanARGB_3(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanARGB_3(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
- void CompositeSpanARGB_6(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanARGB_6(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
- void CompositeSpanARGB_7(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanARGB_7(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
// ...
/*--------------------------------------------------------------------------------------------------------*/
- void CompositeSpanRGB32_2(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanRGB32_2(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpanRGB32_3(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpanRGB32_3(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpanRGB32_6(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpanRGB32_6(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpanRGB32_7(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpanRGB32_7(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
/*---------------------------------------------------------------------------------------------------------*/
- void CompositeSpanRGB24_2(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanRGB24_2(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpanRGB24_3(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpanRGB24_3(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpanRGB24_6(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpanRGB24_6(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpanRGB24_7(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpanRGB24_7(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpanRGB24_10(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpanRGB24_10(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpanRGB24_11(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpanRGB24_11(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpanRGB24_14(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpanRGB24_14(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpanRGB24_15(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpanRGB24_15(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
/*----------------------------------------------------------------------------------------------------------*/
// A general alpha merge function (with clipping mask). Cmyka/Cmyk device.
- void CompositeSpanCMYK(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanCMYK(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
//--------------------------------------------------------------------
diff --git a/core/src/fxge/skia/fx_skia_device.cpp b/core/src/fxge/skia/fx_skia_device.cpp
index 00c981c9e8..cc9730b49f 100644
--- a/core/src/fxge/skia/fx_skia_device.cpp
+++ b/core/src/fxge/skia/fx_skia_device.cpp
@@ -478,19 +478,19 @@ FX_BOOL CFX_SkiaDeviceDriver::StretchDIBits(const CFX_DIBSource* pSource, FX_DWO
}
FX_BOOL CFX_SkiaDeviceDriver::StartDIBits(const CFX_DIBSource* pSource, int bitmap_alpha, FX_DWORD argb,
- const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, FX_LPVOID& handle,
+ const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, void*& handle,
int alpha_flag, void* pIccTransform)
{
return m_pAggDriver->StartDIBits(pSource, bitmap_alpha, argb,
pMatrix, render_flags, handle, alpha_flag, pIccTransform);
}
-FX_BOOL CFX_SkiaDeviceDriver::ContinueDIBits(FX_LPVOID pHandle, IFX_Pause* pPause)
+FX_BOOL CFX_SkiaDeviceDriver::ContinueDIBits(void* pHandle, IFX_Pause* pPause)
{
return m_pAggDriver->ContinueDIBits(pHandle, pPause);
}
-void CFX_SkiaDeviceDriver::CancelDIBits(FX_LPVOID pHandle)
+void CFX_SkiaDeviceDriver::CancelDIBits(void* pHandle)
{
m_pAggDriver->CancelDIBits(pHandle);
}
diff --git a/core/src/fxge/skia/fx_skia_device.h b/core/src/fxge/skia/fx_skia_device.h
index 7ae019c124..582b844fb9 100644
--- a/core/src/fxge/skia/fx_skia_device.h
+++ b/core/src/fxge/skia/fx_skia_device.h
@@ -67,10 +67,10 @@ public:
int alpha_flag = 0, void* pIccTransform = NULL);
virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color,
- const CFX_AffineMatrix* pMatrix, FX_DWORD flags, FX_LPVOID& handle,
+ const CFX_AffineMatrix* pMatrix, FX_DWORD flags, void*& handle,
int alpha_flag = 0, void* pIccTransform = NULL);
- virtual FX_BOOL ContinueDIBits(FX_LPVOID handle, IFX_Pause* pPause);
- virtual void CancelDIBits(FX_LPVOID handle);
+ virtual FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause);
+ virtual void CancelDIBits(void* handle);
virtual FX_BOOL DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont,
CFX_FontCache* pCache, const CFX_AffineMatrix* pObject2Device, FX_FIXFLOAT font_size, FX_DWORD color,
@@ -82,7 +82,7 @@ public:
int alpha_flag, void* pIccTransform, FX_BOOL bFill = TRUE);
void SetClipMask(rasterizer_scanline_aa& rasterizer);
void SetClipMask(SkPath& skPath, SkPaint* spaint);
- virtual FX_LPBYTE GetBuffer() const {return m_pAggDriver->GetBuffer();}
+ virtual uint8_t* GetBuffer() const {return m_pAggDriver->GetBuffer();}
CFX_AggDeviceDriver* m_pAggDriver;
};
diff --git a/core/src/fxge/win32/dwrite_int.h b/core/src/fxge/win32/dwrite_int.h
index d95f115fbc..4192fb74ae 100644
--- a/core/src/fxge/win32/dwrite_int.h
+++ b/core/src/fxge/win32/dwrite_int.h
@@ -40,7 +40,7 @@ public:
return m_pDWriteFactory != NULL;
}
- void* DwCreateFontFaceFromStream(FX_LPBYTE pData, FX_DWORD size, int simulation_style);
+ void* DwCreateFontFaceFromStream(uint8_t* pData, FX_DWORD size, int simulation_style);
FX_BOOL DwCreateRenderingTarget(CFX_DIBitmap* pSrc, void** renderTarget);
void DwDeleteRenderingTarget(void* renderTarget);
FX_BOOL DwRendingString(void* renderTarget, CFX_ClipRgn* pClipRgn, FX_RECT& stringRect, CFX_AffineMatrix* pMatrix,
diff --git a/core/src/fxge/win32/fx_win32_device.cpp b/core/src/fxge/win32/fx_win32_device.cpp
index 7ebdcb380e..5fb9036381 100644
--- a/core/src/fxge/win32/fx_win32_device.cpp
+++ b/core/src/fxge/win32/fx_win32_device.cpp
@@ -23,12 +23,12 @@ public:
~CWin32FontInfo();
virtual void Release();
virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper);
- virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR face, FX_BOOL& bExact);
- virtual void* GetFont(FX_LPCSTR face)
+ virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* face, FX_BOOL& bExact);
+ virtual void* GetFont(const FX_CHAR* face)
{
return NULL;
}
- virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, FX_LPBYTE buffer, FX_DWORD size);
+ virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer, FX_DWORD size);
virtual void DeleteFont(void* hFont);
virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name);
virtual FX_BOOL GetFontCharset(void* hFont, int& charset);
@@ -152,15 +152,15 @@ FX_BOOL CWin32FontInfo::EnumFontList(CFX_FontMapper* pMapper)
return TRUE;
}
static const struct {
- FX_LPCSTR m_pFaceName;
- FX_LPCSTR m_pVariantName;
+ const FX_CHAR* m_pFaceName;
+ const FX_CHAR* m_pVariantName;
}
VariantNames[] = {
{"DFKai-SB", "\x19\x6A\x77\x69\xD4\x9A"},
};
static const struct {
- FX_LPCSTR m_pName;
- FX_LPCSTR m_pWinName;
+ const FX_CHAR* m_pName;
+ const FX_CHAR* m_pWinName;
FX_BOOL m_bBold;
FX_BOOL m_bItalic;
}
@@ -197,8 +197,8 @@ CFX_ByteString CWin32FontInfo::FindFont(const CFX_ByteString& name)
return CFX_ByteString();
}
struct _FontNameMap {
- FX_LPCSTR m_pSubFontName;
- FX_LPCSTR m_pSrcFontName;
+ const FX_CHAR* m_pSubFontName;
+ const FX_CHAR* m_pSrcFontName;
};
const _FontNameMap g_JpFontNameMap[] = {
{"MS Mincho", "Heiseimin-W3"},
@@ -207,7 +207,7 @@ const _FontNameMap g_JpFontNameMap[] = {
extern "C" {
static int compareString(const void* key, const void* element)
{
- return FXSYS_stricmp((FX_LPCSTR)key, ((_FontNameMap*)element)->m_pSrcFontName);
+ return FXSYS_stricmp((const FX_CHAR*)key, ((_FontNameMap*)element)->m_pSrcFontName);
}
}
FX_BOOL _GetSubFontName(CFX_ByteString& name)
@@ -282,7 +282,7 @@ void CWin32FontInfo::GetJapanesePreference(CFX_ByteString& face, int weight, int
face = "MS PMincho";
}
}
-void* CWin32FontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR cstr_face, FX_BOOL& bExact)
+void* CWin32FontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* cstr_face, FX_BOOL& bExact)
{
CFX_ByteString face = cstr_face;
int iBaseFont;
@@ -359,7 +359,7 @@ void CWin32FontInfo::DeleteFont(void* hFont)
{
::DeleteObject(hFont);
}
-FX_DWORD CWin32FontInfo::GetFontData(void* hFont, FX_DWORD table, FX_LPBYTE buffer, FX_DWORD size)
+FX_DWORD CWin32FontInfo::GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer, FX_DWORD size)
{
HFONT hOldFont = (HFONT)::SelectObject(m_hDC, (HFONT)hFont);
table = FXDWORD_FROM_MSBFIRST(table);
@@ -459,14 +459,14 @@ int CGdiDeviceDriver::GetDeviceCaps(int caps_id)
}
return 0;
}
-FX_LPVOID CGdiDeviceDriver::GetClipRgn()
+void* CGdiDeviceDriver::GetClipRgn()
{
HRGN hClipRgn = CreateRectRgn(0, 0, 1, 1);
if (::GetClipRgn(m_hDC, hClipRgn) == 0) {
DeleteObject(hClipRgn);
hClipRgn = NULL;
}
- return (FX_LPVOID)hClipRgn;
+ return (void*)hClipRgn;
}
FX_BOOL CGdiDeviceDriver::GDI_SetDIBits(const CFX_DIBitmap* pBitmap1, const FX_RECT* pSrcRect, int left, int top, void* pIccTransform)
{
@@ -600,7 +600,7 @@ BOOL CGdiDeviceDriver::GetClipBox(FX_RECT* pRect)
{
return ::GetClipBox(m_hDC, (RECT*)pRect);
}
-FX_BOOL CGdiDeviceDriver::SetClipRgn(FX_LPVOID hRgn)
+FX_BOOL CGdiDeviceDriver::SetClipRgn(void* hRgn)
{
::SelectClipRgn(m_hDC, (HRGN)hRgn);
return TRUE;
@@ -930,7 +930,7 @@ FX_BOOL CGdiDeviceDriver::DrawCosmeticLine(FX_FLOAT x1, FX_FLOAT y1, FX_FLOAT x2
DeleteObject(hPen);
return TRUE;
}
-FX_BOOL CGdiDeviceDriver::DeleteDeviceRgn(FX_LPVOID pRgn)
+FX_BOOL CGdiDeviceDriver::DeleteDeviceRgn(void* pRgn)
{
DeleteObject((HGDIOBJ)pRgn);
return TRUE;
@@ -1182,8 +1182,8 @@ CFX_WinBitmapDevice::CFX_WinBitmapDevice(int width, int height, FXDIB_Format for
bmih.biHeight = -height;
bmih.biPlanes = 1;
bmih.biWidth = width;
- FX_LPBYTE pBuffer;
- m_hBitmap = CreateDIBSection(NULL, (BITMAPINFO*)&bmih, DIB_RGB_COLORS, (FX_LPVOID*)&pBuffer, NULL, 0);
+ uint8_t* pBuffer;
+ m_hBitmap = CreateDIBSection(NULL, (BITMAPINFO*)&bmih, DIB_RGB_COLORS, (void**)&pBuffer, NULL, 0);
if (m_hBitmap == NULL) {
return;
}
diff --git a/core/src/fxge/win32/fx_win32_dib.cpp b/core/src/fxge/win32/fx_win32_dib.cpp
index 7706ee289e..a3ec5cd6f0 100644
--- a/core/src/fxge/win32/fx_win32_dib.cpp
+++ b/core/src/fxge/win32/fx_win32_dib.cpp
@@ -71,7 +71,7 @@ CFX_DIBitmap* _FX_WindowsDIB_LoadFromBuf(BITMAPINFO* pbmi, LPVOID pData, FX_BOOL
}
FXSYS_memcpy32(pBitmap->GetBuffer(), pData, pitch * height);
if (bBottomUp) {
- FX_LPBYTE temp_buf = FX_Alloc(uint8_t, pitch);
+ uint8_t* temp_buf = FX_Alloc(uint8_t, pitch);
int top = 0, bottom = height - 1;
while (top < bottom) {
FXSYS_memcpy32(temp_buf, pBitmap->GetBuffer() + top * pitch, pitch);
@@ -113,7 +113,7 @@ void GetBitmapSize(HBITMAP hBitmap, int& w, int& h)
w = bmp.bmWidth;
h = bmp.bmHeight;
}
-CFX_DIBitmap* CFX_WindowsDIB::LoadFromFile(FX_LPCWSTR filename)
+CFX_DIBitmap* CFX_WindowsDIB::LoadFromFile(const FX_WCHAR* filename)
{
CWin32Platform* pPlatform = (CWin32Platform*)CFX_GEModule::Get()->GetPlatformData();
if (pPlatform->m_GdiplusExt.IsAvailable()) {
@@ -267,7 +267,7 @@ CFX_DIBitmap* CFX_WindowsDIB::LoadFromDDB(HDC hDC, HBITMAP hBitmap, FX_DWORD* pP
}
CFX_WindowsDIB::CFX_WindowsDIB(HDC hDC, int width, int height)
{
- Create(width, height, FXDIB_Rgb, (FX_LPBYTE)1);
+ Create(width, height, FXDIB_Rgb, (uint8_t*)1);
BITMAPINFOHEADER bmih;
FXSYS_memset32(&bmih, 0, sizeof bmih);
bmih.biSize = sizeof bmih;
diff --git a/core/src/fxge/win32/fx_win32_dwrite.cpp b/core/src/fxge/win32/fx_win32_dwrite.cpp
index 2a490a62a4..ffecc0de72 100644
--- a/core/src/fxge/win32/fx_win32_dwrite.cpp
+++ b/core/src/fxge/win32/fx_win32_dwrite.cpp
@@ -129,7 +129,7 @@ CDWriteExt::~CDWriteExt()
{
Unload();
}
-LPVOID CDWriteExt::DwCreateFontFaceFromStream(FX_LPBYTE pData, FX_DWORD size, int simulation_style)
+LPVOID CDWriteExt::DwCreateFontFaceFromStream(uint8_t* pData, FX_DWORD size, int simulation_style)
{
IDWriteFactory* pDwFactory = (IDWriteFactory*)m_pDWriteFactory;
IDWriteFontFile* pDwFontFile = NULL;
@@ -440,7 +440,7 @@ STDMETHODIMP CDwGdiTextRenderer::DrawGlyphRun(
bitmap.bmWidth,
bitmap.bmHeight,
bitmap.bmBitsPixel == 24 ? FXDIB_Rgb : FXDIB_Rgb32,
- (FX_LPBYTE)bitmap.bmBits
+ (uint8_t*)bitmap.bmBits
);
dib.CompositeBitmap(
text_bbox.left,
diff --git a/core/src/fxge/win32/fx_win32_gdipext.cpp b/core/src/fxge/win32/fx_win32_gdipext.cpp
index fd31d2da66..68a27ab38f 100644
--- a/core/src/fxge/win32/fx_win32_gdipext.cpp
+++ b/core/src/fxge/win32/fx_win32_gdipext.cpp
@@ -352,7 +352,7 @@ static void OutputImageMask(GpGraphics* pGraphics, BOOL bMonoDevice, const CFX_D
CGdiplusExt& GdiplusExt = ((CWin32Platform*)CFX_GEModule::Get()->GetPlatformData())->m_GdiplusExt;
int src_width = pBitmap->GetWidth(), src_height = pBitmap->GetHeight();
int src_pitch = pBitmap->GetPitch();
- FX_LPBYTE scan0 = pBitmap->GetBuffer();
+ uint8_t* scan0 = pBitmap->GetBuffer();
if (src_width == 1 && src_height == 1) {
if ((scan0[0] & 0x80) == 0) {
return;
@@ -433,7 +433,7 @@ static void OutputImage(GpGraphics* pGraphics, const CFX_DIBitmap* pBitmap, cons
return;
}
int src_pitch = pBitmap->GetPitch();
- FX_LPBYTE scan0 = pBitmap->GetBuffer() + pSrcRect->top * src_pitch + pBitmap->GetBPP() * pSrcRect->left / 8;
+ uint8_t* scan0 = pBitmap->GetBuffer() + pSrcRect->top * src_pitch + pBitmap->GetBPP() * pSrcRect->left / 8;
GpBitmap* bitmap = NULL;
switch (pBitmap->GetFormat()) {
case FXDIB_Argb:
@@ -572,7 +572,7 @@ FX_BOOL CGdiplusExt::GdipCreateFromImage(void* bitmap, void** graphics)
}
return FALSE;
}
-FX_BOOL CGdiplusExt::GdipCreateFontFamilyFromName(FX_LPCWSTR name, void* pFontCollection, void**pFamily)
+FX_BOOL CGdiplusExt::GdipCreateFontFamilyFromName(const FX_WCHAR* name, void* pFontCollection, void**pFamily)
{
CGdiplusExt& GdiplusExt = ((CWin32Platform*)CFX_GEModule::Get()->GetPlatformData())->m_GdiplusExt;
GpStatus status = CallFunc(GdipCreateFontFamilyFromName)((GDIPCONST WCHAR *)name, (GpFontCollection*)pFontCollection, (GpFontFamily**)pFamily);
diff --git a/core/src/fxge/win32/fx_win32_print.cpp b/core/src/fxge/win32/fx_win32_print.cpp
index 4ebeab9023..4600d186a6 100644
--- a/core/src/fxge/win32/fx_win32_print.cpp
+++ b/core/src/fxge/win32/fx_win32_print.cpp
@@ -121,7 +121,7 @@ static CFX_DIBitmap* Transform1bppBitmap(const CFX_DIBSource* pSrc, const CFX_Af
return NULL;
}
int src_width = pSrcBitmap->GetWidth(), src_height = pSrcBitmap->GetHeight();
- FX_LPBYTE src_buf = pSrcBitmap->GetBuffer();
+ uint8_t* src_buf = pSrcBitmap->GetBuffer();
FX_DWORD src_pitch = pSrcBitmap->GetPitch();
FX_FLOAT dest_area = pDestMatrix->GetUnitArea();
FX_FLOAT area_scale = FXSYS_Div((FX_FLOAT)(src_width * src_height), dest_area);
@@ -158,12 +158,12 @@ static CFX_DIBitmap* Transform1bppBitmap(const CFX_DIBSource* pSrc, const CFX_Af
return NULL;
}
pTempBitmap->CopyPalette(pSrc->GetPalette());
- FX_LPBYTE dest_buf = pTempBitmap->GetBuffer();
+ uint8_t* dest_buf = pTempBitmap->GetBuffer();
int dest_pitch = pTempBitmap->GetPitch();
FXSYS_memset8(dest_buf, pSrc->IsAlphaMask() ? 0 : 0xff, dest_pitch * result_height);
if (pSrcBitmap->IsAlphaMask()) {
for (int dest_y = 0; dest_y < result_height; dest_y ++) {
- FX_LPBYTE dest_scan = dest_buf + dest_y * dest_pitch;
+ uint8_t* dest_scan = dest_buf + dest_y * dest_pitch;
for (int dest_x = 0; dest_x < result_width; dest_x ++) {
int src_x, src_y;
result2src_fix.Transform(dest_x, dest_y, src_x, src_y);
@@ -178,7 +178,7 @@ static CFX_DIBitmap* Transform1bppBitmap(const CFX_DIBSource* pSrc, const CFX_Af
}
} else {
for (int dest_y = 0; dest_y < result_height; dest_y ++) {
- FX_LPBYTE dest_scan = dest_buf + dest_y * dest_pitch;
+ uint8_t* dest_scan = dest_buf + dest_y * dest_pitch;
for (int dest_x = 0; dest_x < result_width; dest_x ++) {
int src_x, src_y;
result2src_fix.Transform(dest_x, dest_y, src_x, src_y);
@@ -198,7 +198,7 @@ static CFX_DIBitmap* Transform1bppBitmap(const CFX_DIBSource* pSrc, const CFX_Af
return pTempBitmap;
}
FX_BOOL CGdiPrinterDriver::StartDIBits(const CFX_DIBSource* pSource, int bitmap_alpha, FX_DWORD color,
- const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, FX_LPVOID& handle,
+ const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, void*& handle,
int alpha_flag, void* pIccTransform, int blend_type)
{
if (bitmap_alpha < 255 || pSource->HasAlpha() || (pSource->IsAlphaMask() && (pSource->GetBPP() != 1 || !m_bSupportROP))) {
@@ -256,7 +256,7 @@ void CPSOutput::Init()
{
m_pBuf = FX_Alloc(FX_CHAR, 1026);
}
-void CPSOutput::OutputPS(FX_LPCSTR string, int len)
+void CPSOutput::OutputPS(const FX_CHAR* string, int len)
{
if (len < 0) {
len = (int)FXSYS_strlen(string);
@@ -402,7 +402,7 @@ FX_BOOL CPSPrinterDriver::StretchDIBits(const CFX_DIBSource* pBitmap, FX_DWORD c
return m_PSRenderer.StretchDIBits(pBitmap, color, dest_left, dest_top, dest_width, dest_height, flags, alpha_flag, pIccTransform);
}
FX_BOOL CPSPrinterDriver::StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color,
- const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, FX_LPVOID& handle,
+ const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, void*& handle,
int alpha_flag, void* pIccTransform, int blend_type)
{
if (blend_type != FXDIB_BLEND_NORMAL) {
diff --git a/core/src/fxge/win32/win32_int.h b/core/src/fxge/win32/win32_int.h
index a3380f3b5b..1f8f5d7995 100644
--- a/core/src/fxge/win32/win32_int.h
+++ b/core/src/fxge/win32/win32_int.h
@@ -41,7 +41,7 @@ public:
void GdipDeleteBrush(void* pBrush);
void GdipCreateMatrix(FX_FLOAT a, FX_FLOAT b, FX_FLOAT c, FX_FLOAT d, FX_FLOAT e, FX_FLOAT f, void** matrix);
void GdipDeleteMatrix(void* matrix);
- FX_BOOL GdipCreateFontFamilyFromName(FX_LPCWSTR name, void* pFontCollection, void**pFamily);
+ FX_BOOL GdipCreateFontFamilyFromName(const FX_WCHAR* name, void* pFontCollection, void**pFamily);
void GdipDeleteFontFamily(void* pFamily);
FX_BOOL GdipCreateFontFromFamily(void* pFamily, FX_FLOAT font_size, int fontstyle, int flag, void** pFont);
void* GdipCreateFontFromCollection(void* pFontCollection, FX_FLOAT font_size, int fontstyle);
@@ -105,10 +105,10 @@ protected:
int alpha_flag, void* pIccTransform, int blend_type);
virtual FX_BOOL DrawCosmeticLine(FX_FLOAT x1, FX_FLOAT y1, FX_FLOAT x2, FX_FLOAT y2, FX_DWORD color,
int alpha_flag, void* pIccTransform, int blend_type);
- virtual FX_LPVOID GetClipRgn() ;
- virtual FX_BOOL SetClipRgn(FX_LPVOID pRgn) ;
+ virtual void* GetClipRgn() ;
+ virtual FX_BOOL SetClipRgn(void* pRgn) ;
virtual FX_BOOL GetClipBox(FX_RECT* pRect);
- virtual FX_BOOL DeleteDeviceRgn(FX_LPVOID pRgn);
+ virtual FX_BOOL DeleteDeviceRgn(void* pRgn);
virtual void DrawLine(FX_FLOAT x1, FX_FLOAT y1, FX_FLOAT x2, FX_FLOAT y2);
virtual void* GetPlatformSurface()
{
@@ -140,7 +140,7 @@ protected:
int dest_width, int dest_height, const FX_RECT* pClipRect, FX_DWORD flags,
int alpha_flag, void* pIccTransform, int blend_type);
virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color,
- const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, FX_LPVOID& handle,
+ const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, void*& handle,
int alpha_flag, void* pIccTransform, int blend_type)
{
return FALSE;
@@ -161,7 +161,7 @@ protected:
int dest_width, int dest_height, const FX_RECT* pClipRect, FX_DWORD flags,
int alpha_flag, void* pIccTransform, int blend_type);
virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color,
- const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, FX_LPVOID& handle,
+ const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, void*& handle,
int alpha_flag, void* pIccTransform, int blend_type);
int m_HorzSize, m_VertSize;
FX_BOOL m_bSupportROP;
@@ -176,9 +176,9 @@ public:
delete this;
}
void Init();
- virtual void OutputPS(FX_LPCSTR string, int len);
+ virtual void OutputPS(const FX_CHAR* string, int len);
HDC m_hDC;
- FX_LPSTR m_pBuf;
+ FX_CHAR* m_pBuf;
};
class CPSPrinterDriver : public IFX_RenderDeviceDriver
{
@@ -221,7 +221,7 @@ protected:
int dest_width, int dest_height, const FX_RECT* pClipRect, FX_DWORD flags,
int alpha_flag, void* pIccTransform, int blend_type);
virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color,
- const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, FX_LPVOID& handle,
+ const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, void*& handle,
int alpha_flag, void* pIccTransform, int blend_type);
virtual FX_BOOL DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont,
CFX_FontCache* pCache, const CFX_AffineMatrix* pObject2Device, FX_FLOAT font_size, FX_DWORD color,
diff --git a/fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h b/fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h
index a51e9efbe1..687cd6f207 100644
--- a/fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h
+++ b/fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h
@@ -20,7 +20,7 @@ public:
virtual ~CBA_FontMap();
- virtual void Initial(FX_LPCSTR fontname = NULL);
+ virtual void Initial(const FX_CHAR* fontname = NULL);
public:
void SetDefaultFont(CPDF_Font * pFont, const CFX_ByteString & sFontName);
diff --git a/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h b/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
index d8cda3953f..163120b928 100644
--- a/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
+++ b/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
@@ -56,7 +56,7 @@ public:
//dwFlags XFA_PAGEVIEWEVENT_Added, XFA_PAGEVIEWEVENT_Removing
virtual void PageViewEvent(IXFA_PageView* pPageView, FX_DWORD dwFlags);
//dwEvent refer to XFA_WIDGETEVENT_XXX
- virtual void WidgetEvent(IXFA_Widget* hWidget, CXFA_WidgetAcc* pWidgetData, FX_DWORD dwEvent, FX_LPVOID pParam = NULL, FX_LPVOID pAdditional = NULL);
+ virtual void WidgetEvent(IXFA_Widget* hWidget, CXFA_WidgetAcc* pWidgetData, FX_DWORD dwEvent, void* pParam = NULL, void* pAdditional = NULL);
//return true if render it.
virtual FX_BOOL RenderCustomWidget(IXFA_Widget* hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix, const CFX_RectF& rtUI){return FALSE;}
diff --git a/fpdfsdk/include/fsdk_baseform.h b/fpdfsdk/include/fsdk_baseform.h
index 88192aad31..2091376c9c 100644
--- a/fpdfsdk/include/fsdk_baseform.h
+++ b/fpdfsdk/include/fsdk_baseform.h
@@ -136,7 +136,7 @@ public:
void SetTopVisibleIndex(int index);
void ResetAppearance(FX_BOOL bValueChanged);
- void ResetAppearance(FX_LPCWSTR sValue, FX_BOOL bValueChanged);
+ void ResetAppearance(const FX_WCHAR* sValue, FX_BOOL bValueChanged);
void ResetFieldAppearance(FX_BOOL bValueChanged);
void UpdateField();
CFX_WideString OnFormat(int nCommitKey, FX_BOOL& bFormated);
@@ -163,9 +163,9 @@ private:
void ResetAppearance_PushButton();
void ResetAppearance_CheckBox();
void ResetAppearance_RadioButton();
- void ResetAppearance_ComboBox(FX_LPCWSTR sValue);
+ void ResetAppearance_ComboBox(const FX_WCHAR* sValue);
void ResetAppearance_ListBox();
- void ResetAppearance_TextField(FX_LPCWSTR sValue);
+ void ResetAppearance_TextField(const FX_WCHAR* sValue);
CPDF_Rect GetClientRect() const;
CPDF_Rect GetRotatedRect() const;
@@ -266,7 +266,7 @@ public:
void OnCalculate(CPDF_FormField* pFormField = NULL);
CFX_WideString OnFormat(CPDF_FormField* pFormField, int nCommitKey, FX_BOOL& bFormated);
- void ResetFieldAppearance(CPDF_FormField* pFormField, FX_LPCWSTR sValue, FX_BOOL bValueChanged);
+ void ResetFieldAppearance(CPDF_FormField* pFormField, const FX_WCHAR* sValue, FX_BOOL bValueChanged);
void UpdateField(CPDF_FormField* pFormField);
public:
@@ -299,7 +299,7 @@ private:
private:
FX_BOOL FDFToURLEncodedData(CFX_WideString csFDFFile, CFX_WideString csTxtFile);
- FX_BOOL FDFToURLEncodedData(FX_LPBYTE& pBuf, FX_STRSIZE& nBufSize);
+ FX_BOOL FDFToURLEncodedData(uint8_t*& pBuf, FX_STRSIZE& nBufSize);
int GetPageIndexByAnnotDict(CPDF_Document* pDocument, CPDF_Dictionary* pAnnotDict) const;
void DoFDFBuffer(CFX_ByteString sBuffer);
diff --git a/fpdfsdk/include/fsdk_define.h b/fpdfsdk/include/fsdk_define.h
index 12ef8133a2..c21dd88ca9 100644
--- a/fpdfsdk/include/fsdk_define.h
+++ b/fpdfsdk/include/fsdk_define.h
@@ -85,7 +85,7 @@ public:
virtual CFX_ByteString GetFullPath() { return ""; }
virtual FX_FILESIZE GetSize() override { return m_FileAccess.m_FileLen; }
virtual FX_BOOL GetByte(FX_DWORD pos, uint8_t& ch);
- virtual FX_BOOL GetBlock(FX_DWORD pos, FX_LPBYTE pBuf, FX_DWORD size);
+ virtual FX_BOOL GetBlock(FX_DWORD pos, uint8_t* pBuf, FX_DWORD size);
virtual void Release() override { delete this; }
virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override;
diff --git a/fpdfsdk/include/fsdk_mgr.h b/fpdfsdk/include/fsdk_mgr.h
index d90ab3be4f..b0ff5a7599 100644
--- a/fpdfsdk/include/fsdk_mgr.h
+++ b/fpdfsdk/include/fsdk_mgr.h
@@ -129,7 +129,7 @@ public:
return FALSE;
}
- int JS_appAlert(FX_LPCWSTR Msg, FX_LPCWSTR Title, FX_UINT Type, FX_UINT Icon)
+ int JS_appAlert(const FX_WCHAR* Msg, const FX_WCHAR* Title, FX_UINT Type, FX_UINT Icon)
{
if(m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform->app_alert)
{
@@ -145,7 +145,7 @@ public:
return -1;
}
- int JS_appResponse(FX_LPCWSTR Question, FX_LPCWSTR Title, FX_LPCWSTR Default, FX_LPCWSTR cLabel, FPDF_BOOL bPassword, void* response, int length)
+ int JS_appResponse(const FX_WCHAR* Question, const FX_WCHAR* Title, const FX_WCHAR* Default, const FX_WCHAR* cLabel, FPDF_BOOL bPassword, void* response, int length)
{
if (m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform->app_response)
{
@@ -230,7 +230,7 @@ public:
return L"";
}
- void JS_docSubmitForm(void* formData, int length, FX_LPCWSTR URL)
+ void JS_docSubmitForm(void* formData, int length, const FX_WCHAR* URL)
{
if(m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform->Doc_submitForm)
{
@@ -241,7 +241,7 @@ public:
}
}
- void JS_docmailForm(void* mailData, int length, FPDF_BOOL bUI,FX_LPCWSTR To, FX_LPCWSTR Subject, FX_LPCWSTR CC, FX_LPCWSTR BCC, FX_LPCWSTR Msg)
+ void JS_docmailForm(void* mailData, int length, FPDF_BOOL bUI,const FX_WCHAR* To, const FX_WCHAR* Subject, const FX_WCHAR* CC, const FX_WCHAR* BCC, const FX_WCHAR* Msg)
{
if(m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform->Doc_mail)
{
@@ -306,7 +306,7 @@ public:
}
return 0;
}
- void FFI_ExecuteNamedAction(FX_LPCSTR namedAction)
+ void FFI_ExecuteNamedAction(const FX_CHAR* namedAction)
{
if(m_pInfo && m_pInfo->FFI_ExecuteNamedAction)
{
@@ -321,7 +321,7 @@ public:
}
}
- void FFI_DoURIAction(FX_LPCSTR bsURI)
+ void FFI_DoURIAction(const FX_CHAR* bsURI)
{
if(m_pInfo && m_pInfo->FFI_DoURIAction)
{
@@ -554,7 +554,7 @@ public:
return 0;
}
- IFX_FileRead* FFI_DownloadFromURL(FX_LPCWSTR url)
+ IFX_FileRead* FFI_DownloadFromURL(const FX_WCHAR* url)
{
if (m_pInfo && m_pInfo->FFI_DownloadFromURL)
{
@@ -569,7 +569,7 @@ public:
return NULL;
}
- CFX_WideString FFI_PostRequestURL(FX_LPCWSTR wsURL, FX_LPCWSTR wsData, FX_LPCWSTR wsContentType, FX_LPCWSTR wsEncode, FX_LPCWSTR wsHeader)
+ CFX_WideString FFI_PostRequestURL(const FX_WCHAR* wsURL, const FX_WCHAR* wsData, const FX_WCHAR* wsContentType, const FX_WCHAR* wsEncode, const FX_WCHAR* wsHeader)
{
if (m_pInfo && m_pInfo->FFI_PostRequestURL)
{
@@ -600,7 +600,7 @@ public:
return L"";
}
- FPDF_BOOL FFI_PutRequestURL(FX_LPCWSTR wsURL, FX_LPCWSTR wsData, FX_LPCWSTR wsEncode)
+ FPDF_BOOL FFI_PutRequestURL(const FX_WCHAR* wsURL, const FX_WCHAR* wsData, const FX_WCHAR* wsEncode)
{
if (m_pInfo && m_pInfo->FFI_PutRequestURL)
{
@@ -618,7 +618,7 @@ public:
return FALSE;
}
- FPDF_BOOL FFI_ShowFileDialog(FX_LPCWSTR wsTitle, FX_LPCWSTR wsFilter, CFX_WideStringArray &wsPathArr, FX_BOOL bOpen)
+ FPDF_BOOL FFI_ShowFileDialog(const FX_WCHAR* wsTitle, const FX_WCHAR* wsFilter, CFX_WideStringArray &wsPathArr, FX_BOOL bOpen)
{
/*CFX_ByteString bsTitle = CFX_WideString(wsTitle).UTF16LE_Encode();
FPDF_WIDESTRING title = (FPDF_WIDESTRING)bsTitle.GetBuffer(bsTitle.GetLength());
@@ -779,7 +779,7 @@ public:
FX_BOOL Annot_HasAppearance(CPDF_Annot* pAnnot);
CPDFSDK_Annot* AddAnnot(CPDF_Dictionary * pDict);
- CPDFSDK_Annot* AddAnnot(FX_LPCSTR lpSubType,CPDF_Dictionary * pDict);
+ CPDFSDK_Annot* AddAnnot(const FX_CHAR* lpSubType,CPDF_Dictionary * pDict);
CPDFSDK_Annot* AddAnnot(CPDF_Annot * pPDFAnnot);
CPDFSDK_Annot* AddAnnot(IXFA_Widget* pPDFAnnot);
FX_BOOL DeleteAnnot(CPDFSDK_Annot* pAnnot);
@@ -802,7 +802,7 @@ public:
FX_BOOL OnMouseMove(const CPDF_Point & point, int nFlag);
FX_BOOL OnMouseWheel(double deltaX, double deltaY,const CPDF_Point& point, int nFlag);
- FX_BOOL IsValidAnnot(FX_LPVOID p);
+ FX_BOOL IsValidAnnot(void* p);
void GetCurrentMatrix(CPDF_Matrix& matrix) {matrix = m_curMatrix;}
void UpdateRects(CFX_RectArray& rects);
void UpdateView(CPDFSDK_Annot* pAnnot);
diff --git a/fpdfsdk/include/fx_systemhandler.h b/fpdfsdk/include/fx_systemhandler.h
index 276019eae5..e398f78b88 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_
-typedef FX_LPVOID FX_HWND;
-typedef FX_LPVOID FX_HMENU;
+typedef void* FX_HWND;
+typedef void* FX_HMENU;
typedef void (*TimerCallback)(int32_t idEvent);
typedef struct _FX_SYSTEMTIME
diff --git a/fpdfsdk/include/fxedit/fx_edit.h b/fpdfsdk/include/fxedit/fx_edit.h
index 0da6fe6f9e..f710cddaa7 100644
--- a/fpdfsdk/include/fxedit/fx_edit.h
+++ b/fpdfsdk/include/fxedit/fx_edit.h
@@ -309,14 +309,14 @@ public:
virtual void OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
//put text into edit.
- virtual void SetText(FX_LPCWSTR text,int32_t charset = DEFAULT_CHARSET,
+ virtual void SetText(const FX_WCHAR* text,int32_t charset = DEFAULT_CHARSET,
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL) = 0;
//insert a word into the edit.
virtual FX_BOOL InsertWord(FX_WORD word, int32_t charset = DEFAULT_CHARSET, const CPVT_WordProps * pWordProps = NULL) = 0;
//insert a return into the edit.
virtual FX_BOOL InsertReturn(const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL) = 0;
//insert text into the edit.
- virtual FX_BOOL InsertText(FX_LPCWSTR text, int32_t charset = DEFAULT_CHARSET,
+ virtual FX_BOOL InsertText(const FX_WCHAR* text, int32_t charset = DEFAULT_CHARSET,
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL) = 0;
//do backspace operation.
virtual FX_BOOL Backspace() = 0;
@@ -468,7 +468,7 @@ public:
virtual int32_t GetItemIndex(const CPDF_Point & point) const = 0;
virtual int32_t GetFirstSelected() const = 0;
- virtual void AddString(FX_LPCWSTR string) = 0;
+ virtual void AddString(const FX_WCHAR* string) = 0;
virtual void SetTopItem(int32_t nIndex) = 0;
virtual void Select(int32_t nItemIndex) = 0;
virtual void SetCaret(int32_t nItemIndex) = 0;
diff --git a/fpdfsdk/include/fxedit/fxet_edit.h b/fpdfsdk/include/fxedit/fxet_edit.h
index 6fd7b9a4ee..0a3617f4e4 100644
--- a/fpdfsdk/include/fxedit/fxet_edit.h
+++ b/fpdfsdk/include/fxedit/fxet_edit.h
@@ -618,7 +618,7 @@ public:
void OnVK_HOME(FX_BOOL bShift,FX_BOOL bCtrl);
void OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl);
- void SetText(FX_LPCWSTR text,int32_t charset = DEFAULT_CHARSET,
+ void SetText(const FX_WCHAR* text,int32_t charset = DEFAULT_CHARSET,
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL);
FX_BOOL InsertWord(FX_WORD word, int32_t charset = DEFAULT_CHARSET, const CPVT_WordProps * pWordProps = NULL);
FX_BOOL InsertReturn(const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL);
@@ -626,11 +626,11 @@ public:
FX_BOOL Delete();
FX_BOOL Clear();
FX_BOOL Empty();
- FX_BOOL InsertText(FX_LPCWSTR text, int32_t charset = DEFAULT_CHARSET,
+ FX_BOOL InsertText(const FX_WCHAR* text, int32_t charset = DEFAULT_CHARSET,
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL);
FX_BOOL Redo();
FX_BOOL Undo();
- CPVT_WordPlace DoInsertText(const CPVT_WordPlace& place, FX_LPCWSTR text, int32_t charset,
+ CPVT_WordPlace DoInsertText(const CPVT_WordPlace& place, const FX_WCHAR* text, int32_t charset,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps);
int32_t GetCharSetFromUnicode(FX_WORD word, int32_t nOldCharset);
@@ -679,14 +679,14 @@ private:
void SetContentChanged();
void EnableNotify(FX_BOOL bNotify);
- void SetText(FX_LPCWSTR text,int32_t charset,
+ void SetText(const FX_WCHAR* text,int32_t charset,
const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL InsertWord(FX_WORD word, int32_t charset, const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL InsertReturn(const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL Backspace(FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL Delete(FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL Clear(FX_BOOL bAddUndo, FX_BOOL bPaint);
- FX_BOOL InsertText(FX_LPCWSTR text, int32_t charset,
+ FX_BOOL InsertText(const FX_WCHAR* text, int32_t charset,
const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL SetRichTextProps(EDIT_PROPS_E eProps,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps);
diff --git a/fpdfsdk/include/fxedit/fxet_list.h b/fpdfsdk/include/fxedit/fxet_list.h
index b7888eaf3b..02028f2cff 100644
--- a/fpdfsdk/include/fxedit/fxet_list.h
+++ b/fpdfsdk/include/fxedit/fxet_list.h
@@ -163,7 +163,7 @@ public:
void SetRect(const CLST_Rect & rect);
void SetSelect(FX_BOOL bSelected);
void SetCaret(FX_BOOL bCaret);
- void SetText(FX_LPCWSTR text);
+ void SetText(const FX_WCHAR* text);
void SetFontSize(FX_FLOAT fFontSize);
CFX_WideString GetText() const;
@@ -240,7 +240,7 @@ public:
protected:
virtual void Empty();
- void AddItem(FX_LPCWSTR str);
+ void AddItem(const FX_WCHAR* str);
virtual void ReArrange(int32_t nItemIndex);
virtual CPDF_Rect GetItemRect(int32_t nIndex) const;
@@ -331,7 +331,7 @@ public:
virtual CPDF_Rect GetContentRect() const;
virtual int32_t GetItemIndex(const CPDF_Point & point) const;
- void AddString(FX_LPCWSTR string);
+ void AddString(const FX_WCHAR* string);
void SetTopItem(int32_t nIndex);
void Select(int32_t nItemIndex);
virtual void SetCaret(int32_t nItemIndex);
diff --git a/fpdfsdk/include/javascript/JS_EventHandler.h b/fpdfsdk/include/javascript/JS_EventHandler.h
index d6cdbe81bc..a99030734b 100644
--- a/fpdfsdk/include/javascript/JS_EventHandler.h
+++ b/fpdfsdk/include/javascript/JS_EventHandler.h
@@ -126,8 +126,8 @@ public:
FX_BOOL FieldFull();
FX_BOOL KeyDown();
FX_BOOL Modifier();
- FX_LPCWSTR Name();
- FX_LPCWSTR Type();
+ const FX_WCHAR* Name();
+ const FX_WCHAR* Type();
FX_BOOL& Rc();
int& SelEnd();
int& SelStart();
diff --git a/fpdfsdk/include/javascript/JS_GlobalData.h b/fpdfsdk/include/javascript/JS_GlobalData.h
index 4e1073d15a..fea082d811 100644
--- a/fpdfsdk/include/javascript/JS_GlobalData.h
+++ b/fpdfsdk/include/javascript/JS_GlobalData.h
@@ -66,14 +66,14 @@ public:
virtual ~CJS_GlobalData();
public:
- void SetGlobalVariableNumber(FX_LPCSTR propname, double dData);
- void SetGlobalVariableBoolean(FX_LPCSTR propname, bool bData);
- void SetGlobalVariableString(FX_LPCSTR propname, const CFX_ByteString& sData);
- void SetGlobalVariableObject(FX_LPCSTR propname, const CJS_GlobalVariableArray& array);
- void SetGlobalVariableNull(FX_LPCSTR propname);
-
- FX_BOOL SetGlobalVariablePersistent(FX_LPCSTR propname, FX_BOOL bPersistent);
- FX_BOOL DeleteGlobalVariable(FX_LPCSTR propname);
+ void SetGlobalVariableNumber(const FX_CHAR* propname, double dData);
+ void SetGlobalVariableBoolean(const FX_CHAR* propname, bool bData);
+ void SetGlobalVariableString(const FX_CHAR* propname, const CFX_ByteString& sData);
+ void SetGlobalVariableObject(const FX_CHAR* propname, const CJS_GlobalVariableArray& array);
+ void SetGlobalVariableNull(const FX_CHAR* propname);
+
+ FX_BOOL SetGlobalVariablePersistent(const FX_CHAR* propname, FX_BOOL bPersistent);
+ FX_BOOL DeleteGlobalVariable(const FX_CHAR* propname);
int32_t GetSize() const;
CJS_GlobalData_Element* GetAt(int index) const;
@@ -82,11 +82,11 @@ private:
void LoadGlobalPersistentVariables();
void SaveGlobalPersisitentVariables();
- CJS_GlobalData_Element* GetGlobalVariable(FX_LPCSTR propname);
- int FindGlobalVariable(FX_LPCSTR propname);
+ CJS_GlobalData_Element* GetGlobalVariable(const FX_CHAR* propname);
+ int FindGlobalVariable(const FX_CHAR* propname);
- void LoadFileBuffer(FX_LPCWSTR sFilePath, FX_LPBYTE& pBuffer, int32_t& nLength);
- void WriteFileBuffer(FX_LPCWSTR sFilePath, FX_LPCSTR pBuffer, int32_t nLength);
+ void LoadFileBuffer(const FX_WCHAR* sFilePath, uint8_t*& pBuffer, int32_t& nLength);
+ void WriteFileBuffer(const FX_WCHAR* sFilePath, const FX_CHAR* pBuffer, int32_t nLength);
void MakeByteString(const CFX_ByteString& name, CJS_KeyValue* pData, CFX_BinaryBuf& sData);
private:
diff --git a/fpdfsdk/include/javascript/JS_Object.h b/fpdfsdk/include/javascript/JS_Object.h
index 3b97677fa6..803f6ba35e 100644
--- a/fpdfsdk/include/javascript/JS_Object.h
+++ b/fpdfsdk/include/javascript/JS_Object.h
@@ -32,8 +32,8 @@ public:
operator CJS_Object* (){return m_pJSObject;};
CPDFSDK_PageView * JSGetPageView(IFXJS_Context* cc);
- int MsgBox(CPDFDoc_Environment * pApp, CPDFSDK_PageView* pPageView, FX_LPCWSTR swMsg, FX_LPCWSTR swTitle = NULL, FX_UINT nType = 0, FX_UINT nIcon = 0);
- void Alert(CJS_Context* pContext, FX_LPCWSTR swMsg);
+ int MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView, const FX_WCHAR* swMsg, const FX_WCHAR* swTitle = NULL, FX_UINT nType = 0, FX_UINT nIcon = 0);
+ void Alert(CJS_Context* pContext, const FX_WCHAR* swMsg);
protected:
CJS_Object* m_pJSObject;
@@ -48,7 +48,7 @@ public:
void MakeWeak();
void Dispose();
- virtual FX_BOOL IsType(FX_LPCSTR sClassName){return TRUE;};
+ virtual FX_BOOL IsType(const FX_CHAR* sClassName){return TRUE;};
virtual CFX_ByteString GetClassName(){return "";};
virtual FX_BOOL InitInstance(IFXJS_Context* cc){return TRUE;};
@@ -61,8 +61,8 @@ public:
CJS_EmbedObj * GetEmbedObject(){return m_pEmbedObj;};
static CPDFSDK_PageView * JSGetPageView(IFXJS_Context* cc);
- static int MsgBox(CPDFDoc_Environment * pApp, CPDFSDK_PageView* pPageView, FX_LPCWSTR swMsg, FX_LPCWSTR swTitle = NULL, FX_UINT nType = 0,FX_UINT nIcon = 0);
- static void Alert(CJS_Context* pContext, FX_LPCWSTR swMsg);
+ static int MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView, const FX_WCHAR* swMsg, const FX_WCHAR* swTitle = NULL, FX_UINT nType = 0,FX_UINT nIcon = 0);
+ static void Alert(CJS_Context* pContext, const FX_WCHAR* swMsg);
v8::Isolate* GetIsolate() {return m_pIsolate;}
protected:
diff --git a/fpdfsdk/include/javascript/JS_Value.h b/fpdfsdk/include/javascript/JS_Value.h
index 245b736cdf..4381bd55a6 100644
--- a/fpdfsdk/include/javascript/JS_Value.h
+++ b/fpdfsdk/include/javascript/JS_Value.h
@@ -27,8 +27,8 @@ public:
CJS_Value(v8::Isolate* isolate, JSFXObject);
CJS_Value(v8::Isolate* isolate, CJS_Object*);
CJS_Value(v8::Isolate* isolate, CJS_Document*);
- CJS_Value(v8::Isolate* isolate, FX_LPCSTR pStr);
- CJS_Value(v8::Isolate* isolate, FX_LPCWSTR pWstr);
+ CJS_Value(v8::Isolate* isolate, const FX_CHAR* pStr);
+ CJS_Value(v8::Isolate* isolate, const FX_WCHAR* pWstr);
CJS_Value(v8::Isolate* isolate, CJS_Array& array);
~CJS_Value();
@@ -59,8 +59,8 @@ public:
void operator = (v8::Local<v8::Object>);
void operator = (CJS_Array &);
void operator = (CJS_Date &);
- void operator = (FX_LPCWSTR pWstr);
- void operator = (FX_LPCSTR pStr);
+ void operator = (const FX_WCHAR* pWstr);
+ void operator = (const FX_CHAR* pStr);
void operator = (CJS_Value value);
FX_BOOL IsArrayObject() const;
@@ -111,7 +111,7 @@ public:
void operator>>(CFX_ByteString&) const;
void operator<<(CFX_WideString);
void operator>>(CFX_WideString&) const;
- void operator<<(FX_LPCWSTR c_string);
+ void operator<<(const FX_WCHAR* c_string);
void operator<<(JSFXObject);
void operator>>(JSFXObject&) const;
void operator>>(CJS_Array& array) const;
diff --git a/fpdfsdk/include/javascript/PublicMethods.h b/fpdfsdk/include/javascript/PublicMethods.h
index 375ae1fcfe..ba38503017 100644
--- a/fpdfsdk/include/javascript/PublicMethods.h
+++ b/fpdfsdk/include/javascript/PublicMethods.h
@@ -70,23 +70,23 @@ public:
static CFX_WideString ParseStringString(const CFX_WideString& string, int nStart, int& nSkip);
static double MakeRegularDate(const CFX_WideString & value,const CFX_WideString & format, FX_BOOL& bWrongFormat);
static CFX_WideString MakeFormatDate(double dDate,const CFX_WideString & format);
- static FX_BOOL ConvertStringToNumber(FX_LPCWSTR swSource, double & dRet, FX_BOOL & bDot);
- static double ParseStringToNumber(FX_LPCWSTR swSource);
+ static FX_BOOL ConvertStringToNumber(const FX_WCHAR* swSource, double & dRet, FX_BOOL & bDot);
+ static double ParseStringToNumber(const FX_WCHAR* swSource);
static double ParseNormalDate(const CFX_WideString & value, FX_BOOL& bWrongFormat);
static double MakeInterDate(CFX_WideString strValue);
- static double ParseNumber(FX_LPCWSTR swSource, FX_BOOL& bAllDigits, FX_BOOL& bDot, FX_BOOL& bSign, FX_BOOL& bKXJS);
+ static double ParseNumber(const FX_WCHAR* swSource, FX_BOOL& bAllDigits, FX_BOOL& bDot, FX_BOOL& bSign, FX_BOOL& bKXJS);
public:
- static CFX_WideString StrLTrim(FX_LPCWSTR pStr);
- static CFX_WideString StrRTrim(FX_LPCWSTR pStr);
- static CFX_WideString StrTrim(FX_LPCWSTR pStr);
+ static CFX_WideString StrLTrim(const FX_WCHAR* pStr);
+ static CFX_WideString StrRTrim(const FX_WCHAR* pStr);
+ static CFX_WideString StrTrim(const FX_WCHAR* pStr);
- static CFX_ByteString StrLTrim(FX_LPCSTR pStr);
- static CFX_ByteString StrRTrim(FX_LPCSTR pStr);
- static CFX_ByteString StrTrim(FX_LPCSTR pStr);
+ static CFX_ByteString StrLTrim(const FX_CHAR* pStr);
+ static CFX_ByteString StrRTrim(const FX_CHAR* pStr);
+ static CFX_ByteString StrTrim(const FX_CHAR* pStr);
- static FX_BOOL IsNumber(FX_LPCSTR string);
- static FX_BOOL IsNumber(FX_LPCWSTR string);
+ static FX_BOOL IsNumber(const FX_CHAR* string);
+ static FX_BOOL IsNumber(const FX_WCHAR* string);
static FX_BOOL IsDigit(char ch);
static FX_BOOL IsDigit(wchar_t ch);
@@ -96,7 +96,7 @@ public:
static FX_BOOL maskSatisfied(wchar_t c_Change,wchar_t c_Mask);
static FX_BOOL isReservedMaskChar(wchar_t ch);
- static double AF_Simple(FX_LPCWSTR sFuction, double dValue1, double dValue2);
+ static double AF_Simple(const FX_WCHAR* sFuction, double dValue1, double dValue2);
static CJS_Array AF_MakeArrayFromList(v8::Isolate* isolate, CJS_Value val);
};
diff --git a/fpdfsdk/include/javascript/global.h b/fpdfsdk/include/javascript/global.h
index fac93d8e5b..3c8972c67c 100644
--- a/fpdfsdk/include/javascript/global.h
+++ b/fpdfsdk/include/javascript/global.h
@@ -48,9 +48,9 @@ public:
FX_BOOL setPersistent(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
public:
- FX_BOOL QueryProperty(FX_LPCWSTR propname);
- FX_BOOL DoProperty(IFXJS_Context* cc, FX_LPCWSTR propname, CJS_PropValue & vp, CFX_WideString & sError);
- FX_BOOL DelProperty(IFXJS_Context* cc, FX_LPCWSTR propname, CFX_WideString & sError);
+ FX_BOOL QueryProperty(const FX_WCHAR* propname);
+ FX_BOOL DoProperty(IFXJS_Context* cc, const FX_WCHAR* propname, CJS_PropValue & vp, CFX_WideString & sError);
+ FX_BOOL DelProperty(IFXJS_Context* cc, const FX_WCHAR* propname, CFX_WideString & sError);
void Initial(CPDFDoc_Environment* pApp);
@@ -58,7 +58,7 @@ private:
void UpdateGlobalPersistentVariables();
void CommitGlobalPersisitentVariables();
void DestroyGlobalPersisitentVariables();
- FX_BOOL SetGlobalVariables(FX_LPCSTR propname, int nType,
+ FX_BOOL SetGlobalVariables(const FX_CHAR* propname, int nType,
double dData, bool bData, const CFX_ByteString& sData, JSObject pData, bool bDefaultPersistent);
void ObjectToArray(v8::Local<v8::Object> pObj, CJS_GlobalVariableArray& array);
diff --git a/fpdfsdk/include/pdfwindow/PWL_ComboBox.h b/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
index 7abdeeffce..b82330c6b9 100644
--- a/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
+++ b/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
@@ -77,9 +77,9 @@ public:
void SetFillerNotify(IPWL_Filler_Notify* pNotify);
CFX_WideString GetText() const;
- void SetText(FX_LPCWSTR text);
+ void SetText(const FX_WCHAR* text);
- void AddString(FX_LPCWSTR string);
+ void AddString(const FX_WCHAR* string);
int32_t GetSelect() const;
void SetSelect(int32_t nItemIndex);
diff --git a/fpdfsdk/include/pdfwindow/PWL_Edit.h b/fpdfsdk/include/pdfwindow/PWL_Edit.h
index 93db6f09bd..81500e90ad 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Edit.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Edit.h
@@ -81,8 +81,8 @@ public:
virtual void PasteText();
virtual void CutText();
- virtual void SetText(FX_LPCWSTR csText);
- void ReplaceSel(FX_LPCWSTR csText);
+ virtual void SetText(const FX_WCHAR* csText);
+ void ReplaceSel(const FX_WCHAR* csText);
CFX_ByteString GetTextAppearanceStream(const CPDF_Point & ptOffset) const;
CFX_ByteString GetCaretAppearanceStream(const CPDF_Point & ptOffset) const;
diff --git a/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h b/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h
index 2eb779ddc8..bfa1868b9e 100644
--- a/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h
+++ b/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h
@@ -81,7 +81,7 @@ public:
virtual FX_FLOAT GetFontSize() const;
public:
- virtual void SetText(FX_LPCWSTR csText);
+ virtual void SetText(const FX_WCHAR* csText);
virtual void CopyText();
virtual void PasteText();
@@ -131,7 +131,7 @@ protected:
virtual void InsertWord(FX_WORD word, int32_t nCharset);
virtual void InsertReturn();
- virtual void InsertText(FX_LPCWSTR csText);
+ virtual void InsertText(const FX_WCHAR* csText);
virtual void SetCursor();
FX_BOOL IsWndHorV();
diff --git a/fpdfsdk/include/pdfwindow/PWL_FontMap.h b/fpdfsdk/include/pdfwindow/PWL_FontMap.h
index 4f44660cb2..f83575b66f 100644
--- a/fpdfsdk/include/pdfwindow/PWL_FontMap.h
+++ b/fpdfsdk/include/pdfwindow/PWL_FontMap.h
@@ -72,7 +72,7 @@ public:
virtual int32_t CharSetFromUnicode(FX_WORD word, int32_t nOldCharset);
public:
- virtual void Initial(FX_LPCSTR fontname = NULL);
+ virtual void Initial(const FX_CHAR* fontname = NULL);
void SetSystemHandler(IFX_SystemHandler* pSystemHandler);
int32_t GetFontMapCount() const;
diff --git a/fpdfsdk/include/pdfwindow/PWL_Icon.h b/fpdfsdk/include/pdfwindow/PWL_Icon.h
index c09f7a9fe8..1a2adf6469 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Icon.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Icon.h
@@ -27,7 +27,7 @@ public:
void GetImageSize(FX_FLOAT & fWidth,FX_FLOAT & fHeight);
CPDF_Matrix GetImageMatrix();
CFX_ByteString GetImageAlias();
- void SetImageAlias(FX_LPCSTR sImageAlias);
+ void SetImageAlias(const FX_CHAR* sImageAlias);
protected:
CPDF_Stream* m_pPDFStream;
diff --git a/fpdfsdk/include/pdfwindow/PWL_Label.h b/fpdfsdk/include/pdfwindow/PWL_Label.h
index be083db486..6d9754dd80 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Label.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Label.h
@@ -21,7 +21,7 @@ public:
virtual void SetFontSize(FX_FLOAT fFontSize);
virtual FX_FLOAT GetFontSize() const;
- void SetText(FX_LPCWSTR csText);
+ void SetText(const FX_WCHAR* csText);
CFX_WideString GetText() const;
void SetLimitChar(int32_t nLimitChar);
void SetHorzScale(int32_t nHorzScale);
diff --git a/fpdfsdk/include/pdfwindow/PWL_ListBox.h b/fpdfsdk/include/pdfwindow/PWL_ListBox.h
index c5a6df76dd..bbb9f35125 100644
--- a/fpdfsdk/include/pdfwindow/PWL_ListBox.h
+++ b/fpdfsdk/include/pdfwindow/PWL_ListBox.h
@@ -59,7 +59,7 @@ public:
virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
virtual void RePosChildWnd();
- virtual void SetText(FX_LPCWSTR csText,FX_BOOL bRefresh = TRUE);
+ virtual void SetText(const FX_WCHAR* csText,FX_BOOL bRefresh = TRUE);
virtual CFX_WideString GetText() const;
virtual CPDF_Rect GetFocusRect() const;
virtual void SetFontSize(FX_FLOAT fFontSize);
@@ -67,7 +67,7 @@ public:
void OnNotifySelChanged(FX_BOOL bKeyDown, FX_BOOL & bExit , FX_DWORD nFlag);
- void AddString(FX_LPCWSTR string);
+ void AddString(const FX_WCHAR* string);
void SetTopVisibleIndex(int32_t nItemIndex);
void ScrollToListItem(int32_t nItemIndex);
void ResetContent();
diff --git a/fpdfsdk/include/pdfwindow/PWL_Note.h b/fpdfsdk/include/pdfwindow/PWL_Note.h
index a9e6dda05b..ee6ec6ff02 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Note.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Note.h
@@ -145,7 +145,7 @@ public:
FX_FLOAT GetItemLeftMargin();
FX_FLOAT GetItemRightMargin();
- virtual void SetText(FX_LPCWSTR csText);
+ virtual void SetText(const FX_WCHAR* csText);
protected:
virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
diff --git a/fpdfsdk/include/pdfwindow/PWL_Signature.h b/fpdfsdk/include/pdfwindow/PWL_Signature.h
index bdc1406a3d..be5ec58d1f 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Signature.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Signature.h
@@ -38,10 +38,10 @@ public:
CPWL_Signature();
virtual ~CPWL_Signature();
- void SetText(FX_LPCWSTR sText);
- void SetDescription(FX_LPCWSTR string);
+ void SetText(const FX_WCHAR* sText);
+ void SetDescription(const FX_WCHAR* string);
void SetImage(CFX_DIBSource* pImage);
- void SetImageStream(CPDF_Stream * pStream, FX_LPCSTR sImageAlias);
+ void SetImageStream(CPDF_Stream * pStream, const FX_CHAR* sImageAlias);
void SetTextFlag(FX_BOOL bTextExist);
void SetImageFlag(FX_BOOL bImageExist);
diff --git a/fpdfsdk/include/pdfwindow/PWL_Wnd.h b/fpdfsdk/include/pdfwindow/PWL_Wnd.h
index 970480f14a..9f089e6fa4 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Wnd.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Wnd.h
@@ -173,8 +173,8 @@ class IPWL_SpellCheck
{
public:
virtual ~IPWL_SpellCheck() { }
- virtual FX_BOOL CheckWord(FX_LPCSTR sWord) = 0;
- virtual void SuggestWords(FX_LPCSTR sWord, CFX_ByteStringArray & sSuggest) = 0;
+ virtual FX_BOOL CheckWord(const FX_CHAR* sWord) = 0;
+ virtual void SuggestWords(const FX_CHAR* sWord, CFX_ByteStringArray & sSuggest) = 0;
};
class IPWL_Provider
diff --git a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
index d73fbf45b0..abe30d85af 100644
--- a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
+++ b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
@@ -43,7 +43,7 @@ void CBA_FontMap::Reset()
m_sDefaultFontName = "";
}
-void CBA_FontMap::Initial(FX_LPCSTR fontname)
+void CBA_FontMap::Initial(const FX_CHAR* fontname)
{
int32_t nCharset = DEFAULT_CHARSET;
diff --git a/fpdfsdk/src/fpdf_dataavail.cpp b/fpdfsdk/src/fpdf_dataavail.cpp
index a87ebecf90..d0f0a4ac90 100644
--- a/fpdfsdk/src/fpdf_dataavail.cpp
+++ b/fpdfsdk/src/fpdf_dataavail.cpp
@@ -53,7 +53,7 @@ public:
virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size)
{
- return m_pFileAccess->m_GetBlock(m_pFileAccess->m_Param, offset, (FX_LPBYTE)buffer, size);
+ return m_pFileAccess->m_GetBlock(m_pFileAccess->m_Param, offset, (uint8_t*)buffer, size);
}
virtual void Release()
diff --git a/fpdfsdk/src/fpdf_ext.cpp b/fpdfsdk/src/fpdf_ext.cpp
index 6d846dfb67..c258b93c7d 100644
--- a/fpdfsdk/src/fpdf_ext.cpp
+++ b/fpdfsdk/src/fpdf_ext.cpp
@@ -29,7 +29,7 @@ void CFSDK_UnsupportInfo_Adapter::ReportError(int nErrorType)
}
}
-void FreeUnsupportInfo(FX_LPVOID pData)
+void FreeUnsupportInfo(void* pData)
{
CFSDK_UnsupportInfo_Adapter * pAdapter = (CFSDK_UnsupportInfo_Adapter *)pData;
delete pAdapter;
diff --git a/fpdfsdk/src/fpdf_flatten.cpp b/fpdfsdk/src/fpdf_flatten.cpp
index 3dd768742f..742aeda72f 100644
--- a/fpdfsdk/src/fpdf_flatten.cpp
+++ b/fpdfsdk/src/fpdf_flatten.cpp
@@ -220,7 +220,7 @@ void SetPageContents(CFX_ByteString key, CPDF_Dictionary* pPage, CPDF_Document*
CFX_ByteString sStream;
sStream.Format("q 1 0 0 1 0 0 cm /%s Do Q", key.c_str());
- pNewContents->SetData((FX_LPCBYTE)sStream, sStream.GetLength(), FALSE, FALSE);
+ pNewContents->SetData((const uint8_t*)sStream, sStream.GetLength(), FALSE, FALSE);
}
return;
}
@@ -238,9 +238,9 @@ void SetPageContents(CFX_ByteString key, CPDF_Dictionary* pPage, CPDF_Document*
CPDF_StreamAcc acc;
acc.LoadAllData(pContents);
CFX_ByteString sStream = "q\n";
- CFX_ByteString sBody = CFX_ByteString((FX_LPCSTR)acc.GetData(), acc.GetSize());
+ CFX_ByteString sBody = CFX_ByteString((const FX_CHAR*)acc.GetData(), acc.GetSize());
sStream = sStream + sBody + "\nQ";
- pContents->SetData((FX_LPCBYTE)sStream, sStream.GetLength(), FALSE, FALSE);
+ pContents->SetData((const uint8_t*)sStream, sStream.GetLength(), FALSE, FALSE);
pContentsArray->AddReference(pDocument, dwObjNum);
break;
}
@@ -267,7 +267,7 @@ void SetPageContents(CFX_ByteString key, CPDF_Dictionary* pPage, CPDF_Document*
CFX_ByteString sStream;
sStream.Format("q 1 0 0 1 0 0 cm /%s Do Q", key.c_str());
- pNewContents->SetData((FX_LPCBYTE)sStream, sStream.GetLength(), FALSE, FALSE);
+ pNewContents->SetData((const uint8_t*)sStream, sStream.GetLength(), FALSE, FALSE);
}
}
@@ -529,7 +529,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten( FPDF_PAGE page, int nFlag)
CPDF_StreamAcc acc;
acc.LoadAllData(pNewXObject);
- FX_LPCBYTE pData = acc.GetData();
+ const uint8_t* pData = acc.GetData();
CFX_ByteString sStream(pData, acc.GetSize());
CFX_ByteString sTemp;
@@ -547,7 +547,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten( FPDF_PAGE page, int nFlag)
sTemp.Format("q %f 0 0 %f %f %f cm /%s Do Q\n", m.a, m.d, m.e, m.f, sFormName.c_str());
sStream += sTemp;
- pNewXObject->SetData((FX_LPCBYTE)sStream, sStream.GetLength(), FALSE, FALSE);
+ pNewXObject->SetData((const uint8_t*)sStream, sStream.GetLength(), FALSE, FALSE);
}
pPageDict->RemoveAt( "Annots" );
diff --git a/fpdfsdk/src/fpdf_sysfontinfo.cpp b/fpdfsdk/src/fpdf_sysfontinfo.cpp
index 4d77794768..c1c6417ca6 100644
--- a/fpdfsdk/src/fpdf_sysfontinfo.cpp
+++ b/fpdfsdk/src/fpdf_sysfontinfo.cpp
@@ -29,21 +29,21 @@ public:
return FALSE;
}
- virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR family, FX_BOOL& bExact) override
+ virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* family, FX_BOOL& bExact) override
{
if (m_pInfo->MapFont)
return m_pInfo->MapFont(m_pInfo, weight, bItalic, charset, pitch_family, family, &bExact);
return NULL;
}
- virtual void* GetFont(FX_LPCSTR family) override
+ virtual void* GetFont(const FX_CHAR* family) override
{
if (m_pInfo->GetFont)
return m_pInfo->GetFont(m_pInfo, family);
return NULL;
}
- virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, FX_LPBYTE buffer, FX_DWORD size) override
+ virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer, FX_DWORD size) override
{
if (m_pInfo->GetFontData)
return m_pInfo->GetFontData(m_pInfo, hFont, table, buffer, size);
diff --git a/fpdfsdk/src/fpdf_transformpage.cpp b/fpdfsdk/src/fpdf_transformpage.cpp
index 592b5f4e64..a6caf78e6e 100644
--- a/fpdfsdk/src/fpdf_transformpage.cpp
+++ b/fpdfsdk/src/fpdf_transformpage.cpp
@@ -119,9 +119,9 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page, FS_MATRIX
return FALSE;
pDoc->AddIndirectObject(pStream);
- pDic = FX_NEW CPDF_Dictionary;
- CPDF_Stream* pEndStream = FX_NEW CPDF_Stream(NULL,0, pDic);
- pEndStream->SetData((FX_LPCBYTE)" Q", 2, FALSE, FALSE);
+ pDic = new CPDF_Dictionary;
+ CPDF_Stream* pEndStream = new CPDF_Stream(NULL,0, pDic);
+ pEndStream->SetData((const uint8_t*)" Q", 2, FALSE, FALSE);
pDoc->AddIndirectObject(pEndStream);
CPDF_Array* pContentArray = NULL;
diff --git a/fpdfsdk/src/fpdfdoc.cpp b/fpdfsdk/src/fpdfdoc.cpp
index d662699dbf..e874e815e1 100644
--- a/fpdfsdk/src/fpdfdoc.cpp
+++ b/fpdfsdk/src/fpdfdoc.cpp
@@ -161,7 +161,7 @@ DLLEXPORT unsigned long STDCALL FPDFDest_GetPageIndex(FPDF_DOCUMENT document, FP
return dest.GetPageIndex(pDoc);
}
-static void ReleaseLinkList(FX_LPVOID data)
+static void ReleaseLinkList(void* data)
{
delete (CPDF_LinkList*)data;
}
diff --git a/fpdfsdk/src/fpdfformfill.cpp b/fpdfsdk/src/fpdfformfill.cpp
index 0ae2237d29..e4b7de4426 100644
--- a/fpdfsdk/src/fpdfformfill.cpp
+++ b/fpdfsdk/src/fpdfformfill.cpp
@@ -529,7 +529,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDF_StringHandleGetStringByIndex(FPDF_STRINGHANDLE
int real_size = len < *size ? len : *size;
if (real_size > 0)
- FXSYS_memcpy((void*)bsText, (FX_LPCSTR)(sSuggestWords[index]), real_size);
+ FXSYS_memcpy((void*)bsText, (const FX_CHAR*)(sSuggestWords[index]), real_size);
*size = real_size;
return TRUE;
diff --git a/fpdfsdk/src/fpdfppo.cpp b/fpdfsdk/src/fpdfppo.cpp
index 5c66e4bb69..3e8de3fe42 100644
--- a/fpdfsdk/src/fpdfppo.cpp
+++ b/fpdfsdk/src/fpdfppo.cpp
@@ -179,7 +179,7 @@ FX_BOOL CPDF_PageOrganizer::ExportPage(CPDF_Document *pSrcPDFDoc, CFX_WordArray*
FX_DWORD dwOldPageObj = pSrcPageDict->GetObjNum();
FX_DWORD dwNewPageObj = pCurPageDict->GetObjNum();
- pMapPtrToPtr->SetAt((FX_LPVOID)(uintptr_t)dwOldPageObj, (FX_LPVOID)(uintptr_t)dwNewPageObj);
+ pMapPtrToPtr->SetAt((void*)(uintptr_t)dwOldPageObj, (void*)(uintptr_t)dwNewPageObj);
this->UpdateReference(pCurPageDict, pDestPDFDoc, pMapPtrToPtr);
curpage++;
@@ -302,7 +302,7 @@ int CPDF_PageOrganizer::GetNewObjId(CPDF_Document *pDoc, CFX_MapPtrToPtr* pMapPt
size_t dwNewObjNum = 0;
- pMapPtrToPtr->Lookup((FX_LPVOID)dwObjnum, (FX_LPVOID&)dwNewObjNum);
+ pMapPtrToPtr->Lookup((void*)dwObjnum, (void*&)dwNewObjNum);
if(dwNewObjNum)
{
return (int)dwNewObjNum;
@@ -340,7 +340,7 @@ int CPDF_PageOrganizer::GetNewObjId(CPDF_Document *pDoc, CFX_MapPtrToPtr* pMapPt
}
}
dwNewObjNum = pDoc->AddIndirectObject(pClone);//, onum, gnum);
- pMapPtrToPtr->SetAt((FX_LPVOID)dwObjnum, (FX_LPVOID)dwNewObjNum);
+ pMapPtrToPtr->SetAt((void*)dwObjnum, (void*)dwNewObjNum);
if(!UpdateReference(pClone, pDoc, pMapPtrToPtr))
{
diff --git a/fpdfsdk/src/fpdfsave.cpp b/fpdfsdk/src/fpdfsave.cpp
index db9e289d9e..34cf381555 100644
--- a/fpdfsdk/src/fpdfsave.cpp
+++ b/fpdfsdk/src/fpdfsave.cpp
@@ -124,7 +124,7 @@ FX_BOOL _SaveXFADocumentData(CPDFXFA_Document* pDocument, CFX_PtrArray& fileList
CPDF_Stream *pTemplateStream = pArray->GetStream(iTemplate);
CPDF_StreamAcc streamAcc;
streamAcc.LoadAllData(pTemplateStream);
- FX_LPBYTE pData = (FX_LPBYTE)streamAcc.GetData();
+ uint8_t* pData = (uint8_t*)streamAcc.GetData();
FX_DWORD dwSize2 = streamAcc.GetSize();
IFX_FileStream *pTemplate = FX_CreateMemoryStream(pData, dwSize2);
pContext->UpdateChecksum((IFX_FileRead*)pTemplate);
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index fa6bb2ef53..a86d54f3af 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -120,7 +120,7 @@ FX_BOOL CPDF_CustomAccess::GetByte(FX_DWORD pos, uint8_t& ch)
return TRUE;
}
-FX_BOOL CPDF_CustomAccess::GetBlock(FX_DWORD pos, FX_LPBYTE pBuf, FX_DWORD size)
+FX_BOOL CPDF_CustomAccess::GetBlock(FX_DWORD pos, uint8_t* pBuf, FX_DWORD size)
{
if (pos + size > m_FileAccess.m_FileLen) return FALSE;
return m_FileAccess.m_GetBlock(m_FileAccess.m_Param, pos, pBuf, size);
@@ -136,7 +136,7 @@ FX_BOOL CPDF_CustomAccess::ReadBlock(void* buffer, FX_FILESIZE offset, size_t si
if (!newPos.IsValid() || newPos.ValueOrDie() > m_FileAccess.m_FileLen) {
return FALSE;
}
- return m_FileAccess.m_GetBlock(m_FileAccess.m_Param, offset,(FX_LPBYTE) buffer, size);
+ return m_FileAccess.m_GetBlock(m_FileAccess.m_Param, offset,(uint8_t*) buffer, size);
}
//0 bit: FPDF_POLICY_MACHINETIME_ACCESS
@@ -245,7 +245,7 @@ DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadDocument(FPDF_STRING file_path, FPDF_BY
CPDF_Parser* pParser = FX_NEW CPDF_Parser;
pParser->SetPassword(password);
- FX_DWORD err_code = pParser->StartParse((FX_LPCSTR)file_path);
+ FX_DWORD err_code = pParser->StartParse((const FX_CHAR*)file_path);
if (err_code) {
delete pParser;
ProcessParseError(err_code);
@@ -560,9 +560,9 @@ DLLEXPORT void STDCALL FPDF_RenderPage(HDC dc, FPDF_PAGE page, int start_x, int
#endif
// Create a device with this external buffer
- pContext->m_pBitmap = FX_NEW CFX_DIBitmap;
- pContext->m_pBitmap->Create(width, height, FXDIB_Rgb, (FX_LPBYTE)pBuffer);
- pContext->m_pDevice = FX_NEW CPDF_FxgeDevice;
+ pContext->m_pBitmap = new CFX_DIBitmap;
+ pContext->m_pBitmap->Create(width, height, FXDIB_Rgb, (uint8_t*)pBuffer);
+ pContext->m_pDevice = new CPDF_FxgeDevice;
((CPDF_FxgeDevice*)pContext->m_pDevice)->Attach(pContext->m_pBitmap);
#ifdef DEBUG_TRACE
@@ -649,15 +649,9 @@ DLLEXPORT void STDCALL FPDF_RenderPageBitmap(FPDF_BITMAP bitmap, FPDF_PAGE page,
DLLEXPORT void STDCALL FPDF_ClosePage(FPDF_PAGE page)
{
if (!page) return;
+
CPDFXFA_Page* pPage = (CPDFXFA_Page*)page;
-
pPage->Release();
-// CPDFXFA_Document* pDoc = pPage->GetDocument();
-// if (pDoc) {
-// pDoc->RemovePage(pPage);
-// }
-// delete (CPDFXFA_Page*)page;
-
}
DLLEXPORT void STDCALL FPDF_CloseDocument(FPDF_DOCUMENT document)
@@ -727,8 +721,8 @@ DLLEXPORT FPDF_BITMAP STDCALL FPDFBitmap_CreateEx(int width, int height, int for
default:
return NULL;
}
- CFX_DIBitmap* pBitmap = FX_NEW CFX_DIBitmap;
- pBitmap->Create(width, height, fx_format, (FX_LPBYTE)first_scan, stride);
+ CFX_DIBitmap* pBitmap = new CFX_DIBitmap;
+ pBitmap->Create(width, height, fx_format, (uint8_t*)first_scan, stride);
return pBitmap;
}
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
index 106e3cbc12..c1f402e393 100644
--- a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
+++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
@@ -573,7 +573,7 @@ void CPDFXFA_Document::PageViewEvent(IXFA_PageView* pPageView, FX_DWORD dwFlags)
}
}
-void CPDFXFA_Document::WidgetEvent(IXFA_Widget* hWidget, CXFA_WidgetAcc* pWidgetData, FX_DWORD dwEvent, FX_LPVOID pParam, FX_LPVOID pAdditional)
+void CPDFXFA_Document::WidgetEvent(IXFA_Widget* hWidget, CXFA_WidgetAcc* pWidgetData, FX_DWORD dwEvent, void* pParam, void* pAdditional)
{
if (m_iDocType != DOCTYPE_DYNIMIC_XFA || NULL == hWidget)
return;
@@ -745,7 +745,7 @@ void CPDFXFA_Document::ExportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath, FX_BOOL bX
if (fileType == FXFA_SAVEAS_XML)
{
content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n";
- fileWrite.WriteBlock((FX_LPCSTR)content, fileWrite.GetSize(), content.GetLength());
+ fileWrite.WriteBlock((const FX_CHAR*)content, fileWrite.GetSize(), content.GetLength());
CFX_WideStringC data(L"data");
if( pXFADocHander->SavePackage(m_pXFADocView->GetDoc(),data, &fileWrite))
{
@@ -755,7 +755,7 @@ void CPDFXFA_Document::ExportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath, FX_BOOL bX
/*else if (fileType == FXFA_FILE_STATIC_XDP)
{
content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n";
- fileWrite.WriteBlock((FX_LPCSTR)content, fileWrite.GetSize(), content.GetLength());
+ fileWrite.WriteBlock((const FX_CHAR*)content, fileWrite.GetSize(), content.GetLength());
CFX_WideStringC data(L"data");
if( pXFADocHander->SavePackage(m_pXFADocView->GetDoc(), data, &fileWrite))
{
@@ -766,8 +766,8 @@ void CPDFXFA_Document::ExportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath, FX_BOOL bX
// wPath.FromUTF16LE(filePath);
CFX_ByteString bPath = wPath.UTF8Encode();
CFX_ByteString szFormat = "\n<pdf href=\"%s\" xmlns=\"http://ns.adobe.com/xdp/pdf/\"/>";
- content.Format(szFormat,(char*)(FX_LPCSTR)bPath);
- fileWrite.WriteBlock((FX_LPCSTR)content,fileWrite.GetSize(), content.GetLength());
+ content.Format(szFormat,(char*)(const FX_CHAR*)bPath);
+ fileWrite.WriteBlock((const FX_CHAR*)content,fileWrite.GetSize(), content.GetLength());
}
*/
else if (fileType == FXFA_SAVEAS_XDP)
@@ -817,11 +817,11 @@ void CPDFXFA_Document::ExportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath, FX_BOOL bX
if (i == size-1)
{
//CFX_WideString wPath = pEnv->FFI_GetFilePath(pFileHandler);
- CFX_WideString wPath = CFX_WideString::FromUTF16LE((unsigned short*)(FX_LPCSTR)bs, bs.GetLength()/sizeof(unsigned short));
+ CFX_WideString wPath = CFX_WideString::FromUTF16LE((unsigned short*)(const FX_CHAR*)bs, bs.GetLength()/sizeof(unsigned short));
CFX_ByteString bPath = wPath.UTF8Encode();
CFX_ByteString szFormat = "\n<pdf href=\"%s\" xmlns=\"http://ns.adobe.com/xdp/pdf/\"/>";
- content.Format(szFormat,(char*)(FX_LPCSTR)bPath);
- fileWrite.WriteBlock((FX_LPCSTR)content,fileWrite.GetSize(), content.GetLength());
+ content.Format(szFormat,(char*)(const FX_CHAR*)bPath);
+ fileWrite.WriteBlock((const FX_CHAR*)content,fileWrite.GetSize(), content.GetLength());
}
CPDF_Stream* pStream = (CPDF_Stream*)pDirectObj;
@@ -1085,7 +1085,7 @@ FX_BOOL CPDFXFA_Document::_ExportSubmitFile(FPDF_FILEHANDLER* pFileHandler, int
CFX_WideString ws;
ws.FromLocal("data");
CFX_ByteString content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n";
- fileStream.WriteBlock((FX_LPCSTR)content,0,content.GetLength());
+ fileStream.WriteBlock((const FX_CHAR*)content,0,content.GetLength());
pDocHandler->SavePackage(m_pXFADoc, ws, &fileStream);
}
else if (fileType == FXFA_SAVEAS_XDP)
diff --git a/fpdfsdk/src/fsdk_actionhandler.cpp b/fpdfsdk/src/fsdk_actionhandler.cpp
index 25f39ff8c7..d4276866d3 100644
--- a/fpdfsdk/src/fsdk_actionhandler.cpp
+++ b/fpdfsdk/src/fsdk_actionhandler.cpp
@@ -599,8 +599,9 @@ void CPDFSDK_ActionHandler::DoAction_URI(CPDFSDK_Document* pDocument, const CPDF
CPDFDoc_Environment* pApp = pDocument->GetEnv();
ASSERT(pApp != NULL);
+
CFX_ByteString sURI = action.GetURI(pDocument->GetDocument()->GetPDFDoc());
- pApp->FFI_DoURIAction(FX_LPCSTR(sURI));
+ pApp->FFI_DoURIAction(sURI.c_str());
}
void CPDFSDK_ActionHandler::DoAction_Named(CPDFSDK_Document* pDocument, const CPDF_Action& action)
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index 5f9df4852b..037339f4ff 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -986,7 +986,7 @@ void CPDFSDK_Widget::ResetAppearance(FX_BOOL bValueChanged)
}
}
-void CPDFSDK_Widget::ResetAppearance(FX_LPCWSTR sValue, FX_BOOL bValueChanged)
+void CPDFSDK_Widget::ResetAppearance(const FX_WCHAR* sValue, FX_BOOL bValueChanged)
{
SetAppModified();
@@ -1661,7 +1661,7 @@ void CPDFSDK_Widget::ResetAppearance_RadioButton()
SetAppState("Off");
}
-void CPDFSDK_Widget::ResetAppearance_ComboBox(FX_LPCWSTR sValue)
+void CPDFSDK_Widget::ResetAppearance_ComboBox(const FX_WCHAR* sValue)
{
CPDF_FormControl* pControl = GetFormControl();
ASSERT(pControl != NULL);
@@ -1835,7 +1835,7 @@ void CPDFSDK_Widget::ResetAppearance_ListBox()
WriteAppearance("N", GetRotatedRect(), GetMatrix(), sAP);
}
-void CPDFSDK_Widget::ResetAppearance_TextField(FX_LPCWSTR sValue)
+void CPDFSDK_Widget::ResetAppearance_TextField(const FX_WCHAR* sValue)
{
CPDF_FormControl* pControl = GetFormControl();
ASSERT(pControl != NULL);
@@ -2810,7 +2810,7 @@ CFX_WideString CPDFSDK_InterForm::OnFormat(CPDF_FormField* pFormField, int nComm
return sValue;
}
-void CPDFSDK_InterForm::ResetFieldAppearance(CPDF_FormField* pFormField, FX_LPCWSTR sValue, FX_BOOL bValueChanged)
+void CPDFSDK_InterForm::ResetFieldAppearance(CPDF_FormField* pFormField, const FX_WCHAR* sValue, FX_BOOL bValueChanged)
{
ASSERT(pFormField != NULL);
@@ -3023,7 +3023,7 @@ FX_BOOL CPDFSDK_InterForm::SubmitFields(const CFX_WideString& csDestination, con
CFX_ByteTextBuf textBuf;
ExportFieldsToFDFTextBuf(fields, bIncludeOrExclude, textBuf);
- FX_LPBYTE pBuffer = textBuf.GetBuffer();
+ uint8_t* pBuffer = textBuf.GetBuffer();
FX_STRSIZE nBufSize = textBuf.GetLength();
if (bUrlEncoded)
@@ -3078,7 +3078,7 @@ FX_BOOL CPDFSDK_InterForm::FDFToURLEncodedData(CFX_WideString csFDFFile, CFX_Wid
return TRUE;
}
-FX_BOOL CPDFSDK_InterForm::FDFToURLEncodedData(FX_LPBYTE& pBuf, FX_STRSIZE& nBufSize)
+FX_BOOL CPDFSDK_InterForm::FDFToURLEncodedData(uint8_t*& pBuf, FX_STRSIZE& nBufSize)
{
CFDF_Document* pFDF = CFDF_Document::ParseMemory(pBuf, nBufSize);
if (pFDF)
@@ -3178,7 +3178,7 @@ FX_BOOL CPDFSDK_InterForm::SubmitForm(const CFX_WideString& sDestination, FX_BOO
delete pFDFDoc;
if (!bRet) return FALSE;
- FX_LPBYTE pBuffer = FdfBuffer.GetBuffer();
+ uint8_t* pBuffer = FdfBuffer.GetBuffer();
FX_STRSIZE nBufSize = FdfBuffer.GetLength();
if (bUrlEncoded)
diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp
index dc454ee160..4f457bd86a 100644
--- a/fpdfsdk/src/fsdk_mgr.cpp
+++ b/fpdfsdk/src/fsdk_mgr.cpp
@@ -614,7 +614,6 @@ CPDFSDK_PageView::CPDFSDK_PageView(CPDFSDK_Document* pSDKDoc,CPDFXFA_Page* page)
if (page->GetPDFPage())
pPDFInterForm->FixPageFields(page->GetPDFPage());
}
-
m_fxAnnotArray.RemoveAll();
m_bEnterWidget = FALSE;
@@ -838,7 +837,7 @@ CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(CPDF_Dictionary * pDict)
return NULL;
}
-CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(FX_LPCSTR lpSubType,CPDF_Dictionary * pDict)
+CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(const FX_CHAR* lpSubType,CPDF_Dictionary * pDict)
{
return NULL;
}
@@ -1211,7 +1210,7 @@ int CPDFSDK_PageView::GetPageIndex()
return -1;
}
-FX_BOOL CPDFSDK_PageView::IsValidAnnot(FX_LPVOID p)
+FX_BOOL CPDFSDK_PageView::IsValidAnnot(void* p)
{
if (p == NULL) return FALSE;
int iCount = m_pAnnotList->Count();
diff --git a/fpdfsdk/src/fxedit/fxet_edit.cpp b/fpdfsdk/src/fxedit/fxet_edit.cpp
index 9415cefbe3..b45fc69780 100644
--- a/fpdfsdk/src/fxedit/fxet_edit.cpp
+++ b/fpdfsdk/src/fxedit/fxet_edit.cpp
@@ -1921,7 +1921,7 @@ FX_BOOL CFX_Edit::SetWordProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place
return FALSE;
}
-void CFX_Edit::SetText(FX_LPCWSTR text,int32_t charset /*= DEFAULT_CHARSET*/,
+void CFX_Edit::SetText(const FX_WCHAR* text,int32_t charset /*= DEFAULT_CHARSET*/,
const CPVT_SecProps * pSecProps /*= NULL*/,const CPVT_WordProps * pWordProps /*= NULL*/)
{
SetText(text,charset,pSecProps,pWordProps,TRUE,TRUE);
@@ -1952,7 +1952,7 @@ FX_BOOL CFX_Edit::Clear()
return Clear(TRUE,TRUE);
}
-FX_BOOL CFX_Edit::InsertText(FX_LPCWSTR text, int32_t charset /*= DEFAULT_CHARSET*/,
+FX_BOOL CFX_Edit::InsertText(const FX_WCHAR* text, int32_t charset /*= DEFAULT_CHARSET*/,
const CPVT_SecProps * pSecProps /*= NULL*/,const CPVT_WordProps * pWordProps /*= NULL*/)
{
return InsertText(text,charset,pSecProps,pWordProps,TRUE,TRUE);
@@ -2962,7 +2962,7 @@ void CFX_Edit::OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl)
}
}
-void CFX_Edit::SetText(FX_LPCWSTR text,int32_t charset,
+void CFX_Edit::SetText(const FX_WCHAR* text,int32_t charset,
const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps, FX_BOOL bAddUndo, FX_BOOL bPaint)
{
Empty();
@@ -3264,7 +3264,7 @@ FX_BOOL CFX_Edit::Clear(FX_BOOL bAddUndo, FX_BOOL bPaint)
return FALSE;
}
-FX_BOOL CFX_Edit::InsertText(FX_LPCWSTR text, int32_t charset,
+FX_BOOL CFX_Edit::InsertText(const FX_WCHAR* text, int32_t charset,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps, FX_BOOL bAddUndo, FX_BOOL bPaint)
{
if (IsTextOverflow()) return FALSE;
@@ -3510,7 +3510,7 @@ FX_FLOAT CFX_Edit::GetLineBottom(const CPVT_WordPlace& place) const
return 0.0f;
}
-CPVT_WordPlace CFX_Edit::DoInsertText(const CPVT_WordPlace& place, FX_LPCWSTR text, int32_t charset,
+CPVT_WordPlace CFX_Edit::DoInsertText(const CPVT_WordPlace& place, const FX_WCHAR* text, int32_t charset,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps)
{
CPVT_WordPlace wp = place;
diff --git a/fpdfsdk/src/fxedit/fxet_list.cpp b/fpdfsdk/src/fxedit/fxet_list.cpp
index 03b23020b4..6d48b30269 100644
--- a/fpdfsdk/src/fxedit/fxet_list.cpp
+++ b/fpdfsdk/src/fxedit/fxet_list.cpp
@@ -76,7 +76,7 @@ void CFX_ListItem::SetCaret(FX_BOOL bCaret)
m_bCaret = bCaret;
}
-void CFX_ListItem::SetText(FX_LPCWSTR text)
+void CFX_ListItem::SetText(const FX_WCHAR* text)
{
if (m_pEdit)
m_pEdit->SetText(text);
@@ -146,7 +146,7 @@ void CFX_List::SetFontSize(FX_FLOAT fFontSize)
m_fFontSize = fFontSize;
}
-void CFX_List::AddItem(FX_LPCWSTR str)
+void CFX_List::AddItem(const FX_WCHAR* str)
{
if (CFX_ListItem * pListItem = new CFX_ListItem())
{
@@ -733,7 +733,7 @@ CPDF_Rect CFX_ListCtrl::GetItemRect(int32_t nIndex) const
return InToOut(CFX_List::GetItemRect(nIndex));
}
-void CFX_ListCtrl::AddString(FX_LPCWSTR string)
+void CFX_ListCtrl::AddString(const FX_WCHAR* string)
{
AddItem(string);
ReArrange(GetCount() - 1);
diff --git a/fpdfsdk/src/javascript/Consts.cpp b/fpdfsdk/src/javascript/Consts.cpp
index 1b1c8babcb..cea9f9a4c9 100644
--- a/fpdfsdk/src/javascript/Consts.cpp
+++ b/fpdfsdk/src/javascript/Consts.cpp
@@ -151,14 +151,14 @@ int CJS_GlobalConsts::Init(IJS_Runtime* pRuntime)
int CJS_GlobalArrays::Init(IJS_Runtime* pRuntime)
{
{
- FX_LPCWSTR ArrayName = L"RE_NUMBER_ENTRY_DOT_SEP";
- FX_LPCWSTR ArrayContent[] = {L"[+-]?\\d*\\.?\\d*"};
+ const FX_WCHAR* ArrayName = L"RE_NUMBER_ENTRY_DOT_SEP";
+ const FX_WCHAR* ArrayContent[] = {L"[+-]?\\d*\\.?\\d*"};
DEFINE_GLOBAL_ARRAY(pRuntime);
}
{
- FX_LPCWSTR ArrayName = L"RE_NUMBER_COMMIT_DOT_SEP";
- FX_LPCWSTR ArrayContent[] = { L"[+-]?\\d+(\\.\\d+)?", /* -1.0 or -1 */
+ const FX_WCHAR* ArrayName = L"RE_NUMBER_COMMIT_DOT_SEP";
+ const FX_WCHAR* ArrayContent[] = { L"[+-]?\\d+(\\.\\d+)?", /* -1.0 or -1 */
L"[+-]?\\.\\d+", /* -.1 */
L"[+-]?\\d+\\." /* -1. */
};
@@ -166,15 +166,15 @@ int CJS_GlobalArrays::Init(IJS_Runtime* pRuntime)
}
{
- FX_LPCWSTR ArrayName = L"RE_NUMBER_ENTRY_COMMA_SEP";
- FX_LPCWSTR ArrayContent[] = {L"[+-]?\\d*,?\\d*"};
+ const FX_WCHAR* ArrayName = L"RE_NUMBER_ENTRY_COMMA_SEP";
+ const FX_WCHAR* ArrayContent[] = {L"[+-]?\\d*,?\\d*"};
DEFINE_GLOBAL_ARRAY(pRuntime);
}
{
- FX_LPCWSTR ArrayName = L"RE_NUMBER_COMMIT_COMMA_SEP";
- FX_LPCWSTR ArrayContent[] = { L"[+-]?\\d+([.,]\\d+)?", /* -1,0 or -1 */
+ const FX_WCHAR* ArrayName = L"RE_NUMBER_COMMIT_COMMA_SEP";
+ const FX_WCHAR* ArrayContent[] = { L"[+-]?\\d+([.,]\\d+)?", /* -1,0 or -1 */
L"[+-]?[.,]\\d+", /* -,1 */
L"[+-]?\\d+[.,]" /* -1, */
};
@@ -182,32 +182,32 @@ int CJS_GlobalArrays::Init(IJS_Runtime* pRuntime)
}
{
- FX_LPCWSTR ArrayName = L"RE_ZIP_ENTRY";
- FX_LPCWSTR ArrayContent[] = {L"\\d{0,5}"};
+ const FX_WCHAR* ArrayName = L"RE_ZIP_ENTRY";
+ const FX_WCHAR* ArrayContent[] = {L"\\d{0,5}"};
DEFINE_GLOBAL_ARRAY(pRuntime);
}
{
- FX_LPCWSTR ArrayName = L"RE_ZIP_COMMIT";
- FX_LPCWSTR ArrayContent[] = {L"\\d{5}"};
+ const FX_WCHAR* ArrayName = L"RE_ZIP_COMMIT";
+ const FX_WCHAR* ArrayContent[] = {L"\\d{5}"};
DEFINE_GLOBAL_ARRAY(pRuntime);
}
{
- FX_LPCWSTR ArrayName = L"RE_ZIP4_ENTRY";
- FX_LPCWSTR ArrayContent[] = {L"\\d{0,5}(\\.|[- ])?\\d{0,4}"};
+ const FX_WCHAR* ArrayName = L"RE_ZIP4_ENTRY";
+ const FX_WCHAR* ArrayContent[] = {L"\\d{0,5}(\\.|[- ])?\\d{0,4}"};
DEFINE_GLOBAL_ARRAY(pRuntime);
}
{
- FX_LPCWSTR ArrayName = L"RE_ZIP4_COMMIT";
- FX_LPCWSTR ArrayContent[] = {L"\\d{5}(\\.|[- ])?\\d{4}"};
+ const FX_WCHAR* ArrayName = L"RE_ZIP4_COMMIT";
+ const FX_WCHAR* ArrayContent[] = {L"\\d{5}(\\.|[- ])?\\d{4}"};
DEFINE_GLOBAL_ARRAY(pRuntime);
}
{
- FX_LPCWSTR ArrayName = L"RE_PHONE_ENTRY";
- FX_LPCWSTR ArrayContent[] = {
+ const FX_WCHAR* ArrayName = L"RE_PHONE_ENTRY";
+ const FX_WCHAR* ArrayContent[] = {
L"\\d{0,3}(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", /* 555-1234 or 408 555-1234 */
L"\\(\\d{0,3}", /* (408 */
L"\\(\\d{0,3}\\)(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", /* (408) 555-1234 */
@@ -220,8 +220,8 @@ int CJS_GlobalArrays::Init(IJS_Runtime* pRuntime)
}
{
- FX_LPCWSTR ArrayName = L"RE_PHONE_COMMIT";
- FX_LPCWSTR ArrayContent[] = {
+ const FX_WCHAR* ArrayName = L"RE_PHONE_COMMIT";
+ const FX_WCHAR* ArrayContent[] = {
L"\\d{3}(\\.|[- ])?\\d{4}", /* 555-1234 */
L"\\d{3}(\\.|[- ])?\\d{3}(\\.|[- ])?\\d{4}", /* 408 555-1234 */
L"\\(\\d{3}\\)(\\.|[- ])?\\d{3}(\\.|[- ])?\\d{4}", /* (408) 555-1234 */
@@ -231,14 +231,14 @@ int CJS_GlobalArrays::Init(IJS_Runtime* pRuntime)
}
{
- FX_LPCWSTR ArrayName = L"RE_SSN_ENTRY";
- FX_LPCWSTR ArrayContent[] = {L"\\d{0,3}(\\.|[- ])?\\d{0,2}(\\.|[- ])?\\d{0,4}"};
+ const FX_WCHAR* ArrayName = L"RE_SSN_ENTRY";
+ const FX_WCHAR* ArrayContent[] = {L"\\d{0,3}(\\.|[- ])?\\d{0,2}(\\.|[- ])?\\d{0,4}"};
DEFINE_GLOBAL_ARRAY(pRuntime);
}
{
- FX_LPCWSTR ArrayName = L"RE_SSN_COMMIT";
- FX_LPCWSTR ArrayContent[] = {L"\\d{3}(\\.|[- ])?\\d{2}(\\.|[- ])?\\d{4}"};
+ const FX_WCHAR* ArrayName = L"RE_SSN_COMMIT";
+ const FX_WCHAR* ArrayContent[] = {L"\\d{3}(\\.|[- ])?\\d{2}(\\.|[- ])?\\d{4}"};
DEFINE_GLOBAL_ARRAY(pRuntime);
}
diff --git a/fpdfsdk/src/javascript/JS_EventHandler.cpp b/fpdfsdk/src/javascript/JS_EventHandler.cpp
index cf59ed9c86..fe4f6b2d4c 100644
--- a/fpdfsdk/src/javascript/JS_EventHandler.cpp
+++ b/fpdfsdk/src/javascript/JS_EventHandler.cpp
@@ -461,7 +461,7 @@ FX_BOOL CJS_EventHandler::Modifier()
return m_bModifier;
}
-FX_LPCWSTR CJS_EventHandler::Name()
+const FX_WCHAR* CJS_EventHandler::Name()
{
switch (m_eEventType)
{
@@ -509,7 +509,7 @@ FX_LPCWSTR CJS_EventHandler::Name()
return L"";
}
-FX_LPCWSTR CJS_EventHandler::Type()
+const FX_WCHAR* CJS_EventHandler::Type()
{
switch (m_eEventType)
{
diff --git a/fpdfsdk/src/javascript/JS_GlobalData.cpp b/fpdfsdk/src/javascript/JS_GlobalData.cpp
index c4166762ee..0fa2189453 100644
--- a/fpdfsdk/src/javascript/JS_GlobalData.cpp
+++ b/fpdfsdk/src/javascript/JS_GlobalData.cpp
@@ -138,7 +138,7 @@ CJS_GlobalData::~CJS_GlobalData()
m_arrayGlobalData.RemoveAll();
}
-int CJS_GlobalData::FindGlobalVariable(FX_LPCSTR propname)
+int CJS_GlobalData::FindGlobalVariable(const FX_CHAR* propname)
{
ASSERT(propname != NULL);
@@ -157,7 +157,7 @@ int CJS_GlobalData::FindGlobalVariable(FX_LPCSTR propname)
return nRet;
}
-CJS_GlobalData_Element* CJS_GlobalData::GetGlobalVariable(FX_LPCSTR propname)
+CJS_GlobalData_Element* CJS_GlobalData::GetGlobalVariable(const FX_CHAR* propname)
{
ASSERT(propname != NULL);
@@ -169,7 +169,7 @@ CJS_GlobalData_Element* CJS_GlobalData::GetGlobalVariable(FX_LPCSTR propname)
return NULL;
}
-void CJS_GlobalData::SetGlobalVariableNumber(FX_LPCSTR propname, double dData)
+void CJS_GlobalData::SetGlobalVariableNumber(const FX_CHAR* propname, double dData)
{
ASSERT(propname != NULL);
CFX_ByteString sPropName = propname;
@@ -195,7 +195,7 @@ void CJS_GlobalData::SetGlobalVariableNumber(FX_LPCSTR propname, double dData)
}
}
-void CJS_GlobalData::SetGlobalVariableBoolean(FX_LPCSTR propname, bool bData)
+void CJS_GlobalData::SetGlobalVariableBoolean(const FX_CHAR* propname, bool bData)
{
ASSERT(propname != NULL);
CFX_ByteString sPropName = propname;
@@ -221,7 +221,7 @@ void CJS_GlobalData::SetGlobalVariableBoolean(FX_LPCSTR propname, bool bData)
}
}
-void CJS_GlobalData::SetGlobalVariableString(FX_LPCSTR propname, const CFX_ByteString& sData)
+void CJS_GlobalData::SetGlobalVariableString(const FX_CHAR* propname, const CFX_ByteString& sData)
{
ASSERT(propname != NULL);
CFX_ByteString sPropName = propname;
@@ -247,7 +247,7 @@ void CJS_GlobalData::SetGlobalVariableString(FX_LPCSTR propname, const CFX_ByteS
}
}
-void CJS_GlobalData::SetGlobalVariableObject(FX_LPCSTR propname, const CJS_GlobalVariableArray& array)
+void CJS_GlobalData::SetGlobalVariableObject(const FX_CHAR* propname, const CJS_GlobalVariableArray& array)
{
ASSERT(propname != NULL);
CFX_ByteString sPropName = propname;
@@ -273,7 +273,7 @@ void CJS_GlobalData::SetGlobalVariableObject(FX_LPCSTR propname, const CJS_Globa
}
}
-void CJS_GlobalData::SetGlobalVariableNull(FX_LPCSTR propname)
+void CJS_GlobalData::SetGlobalVariableNull(const FX_CHAR* propname)
{
ASSERT(propname != NULL);
CFX_ByteString sPropName = propname;
@@ -297,7 +297,7 @@ void CJS_GlobalData::SetGlobalVariableNull(FX_LPCSTR propname)
}
}
-FX_BOOL CJS_GlobalData::SetGlobalVariablePersistent(FX_LPCSTR propname, FX_BOOL bPersistent)
+FX_BOOL CJS_GlobalData::SetGlobalVariablePersistent(const FX_CHAR* propname, FX_BOOL bPersistent)
{
ASSERT(propname != NULL);
CFX_ByteString sPropName = propname;
@@ -316,7 +316,7 @@ FX_BOOL CJS_GlobalData::SetGlobalVariablePersistent(FX_LPCSTR propname, FX_BOOL
return FALSE;
}
-FX_BOOL CJS_GlobalData::DeleteGlobalVariable(FX_LPCSTR propname)
+FX_BOOL CJS_GlobalData::DeleteGlobalVariable(const FX_CHAR* propname)
{
ASSERT(propname != NULL);
CFX_ByteString sPropName = propname;
@@ -350,7 +350,7 @@ CJS_GlobalData_Element* CJS_GlobalData::GetAt(int index) const
void CJS_GlobalData::LoadGlobalPersistentVariables()
{
- FX_LPBYTE pBuffer = NULL;
+ uint8_t* pBuffer = NULL;
int32_t nLength = 0;
LoadFileBuffer(m_sFilePath.c_str(), pBuffer, nLength);
@@ -358,7 +358,7 @@ void CJS_GlobalData::LoadGlobalPersistentVariables()
if (pBuffer)
{
- FX_LPBYTE p = pBuffer;
+ uint8_t* p = pBuffer;
FX_WORD wType = *((FX_WORD*)p);
p += sizeof(FX_WORD);
@@ -508,15 +508,15 @@ void CJS_GlobalData::SaveGlobalPersisitentVariables()
sFile.AppendBlock(sData.GetBuffer(), sData.GetSize());
CRYPT_ArcFourCryptBlock(sFile.GetBuffer(), sFile.GetSize(), JS_RC4KEY, sizeof(JS_RC4KEY));
- WriteFileBuffer(m_sFilePath.c_str(), (FX_LPCSTR)sFile.GetBuffer(), sFile.GetSize());
+ WriteFileBuffer(m_sFilePath.c_str(), (const FX_CHAR*)sFile.GetBuffer(), sFile.GetSize());
}
-void CJS_GlobalData::LoadFileBuffer(FX_LPCWSTR sFilePath, FX_LPBYTE& pBuffer, int32_t& nLength)
+void CJS_GlobalData::LoadFileBuffer(const FX_WCHAR* sFilePath, uint8_t*& pBuffer, int32_t& nLength)
{
//UnSupport.
}
-void CJS_GlobalData::WriteFileBuffer(FX_LPCWSTR sFilePath, FX_LPCSTR pBuffer, int32_t nLength)
+void CJS_GlobalData::WriteFileBuffer(const FX_WCHAR* sFilePath, const FX_CHAR* pBuffer, int32_t nLength)
{
//UnSupport.
}
diff --git a/fpdfsdk/src/javascript/JS_Object.cpp b/fpdfsdk/src/javascript/JS_Object.cpp
index 96c5307e63..9f2d0f8258 100644
--- a/fpdfsdk/src/javascript/JS_Object.cpp
+++ b/fpdfsdk/src/javascript/JS_Object.cpp
@@ -19,7 +19,7 @@ JS_TIMER_MAPARRAY& GetTimeMap()
return *timeMap;
}
-int FXJS_MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView, FX_LPCWSTR swMsg, FX_LPCWSTR swTitle, FX_UINT nType, FX_UINT nIcon)
+int FXJS_MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView, const FX_WCHAR* swMsg, const FX_WCHAR* swTitle, FX_UINT nType, FX_UINT nIcon)
{
int nRet = 0;
@@ -62,12 +62,12 @@ CPDFSDK_PageView* CJS_EmbedObj::JSGetPageView(IFXJS_Context* cc)
return FXJS_GetPageView(cc);
}
-int CJS_EmbedObj::MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView,FX_LPCWSTR swMsg,FX_LPCWSTR swTitle,FX_UINT nType,FX_UINT nIcon)
+int CJS_EmbedObj::MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView,const FX_WCHAR* swMsg,const FX_WCHAR* swTitle,FX_UINT nType,FX_UINT nIcon)
{
return FXJS_MsgBox(pApp, pPageView, swMsg, swTitle, nType, nIcon);
}
-void CJS_EmbedObj::Alert(CJS_Context* pContext, FX_LPCWSTR swMsg)
+void CJS_EmbedObj::Alert(CJS_Context* pContext, const FX_WCHAR* swMsg)
{
CJS_Object::Alert(pContext, swMsg);
}
@@ -134,12 +134,12 @@ CPDFSDK_PageView* CJS_Object::JSGetPageView(IFXJS_Context* cc)
return FXJS_GetPageView(cc);
}
-int CJS_Object::MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView, FX_LPCWSTR swMsg, FX_LPCWSTR swTitle, FX_UINT nType, FX_UINT nIcon)
+int CJS_Object::MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView, const FX_WCHAR* swMsg, const FX_WCHAR* swTitle, FX_UINT nType, FX_UINT nIcon)
{
return FXJS_MsgBox(pApp, pPageView, swMsg, swTitle, nType, nIcon);
}
-void CJS_Object::Alert(CJS_Context* pContext, FX_LPCWSTR swMsg)
+void CJS_Object::Alert(CJS_Context* pContext, const FX_WCHAR* swMsg)
{
ASSERT(pContext != NULL);
diff --git a/fpdfsdk/src/javascript/JS_Runtime.cpp b/fpdfsdk/src/javascript/JS_Runtime.cpp
index 9450a6400a..e3e38bcf3d 100644
--- a/fpdfsdk/src/javascript/JS_Runtime.cpp
+++ b/fpdfsdk/src/javascript/JS_Runtime.cpp
@@ -361,7 +361,7 @@ CFX_WideString ChangeObjName(const CFX_WideString& str)
}
FX_BOOL CJS_Runtime::GetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue)
{
- FX_LPCSTR name = utf8Name.GetCStr();
+ const FX_CHAR* name = utf8Name.GetCStr();
v8::Locker lock(GetIsolate());
v8::Isolate::Scope isolate_scope(GetIsolate());
@@ -386,7 +386,7 @@ FX_BOOL CJS_Runtime::SetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue)
{
if (utf8Name.IsEmpty() || hValue == NULL)
return FALSE;
- FX_LPCSTR name = utf8Name.GetCStr();
+ const FX_CHAR* name = utf8Name.GetCStr();
v8::Isolate* pIsolate = GetIsolate();
v8::Locker lock(pIsolate);
v8::Isolate::Scope isolate_scope(pIsolate);
diff --git a/fpdfsdk/src/javascript/JS_Value.cpp b/fpdfsdk/src/javascript/JS_Value.cpp
index 0943802508..5bca831710 100644
--- a/fpdfsdk/src/javascript/JS_Value.cpp
+++ b/fpdfsdk/src/javascript/JS_Value.cpp
@@ -57,12 +57,12 @@ CJS_Value::CJS_Value(v8::Isolate* isolate, CJS_Document* pJsDoc):m_isolate(isola
m_pValue = (JSFXObject)*pJsDoc;
}
-CJS_Value::CJS_Value(v8::Isolate* isolate, FX_LPCWSTR pWstr):m_isolate(isolate)
+CJS_Value::CJS_Value(v8::Isolate* isolate, const FX_WCHAR* pWstr):m_isolate(isolate)
{
operator =(pWstr);
}
-CJS_Value::CJS_Value(v8::Isolate* isolate, FX_LPCSTR pStr):m_isolate(isolate)
+CJS_Value::CJS_Value(v8::Isolate* isolate, const FX_CHAR* pStr):m_isolate(isolate)
{
operator = (pStr);
}
@@ -200,7 +200,7 @@ void CJS_Value::operator = (CJS_Document* pJsDoc)
}
}
-void CJS_Value::operator =(FX_LPCWSTR pWstr)
+void CJS_Value::operator =(const FX_WCHAR* pWstr)
{
m_pValue = JS_NewString(m_isolate,(wchar_t *)pWstr);
@@ -214,7 +214,7 @@ void CJS_Value::SetNull()
m_eType = VT_null;
}
-void CJS_Value::operator = (FX_LPCSTR pStr)
+void CJS_Value::operator = (const FX_CHAR* pStr)
{
operator = (CFX_WideString::FromLocal(pStr).c_str());
}
@@ -419,7 +419,7 @@ void CJS_PropValue::operator >>(CFX_ByteString &string) const
string = CJS_Value::ToCFXByteString();
}
-void CJS_PropValue::operator <<(FX_LPCWSTR c_string)
+void CJS_PropValue::operator <<(const FX_WCHAR* c_string)
{
ASSERT(!m_bIsSetting);
CJS_Value::operator =(c_string);
diff --git a/fpdfsdk/src/javascript/PublicMethods.cpp b/fpdfsdk/src/javascript/PublicMethods.cpp
index 539d7c780a..c3fb8c3b2e 100644
--- a/fpdfsdk/src/javascript/PublicMethods.cpp
+++ b/fpdfsdk/src/javascript/PublicMethods.cpp
@@ -64,8 +64,8 @@ IMPLEMENT_JS_STATIC_GLOBAL_FUN(CJS_PublicMethods)
struct stru_TbConvert
{
- FX_LPCSTR lpszJSMark;
- FX_LPCSTR lpszCppMark;
+ const FX_CHAR* lpszJSMark;
+ const FX_CHAR* lpszCppMark;
};
static const stru_TbConvert fcTable[] = {
@@ -91,21 +91,21 @@ static const stru_TbConvert fcTable[] = {
//"t"
};
-static FX_LPCWSTR months[] =
+static const FX_WCHAR* months[] =
{
L"Jan", L"Feb", L"Mar", L"Apr", L"May", L"Jun", L"Jul", L"Aug", L"Sep", L"Oct", L"Nov", L"Dec"
};
-static FX_LPCWSTR fullmonths[] =
-{
- L"January", L"February", L"March", L"April", L"May", L"June", L"July", L"August", L"September", L"October", L"November", L"December"
+static const FX_WCHAR* const fullmonths[] =
+{
+ L"January", L"February", L"March", L"April", L"May", L"June", L"July", L"August", L"September", L"October", L"November", L"December"
};
-FX_BOOL CJS_PublicMethods::IsNumber(FX_LPCWSTR string)
+FX_BOOL CJS_PublicMethods::IsNumber(const FX_WCHAR* string)
{
CFX_WideString sTrim = StrTrim(string);
- FX_LPCWSTR pTrim = sTrim.c_str();
- FX_LPCWSTR p = pTrim;
+ const FX_WCHAR* pTrim = sTrim.c_str();
+ const FX_WCHAR* p = pTrim;
FX_BOOL bDot = FALSE;
@@ -191,7 +191,7 @@ FX_BOOL CJS_PublicMethods::isReservedMaskChar(wchar_t ch)
return ch == L'9' || ch == L'A' || ch == L'O' || ch == L'X';
}
-double CJS_PublicMethods::AF_Simple(FX_LPCWSTR sFuction, double dValue1, double dValue2)
+double CJS_PublicMethods::AF_Simple(const FX_WCHAR* sFuction, double dValue1, double dValue2)
{
if (FXSYS_wcsicmp(sFuction,L"AVG") == 0 || FXSYS_wcsicmp(sFuction,L"SUM") == 0)
{
@@ -213,49 +213,49 @@ double CJS_PublicMethods::AF_Simple(FX_LPCWSTR sFuction, double dValue1, double
return dValue1;
}
-CFX_WideString CJS_PublicMethods::StrLTrim(FX_LPCWSTR pStr)
+CFX_WideString CJS_PublicMethods::StrLTrim(const FX_WCHAR* pStr)
{
while (*pStr && *pStr == L' ') pStr++;
return pStr;
}
-CFX_WideString CJS_PublicMethods::StrRTrim(FX_LPCWSTR pStr)
+CFX_WideString CJS_PublicMethods::StrRTrim(const FX_WCHAR* pStr)
{
- FX_LPCWSTR p = pStr;
+ const FX_WCHAR* p = pStr;
while (*p) p++;
while (p > pStr && *(p - 1) == L' ') p--;
return CFX_WideString(pStr, p - pStr);
}
-CFX_WideString CJS_PublicMethods::StrTrim(FX_LPCWSTR pStr)
+CFX_WideString CJS_PublicMethods::StrTrim(const FX_WCHAR* pStr)
{
return StrRTrim(StrLTrim(pStr).c_str());
}
-CFX_ByteString CJS_PublicMethods::StrLTrim(FX_LPCSTR pStr)
+CFX_ByteString CJS_PublicMethods::StrLTrim(const FX_CHAR* pStr)
{
while (*pStr && *pStr == ' ') pStr++;
return pStr;
}
-CFX_ByteString CJS_PublicMethods::StrRTrim(FX_LPCSTR pStr)
+CFX_ByteString CJS_PublicMethods::StrRTrim(const FX_CHAR* pStr)
{
- FX_LPCSTR p = pStr;
+ const FX_CHAR* p = pStr;
while (*p) p++;
while (p > pStr && *(p - 1) == L' ') p--;
return CFX_ByteString(pStr,p-pStr);
}
-CFX_ByteString CJS_PublicMethods::StrTrim(FX_LPCSTR pStr)
+CFX_ByteString CJS_PublicMethods::StrTrim(const FX_CHAR* pStr)
{
return StrRTrim(StrLTrim(pStr));
}
-double CJS_PublicMethods::ParseNumber(FX_LPCWSTR swSource, FX_BOOL& bAllDigits, FX_BOOL& bDot, FX_BOOL& bSign, FX_BOOL& bKXJS)
+double CJS_PublicMethods::ParseNumber(const FX_WCHAR* swSource, FX_BOOL& bAllDigits, FX_BOOL& bDot, FX_BOOL& bSign, FX_BOOL& bKXJS)
{
bDot = FALSE;
bSign = FALSE;
@@ -263,11 +263,11 @@ double CJS_PublicMethods::ParseNumber(FX_LPCWSTR swSource, FX_BOOL& bAllDigits,
FX_BOOL bDigitExist = FALSE;
- FX_LPCWSTR p = swSource;
+ const FX_WCHAR* p = swSource;
wchar_t c;
- FX_LPCWSTR pStart = NULL;
- FX_LPCWSTR pEnd = NULL;
+ const FX_WCHAR* pStart = NULL;
+ const FX_WCHAR* pEnd = NULL;
while ((c = *p))
{
@@ -401,7 +401,7 @@ double CJS_PublicMethods::ParseNumber(FX_LPCWSTR swSource, FX_BOOL& bAllDigits,
return dRet;
}
-double CJS_PublicMethods::ParseStringToNumber(FX_LPCWSTR swSource)
+double CJS_PublicMethods::ParseStringToNumber(const FX_WCHAR* swSource)
{
FX_BOOL bAllDigits = FALSE;
FX_BOOL bDot = FALSE;
@@ -411,7 +411,7 @@ double CJS_PublicMethods::ParseStringToNumber(FX_LPCWSTR swSource)
return ParseNumber(swSource, bAllDigits, bDot, bSign, bKXJS);
}
-FX_BOOL CJS_PublicMethods::ConvertStringToNumber(FX_LPCWSTR swSource, double & dRet, FX_BOOL & bDot)
+FX_BOOL CJS_PublicMethods::ConvertStringToNumber(const FX_WCHAR* swSource, double & dRet, FX_BOOL & bDot)
{
FX_BOOL bAllDigits = FALSE;
FX_BOOL bSign = FALSE;
@@ -1662,7 +1662,7 @@ FX_BOOL CJS_PublicMethods::AFDate_Format(IFXJS_Context* cc, const CJS_Parameters
}
int iIndex = params[0].ToInt();
- FX_LPCWSTR cFormats[] = {L"m/d", L"m/d/yy", L"mm/dd/yy", L"mm/yy", L"d-mmm", L"d-mmm-yy", L"dd-mmm-yy",
+ const FX_WCHAR* cFormats[] = {L"m/d", L"m/d/yy", L"mm/dd/yy", L"mm/yy", L"d-mmm", L"d-mmm-yy", L"dd-mmm-yy",
L"yy-mm-dd", L"mmm-yy", L"mmmm-yy", L"mmm d, yyyy", L"mmmm d, yyyy",
L"m/d/yy h:MM tt", L"m/d/yy HH:MM" };
@@ -1693,7 +1693,7 @@ FX_BOOL CJS_PublicMethods::AFDate_Keystroke(IFXJS_Context* cc, const CJS_Paramet
}
int iIndex = params[0].ToInt();
- FX_LPCWSTR cFormats[] = {L"m/d", L"m/d/yy", L"mm/dd/yy", L"mm/yy", L"d-mmm", L"d-mmm-yy", L"dd-mmm-yy",
+ const FX_WCHAR* cFormats[] = {L"m/d", L"m/d/yy", L"mm/dd/yy", L"mm/yy", L"d-mmm", L"d-mmm-yy", L"dd-mmm-yy",
L"yy-mm-dd", L"mmm-yy", L"mmmm-yy", L"mmm d, yyyy", L"mmmm d, yyyy",
L"m/d/yy h:MM tt", L"m/d/yy HH:MM" };
@@ -1723,7 +1723,7 @@ FX_BOOL CJS_PublicMethods::AFTime_Format(IFXJS_Context* cc, const CJS_Parameters
}
int iIndex = params[0].ToInt();
- FX_LPCWSTR cFormats[] = {L"HH:MM", L"h:MM tt", L"HH:MM:ss", L"h:MM:ss tt"};
+ const FX_WCHAR* cFormats[] = {L"HH:MM", L"h:MM tt", L"HH:MM:ss", L"h:MM:ss tt"};
ASSERT(iIndex<FX_ArraySize(cFormats));
@@ -1749,7 +1749,7 @@ FX_BOOL CJS_PublicMethods::AFTime_Keystroke(IFXJS_Context* cc, const CJS_Paramet
}
int iIndex = params[0].ToInt();
- FX_LPCWSTR cFormats[] = {L"HH:MM", L"h:MM tt", L"HH:MM:ss", L"h:MM:ss tt"};
+ const FX_WCHAR* cFormats[] = {L"HH:MM", L"h:MM tt", L"HH:MM:ss", L"h:MM:ss tt"};
ASSERT(iIndex<FX_ArraySize(cFormats));
diff --git a/fpdfsdk/src/javascript/global.cpp b/fpdfsdk/src/javascript/global.cpp
index f139380b20..06e147eb15 100644
--- a/fpdfsdk/src/javascript/global.cpp
+++ b/fpdfsdk/src/javascript/global.cpp
@@ -134,17 +134,17 @@ void global_alternate::Initial(CPDFDoc_Environment* pApp)
UpdateGlobalPersistentVariables();
}
-FX_BOOL global_alternate::QueryProperty(FX_LPCWSTR propname)
+FX_BOOL global_alternate::QueryProperty(const FX_WCHAR* propname)
{
return CFX_WideString(propname) != L"setPersistent";
}
-FX_BOOL global_alternate::DelProperty(IFXJS_Context* cc, FX_LPCWSTR propname, CFX_WideString& sError)
+FX_BOOL global_alternate::DelProperty(IFXJS_Context* cc, const FX_WCHAR* propname, CFX_WideString& sError)
{
js_global_data* pData = NULL;
CFX_ByteString sPropName = CFX_ByteString::FromUnicode(propname);
- if (m_mapGlobal.Lookup(sPropName, (FX_LPVOID&)pData))
+ if (m_mapGlobal.Lookup(sPropName, (void*&)pData))
{
pData->bDeleted = TRUE;
return TRUE;
@@ -153,7 +153,7 @@ FX_BOOL global_alternate::DelProperty(IFXJS_Context* cc, FX_LPCWSTR propname, CF
return FALSE;
}
-FX_BOOL global_alternate::DoProperty(IFXJS_Context* cc, FX_LPCWSTR propname, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL global_alternate::DoProperty(IFXJS_Context* cc, const FX_WCHAR* propname, CJS_PropValue& vp, CFX_WideString& sError)
{
if (vp.IsSetting())
{
@@ -202,7 +202,7 @@ FX_BOOL global_alternate::DoProperty(IFXJS_Context* cc, FX_LPCWSTR propname, CJS
js_global_data* pData = NULL;
CFX_ByteString sPropName = CFX_ByteString::FromUnicode(propname);
- if (m_mapGlobal.Lookup(sPropName, (FX_LPVOID&)pData))
+ if (m_mapGlobal.Lookup(sPropName, (void*&)pData))
{
if (pData)
{
@@ -266,7 +266,7 @@ FX_BOOL global_alternate::setPersistent(IFXJS_Context* cc, const CJS_Parameters&
CFX_ByteString sName = params[0].ToCFXByteString();
js_global_data* pData = NULL;
- if (m_mapGlobal.Lookup(sName, (FX_LPVOID&)pData))
+ if (m_mapGlobal.Lookup(sName, (void*&)pData))
{
if (pData && !pData->bDeleted)
{
@@ -337,7 +337,7 @@ void global_alternate::CommitGlobalPersisitentVariables()
{
CFX_ByteString name;
js_global_data* pData = NULL;
- m_mapGlobal.GetNextAssoc(pos, name, (FX_LPVOID&)pData);
+ m_mapGlobal.GetNextAssoc(pos, name, (void*&)pData);
if (pData)
{
@@ -491,7 +491,7 @@ void global_alternate::DestroyGlobalPersisitentVariables()
{
CFX_ByteString name;
js_global_data* pData = NULL;
- m_mapGlobal.GetNextAssoc(pos, name, (FX_LPVOID&)pData);
+ m_mapGlobal.GetNextAssoc(pos, name, (void*&)pData);
delete pData;
}
@@ -499,13 +499,13 @@ void global_alternate::DestroyGlobalPersisitentVariables()
}
-FX_BOOL global_alternate::SetGlobalVariables(FX_LPCSTR propname, int nType,
+FX_BOOL global_alternate::SetGlobalVariables(const FX_CHAR* propname, int nType,
double dData, bool bData, const CFX_ByteString& sData, JSObject pData, bool bDefaultPersistent)
{
if (propname == NULL) return FALSE;
js_global_data* pTemp = NULL;
- m_mapGlobal.Lookup(propname, (FX_LPVOID&)pTemp);
+ m_mapGlobal.Lookup(propname, (void*&)pTemp);
if (pTemp)
{
@@ -597,7 +597,7 @@ FX_BOOL global_alternate::SetGlobalVariables(FX_LPCSTR propname, int nType,
return FALSE;
}
- m_mapGlobal.SetAt(propname, (FX_LPVOID)pNewData);
+ m_mapGlobal.SetAt(propname, (void*)pNewData);
return TRUE;
}
diff --git a/fpdfsdk/src/javascript/util.cpp b/fpdfsdk/src/javascript/util.cpp
index e051cda66e..97bddec5c1 100644
--- a/fpdfsdk/src/javascript/util.cpp
+++ b/fpdfsdk/src/javascript/util.cpp
@@ -58,8 +58,8 @@ util::~util(void)
struct stru_TbConvert
{
- FX_LPCWSTR lpszJSMark;
- FX_LPCWSTR lpszCppMark;
+ const FX_WCHAR* lpszJSMark;
+ const FX_WCHAR* lpszCppMark;
};
const stru_TbConvert fcTable[] = {
@@ -315,7 +315,7 @@ FX_BOOL util::printd(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value&
struct stru_TbConvertAd
{
- FX_LPCWSTR lpszJSMark;
+ const FX_WCHAR* lpszJSMark;
int iValue;
};
@@ -411,7 +411,7 @@ void util::printd(const std::wstring &cFormat2, CJS_Date jsDate, bool bXFAPictur
struct stru_TbConvertAd
{
- FX_LPCWSTR lpszJSMark;
+ const FX_WCHAR* lpszJSMark;
int iValue;
};
diff --git a/fpdfsdk/src/jsapi/fxjs_v8.cpp b/fpdfsdk/src/jsapi/fxjs_v8.cpp
index c03c84b7a7..3ab27e2d4a 100644
--- a/fpdfsdk/src/jsapi/fxjs_v8.cpp
+++ b/fpdfsdk/src/jsapi/fxjs_v8.cpp
@@ -33,7 +33,7 @@ class CJS_PrivateData
public:
CJS_PrivateData():ObjDefID(-1), pPrivate(NULL) {}
int ObjDefID;
- FX_LPVOID pPrivate;
+ void* pPrivate;
};
@@ -105,7 +105,7 @@ int JS_DefineObjMethod(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* s
if(nObjDefnID<0 || nObjDefnID>= pArray->GetSize()) return 0;
CJS_ObjDefintion* pObjDef = (CJS_ObjDefintion*)pArray->GetAt(nObjDefnID);
v8::Local<v8::ObjectTemplate> objTemp = v8::Local<v8::ObjectTemplate>::New(isolate, pObjDef->m_objTemplate);
- objTemp->Set(v8::String::NewFromUtf8(isolate, FX_LPCSTR(bsMethodName), v8::NewStringType::kNormal).ToLocalChecked(), v8::FunctionTemplate::New(isolate, pMethodCall), v8::ReadOnly);
+ objTemp->Set(v8::String::NewFromUtf8(isolate, bsMethodName.c_str(), v8::NewStringType::kNormal).ToLocalChecked(), v8::FunctionTemplate::New(isolate, pMethodCall), v8::ReadOnly);
pObjDef->m_objTemplate.Reset(isolate,objTemp);
return 0;
}
@@ -125,7 +125,7 @@ int JS_DefineObjProperty(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t*
if(nObjDefnID<0 || nObjDefnID>= pArray->GetSize()) return 0;
CJS_ObjDefintion* pObjDef = (CJS_ObjDefintion*)pArray->GetAt(nObjDefnID);
v8::Local<v8::ObjectTemplate> objTemp = v8::Local<v8::ObjectTemplate>::New(isolate, pObjDef->m_objTemplate);
- objTemp->SetAccessor(v8::String::NewFromUtf8(isolate, FX_LPCSTR(bsPropertyName), v8::NewStringType::kNormal).ToLocalChecked(), pPropGet, pPropPut);
+ objTemp->SetAccessor(v8::String::NewFromUtf8(isolate, bsPropertyName.c_str(), v8::NewStringType::kNormal).ToLocalChecked(), pPropGet, pPropPut);
pObjDef->m_objTemplate.Reset(isolate,objTemp);
return 0;
}
@@ -162,7 +162,7 @@ int JS_DefineObjConst(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* sC
if(nObjDefnID<0 || nObjDefnID>= pArray->GetSize()) return 0;
CJS_ObjDefintion* pObjDef = (CJS_ObjDefintion*)pArray->GetAt(nObjDefnID);
v8::Local<v8::ObjectTemplate> objTemp = v8::Local<v8::ObjectTemplate>::New(isolate, pObjDef->m_objTemplate);
- objTemp->Set(isolate, FX_LPCSTR(bsConstName), pDefault);
+ objTemp->Set(isolate, bsConstName.c_str(), pDefault);
pObjDef->m_objTemplate.Reset(isolate,objTemp);
return 0;
}
@@ -202,7 +202,7 @@ int JS_DefineGlobalMethod(IJS_Runtime* pJSRuntime, const wchar_t* sMethodName, v
objTemp = v8::ObjectTemplate::New(isolate);
else
objTemp = v8::Local<v8::ObjectTemplate>::New(isolate, globalObjTemp);
- objTemp->Set(v8::String::NewFromUtf8(isolate, FX_LPCSTR(bsMethodName), v8::NewStringType::kNormal).ToLocalChecked(), funTempl, v8::ReadOnly);
+ objTemp->Set(v8::String::NewFromUtf8(isolate, bsMethodName.c_str(), v8::NewStringType::kNormal).ToLocalChecked(), funTempl, v8::ReadOnly);
globalObjTemp.Reset(isolate,objTemp);
@@ -225,7 +225,7 @@ int JS_DefineGlobalConst(IJS_Runtime* pJSRuntime, const wchar_t* sConstName, v8:
objTemp = v8::ObjectTemplate::New(isolate);
else
objTemp = v8::Local<v8::ObjectTemplate>::New(isolate, globalObjTemp);
- objTemp->Set(v8::String::NewFromUtf8(isolate, FX_LPCSTR(bsConst), v8::NewStringType::kNormal).ToLocalChecked(), pDefault, v8::ReadOnly);
+ objTemp->Set(v8::String::NewFromUtf8(isolate, bsConst.c_str(), v8::NewStringType::kNormal).ToLocalChecked(), pDefault, v8::ReadOnly);
globalObjTemp.Reset(isolate,objTemp);
@@ -473,12 +473,12 @@ void JS_Error(v8::Isolate* isolate, const CFX_WideString& message)
unsigned JS_CalcHash(const wchar_t* main, unsigned nLen)
{
- return (unsigned)FX_HashCode_String_GetW((FX_LPCWSTR)main, nLen);
+ return (unsigned)FX_HashCode_String_GetW((const FX_WCHAR*)main, nLen);
}
unsigned JS_CalcHash(const wchar_t* main)
{
- return (unsigned)FX_HashCode_String_GetW((FX_LPCWSTR)main, FXSYS_wcslen(main));
+ return (unsigned)FX_HashCode_String_GetW((const FX_WCHAR*)main, FXSYS_wcslen(main));
}
const wchar_t* JS_GetTypeof(v8::Local<v8::Value> pObj)
{
diff --git a/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp b/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
index cbc2ba46ba..f3dce6ad72 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
@@ -244,13 +244,13 @@ CFX_WideString CPWL_ComboBox::GetText() const
return CFX_WideString();
}
-void CPWL_ComboBox::SetText(FX_LPCWSTR text)
+void CPWL_ComboBox::SetText(const FX_WCHAR* text)
{
if (m_pEdit)
m_pEdit->SetText(text);
}
-void CPWL_ComboBox::AddString(FX_LPCWSTR string)
+void CPWL_ComboBox::AddString(const FX_WCHAR* string)
{
if (m_pList)
m_pList->AddString(string);
diff --git a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
index f50233ff1c..62f09eff2b 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
@@ -37,7 +37,7 @@ void CPWL_Edit::OnDestroy()
{
}
-void CPWL_Edit::SetText(FX_LPCWSTR csText)
+void CPWL_Edit::SetText(const FX_WCHAR* csText)
{
CFX_WideString swText = csText;
@@ -865,7 +865,7 @@ void CPWL_Edit::SetLimitChar(int32_t nLimitChar)
m_pEdit->SetLimitChar(nLimitChar);
}
-void CPWL_Edit::ReplaceSel(FX_LPCWSTR csText)
+void CPWL_Edit::ReplaceSel(const FX_WCHAR* csText)
{
m_pEdit->Clear();
m_pEdit->InsertText(csText);
diff --git a/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp b/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp
index a38371c326..57b0c01782 100644
--- a/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp
@@ -561,7 +561,7 @@ FX_FLOAT CPWL_EditCtrl::GetCaretFontSize() const
return fFontSize;
}
-void CPWL_EditCtrl::SetText(FX_LPCWSTR csText)
+void CPWL_EditCtrl::SetText(const FX_WCHAR* csText)
{
m_pEdit->SetText(csText);
}
@@ -582,7 +582,7 @@ void CPWL_EditCtrl::ShowVScrollBar(FX_BOOL bShow)
{
}
-void CPWL_EditCtrl::InsertText(FX_LPCWSTR csText)
+void CPWL_EditCtrl::InsertText(const FX_WCHAR* csText)
{
if (!IsReadOnly())
m_pEdit->InsertText(csText);
diff --git a/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp b/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
index 085159f5f3..bd01eab3da 100644
--- a/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
@@ -195,7 +195,7 @@ void CPWL_FontMap::Empty()
}
}
-void CPWL_FontMap::Initial(FX_LPCSTR fontname)
+void CPWL_FontMap::Initial(const FX_CHAR* fontname)
{
CFX_ByteString sFontName = fontname;
diff --git a/fpdfsdk/src/pdfwindow/PWL_Icon.cpp b/fpdfsdk/src/pdfwindow/PWL_Icon.cpp
index 9426824c8e..f85156da0c 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Icon.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Icon.cpp
@@ -109,7 +109,7 @@ CFX_ByteString CPWL_Image::GetImageAlias()
return CFX_ByteString();
}
-void CPWL_Image::SetImageAlias(FX_LPCSTR sImageAlias)
+void CPWL_Image::SetImageAlias(const FX_CHAR* sImageAlias)
{
m_sImageAlias = sImageAlias;
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_Label.cpp b/fpdfsdk/src/pdfwindow/PWL_Label.cpp
index f2f3929e3f..9875002437 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Label.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Label.cpp
@@ -43,7 +43,7 @@ void CPWL_Label::OnCreated()
}
}
-void CPWL_Label::SetText(FX_LPCWSTR csText)
+void CPWL_Label::SetText(const FX_WCHAR* csText)
{
m_pEdit->SetText(csText);
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp b/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
index 47c1c86123..ecf9e1231f 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
@@ -462,7 +462,7 @@ CPDF_Rect CPWL_ListBox::GetFocusRect() const
return CPWL_Wnd::GetFocusRect();
}
-void CPWL_ListBox::AddString(FX_LPCWSTR string)
+void CPWL_ListBox::AddString(const FX_WCHAR* string)
{
if (m_pList)
{
@@ -470,7 +470,7 @@ void CPWL_ListBox::AddString(FX_LPCWSTR string)
}
}
-void CPWL_ListBox::SetText(FX_LPCWSTR csText,FX_BOOL bRefresh)
+void CPWL_ListBox::SetText(const FX_WCHAR* csText,FX_BOOL bRefresh)
{
//return CPDF_List::SetText(csText,bRefresh);
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_Note.cpp b/fpdfsdk/src/pdfwindow/PWL_Note.cpp
index 6e8ffcd546..13e15a0518 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Note.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Note.cpp
@@ -143,7 +143,7 @@ void CPWL_Note_Edit::RePosChildWnd()
m_fOldItemHeight = this->GetContentRect().Height();
}
-void CPWL_Note_Edit::SetText(FX_LPCWSTR csText)
+void CPWL_Note_Edit::SetText(const FX_WCHAR* csText)
{
m_bEnableNotify = FALSE;
CPWL_Edit::SetText(csText);
diff --git a/fpdfsdk/src/pdfwindow/PWL_Signature.cpp b/fpdfsdk/src/pdfwindow/PWL_Signature.cpp
index fe07630057..4864cabc11 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Signature.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Signature.cpp
@@ -99,14 +99,14 @@ void CPWL_Signature::SetFoxitFlag(FX_BOOL bFlagExist)
m_bFlagExist = bFlagExist;
}
-void CPWL_Signature::SetText(FX_LPCWSTR sText)
+void CPWL_Signature::SetText(const FX_WCHAR* sText)
{
m_pText->SetText(sText);
RePosChildWnd();
}
-void CPWL_Signature::SetDescription(FX_LPCWSTR string)
+void CPWL_Signature::SetDescription(const FX_WCHAR* string)
{
m_pDescription->SetText(string);
@@ -120,7 +120,7 @@ void CPWL_Signature::SetImage(CFX_DIBSource* pImage)
RePosChildWnd();
}
-void CPWL_Signature::SetImageStream(CPDF_Stream * pStream, FX_LPCSTR sImageAlias)
+void CPWL_Signature::SetImageStream(CPDF_Stream * pStream, const FX_CHAR* sImageAlias)
{
m_pImage->SetPDFStream(pStream);
m_pImage->SetImageAlias(sImageAlias);
diff --git a/xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h b/xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h
index 196e6503d9..1ad09eda96 100644
--- a/xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h
+++ b/xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h
@@ -14,7 +14,7 @@ enum FWL_CLIPBOARDFORMAT {
FWL_CLIPBOARDFORMAT_UncodeText,
};
typedef struct _FWL_HCLIPBOARDDATA {
- FX_LPVOID pData;
+ void* pData;
} * FWL_HCLIPBOARDDATA;
class IFWL_AdapterClipboardMgr
{
@@ -24,7 +24,7 @@ public:
virtual FWL_HCLIPBOARDDATA GetData(FX_DWORD dwFormat) = 0;
virtual FWL_ERR SetData(FX_DWORD dwFormat, uint8_t *pBuf, int32_t iSize) = 0;
virtual int32_t GetDataSize(FWL_HCLIPBOARDDATA hData) = 0;
- virtual FX_LPVOID LockDataBuffer(FWL_HCLIPBOARDDATA hData) = 0;
+ virtual void* LockDataBuffer(FWL_HCLIPBOARDDATA hData) = 0;
virtual FX_BOOL UnLockDataBuffer(FWL_HCLIPBOARDDATA hData) = 0;
virtual FWL_ERR SetStringData(FX_WSTR ws) = 0;
virtual FWL_ERR SetStringData(FX_BSTR bs) = 0;
diff --git a/xfa/include/fwl/adapter/fwl_adaptercursormgr.h b/xfa/include/fwl/adapter/fwl_adaptercursormgr.h
index 225a22ca2f..7b7b567be1 100644
--- a/xfa/include/fwl/adapter/fwl_adaptercursormgr.h
+++ b/xfa/include/fwl/adapter/fwl_adaptercursormgr.h
@@ -23,7 +23,7 @@ enum FWL_CURSORTYPE {
FWL_CURSORTYPE_Help
};
typedef struct _FWL_HCURSOR {
- FX_LPVOID pData;
+ void* pData;
} *FWL_HCURSOR;
class IFWL_AdapterCursorMgr
{
diff --git a/xfa/include/fwl/adapter/fwl_adaptermonitormgr.h b/xfa/include/fwl/adapter/fwl_adaptermonitormgr.h
index 8830a3de81..3da0564225 100644
--- a/xfa/include/fwl/adapter/fwl_adaptermonitormgr.h
+++ b/xfa/include/fwl/adapter/fwl_adaptermonitormgr.h
@@ -8,7 +8,7 @@
#define _FWL_ADAPTER_MONITORMGR_H
class IFWL_AdapterMonitorMgr;
typedef struct _FWL_HMONITOR {
- FX_LPVOID pData;
+ void* pData;
} *FWL_HMONITOR;
class IFWL_AdapterMonitorMgr
{
diff --git a/xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h b/xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h
index e8c3b89674..bff8e8a885 100644
--- a/xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h
+++ b/xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h
@@ -38,15 +38,15 @@ public:
virtual FWL_ERR DispatchMessage() = 0;
virtual FWL_ERR RepaintWidget(IFWL_Widget *pWidget, const CFX_RectF *pRect) = 0;
virtual FWL_ERR Exit(int32_t iExitCode) = 0;
- virtual FWL_ERR CreateWidgetWithNativeId(IFWL_Widget *pWidget, FX_LPVOID UserData) = 0;
- virtual FWL_ERR GetWidgetDC(IFWL_Widget *pWidget, FX_LPVOID &pDC) = 0;
- virtual FWL_ERR ReleaseWidgetDC(IFWL_Widget *pWidget, FX_LPVOID pDC, CFX_RectF *pClip = 0) = 0;
- virtual FX_LPVOID GetWindow(IFWL_Widget *pWidget) = 0;
+ virtual FWL_ERR CreateWidgetWithNativeId(IFWL_Widget *pWidget, void* UserData) = 0;
+ virtual FWL_ERR GetWidgetDC(IFWL_Widget *pWidget, void* &pDC) = 0;
+ virtual FWL_ERR ReleaseWidgetDC(IFWL_Widget *pWidget, void* pDC, CFX_RectF *pClip = 0) = 0;
+ virtual void* GetWindow(IFWL_Widget *pWidget) = 0;
virtual FX_DWORD GetKeyState(FX_DWORD dwVirtKey) = 0;
virtual FWL_ERR RunLoop(IFWL_Widget *widget) = 0;
virtual FWL_ERR EndLoop() = 0;
virtual FWL_ERR InitMenu(IFWL_Menu *pMenu, IFWL_MenuDP *pMenuData) = 0;
- virtual FWL_ERR UpdateMenu(IFWL_Menu *pMenu, FX_LPCVOID hItem, int32_t iType) = 0;
+ virtual FWL_ERR UpdateMenu(IFWL_Menu *pMenu, const void* hItem, int32_t iType) = 0;
virtual int32_t TrackPopupMenu(IFWL_Menu *pMenu, IFWL_MenuDP *pMenuData) = 0;
virtual FWL_ERR SetMessageHook(IFWL_AdapterMessageHook *hook) = 0;
virtual FWL_ERR GetSystemBorder(FX_FLOAT &l, FX_FLOAT &t, FX_FLOAT &r, FX_FLOAT &b) = 0;
diff --git a/xfa/include/fwl/adapter/fwl_sdadapterimp.h b/xfa/include/fwl/adapter/fwl_sdadapterimp.h
index 323a0ba4fc..ba14ae66c6 100644
--- a/xfa/include/fwl/adapter/fwl_sdadapterimp.h
+++ b/xfa/include/fwl/adapter/fwl_sdadapterimp.h
@@ -44,14 +44,14 @@ public:
virtual FX_BOOL CheckMessage();
virtual FX_BOOL IsIdleMessage();
virtual FWL_ERR DispatchMessage();
- virtual FWL_ERR GetWidgetDC(IFWL_Widget *pWidget, FX_LPVOID &pDC);
- virtual FWL_ERR ReleaseWidgetDC(IFWL_Widget *pWidget, FX_LPVOID pDC, CFX_RectF *pClip = 0);
- virtual FX_LPVOID GetWindow(IFWL_Widget *pWidget);
+ virtual FWL_ERR GetWidgetDC(IFWL_Widget *pWidget, void* &pDC);
+ virtual FWL_ERR ReleaseWidgetDC(IFWL_Widget *pWidget, void* pDC, CFX_RectF *pClip = 0);
+ virtual void* GetWindow(IFWL_Widget *pWidget);
virtual FX_DWORD GetKeyState(FX_DWORD dwVirtKey);
virtual FWL_ERR RunLoop(IFWL_Widget *widget);
virtual FWL_ERR EndLoop();
virtual FWL_ERR InitMenu(IFWL_Menu *pMenu, IFWL_MenuDP *pMenuData);
- virtual FWL_ERR UpdateMenu(IFWL_Menu *pMenu, FX_LPCVOID hItem, int32_t iType);
+ virtual FWL_ERR UpdateMenu(IFWL_Menu *pMenu, const void* hItem, int32_t iType);
virtual int32_t TrackPopupMenu(IFWL_Menu *pMenu, IFWL_MenuDP *pMenuData);
virtual FWL_ERR SetMessageHook(IFWL_AdapterMessageHook *hook);
virtual FWL_ERR GetSystemBorder(FX_FLOAT &l, FX_FLOAT &t, FX_FLOAT &r, FX_FLOAT &b);
diff --git a/xfa/include/fwl/basewidget/fwl_edit.h b/xfa/include/fwl/basewidget/fwl_edit.h
index 78072d0cf8..ae8aea0bd3 100644
--- a/xfa/include/fwl/basewidget/fwl_edit.h
+++ b/xfa/include/fwl/basewidget/fwl_edit.h
@@ -112,7 +112,7 @@ class IFWL_EditDP : public IFWL_DataProvider
#define FWL_EDT_FIND_FLAGS_WholeWord (1L << 1)
#define FWL_EDT_FIND_FLAGS_NoCase (1L << 2)
typedef struct _FWL_HEDTFIND {
- FX_LPVOID pData;
+ void* pData;
}* FWL_HEDTFIND;
class IFWL_Edit : public IFWL_Widget
{
@@ -134,7 +134,7 @@ public:
FWL_ERR SetLimit(int32_t nLimit);
FWL_ERR SetAliasChar(FX_WCHAR wAlias);
FWL_ERR SetFormatString(const CFX_WideString &wsFormat);
- FWL_ERR Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLen);
+ FWL_ERR Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLen);
FWL_ERR DeleteSelections();
FWL_ERR DeleteRange(int32_t nStart, int32_t nCount = -1);
FWL_ERR ReplaceSelections(const CFX_WideStringC &wsReplace);
diff --git a/xfa/include/fwl/basewidget/fwl_listbox.h b/xfa/include/fwl/basewidget/fwl_listbox.h
index 466d919a5e..3d0fa116ce 100644
--- a/xfa/include/fwl/basewidget/fwl_listbox.h
+++ b/xfa/include/fwl/basewidget/fwl_listbox.h
@@ -58,7 +58,7 @@ int32_t m_index;
CFX_RectF m_rect;
END_FWL_EVENT_DEF
typedef struct _FWL_HLISTITEM {
- FX_LPVOID pData;
+ void* pData;
}* FWL_HLISTITEM;
typedef struct _FWL_ListBoxItemData {
IFWL_ListBoxDP *pDataProvider;
@@ -74,9 +74,9 @@ public:
virtual FX_DWORD GetItemStyles(IFWL_Widget *pWidget, FWL_HLISTITEM hItem) = 0;
virtual FWL_ERR GetItemText(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, CFX_WideString &wsText) = 0;
virtual FWL_ERR GetItemRect(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, CFX_RectF &rtItem) = 0;
- virtual FX_LPVOID GetItemData(IFWL_Widget *pWidget, FWL_HLISTITEM hItem) = 0;
+ virtual void* GetItemData(IFWL_Widget *pWidget, FWL_HLISTITEM hItem) = 0;
virtual FWL_ERR SetItemStyles(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, FX_DWORD dwStyle) = 0;
- virtual FWL_ERR SetItemText(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, FX_LPCWSTR pszText) = 0;
+ virtual FWL_ERR SetItemText(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, const FX_WCHAR* pszText) = 0;
virtual FWL_ERR SetItemRect(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, const CFX_RectF &rtItem) = 0;
virtual FX_FLOAT GetItemHeight(IFWL_Widget *pWidget) = 0;
virtual CFX_DIBitmap* GetItemIcon(IFWL_Widget *pWidget, FWL_HLISTITEM hItem) = 0;
diff --git a/xfa/include/fwl/core/fwl_grid.h b/xfa/include/fwl/core/fwl_grid.h
index 0d4e2d61f8..677bd918f5 100644
--- a/xfa/include/fwl/core/fwl_grid.h
+++ b/xfa/include/fwl/core/fwl_grid.h
@@ -37,7 +37,7 @@ enum FWL_GRIDSIZE {
FWL_GRIDSIZE_MaxHeight,
};
typedef struct _FWL_HGRIDCOLROW {
- FX_LPVOID pData;
+ void* pData;
} * FWL_HGRIDCOLROW;
class IFWL_Grid : public IFWL_Content
{
diff --git a/xfa/include/fwl/core/fwl_note.h b/xfa/include/fwl/core/fwl_note.h
index 7e553a9eb2..c3dcead1e4 100644
--- a/xfa/include/fwl/core/fwl_note.h
+++ b/xfa/include/fwl/core/fwl_note.h
@@ -322,7 +322,7 @@ IFWL_Widget *m_pOwner;
END_FWL_EVENT_DEF
BEGIN_FWL_EVENT_DEF(CFWL_EvtMenuCommand, FWL_EVTHASH_MenuCommand)
int32_t m_iCommand;
-FX_LPVOID m_pData;
+void* m_pData;
END_FWL_EVENT_DEF
BEGIN_FWL_EVENT_DEF(CFWL_EvtSizeChanged, FWL_EVTHASH_SizeChanged)
IFWL_Widget *m_pWidget;
@@ -384,6 +384,6 @@ FWL_ERR FWL_AddToolTipTarget(IFWL_ToolTipTarget *pTarget);
FWL_ERR FWL_RemoveToolTipTarget(IFWL_ToolTipTarget *pTarget);
FWL_ERR FWL_SetToolTipInitialDelay(int32_t iDelayTime);
FWL_ERR FWL_SetToolTipAutoPopDelay(int32_t iDelayTime);
-typedef FX_BOOL (*FWLMessageHookCallback)(CFWL_Message *msg, FX_LPVOID info);
-FWL_ERR FWL_SetHook(IFWL_NoteDriver *driver, FWLMessageHookCallback callback, FX_LPVOID info);
+typedef FX_BOOL (*FWLMessageHookCallback)(CFWL_Message *msg, void* info);
+FWL_ERR FWL_SetHook(IFWL_NoteDriver *driver, FWLMessageHookCallback callback, void* info);
#endif
diff --git a/xfa/include/fwl/core/fwl_target.h b/xfa/include/fwl/core/fwl_target.h
index 3c8b531f24..d04a1f9c75 100644
--- a/xfa/include/fwl/core/fwl_target.h
+++ b/xfa/include/fwl/core/fwl_target.h
@@ -20,6 +20,6 @@ public:
FWL_ERR Finalize();
protected:
virtual ~IFWL_Target();
- FX_LPVOID m_pData;
+ void* m_pData;
};
#endif
diff --git a/xfa/include/fwl/core/fwl_theme.h b/xfa/include/fwl/core/fwl_theme.h
index cc29e351d1..9ab970b47c 100644
--- a/xfa/include/fwl/core/fwl_theme.h
+++ b/xfa/include/fwl/core/fwl_theme.h
@@ -45,7 +45,7 @@ public:
int32_t m_iPart;
FX_DWORD m_dwStates;
FX_DWORD m_dwData;
- FX_LPVOID m_pData;
+ void* m_pData;
};
class CFWL_ThemeBackground : public CFWL_ThemePart
{
@@ -82,7 +82,7 @@ public:
virtual FWL_ERR SetThemeMatrix(IFWL_Widget *pWidget, const CFX_Matrix &matrix) = 0;
virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams) = 0;
virtual FX_BOOL DrawText(CFWL_ThemeText *pParams) = 0;
- virtual FX_LPVOID GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity) = 0;
+ virtual void* GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity) = 0;
virtual FX_BOOL IsCustomizedLayout(IFWL_Widget *pWidget) = 0;
virtual FWL_ERR GetPartRect(CFWL_ThemePart *pThemePart, CFX_RectF &rtPart) = 0;
virtual FX_BOOL IsInPart(CFWL_ThemePart *pThemePart, FX_FLOAT fx, FX_FLOAT fy) = 0;
diff --git a/xfa/include/fwl/core/fwl_thread.h b/xfa/include/fwl/core/fwl_thread.h
index 9b001f4fcb..d6bbf93f3a 100644
--- a/xfa/include/fwl/core/fwl_thread.h
+++ b/xfa/include/fwl/core/fwl_thread.h
@@ -10,7 +10,7 @@ class IFWL_NoteDriver;
class IFWL_Thread;
class IFWL_NoteThread;
typedef struct _FWL_HTHREAD {
- FX_LPVOID pData;
+ void* pData;
} *FWL_HTHREAD;
class IFWL_Thread
{
@@ -36,7 +36,7 @@ public:
virtual IFWL_NoteDriver* GetNoteDriver() = 0;
};
typedef struct _FWL_HMUTEX {
- FX_LPVOID pData;
+ void* pData;
} *FWL_HMUTEX;
FWL_HMUTEX FWL_CreateMutex();
FWL_ERR FWL_DestroyMutex(FWL_HMUTEX hMutex);
@@ -45,7 +45,7 @@ FWL_ERR FWL_TryLockMutex(FWL_HMUTEX hMutex);
FWL_ERR FWL_UnlockMutex(FWL_HMUTEX hMutex);
FWL_ERR FWL_IsLockedMutex(FWL_HMUTEX hMutex, FX_BOOL &bLocked);
typedef struct _FWL_HSEMAPHORE {
- FX_LPVOID pData;
+ void* pData;
} *FWL_HSEMAPHORE;
FWL_HSEMAPHORE FWL_CreateSemaphore();
FWL_ERR FWL_DestroySemaphore(FWL_HSEMAPHORE hSemaphore);
diff --git a/xfa/include/fwl/core/fwl_timer.h b/xfa/include/fwl/core/fwl_timer.h
index a71cff72be..a12f92a9d3 100644
--- a/xfa/include/fwl/core/fwl_timer.h
+++ b/xfa/include/fwl/core/fwl_timer.h
@@ -8,7 +8,7 @@
#define _FWL_TIMER_H
class IFWL_Timer;
typedef struct _FWL_HTIMER {
- FX_LPVOID pData;
+ void* pData;
} *FWL_HTIMER;
class IFWL_Timer
{
diff --git a/xfa/include/fwl/core/fwl_widget.h b/xfa/include/fwl/core/fwl_widget.h
index c7ef2d48ca..b6377cdc9f 100644
--- a/xfa/include/fwl/core/fwl_widget.h
+++ b/xfa/include/fwl/core/fwl_widget.h
@@ -38,8 +38,8 @@ public:
FWL_ERR ModifyStylesEx(FX_DWORD dwStylesExAdded, FX_DWORD dwStylesExRemoved);
FX_DWORD GetStates();
FWL_ERR SetStates(FX_DWORD dwStates, FX_BOOL bSet = TRUE);
- FWL_ERR SetPrivateData(FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback);
- FX_LPVOID GetPrivateData(FX_LPVOID module_id);
+ FWL_ERR SetPrivateData(void* module_id, void* pData, PD_CALLBACK_FREEDATA callback);
+ void* GetPrivateData(void* module_id);
FWL_ERR Update();
FWL_ERR LockUpdate();
FWL_ERR UnlockUpdate();
diff --git a/xfa/include/fwl/core/fwl_widgetmgr.h b/xfa/include/fwl/core/fwl_widgetmgr.h
index 9fcb4b682c..95ff26a84c 100644
--- a/xfa/include/fwl/core/fwl_widgetmgr.h
+++ b/xfa/include/fwl/core/fwl_widgetmgr.h
@@ -28,7 +28,7 @@ public:
virtual IFWL_Widget* GetWidget(IFWL_Widget *pWidget, FWL_WGTRELATION eRelation) = 0;
virtual int32_t GetWidgetIndex(IFWL_Widget *pWidget) = 0;
virtual FX_BOOL SetWidgetIndex(IFWL_Widget *pWidget, int32_t nIndex) = 0;
- virtual FX_BOOL IsWidget(FX_LPVOID pObj) = 0;
+ virtual FX_BOOL IsWidget(void* pObj) = 0;
virtual FWL_ERR RepaintWidget(IFWL_Widget *pWidget, const CFX_RectF *pRect = NULL) = 0;
virtual FX_DWORD GetCapability() = 0;
};
diff --git a/xfa/include/fwl/lightwidget/combobox.h b/xfa/include/fwl/lightwidget/combobox.h
index 594c056e83..fe1b5c4f25 100644
--- a/xfa/include/fwl/lightwidget/combobox.h
+++ b/xfa/include/fwl/lightwidget/combobox.h
@@ -36,8 +36,8 @@ public:
FX_BOOL EditRedo(FX_BSTR bsRecord);
FX_BOOL EditUndo(FX_BSTR bsRecord);
FWL_ERR SetMaxListHeight(FX_FLOAT fMaxHeight);
- FWL_ERR SetItemData(int32_t iIndex, FX_LPVOID pData);
- FX_LPVOID GetItemData(int32_t iIndex);
+ FWL_ERR SetItemData(int32_t iIndex, void* pData);
+ void* GetItemData(int32_t iIndex);
FWL_ERR SetListTheme(IFWL_ThemeProvider *pTheme);
FX_BOOL AfterFocusShowDropList();
FWL_ERR OpenDropDownList(FX_BOOL bActivate);
@@ -78,9 +78,9 @@ protected:
virtual FX_DWORD GetItemStyles(IFWL_Widget *pWidget, FWL_HLISTITEM hItem);
virtual FWL_ERR GetItemText(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, CFX_WideString &wsText);
virtual FWL_ERR GetItemRect(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, CFX_RectF& rtItem);
- virtual FX_LPVOID GetItemData(IFWL_Widget *pWidget, FWL_HLISTITEM hItem);
+ virtual void* GetItemData(IFWL_Widget *pWidget, FWL_HLISTITEM hItem);
virtual FWL_ERR SetItemStyles(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, FX_DWORD dwStyle);
- virtual FWL_ERR SetItemText(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, FX_LPCWSTR pszText);
+ virtual FWL_ERR SetItemText(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, const FX_WCHAR* pszText);
virtual FWL_ERR SetItemRect(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, const CFX_RectF& rtItem);
virtual FX_FLOAT GetItemHeight(IFWL_Widget *pWidget);
virtual CFX_DIBitmap* GetItemIcon(IFWL_Widget *pWidget, FWL_HLISTITEM hItem);
@@ -110,6 +110,6 @@ public:
CFX_DIBitmap *m_pDIB;
FX_DWORD m_dwCheckState;
CFX_RectF m_rtCheckBox;
- FX_LPVOID m_pData;
+ void* m_pData;
};
#endif
diff --git a/xfa/include/fwl/lightwidget/edit.h b/xfa/include/fwl/lightwidget/edit.h
index d95baa20e1..94a4ac48e4 100644
--- a/xfa/include/fwl/lightwidget/edit.h
+++ b/xfa/include/fwl/lightwidget/edit.h
@@ -28,7 +28,7 @@ public:
FWL_ERR SetLimit(int32_t nLimit);
FWL_ERR SetAliasChar(FX_WCHAR wAlias);
FWL_ERR SetFormatString(const CFX_WideString &wsFormat);
- FWL_ERR Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLen);
+ FWL_ERR Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLen);
FWL_ERR DeleteSelections();
FWL_ERR DeleteRange(int32_t nStart, int32_t nCount = -1);
FWL_ERR ReplaceSelections(const CFX_WideStringC &wsReplace);
diff --git a/xfa/include/fwl/lightwidget/listbox.h b/xfa/include/fwl/lightwidget/listbox.h
index a8d024abaa..839bc18a9a 100644
--- a/xfa/include/fwl/lightwidget/listbox.h
+++ b/xfa/include/fwl/lightwidget/listbox.h
@@ -34,8 +34,8 @@ public:
FWL_HLISTITEM GetItem(int32_t nIndex);
FWL_ERR SetItemString(FWL_HLISTITEM hItem, FX_WSTR wsText);
FWL_ERR GetItemString(FWL_HLISTITEM hItem, CFX_WideString &wsText);
- FWL_ERR SetItemData(FWL_HLISTITEM hItem, FX_LPVOID pData);
- FX_LPVOID GetItemData(FWL_HLISTITEM hItem);
+ FWL_ERR SetItemData(FWL_HLISTITEM hItem, void* pData);
+ void* GetItemData(FWL_HLISTITEM hItem);
FWL_HLISTITEM GetItemAtPoint(FX_FLOAT fx, FX_FLOAT fy);
FX_DWORD GetItemStates(FWL_HLISTITEM hItem);
CFWL_ListBox();
@@ -56,10 +56,10 @@ protected:
virtual FX_DWORD GetItemStyles(IFWL_Widget *pWidget, FWL_HLISTITEM hItem);
virtual FWL_ERR GetItemText(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, CFX_WideString &wsText);
virtual FWL_ERR GetItemRect(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, CFX_RectF &rtItem);
- virtual FX_LPVOID GetItemData(IFWL_Widget *pWidget, FWL_HLISTITEM hItem);
+ virtual void* GetItemData(IFWL_Widget *pWidget, FWL_HLISTITEM hItem);
virtual FWL_ERR SetItemStyles(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, FX_DWORD dwStyle);
- virtual FWL_ERR SetItemText(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, FX_LPCWSTR pszText);
+ virtual FWL_ERR SetItemText(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, const FX_WCHAR* pszText);
virtual FWL_ERR SetItemRect(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, const CFX_RectF &rtItem);
virtual FX_FLOAT GetItemHeight(IFWL_Widget *pWidget);
virtual CFX_DIBitmap* GetItemIcon(IFWL_Widget *pWidget, FWL_HLISTITEM hItem);
@@ -91,7 +91,7 @@ public:
FX_DWORD m_dwStates;
CFX_WideString m_wsText;
CFX_DIBitmap *m_pDIB;
- FX_LPVOID m_pData;
+ void* m_pData;
FX_DWORD m_dwCheckState;
CFX_RectF m_rtCheckBox;
};
diff --git a/xfa/include/fwl/lightwidget/theme.h b/xfa/include/fwl/lightwidget/theme.h
index 0edd9d4b3d..9c36ab5035 100644
--- a/xfa/include/fwl/lightwidget/theme.h
+++ b/xfa/include/fwl/lightwidget/theme.h
@@ -22,7 +22,7 @@ public:
virtual FWL_ERR SetThemeMatrix(IFWL_Widget *pWidget, const CFX_Matrix &matrix);
virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams);
virtual FX_BOOL DrawText(CFWL_ThemeText *pParams);
- virtual FX_LPVOID GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity);
+ virtual void* GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity);
virtual FX_BOOL IsCustomizedLayout(IFWL_Widget *pWidget);
virtual FWL_ERR GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF &rtPart);
virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart, FX_FLOAT fx, FX_FLOAT fy);
@@ -31,7 +31,7 @@ public:
virtual FWL_ERR Finalize();
CFWL_Theme();
virtual ~CFWL_Theme();
- FWL_ERR SetFont(IFWL_Widget *pWidget, FX_LPCWSTR strFont, FX_FLOAT fFontSize, FX_ARGB rgbFont);
+ FWL_ERR SetFont(IFWL_Widget *pWidget, const FX_WCHAR* strFont, FX_FLOAT fFontSize, FX_ARGB rgbFont);
CFWL_WidgetTP* GetTheme(IFWL_Widget* pWidget);
protected:
CFX_PtrArray m_arrThemes;
diff --git a/xfa/include/fwl/lightwidget/widget.h b/xfa/include/fwl/lightwidget/widget.h
index d581c7fb40..b6bd62bb2a 100644
--- a/xfa/include/fwl/lightwidget/widget.h
+++ b/xfa/include/fwl/lightwidget/widget.h
@@ -62,8 +62,8 @@ public:
FWL_ERR ModifyStylesEx(FX_DWORD dwStylesExAdded, FX_DWORD dwStylesExRemoved);
FX_DWORD GetStates();
FWL_ERR SetStates(FX_DWORD dwStates, FX_BOOL bSet = TRUE);
- FWL_ERR SetPrivateData(FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback);
- FX_LPVOID GetPrivateData(FX_LPVOID module_id);
+ FWL_ERR SetPrivateData(void* module_id, void* pData, PD_CALLBACK_FREEDATA callback);
+ void* GetPrivateData(void* module_id);
FWL_ERR Update();
FWL_ERR LockUpdate();
FWL_ERR UnlockUpdate();
diff --git a/xfa/include/fwl/theme/comboboxtp.h b/xfa/include/fwl/theme/comboboxtp.h
index 1ed39742e6..62b378f653 100644
--- a/xfa/include/fwl/theme/comboboxtp.h
+++ b/xfa/include/fwl/theme/comboboxtp.h
@@ -15,7 +15,7 @@ public:
virtual ~CFWL_ComboBoxTP();
virtual FX_BOOL IsValidWidget(IFWL_Widget *pWidget);
virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams);
- virtual FX_LPVOID GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity);
+ virtual void* GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity);
protected:
void DrawDropDownButton(CFWL_ThemeBackground *pParams, FX_DWORD dwStates, CFX_Matrix *pMatrix);
void DrawStrethHandler(CFWL_ThemeBackground *pParams, FX_DWORD dwStates, CFX_Matrix *pMatrix);
diff --git a/xfa/include/fwl/theme/formtp.h b/xfa/include/fwl/theme/formtp.h
index e531b55a53..55449da6fd 100644
--- a/xfa/include/fwl/theme/formtp.h
+++ b/xfa/include/fwl/theme/formtp.h
@@ -20,7 +20,7 @@ public:
virtual FX_DWORD SetThemeID(IFWL_Widget *pWidget, FX_DWORD dwThemeID, FX_BOOL bChildren = TRUE);
virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams);
virtual FX_BOOL DrawText(CFWL_ThemeText *pParams);
- virtual FX_LPVOID GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity);
+ virtual void* GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity);
virtual FWL_ERR GetPartRect(CFWL_ThemePart *pThemePart, CFX_RectF& rtPart);
protected:
diff --git a/xfa/include/fwl/theme/listboxtp.h b/xfa/include/fwl/theme/listboxtp.h
index aaae2eba38..4b82aa653a 100644
--- a/xfa/include/fwl/theme/listboxtp.h
+++ b/xfa/include/fwl/theme/listboxtp.h
@@ -19,6 +19,6 @@ public:
virtual FWL_ERR Initialize();
virtual FWL_ERR Finalize();
protected:
- void DrawListBoxItem(CFX_Graphics *pGraphics, FX_DWORD dwStates, const CFX_RectF *prtItem, FX_LPVOID pData = NULL, CFX_Matrix *pMatrix = NULL);
+ void DrawListBoxItem(CFX_Graphics *pGraphics, FX_DWORD dwStates, const CFX_RectF *prtItem, void* pData = NULL, CFX_Matrix *pMatrix = NULL);
};
#endif
diff --git a/xfa/include/fwl/theme/monthcalendartp.h b/xfa/include/fwl/theme/monthcalendartp.h
index 6f0624ae9c..f601600659 100644
--- a/xfa/include/fwl/theme/monthcalendartp.h
+++ b/xfa/include/fwl/theme/monthcalendartp.h
@@ -17,7 +17,7 @@ public:
virtual FX_DWORD SetThemeID(IFWL_Widget *pWidget, FX_DWORD dwThemeID, FX_BOOL bChildren = TRUE);
virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams);
virtual FX_BOOL DrawText(CFWL_ThemeText *pParams);
- virtual FX_LPVOID GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity);
+ virtual void* GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity);
virtual FWL_ERR Initialize();
virtual FWL_ERR Finalize();
protected:
diff --git a/xfa/include/fwl/theme/pushbuttontp.h b/xfa/include/fwl/theme/pushbuttontp.h
index f6db37b95e..20df2037ab 100644
--- a/xfa/include/fwl/theme/pushbuttontp.h
+++ b/xfa/include/fwl/theme/pushbuttontp.h
@@ -16,7 +16,7 @@ public:
virtual FX_BOOL IsValidWidget(IFWL_Widget *pWidget);
virtual FX_DWORD SetThemeID(IFWL_Widget *pWidget, FX_DWORD dwThemeID, FX_BOOL bChildren = TRUE);
virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams);
- virtual FX_LPVOID GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity);
+ virtual void* GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity);
virtual FWL_ERR Initialize();
virtual FWL_ERR Finalize();
protected:
diff --git a/xfa/include/fwl/theme/scrollbartp.h b/xfa/include/fwl/theme/scrollbartp.h
index 3153c79ead..94002fbd11 100644
--- a/xfa/include/fwl/theme/scrollbartp.h
+++ b/xfa/include/fwl/theme/scrollbartp.h
@@ -16,7 +16,7 @@ public:
virtual FX_BOOL IsValidWidget(IFWL_Widget *pWidget);
virtual FX_DWORD SetThemeID(IFWL_Widget *pWidget, FX_DWORD dwThemeID, FX_BOOL bChildren = TRUE);
virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams);
- virtual FX_LPVOID GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity);
+ virtual void* GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity);
protected:
void DrawThumbBtn(CFX_Graphics *pGraphics, const CFX_RectF *pRect, FX_BOOL bVert, FWLTHEME_STATE eState, FX_BOOL bPawButton = TRUE, CFX_Matrix *pMatrix = NULL);
void DrawTrack(CFX_Graphics *pGraphics, const CFX_RectF *pRect, FX_BOOL bVert, FWLTHEME_STATE eState, FX_BOOL bLowerTrack, CFX_Matrix *pMatrix = NULL);
diff --git a/xfa/include/fwl/theme/widgettp.h b/xfa/include/fwl/theme/widgettp.h
index 5a07c7ea03..9d0578478e 100644
--- a/xfa/include/fwl/theme/widgettp.h
+++ b/xfa/include/fwl/theme/widgettp.h
@@ -26,7 +26,7 @@ public:
virtual FWL_ERR SetThemeMatrix(IFWL_Widget *pWidget, const CFX_Matrix &matrix);
virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams);
virtual FX_BOOL DrawText(CFWL_ThemeText *pParams);
- virtual FX_LPVOID GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity);
+ virtual void* GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity);
virtual FX_BOOL IsCustomizedLayout(IFWL_Widget *pWidget);
virtual FWL_ERR GetPartRect(CFWL_ThemePart *pThemePart, CFX_RectF &rtPart);
virtual FX_BOOL IsInPart(CFWL_ThemePart *pThemePart, FX_FLOAT fx, FX_FLOAT fy);
@@ -34,7 +34,7 @@ public:
virtual FWL_ERR Initialize();
virtual FWL_ERR Finalize();
virtual ~CFWL_WidgetTP();
- FWL_ERR SetFont(IFWL_Widget *pWidget, FX_LPCWSTR strFont, FX_FLOAT fFontSize, FX_ARGB rgbFont);
+ FWL_ERR SetFont(IFWL_Widget *pWidget, const FX_WCHAR* strFont, FX_FLOAT fFontSize, FX_ARGB rgbFont);
FWL_ERR SetFont(IFWL_Widget *pWidget, IFX_Font *pFont, FX_FLOAT fFontSize, FX_ARGB rgbFont);
IFX_Font* GetFont(IFWL_Widget *pWidget);
protected:
diff --git a/xfa/include/fxfa/fxfa.h b/xfa/include/fxfa/fxfa.h
index b732f98d9c..a6cc5e1484 100644
--- a/xfa/include/fxfa/fxfa.h
+++ b/xfa/include/fxfa/fxfa.h
@@ -337,7 +337,7 @@ public:
const CFX_RectF &rtAnchor, CFX_RectF &rtPopup) = 0;
virtual FX_BOOL PopupMenu(IXFA_Widget* hWidget, CFX_PointF ptPopup, const CFX_RectF* pRectExclude = NULL) = 0;
virtual void PageViewEvent(IXFA_PageView* pPageView, FX_DWORD dwFlags) = 0;
- virtual void WidgetEvent(IXFA_Widget* hWidget, CXFA_WidgetAcc* pWidgetData, FX_DWORD dwEvent, FX_LPVOID pParam = NULL, FX_LPVOID pAdditional = NULL) = 0;
+ virtual void WidgetEvent(IXFA_Widget* hWidget, CXFA_WidgetAcc* pWidgetData, FX_DWORD dwEvent, void* pParam = NULL, void* pAdditional = NULL) = 0;
virtual FX_BOOL RenderCustomWidget(IXFA_Widget* hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix, const CFX_RectF& rtUI)
{
return FALSE;
@@ -640,8 +640,8 @@ public:
virtual void GetName(IXFA_Widget* hWidget, CFX_WideString &wsName, int32_t iNameType = 0) = 0;
virtual FX_BOOL GetToolTip(IXFA_Widget* hWidget, CFX_WideString &wsToolTip) = 0;
- virtual void SetPrivateData(IXFA_Widget* hWidget, FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback) = 0;
- virtual FX_LPVOID GetPrivateData(IXFA_Widget* hWidget, FX_LPVOID module_id) = 0;
+ virtual void SetPrivateData(IXFA_Widget* hWidget, void* module_id, void* pData, PD_CALLBACK_FREEDATA callback) = 0;
+ virtual void* GetPrivateData(IXFA_Widget* hWidget, void* module_id) = 0;
virtual FX_BOOL OnMouseEnter(IXFA_Widget* hWidget) = 0;
virtual FX_BOOL OnMouseExit(IXFA_Widget* hWidget) = 0;
virtual FX_BOOL OnLButtonDown(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy) = 0;
diff --git a/xfa/include/fxfa/fxfa_basic.h b/xfa/include/fxfa/fxfa_basic.h
index dcf1ac2e95..b157fff24c 100644
--- a/xfa/include/fxfa/fxfa_basic.h
+++ b/xfa/include/fxfa/fxfa_basic.h
@@ -77,9 +77,9 @@ enum XFA_XDPPACKET_FLAGS {
};
typedef struct _XFA_PACKETINFO {
uint32_t uHash;
- FX_LPCWSTR pName;
+ const FX_WCHAR* pName;
XFA_XDPPACKET eName;
- FX_LPCWSTR pURI;
+ const FX_WCHAR* pURI;
FX_DWORD eFlags;
} XFA_PACKETINFO, * XFA_LPPACKETINFO;
typedef XFA_PACKETINFO const * XFA_LPCPACKETINFO;
@@ -920,7 +920,7 @@ enum XFA_ELEMENT {
#define XFA_ELEMENT_UNKNOWN ((XFA_ELEMENT)-1)
typedef struct _XFA_ELEMENTINFO {
uint32_t uHash;
- FX_LPCWSTR pName;
+ const FX_WCHAR* pName;
XFA_ELEMENT eName;
FX_DWORD dwPackets;
FX_DWORD eObjectType;
@@ -939,17 +939,17 @@ enum XFA_ATTRIBUTETYPE {
};
typedef struct _XFA_ATTRIBUTEINFO {
uint32_t uHash;
- FX_LPCWSTR pName;
+ const FX_WCHAR* pName;
XFA_ATTRIBUTE eName;
XFA_ATTRIBUTETYPE eType;
FX_DWORD dwPackets;
- FX_LPVOID pDefValue;
+ void* pDefValue;
} XFA_ATTRIBUTEINFO, * XFA_LPATTRIBUTEINFO;
typedef XFA_ATTRIBUTEINFO const * XFA_LPCATTRIBUTEINFO;
int32_t XFA_GetAttributeCount();
XFA_LPCATTRIBUTEINFO XFA_GetAttributeByName(FX_WSTR wsName);
XFA_LPCATTRIBUTEINFO XFA_GetAttributeByID(XFA_ATTRIBUTE eName);
-FX_BOOL XFA_GetAttributeDefaultValue(FX_LPVOID &pValue, XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, XFA_ATTRIBUTETYPE eType, FX_DWORD dwPacket);
+FX_BOOL XFA_GetAttributeDefaultValue(void* &pValue, XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, XFA_ATTRIBUTETYPE eType, FX_DWORD dwPacket);
XFA_ATTRIBUTEENUM XFA_GetAttributeDefaultValue_Enum(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, FX_DWORD dwPacket);
CFX_WideStringC XFA_GetAttributeDefaultValue_Cdata(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, FX_DWORD dwPacket);
FX_BOOL XFA_GetAttributeDefaultValue_Boolean(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, FX_DWORD dwPacket);
@@ -969,8 +969,8 @@ typedef struct _XFA_SCRIPTHIERARCHY {
int16_t wParentIndex;
} XFA_SCRIPTHIERARCHY, * XFA_LPSCRIPTHIERARCHY;
typedef XFA_SCRIPTHIERARCHY const * XFA_LPCSCRIPTHIERARCHY;
-FX_LPCWORD XFA_GetElementChildren(XFA_ELEMENT eElement, int32_t &iCount);
-FX_LPCBYTE XFA_GetElementAttributes(XFA_ELEMENT eElement, int32_t &iCount);
+const FX_WORD* XFA_GetElementChildren(XFA_ELEMENT eElement, int32_t &iCount);
+const uint8_t* XFA_GetElementAttributes(XFA_ELEMENT eElement, int32_t &iCount);
XFA_LPCELEMENTINFO XFA_GetChildOfElement(XFA_ELEMENT eElement, XFA_ELEMENT eChild, FX_DWORD dwPacket);
XFA_LPCATTRIBUTEINFO XFA_GetAttributeOfElement(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, FX_DWORD dwPacket);
#define XFA_PROPERTYFLAG_OneOf 0x01
@@ -985,7 +985,7 @@ XFA_LPCPROPERTY XFA_GetElementProperties(XFA_ELEMENT eElement, int32_t &iCount);
XFA_LPCPROPERTY XFA_GetPropertyOfElement(XFA_ELEMENT eElement, XFA_ELEMENT eProperty, FX_DWORD dwPacket);
typedef struct _XFA_ATTRIBUTEENUMINFO {
uint32_t uHash;
- FX_LPCWSTR pName;
+ const FX_WCHAR* pName;
XFA_ATTRIBUTEENUM eName;
} XFA_ATTRIBUTEENUMINFO, * XFA_LPATTRIBUTEENUMINFO;
typedef XFA_ATTRIBUTEENUMINFO const * XFA_LPCATTRIBUTEENUMINFO;
@@ -1050,7 +1050,7 @@ class CXFA_Object;
typedef void (CXFA_Object::*XFA_METHOD_CALLBACK) (CFXJSE_Arguments* pArguments);
typedef struct _XFA_METHODINFO {
uint32_t uHash;
- FX_LPCWSTR pName;
+ const FX_WCHAR* pName;
XFA_METHOD_CALLBACK lpfnCallback;
} XFA_METHODINFO, * XFA_LPMETHODINFO;
typedef XFA_METHODINFO const * XFA_LPCMETHODINFO;
@@ -1063,7 +1063,7 @@ enum XFA_SCRIPT_TYPE {
};
typedef struct _XFA_SCRIPTATTRIBUTEINFO {
uint32_t uHash;
- FX_LPCWSTR pName;
+ const FX_WCHAR* pName;
XFA_ATTRIBUTE_CALLBACK lpfnCallback;
int32_t eAttribute;
FX_WORD eValueType;
diff --git a/xfa/include/fxfa/fxfa_widget.h b/xfa/include/fxfa/fxfa_widget.h
index 0ec3eaaaf4..21d007d7f1 100644
--- a/xfa/include/fxfa/fxfa_widget.h
+++ b/xfa/include/fxfa/fxfa_widget.h
@@ -63,7 +63,7 @@ public:
void SetImageImage(CFX_DIBitmap* newImage);
void SetImageEditImage(CFX_DIBitmap* newImage);
void UpdateUIDisplay(CXFA_FFWidget* pExcept = NULL);
- void NotifyEvent(FX_DWORD dwEvent, CXFA_FFWidget* pWidget = NULL, FX_LPVOID pParam = NULL, FX_LPVOID pAdditional = NULL);
+ void NotifyEvent(FX_DWORD dwEvent, CXFA_FFWidget* pWidget = NULL, void* pParam = NULL, void* pAdditional = NULL);
CXFA_Node* GetDatasets();
diff --git a/xfa/include/fxjse/fxjse.h b/xfa/include/fxjse/fxjse.h
index c0ec9c91d6..56187158d5 100644
--- a/xfa/include/fxjse/fxjse.h
+++ b/xfa/include/fxjse/fxjse.h
@@ -8,16 +8,16 @@
#define _FXJSE_H_
typedef struct FXJSE_HRUNTIME_ {
- FX_LPVOID pData;
+ void* pData;
}* FXJSE_HRUNTIME;
typedef struct FXJSE_HCONTEXT_ {
- FX_LPVOID pData;
+ void* pData;
}* FXJSE_HCONTEXT;
typedef struct FXJSE_HCLASS_ {
- FX_LPVOID pData;
+ void* pData;
}* FXJSE_HCLASS;
typedef struct FXJSE_HVALUE_ {
- FX_LPVOID pData;
+ void* pData;
}* FXJSE_HVALUE;
typedef struct FXJSE_HOBJECT_ : public FXJSE_HVALUE_ {
}* FXJSE_HOBJECT;
@@ -28,7 +28,7 @@ void FXJSE_Finalize();
FXJSE_HRUNTIME FXJSE_Runtime_Create();
void FXJSE_Runtime_Release(FXJSE_HRUNTIME hRuntime);
typedef struct _FXJSE_CLASS FXJSE_CLASS;
-FXJSE_HCONTEXT FXJSE_Context_Create (FXJSE_HRUNTIME hRuntime, const FXJSE_CLASS* lpGlobalClass = NULL, FX_LPVOID lpGlobalObject = NULL);
+FXJSE_HCONTEXT FXJSE_Context_Create (FXJSE_HRUNTIME hRuntime, const FXJSE_CLASS* lpGlobalClass = NULL, void* lpGlobalObject = NULL);
void FXJSE_Context_Release (FXJSE_HCONTEXT hContext);
FXJSE_HVALUE FXJSE_Context_GetGlobalObject(FXJSE_HCONTEXT hContext);
FXJSE_HRUNTIME FXJSE_Context_GetRuntime(FXJSE_HCONTEXT hContext);
@@ -47,7 +47,7 @@ public:
int32_t GetInt32(int32_t index) const;
FX_FLOAT GetFloat(int32_t index) const;
CFX_ByteString GetUTF8String(int32_t index) const;
- FX_LPVOID GetObject(int32_t index, FXJSE_HCLASS hClass = NULL) const;
+ void* GetObject(int32_t index, FXJSE_HCLASS hClass = NULL) const;
FXJSE_HVALUE GetReturnValue();
};
typedef void (*FXJSE_FuncCallback) (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
@@ -55,13 +55,13 @@ typedef void (*FXJSE_PropAccessor) (FXJSE_HOBJECT hObject, FX_BSTR szPropName, F
typedef int32_t(*FXJSE_PropTypeGetter) (FXJSE_HOBJECT hObject, FX_BSTR szPropName, FX_BOOL bQueryIn);
typedef FX_BOOL (*FXJSE_PropDeleter) (FXJSE_HOBJECT hObject, FX_BSTR szPropName);
typedef struct _FXJSE_FUNCTION {
- FX_LPCSTR name;
+ const FX_CHAR* name;
FXJSE_FuncCallback callbackProc;
} FXJSE_FUNCTION;
#define FXJSE_DEF_FUNCTION(functionName, functionCallback) {functionName, functionCallback}
void FXJSE_DefineFunctions(FXJSE_HCONTEXT hContext, const FXJSE_FUNCTION* lpFunctions, int nNum);
typedef struct _FXJSE_PROPERTY {
- FX_LPCSTR name;
+ const FX_CHAR* name;
FXJSE_PropAccessor getProc;
FXJSE_PropAccessor setProc;
} FXJSE_PROPERTY;
@@ -71,7 +71,7 @@ enum FXJSE_ClassPropTypes {
FXJSE_ClassPropType_Method
};
typedef struct _FXJSE_CLASS {
- FX_LPCSTR name;
+ const FX_CHAR* name;
FXJSE_FuncCallback constructor;
FXJSE_PROPERTY* properties;
FXJSE_FUNCTION* methods;
@@ -103,7 +103,7 @@ FX_FLOAT FXJSE_Value_ToFloat (FXJSE_HVALUE hValue);
FXJSE_DOUBLE FXJSE_Value_ToDouble (FXJSE_HVALUE hValue);
int32_t FXJSE_Value_ToInteger (FXJSE_HVALUE hValue);
void FXJSE_Value_ToUTF8String (FXJSE_HVALUE hValue, CFX_ByteString& szStrOutput);
-FX_LPVOID FXJSE_Value_ToObject (FXJSE_HVALUE hValue, FXJSE_HCLASS hClass);
+void* FXJSE_Value_ToObject (FXJSE_HVALUE hValue, FXJSE_HCLASS hClass);
void FXJSE_Value_SetUndefined (FXJSE_HVALUE hValue);
void FXJSE_Value_SetNull (FXJSE_HVALUE hValue);
void FXJSE_Value_SetBoolean (FXJSE_HVALUE hValue, FX_BOOL bBoolean);
@@ -111,7 +111,7 @@ void FXJSE_Value_SetUTF8String (FXJSE_HVALUE hValue, FX_BSTR szString);
void FXJSE_Value_SetInteger (FXJSE_HVALUE hValue, int32_t nInteger);
void FXJSE_Value_SetFloat (FXJSE_HVALUE hValue, FX_FLOAT fFloat);
void FXJSE_Value_SetDouble (FXJSE_HVALUE hValue, FXJSE_DOUBLE dDouble);
-void FXJSE_Value_SetObject (FXJSE_HVALUE hValue, FX_LPVOID lpObject, FXJSE_HCLASS hClass);
+void FXJSE_Value_SetObject (FXJSE_HVALUE hValue, void* lpObject, FXJSE_HCLASS hClass);
void FXJSE_Value_SetArray (FXJSE_HVALUE hValue, uint32_t uValueCount, FXJSE_HVALUE* rgValues);
void FXJSE_Value_SetDate (FXJSE_HVALUE hValue, FXJSE_DOUBLE dDouble);
void FXJSE_Value_Set (FXJSE_HVALUE hValue, FXJSE_HVALUE hOriginalValue);
@@ -124,7 +124,7 @@ FX_BOOL FXJSE_Value_ObjectHasOwnProp (FXJSE_HVALUE hValue, FX_BSTR szPropName,
FX_BOOL FXJSE_Value_SetObjectOwnProp (FXJSE_HVALUE hValue, FX_BSTR szPropName, FXJSE_HVALUE hPropValue);
FX_BOOL FXJSE_Value_CallFunction (FXJSE_HVALUE hFunction, FXJSE_HVALUE hThis, FXJSE_HVALUE hRetValue, uint32_t nArgCount, FXJSE_HVALUE* lpArgs);
FX_BOOL FXJSE_Value_SetFunctionBind (FXJSE_HVALUE hValue, FXJSE_HVALUE hOldFunction, FXJSE_HVALUE hNewThis);
-FX_BOOL FXJSE_ExecuteScript(FXJSE_HCONTEXT hContext, FX_LPCSTR szScript, FXJSE_HVALUE hRetValue, FXJSE_HVALUE hNewThisObject = NULL);
+FX_BOOL FXJSE_ExecuteScript(FXJSE_HCONTEXT hContext, const FX_CHAR* szScript, FXJSE_HVALUE hRetValue, FXJSE_HVALUE hNewThisObject = NULL);
void FXJSE_ThrowMessage(FX_BSTR utf8Name, FX_BSTR utf8Message);
FX_BOOL FXJSE_ReturnValue_GetMessage(FXJSE_HVALUE hRetValue, CFX_ByteString& utf8Name, CFX_ByteString& utf8Message);
FX_BOOL FXJSE_ReturnValue_GetLineInfo(FXJSE_HVALUE hRetValue, int32_t& nLine, int32_t& nCol);
diff --git a/xfa/src/fdp/include/fde_css.h b/xfa/src/fdp/include/fde_css.h
index 0c9b323954..c55f6c471e 100644
--- a/xfa/src/fdp/include/fde_css.h
+++ b/xfa/src/fdp/include/fde_css.h
@@ -242,9 +242,9 @@ public:
virtual FDE_CSSPRIMITIVETYPE GetPrimitiveType() const = 0;
virtual FX_ARGB GetRGBColor() const = 0;
virtual FX_FLOAT GetFloat() const = 0;
- virtual FX_LPCWSTR GetString(int32_t &iLength) const = 0;
+ virtual const FX_WCHAR* GetString(int32_t &iLength) const = 0;
virtual FDE_CSSPROPERTYVALUE GetEnum() const = 0;
- virtual FX_LPCWSTR GetFuncName() const = 0;
+ virtual const FX_WCHAR* GetFuncName() const = 0;
virtual int32_t CountArgs() const = 0;
virtual IFDE_CSSValue* GetArgs(int32_t index) const = 0;
};
@@ -458,7 +458,7 @@ class IFDE_CSSStyleSheet : public IFX_Unknown
public:
static IFDE_CSSStyleSheet* LoadHTMLStandardStyleSheet();
static IFDE_CSSStyleSheet* LoadFromStream(const CFX_WideString &szUrl, IFX_Stream *pStream, FX_WORD wCodePage, FX_DWORD dwMediaList = FDE_CSSMEDIATYPE_ALL);
- static IFDE_CSSStyleSheet* LoadFromBuffer(const CFX_WideString &szUrl, FX_LPCWSTR pBuffer, int32_t iBufSize, FX_WORD wCodePage, FX_DWORD dwMediaList = FDE_CSSMEDIATYPE_ALL);
+ static IFDE_CSSStyleSheet* LoadFromBuffer(const CFX_WideString &szUrl, const FX_WCHAR* pBuffer, int32_t iBufSize, FX_WORD wCodePage, FX_DWORD dwMediaList = FDE_CSSMEDIATYPE_ALL);
virtual FX_BOOL GetUrl(CFX_WideString &szUrl) = 0;
virtual FX_DWORD GetMediaList() const = 0;
virtual FX_WORD GetCodePage() const = 0;
@@ -504,10 +504,10 @@ public:
static IFDE_CSSSyntaxParser* Create();
virtual void Release() = 0;
virtual FX_BOOL Init(IFX_Stream *pStream, int32_t iCSSPlaneSize, int32_t iTextDataSize = 32, FX_BOOL bOnlyDeclaration = FALSE) = 0;
- virtual FX_BOOL Init(FX_LPCWSTR pBuffer, int32_t iBufferSize, int32_t iTextDatSize = 32, FX_BOOL bOnlyDeclaration = FALSE) = 0;
+ virtual FX_BOOL Init(const FX_WCHAR* pBuffer, int32_t iBufferSize, int32_t iTextDatSize = 32, FX_BOOL bOnlyDeclaration = FALSE) = 0;
virtual FDE_CSSSYNTAXSTATUS DoSyntaxParse() = 0;
- virtual FX_LPCWSTR GetCurrentString(int32_t &iLength) const = 0;
+ virtual const FX_WCHAR* GetCurrentString(int32_t &iLength) const = 0;
};
enum FDE_CSSLENGTHUNIT {
FDE_CSSLENGTHUNIT_Auto,
@@ -868,18 +868,18 @@ class IFDE_CSSGeneratedContentStyle
{
public:
virtual int32_t CountCounters() = 0;
- virtual FX_LPCWSTR GetCounterIdentifier(int32_t index) = 0;
+ virtual const FX_WCHAR* GetCounterIdentifier(int32_t index) = 0;
virtual FX_BOOL GetCounterReset(int32_t index, int32_t &iValue) = 0;
virtual FX_BOOL GetCounterIncrement(int32_t index, int32_t &iValue) = 0;
virtual IFDE_CSSValueList* GetContent() const = 0;
virtual int32_t CountQuotes() const = 0;
- virtual FX_LPCWSTR GetQuotes(int32_t index) const = 0;
+ virtual const FX_WCHAR* GetQuotes(int32_t index) const = 0;
};
class IFDE_CSSFontStyle
{
public:
virtual int32_t CountFontFamilies() const = 0;
- virtual FX_LPCWSTR GetFontFamily(int32_t index) const = 0;
+ virtual const FX_WCHAR* GetFontFamily(int32_t index) const = 0;
virtual FX_WORD GetFontWeight() const = 0;
virtual FDE_CSSFONTVARIANT GetFontVariant() const = 0;
virtual FDE_CSSFONTSTYLE GetFontStyle() const = 0;
@@ -964,7 +964,7 @@ public:
virtual FDE_CSSLINEBREAK GetLineBreak() const = 0;
virtual FDE_CSSTEXTEMPHASISMARK GetTextEmphasisMark() const = 0;
virtual FDE_CSSTEXTEMPHASISFILL GetTextEmphasisFill() const = 0;
- virtual FX_LPCWSTR GetTextEmphasisCustom() const = 0;
+ virtual const FX_WCHAR* GetTextEmphasisCustom() const = 0;
virtual FDE_CSSTEXTCOMBINE GetTextCombineType() const = 0;
virtual FX_BOOL HasTextCombineNumber() const = 0;
virtual FX_FLOAT GetTextCombineNumber() const = 0;
@@ -992,7 +992,7 @@ class IFDE_CSSBackgroundStyle
{
public:
virtual FX_ARGB GetBKGColor() const = 0;
- virtual FX_LPCWSTR GetBKGImage() const = 0;
+ virtual const FX_WCHAR* GetBKGImage() const = 0;
virtual FDE_CSSBKGREPEAT GetBKGRepeat() const = 0;
virtual FDE_CSSBKGATTACHMENT GetBKGAttachment() const = 0;
virtual const FDE_CSSPOINT& GetBKGPosition() const = 0;
@@ -1004,7 +1004,7 @@ class IFDE_CSSListStyle
public:
virtual FDE_CSSLISTSTYLETYPE GetListStyleType() const = 0;
virtual FDE_CSSLISTSTYLEPOSITION GetListStylePosition() const = 0;
- virtual FX_LPCWSTR GetListStyleImage() const = 0;
+ virtual const FX_WCHAR* GetListStyleImage() const = 0;
virtual void SetListStyleType(FDE_CSSLISTSTYLETYPE eListStyleType) = 0;
virtual void SetListStylePosition(FDE_CSSLISTSTYLEPOSITION eListStylePosition) = 0;
};
diff --git a/xfa/src/fdp/include/fde_psr.h b/xfa/src/fdp/include/fde_psr.h
index 974f4cc879..9934cfae09 100644
--- a/xfa/src/fdp/include/fde_psr.h
+++ b/xfa/src/fdp/include/fde_psr.h
@@ -14,7 +14,7 @@ enum FDE_VISUALOBJTYPE {
FDE_VISUALOBJ_Widget = 0x08 ,
};
typedef struct _FDE_HVISUALOBJ {
- FX_LPVOID pData;
+ void* pData;
} const * FDE_HVISUALOBJ;
class IFDE_VisualSet
{
diff --git a/xfa/src/fdp/include/fde_rdv.h b/xfa/src/fdp/include/fde_rdv.h
index eb79a81c9b..41e8d5c43d 100644
--- a/xfa/src/fdp/include/fde_rdv.h
+++ b/xfa/src/fdp/include/fde_rdv.h
@@ -13,7 +13,7 @@ class CFX_DIBitmap;
class CFX_DIBSource;
class IFDE_RenderDevice;
typedef struct _FDE_HDEVICESTATE {
- FX_LPVOID pData;
+ void* pData;
} * FDE_HDEVICESTATE;
class IFDE_RenderDevice
{
diff --git a/xfa/src/fdp/include/fde_tto.h b/xfa/src/fdp/include/fde_tto.h
index 8b4d1d4787..ec27490cfd 100644
--- a/xfa/src/fdp/include/fde_tto.h
+++ b/xfa/src/fdp/include/fde_tto.h
@@ -51,19 +51,19 @@ public:
virtual void SetClipRect(const CFX_RectF &rtClip) = 0;
virtual void SetMatrix(const CFX_Matrix &matrix) = 0;
virtual void SetLineBreakTolerance(FX_FLOAT fTolerance) = 0;
- virtual void CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_Size &size) = 0;
- virtual void CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_SizeF &size) = 0;
- virtual void CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_Rect &rect) = 0;
- virtual void CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_RectF &rect) = 0;
- virtual void DrawText(FX_LPCWSTR pwsStr, int32_t iLength, int32_t x, int32_t y) = 0;
- virtual void DrawText(FX_LPCWSTR pwsStr, int32_t iLength, FX_FLOAT x, FX_FLOAT y) = 0;
- virtual void DrawText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_Rect &rect) = 0;
- virtual void DrawText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_RectF &rect) = 0;
+ virtual void CalcSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_Size &size) = 0;
+ virtual void CalcSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_SizeF &size) = 0;
+ virtual void CalcSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_Rect &rect) = 0;
+ virtual void CalcSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_RectF &rect) = 0;
+ virtual void DrawText(const FX_WCHAR* pwsStr, int32_t iLength, int32_t x, int32_t y) = 0;
+ virtual void DrawText(const FX_WCHAR* pwsStr, int32_t iLength, FX_FLOAT x, FX_FLOAT y) = 0;
+ virtual void DrawText(const FX_WCHAR* pwsStr, int32_t iLength, const CFX_Rect &rect) = 0;
+ virtual void DrawText(const FX_WCHAR* pwsStr, int32_t iLength, const CFX_RectF &rect) = 0;
virtual void SetLogicClipRect(const CFX_RectF &rtClip) = 0;
- virtual void CalcLogicSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_SizeF &size) = 0;
- virtual void CalcLogicSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_RectF &rect) = 0;
- virtual void DrawLogicText(FX_LPCWSTR pwsStr, int32_t iLength, FX_FLOAT x, FX_FLOAT y) = 0;
- virtual void DrawLogicText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_RectF &rect) = 0;
+ virtual void CalcLogicSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_SizeF &size) = 0;
+ virtual void CalcLogicSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_RectF &rect) = 0;
+ virtual void DrawLogicText(const FX_WCHAR* pwsStr, int32_t iLength, FX_FLOAT x, FX_FLOAT y) = 0;
+ virtual void DrawLogicText(const FX_WCHAR* pwsStr, int32_t iLength, const CFX_RectF &rect) = 0;
virtual int32_t GetTotalLines() = 0;
};
#endif
diff --git a/xfa/src/fdp/include/fde_xml.h b/xfa/src/fdp/include/fde_xml.h
index eddb9a1835..2ffa30c0fd 100644
--- a/xfa/src/fdp/include/fde_xml.h
+++ b/xfa/src/fdp/include/fde_xml.h
@@ -51,7 +51,7 @@ public:
virtual int32_t CountChildNodes() const = 0;
virtual IFDE_XMLNode* GetChildNode(int32_t index) const = 0;
virtual int32_t GetChildNodeIndex(IFDE_XMLNode *pNode) const = 0;
- virtual IFDE_XMLNode* GetPath(FX_LPCWSTR pPath, int32_t iLength = -1, FX_BOOL bQualifiedName = TRUE) const = 0;
+ virtual IFDE_XMLNode* GetPath(const FX_WCHAR* pPath, int32_t iLength = -1, FX_BOOL bQualifiedName = TRUE) const = 0;
virtual int32_t InsertChildNode(IFDE_XMLNode *pNode, int32_t index = -1) = 0;
virtual void RemoveChildNode(IFDE_XMLNode *pNode) = 0;
virtual void DeleteChildren() = 0;
@@ -70,14 +70,14 @@ public:
virtual void GetTargetName(CFX_WideString &wsTarget) const = 0;
virtual int32_t CountAttributes() const = 0;
virtual FX_BOOL GetAttribute(int32_t index, CFX_WideString &wsAttriName, CFX_WideString &wsAttriValue) const = 0;
- virtual FX_BOOL HasAttribute(FX_LPCWSTR pwsAttriName) const = 0;
- virtual void GetString(FX_LPCWSTR pwsAttriName, CFX_WideString &wsAttriValue, FX_LPCWSTR pwsDefValue = NULL) const = 0;
+ virtual FX_BOOL HasAttribute(const FX_WCHAR* pwsAttriName) const = 0;
+ virtual void GetString(const FX_WCHAR* pwsAttriName, CFX_WideString &wsAttriValue, const FX_WCHAR* pwsDefValue = NULL) const = 0;
virtual void SetString(const CFX_WideString &wsAttriName, const CFX_WideString &wsAttriValue) = 0;
- virtual int32_t GetInteger(FX_LPCWSTR pwsAttriName, int32_t iDefValue = 0) const = 0;
- virtual void SetInteger(FX_LPCWSTR pwsAttriName, int32_t iAttriValue) = 0;
- virtual FX_FLOAT GetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fDefValue = 0) const = 0;
- virtual void SetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fAttriValue) = 0;
- virtual void RemoveAttribute(FX_LPCWSTR pwsAttriName) = 0;
+ virtual int32_t GetInteger(const FX_WCHAR* pwsAttriName, int32_t iDefValue = 0) const = 0;
+ virtual void SetInteger(const FX_WCHAR* pwsAttriName, int32_t iAttriValue) = 0;
+ virtual FX_FLOAT GetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fDefValue = 0) const = 0;
+ virtual void SetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fAttriValue) = 0;
+ virtual void RemoveAttribute(const FX_WCHAR* pwsAttriName) = 0;
virtual int32_t CountData() const = 0;
virtual FX_BOOL GetData(int32_t index, CFX_WideString &wsData) const = 0;
virtual void AppendData(const CFX_WideString &wsData) = 0;
@@ -93,14 +93,14 @@ public:
virtual void GetNamespaceURI(CFX_WideString &wsNamespace) const = 0;
virtual int32_t CountAttributes() const = 0;
virtual FX_BOOL GetAttribute(int32_t index, CFX_WideString &wsAttriName, CFX_WideString &wsAttriValue) const = 0;
- virtual FX_BOOL HasAttribute(FX_LPCWSTR pwsAttriName) const = 0;
- virtual void GetString(FX_LPCWSTR pwsAttriName, CFX_WideString &wsAttriValue, FX_LPCWSTR pwsDefValue = NULL) const = 0;
+ virtual FX_BOOL HasAttribute(const FX_WCHAR* pwsAttriName) const = 0;
+ virtual void GetString(const FX_WCHAR* pwsAttriName, CFX_WideString &wsAttriValue, const FX_WCHAR* pwsDefValue = NULL) const = 0;
virtual void SetString(const CFX_WideString &wsAttriName, const CFX_WideString &wsAttriValue) = 0;
- virtual int32_t GetInteger(FX_LPCWSTR pwsAttriName, int32_t iDefValue = 0) const = 0;
- virtual void SetInteger(FX_LPCWSTR pwsAttriName, int32_t iAttriValue) = 0;
- virtual FX_FLOAT GetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fDefValue = 0) const = 0;
- virtual void SetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fAttriValue) = 0;
- virtual void RemoveAttribute(FX_LPCWSTR pwsAttriName) = 0;
+ virtual int32_t GetInteger(const FX_WCHAR* pwsAttriName, int32_t iDefValue = 0) const = 0;
+ virtual void SetInteger(const FX_WCHAR* pwsAttriName, int32_t iAttriValue) = 0;
+ virtual FX_FLOAT GetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fDefValue = 0) const = 0;
+ virtual void SetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fAttriValue) = 0;
+ virtual void RemoveAttribute(const FX_WCHAR* pwsAttriName) = 0;
virtual void GetTextData(CFX_WideString &wsText) const = 0;
virtual void SetTextData(const CFX_WideString &wsText) = 0;
};
@@ -124,7 +124,7 @@ public:
virtual void SetCharData(const CFX_WideString &wsCData) = 0;
};
typedef struct _FDE_XMLREADERHANDLER {
- FX_LPVOID pData;
+ void* pData;
void (*OnTagEnter)(_FDE_XMLREADERHANDLER *pThis, FDE_XMLNODETYPE eType, const CFX_WideString &wsTagName);
void (*OnTagBreak)(_FDE_XMLREADERHANDLER *pThis, const CFX_WideString &wsTagName);
diff --git a/xfa/src/fdp/src/css/fde_csscache.cpp b/xfa/src/fdp/src/css/fde_csscache.cpp
index 7b91401ac5..3c061082e2 100644
--- a/xfa/src/fdp/src/css/fde_csscache.cpp
+++ b/xfa/src/fdp/src/css/fde_csscache.cpp
@@ -31,7 +31,7 @@ CFDE_CSSStyleSheetCache::~CFDE_CSSStyleSheetCache()
FX_POSITION pos = m_Stylesheets.GetStartPosition();
if (pos != NULL) {
CFX_ByteString szKey;
- FX_LPVOID pValue;
+ void* pValue;
while (pos != NULL) {
m_Stylesheets.GetNextAssoc(pos, szKey, pValue);
FDE_DeleteWith(FDE_CSSCACHEITEM, m_pFixedStore, (FDE_LPCSSCACHEITEM)pValue);
@@ -49,7 +49,7 @@ void CFDE_CSSStyleSheetCache::AddStyleSheet(FX_BSTR szKey, IFDE_CSSStyleSheet *p
m_pFixedStore = FX_CreateAllocator(FX_ALLOCTYPE_Fixed, FX_MAX(10, m_iMaxItems), sizeof(FDE_CSSCACHEITEM));
FXSYS_assert(m_pFixedStore != NULL);
}
- FX_LPVOID pValue = NULL;
+ void* pValue = NULL;
if (m_Stylesheets.Lookup(szKey, pValue)) {
FDE_LPCSSCACHEITEM pItem = (FDE_LPCSSCACHEITEM)pValue;
if (pItem->pStylesheet != pStyleSheet) {
@@ -69,7 +69,7 @@ void CFDE_CSSStyleSheetCache::AddStyleSheet(FX_BSTR szKey, IFDE_CSSStyleSheet *p
}
IFDE_CSSStyleSheet* CFDE_CSSStyleSheetCache::GetStyleSheet(FX_BSTR szKey) const
{
- FX_LPVOID pValue = NULL;
+ void* pValue = NULL;
if (m_Stylesheets.Lookup(szKey, pValue)) {
FDE_LPCSSCACHEITEM pItem = (FDE_LPCSSCACHEITEM)pValue;
pItem->dwActivity++;
@@ -80,7 +80,7 @@ IFDE_CSSStyleSheet* CFDE_CSSStyleSheetCache::GetStyleSheet(FX_BSTR szKey) const
}
void CFDE_CSSStyleSheetCache::RemoveStyleSheet(FX_BSTR szKey)
{
- FX_LPVOID pValue = NULL;
+ void* pValue = NULL;
if (!m_Stylesheets.Lookup(szKey, pValue)) {
return;
}
@@ -91,7 +91,7 @@ void CFDE_CSSStyleSheetCache::RemoveLowestActivityItem()
{
FX_POSITION pos = m_Stylesheets.GetStartPosition();
CFX_ByteString szKey;
- FX_LPVOID pValue;
+ void* pValue;
FDE_LPCSSCACHEITEM pItem = NULL;
CFX_ByteString szItem;
while (pos != NULL) {
diff --git a/xfa/src/fdp/src/css/fde_cssdatatable.cpp b/xfa/src/fdp/src/css/fde_cssdatatable.cpp
index 7f42d10ad0..126a3748dd 100644
--- a/xfa/src/fdp/src/css/fde_cssdatatable.cpp
+++ b/xfa/src/fdp/src/css/fde_cssdatatable.cpp
@@ -417,7 +417,7 @@ extern "C" {
{
return (ePersudo < FDE_CSSPERSUDO_NONE) ? (g_FDE_CSSPersudoType + ePersudo) : NULL;
}
- FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByName(FX_LPCWSTR pszName, int32_t iLength)
+ FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByName(const FX_WCHAR* pszName, int32_t iLength)
{
FXSYS_assert(pszName != NULL && iLength > 0);
FX_DWORD dwHash = FX_HashCode_String_GetW(pszName, iLength, TRUE);
@@ -441,7 +441,7 @@ extern "C" {
{
return (eName < FDE_CSSPROPERTY_MAX) ? (g_FDE_CSSProperties + eName) : NULL;
}
- FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByName(FX_LPCWSTR pszName, int32_t iLength)
+ FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByName(const FX_WCHAR* pszName, int32_t iLength)
{
FXSYS_assert(pszName != NULL && iLength > 0);
FX_DWORD dwHash = FX_HashCode_String_GetW(pszName, iLength, TRUE);
@@ -465,7 +465,7 @@ extern "C" {
{
return (eName < FDE_CSSPROPERTYVALUE_MAX) ? (g_FDE_CSSPropertyValues + eName) : NULL;
}
- FDE_LPCCSSMEDIATYPETABLE FDE_GetCSSMediaTypeByName(FX_LPCWSTR pszName, int32_t iLength)
+ FDE_LPCCSSMEDIATYPETABLE FDE_GetCSSMediaTypeByName(const FX_WCHAR* pszName, int32_t iLength)
{
FXSYS_assert(pszName != NULL && iLength > 0);
FX_WORD wHash = (FX_WORD)FX_HashCode_String_GetW(pszName, iLength, TRUE);
@@ -485,7 +485,7 @@ extern "C" {
} while (iStart <= iEnd);
return NULL;
}
- FDE_LPCCSSLENGTHUNITTABLE FDE_GetCSSLengthUnitByName(FX_LPCWSTR pszName, int32_t iLength)
+ FDE_LPCCSSLENGTHUNITTABLE FDE_GetCSSLengthUnitByName(const FX_WCHAR* pszName, int32_t iLength)
{
FXSYS_assert(pszName != NULL && iLength > 0);
FX_WORD wHash = (FX_WORD)FX_HashCode_String_GetW(pszName, iLength, TRUE);
@@ -505,7 +505,7 @@ extern "C" {
} while (iStart <= iEnd);
return NULL;
}
- FDE_LPCCSSCOLORTABLE FDE_GetCSSColorByName(FX_LPCWSTR pszName, int32_t iLength)
+ FDE_LPCCSSCOLORTABLE FDE_GetCSSColorByName(const FX_WCHAR* pszName, int32_t iLength)
{
FXSYS_assert(pszName != NULL && iLength > 0);
FX_DWORD dwHash = FX_HashCode_String_GetW(pszName, iLength, TRUE);
@@ -525,7 +525,7 @@ extern "C" {
} while (iStart <= iEnd);
return NULL;
}
- FX_BOOL FDE_ParseCSSNumber(FX_LPCWSTR pszValue, int32_t iValueLen, FX_FLOAT &fValue, FDE_CSSPRIMITIVETYPE &eUnit)
+ FX_BOOL FDE_ParseCSSNumber(const FX_WCHAR* pszValue, int32_t iValueLen, FX_FLOAT &fValue, FDE_CSSPRIMITIVETYPE &eUnit)
{
FXSYS_assert(pszValue != NULL && iValueLen > 0);
int32_t iUsedLen = 0;
@@ -547,7 +547,7 @@ extern "C" {
return TRUE;
}
- FX_BOOL FDE_ParseCSSString(FX_LPCWSTR pszValue, int32_t iValueLen, int32_t &iOffset, int32_t &iLength)
+ FX_BOOL FDE_ParseCSSString(const FX_WCHAR* pszValue, int32_t iValueLen, int32_t &iOffset, int32_t &iLength)
{
FXSYS_assert(pszValue != NULL && iValueLen > 0);
iOffset = 0;
@@ -561,7 +561,7 @@ extern "C" {
return iValueLen > 0;
}
- FX_BOOL FDE_ParseCSSURI(FX_LPCWSTR pszValue, int32_t iValueLen, int32_t &iOffset, int32_t &iLength)
+ FX_BOOL FDE_ParseCSSURI(const FX_WCHAR* pszValue, int32_t iValueLen, int32_t &iOffset, int32_t &iLength)
{
FXSYS_assert(pszValue != NULL && iValueLen > 0);
if (iValueLen < 6 || pszValue[iValueLen - 1] != ')' || FX_wcsnicmp(L"url(", pszValue, 4)) {
@@ -574,7 +574,7 @@ extern "C" {
return FALSE;
}
- FX_BOOL FDE_ParseCSSColor(FX_LPCWSTR pszValue, int32_t iValueLen, FX_ARGB &dwColor)
+ FX_BOOL FDE_ParseCSSColor(const FX_WCHAR* pszValue, int32_t iValueLen, FX_ARGB &dwColor)
{
FXSYS_assert(pszValue != NULL && iValueLen > 0);
if (*pszValue == '#') {
@@ -635,7 +635,7 @@ CFDE_CSSValueList::CFDE_CSSValueList(IFX_MEMAllocator *pStaticStore, const CFDE_
m_ppList = (IFDE_CSSValue**)pStaticStore->Alloc(iByteCount);
FXSYS_memcpy(m_ppList, list.GetData(), iByteCount);
}
-FX_BOOL CFDE_CSSValueListParser::NextValue(FDE_CSSPRIMITIVETYPE &eType, FX_LPCWSTR &pStart, int32_t &iLength)
+FX_BOOL CFDE_CSSValueListParser::NextValue(FDE_CSSPRIMITIVETYPE &eType, const FX_WCHAR* &pStart, int32_t &iLength)
{
while (m_pCur < m_pEnd && (*m_pCur <= ' ' || *m_pCur == m_Separator)) {
++m_pCur;
@@ -691,7 +691,7 @@ FX_BOOL CFDE_CSSValueListParser::NextValue(FDE_CSSPRIMITIVETYPE &eType, FX_LPCWS
}
int32_t CFDE_CSSValueListParser::SkipTo(FX_WCHAR wch, FX_BOOL bWSSeparator , FX_BOOL bBrContinue )
{
- FX_LPCWSTR pStart = m_pCur;
+ const FX_WCHAR* pStart = m_pCur;
if (!bBrContinue) {
if (bWSSeparator)
while (++m_pCur < m_pEnd && *m_pCur != wch && *m_pCur > ' ') ;
diff --git a/xfa/src/fdp/src/css/fde_cssdatatable.h b/xfa/src/fdp/src/css/fde_cssdatatable.h
index ef8e0fb04e..05cd2ae00c 100644
--- a/xfa/src/fdp/src/css/fde_cssdatatable.h
+++ b/xfa/src/fdp/src/css/fde_cssdatatable.h
@@ -9,7 +9,7 @@
class CFDE_CSSFunction: public CFX_Target
{
public:
- CFDE_CSSFunction(FX_LPCWSTR pszFuncName, IFDE_CSSValueList *pArgList): m_pszFuncName(pszFuncName), m_pArgList(pArgList)
+ CFDE_CSSFunction(const FX_WCHAR* pszFuncName, IFDE_CSSValueList *pArgList): m_pszFuncName(pszFuncName), m_pArgList(pArgList)
{
FXSYS_assert(pArgList != NULL);
}
@@ -21,14 +21,14 @@ public:
{
return m_pArgList->GetValue(index);
}
- FX_LPCWSTR GetFuncName() const
+ const FX_WCHAR* GetFuncName() const
{
return m_pszFuncName;
};
protected:
IFDE_CSSValueList *m_pArgList;
- FX_LPCWSTR m_pszFuncName;
+ const FX_WCHAR* m_pszFuncName;
};
class CFDE_CSSPrimitiveValue : public IFDE_CSSPrimitiveValue, public CFX_Target
{
@@ -40,7 +40,7 @@ public:
CFDE_CSSPrimitiveValue(FX_ARGB color) : m_eType(FDE_CSSPRIMITIVETYPE_RGB), m_dwColor(color) { }
CFDE_CSSPrimitiveValue(FDE_CSSPROPERTYVALUE eValue) : m_eType(FDE_CSSPRIMITIVETYPE_Enum) , m_eEnum(eValue) { }
CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE eType, FX_FLOAT fValue) : m_eType(eType), m_fNumber(fValue) { }
- CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE eType, FX_LPCWSTR pValue) : m_eType(eType), m_pString(pValue)
+ CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE eType, const FX_WCHAR* pValue) : m_eType(eType), m_pString(pValue)
{
FXSYS_assert(m_pString != NULL);
}
@@ -61,7 +61,7 @@ public:
FXSYS_assert(m_eType >= FDE_CSSPRIMITIVETYPE_Number && m_eType <= FDE_CSSPRIMITIVETYPE_PC);
return m_fNumber;
}
- virtual FX_LPCWSTR GetString(int32_t &iLength) const
+ virtual const FX_WCHAR* GetString(int32_t &iLength) const
{
FXSYS_assert(m_eType >= FDE_CSSPRIMITIVETYPE_String && m_eType <= FDE_CSSPRIMITIVETYPE_URI);
iLength = FXSYS_wcslen(m_pString);
@@ -72,7 +72,7 @@ public:
FXSYS_assert(m_eType == FDE_CSSPRIMITIVETYPE_Enum);
return m_eEnum;
}
- virtual FX_LPCWSTR GetFuncName() const
+ virtual const FX_WCHAR* GetFuncName() const
{
FXSYS_assert(m_eType == FDE_CSSPRIMITIVETYPE_Function);
return m_pFunction->GetFuncName();
@@ -92,7 +92,7 @@ public:
union {
FX_ARGB m_dwColor;
FX_FLOAT m_fNumber;
- FX_LPCWSTR m_pString;
+ const FX_WCHAR* m_pString;
FDE_CSSPROPERTYVALUE m_eEnum;
CFDE_CSSFunction *m_pFunction;
};
@@ -118,17 +118,17 @@ protected:
class CFDE_CSSValueListParser : public CFX_Target
{
public:
- CFDE_CSSValueListParser(FX_LPCWSTR psz, int32_t iLen, FX_WCHAR separator)
+ CFDE_CSSValueListParser(const FX_WCHAR* psz, int32_t iLen, FX_WCHAR separator)
: m_Separator(separator), m_pCur(psz), m_pEnd(psz + iLen)
{
FXSYS_assert(psz != NULL && iLen > 0);
}
- FX_BOOL NextValue(FDE_CSSPRIMITIVETYPE &eType, FX_LPCWSTR &pStart, int32_t &iLength);
+ FX_BOOL NextValue(FDE_CSSPRIMITIVETYPE &eType, const FX_WCHAR* &pStart, int32_t &iLength);
FX_WCHAR m_Separator;
protected:
int32_t SkipTo(FX_WCHAR wch, FX_BOOL bWSSeparator = FALSE, FX_BOOL bBrContinue = FALSE);
- FX_LPCWSTR m_pCur;
- FX_LPCWSTR m_pEnd;
+ const FX_WCHAR* m_pCur;
+ const FX_WCHAR* m_pEnd;
};
#ifdef _cplusplus
extern "C" {
@@ -142,53 +142,53 @@ extern "C" {
#define FDE_IsOnlyValue(type,enum) (((type) & ~(enum)) == FDE_CSSVALUETYPE_Primitive)
struct FDE_CSSPROPERTYTABLE {
FDE_CSSPROPERTY eName;
- FX_LPCWSTR pszName;
+ const FX_WCHAR* pszName;
FX_DWORD dwHash;
FX_DWORD dwType;
};
typedef FDE_CSSPROPERTYTABLE const * FDE_LPCCSSPROPERTYTABLE;
- FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByName(FX_LPCWSTR pszName, int32_t iLength);
+ FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByName(const FX_WCHAR* pszName, int32_t iLength);
FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByEnum(FDE_CSSPROPERTY eName);
struct FDE_CSSPROPERTYVALUETABLE {
FDE_CSSPROPERTYVALUE eName;
- FX_LPCWSTR pszName;
+ const FX_WCHAR* pszName;
FX_DWORD dwHash;
};
typedef FDE_CSSPROPERTYVALUETABLE const * FDE_LPCCSSPROPERTYVALUETABLE;
- FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByName(FX_LPCWSTR pszName, int32_t iLength);
+ FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByName(const FX_WCHAR* pszName, int32_t iLength);
FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByEnum(FDE_CSSPROPERTYVALUE eName);
struct FDE_CSSMEDIATYPETABLE {
FX_WORD wHash;
FX_WORD wValue;
};
typedef FDE_CSSMEDIATYPETABLE const * FDE_LPCCSSMEDIATYPETABLE;
- FDE_LPCCSSMEDIATYPETABLE FDE_GetCSSMediaTypeByName(FX_LPCWSTR pszName, int32_t iLength);
+ FDE_LPCCSSMEDIATYPETABLE FDE_GetCSSMediaTypeByName(const FX_WCHAR* pszName, int32_t iLength);
struct FDE_CSSLENGTHUNITTABLE {
FX_WORD wHash;
FX_WORD wValue;
};
typedef FDE_CSSLENGTHUNITTABLE const * FDE_LPCCSSLENGTHUNITTABLE;
- FDE_LPCCSSLENGTHUNITTABLE FDE_GetCSSLengthUnitByName(FX_LPCWSTR pszName, int32_t iLength);
+ FDE_LPCCSSLENGTHUNITTABLE FDE_GetCSSLengthUnitByName(const FX_WCHAR* pszName, int32_t iLength);
struct FDE_CSSCOLORTABLE {
FX_DWORD dwHash;
FX_ARGB dwValue;
};
typedef FDE_CSSCOLORTABLE const * FDE_LPCCSSCOLORTABLE;
- FDE_LPCCSSCOLORTABLE FDE_GetCSSColorByName(FX_LPCWSTR pszName, int32_t iLength);
+ FDE_LPCCSSCOLORTABLE FDE_GetCSSColorByName(const FX_WCHAR* pszName, int32_t iLength);
struct FDE_CSSPERSUDOTABLE {
FDE_CSSPERSUDO eName;
- FX_LPCWSTR pszName;
+ const FX_WCHAR* pszName;
FX_DWORD dwHash;
};
typedef FDE_CSSPERSUDOTABLE const * FDE_LPCCSSPERSUDOTABLE;
FDE_LPCCSSPERSUDOTABLE FDE_GetCSSPersudoByEnum(FDE_CSSPERSUDO ePersudo);
- FX_BOOL FDE_ParseCSSNumber(FX_LPCWSTR pszValue, int32_t iValueLen, FX_FLOAT &fValue, FDE_CSSPRIMITIVETYPE &eUnit);
- FX_BOOL FDE_ParseCSSString(FX_LPCWSTR pszValue, int32_t iValueLen, int32_t &iOffset, int32_t &iLength);
- FX_BOOL FDE_ParseCSSColor(FX_LPCWSTR pszValue, int32_t iValueLen, FX_ARGB &dwColor);
- FX_BOOL FDE_ParseCSSURI(FX_LPCWSTR pszValue, int32_t iValueLen, int32_t &iOffset, int32_t &iLength);
+ FX_BOOL FDE_ParseCSSNumber(const FX_WCHAR* pszValue, int32_t iValueLen, FX_FLOAT &fValue, FDE_CSSPRIMITIVETYPE &eUnit);
+ FX_BOOL FDE_ParseCSSString(const FX_WCHAR* pszValue, int32_t iValueLen, int32_t &iOffset, int32_t &iLength);
+ FX_BOOL FDE_ParseCSSColor(const FX_WCHAR* pszValue, int32_t iValueLen, FX_ARGB &dwColor);
+ FX_BOOL FDE_ParseCSSURI(const FX_WCHAR* pszValue, int32_t iValueLen, int32_t &iOffset, int32_t &iLength);
#ifdef _cplusplus
};
#endif
diff --git a/xfa/src/fdp/src/css/fde_cssdeclaration.cpp b/xfa/src/fdp/src/css/fde_cssdeclaration.cpp
index 9898708539..297357850e 100644
--- a/xfa/src/fdp/src/css/fde_cssdeclaration.cpp
+++ b/xfa/src/fdp/src/css/fde_cssdeclaration.cpp
@@ -43,19 +43,19 @@ void CFDE_CSSDeclaration::GetNextCustom(FX_POSITION &pos, CFX_WideString &wsName
wsValue = pProperty->pwsValue;
pos = (FX_POSITION)pProperty->pNext;
}
-FX_LPCWSTR CFDE_CSSDeclaration::CopyToLocal(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen)
+const FX_WCHAR* CFDE_CSSDeclaration::CopyToLocal(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen)
{
FXSYS_assert(iValueLen > 0);
CFX_MapPtrToPtr *pCache = pArgs->pStringCache;
- FX_LPVOID pKey = NULL;
+ void* pKey = NULL;
if (pCache) {
- FX_LPVOID pszCached = NULL;
- pKey = (FX_LPVOID)(uintptr_t)FX_HashCode_String_GetW(pszValue, iValueLen, FALSE);
+ void* pszCached = NULL;
+ pKey = (void*)(uintptr_t)FX_HashCode_String_GetW(pszValue, iValueLen, FALSE);
if (pCache->Lookup(pKey, pszCached)) {
- return (FX_LPCWSTR)pszCached;
+ return (const FX_WCHAR*)pszCached;
}
}
- FX_LPWSTR psz = (FX_LPWSTR)pArgs->pStaticStore->Alloc((iValueLen + 1) * sizeof(FX_WCHAR));
+ FX_WCHAR* psz = (FX_WCHAR*)pArgs->pStaticStore->Alloc((iValueLen + 1) * sizeof(FX_WCHAR));
if (psz == NULL) {
return NULL;
}
@@ -92,7 +92,7 @@ void CFDE_CSSDeclaration::AddPropertyHolder(IFX_MEMAllocator *pStaticStore, FDE_
m_pLastProperty = pHolder;
}
}
-FX_BOOL CFDE_CSSDeclaration::AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen)
+FX_BOOL CFDE_CSSDeclaration::AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen)
{
FXSYS_assert(iValueLen > 0);
FX_BOOL bImportant = FALSE;
@@ -229,7 +229,7 @@ FX_BOOL CFDE_CSSDeclaration::AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWST
}
return FALSE;
}
-FX_BOOL CFDE_CSSDeclaration::AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszName, int32_t iNameLen, FX_LPCWSTR pszValue, int32_t iValueLen)
+FX_BOOL CFDE_CSSDeclaration::AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszName, int32_t iNameLen, const FX_WCHAR* pszValue, int32_t iValueLen)
{
FDE_LPCSSCUSTOMPROPERTY pProperty = FDE_NewWith(pArgs->pStaticStore) FDE_CSSCUSTOMPROPERTY;
pProperty->pwsName = CopyToLocal(pArgs, pszName, iNameLen);
@@ -243,7 +243,7 @@ FX_BOOL CFDE_CSSDeclaration::AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWST
}
return TRUE;
}
-IFDE_CSSValue* CFDE_CSSDeclaration::ParseNumber(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen)
+IFDE_CSSValue* CFDE_CSSDeclaration::ParseNumber(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen)
{
FX_FLOAT fValue;
FDE_CSSPRIMITIVETYPE eUnit;
@@ -252,12 +252,12 @@ IFDE_CSSValue* CFDE_CSSDeclaration::ParseNumber(FDE_LPCCSSPROPERTYARGS pArgs, FX
}
return NewNumberValue(pArgs->pStaticStore, eUnit, fValue);
}
-IFDE_CSSValue* CFDE_CSSDeclaration::ParseEnum(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen)
+IFDE_CSSValue* CFDE_CSSDeclaration::ParseEnum(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen)
{
FDE_LPCCSSPROPERTYVALUETABLE pValue = FDE_GetCSSPropertyValueByName(pszValue, iValueLen);
return pValue ? NewEnumValue(pArgs->pStaticStore, pValue->eName) : NULL;
}
-IFDE_CSSValue* CFDE_CSSDeclaration::ParseColor(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen)
+IFDE_CSSValue* CFDE_CSSDeclaration::ParseColor(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen)
{
FX_ARGB dwColor;
if (!FDE_ParseCSSColor(pszValue, iValueLen, dwColor)) {
@@ -265,7 +265,7 @@ IFDE_CSSValue* CFDE_CSSDeclaration::ParseColor(FDE_LPCCSSPROPERTYARGS pArgs, FX_
}
return FDE_NewWith(pArgs->pStaticStore) CFDE_CSSPrimitiveValue(dwColor);
}
-IFDE_CSSValue* CFDE_CSSDeclaration::ParseURI(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen)
+IFDE_CSSValue* CFDE_CSSDeclaration::ParseURI(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen)
{
int32_t iOffset;
if (!FDE_ParseCSSURI(pszValue, iValueLen, iOffset, iValueLen)) {
@@ -277,7 +277,7 @@ IFDE_CSSValue* CFDE_CSSDeclaration::ParseURI(FDE_LPCCSSPROPERTYARGS pArgs, FX_LP
pszValue = CopyToLocal(pArgs, pszValue + iOffset, iValueLen);
return pszValue ? FDE_NewWith(pArgs->pStaticStore) CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE_URI, pszValue) : NULL;
}
-IFDE_CSSValue* CFDE_CSSDeclaration::ParseString(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen)
+IFDE_CSSValue* CFDE_CSSDeclaration::ParseString(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen)
{
int32_t iOffset;
if (!FDE_ParseCSSString(pszValue, iValueLen, iOffset, iValueLen)) {
@@ -289,7 +289,7 @@ IFDE_CSSValue* CFDE_CSSDeclaration::ParseString(FDE_LPCCSSPROPERTYARGS pArgs, FX
pszValue = CopyToLocal(pArgs, pszValue + iOffset, iValueLen);
return pszValue ? FDE_NewWith(pArgs->pStaticStore) CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE_String, pszValue) : NULL;
}
-IFDE_CSSValue* CFDE_CSSDeclaration::ParseFunction(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen)
+IFDE_CSSValue* CFDE_CSSDeclaration::ParseFunction(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen)
{
if (pszValue[iValueLen - 1] != ')') {
return NULL;
@@ -305,7 +305,7 @@ IFDE_CSSValue* CFDE_CSSDeclaration::ParseFunction(FDE_LPCCSSPROPERTYARGS pArgs,
if (iStartBracket == 0) {
return NULL;
}
- FX_LPCWSTR pszFuncName = CopyToLocal(pArgs, pszValue, iStartBracket);
+ const FX_WCHAR* pszFuncName = CopyToLocal(pArgs, pszValue, iStartBracket);
pszValue += (iStartBracket + 1);
iValueLen -= (iStartBracket + 2);
CFDE_CSSValueArray argumentArr;
@@ -343,7 +343,7 @@ IFDE_CSSValue* CFDE_CSSDeclaration::ParseFunction(FDE_LPCCSSPROPERTYARGS pArgs,
CFDE_CSSFunction *pFunction = FDE_NewWith(pArgs->pStaticStore) CFDE_CSSFunction(pszFuncName, pArgumentList);
return FDE_NewWith(pArgs->pStaticStore) CFDE_CSSPrimitiveValue(pFunction);
}
-FX_BOOL CFDE_CSSDeclaration::ParseContentProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseContentProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant)
{
IFX_MEMAllocator* pStaticStore = (IFX_MEMAllocator*)pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
@@ -400,7 +400,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseContentProperty(FDE_LPCCSSPROPERTYARGS pArgs,
AddPropertyHolder(pStaticStore, pArgs->pProperty->eName, FDE_NewWith(pStaticStore) CFDE_CSSValueList(pStaticStore, list), bImportant);
return TRUE;
}
-FX_BOOL CFDE_CSSDeclaration::ParseCounterProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseCounterProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant)
{
IFX_MEMAllocator *pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
@@ -447,7 +447,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseCounterProperty(FDE_LPCCSSPROPERTYARGS pArgs,
AddPropertyHolder(pStaticStore, pArgs->pProperty->eName, FDE_NewWith(pStaticStore) CFDE_CSSValueList(pStaticStore, listFull), bImportant);
return TRUE;
}
-FX_BOOL CFDE_CSSDeclaration::ParseValueListProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseValueListProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant)
{
IFX_MEMAllocator *pStaticStore = pArgs->pStaticStore;
FX_WCHAR separator = (pArgs->pProperty->eName == FDE_CSSPROPERTY_FontFamily) ? ',' : ' ';
@@ -557,7 +557,7 @@ FX_BOOL CFDE_CSSDeclaration::Add4ValuesProperty(IFX_MEMAllocator *pStaticStore,
}
return FALSE;
}
-FX_BOOL CFDE_CSSDeclaration::ParseBorderPropoerty(IFX_MEMAllocator *pStaticStore, FX_LPCWSTR pszValue, int32_t iValueLen, IFDE_CSSValue *&pColor, IFDE_CSSValue *&pStyle, IFDE_CSSValue *&pWidth) const
+FX_BOOL CFDE_CSSDeclaration::ParseBorderPropoerty(IFX_MEMAllocator *pStaticStore, const FX_WCHAR* pszValue, int32_t iValueLen, IFDE_CSSValue *&pColor, IFDE_CSSValue *&pStyle, IFDE_CSSValue *&pWidth) const
{
pColor = pStyle = pWidth = NULL;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
@@ -645,7 +645,7 @@ void CFDE_CSSDeclaration::AddBorderProperty(IFX_MEMAllocator *pStaticStore, IFDE
AddPropertyHolder(pStaticStore, eWidth, pWidth, bImportant);
AddPropertyHolder(pStaticStore, eColor, pColor, bImportant);
}
-FX_BOOL CFDE_CSSDeclaration::ParseListStyleProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseListStyleProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant)
{
IFX_MEMAllocator *pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
@@ -718,7 +718,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseListStyleProperty(FDE_LPCCSSPROPERTYARGS pArgs
AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_ListStyleType, pType, bImportant);
return TRUE;
}
-FX_BOOL CFDE_CSSDeclaration::ParseBackgroundProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseBackgroundProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant)
{
IFX_MEMAllocator *pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
@@ -844,7 +844,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseBackgroundProperty(FDE_LPCCSSPROPERTYARGS pArg
AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_BackgroundAttachment, pAttachment, bImportant);
return TRUE;
}
-FX_BOOL CFDE_CSSDeclaration::ParseFontProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseFontProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant)
{
IFX_MEMAllocator *pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, '/');
@@ -971,7 +971,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseFontProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_
}
return TRUE;
}
-FX_BOOL CFDE_CSSDeclaration::ParseColumnRuleProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseColumnRuleProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant)
{
IFX_MEMAllocator *pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
@@ -1058,7 +1058,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseColumnRuleProperty(FDE_LPCCSSPROPERTYARGS pArg
AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_ColumnRuleColor, pColumnRuleColor, bImportant);
return TRUE;
}
-FX_BOOL CFDE_CSSDeclaration::ParseTextEmphasisProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseTextEmphasisProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant)
{
IFX_MEMAllocator *pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
@@ -1101,7 +1101,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseTextEmphasisProperty(FDE_LPCCSSPROPERTYARGS pA
}
return TRUE;
}
-FX_BOOL CFDE_CSSDeclaration::ParseColumnsProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseColumnsProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant)
{
IFX_MEMAllocator *pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
@@ -1150,7 +1150,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseColumnsProperty(FDE_LPCCSSPROPERTYARGS pArgs,
AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_ColumnCount, pColumnCount, bImportant);
return TRUE;
}
-FX_BOOL CFDE_CSSDeclaration::ParseOverflowProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant)
+FX_BOOL CFDE_CSSDeclaration::ParseOverflowProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant)
{
IFX_MEMAllocator *pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
diff --git a/xfa/src/fdp/src/css/fde_cssdeclaration.h b/xfa/src/fdp/src/css/fde_cssdeclaration.h
index 91595d21d9..c8c80cce2f 100644
--- a/xfa/src/fdp/src/css/fde_cssdeclaration.h
+++ b/xfa/src/fdp/src/css/fde_cssdeclaration.h
@@ -14,8 +14,8 @@ typedef struct _FDE_CSSPROPERTYHOLDER : public CFX_Target {
_FDE_CSSPROPERTYHOLDER *pNext;
} FDE_CSSPROPERTYHOLDER, *FDE_LPCSSPROPERTYHOLDER;
typedef struct _FDE_CSSCUSTOMPROPERTY : public CFX_Target {
- FX_LPCWSTR pwsName;
- FX_LPCWSTR pwsValue;
+ const FX_WCHAR* pwsName;
+ const FX_WCHAR* pwsValue;
_FDE_CSSCUSTOMPROPERTY *pNext;
} FDE_CSSCUSTOMPROPERTY, * FDE_LPCSSCUSTOMPROPERTY;
typedef struct _FDE_CSSPROPERTYARGS : public CFX_Target {
@@ -33,32 +33,32 @@ public:
virtual void GetNextProperty(FX_POSITION &pos, FDE_CSSPROPERTY &eProperty, IFDE_CSSValue *&pValue, FX_BOOL &bImportant) const;
virtual FX_POSITION GetStartCustom() const;
virtual void GetNextCustom(FX_POSITION &pos, CFX_WideString &wsName, CFX_WideString &wsValue) const;
- FX_BOOL AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen);
- FX_BOOL AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszName, int32_t iNameLen, FX_LPCWSTR pszValue, int32_t iValueLen);
+ FX_BOOL AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen);
+ FX_BOOL AddProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszName, int32_t iNameLen, const FX_WCHAR* pszValue, int32_t iValueLen);
protected:
- FX_BOOL ParseTextEmphasisProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant);
- FX_BOOL ParseColumnsProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant);
- FX_BOOL ParseColumnRuleProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant);
- FX_BOOL ParseOverflowProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant);
- FX_BOOL ParseFontProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant);
- FX_BOOL ParseBackgroundProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant);
- FX_BOOL ParseListStyleProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant);
- FX_BOOL ParseBorderPropoerty(IFX_MEMAllocator *pStaticStore, FX_LPCWSTR pszValue, int32_t iValueLen,
+ FX_BOOL ParseTextEmphasisProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseColumnsProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseColumnRuleProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseOverflowProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseFontProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseBackgroundProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseListStyleProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseBorderPropoerty(IFX_MEMAllocator *pStaticStore, const FX_WCHAR* pszValue, int32_t iValueLen,
IFDE_CSSValue *&pColor, IFDE_CSSValue *&pStyle, IFDE_CSSValue *&pWidth) const;
void AddBorderProperty(IFX_MEMAllocator *pStaticStore, IFDE_CSSValue *pColor, IFDE_CSSValue *pStyle, IFDE_CSSValue *pWidth, FX_BOOL bImportant,
FDE_CSSPROPERTY eColor, FDE_CSSPROPERTY eStyle, FDE_CSSPROPERTY eWidth);
- FX_BOOL ParseContentProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant);
- FX_BOOL ParseCounterProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant);
- FX_BOOL ParseValueListProperty(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseContentProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseCounterProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant);
+ FX_BOOL ParseValueListProperty(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen, FX_BOOL bImportant);
FX_BOOL Add4ValuesProperty(IFX_MEMAllocator *pStaticStore, const CFDE_CSSValueArray &list, FX_BOOL bImportant,
FDE_CSSPROPERTY eLeft, FDE_CSSPROPERTY eTop, FDE_CSSPROPERTY eRight, FDE_CSSPROPERTY eBottom);
- IFDE_CSSValue* ParseNumber(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen);
- IFDE_CSSValue* ParseEnum(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen);
- IFDE_CSSValue* ParseColor(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen);
- IFDE_CSSValue* ParseURI(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen);
- IFDE_CSSValue* ParseString(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen);
- IFDE_CSSValue* ParseFunction(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen);
- FX_LPCWSTR CopyToLocal(FDE_LPCCSSPROPERTYARGS pArgs, FX_LPCWSTR pszValue, int32_t iValueLen);
+ IFDE_CSSValue* ParseNumber(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen);
+ IFDE_CSSValue* ParseEnum(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen);
+ IFDE_CSSValue* ParseColor(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen);
+ IFDE_CSSValue* ParseURI(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen);
+ IFDE_CSSValue* ParseString(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen);
+ IFDE_CSSValue* ParseFunction(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen);
+ const FX_WCHAR* CopyToLocal(FDE_LPCCSSPROPERTYARGS pArgs, const FX_WCHAR* pszValue, int32_t iValueLen);
void AddPropertyHolder(IFX_MEMAllocator *pStaticStore, FDE_CSSPROPERTY eProperty, IFDE_CSSValue *pValue, FX_BOOL bImportant);
IFDE_CSSPrimitiveValue* NewNumberValue(IFX_MEMAllocator *pStaticStore, FDE_CSSPRIMITIVETYPE eUnit, FX_FLOAT fValue) const;
IFDE_CSSPrimitiveValue* NewEnumValue(IFX_MEMAllocator *pStaticStore, FDE_CSSPROPERTYVALUE eValue) const;
diff --git a/xfa/src/fdp/src/css/fde_cssstyleselector.cpp b/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
index e4c8be6409..6cb024cbf8 100644
--- a/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
+++ b/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
@@ -8,7 +8,7 @@
#include "fde_csscache.h"
#include "fde_cssdeclaration.h"
#include "fde_cssstyleselector.h"
-int32_t CFDE_CSSCounterStyle::FindIndex(FX_LPCWSTR pszIdentifier)
+int32_t CFDE_CSSCounterStyle::FindIndex(const FX_WCHAR* pszIdentifier)
{
int32_t iCount = m_arrCounterData.GetSize();
for (int32_t i = 0; i < iCount; i++) {
@@ -33,7 +33,7 @@ void CFDE_CSSCounterStyle::DoUpdateIndex(IFDE_CSSValueList *pList)
for (int32_t i = 0; i < iCount; i++) {
IFDE_CSSValueList *pCounter = (IFDE_CSSValueList*)pList->GetValue(i);
int32_t iLen;
- FX_LPCWSTR pszIdentifier = ((IFDE_CSSPrimitiveValue*)(pCounter->GetValue(0)))->GetString(iLen);
+ const FX_WCHAR* pszIdentifier = ((IFDE_CSSPrimitiveValue*)(pCounter->GetValue(0)))->GetString(iLen);
FX_FLOAT fValue = fDefValue;
if (pCounter->CountValues() > 1) {
fValue = ((IFDE_CSSPrimitiveValue*)(pCounter->GetValue(1)))->GetFloat();
@@ -176,10 +176,10 @@ void CFDE_CSSRuleCollection::AddRulesFrom(IFDE_CSSStyleSheet *pStyleSheet, IFDE_
}
void CFDE_CSSRuleCollection::AddRuleTo(CFX_MapPtrToPtr &map, FX_DWORD dwKey, IFDE_CSSSelector *pSel, IFDE_CSSDeclaration *pDecl)
{
- FX_LPVOID pKey = (FX_LPVOID)(uintptr_t)dwKey;
+ void* pKey = (void*)(uintptr_t)dwKey;
FDE_LPCSSRULEDATA pData = NewRuleData(pSel, pDecl);
FDE_LPCSSRULEDATA pList = NULL;
- if (!map.Lookup(pKey, (FX_LPVOID&)pList)) {
+ if (!map.Lookup(pKey, (void*&)pList)) {
map.SetAt(pKey, pData);
} else if (AddRuleTo(pList, pData)) {
map.SetAt(pKey, pList);
@@ -525,7 +525,7 @@ void CFDE_CSSStyleSelector::ApplyDeclarations(FX_BOOL bPriority, const IFDE_CSSD
}
}
}
-void CFDE_CSSStyleSelector::AppendInlineStyle(CFDE_CSSDeclaration *pDecl, FX_LPCWSTR psz, int32_t iLen)
+void CFDE_CSSStyleSelector::AppendInlineStyle(CFDE_CSSDeclaration *pDecl, const FX_WCHAR* psz, int32_t iLen)
{
FXSYS_assert(pDecl != NULL && psz != NULL && iLen > 0);
IFDE_CSSSyntaxParser *pSyntax = IFDE_CSSSyntaxParser::Create();
@@ -534,7 +534,7 @@ void CFDE_CSSStyleSelector::AppendInlineStyle(CFDE_CSSDeclaration *pDecl, FX_LPC
}
if (pSyntax->Init(psz, iLen, 32, TRUE)) {
int32_t iLen;
- FX_LPCWSTR psz;
+ const FX_WCHAR* psz;
FDE_CSSPROPERTYARGS args;
args.pStringCache = NULL;
args.pStaticStore = m_pInlineStyleStore;
diff --git a/xfa/src/fdp/src/css/fde_cssstyleselector.h b/xfa/src/fdp/src/css/fde_cssstyleselector.h
index 803522bfb4..36bf3f179d 100644
--- a/xfa/src/fdp/src/css/fde_cssstyleselector.h
+++ b/xfa/src/fdp/src/css/fde_cssstyleselector.h
@@ -33,18 +33,18 @@ public:
}
FDE_LPCSSRULEDATA GetIDRuleData(FX_DWORD dwIDHash)
{
- FX_LPVOID pData;
- return m_IDRules.Lookup((FX_LPVOID)(uintptr_t)dwIDHash, pData) ? (FDE_LPCSSRULEDATA)pData : NULL;
+ void* pData;
+ return m_IDRules.Lookup((void*)(uintptr_t)dwIDHash, pData) ? (FDE_LPCSSRULEDATA)pData : NULL;
}
FDE_LPCSSRULEDATA GetTagRuleData(FX_DWORD dwTagHasn)
{
- FX_LPVOID pData;
- return m_TagRules.Lookup((FX_LPVOID)(uintptr_t)dwTagHasn, pData) ? (FDE_LPCSSRULEDATA)pData : NULL;
+ void* pData;
+ return m_TagRules.Lookup((void*)(uintptr_t)dwTagHasn, pData) ? (FDE_LPCSSRULEDATA)pData : NULL;
}
FDE_LPCSSRULEDATA GetClassRuleData(FX_DWORD dwIDHash)
{
- FX_LPVOID pData;
- return m_ClassRules.Lookup((FX_LPVOID)(uintptr_t)dwIDHash, pData) ? (FDE_LPCSSRULEDATA)pData : NULL;
+ void* pData;
+ return m_ClassRules.Lookup((void*)(uintptr_t)dwIDHash, pData) ? (FDE_LPCSSRULEDATA)pData : NULL;
}
FDE_LPCSSRULEDATA GetUniversalRuleData()
{
@@ -95,7 +95,7 @@ protected:
void MatchRules(FDE_LPCSSTAGCACHE pCache, FDE_LPCSSRULEDATA pList, FDE_CSSPERSUDO ePersudoType);
void SortRulesTo(CFDE_CSSDeclarationArray &matchDecls);
FX_BOOL MatchSelector(FDE_LPCSSTAGCACHE pCache, IFDE_CSSSelector *pSel, FDE_CSSPERSUDO ePersudoType);
- void AppendInlineStyle(CFDE_CSSDeclaration *pDecl, FX_LPCWSTR psz, int32_t iLen);
+ void AppendInlineStyle(CFDE_CSSDeclaration *pDecl, const FX_WCHAR* psz, int32_t iLen);
void ApplyDeclarations(FX_BOOL bPriority, const IFDE_CSSDeclaration **ppDeclArray, int32_t iDeclCount, IFDE_CSSComputedStyle *pDestStyle);
void ApplyProperty(FDE_CSSPROPERTY eProperty, IFDE_CSSValue *pValue, CFDE_CSSComputedStyle *pComputedStyle);
@@ -161,7 +161,7 @@ public:
iValue = m_iResetVal;
return m_bReset;
}
- FX_LPCWSTR m_pszIdent;
+ const FX_WCHAR* m_pszIdent;
FX_BOOL m_bIncrement;
FX_BOOL m_bReset;
int32_t m_iIncVal;
@@ -196,7 +196,7 @@ public:
UpdateIndex();
return m_arrCounterData.ElementAt(index).GetCounterReset(iValue);
}
- FX_LPCWSTR GetCounterIdentifier(int32_t index)
+ const FX_WCHAR* GetCounterIdentifier(int32_t index)
{
UpdateIndex();
return m_arrCounterData.ElementAt(index).m_pszIdent;
@@ -204,7 +204,7 @@ public:
protected:
void UpdateIndex();
void DoUpdateIndex(IFDE_CSSValueList *pList);
- int32_t FindIndex(FX_LPCWSTR pszIdentifier);
+ int32_t FindIndex(const FX_WCHAR* pszIdentifier);
IFDE_CSSValueList *m_pCounterInc;
IFDE_CSSValueList *m_pCounterReset;
CFX_ArrayTemplate<FDE_CSSCOUNTERDATA> m_arrCounterData;
@@ -227,7 +227,7 @@ public:
m_bTextEmphasisColorCurrent = TRUE;
m_iOrphans = 2;
}
- FX_LPCWSTR m_pszListStyleImage;
+ const FX_WCHAR* m_pszListStyleImage;
FDE_CSSLENGTH m_LetterSpacing;
FDE_CSSLENGTH m_WordSpacing;
FDE_CSSLENGTH m_TextIndent;
@@ -242,7 +242,7 @@ public:
FX_WORD m_wFontWeight;
int32_t m_iWidows;
int32_t m_iOrphans;
- FX_LPCWSTR m_pszTextEmphasisCustomMark;
+ const FX_WCHAR* m_pszTextEmphasisCustomMark;
FX_WORD m_eFontVariant : 1;
FX_WORD m_eFontStyle : 1;
FX_WORD m_bTextEmphasisColorCurrent: 1;
@@ -289,7 +289,7 @@ public:
FDE_CSSSIZE m_MinBoxSize;
FDE_CSSSIZE m_MaxBoxSize;
FDE_CSSPOINT m_BKGPosition;
- FX_LPCWSTR m_pszBKGImage;
+ const FX_WCHAR* m_pszBKGImage;
FX_ARGB m_dwBKGColor;
FX_ARGB m_dwBDRLeftColor;
FX_ARGB m_dwBDRTopColor;
@@ -449,7 +449,7 @@ public:
{
return (m_NonInheritedData.m_pCounterStyle == NULL) ? 0 : m_NonInheritedData.m_pCounterStyle->CountCounters();
}
- virtual FX_LPCWSTR GetCounterIdentifier(int32_t index)
+ virtual const FX_WCHAR* GetCounterIdentifier(int32_t index)
{
return m_NonInheritedData.m_pCounterStyle->GetCounterIdentifier(index);
}
@@ -469,7 +469,7 @@ public:
{
return m_InheritedData.m_pQuotes == NULL ? 0 : m_InheritedData.m_pQuotes->CountValues();
}
- virtual FX_LPCWSTR GetQuotes(int32_t index) const
+ virtual const FX_WCHAR* GetQuotes(int32_t index) const
{
FXSYS_assert(m_InheritedData.m_pQuotes != NULL && m_InheritedData.m_pQuotes->CountValues() > index);
return ((IFDE_CSSPrimitiveValue*)(m_InheritedData.m_pQuotes->GetValue(index)))->GetString(index);
@@ -526,7 +526,7 @@ public:
{
return m_InheritedData.m_pFontFamily ? m_InheritedData.m_pFontFamily->CountValues() : 0;
}
- virtual FX_LPCWSTR GetFontFamily(int32_t index) const
+ virtual const FX_WCHAR* GetFontFamily(int32_t index) const
{
return ((IFDE_CSSPrimitiveValue*)(m_InheritedData.m_pFontFamily->GetValue(index)))->GetString(index);
}
@@ -815,7 +815,7 @@ public:
{
return (FDE_CSSTEXTEMPHASISFILL)m_InheritedData.m_eTextEmphasisFill;
}
- virtual FX_LPCWSTR GetTextEmphasisCustom() const
+ virtual const FX_WCHAR* GetTextEmphasisCustom() const
{
FXSYS_assert(m_InheritedData.m_eTextEmphasisMark == FDE_CSSTEXTEMPHASISMARK_Custom);
return m_InheritedData.m_pszTextEmphasisCustomMark;
@@ -913,7 +913,7 @@ public:
{
return m_NonInheritedData.m_dwBKGColor;
}
- virtual FX_LPCWSTR GetBKGImage() const
+ virtual const FX_WCHAR* GetBKGImage() const
{
return m_NonInheritedData.m_pszBKGImage;
}
@@ -953,7 +953,7 @@ public:
{
return m_InheritedData.m_pCursorUris == NULL ? 0 : m_InheritedData.m_pCursorUris->CountValues();
}
- virtual FX_LPCWSTR GetCursorUrl(int32_t index) const
+ virtual const FX_WCHAR* GetCursorUrl(int32_t index) const
{
FXSYS_assert(m_InheritedData.m_pCursorUris != NULL);
return ((IFDE_CSSPrimitiveValue*)(m_InheritedData.m_pCursorUris->GetValue(index)))->GetString(index);
@@ -974,7 +974,7 @@ public:
{
return (FDE_CSSLISTSTYLEPOSITION)m_NonInheritedData.m_eListStylePosition;
}
- virtual FX_LPCWSTR GetListStyleImage() const
+ virtual const FX_WCHAR* GetListStyleImage() const
{
return m_InheritedData.m_pszListStyleImage;
}
diff --git a/xfa/src/fdp/src/css/fde_cssstylesheet.cpp b/xfa/src/fdp/src/css/fde_cssstylesheet.cpp
index 006995a754..dd692ec718 100644
--- a/xfa/src/fdp/src/css/fde_cssstylesheet.cpp
+++ b/xfa/src/fdp/src/css/fde_cssstylesheet.cpp
@@ -10,7 +10,7 @@
#include "fde_cssstylesheet.h"
IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadHTMLStandardStyleSheet()
{
- static const FX_LPCWSTR s_pStyle = L"html,address,blockquote,body,dd,div,dl,dt,fieldset,form,frame,frameset,h1,h2,h3,h4,h5,h6,noframes,ol,p,ul,center,dir,hr,menu,pre{display:block}"
+ static const FX_WCHAR* s_pStyle = L"html,address,blockquote,body,dd,div,dl,dt,fieldset,form,frame,frameset,h1,h2,h3,h4,h5,h6,noframes,ol,p,ul,center,dir,hr,menu,pre{display:block}"
L"li{display:list-item}head{display:none}table{display:table}tr{display:table-row}thead{display:table-header-group}tbody{display:table-row-group}tfoot{display:table-footer-group}"
L"col{display:table-column}colgroup{display:table-column-group}td,th{display:table-cell}caption{display:table-caption}th{font-weight:bolder;text-align:center}caption{text-align:center}"
L"body{margin:0}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em;margin:.75em 0}h3{font-size:1.17em;margin:.83em 0}h4,p,blockquote,ul,fieldset,form,ol,dl,dir,menu{margin:1.12em 0}"
@@ -35,7 +35,7 @@ IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadFromStream(const CFX_WideString &szU
}
return pStyleSheet;
}
-IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadFromBuffer(const CFX_WideString &szUrl, FX_LPCWSTR pBuffer, int32_t iBufSize, FX_WORD wCodePage, FX_DWORD dwMediaList )
+IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadFromBuffer(const CFX_WideString &szUrl, const FX_WCHAR* pBuffer, int32_t iBufSize, FX_WORD wCodePage, FX_DWORD dwMediaList )
{
CFDE_CSSStyleSheet *pStyleSheet = FDE_New CFDE_CSSStyleSheet(dwMediaList);
if (pStyleSheet == NULL) {
@@ -122,7 +122,7 @@ FX_BOOL CFDE_CSSStyleSheet::LoadFromStream(const CFX_WideString &szUrl, IFX_Stre
m_szUrl = szUrl;
return bRet;
}
-FX_BOOL CFDE_CSSStyleSheet::LoadFromBuffer(const CFX_WideString &szUrl, FX_LPCWSTR pBuffer, int32_t iBufSize, FX_WORD wCodePage)
+FX_BOOL CFDE_CSSStyleSheet::LoadFromBuffer(const CFX_WideString &szUrl, const FX_WCHAR* pBuffer, int32_t iBufSize, FX_WORD wCodePage)
{
FXSYS_assert(pBuffer != NULL && iBufSize > 0);
IFDE_CSSSyntaxParser *pSyntax = IFDE_CSSSyntaxParser::Create();
@@ -176,7 +176,7 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadMediaRule(IFDE_CSSSyntaxParser *pSyn
switch (pSyntax->DoSyntaxParse()) {
case FDE_CSSSYNTAXSTATUS_MediaType: {
int32_t iLen;
- FX_LPCWSTR psz = pSyntax->GetCurrentString(iLen);
+ const FX_WCHAR* psz = pSyntax->GetCurrentString(iLen);
FDE_LPCCSSMEDIATYPETABLE pMediaType = FDE_GetCSSMediaTypeByName(psz, iLen);
if (pMediaType != NULL) {
dwMediaList |= pMediaType->wValue;
@@ -209,7 +209,7 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadStyleRule(IFDE_CSSSyntaxParser *pSyn
{
m_Selectors.RemoveAt(0, m_Selectors.GetSize());
CFDE_CSSStyleRule *pStyleRule = NULL;
- FX_LPCWSTR pszValue = NULL;
+ const FX_WCHAR* pszValue = NULL;
int32_t iValueLen = 0;
FDE_CSSPROPERTYARGS propertyArgs;
propertyArgs.pStaticStore = m_pAllocator;
@@ -269,7 +269,7 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadStyleRule(IFDE_CSSSyntaxParser *pSyn
FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadFontFaceRule(IFDE_CSSSyntaxParser *pSyntax, CFDE_CSSRuleArray &ruleArray)
{
CFDE_CSSFontFaceRule *pFontFaceRule = NULL;
- FX_LPCWSTR pszValue = NULL;
+ const FX_WCHAR* pszValue = NULL;
int32_t iValueLen = 0;
FDE_CSSPROPERTYARGS propertyArgs;
propertyArgs.pStaticStore = m_pAllocator;
@@ -361,10 +361,10 @@ inline FX_BOOL FDE_IsCSSChar(FX_WCHAR wch)
{
return (wch >= 'a' && wch <= 'z') || (wch >= 'A' && wch <= 'Z');
}
-int32_t FDE_GetCSSPersudoLen(FX_LPCWSTR psz, FX_LPCWSTR pEnd)
+int32_t FDE_GetCSSPersudoLen(const FX_WCHAR* psz, const FX_WCHAR* pEnd)
{
FXSYS_assert(*psz == ':');
- FX_LPCWSTR pStart = psz;
+ const FX_WCHAR* pStart = psz;
while (psz < pEnd) {
FX_WCHAR wch = *psz;
if (FDE_IsCSSChar(wch) || wch == ':') {
@@ -375,9 +375,9 @@ int32_t FDE_GetCSSPersudoLen(FX_LPCWSTR psz, FX_LPCWSTR pEnd)
}
return psz - pStart;
}
-int32_t FDE_GetCSSNameLen(FX_LPCWSTR psz, FX_LPCWSTR pEnd)
+int32_t FDE_GetCSSNameLen(const FX_WCHAR* psz, const FX_WCHAR* pEnd)
{
- FX_LPCWSTR pStart = psz;
+ const FX_WCHAR* pStart = psz;
while (psz < pEnd) {
FX_WCHAR wch = *psz;
if (FDE_IsCSSChar(wch)
@@ -390,11 +390,11 @@ int32_t FDE_GetCSSNameLen(FX_LPCWSTR psz, FX_LPCWSTR pEnd)
}
return psz - pStart;
}
-IFDE_CSSSelector* CFDE_CSSSelector::FromString(IFX_MEMAllocator *pStaticStore, FX_LPCWSTR psz, int32_t iLen)
+IFDE_CSSSelector* CFDE_CSSSelector::FromString(IFX_MEMAllocator *pStaticStore, const FX_WCHAR* psz, int32_t iLen)
{
FXSYS_assert(pStaticStore != NULL && psz != NULL && iLen > 0);
- FX_LPCWSTR pStart = psz;
- FX_LPCWSTR pEnd = psz + iLen;
+ const FX_WCHAR* pStart = psz;
+ const FX_WCHAR* pEnd = psz + iLen;
for (; psz < pEnd; ++psz) {
switch (*psz) {
case '>':
diff --git a/xfa/src/fdp/src/css/fde_cssstylesheet.h b/xfa/src/fdp/src/css/fde_cssstylesheet.h
index fea4176171..435998f017 100644
--- a/xfa/src/fdp/src/css/fde_cssstylesheet.h
+++ b/xfa/src/fdp/src/css/fde_cssstylesheet.h
@@ -10,7 +10,7 @@
class CFDE_CSSSelector : public IFDE_CSSSelector, public CFX_Target
{
public:
- CFDE_CSSSelector(FDE_CSSSELECTORTYPE eType, FX_LPCWSTR psz, int32_t iLen, FX_BOOL bIgnoreCase)
+ CFDE_CSSSelector(FDE_CSSSELECTORTYPE eType, const FX_WCHAR* psz, int32_t iLen, FX_BOOL bIgnoreCase)
: m_eType(eType), m_dwHash(FX_HashCode_String_GetW(psz, iLen, bIgnoreCase)), m_pNext(NULL)
{
}
@@ -28,13 +28,13 @@ public:
{
return m_pNext;
}
- static IFDE_CSSSelector* FromString(IFX_MEMAllocator *pStaticStore, FX_LPCWSTR psz, int32_t iLen);
+ static IFDE_CSSSelector* FromString(IFX_MEMAllocator *pStaticStore, const FX_WCHAR* psz, int32_t iLen);
void SetNext(IFDE_CSSSelector *pNext)
{
m_pNext = pNext;
}
protected:
- static CFDE_CSSSelector* ParseSelector(IFX_MEMAllocator *pStaticStore, FX_LPCWSTR psz, int32_t &iOff, int32_t iLen, FDE_CSSSELECTORTYPE eType);
+ static CFDE_CSSSelector* ParseSelector(IFX_MEMAllocator *pStaticStore, const FX_WCHAR* psz, int32_t &iOff, int32_t iLen, FDE_CSSSELECTORTYPE eType);
void SetType(FDE_CSSSELECTORTYPE eType)
{
m_eType = eType;
@@ -141,7 +141,7 @@ public:
virtual int32_t CountRules() const;
virtual IFDE_CSSRule* GetRule(int32_t index);
FX_BOOL LoadFromStream(const CFX_WideString &szUrl, IFX_Stream *pStream, FX_WORD wCodePage);
- FX_BOOL LoadFromBuffer(const CFX_WideString &szUrl, FX_LPCWSTR pBuffer, int32_t iBufSize, FX_WORD wCodePage);
+ FX_BOOL LoadFromBuffer(const CFX_WideString &szUrl, const FX_WCHAR* pBuffer, int32_t iBufSize, FX_WORD wCodePage);
protected:
void Reset();
FX_BOOL LoadFromSyntax(IFDE_CSSSyntaxParser *pSyntax);
diff --git a/xfa/src/fdp/src/css/fde_csssyntax.cpp b/xfa/src/fdp/src/css/fde_csssyntax.cpp
index f1cb877b32..058c7c0a3c 100644
--- a/xfa/src/fdp/src/css/fde_csssyntax.cpp
+++ b/xfa/src/fdp/src/css/fde_csssyntax.cpp
@@ -51,7 +51,7 @@ FX_BOOL CFDE_CSSSyntaxParser::Init(IFX_Stream *pStream, int32_t iCSSPlaneSize, i
m_iPlaneSize = iCSSPlaneSize;
return TRUE;
}
-FX_BOOL CFDE_CSSSyntaxParser::Init(FX_LPCWSTR pBuffer, int32_t iBufferSize, int32_t iTextDatSize , FX_BOOL bOnlyDeclaration )
+FX_BOOL CFDE_CSSSyntaxParser::Init(const FX_WCHAR* pBuffer, int32_t iBufferSize, int32_t iTextDatSize , FX_BOOL bOnlyDeclaration )
{
FXSYS_assert(pBuffer != NULL && iBufferSize > 0 && iTextDatSize > 0);
Reset(bOnlyDeclaration);
@@ -299,7 +299,7 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSSyntaxParser::DoSyntaxParse()
AppendChar(wch);
} else {
int32_t iLen = m_TextData.GetLength();
- FX_LPCWSTR psz = m_TextData.GetBuffer();
+ const FX_WCHAR* psz = m_TextData.GetBuffer();
if (FXSYS_wcsncmp(L"charset", psz, iLen) == 0) {
SwitchMode(FDE_CSSSYNTAXMODE_Charset);
} else if (FXSYS_wcsncmp(L"import", psz, iLen) == 0) {
@@ -406,7 +406,7 @@ inline FX_BOOL CFDE_CSSSyntaxParser::RestoreMode()
m_ModeStack.Pop();
return TRUE;
}
-FX_LPCWSTR CFDE_CSSSyntaxParser::GetCurrentString(int32_t &iLength) const
+const FX_WCHAR* CFDE_CSSSyntaxParser::GetCurrentString(int32_t &iLength) const
{
iLength = m_iTextDatLen;
return m_TextData.GetBuffer();
@@ -431,10 +431,10 @@ void CFDE_CSSTextBuf::Reset()
}
m_iDatPos = m_iDatLen = m_iBufLen;
}
-FX_BOOL CFDE_CSSTextBuf::AttachBuffer(FX_LPCWSTR pBuffer, int32_t iBufLen)
+FX_BOOL CFDE_CSSTextBuf::AttachBuffer(const FX_WCHAR* pBuffer, int32_t iBufLen)
{
Reset();
- m_pBuffer = (FX_LPWSTR)pBuffer;
+ m_pBuffer = (FX_WCHAR*)pBuffer;
m_iDatLen = m_iBufLen = iBufLen;
return m_bExtBuf = TRUE;
}
@@ -466,9 +466,9 @@ FX_BOOL CFDE_CSSTextBuf::ExpandBuf(int32_t iDesiredSize)
if (m_bExtBuf) {
return FALSE;
} else if (m_pBuffer == NULL) {
- m_pBuffer = (FX_LPWSTR)FDE_Alloc(iDesiredSize * sizeof(FX_WCHAR));
+ m_pBuffer = (FX_WCHAR*)FDE_Alloc(iDesiredSize * sizeof(FX_WCHAR));
} else if (m_iBufLen != iDesiredSize) {
- m_pBuffer = (FX_LPWSTR)FDE_Realloc(m_pBuffer, iDesiredSize * sizeof(FX_WCHAR));
+ m_pBuffer = (FX_WCHAR*)FDE_Realloc(m_pBuffer, iDesiredSize * sizeof(FX_WCHAR));
} else {
return TRUE;
}
diff --git a/xfa/src/fdp/src/css/fde_csssyntax.h b/xfa/src/fdp/src/css/fde_csssyntax.h
index 4ab132d2c8..6071b76910 100644
--- a/xfa/src/fdp/src/css/fde_csssyntax.h
+++ b/xfa/src/fdp/src/css/fde_csssyntax.h
@@ -11,7 +11,7 @@ class CFDE_CSSTextBuf : public CFX_Target
public:
CFDE_CSSTextBuf();
~CFDE_CSSTextBuf();
- FX_BOOL AttachBuffer(FX_LPCWSTR pBuffer, int32_t iBufLen);
+ FX_BOOL AttachBuffer(const FX_WCHAR* pBuffer, int32_t iBufLen);
FX_BOOL EstimateSize(int32_t iAllocSize);
int32_t LoadFromStream(IFX_Stream *pTxtStream, int32_t iStreamOffset, int32_t iMaxChars, FX_BOOL &bEOS);
FX_BOOL AppendChar(FX_WCHAR wch)
@@ -59,14 +59,14 @@ public:
{
return m_iDatLen;
}
- FX_LPCWSTR GetBuffer() const
+ const FX_WCHAR* GetBuffer() const
{
return m_pBuffer;
}
protected:
FX_BOOL ExpandBuf(int32_t iDesiredSize);
FX_BOOL m_bExtBuf;
- FX_LPWSTR m_pBuffer;
+ FX_WCHAR* m_pBuffer;
int32_t m_iBufLen;
int32_t m_iDatLen;
int32_t m_iDatPos;
@@ -97,9 +97,9 @@ public:
FDE_Delete this;
}
virtual FX_BOOL Init(IFX_Stream *pStream, int32_t iCSSPlaneSize, int32_t iTextDataSize = 32, FX_BOOL bOnlyDeclaration = FALSE);
- virtual FX_BOOL Init(FX_LPCWSTR pBuffer, int32_t iBufferSize, int32_t iTextDatSize = 32, FX_BOOL bOnlyDeclaration = FALSE);
+ virtual FX_BOOL Init(const FX_WCHAR* pBuffer, int32_t iBufferSize, int32_t iTextDatSize = 32, FX_BOOL bOnlyDeclaration = FALSE);
virtual FDE_CSSSYNTAXSTATUS DoSyntaxParse();
- virtual FX_LPCWSTR GetCurrentString(int32_t &iLength) const;
+ virtual const FX_WCHAR* GetCurrentString(int32_t &iLength) const;
protected:
void Reset(FX_BOOL bOnlyDeclaration);
void SwitchMode(FDE_CSSSYNTAXMODE eMode);
diff --git a/xfa/src/fdp/src/fde/fde_gdidevice.h b/xfa/src/fdp/src/fde/fde_gdidevice.h
index 86f7bac176..f7336c9b0a 100644
--- a/xfa/src/fdp/src/fde/fde_gdidevice.h
+++ b/xfa/src/fdp/src/fde/fde_gdidevice.h
@@ -66,7 +66,7 @@ protected:
Gdiplus::GraphicsState m_GraphicsState;
Gdiplus::Graphics *m_pGraphics;
Gdiplus::Bitmap *m_pBitmap;
- FX_LPBYTE m_pGlyphBuf;
+ uint8_t* m_pGlyphBuf;
FX_DWORD m_dwGlyphLen;
CFX_RectF m_rtClipRect;
CFDE_GdiPath *m_pClipPath;
diff --git a/xfa/src/fdp/src/fde/fde_gedevice.cpp b/xfa/src/fdp/src/fde/fde_gedevice.cpp
index 1ecbb1434b..9e475cdb67 100644
--- a/xfa/src/fdp/src/fde/fde_gedevice.cpp
+++ b/xfa/src/fdp/src/fde/fde_gedevice.cpp
@@ -134,7 +134,7 @@ FX_BOOL CFDE_FxgeDevice::DrawImage(CFX_DIBSource *pDib, const CFX_RectF *pSrcRec
if (pDevMatrix) {
dib2fxdev.Concat(*pDevMatrix);
}
- FX_LPVOID handle = NULL;
+ void* handle = NULL;
m_pDevice->StartDIBits(pDib, 255, 0, (const CFX_AffineMatrix*)&dib2fxdev, 0, handle);
while (m_pDevice->ContinueDIBits(handle, NULL)) { }
m_pDevice->CancelDIBits(handle);
diff --git a/xfa/src/fdp/src/tto/fde_textout.cpp b/xfa/src/fdp/src/tto/fde_textout.cpp
index fa45b3e4d0..7b7ea1c63b 100644
--- a/xfa/src/fdp/src/tto/fde_textout.cpp
+++ b/xfa/src/fdp/src/tto/fde_textout.cpp
@@ -182,7 +182,7 @@ int32_t CFDE_TextOut::GetTotalLines()
{
return m_iTotalLines;
}
-void CFDE_TextOut::CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_Size &size)
+void CFDE_TextOut::CalcSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_Size &size)
{
CFX_RectF rtText;
rtText.Set(0.0f, 0.0f, (FX_FLOAT)size.x, (FX_FLOAT)size.y);
@@ -190,7 +190,7 @@ void CFDE_TextOut::CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_Size &size)
size.x = (int32_t)rtText.Width();
size.y = (int32_t)rtText.Height();
}
-void CFDE_TextOut::CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_SizeF &size)
+void CFDE_TextOut::CalcSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_SizeF &size)
{
CFX_RectF rtText;
rtText.Set(0.0f, 0.0f, size.x, size.y);
@@ -198,14 +198,14 @@ void CFDE_TextOut::CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_SizeF &size)
size.x = rtText.Width();
size.y = rtText.Height();
}
-void CFDE_TextOut::CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_Rect &rect)
+void CFDE_TextOut::CalcSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_Rect &rect)
{
CFX_RectF rtText;
rtText.Set((FX_FLOAT)rect.left, (FX_FLOAT)rect.top, (FX_FLOAT)rect.Width(), (FX_FLOAT)rect.Height());
CalcSize(pwsStr, iLength, rtText);
rect.Set((int32_t)rtText.left, (int32_t)rtText.top, (int32_t)rtText.Width(), (int32_t)rtText.Height());
}
-void CFDE_TextOut::CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_RectF &rect)
+void CFDE_TextOut::CalcSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_RectF &rect)
{
if (pwsStr == NULL || iLength < 1) {
rect.width = 0.0f;
@@ -218,7 +218,7 @@ void CFDE_TextOut::CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_RectF &rect)
m_Matrix.TransformRect(rect);
}
}
-void CFDE_TextOut::CalcLogicSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_SizeF &size)
+void CFDE_TextOut::CalcLogicSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_SizeF &size)
{
CFX_RectF rtText;
rtText.Set(0.0f, 0.0f, size.x, size.y);
@@ -226,7 +226,7 @@ void CFDE_TextOut::CalcLogicSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_SizeF &
size.x = rtText.Width();
size.y = rtText.Height();
}
-void CFDE_TextOut::CalcLogicSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_RectF &rect)
+void CFDE_TextOut::CalcLogicSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_RectF &rect)
{
if (pwsStr == NULL || iLength < 1) {
rect.width = 0.0f;
@@ -235,12 +235,12 @@ void CFDE_TextOut::CalcLogicSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_RectF &
CalcTextSize(pwsStr, iLength, rect);
}
}
-void CFDE_TextOut::CalcTextSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_RectF &rect)
+void CFDE_TextOut::CalcTextSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_RectF &rect)
{
FXSYS_assert(m_pFont != NULL && m_fFontSize >= 1.0f);
SetLineWidth(rect);
m_iTotalLines = 0;
- FX_LPCWSTR pStr = pwsStr;
+ const FX_WCHAR* pStr = pwsStr;
FX_BOOL bHotKey = (m_dwStyles & FDE_TTOSTYLE_HotKey) ? TRUE : FALSE;
FX_BOOL bVertical = (m_dwStyles & FDE_TTOSTYLE_VerticalLayout) ? TRUE : FALSE;
FX_FLOAT fWidth = 0.0f;
@@ -340,25 +340,25 @@ FX_BOOL CFDE_TextOut::RetrieveLineWidth(FX_DWORD dwBreakStatus, FX_FLOAT &fStart
m_iTotalLines++;
return TRUE;
}
-void CFDE_TextOut::DrawText(FX_LPCWSTR pwsStr, int32_t iLength, int32_t x, int32_t y)
+void CFDE_TextOut::DrawText(const FX_WCHAR* pwsStr, int32_t iLength, int32_t x, int32_t y)
{
CFX_RectF rtText;
rtText.Set((FX_FLOAT)x, (FX_FLOAT)y, m_fFontSize * 1000.0f, m_fFontSize * 1000.0f);
DrawText(pwsStr, iLength, rtText);
}
-void CFDE_TextOut::DrawText(FX_LPCWSTR pwsStr, int32_t iLength, FX_FLOAT x, FX_FLOAT y)
+void CFDE_TextOut::DrawText(const FX_WCHAR* pwsStr, int32_t iLength, FX_FLOAT x, FX_FLOAT y)
{
CFX_RectF rtText;
rtText.Set(x, y, m_fFontSize * 1000.0f, m_fFontSize * 1000.0f);
DrawText(pwsStr, iLength, rtText);
}
-void CFDE_TextOut::DrawText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_Rect &rect)
+void CFDE_TextOut::DrawText(const FX_WCHAR* pwsStr, int32_t iLength, const CFX_Rect &rect)
{
CFX_RectF rtText;
rtText.Set((FX_FLOAT)rect.left, (FX_FLOAT)rect.top, (FX_FLOAT)rect.width, (FX_FLOAT)rect.height);
DrawText(pwsStr, iLength, rtText);
}
-void CFDE_TextOut::DrawText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_RectF &rect)
+void CFDE_TextOut::DrawText(const FX_WCHAR* pwsStr, int32_t iLength, const CFX_RectF &rect)
{
CFX_RectF rtText;
rtText.Set(rect.left, rect.top, rect.width, rect.height);
@@ -367,20 +367,20 @@ void CFDE_TextOut::DrawText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_RectF
rm.TransformRect(rtText);
DrawText(pwsStr, iLength, rtText, m_rtClip);
}
-void CFDE_TextOut::DrawLogicText(FX_LPCWSTR pwsStr, int32_t iLength, FX_FLOAT x, FX_FLOAT y)
+void CFDE_TextOut::DrawLogicText(const FX_WCHAR* pwsStr, int32_t iLength, FX_FLOAT x, FX_FLOAT y)
{
CFX_RectF rtText;
rtText.Set(x, y, m_fFontSize * 1000.0f, m_fFontSize * 1000.0f);
DrawLogicText(pwsStr, iLength, rtText);
}
-void CFDE_TextOut::DrawLogicText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_RectF &rect)
+void CFDE_TextOut::DrawLogicText(const FX_WCHAR* pwsStr, int32_t iLength, const CFX_RectF &rect)
{
CFX_RectF rtClip;
rtClip.Set(m_rtLogicClip.left, m_rtLogicClip.top, m_rtLogicClip.width, m_rtLogicClip.height);
m_Matrix.TransformRect(rtClip);
DrawText(pwsStr, iLength, rect, rtClip);
}
-void CFDE_TextOut::DrawText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_RectF &rect, const CFX_RectF &rtClip)
+void CFDE_TextOut::DrawText(const FX_WCHAR* pwsStr, int32_t iLength, const CFX_RectF &rect, const CFX_RectF &rtClip)
{
FXSYS_assert(m_pFont != NULL && m_fFontSize >= 1.0f);
if (pwsStr == NULL || iLength < 1) {
@@ -450,7 +450,7 @@ void CFDE_TextOut::LoadEllipsis()
return;
}
ExpandBuffer(iLength, 1);
- FX_LPCWSTR pStr = (FX_LPCWSTR)m_wsEllipsis;
+ const FX_WCHAR* pStr = (const FX_WCHAR*)m_wsEllipsis;
int32_t *pCharWidths = m_pEllCharWidths;
FX_DWORD dwBreakStatus;
FX_WCHAR wch;
@@ -487,9 +487,9 @@ void CFDE_TextOut::RetrieveEllPieces(int32_t *&pCharWidths)
}
m_pTxtBreak->ClearBreakPieces();
}
-void CFDE_TextOut::LoadText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_RectF &rect)
+void CFDE_TextOut::LoadText(const FX_WCHAR* pwsStr, int32_t iLength, const CFX_RectF &rect)
{
- FX_LPWSTR pStr = m_wsText.GetBuffer(iLength);
+ FX_WCHAR* pStr = m_wsText.GetBuffer(iLength);
int32_t iTxtLength = iLength;
ExpandBuffer(iTxtLength, 0);
FX_BOOL bHotKey = (m_dwStyles & FDE_TTOSTYLE_HotKey) ? TRUE : FALSE;
@@ -693,7 +693,7 @@ void CFDE_TextOut::Reload(const CFX_RectF &rect)
}
void CFDE_TextOut::ReloadLinePiece(CFDE_TTOLine *pLine, const CFX_RectF &rect)
{
- FX_LPCWSTR pwsStr = (FX_LPCWSTR)m_wsText;
+ const FX_WCHAR* pwsStr = (const FX_WCHAR*)m_wsText;
FX_BOOL bVertical = (m_dwStyles & FDE_TTOSTYLE_VerticalLayout) ? TRUE : FALSE;
int32_t iPieceWidths = 0;
FDE_LPTTOPIECE pPiece = pLine->GetPtrAt(0);
@@ -816,7 +816,7 @@ void CFDE_TextOut::ToTextRun(const FDE_LPTTOPIECE pPiece, FX_TXTRUN &tr)
{
tr.pAccess = NULL;
tr.pIdentity = NULL;
- tr.pStr = (FX_LPCWSTR)m_wsText + pPiece->iStartChar;
+ tr.pStr = (const FX_WCHAR*)m_wsText + pPiece->iStartChar;
tr.pWidths = m_pCharWidths + pPiece->iStartChar;
tr.iLength = pPiece->iChars;
tr.pFont = m_pFont;
diff --git a/xfa/src/fdp/src/tto/fde_textout.h b/xfa/src/fdp/src/tto/fde_textout.h
index 38bc8ebcec..c7a46e3d73 100644
--- a/xfa/src/fdp/src/tto/fde_textout.h
+++ b/xfa/src/fdp/src/tto/fde_textout.h
@@ -56,28 +56,28 @@ public:
virtual void SetClipRect(const CFX_RectF &rtClip);
virtual void SetMatrix(const CFX_Matrix &matrix);
virtual void SetLineBreakTolerance(FX_FLOAT fTolerance);
- virtual void CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_Size &size);
- virtual void CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_SizeF &size);
- virtual void CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_Rect &rect);
- virtual void CalcSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_RectF &rect);
+ virtual void CalcSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_Size &size);
+ virtual void CalcSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_SizeF &size);
+ virtual void CalcSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_Rect &rect);
+ virtual void CalcSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_RectF &rect);
- virtual void DrawText(FX_LPCWSTR pwsStr, int32_t iLength, int32_t x, int32_t y);
- virtual void DrawText(FX_LPCWSTR pwsStr, int32_t iLength, FX_FLOAT x, FX_FLOAT y);
- virtual void DrawText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_Rect &rect);
- virtual void DrawText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_RectF &rect);
+ virtual void DrawText(const FX_WCHAR* pwsStr, int32_t iLength, int32_t x, int32_t y);
+ virtual void DrawText(const FX_WCHAR* pwsStr, int32_t iLength, FX_FLOAT x, FX_FLOAT y);
+ virtual void DrawText(const FX_WCHAR* pwsStr, int32_t iLength, const CFX_Rect &rect);
+ virtual void DrawText(const FX_WCHAR* pwsStr, int32_t iLength, const CFX_RectF &rect);
virtual void SetLogicClipRect(const CFX_RectF &rtClip);
- virtual void CalcLogicSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_SizeF &size);
- virtual void CalcLogicSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_RectF &rect);
- virtual void DrawLogicText(FX_LPCWSTR pwsStr, int32_t iLength, FX_FLOAT x, FX_FLOAT y);
- virtual void DrawLogicText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_RectF &rect);
+ virtual void CalcLogicSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_SizeF &size);
+ virtual void CalcLogicSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_RectF &rect);
+ virtual void DrawLogicText(const FX_WCHAR* pwsStr, int32_t iLength, FX_FLOAT x, FX_FLOAT y);
+ virtual void DrawLogicText(const FX_WCHAR* pwsStr, int32_t iLength, const CFX_RectF &rect);
virtual int32_t GetTotalLines();
protected:
- void CalcTextSize(FX_LPCWSTR pwsStr, int32_t iLength, CFX_RectF &rect);
+ void CalcTextSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_RectF &rect);
FX_BOOL RetrieveLineWidth(FX_DWORD dwBreakStatus, FX_FLOAT &fStartPos, FX_FLOAT &fWidth, FX_FLOAT &fHeight);
void SetLineWidth(CFX_RectF &rect);
- void DrawText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_RectF &rect, const CFX_RectF &rtClip);
- void LoadText(FX_LPCWSTR pwsStr, int32_t iLength, const CFX_RectF &rect);
+ void DrawText(const FX_WCHAR* pwsStr, int32_t iLength, const CFX_RectF &rect, const CFX_RectF &rtClip);
+ void LoadText(const FX_WCHAR* pwsStr, int32_t iLength, const CFX_RectF &rect);
void LoadEllipsis();
void ExpandBuffer(int32_t iSize, int32_t iType);
void RetrieveEllPieces(int32_t *&pCharWidths);
diff --git a/xfa/src/fdp/src/xml/fde_xml.cpp b/xfa/src/fdp/src/xml/fde_xml.cpp
index ab7906b1bc..989969633b 100644
--- a/xfa/src/fdp/src/xml/fde_xml.cpp
+++ b/xfa/src/fdp/src/xml/fde_xml.cpp
@@ -120,7 +120,7 @@ int32_t CFDE_XMLNode::GetChildNodeIndex(CFDE_XMLNode *pNode) const
}
return -1;
}
-CFDE_XMLNode* CFDE_XMLNode::GetPath(FX_LPCWSTR pPath, int32_t iLength, FX_BOOL bQualifiedName) const
+CFDE_XMLNode* CFDE_XMLNode::GetPath(const FX_WCHAR* pPath, int32_t iLength, FX_BOOL bQualifiedName) const
{
FXSYS_assert(pPath != NULL);
if (iLength < 0) {
@@ -130,7 +130,8 @@ CFDE_XMLNode* CFDE_XMLNode::GetPath(FX_LPCWSTR pPath, int32_t iLength, FX_BOOL b
return NULL;
}
CFX_WideString csPath;
- FX_LPCWSTR pStart = pPath, pEnd = pPath + iLength;
+ const FX_WCHAR* pStart = pPath;
+ const FX_WCHAR* pEnd = pPath + iLength;
FX_WCHAR ch;
while (pStart < pEnd) {
ch = *pStart ++;
@@ -406,7 +407,7 @@ void CFDE_XMLNode::SaveXMLNode(IFX_Stream *pXMLStream)
ws += L"\"?>";
pXMLStream->WriteString(ws, ws.GetLength());
} else {
- ws.Format(L"<?%s", (FX_LPCWSTR)pInstruction->m_wsTarget);
+ ws.Format(L"<?%s", (const FX_WCHAR*)pInstruction->m_wsTarget);
pXMLStream->WriteString(ws, ws.GetLength());
CFX_WideStringArray &attributes = pInstruction->m_Attributes;
int32_t i, iCount = attributes.GetSize();
@@ -560,7 +561,7 @@ FX_BOOL CFDE_XMLInstruction::GetAttribute(int32_t index, CFX_WideString &wsAttri
}
return FALSE;
}
-FX_BOOL CFDE_XMLInstruction::HasAttribute(FX_LPCWSTR pwsAttriName) const
+FX_BOOL CFDE_XMLInstruction::HasAttribute(const FX_WCHAR* pwsAttriName) const
{
int32_t iCount = m_Attributes.GetSize();
for (int32_t i = 0; i < iCount; i += 2) {
@@ -570,7 +571,7 @@ FX_BOOL CFDE_XMLInstruction::HasAttribute(FX_LPCWSTR pwsAttriName) const
}
return FALSE;
}
-void CFDE_XMLInstruction::GetString(FX_LPCWSTR pwsAttriName, CFX_WideString &wsAttriValue, FX_LPCWSTR pwsDefValue) const
+void CFDE_XMLInstruction::GetString(const FX_WCHAR* pwsAttriName, CFX_WideString &wsAttriValue, const FX_WCHAR* pwsDefValue) const
{
int32_t iCount = m_Attributes.GetSize();
for (int32_t i = 0; i < iCount; i += 2) {
@@ -595,39 +596,39 @@ void CFDE_XMLInstruction::SetString(const CFX_WideString &wsAttriName, const CFX
m_Attributes.Add(wsAttriName);
m_Attributes.Add(wsAttriValue);
}
-int32_t CFDE_XMLInstruction::GetInteger(FX_LPCWSTR pwsAttriName, int32_t iDefValue) const
+int32_t CFDE_XMLInstruction::GetInteger(const FX_WCHAR* pwsAttriName, int32_t iDefValue) const
{
int32_t iCount = m_Attributes.GetSize();
for (int32_t i = 0; i < iCount; i += 2) {
if (m_Attributes[i].Compare(pwsAttriName) == 0) {
- return FXSYS_wtoi((FX_LPCWSTR)m_Attributes[i + 1]);
+ return FXSYS_wtoi((const FX_WCHAR*)m_Attributes[i + 1]);
}
}
return iDefValue;
}
-void CFDE_XMLInstruction::SetInteger(FX_LPCWSTR pwsAttriName, int32_t iAttriValue)
+void CFDE_XMLInstruction::SetInteger(const FX_WCHAR* pwsAttriName, int32_t iAttriValue)
{
CFX_WideString wsValue;
wsValue.Format(L"%d", iAttriValue);
SetString(pwsAttriName, wsValue);
}
-FX_FLOAT CFDE_XMLInstruction::GetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fDefValue) const
+FX_FLOAT CFDE_XMLInstruction::GetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fDefValue) const
{
int32_t iCount = m_Attributes.GetSize();
for (int32_t i = 0; i < iCount; i += 2) {
if (m_Attributes[i].Compare(pwsAttriName) == 0) {
- return FX_wcstof((FX_LPCWSTR)m_Attributes[i + 1]);
+ return FX_wcstof((const FX_WCHAR*)m_Attributes[i + 1]);
}
}
return fDefValue;
}
-void CFDE_XMLInstruction::SetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fAttriValue)
+void CFDE_XMLInstruction::SetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fAttriValue)
{
CFX_WideString wsValue;
wsValue.Format(L"%f", fAttriValue);
SetString(pwsAttriName, wsValue);
}
-void CFDE_XMLInstruction::RemoveAttribute(FX_LPCWSTR pwsAttriName)
+void CFDE_XMLInstruction::RemoveAttribute(const FX_WCHAR* pwsAttriName)
{
int32_t iCount = m_Attributes.GetSize();
for (int32_t i = 0; i < iCount; i += 2) {
@@ -762,7 +763,7 @@ FX_BOOL CFDE_XMLElement::GetAttribute(int32_t index, CFX_WideString &wsAttriName
}
return FALSE;
}
-FX_BOOL CFDE_XMLElement::HasAttribute(FX_LPCWSTR pwsAttriName) const
+FX_BOOL CFDE_XMLElement::HasAttribute(const FX_WCHAR* pwsAttriName) const
{
int32_t iCount = m_Attributes.GetSize();
for (int32_t i = 0; i < iCount; i += 2) {
@@ -772,7 +773,7 @@ FX_BOOL CFDE_XMLElement::HasAttribute(FX_LPCWSTR pwsAttriName) const
}
return FALSE;
}
-void CFDE_XMLElement::GetString(FX_LPCWSTR pwsAttriName, CFX_WideString &wsAttriValue, FX_LPCWSTR pwsDefValue) const
+void CFDE_XMLElement::GetString(const FX_WCHAR* pwsAttriName, CFX_WideString &wsAttriValue, const FX_WCHAR* pwsDefValue) const
{
int32_t iCount = m_Attributes.GetSize();
for (int32_t i = 0; i < iCount; i += 2) {
@@ -797,39 +798,39 @@ void CFDE_XMLElement::SetString(const CFX_WideString &wsAttriName, const CFX_Wid
m_Attributes.Add(wsAttriName);
m_Attributes.Add(wsAttriValue);
}
-int32_t CFDE_XMLElement::GetInteger(FX_LPCWSTR pwsAttriName, int32_t iDefValue) const
+int32_t CFDE_XMLElement::GetInteger(const FX_WCHAR* pwsAttriName, int32_t iDefValue) const
{
int32_t iCount = m_Attributes.GetSize();
for (int32_t i = 0; i < iCount; i += 2) {
if (m_Attributes[i].Compare(pwsAttriName) == 0) {
- return FXSYS_wtoi((FX_LPCWSTR)m_Attributes[i + 1]);
+ return FXSYS_wtoi((const FX_WCHAR*)m_Attributes[i + 1]);
}
}
return iDefValue;
}
-void CFDE_XMLElement::SetInteger(FX_LPCWSTR pwsAttriName, int32_t iAttriValue)
+void CFDE_XMLElement::SetInteger(const FX_WCHAR* pwsAttriName, int32_t iAttriValue)
{
CFX_WideString wsValue;
wsValue.Format(L"%d", iAttriValue);
SetString(pwsAttriName, wsValue);
}
-FX_FLOAT CFDE_XMLElement::GetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fDefValue) const
+FX_FLOAT CFDE_XMLElement::GetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fDefValue) const
{
int32_t iCount = m_Attributes.GetSize();
for (int32_t i = 0; i < iCount; i += 2) {
if (m_Attributes[i].Compare(pwsAttriName) == 0) {
- return FX_wcstof((FX_LPCWSTR)m_Attributes[i + 1]);
+ return FX_wcstof((const FX_WCHAR*)m_Attributes[i + 1]);
}
}
return fDefValue;
}
-void CFDE_XMLElement::SetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fAttriValue)
+void CFDE_XMLElement::SetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fAttriValue)
{
CFX_WideString wsValue;
wsValue.Format(L"%f", fAttriValue);
SetString(pwsAttriName, wsValue);
}
-void CFDE_XMLElement::RemoveAttribute(FX_LPCWSTR pwsAttriName)
+void CFDE_XMLElement::RemoveAttribute(const FX_WCHAR* pwsAttriName)
{
int32_t iCount = m_Attributes.GetSize();
for (int32_t i = 0; i < iCount; i += 2) {
@@ -1021,7 +1022,7 @@ void CFDE_XMLDoc::SaveXMLNode(IFX_Stream *pXMLStream, IFDE_XMLNode *pINode)
ws += L"\"?>";
pXMLStream->WriteString(ws, ws.GetLength());
} else {
- ws.Format(L"<?%s", (FX_LPCWSTR)pInstruction->m_wsTarget);
+ ws.Format(L"<?%s", (const FX_WCHAR*)pInstruction->m_wsTarget);
pXMLStream->WriteString(ws, ws.GetLength());
CFX_WideStringArray &attributes = pInstruction->m_Attributes;
int32_t i, iCount = attributes.GetSize();
@@ -1390,7 +1391,7 @@ CFDE_BlockBuffer::~CFDE_BlockBuffer()
{
ClearBuffer();
}
-FX_LPWSTR CFDE_BlockBuffer::GetAvailableBlock(int32_t& iIndexInBlock)
+FX_WCHAR* CFDE_BlockBuffer::GetAvailableBlock(int32_t& iIndexInBlock)
{
iIndexInBlock = 0;
int32_t iBlockNum = m_BlockArray.GetSize();
@@ -1398,9 +1399,9 @@ FX_LPWSTR CFDE_BlockBuffer::GetAvailableBlock(int32_t& iIndexInBlock)
return NULL;
}
int32_t iRealIndex = m_iStartPosition + m_iDataLength;
- FX_LPWSTR pDataBlock = NULL;
+ FX_WCHAR* pDataBlock = NULL;
if(iRealIndex == m_iBufferSize) {
- FX_LPWSTR pBlock = (FX_LPWSTR)FDE_Alloc(m_iAllocStep * sizeof(FX_WCHAR));
+ FX_WCHAR* pBlock = (FX_WCHAR*)FDE_Alloc(m_iAllocStep * sizeof(FX_WCHAR));
if (pBlock) {
m_BlockArray.Add(pBlock);
m_iBufferSize += m_iAllocStep;
@@ -1411,7 +1412,7 @@ FX_LPWSTR CFDE_BlockBuffer::GetAvailableBlock(int32_t& iIndexInBlock)
int32_t iBlockIndex = iRealIndex / m_iAllocStep;
int32_t iInnerIndex = iRealIndex % m_iAllocStep;
iIndexInBlock = iInnerIndex;
- pDataBlock = (FX_LPWSTR)m_BlockArray[iBlockIndex];
+ pDataBlock = (FX_WCHAR*)m_BlockArray[iBlockIndex];
}
return pDataBlock;
}
@@ -1420,7 +1421,7 @@ FX_BOOL CFDE_BlockBuffer::InitBuffer(int32_t iBufferSize)
ClearBuffer();
int32_t iNumOfBlock = (iBufferSize - 1) / m_iAllocStep + 1;
for (int32_t i = 0; i < iNumOfBlock; i++) {
- FX_LPWSTR pBlockBuffer = (FX_LPWSTR)FDE_Alloc(m_iAllocStep * sizeof(FX_WCHAR));
+ FX_WCHAR* pBlockBuffer = (FX_WCHAR*)FDE_Alloc(m_iAllocStep * sizeof(FX_WCHAR));
if (pBlockBuffer == NULL) {
ClearBuffer();
return FALSE;
@@ -1442,7 +1443,7 @@ void CFDE_BlockBuffer::SetTextChar(int32_t iIndex, FX_WCHAR ch)
if (iBlockIndex >= iBlockSize) {
int32_t iNewBlocks = iBlockIndex - iBlockSize + 1;
do {
- FX_LPWSTR pBlock = (FX_LPWSTR)FDE_Alloc(m_iAllocStep * sizeof(FX_WCHAR));
+ FX_WCHAR* pBlock = (FX_WCHAR*)FDE_Alloc(m_iAllocStep * sizeof(FX_WCHAR));
if (!pBlock) {
return;
}
@@ -1450,7 +1451,7 @@ void CFDE_BlockBuffer::SetTextChar(int32_t iIndex, FX_WCHAR ch)
m_iBufferSize += m_iAllocStep;
} while (--iNewBlocks);
}
- FX_LPWSTR pTextData = (FX_LPWSTR)m_BlockArray[iBlockIndex];
+ FX_WCHAR* pTextData = (FX_WCHAR*)m_BlockArray[iBlockIndex];
*(pTextData + iInnerIndex) = ch;
if (m_iDataLength <= iIndex) {
m_iDataLength = iIndex + 1;
@@ -1486,7 +1487,7 @@ void CFDE_BlockBuffer::GetTextData(CFX_WideString& wsTextData, int32_t iStart,
if (iLength <= 0) {
return;
}
- FX_LPWSTR pBuf = wsTextData.GetBuffer(iLength);
+ FX_WCHAR* pBuf = wsTextData.GetBuffer(iLength);
if (!pBuf) {
return;
}
@@ -1507,7 +1508,7 @@ void CFDE_BlockBuffer::GetTextData(CFX_WideString& wsTextData, int32_t iStart,
if (i == iEndBlockIndex) {
iCopyLength -= ((m_iAllocStep - 1) - iEndInnerIndex);
}
- FX_LPWSTR pBlockBuf = (FX_LPWSTR)m_BlockArray[i];
+ FX_WCHAR* pBlockBuf = (FX_WCHAR*)m_BlockArray[i];
FXSYS_memcpy(pBuf + iPointer, pBlockBuf + iBufferPointer, iCopyLength * sizeof(FX_WCHAR));
iPointer += iCopyLength;
}
@@ -1576,7 +1577,7 @@ void CFDE_XMLSyntaxParser::Init(IFX_Stream *pStream, int32_t iXMLPlaneSize, int3
uint8_t bom[4];
m_iCurrentPos = m_pStream->GetBOM(bom);
FXSYS_assert(m_pBuffer == NULL);
- m_pBuffer = (FX_LPWSTR)FDE_Alloc(m_iXMLPlaneSize * sizeof(FX_WCHAR));
+ m_pBuffer = (FX_WCHAR*)FDE_Alloc(m_iXMLPlaneSize * sizeof(FX_WCHAR));
m_pStart = m_pEnd = m_pBuffer;
FXSYS_assert(!m_BlockBuffer.IsInitialized());
m_BlockBuffer.InitBuffer();
@@ -1892,7 +1893,7 @@ FX_DWORD CFDE_XMLSyntaxParser::DoSyntaxParse()
break;
}
m_SkipStack.Pop();
- FX_LPDWORD pDWord = m_SkipStack.GetTopElement();
+ FX_DWORD* pDWord = m_SkipStack.GetTopElement();
if (pDWord == NULL) {
m_dwMode = FDE_XMLSYNTAXMODE_Text;
} else {
@@ -1923,7 +1924,7 @@ FX_DWORD CFDE_XMLSyntaxParser::DoSyntaxParse()
default:
if (ch == m_SkipChar) {
m_SkipStack.Pop();
- FX_LPDWORD pDWord = m_SkipStack.GetTopElement();
+ FX_DWORD* pDWord = m_SkipStack.GetTopElement();
if (pDWord == NULL) {
if (m_iDataLength >= 9) {
CFX_WideString wsHeader;
@@ -2078,10 +2079,10 @@ void CFDE_XMLSyntaxParser::Init(IFX_Stream *pStream, int32_t iXMLPlaneSize, int3
uint8_t bom[4];
m_iCurrentPos = m_pStream->GetBOM(bom);
FXSYS_assert(m_pBuffer == NULL);
- m_pBuffer = (FX_LPWSTR)FDE_Alloc(m_iXMLPlaneSize * sizeof(FX_WCHAR));
+ m_pBuffer = (FX_WCHAR*)FDE_Alloc(m_iXMLPlaneSize * sizeof(FX_WCHAR));
m_pStart = m_pEnd = m_pBuffer;
FXSYS_assert(m_pwsTextData == NULL);
- m_pwsTextData = (FX_LPWSTR)FDE_Alloc(m_iTextDataSize * sizeof(FX_WCHAR));
+ m_pwsTextData = (FX_WCHAR*)FDE_Alloc(m_iTextDataSize * sizeof(FX_WCHAR));
m_iParsedBytes = m_iParsedChars = 0;
m_iBufferChars = 0;
}
@@ -2370,7 +2371,7 @@ FX_DWORD CFDE_XMLSyntaxParser::DoSyntaxParse()
break;
}
m_SkipStack.Pop();
- FX_LPDWORD pDWord = m_SkipStack.GetTopElement();
+ FX_DWORD* pDWord = m_SkipStack.GetTopElement();
if (pDWord == NULL) {
m_dwMode = FDE_XMLSYNTAXMODE_Text;
} else {
@@ -2401,7 +2402,7 @@ FX_DWORD CFDE_XMLSyntaxParser::DoSyntaxParse()
default:
if (ch == m_SkipChar) {
m_SkipStack.Pop();
- FX_LPDWORD pDWord = m_SkipStack.GetTopElement();
+ FX_DWORD* pDWord = m_SkipStack.GetTopElement();
if (pDWord == NULL) {
m_iTextDataLength = m_iDataPos;
m_iDataPos = 0;
@@ -2523,7 +2524,7 @@ int32_t CFDE_XMLSyntaxParser::GetStatus() const
}
return m_iParsedBytes * 100 / iStreamLength;
}
-static int32_t FX_GetUTF8EncodeLength(FX_LPCWSTR pSrc, int32_t iSrcLen)
+static int32_t FX_GetUTF8EncodeLength(const FX_WCHAR* pSrc, int32_t iSrcLen)
{
FX_DWORD unicode = 0;
int32_t iDstNum = 0;
@@ -2701,11 +2702,11 @@ void CFDE_XMLSyntaxParser::ReallocTextDataBuffer()
} else {
m_iTextDataSize += 1024 * 1024;
}
- m_pwsTextData = (FX_LPWSTR)FDE_Realloc(m_pwsTextData, m_iTextDataSize * sizeof(FX_WCHAR));
+ m_pwsTextData = (FX_WCHAR*)FDE_Realloc(m_pwsTextData, m_iTextDataSize * sizeof(FX_WCHAR));
}
void CFDE_XMLSyntaxParser::GetData(CFX_WideString &wsData) const
{
- FX_LPWSTR pBuf = wsData.GetBuffer(m_iTextDataLength);
+ FX_WCHAR* pBuf = wsData.GetBuffer(m_iTextDataLength);
FXSYS_memcpy(pBuf, m_pwsTextData, m_iTextDataLength * sizeof(FX_WCHAR));
wsData.ReleaseBuffer(m_iTextDataLength);
}
diff --git a/xfa/src/fdp/src/xml/fde_xml.h b/xfa/src/fdp/src/xml/fde_xml.h
index 9353561264..b158e0d80c 100644
--- a/xfa/src/fdp/src/xml/fde_xml.h
+++ b/xfa/src/fdp/src/xml/fde_xml.h
@@ -34,7 +34,7 @@ public:
virtual int32_t CountChildNodes() const;
virtual CFDE_XMLNode* GetChildNode(int32_t index) const;
virtual int32_t GetChildNodeIndex(CFDE_XMLNode *pNode) const;
- virtual CFDE_XMLNode* GetPath(FX_LPCWSTR pPath, int32_t iLength = -1, FX_BOOL bQualifiedName = TRUE) const;
+ virtual CFDE_XMLNode* GetPath(const FX_WCHAR* pPath, int32_t iLength = -1, FX_BOOL bQualifiedName = TRUE) const;
virtual int32_t InsertChildNode(CFDE_XMLNode *pNode, int32_t index = -1);
virtual void RemoveChildNode(CFDE_XMLNode *pNode);
virtual void DeleteChildren();
@@ -71,14 +71,14 @@ public:
}
virtual int32_t CountAttributes() const;
virtual FX_BOOL GetAttribute(int32_t index, CFX_WideString &wsAttriName, CFX_WideString &wsAttriValue) const;
- virtual FX_BOOL HasAttribute(FX_LPCWSTR pwsAttriName) const;
- virtual void GetString(FX_LPCWSTR pwsAttriName, CFX_WideString &wsAttriValue, FX_LPCWSTR pwsDefValue = NULL) const;
+ virtual FX_BOOL HasAttribute(const FX_WCHAR* pwsAttriName) const;
+ virtual void GetString(const FX_WCHAR* pwsAttriName, CFX_WideString &wsAttriValue, const FX_WCHAR* pwsDefValue = NULL) const;
virtual void SetString(const CFX_WideString &wsAttriName, const CFX_WideString &wsAttriValue);
- virtual int32_t GetInteger(FX_LPCWSTR pwsAttriName, int32_t iDefValue = 0) const;
- virtual void SetInteger(FX_LPCWSTR pwsAttriName, int32_t iAttriValue);
- virtual FX_FLOAT GetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fDefValue = 0) const;
- virtual void SetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fAttriValue);
- virtual void RemoveAttribute(FX_LPCWSTR pwsAttriName);
+ virtual int32_t GetInteger(const FX_WCHAR* pwsAttriName, int32_t iDefValue = 0) const;
+ virtual void SetInteger(const FX_WCHAR* pwsAttriName, int32_t iAttriValue);
+ virtual FX_FLOAT GetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fDefValue = 0) const;
+ virtual void SetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fAttriValue);
+ virtual void RemoveAttribute(const FX_WCHAR* pwsAttriName);
virtual int32_t CountData() const;
virtual FX_BOOL GetData(int32_t index, CFX_WideString &wsData) const;
virtual void AppendData(const CFX_WideString &wsData);
@@ -108,14 +108,14 @@ public:
virtual void GetNamespaceURI(CFX_WideString &wsNamespace) const;
virtual int32_t CountAttributes() const;
virtual FX_BOOL GetAttribute(int32_t index, CFX_WideString &wsAttriName, CFX_WideString &wsAttriValue) const;
- virtual FX_BOOL HasAttribute(FX_LPCWSTR pwsAttriName) const;
- virtual void GetString(FX_LPCWSTR pwsAttriName, CFX_WideString &wsAttriValue, FX_LPCWSTR pwsDefValue = NULL) const;
+ virtual FX_BOOL HasAttribute(const FX_WCHAR* pwsAttriName) const;
+ virtual void GetString(const FX_WCHAR* pwsAttriName, CFX_WideString &wsAttriValue, const FX_WCHAR* pwsDefValue = NULL) const;
virtual void SetString(const CFX_WideString &wsAttriName, const CFX_WideString &wsAttriValue);
- virtual int32_t GetInteger(FX_LPCWSTR pwsAttriName, int32_t iDefValue = 0) const;
- virtual void SetInteger(FX_LPCWSTR pwsAttriName, int32_t iAttriValue);
- virtual FX_FLOAT GetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fDefValue = 0) const;
- virtual void SetFloat(FX_LPCWSTR pwsAttriName, FX_FLOAT fAttriValue);
- virtual void RemoveAttribute(FX_LPCWSTR pwsAttriName);
+ virtual int32_t GetInteger(const FX_WCHAR* pwsAttriName, int32_t iDefValue = 0) const;
+ virtual void SetInteger(const FX_WCHAR* pwsAttriName, int32_t iAttriValue);
+ virtual FX_FLOAT GetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fDefValue = 0) const;
+ virtual void SetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fAttriValue);
+ virtual void RemoveAttribute(const FX_WCHAR* pwsAttriName);
virtual void GetTextData(CFX_WideString &wsText) const;
virtual void SetTextData(const CFX_WideString &wsText);
public:
@@ -276,7 +276,7 @@ public:
{
FDE_Delete this;
}
- FX_LPWSTR GetAvailableBlock(int32_t& iIndexInBlock);
+ FX_WCHAR* GetAvailableBlock(int32_t& iIndexInBlock);
inline int32_t GetAllocStep() const
{
return m_iAllocStep;
@@ -409,22 +409,22 @@ protected:
int32_t m_iLastNodeNum;
int32_t m_iParsedChars;
int32_t m_iParsedBytes;
- FX_LPWSTR m_pBuffer;
+ FX_WCHAR* m_pBuffer;
int32_t m_iBufferChars;
FX_BOOL m_bEOS;
- FX_LPWSTR m_pStart;
- FX_LPWSTR m_pEnd;
+ FX_WCHAR* m_pStart;
+ FX_WCHAR* m_pEnd;
FDE_XMLNODE m_CurNode;
CFDE_XMLNodeStack m_XMLNodeStack;
#ifdef _FDE_BLOCK_BUFFER
CFDE_BlockBuffer m_BlockBuffer;
int32_t m_iAllocStep;
int32_t& m_iDataLength;
- FX_LPWSTR m_pCurrentBlock;
+ FX_WCHAR* m_pCurrentBlock;
int32_t m_iIndexInBlock;
#else
int32_t m_iTextDataSize;
- FX_LPWSTR m_pwsTextData;
+ FX_WCHAR* m_pwsTextData;
int32_t m_iDataPos;
#endif
int32_t m_iTextDataLength;
diff --git a/xfa/src/fee/include/ifde_txtedtbuf.h b/xfa/src/fee/include/ifde_txtedtbuf.h
index 921b17a518..3aa24ffe69 100644
--- a/xfa/src/fee/include/ifde_txtedtbuf.h
+++ b/xfa/src/fee/include/ifde_txtedtbuf.h
@@ -21,7 +21,7 @@ public:
virtual FX_WCHAR GetCharByIndex(int32_t nIndex) const = 0;
virtual void GetRange(CFX_WideString &wsText, int32_t nBegin, int32_t nCount = - 1) const = 0;
- virtual void Insert(int32_t nPos, FX_LPCWSTR lpText, int32_t nLength = 1) = 0;
+ virtual void Insert(int32_t nPos, const FX_WCHAR* lpText, int32_t nLength = 1) = 0;
virtual void Delete(int32_t nIndex, int32_t nLength = 1) = 0;
virtual void Clear(FX_BOOL bRelease = TRUE) = 0;
diff --git a/xfa/src/fee/include/ifde_txtedtengine.h b/xfa/src/fee/include/ifde_txtedtengine.h
index 10f90881bd..4dcfa69cc8 100644
--- a/xfa/src/fee/include/ifde_txtedtengine.h
+++ b/xfa/src/fee/include/ifde_txtedtengine.h
@@ -16,7 +16,7 @@ class IFDE_TxtEdtParag;
#define FDE_TXTEDT_FIND_FLAGS_WholeWord (1L << 1)
#define FDE_TXTEDT_FIND_FLAGS_NoCase (1L << 2)
typedef struct _FDE_HTXTEDTFIND {
- FX_LPVOID pData;
+ void* pData;
} * FDE_HTXTEDTFIND;
#define FDE_TEXTEDITMODE_MultiLines (1L << 0)
#define FDE_TEXTEDITMODE_AutoLineWrap (1L << 1)
@@ -192,7 +192,7 @@ public:
virtual void Unlock() = 0;
virtual FX_BOOL IsLocked() const = 0;
- virtual int32_t Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLength) = 0;
+ virtual int32_t Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLength) = 0;
virtual int32_t Delete(int32_t nStart, FX_BOOL bBackspace = FALSE) = 0;
virtual int32_t DeleteRange(int32_t nStart, int32_t nCount = -1) = 0;
virtual int32_t Replace(int32_t nStart, int32_t nLength, const CFX_WideString &wsReplace) = 0;
diff --git a/xfa/src/fee/src/fee/fde_txtedtblock.cpp b/xfa/src/fee/src/fee/fde_txtedtblock.cpp
index 2d71cd3a99..7b8ecf4f1f 100644
--- a/xfa/src/fee/src/fee/fde_txtedtblock.cpp
+++ b/xfa/src/fee/src/fee/fde_txtedtblock.cpp
@@ -18,7 +18,7 @@ CFDE_TxtEdtBlock::CFDE_TxtEdtBlock(CFDE_TxtEdtEngine * pEngine, const CFX_WideSt
, m_nIndex(0)
, m_nPosition(nPosition)
{
- FX_LPCWSTR lpBuf = FX_LPCWSTR(wsBlock);
+ const FX_WCHAR* lpBuf = const FX_WCHAR*(wsBlock);
int32_t nCount = wsBlock.GetLength();
int32_t i = 0;
CFX_WideString wsFix;
@@ -166,7 +166,7 @@ CFDE_TxtEdtFieldFormatParser::~CFDE_TxtEdtFieldFormatParser()
FX_BOOL CFDE_TxtEdtFieldFormatParser::Parse(const CFX_WideString &wsFormat)
{
m_wsFormat = wsFormat;
- FX_LPCWSTR pBuf = FX_LPCWSTR(m_wsFormat);
+ const FX_WCHAR* pBuf = const FX_WCHAR*(m_wsFormat);
int32_t nCount = m_wsFormat.GetLength();
nCount -= 2;
int32_t i = 0;
@@ -206,8 +206,8 @@ int32_t CFDE_TxtEdtFieldFormatParser::CountItems() const
void CFDE_TxtEdtFieldFormatParser::GetItem(int32_t nIndex, CFX_WideString &wsKey, CFX_WideString &wsValue) const
{
FDE_LPTXTEDTFORMATITEM lpItem = m_ItemArr[nIndex];
- FX_LPCWSTR lpSrcBuf = FX_LPCWSTR(m_wsFormat);
- FX_LPWSTR lpDstBuf = wsKey.GetBuffer(lpItem->nKeyCount);
+ const FX_WCHAR* lpSrcBuf = const FX_WCHAR*(m_wsFormat);
+ FX_WCHAR* lpDstBuf = wsKey.GetBuffer(lpItem->nKeyCount);
FXSYS_memcpy(lpDstBuf, lpSrcBuf + lpItem->nKeyStart, lpItem->nKeyCount * sizeof(FX_WCHAR));
wsKey.ReleaseBuffer(lpItem->nKeyCount);
lpDstBuf = wsValue.GetBuffer(lpItem->nValCount);
@@ -300,8 +300,8 @@ int32_t CFDE_TxtEdtField::Delete(int32_t nIndex, int32_t nCount,
default:
break;
}
- FX_LPWSTR lpBuf = wsDel.GetBuffer(nCount);
- FXSYS_memcpy(lpBuf, FX_LPCWSTR(m_wsField) + nInnerIndex, nCount * sizeof(FX_WCHAR));
+ FX_WCHAR* lpBuf = wsDel.GetBuffer(nCount);
+ FXSYS_memcpy(lpBuf, const FX_WCHAR*(m_wsField) + nInnerIndex, nCount * sizeof(FX_WCHAR));
wsDel.ReleaseBuffer(nCount);
m_wsField = wsTemp;
nCaret = nIndex + (m_bReserveSpace && !m_bLeftAlignment) ? nCount : 0;
@@ -336,8 +336,8 @@ int32_t CFDE_TxtEdtField::Replace(int32_t nIndex, int32_t nCount, const CFX_Wide
default:
break;
}
- FX_LPWSTR lpBuffer = wsDel.GetBuffer(nCount);
- FX_LPCWSTR lpSrcBuf = FX_LPCWSTR(m_wsField);
+ FX_WCHAR* lpBuffer = wsDel.GetBuffer(nCount);
+ const FX_WCHAR* lpSrcBuf = const FX_WCHAR*(m_wsField);
FXSYS_memcpy(lpBuffer, lpSrcBuf + nInnerIndexBK, nCount * sizeof(FX_WCHAR));
wsDel.ReleaseBuffer(nCount);
m_wsField = wsTemp;
@@ -349,12 +349,12 @@ void CFDE_TxtEdtField::GetDisplayText(CFX_WideString &wsDisplay)
CFX_WideString wsField;
GetNormalizedFieldText(wsField);
int32_t nLength = wsField.GetLength() + FDE_FORMAT_EDIT_FIELD_HADERSIZE + FDE_FORMAT_EDIT_FIELD_TAILSIZE;
- FX_LPWSTR lpBuffer = wsDisplay.GetBuffer(nLength);
+ FX_WCHAR* lpBuffer = wsDisplay.GetBuffer(nLength);
lpBuffer[0] = FDE_TXTEDT_FORMATBLOCK_BGN;
lpBuffer[nLength - 1] = FDE_TXTEDT_FORMATBLOCK_END;
FX_DWORD nAddress = (FX_DWORD)this;
FXSYS_memcpy(lpBuffer + 1, &nAddress, sizeof(FX_DWORD));
- FXSYS_memcpy(lpBuffer + 3, FX_LPCWSTR(wsField), (nLength - 4) * sizeof(FX_WCHAR));
+ FXSYS_memcpy(lpBuffer + 3, const FX_WCHAR*(wsField), (nLength - 4) * sizeof(FX_WCHAR));
wsDisplay.ReleaseBuffer(nLength);
}
int32_t CFDE_TxtEdtField::GetDisplayLength()
@@ -548,7 +548,7 @@ int32_t CFDE_TxtEdtField_Float::Validate(const CFX_WideString & wsText) const
if (m_nLength != -1 && (nLength > m_nLength)) {
return FDE_FORMAT_FIELD_VALIDATE_F_FULL;
}
- FX_LPCWSTR lpBuf = FX_LPCWSTR(wsText);
+ const FX_WCHAR* lpBuf = const FX_WCHAR*(wsText);
int32_t i = 0;
if (m_bSigned) {
FX_WCHAR wcTemp = lpBuf[0];
@@ -613,7 +613,7 @@ void CFDE_TxtEdtField_Password::GetNormalizedFieldText(CFX_WideString &wsField)
{
int32_t nFiledLength = m_wsField.GetLength();
int32_t nLength = m_bReserveSpace ? m_nLength : nFiledLength;
- FX_LPWSTR lpBuf = wsField.GetBuffer(nLength);
+ FX_WCHAR* lpBuf = wsField.GetBuffer(nLength);
int32_t nSpaceLength = nLength - nFiledLength;
int32_t nFirstPart = m_bLeftAlignment ? nFiledLength : nSpaceLength;
FX_WCHAR wFirstChar = m_bLeftAlignment ? m_wcAlias : L' ';
@@ -655,12 +655,12 @@ CFDE_TxtEdtField_Fixed::CFDE_TxtEdtField_Fixed(const CFX_WideString &wsField, in
void CFDE_TxtEdtField_Fixed::GetDisplayText(CFX_WideString &wsDisplay)
{
int32_t nLength = m_wsField.GetLength() + FDE_FORMAT_EDIT_FIELD_HADERSIZE + FDE_FORMAT_EDIT_FIELD_TAILSIZE;
- FX_LPWSTR lpBuffer = wsDisplay.GetBuffer(nLength);
+ FX_WCHAR* lpBuffer = wsDisplay.GetBuffer(nLength);
lpBuffer[0] = FDE_TXTEDT_FORMATBLOCK_BGN;
lpBuffer[nLength - 1] = FDE_TXTEDT_FORMATBLOCK_END;
FX_DWORD nAddress = (FX_DWORD)this;
FXSYS_memcpy(lpBuffer + 1, &nAddress, sizeof(FX_DWORD));
- FXSYS_memcpy(lpBuffer + 3, FX_LPCWSTR(m_wsField), (nLength - 4) * sizeof(FX_WCHAR));
+ FXSYS_memcpy(lpBuffer + 3, const FX_WCHAR*(m_wsField), (nLength - 4) * sizeof(FX_WCHAR));
wsDisplay.ReleaseBuffer(nLength);
}
int32_t CFDE_TxtEdtField_Fixed::NormalizeCaretPos(int32_t nIndex, FDE_FORMAT_CARET_DIRECTION eDirection ) const
diff --git a/xfa/src/fee/src/fee/fde_txtedtbuf.cpp b/xfa/src/fee/src/fee/fde_txtedtbuf.cpp
index 1b2c01d3da..b1d3927c8a 100644
--- a/xfa/src/fee/src/fee/fde_txtedtbuf.cpp
+++ b/xfa/src/fee/src/fee/fde_txtedtbuf.cpp
@@ -190,7 +190,7 @@ void CFDE_TxtEdtBuf::SetText(const CFX_WideString &wsText)
m_Chunks.Add(lpChunk);
}
int32_t nTotalCount = m_Chunks.GetSize();
- FX_LPCWSTR lpSrcBuf = FX_LPCWSTR(wsText);
+ const FX_WCHAR* lpSrcBuf = wsText.c_str();
int32_t nLeave = nTextLength;
int32_t nCopyedLength = m_nChunkSize;
for (i = 0; i < nTotalCount && nLeave > 0; i ++) {
@@ -233,11 +233,11 @@ void CFDE_TxtEdtBuf::GetRange(CFX_WideString &wsText, int32_t nBegin, int32_t nL
Index2CP(nBegin, cp);
int32_t nLeave = nLength;
int32_t nCount = m_Chunks.GetSize();
- FX_LPWSTR lpDstBuf = wsText.GetBuffer(nLength);
+ FX_WCHAR* lpDstBuf = wsText.GetBuffer(nLength);
int32_t nChunkIndex = cp.nChunkIndex;
FDE_LPCHUNKHEADER lpChunkHeader = (FDE_LPCHUNKHEADER)m_Chunks[nChunkIndex];
int32_t nCopyLength = lpChunkHeader->nUsed - cp.nCharIndex;
- FX_LPWSTR lpSrcBuf = lpChunkHeader->wChars + cp.nCharIndex;
+ FX_WCHAR* lpSrcBuf = lpChunkHeader->wChars + cp.nCharIndex;
while (nLeave > 0) {
if (nLeave <= nCopyLength) {
nCopyLength = nLeave;
@@ -255,7 +255,7 @@ void CFDE_TxtEdtBuf::GetRange(CFX_WideString &wsText, int32_t nBegin, int32_t nL
}
wsText.ReleaseBuffer();
}
-void CFDE_TxtEdtBuf::Insert(int32_t nPos, FX_LPCWSTR lpText, int32_t nLength )
+void CFDE_TxtEdtBuf::Insert(int32_t nPos, const FX_WCHAR* lpText, int32_t nLength )
{
FXSYS_assert(nPos >= 0 && nPos <= m_nTotal);
FDE_CHUNKPLACE cp;
diff --git a/xfa/src/fee/src/fee/fde_txtedtbuf.h b/xfa/src/fee/src/fee/fde_txtedtbuf.h
index 9e54a0d2f3..67e3cae942 100644
--- a/xfa/src/fee/src/fee/fde_txtedtbuf.h
+++ b/xfa/src/fee/src/fee/fde_txtedtbuf.h
@@ -67,7 +67,7 @@ public:
virtual FX_WCHAR GetCharByIndex(int32_t nIndex) const;
virtual void GetRange(CFX_WideString &wsText, int32_t nBegine, int32_t nCount = -1) const;
- virtual void Insert(int32_t nPos, FX_LPCWSTR lpText, int32_t nLength = 1);
+ virtual void Insert(int32_t nPos, const FX_WCHAR* lpText, int32_t nLength = 1);
virtual void Delete(int32_t nIndex, int32_t nLength = 1);
virtual void Clear(FX_BOOL bRelease = TRUE);
diff --git a/xfa/src/fee/src/fee/fde_txtedtengine.cpp b/xfa/src/fee/src/fee/fde_txtedtengine.cpp
index 78486835ac..9546a2b270 100644
--- a/xfa/src/fee/src/fee/fde_txtedtengine.cpp
+++ b/xfa/src/fee/src/fee/fde_txtedtengine.cpp
@@ -135,7 +135,7 @@ void CFDE_TxtEdtEngine::SetTextByStream(IFX_Stream *pStream)
pStream->Seek(FX_STREAMSEEK_Begin, nPos);
int32_t bEos = FALSE;
int32_t nPlateSize = FX_MIN(nStreamLength, m_pTxtBuf->GetChunkSize());
- FX_LPWSTR lpwstr = (FX_LPWSTR)FDE_Alloc(nPlateSize * sizeof(FX_WCHAR));
+ FX_WCHAR* lpwstr = (FX_WCHAR*)FDE_Alloc(nPlateSize * sizeof(FX_WCHAR));
FXSYS_assert(lpwstr);
int32_t nRead = 0;
while (!bEos) {
@@ -156,8 +156,8 @@ void CFDE_TxtEdtEngine::SetText(const CFX_WideString &wsText)
int32_t nLength = wsText.GetLength();
if (nLength > 0) {
CFX_WideString wsTemp;
- FX_LPWSTR lpBuffer = wsTemp.GetBuffer(nLength);
- FXSYS_memcpy(lpBuffer, FX_LPCWSTR(wsText), nLength * sizeof(FX_WCHAR));
+ FX_WCHAR* lpBuffer = wsTemp.GetBuffer(nLength);
+ FXSYS_memcpy(lpBuffer, wsText.c_str(), nLength * sizeof(FX_WCHAR));
ReplaceParagEnd(lpBuffer, nLength, FALSE);
wsTemp.ReleaseBuffer(nLength);
if (m_nLimit > 0 && nLength > m_nLimit) {
@@ -186,8 +186,8 @@ void CFDE_TxtEdtEngine::GetText(CFX_WideString &wsText, int32_t nStart, int32_t
return;
}
CFX_WideString wsTemp;
- FX_LPCWSTR lpFixBuffer = FX_LPCWSTR(m_wsFixText);
- FX_LPWSTR lpBuffer = wsTemp.GetBuffer(nTextBufLength);
+ const FX_WCHAR* lpFixBuffer = const FX_WCHAR*(m_wsFixText);
+ FX_WCHAR* lpBuffer = wsTemp.GetBuffer(nTextBufLength);
int32_t nRealLength = 0;
int32_t nPrePos = 0;
for (int32_t i = 0; i < nBlockCount; i ++) {
@@ -200,7 +200,7 @@ void CFDE_TxtEdtEngine::GetText(CFX_WideString &wsText, int32_t nStart, int32_t
CFX_WideString wsBlock;
pBlock->GetRealText(wsBlock);
nCopyLength = wsBlock.GetLength();
- FXSYS_memcpy(lpBuffer + nRealLength, FX_LPCWSTR(wsBlock), nCopyLength * sizeof(FX_WCHAR));
+ FXSYS_memcpy(lpBuffer + nRealLength, const FX_WCHAR*(wsBlock), nCopyLength * sizeof(FX_WCHAR));
nRealLength += nCopyLength;
}
int32_t nLeftLength = m_wsFixText.GetLength() - nPrePos;
@@ -212,8 +212,8 @@ void CFDE_TxtEdtEngine::GetText(CFX_WideString &wsText, int32_t nStart, int32_t
int32_t nRealBgn = GetRealIndex(nStart);
int32_t nRealEnd = GetRealIndex(nStart + nCount - 1);
int32_t nRealCount = nRealEnd - nRealBgn;
- FX_LPWSTR lpDestBuf = wsText.GetBuffer(nRealCount);
- FXSYS_memcpy(lpDestBuf, FX_LPCWSTR(wsTemp) + nRealBgn, nRealCount * sizeof(FX_WCHAR));
+ FX_WCHAR* lpDestBuf = wsText.GetBuffer(nRealCount);
+ FXSYS_memcpy(lpDestBuf, const FX_WCHAR*(wsTemp) + nRealBgn, nRealCount * sizeof(FX_WCHAR));
wsText.ReleaseBuffer();
#else
m_pTxtBuf->GetRange(wsText, nStart, nCount);
@@ -427,7 +427,7 @@ FX_BOOL CFDE_TxtEdtEngine::IsLocked() const
{
return m_bLock;
}
-int32_t CFDE_TxtEdtEngine::Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLength)
+int32_t CFDE_TxtEdtEngine::Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLength)
{
if (IsLocked()) {
return FDE_TXTEDT_MODIFY_RET_F_Locked;
@@ -482,7 +482,7 @@ int32_t CFDE_TxtEdtEngine::Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLe
pField->GetDisplayText(wsDisplay);
if ((m_Param.dwMode & FDE_TEXTEDITMODE_LimitArea_Vert) || (m_Param.dwMode & FDE_TEXTEDITMODE_LimitArea_Horz)) {
CFX_WideString wsText;
- GetPreReplaceText(wsText, nBgn, nEnd - nBgn + 1, FX_LPCWSTR(wsDisplay), wsDisplay.GetLength());
+ GetPreReplaceText(wsText, nBgn, nEnd - nBgn + 1, const FX_WCHAR*(wsDisplay), wsDisplay.GetLength());
if (!IsFitArea(wsText)) {
pField->Restore();
return FDE_TXTEDT_MODIFY_RET_F_Full;
@@ -537,7 +537,7 @@ int32_t CFDE_TxtEdtEngine::Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLe
pField->GetDisplayText(wsDisplay);
if ((m_Param.dwMode & FDE_TEXTEDITMODE_LimitArea_Vert) || (m_Param.dwMode & FDE_TEXTEDITMODE_LimitArea_Horz)) {
CFX_WideString wsText;
- GetPreReplaceText(wsText, nBgn, nEnd - nBgn + 1, FX_LPCWSTR(wsDisplay), wsDisplay.GetLength());
+ GetPreReplaceText(wsText, nBgn, nEnd - nBgn + 1, const FX_WCHAR*(wsDisplay), wsDisplay.GetLength());
if (!IsFitArea(wsText)) {
pField->Restore();
return FDE_TXTEDT_MODIFY_RET_F_Full;
@@ -568,7 +568,7 @@ int32_t CFDE_TxtEdtEngine::Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLe
}
#endif
CFX_WideString wsTemp;
- FX_LPWSTR lpBuffer = wsTemp.GetBuffer(nLength);
+ FX_WCHAR* lpBuffer = wsTemp.GetBuffer(nLength);
FXSYS_memcpy(lpBuffer, lpText, nLength * sizeof(FX_WCHAR));
ReplaceParagEnd(lpBuffer, nLength, FALSE);
wsTemp.ReleaseBuffer(nLength);
@@ -597,7 +597,7 @@ int32_t CFDE_TxtEdtEngine::Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLe
while (nLength > 0) {
GetPreInsertText(wsText, m_nCaret, lpBuffer, nLength);
int32_t nTotal = wsText.GetLength();
- FX_LPWSTR lpBuf = wsText.GetBuffer(nTotal);
+ FX_WCHAR* lpBuf = wsText.GetBuffer(nTotal);
for (int32_t i = 0; i < nTotal; i ++) {
lpBuf[i] = m_wcAliasChar;
}
@@ -795,7 +795,7 @@ int32_t CFDE_TxtEdtEngine::Replace(int32_t nStart, int32_t nLength, const CFX_Wi
}
if (m_Param.dwMode & FDE_TEXTEDITMODE_Validate) {
CFX_WideString wsText;
- GetPreReplaceText(wsText, nStart, nLength, FX_LPCWSTR(wsReplace), wsReplace.GetLength());
+ GetPreReplaceText(wsText, nStart, nLength, wsReplace.c_str(), wsReplace.GetLength());
if (!m_Param.pEventSink->On_Validate(this, wsText)) {
return FDE_TXTEDT_MODIFY_RET_F_Invalidate;
}
@@ -810,9 +810,9 @@ int32_t CFDE_TxtEdtEngine::Replace(int32_t nStart, int32_t nLength, const CFX_Wi
}
int32_t nTextLength = wsReplace.GetLength();
if (nTextLength > 0) {
- Inner_Insert(nStart, FX_LPCWSTR(wsReplace), nTextLength);
+ Inner_Insert(nStart, wsReplace.c_str(), nTextLength);
}
- m_ChangeInfo.wsInsert = CFX_WideString(FX_LPCWSTR(wsReplace), nTextLength);
+ m_ChangeInfo.wsInsert = CFX_WideString(wsReplace.c_str(), nTextLength);
nStart += nTextLength;
FX_WCHAR wChar = m_pTxtBuf->GetCharByIndex(nStart - 1);
FX_BOOL bBefore = TRUE;
@@ -877,7 +877,7 @@ void CFDE_TxtEdtEngine::SetFormatBlock(int32_t nIndex, const CFX_WideString &wsB
pEditBlock->GetDisplayText(wsDisplay);
m_nCaret = nBlockPos;
if (wsDisplay.GetLength() > 0) {
- RawInsert(nBlockPos, FX_LPCWSTR(wsDisplay), wsDisplay.GetLength());
+ RawInsert(nBlockPos, const FX_WCHAR*(wsDisplay), wsDisplay.GetLength());
}
#endif
}
@@ -1167,7 +1167,7 @@ void CFDE_TxtEdtEngine::GetPreDeleteText(CFX_WideString &wsText, int32_t nIndex,
GetText(wsText, 0, GetTextBufLength());
wsText.Delete(nIndex, nLength);
}
-void CFDE_TxtEdtEngine::GetPreInsertText(CFX_WideString &wsText, int32_t nIndex, FX_LPCWSTR lpText, int32_t nLength)
+void CFDE_TxtEdtEngine::GetPreInsertText(CFX_WideString &wsText, int32_t nIndex, const FX_WCHAR* lpText, int32_t nLength)
{
GetText(wsText, 0, GetTextBufLength());
int32_t nSelIndex = 0;
@@ -1180,15 +1180,15 @@ void CFDE_TxtEdtEngine::GetPreInsertText(CFX_WideString &wsText, int32_t nIndex,
}
CFX_WideString wsTemp;
int32_t nOldLength = wsText.GetLength();
- FX_LPCWSTR pOldBuffer = FX_LPCWSTR(wsText);
- FX_LPWSTR lpBuffer = wsTemp.GetBuffer(nOldLength + nLength);
+ const FX_WCHAR* pOldBuffer = wsText.c_str();
+ FX_WCHAR* lpBuffer = wsTemp.GetBuffer(nOldLength + nLength);
FXSYS_memcpy(lpBuffer, pOldBuffer, (nIndex) * sizeof(FX_WCHAR));
FXSYS_memcpy(lpBuffer + nIndex, lpText, nLength * sizeof(FX_WCHAR));
FXSYS_memcpy(lpBuffer + nIndex + nLength, pOldBuffer + nIndex, (nOldLength - nIndex) * sizeof(FX_WCHAR));
wsTemp.ReleaseBuffer(nOldLength + nLength);
wsText = wsTemp;
}
-void CFDE_TxtEdtEngine::GetPreReplaceText(CFX_WideString &wsText, int32_t nIndex, int32_t nOriginLength, FX_LPCWSTR lpText, int32_t nLength)
+void CFDE_TxtEdtEngine::GetPreReplaceText(CFX_WideString &wsText, int32_t nIndex, int32_t nOriginLength, const FX_WCHAR* lpText, int32_t nLength)
{
GetText(wsText, 0, GetTextBufLength());
int32_t nSelIndex = 0;
@@ -1204,7 +1204,7 @@ void CFDE_TxtEdtEngine::GetPreReplaceText(CFX_WideString &wsText, int32_t nIndex
wsText.Insert(nIndex ++, lpText[i]);
}
}
-void CFDE_TxtEdtEngine::Inner_Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLength)
+void CFDE_TxtEdtEngine::Inner_Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLength)
{
FXSYS_assert(nLength > 0);
FDE_TXTEDTPARAGPOS ParagPos;
@@ -1222,7 +1222,7 @@ void CFDE_TxtEdtEngine::Inner_Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t
int32_t nCutPart = pParag->m_nCharCount - ParagPos.nCharIndex;
int32_t nTextStart = 0;
FX_WCHAR wCurChar = L' ';
- FX_LPCWSTR lpPos = lpText;
+ const FX_WCHAR* lpPos = lpText;
FX_BOOL bFirst = TRUE;
int32_t nParagIndex = ParagPos.nParagIndex;
for (i = 0; i < nLength; i ++, lpPos ++) {
@@ -1267,7 +1267,7 @@ void CFDE_TxtEdtEngine::Inner_Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t
UpdatePages();
}
#ifdef FDE_USEFORMATBLOCK
-void CFDE_TxtEdtEngine::RawInsert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLength)
+void CFDE_TxtEdtEngine::RawInsert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLength)
{
FXSYS_assert(nLength > 0);
FDE_TXTEDTPARAGPOS ParagPos;
@@ -1284,7 +1284,7 @@ void CFDE_TxtEdtEngine::RawInsert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLe
int32_t nCutPart = pParag->m_nCharCount - ParagPos.nCharIndex;
int32_t nTextStart = 0;
FX_WCHAR wCurChar = L' ';
- FX_LPCWSTR lpPos = lpText;
+ const FX_WCHAR* lpPos = lpText;
FX_BOOL bFirst = TRUE;
int32_t nParagIndex = ParagPos.nParagIndex;
for (i = 0; i < nLength; i ++, lpPos ++) {
@@ -1605,7 +1605,7 @@ void CFDE_TxtEdtEngine::UpdateTxtBreak()
m_pTextBreak->SetHorizontalScale(m_Param.nHorzScale);
m_pTextBreak->SetCharSpace(m_Param.fCharSpace);
}
-FX_BOOL CFDE_TxtEdtEngine::ReplaceParagEnd(FX_LPWSTR &lpText, int32_t &nLength, FX_BOOL bPreIsCR )
+FX_BOOL CFDE_TxtEdtEngine::ReplaceParagEnd(FX_WCHAR* &lpText, int32_t &nLength, FX_BOOL bPreIsCR )
{
for (int32_t i = 0; i < nLength; i ++) {
FX_WCHAR wc = lpText[i];
@@ -1656,17 +1656,17 @@ void CFDE_TxtEdtEngine::RecoverParagEnd(CFX_WideString &wsText)
CFX_ArrayTemplate<int32_t> PosArr;
int32_t nLength = wsText.GetLength();
int32_t i = 0;
- FX_LPWSTR lpPos = (FX_LPWSTR)(FX_LPCWSTR)wsText;
+ FX_WCHAR* lpPos = (FX_WCHAR*)(const FX_WCHAR*)wsText;
for (i = 0; i < nLength; i ++, lpPos ++) {
if (*lpPos == m_wLineEnd) {
*lpPos = wc;
PosArr.Add(i);
}
}
- FX_LPCWSTR lpSrcBuf = FX_LPCWSTR(wsText);
+ const FX_WCHAR* lpSrcBuf = wsText.c_str();
CFX_WideString wsTemp;
int32_t nCount = PosArr.GetSize();
- FX_LPWSTR lpDstBuf = wsTemp.GetBuffer(nLength + nCount);
+ FX_WCHAR* lpDstBuf = wsTemp.GetBuffer(nLength + nCount);
int32_t nDstPos = 0;
int32_t nSrcPos = 0;
for (i = 0; i < nCount; i ++) {
@@ -1685,7 +1685,7 @@ void CFDE_TxtEdtEngine::RecoverParagEnd(CFX_WideString &wsText)
wsText = wsTemp;
} else {
int32_t nLength = wsText.GetLength();
- FX_LPWSTR lpBuf = (FX_LPWSTR)(FX_LPCWSTR)wsText;
+ FX_WCHAR* lpBuf = (FX_WCHAR*)(const FX_WCHAR*)wsText;
for (int32_t i = 0; i < nLength; i ++, lpBuf++) {
if (*lpBuf == m_wLineEnd) {
*lpBuf = wc;
@@ -2398,7 +2398,7 @@ void CFDE_TxtEdtEngine::DeleteSelect()
}
IFDE_TxtEdtDoRecord * IFDE_TxtEdtDoRecord::Create(FX_BSTR bsDoRecord)
{
- FX_LPCSTR lpBuf = bsDoRecord.GetCStr();
+ const FX_CHAR* lpBuf = bsDoRecord.GetCStr();
int32_t nType = *((int32_t*)lpBuf);
switch(nType) {
case FDE_TXTEDT_DORECORD_INS:
@@ -2424,13 +2424,13 @@ CFDE_TxtEdtDoRecord_Insert::CFDE_TxtEdtDoRecord_Insert(FX_BSTR bsDoRecord)
}
CFDE_TxtEdtDoRecord_Insert::CFDE_TxtEdtDoRecord_Insert(CFDE_TxtEdtEngine * pEngine,
int32_t nCaret,
- FX_LPCWSTR lpText,
+ const FX_WCHAR* lpText,
int32_t nLength)
: m_pEngine(pEngine)
, m_nCaret(nCaret)
{
FXSYS_assert(pEngine);
- FX_LPWSTR lpBuffer = m_wsInsert.GetBuffer(nLength);
+ FX_WCHAR* lpBuffer = m_wsInsert.GetBuffer(nLength);
FXSYS_memcpy(lpBuffer, lpText, nLength * sizeof(FX_WCHAR));
m_wsInsert.ReleaseBuffer();
}
@@ -2456,7 +2456,7 @@ FX_BOOL CFDE_TxtEdtDoRecord_Insert::Undo()
}
FX_BOOL CFDE_TxtEdtDoRecord_Insert::Redo()
{
- m_pEngine->Inner_Insert(m_nCaret, FX_LPCWSTR(m_wsInsert), m_wsInsert.GetLength());
+ m_pEngine->Inner_Insert(m_nCaret, m_wsInsert.c_str(), m_wsInsert.GetLength());
FDE_TXTEDTPARAMS& Param = m_pEngine->m_Param;
m_pEngine->m_ChangeInfo.nChangeType = FDE_TXTEDT_TEXTCHANGE_TYPE_Insert;
m_pEngine->m_ChangeInfo.wsDelete = m_wsInsert;
@@ -2472,14 +2472,14 @@ void CFDE_TxtEdtDoRecord_Insert::Serialize(CFX_ByteString &bsDoRecord) const
ArchiveSaver << m_nCaret;
ArchiveSaver << m_wsInsert;
int32_t nLength = ArchiveSaver.GetLength();
- FX_LPCBYTE lpSrcBuf = ArchiveSaver.GetBuffer();
- FX_LPSTR lpDstBuf = bsDoRecord.GetBuffer(nLength);
+ const uint8_t* lpSrcBuf = ArchiveSaver.GetBuffer();
+ FX_CHAR* lpDstBuf = bsDoRecord.GetBuffer(nLength);
FXSYS_memcpy(lpDstBuf, lpSrcBuf, nLength);
bsDoRecord.ReleaseBuffer(nLength);
}
void CFDE_TxtEdtDoRecord_Insert::Deserialize(FX_BSTR bsDoRecord)
{
- CFX_ArchiveLoader ArchiveLoader((FX_LPCBYTE)bsDoRecord.GetCStr(), bsDoRecord.GetLength());
+ CFX_ArchiveLoader ArchiveLoader((const uint8_t*)bsDoRecord.GetCStr(), bsDoRecord.GetLength());
int32_t nType = 0;
ArchiveLoader >> nType;
FXSYS_assert(nType == FDE_TXTEDT_DORECORD_INS);
@@ -2518,7 +2518,7 @@ FX_BOOL CFDE_TxtEdtDoRecord_DeleteRange::Undo()
if (m_pEngine->IsSelect()) {
m_pEngine->ClearSelection();
}
- m_pEngine->Inner_Insert(m_nIndex, FX_LPCWSTR(m_wsRange), m_wsRange.GetLength());
+ m_pEngine->Inner_Insert(m_nIndex, m_wsRange.c_str(), m_wsRange.GetLength());
if (m_bSel) {
m_pEngine->AddSelRange(m_nIndex, m_wsRange.GetLength());
}
@@ -2552,14 +2552,14 @@ void CFDE_TxtEdtDoRecord_DeleteRange::Serialize(CFX_ByteString &bsDoRecord) cons
ArchiveSaver << m_nCaret;
ArchiveSaver << m_wsRange;
int32_t nLength = ArchiveSaver.GetLength();
- FX_LPCBYTE lpSrcBuf = ArchiveSaver.GetBuffer();
- FX_LPSTR lpDstBuf = bsDoRecord.GetBuffer(nLength);
+ const uint8_t* lpSrcBuf = ArchiveSaver.GetBuffer();
+ FX_CHAR* lpDstBuf = bsDoRecord.GetBuffer(nLength);
FXSYS_memcpy(lpDstBuf, lpSrcBuf, nLength);
bsDoRecord.ReleaseBuffer(nLength);
}
void CFDE_TxtEdtDoRecord_DeleteRange::Deserialize(FX_BSTR bsDoRecord)
{
- CFX_ArchiveLoader ArchiveLoader((FX_LPCBYTE)bsDoRecord.GetCStr(), bsDoRecord.GetLength());
+ CFX_ArchiveLoader ArchiveLoader((const uint8_t*)bsDoRecord.GetCStr(), bsDoRecord.GetLength());
int32_t nType = 0;
ArchiveLoader >> nType;
FXSYS_assert(nType == FDE_TXTEDT_DORECORD_DEL);
@@ -2644,14 +2644,14 @@ void CFDE_TxtEdtDoRecord_FieldInsert::Serialize(CFX_ByteString &bsDoRecord) cons
ArchiveSaver << m_wsIns;
ArchiveSaver << m_bSel;
int32_t nLength = ArchiveSaver.GetLength();
- FX_LPCBYTE lpSrcBuf = ArchiveSaver.GetBuffer();
- FX_LPSTR lpDstBuf = bsDoRecord.GetBuffer(nLength);
+ const uint8_t* lpSrcBuf = ArchiveSaver.GetBuffer();
+ FX_CHAR* lpDstBuf = bsDoRecord.GetBuffer(nLength);
FXSYS_memcpy(lpDstBuf, lpSrcBuf, nLength);
bsDoRecord.ReleaseBuffer(nLength);
}
void CFDE_TxtEdtDoRecord_FieldInsert::Deserialize(FX_BSTR bsDoRecord)
{
- CFX_ArchiveLoader ArchiveLoader((FX_LPCBYTE)bsDoRecord.GetCStr(), bsDoRecord.GetLength());
+ CFX_ArchiveLoader ArchiveLoader((const uint8_t*)bsDoRecord.GetCStr(), bsDoRecord.GetLength());
int32_t nType = 0;
ArchiveLoader >> nType;
FXSYS_assert(nType == FDE_TXTEDT_DORECORD_FORMATINS);
@@ -2741,14 +2741,14 @@ void CFDE_TxtEdtDoRecord_FieldDelete::Serialize(CFX_ByteString &bsDoRecord) cons
ArchiveSaver << m_wsDel;
ArchiveSaver << m_bSel;
int32_t nLength = ArchiveSaver.GetLength();
- FX_LPCBYTE lpSrcBuf = ArchiveSaver.GetBuffer();
- FX_LPSTR lpDstBuf = bsDoRecord.GetBuffer(nLength);
+ const uint8_t* lpSrcBuf = ArchiveSaver.GetBuffer();
+ FX_CHAR* lpDstBuf = bsDoRecord.GetBuffer(nLength);
FXSYS_memcpy(lpDstBuf, lpSrcBuf, nLength);
bsDoRecord.ReleaseBuffer(nLength);
}
void CFDE_TxtEdtDoRecord_FieldDelete::Deserialize(FX_BSTR bsDoRecord)
{
- CFX_ArchiveLoader ArchiveLoader((FX_LPCBYTE)bsDoRecord.GetCStr(), bsDoRecord.GetLength());
+ CFX_ArchiveLoader ArchiveLoader((const uint8_t*)bsDoRecord.GetCStr(), bsDoRecord.GetLength());
int32_t nType = 0;
ArchiveLoader >> nType;
FXSYS_assert(nType == FDE_TXTEDT_DORECORD_FORMATDEL);
@@ -2842,14 +2842,14 @@ void CFDE_TxtEdtDoRecord_FieldReplace::Serialize(CFX_ByteString &bsDoRecord) con
ArchiveSaver << m_wsIns;
ArchiveSaver << m_bSel;
int32_t nLength = ArchiveSaver.GetLength();
- FX_LPCBYTE lpSrcBuf = ArchiveSaver.GetBuffer();
- FX_LPSTR lpDstBuf = bsDoRecord.GetBuffer(nLength);
+ const uint8_t* lpSrcBuf = ArchiveSaver.GetBuffer();
+ FX_CHAR* lpDstBuf = bsDoRecord.GetBuffer(nLength);
FXSYS_memcpy(lpDstBuf, lpSrcBuf, nLength);
bsDoRecord.ReleaseBuffer(nLength);
}
void CFDE_TxtEdtDoRecord_FieldReplace::Deserialize(FX_BSTR bsDoRecord)
{
- CFX_ArchiveLoader ArchiveLoader((FX_LPCBYTE)bsDoRecord.GetCStr(), bsDoRecord.GetLength());
+ CFX_ArchiveLoader ArchiveLoader((const uint8_t*)bsDoRecord.GetCStr(), bsDoRecord.GetLength());
int32_t nType = 0;
ArchiveLoader >> nType;
FXSYS_assert(nType == FDE_TXTEDT_DORECORD_FORMATREP);
diff --git a/xfa/src/fee/src/fee/fde_txtedtengine.h b/xfa/src/fee/src/fee/fde_txtedtengine.h
index 43a98fa7db..9b555131f6 100644
--- a/xfa/src/fee/src/fee/fde_txtedtengine.h
+++ b/xfa/src/fee/src/fee/fde_txtedtengine.h
@@ -83,7 +83,7 @@ public:
virtual void Unlock();
virtual FX_BOOL IsLocked() const;
- virtual int32_t Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLength);
+ virtual int32_t Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLength);
virtual int32_t Delete(int32_t nStart, FX_BOOL bBackspace = FALSE);
virtual int32_t DeleteRange(int32_t nStart, int32_t nCount = -1);
virtual int32_t Replace(int32_t nStart, int32_t nLength, const CFX_WideString &wsReplace);
@@ -132,13 +132,13 @@ public:
protected:
virtual ~CFDE_TxtEdtEngine();
private:
- void Inner_Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLength);
+ void Inner_Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLength);
#ifdef FDE_USEFORMATBLOCK
- void RawInsert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLength);
+ void RawInsert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLength);
#endif
void GetPreDeleteText(CFX_WideString &wsText, int32_t nIndex, int32_t nLength);
- void GetPreInsertText(CFX_WideString &wsText, int32_t nIndex, FX_LPCWSTR lpText, int32_t nLength);
- void GetPreReplaceText(CFX_WideString &wsText, int32_t nIndex, int32_t nOriginLength, FX_LPCWSTR lpText, int32_t nLength);
+ void GetPreInsertText(CFX_WideString &wsText, int32_t nIndex, const FX_WCHAR* lpText, int32_t nLength);
+ void GetPreReplaceText(CFX_WideString &wsText, int32_t nIndex, int32_t nOriginLength, const FX_WCHAR* lpText, int32_t nLength);
void Inner_DeleteRange(int32_t nStart, int32_t nCount = -1);
void DeleteRange_DoRecord(int32_t nStart, int32_t nCount, FX_BOOL bSel = FALSE);
@@ -150,7 +150,7 @@ private:
void UpdatePages();
void UpdateTxtBreak();
- FX_BOOL ReplaceParagEnd(FX_LPWSTR &lpText, int32_t &nLength, FX_BOOL bPreIsCR = FALSE);
+ FX_BOOL ReplaceParagEnd(FX_WCHAR* &lpText, int32_t &nLength, FX_BOOL bPreIsCR = FALSE);
void RecoverParagEnd(CFX_WideString &wsText);
int32_t MovePage2Char(int32_t nIndex);
void TextPos2ParagPos(int32_t nIndex, FDE_TXTEDTPARAGPOS &ParagPos) const;
@@ -203,7 +203,7 @@ public:
CFDE_TxtEdtDoRecord_Insert(FX_BSTR bsDoRecord);
CFDE_TxtEdtDoRecord_Insert( CFDE_TxtEdtEngine * pEngine,
int32_t nCaret,
- FX_LPCWSTR lpText,
+ const FX_WCHAR* lpText,
int32_t nLength);
virtual void Release();
virtual FX_BOOL Undo();
diff --git a/xfa/src/fee/src/fee/fde_txtedtpage.cpp b/xfa/src/fee/src/fee/fde_txtedtpage.cpp
index 30b4d1bf3e..894245d615 100644
--- a/xfa/src/fee/src/fee/fde_txtedtpage.cpp
+++ b/xfa/src/fee/src/fee/fde_txtedtpage.cpp
@@ -49,9 +49,9 @@ FX_BOOL CFDE_TxtEdtTextSet::GetClip(FDE_HVISUALOBJ hVisualObj, CFX_RectF &rt)
int32_t CFDE_TxtEdtTextSet::GetString(FDE_HVISUALOBJ hText, CFX_WideString &wsText)
{
FDE_LPTEXTEDITPIECE pPiece = (FDE_LPTEXTEDITPIECE)hText;
- FX_LPWSTR pBuffer = wsText.GetBuffer(pPiece->nCount);
+ FX_WCHAR* pBuffer = wsText.GetBuffer(pPiece->nCount);
for (int32_t i = 0; i < pPiece->nCount; i++) {
- pBuffer[i] = m_pPage->GetChar((FX_LPVOID)hText, i);
+ pBuffer[i] = m_pPage->GetChar((void*)hText, i);
}
wsText.ReleaseBuffer(pPiece->nCount);
return pPiece->nCount;
@@ -84,7 +84,7 @@ int32_t CFDE_TxtEdtTextSet::GetDisplayPos(FDE_HVISUALOBJ hText, FXTEXT_CHARPOS *
FX_DWORD dwLayoutStyle = pBreak->GetLayoutStyles();
FX_TXTRUN tr;
tr.pAccess = m_pPage;
- tr.pIdentity = (FX_LPVOID)hText;
+ tr.pIdentity = (void*)hText;
tr.pStr = NULL;
tr.pWidths = NULL;
tr.iLength = nLength;
@@ -116,7 +116,7 @@ int32_t CFDE_TxtEdtTextSet::GetCharRects_Impl(FDE_HVISUALOBJ hText, CFX_RectFArr
FX_DWORD dwLayoutStyle = pEngine->GetTextBreak()->GetLayoutStyles();
FX_TXTRUN tr;
tr.pAccess = m_pPage;
- tr.pIdentity = (FX_LPVOID)hText;
+ tr.pIdentity = (void*)hText;
tr.pStr = NULL;
tr.pWidths = NULL;
tr.iLength = nLength;
@@ -614,7 +614,7 @@ FDE_HVISUALOBJ CFDE_TxtEdtPage::GetParentCanvas(FDE_HVISUALOBJ hCanvas, IFDE_Vis
{
return NULL;
}
-FX_WCHAR CFDE_TxtEdtPage::GetChar(FX_LPVOID pIdentity, int32_t index) const
+FX_WCHAR CFDE_TxtEdtPage::GetChar(void* pIdentity, int32_t index) const
{
int32_t nIndex = m_nPageStart + ((FDE_LPTEXTEDITPIECE)pIdentity)->nStart + index;
if (nIndex != m_pIter->GetAt()) {
@@ -624,7 +624,7 @@ FX_WCHAR CFDE_TxtEdtPage::GetChar(FX_LPVOID pIdentity, int32_t index) const
m_pIter->Next();
return wChar;
}
-int32_t CFDE_TxtEdtPage::GetWidth(FX_LPVOID pIdentity, int32_t index) const
+int32_t CFDE_TxtEdtPage::GetWidth(void* pIdentity, int32_t index) const
{
int32_t nWidth = m_pCharWidth[((FDE_LPTEXTEDITPIECE)pIdentity)->nStart + index];
return nWidth;
diff --git a/xfa/src/fee/src/fee/fde_txtedtpage.h b/xfa/src/fee/src/fee/fde_txtedtpage.h
index b2854d4afb..1f5cae2153 100644
--- a/xfa/src/fee/src/fee/fde_txtedtpage.h
+++ b/xfa/src/fee/src/fee/fde_txtedtpage.h
@@ -102,8 +102,8 @@ public:
virtual FX_POSITION GetFirstPosition(FDE_HVISUALOBJ hCanvas);
virtual FDE_HVISUALOBJ GetNext(FDE_HVISUALOBJ hCanvas, FX_POSITION &pos, IFDE_VisualSet *&pVisualSet);
virtual FDE_HVISUALOBJ GetParentCanvas(FDE_HVISUALOBJ hCanvas, IFDE_VisualSet *&pVisualSet);
- virtual FX_WCHAR GetChar(FX_LPVOID pIdentity, int32_t index) const;
- virtual int32_t GetWidth(FX_LPVOID pIdentity, int32_t index) const;
+ virtual FX_WCHAR GetChar(void* pIdentity, int32_t index) const;
+ virtual int32_t GetWidth(void* pIdentity, int32_t index) const;
protected:
virtual ~CFDE_TxtEdtPage();
private:
diff --git a/xfa/src/fee/src/fee/fde_txtedtparag.h b/xfa/src/fee/src/fee/fde_txtedtparag.h
index aca5d8febc..934dd5405d 100644
--- a/xfa/src/fee/src/fee/fde_txtedtparag.h
+++ b/xfa/src/fee/src/fee/fde_txtedtparag.h
@@ -33,7 +33,7 @@ public:
int32_t m_nCharCount;
int32_t m_nLineCount;
private:
- FX_LPVOID m_lpData;
+ void* m_lpData;
CFDE_TxtEdtEngine* m_pEngine;
};
#endif
diff --git a/xfa/src/fee/src/fx_wordbreak/fx_wordbreak_impl.cpp b/xfa/src/fee/src/fx_wordbreak/fx_wordbreak_impl.cpp
index ff8dafcf0f..1fad023bbf 100644
--- a/xfa/src/fee/src/fx_wordbreak/fx_wordbreak_impl.cpp
+++ b/xfa/src/fee/src/fx_wordbreak/fx_wordbreak_impl.cpp
@@ -144,7 +144,7 @@ void CFX_WordBreak::GetWord(CFX_WideString &wsWord) const
if (nWordLength <= 0) {
return;
}
- FX_LPWSTR lpBuf = wsWord.GetBuffer(nWordLength);
+ FX_WCHAR* lpBuf = wsWord.GetBuffer(nWordLength);
IFX_CharIter * pTempIter = m_pPreIter->Clone();
int32_t i = 0;
while (pTempIter->GetAt() <= m_pCurIter->GetAt()) {
diff --git a/xfa/src/fgas/include/fx_alg.h b/xfa/src/fgas/include/fx_alg.h
index 0ee8508083..65403ec7da 100644
--- a/xfa/src/fgas/include/fx_alg.h
+++ b/xfa/src/fgas/include/fx_alg.h
@@ -10,11 +10,11 @@
#ifdef __cplusplus
extern "C" {
#endif
-int32_t FX_Base64EncodeA(FX_LPCBYTE pSrc, int32_t iSrcLen, FX_LPSTR pDst);
-int32_t FX_Base64DecodeA(FX_LPCSTR pSrc, int32_t iSrcLen, FX_LPBYTE pDst);
-int32_t FX_Base64DecodeW(FX_LPCWSTR pSrc, int32_t iSrcLen, FX_LPBYTE pDst);
+int32_t FX_Base64EncodeA(const uint8_t* pSrc, int32_t iSrcLen, FX_CHAR* pDst);
+int32_t FX_Base64DecodeA(const FX_CHAR* pSrc, int32_t iSrcLen, uint8_t* pDst);
+int32_t FX_Base64DecodeW(const FX_WCHAR* pSrc, int32_t iSrcLen, uint8_t* pDst);
uint8_t FX_Hex2Dec(uint8_t hexHigh, uint8_t hexLow);
-int32_t FX_SeparateStringW(FX_LPCWSTR pStr, int32_t iStrLen, FX_WCHAR delimiter, CFX_WideStringArray &pieces);
+int32_t FX_SeparateStringW(const FX_WCHAR* pStr, int32_t iStrLen, FX_WCHAR delimiter, CFX_WideStringArray &pieces);
#ifdef __cplusplus
};
#endif
diff --git a/xfa/src/fgas/include/fx_cpg.h b/xfa/src/fgas/include/fx_cpg.h
index 2556426dbc..0b58727fa3 100644
--- a/xfa/src/fgas/include/fx_cpg.h
+++ b/xfa/src/fgas/include/fx_cpg.h
@@ -132,17 +132,17 @@ class IFX_CodePage;
#define FX_CHARSET_OEM 255
FX_WORD FX_GetCodePageFromCharset(uint8_t charset);
FX_WORD FX_GetCharsetFromCodePage(FX_WORD codepage);
-FX_WORD FX_GetCodePageFromStringA(FX_LPCSTR pStr, int32_t iLength);
-FX_WORD FX_GetCodePageFormStringW(FX_LPCWSTR pStr, int32_t iLength);
+FX_WORD FX_GetCodePageFromStringA(const FX_CHAR* pStr, int32_t iLength);
+FX_WORD FX_GetCodePageFormStringW(const FX_WCHAR* pStr, int32_t iLength);
FX_WORD FX_GetDefCodePageByLanguage(FX_WORD wLanguage);
-void FX_SwapByteOrder(FX_LPWSTR pStr, int32_t iLength);
-void FX_SwapByteOrderCopy(FX_LPCWSTR pSrc, FX_LPWSTR pDst, int32_t iLength);
-void FX_UTF16ToWChar(FX_LPVOID pBuffer, int32_t iLength);
-void FX_UTF16ToWCharCopy(const FX_WORD *pUTF16, FX_LPWSTR pWChar, int32_t iLength);
-void FX_WCharToUTF16(FX_LPVOID pBuffer, int32_t iLength);
-void FX_WCharToUTF16Copy(FX_LPCWSTR pWChar, FX_WORD *pUTF16, int32_t iLength);
-int32_t FX_DecodeString(FX_WORD wCodePage, FX_LPCSTR pSrc, int32_t *pSrcLen, FX_LPWSTR pDst, int32_t *pDstLen, FX_BOOL bErrBreak = FALSE);
-int32_t FX_UTF8Decode(FX_LPCSTR pSrc, int32_t *pSrcLen, FX_LPWSTR pDst, int32_t *pDstLen);
+void FX_SwapByteOrder(FX_WCHAR* pStr, int32_t iLength);
+void FX_SwapByteOrderCopy(const FX_WCHAR* pSrc, FX_WCHAR* pDst, int32_t iLength);
+void FX_UTF16ToWChar(void* pBuffer, int32_t iLength);
+void FX_UTF16ToWCharCopy(const FX_WORD *pUTF16, FX_WCHAR* pWChar, int32_t iLength);
+void FX_WCharToUTF16(void* pBuffer, int32_t iLength);
+void FX_WCharToUTF16Copy(const FX_WCHAR* pWChar, FX_WORD *pUTF16, int32_t iLength);
+int32_t FX_DecodeString(FX_WORD wCodePage, const FX_CHAR* pSrc, int32_t *pSrcLen, FX_WCHAR* pDst, int32_t *pDstLen, FX_BOOL bErrBreak = FALSE);
+int32_t FX_UTF8Decode(const FX_CHAR* pSrc, int32_t *pSrcLen, FX_WCHAR* pDst, int32_t *pDstLen);
enum FX_CODESYSTEM {
FX_MBCS = 0,
FX_SBCS ,
@@ -177,7 +177,7 @@ typedef struct _FX_CPCU_MAPTABLE2 {
typedef struct _FX_CPCU_MAPINFO {
FX_CPCU_MAPTABLE1 *pMapTable1;
FX_CPCU_MAPTABLE2 *pMapTable2;
- FX_LPCBYTE pMapData;
+ const uint8_t* pMapData;
} FX_CPCU_MAPINFO;
typedef struct _FX_CPUC_MAPTABLE {
uint16_t uStartUnicode;
@@ -188,7 +188,7 @@ typedef struct _FX_CPUC_MAPTABLE {
typedef struct _FX_CPUC_MAPINFO {
uint32_t uMapCount;
FX_CPUC_MAPTABLE *pMapTable;
- FX_LPCBYTE pMapData;
+ const uint8_t* pMapData;
} FX_CPUC_MAPINFO;
typedef struct _FX_CODEPAGE {
FX_CODEPAGE_HEADER const *pCPHeader;
diff --git a/xfa/src/fgas/include/fx_fnt.h b/xfa/src/fgas/include/fx_fnt.h
index 85d6e3edff..6b328d9741 100644
--- a/xfa/src/fgas/include/fx_fnt.h
+++ b/xfa/src/fgas/include/fx_fnt.h
@@ -45,9 +45,9 @@ public:
class IFX_Font
{
public:
- static IFX_Font* LoadFont(FX_LPCWSTR pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage, IFX_FontMgr *pFontMgr);
- static IFX_Font* LoadFont(FX_LPCBYTE pBuffer, int32_t iLength, IFX_FontMgr *pFontMgr);
- static IFX_Font* LoadFont(FX_LPCWSTR pszFileName, IFX_FontMgr *pFontMgr);
+ static IFX_Font* LoadFont(const FX_WCHAR* pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage, IFX_FontMgr *pFontMgr);
+ static IFX_Font* LoadFont(const uint8_t* pBuffer, int32_t iLength, IFX_FontMgr *pFontMgr);
+ static IFX_Font* LoadFont(const FX_WCHAR* pszFileName, IFX_FontMgr *pFontMgr);
static IFX_Font* LoadFont(IFX_Stream *pFontStream, IFX_FontMgr *pFontMgr, FX_BOOL bSaveStream = FALSE);
static IFX_Font* LoadFont(CFX_Font *pExtFont, IFX_FontMgr *pFontMgr, FX_BOOL bTakeOver = FALSE);
virtual void Release() = 0;
@@ -74,7 +74,7 @@ public:
};
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
typedef struct _FX_FONTMATCHPARAMS {
- FX_LPCWSTR pwsFamily;
+ const FX_WCHAR* pwsFamily;
FX_DWORD dwFontStyles;
FX_DWORD dwUSB;
FX_DWORD dwMatchFlags;
@@ -104,23 +104,23 @@ inline FX_BOOL operator == (const FX_FONTDESCRIPTOR &left, const FX_FONTDESCRIPT
#define FX_FONTMATCHPARA_MacthStyle 0x01
#define FX_FONTMATCHPARA_MacthFamily 0x02
#define FX_FONTMATCHPARA_MacthUnicode 0x04
-typedef void (*FX_LPEnumAllFonts)(CFX_FontDescriptors &fonts, FX_LPVOID pUserData, FX_LPCWSTR pwsFaceName, FX_WCHAR wUnicode);
+typedef void (*FX_LPEnumAllFonts)(CFX_FontDescriptors &fonts, void* pUserData, const FX_WCHAR* pwsFaceName, FX_WCHAR wUnicode);
FX_LPEnumAllFonts FX_GetDefFontEnumerator();
-typedef FX_LPCFONTDESCRIPTOR (*FX_LPMatchFont)(FX_LPFONTMATCHPARAMS pParams, const CFX_FontDescriptors &fonts, FX_LPVOID pUserData);
+typedef FX_LPCFONTDESCRIPTOR (*FX_LPMatchFont)(FX_LPFONTMATCHPARAMS pParams, const CFX_FontDescriptors &fonts, void* pUserData);
FX_LPMatchFont FX_GetDefFontMatchor();
class IFX_FontMgr
{
public:
- static IFX_FontMgr* Create(FX_LPEnumAllFonts pEnumerator, FX_LPMatchFont pMatcher = NULL, FX_LPVOID pUserData = NULL);
+ static IFX_FontMgr* Create(FX_LPEnumAllFonts pEnumerator, FX_LPMatchFont pMatcher = NULL, void* pUserData = NULL);
virtual void Release() = 0;
- virtual IFX_Font* GetDefFontByCodePage(FX_WORD wCodePage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetDefFontByCharset(uint8_t nCharset, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetDefFontByUnicode(FX_WCHAR wUnicode, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetDefFontByLanguage(FX_WORD wLanguage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
- virtual IFX_Font* LoadFont(FX_LPCWSTR pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF) = 0;
- virtual IFX_Font* LoadFont(FX_LPCBYTE pBuffer, int32_t iLength) = 0;
- virtual IFX_Font* LoadFont(FX_LPCWSTR pszFileName) = 0;
- virtual IFX_Font* LoadFont(IFX_Stream *pFontStream, FX_LPCWSTR pszFontAlias = NULL, FX_DWORD dwFontStyles = 0, FX_WORD wCodePage = 0, FX_BOOL bSaveStream = FALSE) = 0;
+ virtual IFX_Font* GetDefFontByCodePage(FX_WORD wCodePage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0;
+ virtual IFX_Font* GetDefFontByCharset(uint8_t nCharset, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0;
+ virtual IFX_Font* GetDefFontByUnicode(FX_WCHAR wUnicode, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0;
+ virtual IFX_Font* GetDefFontByLanguage(FX_WORD wLanguage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0;
+ virtual IFX_Font* LoadFont(const FX_WCHAR* pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF) = 0;
+ virtual IFX_Font* LoadFont(const uint8_t* pBuffer, int32_t iLength) = 0;
+ virtual IFX_Font* LoadFont(const FX_WCHAR* pszFileName) = 0;
+ virtual IFX_Font* LoadFont(IFX_Stream *pFontStream, const FX_WCHAR* pszFontAlias = NULL, FX_DWORD dwFontStyles = 0, FX_WORD wCodePage = 0, FX_BOOL bSaveStream = FALSE) = 0;
virtual IFX_Font* LoadFont(IFX_Font *pSrcFont, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF) = 0;
virtual void ClearFontCache() = 0;
virtual void RemoveFont(IFX_Font *pFont) = 0;
@@ -129,38 +129,38 @@ public:
class IFX_FontMgrDelegate
{
public:
- virtual IFX_Font* GetDefFontByCodePage(IFX_FontMgr* pFontMgr, FX_WORD wCodePage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetDefFontByCharset(IFX_FontMgr* pFontMgr, uint8_t nCharset, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetDefFontByUnicode(IFX_FontMgr* pFontMgr, FX_WCHAR wUnicode, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetDefFontByLanguage(IFX_FontMgr* pFontMgr, FX_WORD wLanguage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
+ virtual IFX_Font* GetDefFontByCodePage(IFX_FontMgr* pFontMgr, FX_WORD wCodePage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0;
+ virtual IFX_Font* GetDefFontByCharset(IFX_FontMgr* pFontMgr, uint8_t nCharset, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0;
+ virtual IFX_Font* GetDefFontByUnicode(IFX_FontMgr* pFontMgr, FX_WCHAR wUnicode, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0;
+ virtual IFX_Font* GetDefFontByLanguage(IFX_FontMgr* pFontMgr, FX_WORD wLanguage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0;
};
class IFX_FontSourceEnum
{
public:
virtual void Release() = 0;
- virtual FX_POSITION GetStartPosition(FX_LPVOID pUserData = NULL) = 0;
- virtual IFX_FileAccess* GetNext(FX_POSITION& pos, FX_LPVOID pUserData = NULL) = 0;
+ virtual FX_POSITION GetStartPosition(void* pUserData = NULL) = 0;
+ virtual IFX_FileAccess* GetNext(FX_POSITION& pos, void* pUserData = NULL) = 0;
};
IFX_FontSourceEnum* FX_CreateDefaultFontSourceEnum();
class IFX_FontMgr
{
public:
- static IFX_FontMgr* Create(IFX_FontSourceEnum* pFontEnum, IFX_FontMgrDelegate* pDelegate = NULL, FX_LPVOID pUserData = NULL);
+ static IFX_FontMgr* Create(IFX_FontSourceEnum* pFontEnum, IFX_FontMgrDelegate* pDelegate = NULL, void* pUserData = NULL);
virtual void Release() = 0;
- virtual IFX_Font* GetDefFontByCodePage(FX_WORD wCodePage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetDefFontByCharset(uint8_t nCharset, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetDefFontByUnicode(FX_WCHAR wUnicode, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetDefFontByLanguage(FX_WORD wLanguage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetFontByCodePage(FX_WORD wCodePage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
- inline IFX_Font* LoadFont(FX_LPCWSTR pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage)
+ virtual IFX_Font* GetDefFontByCodePage(FX_WORD wCodePage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0;
+ virtual IFX_Font* GetDefFontByCharset(uint8_t nCharset, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0;
+ virtual IFX_Font* GetDefFontByUnicode(FX_WCHAR wUnicode, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0;
+ virtual IFX_Font* GetDefFontByLanguage(FX_WORD wLanguage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0;
+ virtual IFX_Font* GetFontByCodePage(FX_WORD wCodePage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0;
+ inline IFX_Font* LoadFont(const FX_WCHAR* pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage)
{
return GetFontByCodePage(wCodePage, dwFontStyles, pszFontFamily);
}
- virtual IFX_Font* GetFontByCharset(uint8_t nCharset, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetFontByUnicode(FX_WCHAR wUnicode, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetFontByLanguage(FX_WORD wLanguage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
- virtual IFX_Font* LoadFont(FX_LPCBYTE pBuffer, int32_t iLength, int32_t iFaceIndex, int32_t* pFaceCount = NULL) = 0;
- virtual IFX_Font* LoadFont(FX_LPCWSTR pszFileName, int32_t iFaceIndex, int32_t* pFaceCount = NULL) = 0;
+ virtual IFX_Font* GetFontByCharset(uint8_t nCharset, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0;
+ virtual IFX_Font* GetFontByUnicode(FX_WCHAR wUnicode, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0;
+ virtual IFX_Font* GetFontByLanguage(FX_WORD wLanguage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0;
+ virtual IFX_Font* LoadFont(const uint8_t* pBuffer, int32_t iLength, int32_t iFaceIndex, int32_t* pFaceCount = NULL) = 0;
+ virtual IFX_Font* LoadFont(const FX_WCHAR* pszFileName, int32_t iFaceIndex, int32_t* pFaceCount = NULL) = 0;
virtual IFX_Font* LoadFont(IFX_Stream *pFontStream, int32_t iFaceIndex, int32_t* pFaceCount = NULL, FX_BOOL bSaveStream = FALSE) = 0;
virtual void ClearFontCache() = 0;
diff --git a/xfa/src/fgas/include/fx_lbk.h b/xfa/src/fgas/include/fx_lbk.h
index f161bb4355..27a072a3b8 100644
--- a/xfa/src/fgas/include/fx_lbk.h
+++ b/xfa/src/fgas/include/fx_lbk.h
@@ -22,6 +22,6 @@ enum FX_LINEBREAKTYPE {
#define FX_LBCP FX_LBT_COM_PROHIBITED_BRK
#define FX_LBPB FX_LBT_PROHIBITED_BRK
#define FX_LBHS FX_LBT_HANGUL_SPACE_BRK
-void FX_GetLineBreakPositions(FX_LPCWSTR pwsText, FX_LINEBREAKTYPE *pBrkType, int32_t iLength);
-void FX_GetLineBreakPositions(FX_LPCWSTR pwsText, int32_t iLength, CFX_Int32MassArray &bp);
+void FX_GetLineBreakPositions(const FX_WCHAR* pwsText, FX_LINEBREAKTYPE *pBrkType, int32_t iLength);
+void FX_GetLineBreakPositions(const FX_WCHAR* pwsText, int32_t iLength, CFX_Int32MassArray &bp);
#endif
diff --git a/xfa/src/fgas/include/fx_locale.h b/xfa/src/fgas/include/fx_locale.h
index 7f4cce5776..ef6b910b00 100644
--- a/xfa/src/fgas/include/fx_locale.h
+++ b/xfa/src/fgas/include/fx_locale.h
@@ -79,7 +79,7 @@ public:
virtual IFX_Locale* GetLocale(FX_WORD lcid) = 0;
virtual IFX_Locale* GetLocaleByName(FX_WSTR wsLocaleName) = 0;
};
-IFX_LocaleMgr* FX_LocaleMgr_Create(FX_LPCWSTR pszLocalPath, FX_WORD wDefaultLCID);
+IFX_LocaleMgr* FX_LocaleMgr_Create(const FX_WCHAR* pszLocalPath, FX_WORD wDefaultLCID);
void FX_ParseNumString(const CFX_WideString& wsNum, CFX_WideString& wsResult);
FX_BOOL FX_DateFromCanonical(const CFX_WideString& wsDate, CFX_Unitime& datetime);
FX_BOOL FX_TimeFromCanonical(FX_WSTR wsTime, CFX_Unitime& datetime, IFX_Locale* pLocale);
diff --git a/xfa/src/fgas/include/fx_rbk.h b/xfa/src/fgas/include/fx_rbk.h
index cff63ee490..282b6e37db 100644
--- a/xfa/src/fgas/include/fx_rbk.h
+++ b/xfa/src/fgas/include/fx_rbk.h
@@ -68,7 +68,7 @@ typedef struct _FX_RTFTEXTOBJ {
iHorizontalScale = 100;
iVerticalScale = 100;
}
- FX_LPCWSTR pStr;
+ const FX_WCHAR* pStr;
int32_t *pWidths;
int32_t iLength;
IFX_Font *pFont;
@@ -139,7 +139,7 @@ public:
FXSYS_assert(index > -1 && index < m_iChars && m_pChars != NULL);
return m_pChars->GetDataPtr(m_iStartChar + index);
}
- void GetString (FX_LPWSTR pText) const
+ void GetString (FX_WCHAR* pText) const
{
FXSYS_assert(pText != NULL);
int32_t iEndChar = m_iStartChar + m_iChars;
@@ -151,7 +151,7 @@ public:
}
void GetString(CFX_WideString &wsText) const
{
- FX_LPWSTR pText = wsText.GetBuffer(m_iChars);
+ FX_WCHAR* pText = wsText.GetBuffer(m_iChars);
GetString(pText);
wsText.ReleaseBuffer(m_iChars);
}
diff --git a/xfa/src/fgas/include/fx_sax.h b/xfa/src/fgas/include/fx_sax.h
index e45ca4e6d8..a6122c48e5 100644
--- a/xfa/src/fgas/include/fx_sax.h
+++ b/xfa/src/fgas/include/fx_sax.h
@@ -27,13 +27,13 @@ enum FX_SAXNODE {
class IFX_SAXReaderHandler
{
public:
- virtual FX_LPVOID OnTagEnter(FX_BSTR bsTagName, FX_SAXNODE eType, FX_DWORD dwStartPos) = 0;
- virtual void OnTagAttribute(FX_LPVOID pTag, FX_BSTR bsAttri, FX_BSTR bsValue) = 0;
- virtual void OnTagBreak(FX_LPVOID pTag) = 0;
- virtual void OnTagData(FX_LPVOID pTag, FX_SAXNODE eType, FX_BSTR bsData, FX_DWORD dwStartPos) = 0;
- virtual void OnTagClose(FX_LPVOID pTag, FX_DWORD dwEndPos) = 0;
- virtual void OnTagEnd(FX_LPVOID pTag, FX_BSTR bsTagName, FX_DWORD dwEndPos) = 0;
- virtual void OnTargetData(FX_LPVOID pTag, FX_SAXNODE eType, FX_BSTR bsData, FX_DWORD dwStartPos) = 0;
+ virtual void* OnTagEnter(FX_BSTR bsTagName, FX_SAXNODE eType, FX_DWORD dwStartPos) = 0;
+ virtual void OnTagAttribute(void* pTag, FX_BSTR bsAttri, FX_BSTR bsValue) = 0;
+ virtual void OnTagBreak(void* pTag) = 0;
+ virtual void OnTagData(void* pTag, FX_SAXNODE eType, FX_BSTR bsData, FX_DWORD dwStartPos) = 0;
+ virtual void OnTagClose(void* pTag, FX_DWORD dwEndPos) = 0;
+ virtual void OnTagEnd(void* pTag, FX_BSTR bsTagName, FX_DWORD dwEndPos) = 0;
+ virtual void OnTargetData(void* pTag, FX_SAXNODE eType, FX_BSTR bsData, FX_DWORD dwStartPos) = 0;
};
class IFX_SAXReader
{
diff --git a/xfa/src/fgas/include/fx_stm.h b/xfa/src/fgas/include/fx_stm.h
index e6094d445c..b10b06a830 100644
--- a/xfa/src/fgas/include/fx_stm.h
+++ b/xfa/src/fgas/include/fx_stm.h
@@ -33,8 +33,8 @@ class IFX_Stream
public:
static IFX_Stream* CreateStream(IFX_FileRead *pFileRead, FX_DWORD dwAccess);
static IFX_Stream* CreateStream(IFX_FileWrite *pFileWrite, FX_DWORD dwAccess);
- static IFX_Stream* CreateStream(FX_LPCWSTR pszFileName, FX_DWORD dwAccess);
- static IFX_Stream* CreateStream(FX_LPBYTE pData, int32_t length, FX_DWORD dwAccess);
+ static IFX_Stream* CreateStream(const FX_WCHAR* pszFileName, FX_DWORD dwAccess);
+ static IFX_Stream* CreateStream(uint8_t* pData, int32_t length, FX_DWORD dwAccess);
static IFX_Stream* CreateStream(IFX_BufferRead *pBufferRead, FX_DWORD dwAccess, int32_t iFileSize = -1, FX_BOOL bReleaseBufferRead = TRUE);
static IFX_Stream* CreateTextStream(IFX_Stream *pBaseStream, FX_BOOL bDeleteOnRelease);
virtual void Release() = 0;
@@ -44,10 +44,10 @@ public:
virtual int32_t Seek(FX_STREAMSEEK eSeek, int32_t iOffset) = 0;
virtual int32_t GetPosition() = 0;
virtual FX_BOOL IsEOF() const = 0;
- virtual int32_t ReadData(FX_LPBYTE pBuffer, int32_t iBufferSize) = 0;
- virtual int32_t ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_BOOL &bEOS, int32_t const *pByteSize = NULL) = 0;
- virtual int32_t WriteData(FX_LPCBYTE pBuffer, int32_t iBufferSize) = 0;
- virtual int32_t WriteString(FX_LPCWSTR pStr, int32_t iLength) = 0;
+ virtual int32_t ReadData(uint8_t* pBuffer, int32_t iBufferSize) = 0;
+ virtual int32_t ReadString(FX_WCHAR* pStr, int32_t iMaxLength, FX_BOOL &bEOS, int32_t const *pByteSize = NULL) = 0;
+ virtual int32_t WriteData(const uint8_t* pBuffer, int32_t iBufferSize) = 0;
+ virtual int32_t WriteString(const FX_WCHAR* pStr, int32_t iLength) = 0;
virtual void Flush() = 0;
virtual FX_BOOL SetLength(int32_t iLength) = 0;
virtual int32_t GetBOM(uint8_t bom[4]) const = 0;
diff --git a/xfa/src/fgas/include/fx_sys.h b/xfa/src/fgas/include/fx_sys.h
index 8e099bce05..3982e0d285 100644
--- a/xfa/src/fgas/include/fx_sys.h
+++ b/xfa/src/fgas/include/fx_sys.h
@@ -24,11 +24,11 @@ typedef FX_DOUBLE * FX_LPDOUBLE;
typedef FX_DOUBLE const * FX_LPCDOUBLE;
FX_FLOAT FX_tan(FX_FLOAT a);
FX_FLOAT FX_log(FX_FLOAT b, FX_FLOAT x);
-FX_FLOAT FX_strtof(FX_LPCSTR pcsStr, int32_t iLength = -1, int32_t *pUsedLen = NULL);
-FX_FLOAT FX_wcstof(FX_LPCWSTR pwsStr, int32_t iLength = -1, int32_t *pUsedLen = NULL);
-FX_LPWSTR FX_wcsncpy(FX_LPWSTR dstStr, FX_LPCWSTR srcStr, size_t count);
-int32_t FX_wcsnicmp(FX_LPCWSTR s1, FX_LPCWSTR s2, size_t count);
-int32_t FX_strnicmp(FX_LPCSTR s1, FX_LPCSTR s2, size_t count);
+FX_FLOAT FX_strtof(const FX_CHAR* pcsStr, int32_t iLength = -1, int32_t *pUsedLen = NULL);
+FX_FLOAT FX_wcstof(const FX_WCHAR* pwsStr, int32_t iLength = -1, int32_t *pUsedLen = NULL);
+FX_WCHAR* FX_wcsncpy(FX_WCHAR* dstStr, const FX_WCHAR* srcStr, size_t count);
+int32_t FX_wcsnicmp(const FX_WCHAR* s1, const FX_WCHAR* s2, size_t count);
+int32_t FX_strnicmp(const FX_CHAR* s1, const FX_CHAR* s2, size_t count);
inline FX_BOOL FX_islower(int32_t ch)
{
return ch >= 'a' && ch <= 'z';
@@ -47,8 +47,8 @@ inline int32_t FX_toupper(int32_t ch)
}
int32_t FX_filelength(FXSYS_FILE *file);
FX_BOOL FX_fsetsize(FXSYS_FILE *file, int32_t size);
-void FX_memset(FX_LPVOID pBuf, int32_t iValue, size_t size);
-void FX_memcpy(FX_LPVOID pDst, FX_LPCVOID pSrc, size_t size);
+void FX_memset(void* pBuf, int32_t iValue, size_t size);
+void FX_memcpy(void* pDst, const void* pSrc, size_t size);
FX_BOOL FX_IsRelativePath(const CFX_WideStringC &wsPath);
FX_BOOL FX_JoinPath(const CFX_WideStringC &wsBasePath, const CFX_WideStringC &wsRelativePath, CFX_WideString &wsAbsolutePath);
typedef struct _FX_VERSION {
diff --git a/xfa/src/fgas/include/fx_tbk.h b/xfa/src/fgas/include/fx_tbk.h
index 69b42f1fd7..e48e2eedf4 100644
--- a/xfa/src/fgas/include/fx_tbk.h
+++ b/xfa/src/fgas/include/fx_tbk.h
@@ -60,8 +60,8 @@ class IFX_TxtBreak;
class IFX_TxtAccess
{
public:
- virtual FX_WCHAR GetChar(FX_LPVOID pIdentity, int32_t index) const = 0;
- virtual int32_t GetWidth(FX_LPVOID pIdentity, int32_t index) const = 0;
+ virtual FX_WCHAR GetChar(void* pIdentity, int32_t index) const = 0;
+ virtual int32_t GetWidth(void* pIdentity, int32_t index) const = 0;
};
typedef struct _FX_TXTRUN {
_FX_TXTRUN()
@@ -83,8 +83,8 @@ typedef struct _FX_TXTRUN {
bSkipSpace = TRUE;
}
IFX_TxtAccess *pAccess;
- FX_LPVOID pIdentity;
- FX_LPCWSTR pStr;
+ void* pIdentity;
+ const FX_WCHAR* pStr;
int32_t *pWidths;
int32_t iLength;
IFX_Font *pFont;
@@ -133,7 +133,7 @@ public:
FXSYS_assert(index > -1 && index < m_iChars && m_pChars != NULL);
return m_pChars->GetDataPtr(m_iStartChar + index);
}
- void GetString(FX_LPWSTR pText) const
+ void GetString(FX_WCHAR* pText) const
{
FXSYS_assert(pText != NULL);
int32_t iEndChar = m_iStartChar + m_iChars;
@@ -146,7 +146,7 @@ public:
void GetString(CFX_WideString &wsText) const
{
- FX_LPWSTR pText = wsText.GetBuffer(m_iChars);
+ FX_WCHAR* pText = wsText.GetBuffer(m_iChars);
GetString(pText);
wsText.ReleaseBuffer(m_iChars);
}
@@ -171,7 +171,7 @@ public:
int32_t m_iVerticalScale;
FX_DWORD m_dwCharStyles;
CFX_TxtCharArray *m_pChars;
- FX_LPVOID m_pUserData;
+ void* m_pUserData;
};
typedef CFX_BaseArrayTemplate<CFX_TxtPiece> CFX_TxtPieceArray;
class IFX_TxtBreak
@@ -197,7 +197,7 @@ public:
virtual FX_DWORD GetContextCharStyles() const = 0;
virtual void SetContextCharStyles(FX_DWORD dwCharStyles) = 0;
virtual void SetCombWidth(FX_FLOAT fCombWidth) = 0;
- virtual void SetUserData(FX_LPVOID pUserData) = 0;
+ virtual void SetUserData(void* pUserData) = 0;
virtual FX_DWORD AppendChar(FX_WCHAR wch) = 0;
virtual FX_DWORD EndBreak(FX_DWORD dwStatus = FX_TXTBREAK_PieceBreak) = 0;
virtual int32_t CountBreakChars() const = 0;
diff --git a/xfa/src/fgas/include/fx_utl.h b/xfa/src/fgas/include/fx_utl.h
index 35b676f41e..38342a8cc8 100644
--- a/xfa/src/fgas/include/fx_utl.h
+++ b/xfa/src/fgas/include/fx_utl.h
@@ -29,7 +29,7 @@ public:
void Lock();
void Unlock();
private:
- FX_LPVOID m_pData;
+ void* m_pData;
};
class CFX_BaseArray : public CFX_Target
{
@@ -38,14 +38,14 @@ protected:
~CFX_BaseArray();
int32_t GetSize() const;
int32_t GetBlockSize() const;
- FX_LPBYTE AddSpaceTo(int32_t index);
- FX_LPBYTE GetAt(int32_t index) const;
- FX_LPBYTE GetBuffer() const;
+ uint8_t* AddSpaceTo(int32_t index);
+ uint8_t* GetAt(int32_t index) const;
+ uint8_t* GetBuffer() const;
int32_t Append(const CFX_BaseArray &src, int32_t iStart = 0, int32_t iCount = -1);
int32_t Copy(const CFX_BaseArray &src, int32_t iStart = 0, int32_t iCount = -1);
int32_t RemoveLast(int32_t iCount = -1);
void RemoveAll(FX_BOOL bLeaveMemory = FALSE);
- FX_LPVOID m_pData;
+ void* m_pData;
};
template<class baseType>
class CFX_BaseArrayTemplate : public CFX_BaseArray
@@ -108,7 +108,7 @@ public:
CFX_BaseArray::RemoveAll(bLeaveMemory);
}
};
-typedef CFX_BaseArrayTemplate<FX_LPVOID> CFDE_PtrArray;
+typedef CFX_BaseArrayTemplate<void*> CFDE_PtrArray;
typedef CFX_BaseArrayTemplate<FX_DWORD> CFDE_DWordArray;
typedef CFX_BaseArrayTemplate<FX_WORD> CFDE_WordArray;
template<class baseType>
@@ -162,7 +162,7 @@ public:
}
iSize = CFX_BaseArray::GetSize();
CFX_BaseArray::AddSpaceTo(iSize + iCount - 1);
- FX_LPBYTE *pStart = CFX_BaseArray::GetAt(iSize);
+ uint8_t* *pStart = CFX_BaseArray::GetAt(iSize);
int32_t iBlockSize = CFX_BaseArray::GetBlockSize();
iSize = iStart + iCount;
for (int32_t i = iStart; i < iSize; i ++) {
@@ -190,7 +190,7 @@ public:
}
RemoveAll(TRUE);
CFX_BaseArray::AddSpaceTo(iCount - 1);
- FX_LPBYTE *pStart = CFX_BaseArray::GetAt(0);
+ uint8_t* *pStart = CFX_BaseArray::GetAt(0);
int32_t iBlockSize = CFX_BaseArray::GetBlockSize();
iSize = iStart + iCount;
for (int32_t i = iStart; i < iSize; i ++) {
@@ -228,8 +228,8 @@ protected:
CFX_BaseMassArray(int32_t iChunkSize, int32_t iBlockSize);
~CFX_BaseMassArray();
int32_t GetSize() const;
- FX_LPBYTE AddSpaceTo(int32_t index);
- FX_LPBYTE GetAt(int32_t index) const;
+ uint8_t* AddSpaceTo(int32_t index);
+ uint8_t* GetAt(int32_t index) const;
int32_t Append(const CFX_BaseMassArray &src, int32_t iStart = 0, int32_t iCount = -1);
int32_t Copy(const CFX_BaseMassArray &src, int32_t iStart = 0, int32_t iCount = -1);
int32_t RemoveLast(int32_t iCount = -1);
@@ -289,7 +289,7 @@ public:
CFX_BaseMassArray::RemoveAll(bLeaveMemory);
}
};
-typedef CFX_MassArrayTemplate<FX_LPVOID> CFX_PtrMassArray;
+typedef CFX_MassArrayTemplate<void*> CFX_PtrMassArray;
typedef CFX_MassArrayTemplate<int32_t> CFX_Int32MassArray;
typedef CFX_MassArrayTemplate<FX_DWORD> CFX_DWordMassArray;
typedef CFX_MassArrayTemplate<FX_WORD> CFX_WordMassArray;
@@ -390,10 +390,10 @@ class CFX_BaseDiscreteArray : public CFX_Target
protected:
CFX_BaseDiscreteArray(int32_t iChunkSize, int32_t iBlockSize);
~CFX_BaseDiscreteArray();
- FX_LPBYTE AddSpaceTo(int32_t index);
- FX_LPBYTE GetAt(int32_t index) const;
+ uint8_t* AddSpaceTo(int32_t index);
+ uint8_t* GetAt(int32_t index) const;
void RemoveAll();
- FX_LPVOID m_pData;
+ void* m_pData;
};
template<class baseType>
class CFX_DiscreteArrayTemplate : public CFX_BaseDiscreteArray
@@ -418,7 +418,7 @@ public:
CFX_BaseDiscreteArray::RemoveAll();
}
};
-typedef CFX_DiscreteArrayTemplate<FX_LPVOID> CFX_PtrDiscreteArray;
+typedef CFX_DiscreteArrayTemplate<void*> CFX_PtrDiscreteArray;
typedef CFX_DiscreteArrayTemplate<FX_DWORD> CFX_DWordDiscreteArray;
typedef CFX_DiscreteArrayTemplate<FX_WORD> CFX_WordDiscreteArray;
class CFX_BaseStack : public CFX_Target
@@ -426,11 +426,11 @@ class CFX_BaseStack : public CFX_Target
protected:
CFX_BaseStack(int32_t iChunkSize, int32_t iBlockSize);
~CFX_BaseStack();
- FX_LPBYTE Push();
+ uint8_t* Push();
void Pop();
- FX_LPBYTE GetTopElement() const;
+ uint8_t* GetTopElement() const;
int32_t GetSize() const;
- FX_LPBYTE GetAt(int32_t index) const;
+ uint8_t* GetAt(int32_t index) const;
void RemoveAll(FX_BOOL bLeaveMemory = FALSE);
CFX_BaseMassArrayImp* m_pData;
};
@@ -466,7 +466,7 @@ public:
CFX_BaseStack::RemoveAll(bLeaveMemory);
}
};
-typedef CFX_StackTemplate<FX_LPVOID> CFX_PtrStack;
+typedef CFX_StackTemplate<void*> CFX_PtrStack;
typedef CFX_StackTemplate<FX_DWORD> CFX_DWordStack;
typedef CFX_StackTemplate<FX_WORD> CFX_WordStack;
typedef CFX_StackTemplate<int32_t> CFX_Int32Stack;
diff --git a/xfa/src/fgas/src/crt/fx_algorithm.cpp b/xfa/src/fgas/src/crt/fx_algorithm.cpp
index 86a6095d45..eb133a3a62 100644
--- a/xfa/src/fgas/src/crt/fx_algorithm.cpp
+++ b/xfa/src/fgas/src/crt/fx_algorithm.cpp
@@ -52,7 +52,7 @@ static void FX_Base64EncodePiece(const FX_BASE64DATA &src, int32_t iBytes, FX_CH
dst[2] = dst[3] = '=';
}
}
-int32_t FX_Base64EncodeA(FX_LPCBYTE pSrc, int32_t iSrcLen, FX_LPSTR pDst)
+int32_t FX_Base64EncodeA(const uint8_t* pSrc, int32_t iSrcLen, FX_CHAR* pDst)
{
FXSYS_assert(pSrc != NULL);
if (iSrcLen < 1) {
@@ -67,18 +67,18 @@ int32_t FX_Base64EncodeA(FX_LPCBYTE pSrc, int32_t iSrcLen, FX_LPSTR pDst)
}
FX_BASE64DATA srcData;
int32_t iBytes = 3;
- FX_LPSTR pDstEnd = pDst;
+ FX_CHAR* pDstEnd = pDst;
while (iSrcLen > 0) {
if (iSrcLen > 2) {
- ((FX_LPBYTE)&srcData)[0] = *pSrc ++;
- ((FX_LPBYTE)&srcData)[1] = *pSrc ++;
- ((FX_LPBYTE)&srcData)[2] = *pSrc ++;
+ ((uint8_t*)&srcData)[0] = *pSrc ++;
+ ((uint8_t*)&srcData)[1] = *pSrc ++;
+ ((uint8_t*)&srcData)[2] = *pSrc ++;
iSrcLen -= 3;
} else {
- *((FX_LPDWORD)&srcData) = 0;
- ((FX_LPBYTE)&srcData)[0] = *pSrc ++;
+ *((FX_DWORD*)&srcData) = 0;
+ ((uint8_t*)&srcData)[0] = *pSrc ++;
if (iSrcLen > 1) {
- ((FX_LPBYTE)&srcData)[1] = *pSrc ++;
+ ((uint8_t*)&srcData)[1] = *pSrc ++;
}
iBytes = iSrcLen;
iSrcLen = 0;
@@ -149,7 +149,7 @@ static void FX_Base64DecodePiece(const FX_CHAR src[4], int32_t iChars, FX_BASE64
dst.data1 = 0;
}
}
-int32_t FX_Base64DecodeA(FX_LPCSTR pSrc, int32_t iSrcLen, FX_LPBYTE pDst)
+int32_t FX_Base64DecodeA(const FX_CHAR* pSrc, int32_t iSrcLen, uint8_t* pDst)
{
FXSYS_assert(pSrc != NULL);
if (iSrcLen < 1) {
@@ -176,14 +176,14 @@ int32_t FX_Base64DecodeA(FX_LPCSTR pSrc, int32_t iSrcLen, FX_LPBYTE pDst)
FX_CHAR srcData[4];
FX_BASE64DATA dstData;
int32_t iChars = 4, iBytes;
- FX_LPBYTE pDstEnd = pDst;
+ uint8_t* pDstEnd = pDst;
while (iSrcLen > 0) {
if (iSrcLen > 3) {
*((FX_DWORD*)srcData) = *((FX_DWORD*)pSrc);
pSrc += 4;
iSrcLen -= 4;
} else {
- *((FX_LPDWORD)&dstData) = 0;
+ *((FX_DWORD*)&dstData) = 0;
*((FX_DWORD*)srcData) = 0;
srcData[0] = *pSrc ++;
if (iSrcLen > 1) {
@@ -196,17 +196,17 @@ int32_t FX_Base64DecodeA(FX_LPCSTR pSrc, int32_t iSrcLen, FX_LPBYTE pDst)
iSrcLen = 0;
}
FX_Base64DecodePiece(srcData, iChars, dstData, iBytes);
- *pDstEnd ++ = ((FX_LPBYTE)&dstData)[0];
+ *pDstEnd ++ = ((uint8_t*)&dstData)[0];
if (iBytes > 1) {
- *pDstEnd ++ = ((FX_LPBYTE)&dstData)[1];
+ *pDstEnd ++ = ((uint8_t*)&dstData)[1];
}
if (iBytes > 2) {
- *pDstEnd ++ = ((FX_LPBYTE)&dstData)[2];
+ *pDstEnd ++ = ((uint8_t*)&dstData)[2];
}
}
return pDstEnd - pDst;
}
-int32_t FX_Base64DecodeW(FX_LPCWSTR pSrc, int32_t iSrcLen, FX_LPBYTE pDst)
+int32_t FX_Base64DecodeW(const FX_WCHAR* pSrc, int32_t iSrcLen, uint8_t* pDst)
{
FXSYS_assert(pSrc != NULL);
if (iSrcLen < 1) {
@@ -233,7 +233,7 @@ int32_t FX_Base64DecodeW(FX_LPCWSTR pSrc, int32_t iSrcLen, FX_LPBYTE pDst)
FX_CHAR srcData[4];
FX_BASE64DATA dstData;
int32_t iChars = 4, iBytes;
- FX_LPBYTE pDstEnd = pDst;
+ uint8_t* pDstEnd = pDst;
while (iSrcLen > 0) {
if (iSrcLen > 3) {
srcData[0] = (FX_CHAR) * pSrc ++;
@@ -242,7 +242,7 @@ int32_t FX_Base64DecodeW(FX_LPCWSTR pSrc, int32_t iSrcLen, FX_LPBYTE pDst)
srcData[3] = (FX_CHAR) * pSrc ++;
iSrcLen -= 4;
} else {
- *((FX_LPDWORD)&dstData) = 0;
+ *((FX_DWORD*)&dstData) = 0;
*((FX_DWORD*)srcData) = 0;
srcData[0] = (FX_CHAR) * pSrc ++;
if (iSrcLen > 1) {
@@ -255,12 +255,12 @@ int32_t FX_Base64DecodeW(FX_LPCWSTR pSrc, int32_t iSrcLen, FX_LPBYTE pDst)
iSrcLen = 0;
}
FX_Base64DecodePiece(srcData, iChars, dstData, iBytes);
- *pDstEnd ++ = ((FX_LPBYTE)&dstData)[0];
+ *pDstEnd ++ = ((uint8_t*)&dstData)[0];
if (iBytes > 1) {
- *pDstEnd ++ = ((FX_LPBYTE)&dstData)[1];
+ *pDstEnd ++ = ((uint8_t*)&dstData)[1];
}
if (iBytes > 2) {
- *pDstEnd ++ = ((FX_LPBYTE)&dstData)[2];
+ *pDstEnd ++ = ((uint8_t*)&dstData)[2];
}
}
return pDstEnd - pDst;
@@ -287,7 +287,7 @@ uint8_t FX_Hex2Dec(uint8_t hexHigh, uint8_t hexLow)
{
return (g_FXHex2DecMap[hexHigh] << 4) + g_FXHex2DecMap[hexLow];
}
-int32_t FX_SeparateStringW(FX_LPCWSTR pStr, int32_t iStrLen, FX_WCHAR delimiter, CFX_WideStringArray &pieces)
+int32_t FX_SeparateStringW(const FX_WCHAR* pStr, int32_t iStrLen, FX_WCHAR delimiter, CFX_WideStringArray &pieces)
{
if (pStr == NULL) {
return 0;
@@ -295,8 +295,8 @@ int32_t FX_SeparateStringW(FX_LPCWSTR pStr, int32_t iStrLen, FX_WCHAR delimiter,
if (iStrLen < 0) {
iStrLen = FXSYS_wcslen(pStr);
}
- FX_LPCWSTR pToken = pStr;
- FX_LPCWSTR pEnd = pStr + iStrLen;
+ const FX_WCHAR* pToken = pStr;
+ const FX_WCHAR* pEnd = pStr + iStrLen;
while (TRUE) {
if (pStr >= pEnd || delimiter == *pStr) {
CFX_WideString sub(pToken, pStr - pToken);
diff --git a/xfa/src/fgas/src/crt/fx_codepage.cpp b/xfa/src/fgas/src/crt/fx_codepage.cpp
index 239fa8874c..86d8b45c82 100644
--- a/xfa/src/fgas/src/crt/fx_codepage.cpp
+++ b/xfa/src/fgas/src/crt/fx_codepage.cpp
@@ -329,7 +329,7 @@ static const FX_STR2CPHASH g_FXCPHashTable[] = {
{ 0xf2a9730b, 0x3a8 }, { 0xf3d463c2, 0x3a4 }, { 0xf52a70a3, 0xc42e }, { 0xf5693147, 0x6fb3 },
{ 0xf637e157, 0x478 }, { 0xfc213f3a, 0x2717 }, { 0xff654d14, 0x3b5 },
};
-FX_WORD FX_GetCodePageFromStringA(FX_LPCSTR pStr, int32_t iLength)
+FX_WORD FX_GetCodePageFromStringA(const FX_CHAR* pStr, int32_t iLength)
{
FXSYS_assert(pStr != NULL);
if (iLength < 0) {
@@ -355,7 +355,7 @@ FX_WORD FX_GetCodePageFromStringA(FX_LPCSTR pStr, int32_t iLength)
} while (iStart <= iEnd);
return 0xFFFF;
}
-FX_WORD FX_GetCodePageFormStringW(FX_LPCWSTR pStr, int32_t iLength)
+FX_WORD FX_GetCodePageFormStringW(const FX_WCHAR* pStr, int32_t iLength)
{
if (iLength < 0) {
iLength = FXSYS_wcslen(pStr);
@@ -364,7 +364,7 @@ FX_WORD FX_GetCodePageFormStringW(FX_LPCWSTR pStr, int32_t iLength)
return 0xFFFF;
}
CFX_ByteString csStr;
- FX_LPSTR pBuf = csStr.GetBuffer(iLength + 1);
+ FX_CHAR* pBuf = csStr.GetBuffer(iLength + 1);
for (int32_t i = 0; i < iLength; ++i) {
*pBuf ++ = (FX_CHAR) * pStr ++;
}
diff --git a/xfa/src/fgas/src/crt/fx_encode.cpp b/xfa/src/fgas/src/crt/fx_encode.cpp
index 9de79e3649..0f9bb1a5ce 100644
--- a/xfa/src/fgas/src/crt/fx_encode.cpp
+++ b/xfa/src/fgas/src/crt/fx_encode.cpp
@@ -6,7 +6,7 @@
#include "../fgas_base.h"
#include "fx_codepage.h"
-void FX_SwapByteOrder(FX_LPWSTR pStr, int32_t iLength)
+void FX_SwapByteOrder(FX_WCHAR* pStr, int32_t iLength)
{
FXSYS_assert(pStr != NULL);
if (iLength < 0) {
@@ -28,7 +28,7 @@ void FX_SwapByteOrder(FX_LPWSTR pStr, int32_t iLength)
}
}
}
-void FX_SwapByteOrderCopy(FX_LPCWSTR pSrc, FX_LPWSTR pDst, int32_t iLength)
+void FX_SwapByteOrderCopy(const FX_WCHAR* pSrc, FX_WCHAR* pDst, int32_t iLength)
{
FXSYS_assert(pSrc != NULL && pDst != NULL);
if (iLength < 0) {
@@ -50,19 +50,19 @@ void FX_SwapByteOrderCopy(FX_LPCWSTR pSrc, FX_LPWSTR pDst, int32_t iLength)
}
}
}
-void FX_UTF16ToWChar(FX_LPVOID pBuffer, int32_t iLength)
+void FX_UTF16ToWChar(void* pBuffer, int32_t iLength)
{
FXSYS_assert(pBuffer != NULL && iLength > 0);
if (sizeof(FX_WCHAR) == 2) {
return;
}
FX_WORD *pSrc = (FX_WORD*)pBuffer;
- FX_LPWSTR pDst = (FX_LPWSTR)pBuffer;
+ FX_WCHAR* pDst = (FX_WCHAR*)pBuffer;
while (--iLength >= 0) {
pDst[iLength] = (FX_WCHAR)pSrc[iLength];
}
}
-void FX_UTF16ToWCharCopy(const FX_WORD *pUTF16, FX_LPWSTR pWChar, int32_t iLength)
+void FX_UTF16ToWCharCopy(const FX_WORD *pUTF16, FX_WCHAR* pWChar, int32_t iLength)
{
FXSYS_assert(pUTF16 != NULL && pWChar != NULL && iLength > 0);
if (sizeof(FX_WCHAR) == 2) {
@@ -73,19 +73,19 @@ void FX_UTF16ToWCharCopy(const FX_WORD *pUTF16, FX_LPWSTR pWChar, int32_t iLengt
}
}
}
-void FX_WCharToUTF16(FX_LPVOID pBuffer, int32_t iLength)
+void FX_WCharToUTF16(void* pBuffer, int32_t iLength)
{
FXSYS_assert(pBuffer != NULL && iLength > 0);
if (sizeof(FX_WCHAR) == 2) {
return;
}
- FX_LPCWSTR pSrc = (FX_LPCWSTR)pBuffer;
+ const FX_WCHAR* pSrc = (const FX_WCHAR*)pBuffer;
FX_WORD *pDst = (FX_WORD*)pBuffer;
while (--iLength >= 0) {
*pDst++ = (FX_WORD) * pSrc++;
}
}
-void FX_WCharToUTF16Copy(FX_LPCWSTR pWChar, FX_WORD *pUTF16, int32_t iLength)
+void FX_WCharToUTF16Copy(const FX_WCHAR* pWChar, FX_WORD *pUTF16, int32_t iLength)
{
FXSYS_assert(pWChar != NULL && pUTF16 != NULL && iLength > 0);
if (sizeof(FX_WCHAR) == 2) {
@@ -96,22 +96,22 @@ void FX_WCharToUTF16Copy(FX_LPCWSTR pWChar, FX_WORD *pUTF16, int32_t iLength)
}
}
}
-inline FX_DWORD FX_DWordFromBytes(FX_LPCBYTE pStr)
+inline FX_DWORD FX_DWordFromBytes(const uint8_t* pStr)
{
return FXBSTR_ID(pStr[3], pStr[2], pStr[1], pStr[0]);
}
-inline FX_WORD FX_WordFromBytes(FX_LPCBYTE pStr)
+inline FX_WORD FX_WordFromBytes(const uint8_t* pStr)
{
return (pStr[1] << 8 | pStr[0]);
}
-int32_t FX_DecodeString(FX_WORD wCodePage, FX_LPCSTR pSrc, int32_t *pSrcLen, FX_LPWSTR pDst, int32_t *pDstLen, FX_BOOL bErrBreak)
+int32_t FX_DecodeString(FX_WORD wCodePage, const FX_CHAR* pSrc, int32_t *pSrcLen, FX_WCHAR* pDst, int32_t *pDstLen, FX_BOOL bErrBreak)
{
if (wCodePage == FX_CODEPAGE_UTF8) {
return FX_UTF8Decode(pSrc, pSrcLen, pDst, pDstLen);
}
return -1;
}
-int32_t FX_UTF8Decode(FX_LPCSTR pSrc, int32_t *pSrcLen, FX_LPWSTR pDst, int32_t *pDstLen)
+int32_t FX_UTF8Decode(const FX_CHAR* pSrc, int32_t *pSrcLen, FX_WCHAR* pDst, int32_t *pDstLen)
{
if (pSrcLen == NULL || pDstLen == NULL) {
return -1;
diff --git a/xfa/src/fgas/src/crt/fx_memory.cpp b/xfa/src/fgas/src/crt/fx_memory.cpp
index 9645852cb7..6d34a03e0c 100644
--- a/xfa/src/fgas/src/crt/fx_memory.cpp
+++ b/xfa/src/fgas/src/crt/fx_memory.cpp
@@ -74,7 +74,7 @@ void* CFX_StaticStore::Alloc(size_t size)
FXSYS_assert(size != 0);
register FX_LPSTATICSTORECHUNK pChunk = FindChunk(size);
FXSYS_assert(pChunk != NULL && pChunk->iFreeSize >= size);
- register FX_LPBYTE p = (FX_LPBYTE)pChunk;
+ register uint8_t* p = (uint8_t*)pChunk;
p += sizeof(FX_STATICSTORECHUNK) + pChunk->iChunkSize - pChunk->iFreeSize;
pChunk->iFreeSize -= size;
m_iAllocatedSize += size;
@@ -134,7 +134,7 @@ void* CFX_FixedStore::Alloc(size_t size)
pChunk = AllocChunk();
}
FXSYS_assert(pChunk != NULL);
- register FX_LPBYTE pFlags = pChunk->FirstFlag();
+ register uint8_t* pFlags = pChunk->FirstFlag();
register size_t i = 0;
for (; i < pChunk->iChunkSize; i ++)
if (pFlags[i] == 0) {
@@ -150,7 +150,8 @@ void CFX_FixedStore::Free(void* pBlock)
FXSYS_assert(pBlock != NULL);
register FX_LPFIXEDSTORECHUNK pPrior, pChunk;
pPrior = NULL, pChunk = m_pChunk;
- register FX_LPBYTE pStart = NULL, pEnd;
+ uint8_t* pStart = NULL;
+ uint8_t* pEnd;
while (pChunk != NULL) {
pStart = pChunk->FirstBlock();
if (pBlock >= pStart) {
@@ -162,9 +163,9 @@ void CFX_FixedStore::Free(void* pBlock)
pPrior = pChunk, pChunk = pChunk->pNextChunk;
}
FXSYS_assert(pChunk != NULL);
- register size_t iPos = ((FX_LPBYTE)pBlock - pStart) / m_iBlockSize;
+ register size_t iPos = ((uint8_t*)pBlock - pStart) / m_iBlockSize;
FXSYS_assert(iPos < pChunk->iChunkSize);
- register FX_LPBYTE pFlags = pChunk->FirstFlag();
+ register uint8_t* pFlags = pChunk->FirstFlag();
if (pFlags[iPos] == 0) {
return;
}
@@ -279,7 +280,7 @@ void CFX_DynamicStore::Free(void* pBlock)
register FX_LPDYNAMICSTORECHUNK pPriorChunk, pChunk;
pPriorChunk = NULL, pChunk = m_pChunk;
while (pChunk != NULL) {
- if (pBlock > pChunk && pBlock <= ((FX_LPBYTE)pChunk + sizeof(FX_DYNAMICSTORECHUNK) + pChunk->iChunkSize)) {
+ if (pBlock > pChunk && pBlock <= ((uint8_t*)pChunk + sizeof(FX_DYNAMICSTORECHUNK) + pChunk->iChunkSize)) {
break;
}
pPriorChunk = pChunk, pChunk = pChunk->pNextChunk;
diff --git a/xfa/src/fgas/src/crt/fx_memory.h b/xfa/src/fgas/src/crt/fx_memory.h
index fa58429107..9ce8d2f11c 100644
--- a/xfa/src/fgas/src/crt/fx_memory.h
+++ b/xfa/src/fgas/src/crt/fx_memory.h
@@ -66,7 +66,7 @@ public:
FXTARGET_Delete this;
}
virtual void* Alloc(size_t size);
- virtual void Free(FX_LPVOID pBlock) {}
+ virtual void Free(void* pBlock) {}
virtual size_t GetBlockSize() const
{
return 0;
@@ -92,11 +92,11 @@ protected:
#pragma pack(push, 1)
#endif
typedef struct _FX_FIXEDSTORECHUNK {
- FX_LPBYTE FirstFlag() const
+ uint8_t* FirstFlag() const
{
- return (FX_LPBYTE)this + sizeof(_FX_FIXEDSTORECHUNK);
+ return (uint8_t*)this + sizeof(_FX_FIXEDSTORECHUNK);
}
- FX_LPBYTE FirstBlock() const
+ uint8_t* FirstBlock() const
{
return FirstFlag() + iChunkSize;
}
@@ -118,7 +118,7 @@ public:
FXTARGET_Delete this;
}
virtual void* Alloc(size_t size);
- virtual void Free(FX_LPVOID pBlock);
+ virtual void Free(void* pBlock);
virtual size_t GetBlockSize() const
{
return m_iBlockSize;
@@ -146,9 +146,9 @@ typedef struct _FX_DYNAMICSTOREBLOCK {
{
return (_FX_DYNAMICSTOREBLOCK*)(Data() + iBlockSize);
}
- FX_LPBYTE Data() const
+ uint8_t* Data() const
{
- return (FX_LPBYTE)this + sizeof(_FX_DYNAMICSTOREBLOCK);
+ return (uint8_t*)this + sizeof(_FX_DYNAMICSTOREBLOCK);
}
size_t iBlockSize;
FX_BOOL bUsed;
@@ -157,7 +157,7 @@ typedef FX_DYNAMICSTOREBLOCK const * FX_LPCDYNAMICSTOREBLOCK;
typedef struct _FX_DYNAMICSTORECHUNK {
FX_LPDYNAMICSTOREBLOCK FirstBlock() const
{
- return (FX_LPDYNAMICSTOREBLOCK)((FX_LPBYTE)this + sizeof(_FX_DYNAMICSTORECHUNK));
+ return (FX_LPDYNAMICSTOREBLOCK)((uint8_t*)this + sizeof(_FX_DYNAMICSTORECHUNK));
}
_FX_DYNAMICSTORECHUNK* pNextChunk;
size_t iChunkSize;
@@ -177,7 +177,7 @@ public:
FXTARGET_Delete this;
}
virtual void* Alloc(size_t size);
- virtual void Free(FX_LPVOID pBlock);
+ virtual void Free(void* pBlock);
virtual size_t GetBlockSize() const
{
return 0;
diff --git a/xfa/src/fgas/src/crt/fx_stream.cpp b/xfa/src/fgas/src/crt/fx_stream.cpp
index 009cb41f5a..a70fbb6819 100644
--- a/xfa/src/fgas/src/crt/fx_stream.cpp
+++ b/xfa/src/fgas/src/crt/fx_stream.cpp
@@ -66,7 +66,7 @@ IFX_Stream* IFX_Stream::CreateStream(IFX_FileWrite *pFileWrite, FX_DWORD dwAcces
}
return pSR;
}
-IFX_Stream* IFX_Stream::CreateStream(FX_LPCWSTR pszFileName, FX_DWORD dwAccess)
+IFX_Stream* IFX_Stream::CreateStream(const FX_WCHAR* pszFileName, FX_DWORD dwAccess)
{
CFX_Stream *pSR = FX_NEW CFX_Stream;
if (pSR == NULL) {
@@ -86,7 +86,7 @@ IFX_Stream* IFX_Stream::CreateStream(FX_LPCWSTR pszFileName, FX_DWORD dwAccess)
}
return pSR;
}
-IFX_Stream* IFX_Stream::CreateStream(FX_LPBYTE pData, int32_t length, FX_DWORD dwAccess)
+IFX_Stream* IFX_Stream::CreateStream(uint8_t* pData, int32_t length, FX_DWORD dwAccess)
{
CFX_Stream *pSR = FX_NEW CFX_Stream;
if (pSR == NULL) {
@@ -123,7 +123,7 @@ CFX_FileStreamImp::~CFX_FileStreamImp()
FXSYS_fclose(m_hFile);
}
}
-FX_BOOL CFX_FileStreamImp::LoadFile(FX_LPCWSTR pszSrcFileName, FX_DWORD dwAccess)
+FX_BOOL CFX_FileStreamImp::LoadFile(const FX_WCHAR* pszSrcFileName, FX_DWORD dwAccess)
{
FXSYS_assert(m_hFile == NULL);
FXSYS_assert(pszSrcFileName != NULL && FXSYS_wcslen(pszSrcFileName) > 0);
@@ -237,13 +237,13 @@ FX_BOOL CFX_FileStreamImp::IsEOF() const
FXSYS_assert(m_hFile != NULL);
return FXSYS_ftell(m_hFile) >= m_iLength;
}
-int32_t CFX_FileStreamImp::ReadData(FX_LPBYTE pBuffer, int32_t iBufferSize)
+int32_t CFX_FileStreamImp::ReadData(uint8_t* pBuffer, int32_t iBufferSize)
{
FXSYS_assert(m_hFile != NULL);
FXSYS_assert(pBuffer != NULL && iBufferSize > 0);
return FXSYS_fread(pBuffer, 1, iBufferSize, m_hFile);
}
-int32_t CFX_FileStreamImp::ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_BOOL &bEOS)
+int32_t CFX_FileStreamImp::ReadString(FX_WCHAR* pStr, int32_t iMaxLength, FX_BOOL &bEOS)
{
FXSYS_assert(m_hFile != NULL);
FXSYS_assert(pStr != NULL && iMaxLength > 0);
@@ -267,7 +267,7 @@ int32_t CFX_FileStreamImp::ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_BOO
bEOS = (iPosition >= m_iLength);
return iCount;
}
-int32_t CFX_FileStreamImp::WriteData(FX_LPCBYTE pBuffer, int32_t iBufferSize)
+int32_t CFX_FileStreamImp::WriteData(const uint8_t* pBuffer, int32_t iBufferSize)
{
FXSYS_assert(m_hFile != NULL && (m_dwAccess & FX_STREAMACCESS_Write) != 0);
FXSYS_assert(pBuffer != NULL && iBufferSize > 0);
@@ -280,7 +280,7 @@ int32_t CFX_FileStreamImp::WriteData(FX_LPCBYTE pBuffer, int32_t iBufferSize)
}
return iRet;
}
-int32_t CFX_FileStreamImp::WriteString(FX_LPCWSTR pStr, int32_t iLength)
+int32_t CFX_FileStreamImp::WriteString(const FX_WCHAR* pStr, int32_t iLength)
{
FXSYS_assert(m_hFile != NULL && (m_dwAccess & FX_STREAMACCESS_Write) != 0);
FXSYS_assert(pStr != NULL && iLength > 0);
@@ -349,7 +349,7 @@ FX_BOOL CFX_FileReadStreamImp::IsEOF() const
{
return m_iPosition >= m_iLength;
}
-int32_t CFX_FileReadStreamImp::ReadData(FX_LPBYTE pBuffer, int32_t iBufferSize)
+int32_t CFX_FileReadStreamImp::ReadData(uint8_t* pBuffer, int32_t iBufferSize)
{
FXSYS_assert(m_pFileRead != NULL);
FXSYS_assert(pBuffer != NULL && iBufferSize > 0);
@@ -362,11 +362,11 @@ int32_t CFX_FileReadStreamImp::ReadData(FX_LPBYTE pBuffer, int32_t iBufferSize)
}
return 0;
}
-int32_t CFX_FileReadStreamImp::ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_BOOL &bEOS)
+int32_t CFX_FileReadStreamImp::ReadString(FX_WCHAR* pStr, int32_t iMaxLength, FX_BOOL &bEOS)
{
FXSYS_assert(m_pFileRead != NULL);
FXSYS_assert(pStr != NULL && iMaxLength > 0);
- iMaxLength = ReadData((FX_LPBYTE)pStr, iMaxLength * 2) / 2;
+ iMaxLength = ReadData((uint8_t*)pStr, iMaxLength * 2) / 2;
if (iMaxLength <= 0) {
return 0;
}
@@ -441,7 +441,7 @@ FX_BOOL CFX_BufferReadStreamImp::IsEOF() const
{
return m_pBufferRead ? m_pBufferRead->IsEOF() : TRUE;
}
-int32_t CFX_BufferReadStreamImp::ReadData(FX_LPBYTE pBuffer, int32_t iBufferSize)
+int32_t CFX_BufferReadStreamImp::ReadData(uint8_t* pBuffer, int32_t iBufferSize)
{
FXSYS_assert(m_pBufferRead != NULL);
FXSYS_assert(pBuffer != NULL && iBufferSize > 0);
@@ -471,7 +471,7 @@ int32_t CFX_BufferReadStreamImp::ReadData(FX_LPBYTE pBuffer, int32_t iBufferSize
if (m_iPosition < (int32_t)dwBlockOffset || m_iPosition >= (int32_t)(dwBlockOffset + dwBlockSize)) {
return 0;
}
- FX_LPCBYTE pBufferTmp = m_pBufferRead->GetBlockBuffer();
+ const uint8_t* pBufferTmp = m_pBufferRead->GetBlockBuffer();
FX_DWORD dwOffsetTmp = m_iPosition - dwBlockOffset;
FX_DWORD dwCopySize = FX_MIN(iBufferSize, (int32_t)(dwBlockSize - dwOffsetTmp));
FXSYS_memcpy(pBuffer, pBufferTmp + dwOffsetTmp, dwCopySize);
@@ -492,11 +492,11 @@ int32_t CFX_BufferReadStreamImp::ReadData(FX_LPBYTE pBuffer, int32_t iBufferSize
m_iPosition += dwOffsetTmp;
return dwOffsetTmp;
}
-int32_t CFX_BufferReadStreamImp::ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_BOOL &bEOS)
+int32_t CFX_BufferReadStreamImp::ReadString(FX_WCHAR* pStr, int32_t iMaxLength, FX_BOOL &bEOS)
{
FXSYS_assert(m_pBufferRead != NULL);
FXSYS_assert(pStr != NULL && iMaxLength > 0);
- iMaxLength = ReadData((FX_LPBYTE)pStr, iMaxLength * 2) / 2;
+ iMaxLength = ReadData((uint8_t*)pStr, iMaxLength * 2) / 2;
if (iMaxLength <= 0) {
return 0;
}
@@ -556,7 +556,7 @@ FX_BOOL CFX_FileWriteStreamImp::IsEOF() const
{
return m_iPosition >= GetLength();
}
-int32_t CFX_FileWriteStreamImp::WriteData(FX_LPCBYTE pBuffer, int32_t iBufferSize)
+int32_t CFX_FileWriteStreamImp::WriteData(const uint8_t* pBuffer, int32_t iBufferSize)
{
if (!m_pFileWrite) {
return 0;
@@ -566,9 +566,9 @@ int32_t CFX_FileWriteStreamImp::WriteData(FX_LPCBYTE pBuffer, int32_t iBufferSiz
}
return iBufferSize;
}
-int32_t CFX_FileWriteStreamImp::WriteString(FX_LPCWSTR pStr, int32_t iLength)
+int32_t CFX_FileWriteStreamImp::WriteString(const FX_WCHAR* pStr, int32_t iLength)
{
- return WriteData((FX_LPCBYTE)pStr, iLength * sizeof(FX_WCHAR));
+ return WriteData((const uint8_t*)pStr, iLength * sizeof(FX_WCHAR));
}
void CFX_FileWriteStreamImp::Flush()
{
@@ -584,7 +584,7 @@ CFX_BufferStreamImp::CFX_BufferStreamImp()
, m_iLength(0)
{
}
-FX_BOOL CFX_BufferStreamImp::LoadBuffer(FX_LPBYTE pData, int32_t iTotalSize, FX_DWORD dwAccess)
+FX_BOOL CFX_BufferStreamImp::LoadBuffer(uint8_t* pData, int32_t iTotalSize, FX_DWORD dwAccess)
{
FXSYS_assert(m_pData == NULL);
FXSYS_assert(pData != NULL && iTotalSize > 0);
@@ -628,7 +628,7 @@ FX_BOOL CFX_BufferStreamImp::IsEOF() const
FXSYS_assert(m_pData != NULL);
return m_iPosition >= m_iLength;
}
-int32_t CFX_BufferStreamImp::ReadData(FX_LPBYTE pBuffer, int32_t iBufferSize)
+int32_t CFX_BufferStreamImp::ReadData(uint8_t* pBuffer, int32_t iBufferSize)
{
FXSYS_assert(m_pData != NULL);
FXSYS_assert(pBuffer != NULL && iBufferSize > 0);
@@ -640,7 +640,7 @@ int32_t CFX_BufferStreamImp::ReadData(FX_LPBYTE pBuffer, int32_t iBufferSize)
m_iPosition += iLen;
return iLen;
}
-int32_t CFX_BufferStreamImp::ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_BOOL &bEOS)
+int32_t CFX_BufferStreamImp::ReadString(FX_WCHAR* pStr, int32_t iMaxLength, FX_BOOL &bEOS)
{
FXSYS_assert(m_pData != NULL);
FXSYS_assert(pStr != NULL && iMaxLength > 0);
@@ -648,7 +648,7 @@ int32_t CFX_BufferStreamImp::ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_B
if (iLen <= 0) {
return 0;
}
- FX_LPCWSTR pSrc = (FX_LPCWSTR)(FX_LPSTR)(m_pData + m_iPosition);
+ const FX_WCHAR* pSrc = (const FX_WCHAR*)(FX_CHAR*)(m_pData + m_iPosition);
int32_t iCount = 0;
while (*pSrc != L'\0' && iCount < iLen) {
*pStr ++ = *pSrc ++, iCount ++;
@@ -657,7 +657,7 @@ int32_t CFX_BufferStreamImp::ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_B
bEOS = (*pSrc == L'\0') || (m_iPosition >= m_iLength);
return iCount;
}
-int32_t CFX_BufferStreamImp::WriteData(FX_LPCBYTE pBuffer, int32_t iBufferSize)
+int32_t CFX_BufferStreamImp::WriteData(const uint8_t* pBuffer, int32_t iBufferSize)
{
FXSYS_assert(m_pData != NULL && (m_dwAccess & FX_STREAMACCESS_Write) != 0);
FXSYS_assert(pBuffer != NULL && iBufferSize > 0);
@@ -672,7 +672,7 @@ int32_t CFX_BufferStreamImp::WriteData(FX_LPCBYTE pBuffer, int32_t iBufferSize)
}
return iLen;
}
-int32_t CFX_BufferStreamImp::WriteString(FX_LPCWSTR pStr, int32_t iLength)
+int32_t CFX_BufferStreamImp::WriteString(const FX_WCHAR* pStr, int32_t iLength)
{
FXSYS_assert(m_pData != NULL && (m_dwAccess & FX_STREAMACCESS_Write) != 0);
FXSYS_assert(pStr != NULL && iLength > 0);
@@ -720,7 +720,7 @@ void CFX_TextStream::InitStream()
{
int32_t iPosition = m_pStreamImp->GetPosition();
m_pStreamImp->Seek(FX_STREAMSEEK_Begin, 0);
- m_pStreamImp->ReadData((FX_LPBYTE)&m_dwBOM, 3);
+ m_pStreamImp->ReadData((uint8_t*)&m_dwBOM, 3);
#if _FX_ENDIAN_ == _FX_LITTLE_ENDIAN_
m_dwBOM &= 0x00FFFFFF;
if (m_dwBOM == 0x00BFBBEF) {
@@ -793,11 +793,11 @@ FX_BOOL CFX_TextStream::IsEOF() const
{
return m_pStreamImp->IsEOF();
}
-int32_t CFX_TextStream::ReadData(FX_LPBYTE pBuffer, int32_t iBufferSize)
+int32_t CFX_TextStream::ReadData(uint8_t* pBuffer, int32_t iBufferSize)
{
return m_pStreamImp->ReadData(pBuffer, iBufferSize);
}
-int32_t CFX_TextStream::WriteData(FX_LPCBYTE pBuffer, int32_t iBufferSize)
+int32_t CFX_TextStream::WriteData(const uint8_t* pBuffer, int32_t iBufferSize)
{
return m_pStreamImp->WriteData(pBuffer, iBufferSize);
}
@@ -846,7 +846,7 @@ FX_WORD CFX_TextStream::SetCodePage(FX_WORD wCodePage)
m_wCodePage = wCodePage;
return v;
}
-int32_t CFX_TextStream::ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_BOOL &bEOS, int32_t const *pByteSize)
+int32_t CFX_TextStream::ReadString(FX_WCHAR* pStr, int32_t iMaxLength, FX_BOOL &bEOS, int32_t const *pByteSize)
{
FXSYS_assert(pStr != NULL && iMaxLength > 0);
if (m_pStreamImp == NULL) {
@@ -856,7 +856,7 @@ int32_t CFX_TextStream::ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_BOOL &
if (m_wCodePage == FX_CODEPAGE_UTF16LE || m_wCodePage == FX_CODEPAGE_UTF16BE) {
int32_t iBytes = pByteSize == NULL ? iMaxLength * 2 : *pByteSize;
m_pStreamImp->Lock();
- iLen = m_pStreamImp->ReadData((FX_LPBYTE)pStr, iBytes);
+ iLen = m_pStreamImp->ReadData((uint8_t*)pStr, iBytes);
m_pStreamImp->Unlock();
iMaxLength = iLen / 2;
if (sizeof(FX_WCHAR) > 2) {
@@ -877,16 +877,16 @@ int32_t CFX_TextStream::ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_BOOL &
iBytes = FX_MIN(iBytes, m_pStreamImp->GetLength() - pos);
if (iBytes > 0) {
if (m_pBuf == NULL) {
- m_pBuf = (FX_LPBYTE)FX_Alloc(uint8_t, iBytes);
+ m_pBuf = (uint8_t*)FX_Alloc(uint8_t, iBytes);
m_iBufSize = iBytes;
} else if (iBytes > m_iBufSize) {
- m_pBuf = (FX_LPBYTE)FX_Realloc(uint8_t, m_pBuf, iBytes);
+ m_pBuf = (uint8_t*)FX_Realloc(uint8_t, m_pBuf, iBytes);
m_iBufSize = iBytes;
}
m_pStreamImp->Lock();
iLen = m_pStreamImp->ReadData(m_pBuf, iBytes);
int32_t iSrc = iLen;
- int32_t iDecode = FX_DecodeString(m_wCodePage, (FX_LPCSTR)m_pBuf, &iSrc, pStr, &iMaxLength, TRUE);
+ int32_t iDecode = FX_DecodeString(m_wCodePage, (const FX_CHAR*)m_pBuf, &iSrc, pStr, &iMaxLength, TRUE);
m_pStreamImp->Seek(FX_STREAMSEEK_Current, iSrc - iLen);
m_pStreamImp->Unlock();
if (iDecode < 1) {
@@ -899,7 +899,7 @@ int32_t CFX_TextStream::ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_BOOL &
bEOS = m_pStreamImp->IsEOF();
return iMaxLength;
}
-int32_t CFX_TextStream::WriteString(FX_LPCWSTR pStr, int32_t iLength)
+int32_t CFX_TextStream::WriteString(const FX_WCHAR* pStr, int32_t iLength)
{
FXSYS_assert(pStr != NULL && iLength > 0);
if ((m_pStreamImp->GetAccessModes() & FX_STREAMACCESS_Write) == 0) {
@@ -913,7 +913,7 @@ int32_t CFX_TextStream::WriteString(FX_LPCWSTR pStr, int32_t iLength)
}
CFX_ByteStringC bsResult = encoder.GetResult();
m_pStreamImp->Lock();
- m_pStreamImp->WriteData((FX_LPCBYTE)bsResult.GetCStr(), bsResult.GetLength());
+ m_pStreamImp->WriteData((const uint8_t*)bsResult.GetCStr(), bsResult.GetLength());
m_pStreamImp->Unlock();
}
return iLength;
@@ -935,7 +935,7 @@ CFX_Stream::~CFX_Stream()
m_pStreamImp->Release();
}
}
-FX_BOOL CFX_Stream::LoadFile(FX_LPCWSTR pszSrcFileName, FX_DWORD dwAccess)
+FX_BOOL CFX_Stream::LoadFile(const FX_WCHAR* pszSrcFileName, FX_DWORD dwAccess)
{
if (m_eStreamType != FX_SREAMTYPE_Unknown || m_pStreamImp != NULL) {
return FALSE;
@@ -1004,7 +1004,7 @@ FX_BOOL CFX_Stream::LoadFileWrite(IFX_FileWrite *pFileWrite, FX_DWORD dwAccess)
}
return bRet;
}
-FX_BOOL CFX_Stream::LoadBuffer(FX_LPBYTE pData, int32_t iTotalSize, FX_DWORD dwAccess)
+FX_BOOL CFX_Stream::LoadBuffer(uint8_t* pData, int32_t iTotalSize, FX_DWORD dwAccess)
{
if (m_eStreamType != FX_SREAMTYPE_Unknown || m_pStreamImp != NULL) {
return FALSE;
@@ -1116,7 +1116,7 @@ FX_BOOL CFX_Stream::IsEOF() const
}
return m_iPosition >= m_iStart + m_iLength;
}
-int32_t CFX_Stream::ReadData(FX_LPBYTE pBuffer, int32_t iBufferSize)
+int32_t CFX_Stream::ReadData(uint8_t* pBuffer, int32_t iBufferSize)
{
FXSYS_assert(pBuffer != NULL && iBufferSize > 0);
if (m_pStreamImp == NULL) {
@@ -1135,7 +1135,7 @@ int32_t CFX_Stream::ReadData(FX_LPBYTE pBuffer, int32_t iBufferSize)
m_pStreamImp->Unlock();
return iLen;
}
-int32_t CFX_Stream::ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_BOOL &bEOS, int32_t const *pByteSize)
+int32_t CFX_Stream::ReadString(FX_WCHAR* pStr, int32_t iMaxLength, FX_BOOL &bEOS, int32_t const *pByteSize)
{
FXSYS_assert(pStr != NULL && iMaxLength > 0);
if (m_pStreamImp == NULL) {
@@ -1162,7 +1162,7 @@ int32_t CFX_Stream::ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_BOOL &bEOS
m_pStreamImp->Unlock();
return iLen;
}
-int32_t CFX_Stream::WriteData(FX_LPCBYTE pBuffer, int32_t iBufferSize)
+int32_t CFX_Stream::WriteData(const uint8_t* pBuffer, int32_t iBufferSize)
{
FXSYS_assert(pBuffer != NULL && iBufferSize > 0);
if (m_pStreamImp == NULL) {
@@ -1191,7 +1191,7 @@ int32_t CFX_Stream::WriteData(FX_LPCBYTE pBuffer, int32_t iBufferSize)
m_pStreamImp->Unlock();
return iLen;
}
-int32_t CFX_Stream::WriteString(FX_LPCWSTR pStr, int32_t iLength)
+int32_t CFX_Stream::WriteString(const FX_WCHAR* pStr, int32_t iLength)
{
FXSYS_assert(pStr != NULL && iLength > 0);
if (m_pStreamImp == NULL) {
@@ -1326,7 +1326,7 @@ FX_BOOL CFGAS_FileRead::ReadBlock(void* buffer, FX_FILESIZE offset, size_t size)
{
m_pStream->Lock();
m_pStream->Seek(FX_STREAMSEEK_Begin, (int32_t)offset);
- int32_t iLen = m_pStream->ReadData((FX_LPBYTE)buffer, (int32_t)size);
+ int32_t iLen = m_pStream->ReadData((uint8_t*)buffer, (int32_t)size);
m_pStream->Unlock();
return iLen == (int32_t)size;
}
@@ -1351,7 +1351,7 @@ FX_BOOL CFGAS_FileRead::ReadBlock(void* buffer, FX_DWORD offset, FX_DWORD size)
{
m_pStream->Lock();
m_pStream->Seek(FX_STREAMSEEK_Begin, (int32_t)offset);
- int32_t iLen = m_pStream->ReadData((FX_LPBYTE)buffer, (int32_t)size);
+ int32_t iLen = m_pStream->ReadData((uint8_t*)buffer, (int32_t)size);
m_pStream->Unlock();
return iLen == (int32_t)size;
}
@@ -1426,7 +1426,7 @@ FX_BOOL CFX_BufferAccImp::ReadBlock(void* buffer, FX_FILESIZE offset, size_t siz
if (offset < dwBlockOffset || offset >= (FX_FILESIZE)(dwBlockOffset + dwBlockSize)) {
return FALSE;
}
- FX_LPCBYTE pBuffer = m_pBufferRead->GetBlockBuffer();
+ const uint8_t* pBuffer = m_pBufferRead->GetBlockBuffer();
FX_FILESIZE dwOffset = offset - dwBlockOffset;
size_t dwCopySize = FX_MIN(size, dwBlockSize - dwOffset);
FXSYS_memcpy(buffer, pBuffer + dwOffset, dwCopySize);
@@ -1440,7 +1440,7 @@ FX_BOOL CFX_BufferAccImp::ReadBlock(void* buffer, FX_FILESIZE offset, size_t siz
dwBlockSize = m_pBufferRead->GetBlockSize();
pBuffer = m_pBufferRead->GetBlockBuffer();
dwCopySize = FX_MIN(size, dwBlockSize);
- FXSYS_memcpy(((FX_LPBYTE)buffer) + offset, pBuffer, dwCopySize);
+ FXSYS_memcpy(((uint8_t*)buffer) + offset, pBuffer, dwCopySize);
offset += dwCopySize;
size -= dwCopySize;
}
@@ -1516,7 +1516,7 @@ FX_BOOL CFX_BufferAccImp::ReadBlock(void* buffer, FX_DWORD offset, FX_DWORD size
if (offset < dwBlockOffset || offset >= (FX_DWORD)(dwBlockOffset + dwBlockSize)) {
return FALSE;
}
- FX_LPCBYTE pBuffer = m_pBufferRead->GetBlockBuffer();
+ const uint8_t* pBuffer = m_pBufferRead->GetBlockBuffer();
FX_DWORD dwOffset = offset - dwBlockOffset;
FX_DWORD dwCopySize = FX_MIN(size, dwBlockSize - dwOffset);
FXSYS_memcpy(buffer, pBuffer + dwOffset, dwCopySize);
@@ -1530,7 +1530,7 @@ FX_BOOL CFX_BufferAccImp::ReadBlock(void* buffer, FX_DWORD offset, FX_DWORD size
dwBlockSize = m_pBufferRead->GetBlockSize();
pBuffer = m_pBufferRead->GetBlockBuffer();
dwCopySize = FX_MIN(size, dwBlockSize);
- FXSYS_memcpy(((FX_LPBYTE)buffer) + offset, pBuffer, dwCopySize);
+ FXSYS_memcpy(((uint8_t*)buffer) + offset, pBuffer, dwCopySize);
offset += dwCopySize;
size -= dwCopySize;
}
@@ -1566,13 +1566,13 @@ FX_BOOL CFGAS_FileWrite::Flush()
}
FX_BOOL CFGAS_FileWrite::WriteBlock(const void* pData, size_t size)
{
- return m_pStream->WriteData((FX_LPCBYTE)pData, (int32_t)size) == (int32_t)size;
+ return m_pStream->WriteData((const uint8_t*)pData, (int32_t)size) == (int32_t)size;
}
FX_BOOL CFGAS_FileWrite::WriteBlock(const void* pData, FX_FILESIZE offset, size_t size)
{
m_pStream->Lock();
m_pStream->Seek(FX_STREAMSEEK_Begin, offset);
- int32_t iLen = m_pStream->WriteData((FX_LPBYTE)pData, (int32_t)size);
+ int32_t iLen = m_pStream->WriteData((uint8_t*)pData, (int32_t)size);
m_pStream->Unlock();
return iLen == (int32_t)size;
}
@@ -1600,13 +1600,13 @@ FX_DWORD CFGAS_FileWrite::Flush()
}
FX_BOOL CFGAS_FileWrite::WriteBlock(const void* pData, FX_DWORD size)
{
- return m_pStream->WriteData((FX_LPCBYTE)pData, (int32_t)size) == (int32_t)size;
+ return m_pStream->WriteData((const uint8_t*)pData, (int32_t)size) == (int32_t)size;
}
FX_BOOL CFGAS_FileWrite::WriteBlock(const void* pData, FX_DWORD offset, FX_DWORD size)
{
m_pStream->Lock();
m_pStream->Seek(FX_STREAMSEEK_Begin, offset);
- int32_t iLen = m_pStream->WriteData((FX_LPBYTE)pData, (int32_t)size);
+ int32_t iLen = m_pStream->WriteData((uint8_t*)pData, (int32_t)size);
m_pStream->Unlock();
return iLen == (int32_t)size;
}
diff --git a/xfa/src/fgas/src/crt/fx_stream.h b/xfa/src/fgas/src/crt/fx_stream.h
index 2273ab1d9b..d89731b4ec 100644
--- a/xfa/src/fgas/src/crt/fx_stream.h
+++ b/xfa/src/fgas/src/crt/fx_stream.h
@@ -32,10 +32,10 @@ public:
virtual int32_t Seek(FX_STREAMSEEK eSeek, int32_t iOffset) = 0;
virtual int32_t GetPosition() = 0;
virtual FX_BOOL IsEOF() const = 0;
- virtual int32_t ReadData(FX_LPBYTE pBuffer, int32_t iBufferSize) = 0;
- virtual int32_t ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_BOOL &bEOS) = 0;
- virtual int32_t WriteData(FX_LPCBYTE pBuffer, int32_t iBufferSize) = 0;
- virtual int32_t WriteString(FX_LPCWSTR pStr, int32_t iLength) = 0;
+ virtual int32_t ReadData(uint8_t* pBuffer, int32_t iBufferSize) = 0;
+ virtual int32_t ReadString(FX_WCHAR* pStr, int32_t iMaxLength, FX_BOOL &bEOS) = 0;
+ virtual int32_t WriteData(const uint8_t* pBuffer, int32_t iBufferSize) = 0;
+ virtual int32_t WriteString(const FX_WCHAR* pStr, int32_t iLength) = 0;
virtual void Flush() = 0;
virtual FX_BOOL SetLength(int32_t iLength) = 0;
protected:
@@ -48,15 +48,15 @@ class CFX_FileStreamImp : public CFX_StreamImp
public:
CFX_FileStreamImp();
virtual ~CFX_FileStreamImp();
- FX_BOOL LoadFile(FX_LPCWSTR pszSrcFileName, FX_DWORD dwAccess);
+ FX_BOOL LoadFile(const FX_WCHAR* pszSrcFileName, FX_DWORD dwAccess);
virtual int32_t GetLength() const;
virtual int32_t Seek(FX_STREAMSEEK eSeek, int32_t iOffset);
virtual int32_t GetPosition();
virtual FX_BOOL IsEOF() const;
- virtual int32_t ReadData(FX_LPBYTE pBuffer, int32_t iBufferSize);
- virtual int32_t ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_BOOL &bEOS);
- virtual int32_t WriteData(FX_LPCBYTE pBuffer, int32_t iBufferSize);
- virtual int32_t WriteString(FX_LPCWSTR pStr, int32_t iLength);
+ virtual int32_t ReadData(uint8_t* pBuffer, int32_t iBufferSize);
+ virtual int32_t ReadString(FX_WCHAR* pStr, int32_t iMaxLength, FX_BOOL &bEOS);
+ virtual int32_t WriteData(const uint8_t* pBuffer, int32_t iBufferSize);
+ virtual int32_t WriteString(const FX_WCHAR* pStr, int32_t iLength);
virtual void Flush();
virtual FX_BOOL SetLength(int32_t iLength);
protected:
@@ -68,22 +68,22 @@ class CFX_BufferStreamImp : public CFX_StreamImp
public:
CFX_BufferStreamImp();
virtual ~CFX_BufferStreamImp() {}
- FX_BOOL LoadBuffer(FX_LPBYTE pData, int32_t iTotalSize, FX_DWORD dwAccess);
+ FX_BOOL LoadBuffer(uint8_t* pData, int32_t iTotalSize, FX_DWORD dwAccess);
virtual int32_t GetLength() const;
virtual int32_t Seek(FX_STREAMSEEK eSeek, int32_t iOffset);
virtual int32_t GetPosition();
virtual FX_BOOL IsEOF() const;
- virtual int32_t ReadData(FX_LPBYTE pBuffer, int32_t iBufferSize);
- virtual int32_t ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_BOOL &bEOS);
- virtual int32_t WriteData(FX_LPCBYTE pBuffer, int32_t iBufferSize);
- virtual int32_t WriteString(FX_LPCWSTR pStr, int32_t iLength);
+ virtual int32_t ReadData(uint8_t* pBuffer, int32_t iBufferSize);
+ virtual int32_t ReadString(FX_WCHAR* pStr, int32_t iMaxLength, FX_BOOL &bEOS);
+ virtual int32_t WriteData(const uint8_t* pBuffer, int32_t iBufferSize);
+ virtual int32_t WriteString(const FX_WCHAR* pStr, int32_t iLength);
virtual void Flush() {}
virtual FX_BOOL SetLength(int32_t iLength)
{
return FALSE;
}
protected:
- FX_LPBYTE m_pData;
+ uint8_t* m_pData;
int32_t m_iTotalSize;
int32_t m_iPosition;
int32_t m_iLength;
@@ -102,13 +102,13 @@ public:
}
virtual FX_BOOL IsEOF() const;
- virtual int32_t ReadData(FX_LPBYTE pBuffer, int32_t iBufferSize);
- virtual int32_t ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_BOOL &bEOS);
- virtual int32_t WriteData(FX_LPCBYTE pBuffer, int32_t iBufferSize)
+ virtual int32_t ReadData(uint8_t* pBuffer, int32_t iBufferSize);
+ virtual int32_t ReadString(FX_WCHAR* pStr, int32_t iMaxLength, FX_BOOL &bEOS);
+ virtual int32_t WriteData(const uint8_t* pBuffer, int32_t iBufferSize)
{
return 0;
}
- virtual int32_t WriteString(FX_LPCWSTR pStr, int32_t iLength)
+ virtual int32_t WriteString(const FX_WCHAR* pStr, int32_t iLength)
{
return 0;
}
@@ -137,13 +137,13 @@ public:
}
virtual FX_BOOL IsEOF() const;
- virtual int32_t ReadData(FX_LPBYTE pBuffer, int32_t iBufferSize);
- virtual int32_t ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_BOOL &bEOS);
- virtual int32_t WriteData(FX_LPCBYTE pBuffer, int32_t iBufferSize)
+ virtual int32_t ReadData(uint8_t* pBuffer, int32_t iBufferSize);
+ virtual int32_t ReadString(FX_WCHAR* pStr, int32_t iMaxLength, FX_BOOL &bEOS);
+ virtual int32_t WriteData(const uint8_t* pBuffer, int32_t iBufferSize)
{
return 0;
}
- virtual int32_t WriteString(FX_LPCWSTR pStr, int32_t iLength)
+ virtual int32_t WriteString(const FX_WCHAR* pStr, int32_t iLength)
{
return 0;
}
@@ -171,16 +171,16 @@ public:
return m_iPosition;
}
virtual FX_BOOL IsEOF() const;
- virtual int32_t ReadData(FX_LPBYTE pBuffer, int32_t iBufferSize)
+ virtual int32_t ReadData(uint8_t* pBuffer, int32_t iBufferSize)
{
return 0;
}
- virtual int32_t ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_BOOL &bEOS)
+ virtual int32_t ReadString(FX_WCHAR* pStr, int32_t iMaxLength, FX_BOOL &bEOS)
{
return 0;
}
- virtual int32_t WriteData(FX_LPCBYTE pBuffer, int32_t iBufferSize);
- virtual int32_t WriteString(FX_LPCWSTR pStr, int32_t iLength);
+ virtual int32_t WriteData(const uint8_t* pBuffer, int32_t iBufferSize);
+ virtual int32_t WriteString(const FX_WCHAR* pStr, int32_t iLength);
virtual void Flush();
virtual FX_BOOL SetLength(int32_t iLength)
{
@@ -202,8 +202,8 @@ class CFX_Stream : public IFX_Stream, public CFX_ThreadLock
public:
CFX_Stream();
~CFX_Stream();
- FX_BOOL LoadFile(FX_LPCWSTR pszSrcFileName, FX_DWORD dwAccess);
- FX_BOOL LoadBuffer(FX_LPBYTE pData, int32_t iTotalSize, FX_DWORD dwAccess);
+ FX_BOOL LoadFile(const FX_WCHAR* pszSrcFileName, FX_DWORD dwAccess);
+ FX_BOOL LoadBuffer(uint8_t* pData, int32_t iTotalSize, FX_DWORD dwAccess);
FX_BOOL LoadFileRead(IFX_FileRead *pFileRead, FX_DWORD dwAccess);
FX_BOOL LoadFileWrite(IFX_FileWrite *pFileWrite, FX_DWORD dwAccess);
FX_BOOL LoadBufferRead(IFX_BufferRead *pBufferRead, int32_t iFileSize, FX_DWORD dwAccess, FX_BOOL bReleaseBufferRead);
@@ -217,10 +217,10 @@ public:
virtual int32_t Seek(FX_STREAMSEEK eSeek, int32_t iOffset);
virtual int32_t GetPosition();
virtual FX_BOOL IsEOF() const;
- virtual int32_t ReadData(FX_LPBYTE pBuffer, int32_t iBufferSize);
- virtual int32_t ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_BOOL &bEOS, int32_t const *pByteSize = NULL);
- virtual int32_t WriteData(FX_LPCBYTE pBuffer, int32_t iBufferSize);
- virtual int32_t WriteString(FX_LPCWSTR pStr, int32_t iLength);
+ virtual int32_t ReadData(uint8_t* pBuffer, int32_t iBufferSize);
+ virtual int32_t ReadString(FX_WCHAR* pStr, int32_t iMaxLength, FX_BOOL &bEOS, int32_t const *pByteSize = NULL);
+ virtual int32_t WriteData(const uint8_t* pBuffer, int32_t iBufferSize);
+ virtual int32_t WriteString(const FX_WCHAR* pStr, int32_t iLength);
virtual void Flush();
virtual FX_BOOL SetLength(int32_t iLength);
virtual int32_t GetBOM(uint8_t bom[4]) const;
@@ -259,10 +259,10 @@ public:
virtual int32_t GetPosition();
virtual FX_BOOL IsEOF() const;
- virtual int32_t ReadData(FX_LPBYTE pBuffer, int32_t iBufferSize);
- virtual int32_t ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_BOOL &bEOS, int32_t const *pByteSize = NULL);
- virtual int32_t WriteData(FX_LPCBYTE pBuffer, int32_t iBufferSize);
- virtual int32_t WriteString(FX_LPCWSTR pStr, int32_t iLength);
+ virtual int32_t ReadData(uint8_t* pBuffer, int32_t iBufferSize);
+ virtual int32_t ReadString(FX_WCHAR* pStr, int32_t iMaxLength, FX_BOOL &bEOS, int32_t const *pByteSize = NULL);
+ virtual int32_t WriteData(const uint8_t* pBuffer, int32_t iBufferSize);
+ virtual int32_t WriteString(const FX_WCHAR* pStr, int32_t iLength);
virtual void Flush();
virtual FX_BOOL SetLength(int32_t iLength);
@@ -284,7 +284,7 @@ protected:
FX_WORD m_wCodePage;
FX_WORD m_wBOMLength;
FX_DWORD m_dwBOM;
- FX_LPBYTE m_pBuf;
+ uint8_t* m_pBuf;
int32_t m_iBufSize;
FX_BOOL m_bDelStream;
IFX_Stream *m_pStreamImp;
diff --git a/xfa/src/fgas/src/crt/fx_system.cpp b/xfa/src/fgas/src/crt/fx_system.cpp
index 88f1631b7f..843e29c447 100644
--- a/xfa/src/fgas/src/crt/fx_system.cpp
+++ b/xfa/src/fgas/src/crt/fx_system.cpp
@@ -21,7 +21,7 @@ FX_FLOAT FX_log(FX_FLOAT b, FX_FLOAT x)
{
return FXSYS_log(x) / FXSYS_log(b);
}
-FX_LPWSTR FX_wcsncpy(FX_LPWSTR dstStr, FX_LPCWSTR srcStr, size_t count)
+FX_WCHAR* FX_wcsncpy(FX_WCHAR* dstStr, const FX_WCHAR* srcStr, size_t count)
{
FXSYS_assert(dstStr != NULL && srcStr != NULL && count > 0);
for (size_t i = 0; i < count; ++i)
@@ -30,7 +30,7 @@ FX_LPWSTR FX_wcsncpy(FX_LPWSTR dstStr, FX_LPCWSTR srcStr, size_t count)
}
return dstStr;
}
-int32_t FX_wcsnicmp(FX_LPCWSTR s1, FX_LPCWSTR s2, size_t count)
+int32_t FX_wcsnicmp(const FX_WCHAR* s1, const FX_WCHAR* s2, size_t count)
{
FXSYS_assert(s1 != NULL && s2 != NULL && count > 0);
FX_WCHAR wch1 = 0, wch2 = 0;
@@ -43,7 +43,7 @@ int32_t FX_wcsnicmp(FX_LPCWSTR s1, FX_LPCWSTR s2, size_t count)
}
return wch1 - wch2;
}
-int32_t FX_strnicmp(FX_LPCSTR s1, FX_LPCSTR s2, size_t count)
+int32_t FX_strnicmp(const FX_CHAR* s1, const FX_CHAR* s2, size_t count)
{
FXSYS_assert(s1 != NULL && s2 != NULL && count > 0);
FX_CHAR ch1 = 0, ch2 = 0;
@@ -85,7 +85,7 @@ FX_BOOL FX_fsetsize(FXSYS_FILE *file, int32_t size)
return FALSE;
#endif
}
-FX_FLOAT FX_strtof(FX_LPCSTR pcsStr, int32_t iLength , int32_t *pUsedLen )
+FX_FLOAT FX_strtof(const FX_CHAR* pcsStr, int32_t iLength , int32_t *pUsedLen )
{
FXSYS_assert(pcsStr != NULL);
if (iLength < 0) {
@@ -93,7 +93,7 @@ FX_FLOAT FX_strtof(FX_LPCSTR pcsStr, int32_t iLength , int32_t *pUsedLen )
}
return FX_wcstof(CFX_WideString::FromLocal(pcsStr, iLength), iLength, pUsedLen);
}
-FX_FLOAT FX_wcstof(FX_LPCWSTR pwsStr, int32_t iLength , int32_t *pUsedLen )
+FX_FLOAT FX_wcstof(const FX_WCHAR* pwsStr, int32_t iLength , int32_t *pUsedLen )
{
FXSYS_assert(pwsStr != NULL);
if (iLength < 0) {
@@ -138,7 +138,7 @@ FX_FLOAT FX_wcstof(FX_LPCWSTR pwsStr, int32_t iLength , int32_t *pUsedLen )
}
return bNegtive ? -fValue : fValue;
}
-void FX_memset(FX_LPVOID pBuf, int32_t iValue, size_t size)
+void FX_memset(void* pBuf, int32_t iValue, size_t size)
{
FXSYS_assert(pBuf != NULL && size > 0 && (size & 0x03) == 0);
FXSYS_assert((((size_t)pBuf) & 0x03) == 0);
@@ -148,7 +148,7 @@ void FX_memset(FX_LPVOID pBuf, int32_t iValue, size_t size)
*pStart ++ = iValue;
}
}
-void FX_memcpy(FX_LPVOID pDst, FX_LPCVOID pSrc, size_t size)
+void FX_memcpy(void* pDst, const void* pSrc, size_t size)
{
FXSYS_assert(pDst != NULL && pSrc != NULL && size > 0 && (size & 0x03) == 0);
FXSYS_assert((((size_t)pDst) & 0x03) == 0 && (((size_t)pSrc) & 0x03) == 0);
@@ -177,8 +177,8 @@ FX_BOOL FX_JoinPath(const CFX_WideStringC &wsBasePath, const CFX_WideStringC &ws
wsAbsolutePath = wsRelativePath;
return TRUE;
}
- FX_LPCWSTR pRelStart = wsRelativePath.GetPtr();
- FX_LPCWSTR pRelEnd = pRelStart + wsRelativePath.GetLength();
+ const FX_WCHAR* pRelStart = wsRelativePath.GetPtr();
+ const FX_WCHAR* pRelEnd = pRelStart + wsRelativePath.GetLength();
if (pRelStart < pRelEnd) {
switch (*pRelStart) {
case '#':
@@ -211,8 +211,8 @@ FX_BOOL FX_JoinPath(const CFX_WideStringC &wsBasePath, const CFX_WideStringC &ws
return FALSE;
}
}
- FX_LPCWSTR pBaseStart = wsBasePath.GetPtr();
- FX_LPCWSTR pBaseEnd = pBaseStart + wsBasePath.GetLength();
+ const FX_WCHAR* pBaseStart = wsBasePath.GetPtr();
+ const FX_WCHAR* pBaseEnd = pBaseStart + wsBasePath.GetLength();
while(pBaseStart < (--pBaseEnd) && *pBaseEnd != '/' && *pBaseEnd != '\\')
;
if (pBaseStart == pBaseEnd) {
diff --git a/xfa/src/fgas/src/crt/fx_utils.cpp b/xfa/src/fgas/src/crt/fx_utils.cpp
index 55d97f0ea6..85f650b1d1 100644
--- a/xfa/src/fgas/src/crt/fx_utils.cpp
+++ b/xfa/src/fgas/src/crt/fx_utils.cpp
@@ -24,7 +24,7 @@ typedef struct _FX_BASEARRAYDATA : public CFX_Target {
int32_t iBlockSize;
int32_t iTotalCount;
int32_t iBlockCount;
- FX_LPBYTE pBuffer;
+ uint8_t* pBuffer;
} FX_BASEARRAYDATA, * FX_LPBASEARRAYDATA;
typedef FX_BASEARRAYDATA const * FX_LPCBASEARRAYDATA;
CFX_BaseArray::CFX_BaseArray(int32_t iGrowSize, int32_t iBlockSize)
@@ -51,10 +51,10 @@ int32_t CFX_BaseArray::GetBlockSize() const
{
return ((FX_LPBASEARRAYDATA)m_pData)->iBlockSize;
}
-FX_LPBYTE CFX_BaseArray::AddSpaceTo(int32_t index)
+uint8_t* CFX_BaseArray::AddSpaceTo(int32_t index)
{
FXSYS_assert(index > -1);
- FX_LPBYTE &pBuffer = ((FX_LPBASEARRAYDATA)m_pData)->pBuffer;
+ uint8_t* &pBuffer = ((FX_LPBASEARRAYDATA)m_pData)->pBuffer;
int32_t &iTotalCount = ((FX_LPBASEARRAYDATA)m_pData)->iTotalCount;
int32_t iBlockSize = ((FX_LPBASEARRAYDATA)m_pData)->iBlockSize;
if (index >= iTotalCount) {
@@ -62,9 +62,9 @@ FX_LPBYTE CFX_BaseArray::AddSpaceTo(int32_t index)
iTotalCount = (index / iGrowSize + 1) * iGrowSize;
int32_t iNewSize = iTotalCount * iBlockSize;
if (pBuffer == NULL) {
- pBuffer = (FX_LPBYTE)FX_Alloc(uint8_t, iNewSize);
+ pBuffer = (uint8_t*)FX_Alloc(uint8_t, iNewSize);
} else {
- pBuffer = (FX_LPBYTE)FX_Realloc(uint8_t, pBuffer, iNewSize);
+ pBuffer = (uint8_t*)FX_Realloc(uint8_t, pBuffer, iNewSize);
}
}
FXSYS_assert(pBuffer != NULL);
@@ -74,12 +74,12 @@ FX_LPBYTE CFX_BaseArray::AddSpaceTo(int32_t index)
}
return pBuffer + index * iBlockSize;
}
-FX_LPBYTE CFX_BaseArray::GetAt(int32_t index) const
+uint8_t* CFX_BaseArray::GetAt(int32_t index) const
{
FXSYS_assert(index > -1 && index < ((FX_LPBASEARRAYDATA)m_pData)->iBlockCount);
return ((FX_LPBASEARRAYDATA)m_pData)->pBuffer + index * ((FX_LPBASEARRAYDATA)m_pData)->iBlockSize;
}
-FX_LPBYTE CFX_BaseArray::GetBuffer() const
+uint8_t* CFX_BaseArray::GetBuffer() const
{
return ((FX_LPBASEARRAYDATA)m_pData)->pBuffer;
}
@@ -99,7 +99,7 @@ int32_t CFX_BaseArray::Append(const CFX_BaseArray &src, int32_t iStart, int32_t
if (iCount < 1) {
return 0;
}
- FX_LPBYTE pDst = ((FX_LPBASEARRAYDATA)m_pData)->pBuffer + iBlockCount * iBlockSize;
+ uint8_t* pDst = ((FX_LPBASEARRAYDATA)m_pData)->pBuffer + iBlockCount * iBlockSize;
AddSpaceTo(iBlockCount + iCount - 1);
FX_memcpy(pDst, ((FX_LPBASEARRAYDATA)src.m_pData)->pBuffer + iStart * iBlockSize, iCount * iBlockSize);
return iCount;
@@ -138,7 +138,7 @@ int32_t CFX_BaseArray::RemoveLast(int32_t iCount)
void CFX_BaseArray::RemoveAll(FX_BOOL bLeaveMemory)
{
if (!bLeaveMemory) {
- FX_LPBYTE &pBuffer = ((FX_LPBASEARRAYDATA)m_pData)->pBuffer;
+ uint8_t* &pBuffer = ((FX_LPBASEARRAYDATA)m_pData)->pBuffer;
if (pBuffer != NULL) {
FX_Free(pBuffer);
pBuffer = NULL;
@@ -162,20 +162,20 @@ CFX_BaseMassArrayImp::~CFX_BaseMassArrayImp()
RemoveAll();
delete m_pData;
}
-FX_LPBYTE CFX_BaseMassArrayImp::AddSpaceTo(int32_t index)
+uint8_t* CFX_BaseMassArrayImp::AddSpaceTo(int32_t index)
{
FXSYS_assert(index > -1);
- FX_LPBYTE pChunk;
+ uint8_t* pChunk;
if (index < m_iBlockCount) {
- pChunk = (FX_LPBYTE)m_pData->GetAt(index / m_iChunkSize);
+ pChunk = (uint8_t*)m_pData->GetAt(index / m_iChunkSize);
} else {
int32_t iMemSize = m_iChunkSize * m_iBlockSize;
while (TRUE) {
if (index < m_iChunkCount * m_iChunkSize) {
- pChunk = (FX_LPBYTE)m_pData->GetAt(index / m_iChunkSize);
+ pChunk = (uint8_t*)m_pData->GetAt(index / m_iChunkSize);
break;
} else {
- pChunk = (FX_LPBYTE)FX_Alloc(uint8_t, iMemSize);
+ pChunk = (uint8_t*)FX_Alloc(uint8_t, iMemSize);
if (m_iChunkCount < m_pData->GetSize()) {
m_pData->SetAt(m_iChunkCount, pChunk);
} else {
@@ -189,10 +189,10 @@ FX_LPBYTE CFX_BaseMassArrayImp::AddSpaceTo(int32_t index)
m_iBlockCount = index + 1;
return pChunk + (index % m_iChunkSize) * m_iBlockSize;
}
-FX_LPBYTE CFX_BaseMassArrayImp::GetAt(int32_t index) const
+uint8_t* CFX_BaseMassArrayImp::GetAt(int32_t index) const
{
FXSYS_assert(index > -1 && index < m_iBlockCount);
- FX_LPBYTE pChunk = (FX_LPBYTE)m_pData->GetAt(index / m_iChunkSize);
+ uint8_t* pChunk = (uint8_t*)m_pData->GetAt(index / m_iChunkSize);
FXSYS_assert(pChunk != NULL);
return pChunk + (index % m_iChunkSize) * m_iBlockSize;
}
@@ -248,8 +248,8 @@ void CFX_BaseMassArrayImp::Append(int32_t iDstStart, const CFX_BaseMassArrayImp
FXSYS_assert(iSrcStart > -1 && iSrcStart < iSrcTotal && iSrcCount > 0 && iSrcStart + iSrcCount <= iSrcTotal);
int32_t iDstChunkIndex = iDstStart / m_iChunkSize;
int32_t iSrcChunkIndex = iSrcStart / src.m_iChunkSize;
- FX_LPBYTE pDstChunk = (FX_LPBYTE)GetAt(iDstStart);
- FX_LPBYTE pSrcChunk = (FX_LPBYTE)src.GetAt(iSrcStart);
+ uint8_t* pDstChunk = (uint8_t*)GetAt(iDstStart);
+ uint8_t* pSrcChunk = (uint8_t*)src.GetAt(iSrcStart);
int32_t iDstChunkSize = m_iChunkSize - (iDstStart % m_iChunkSize);
int32_t iSrcChunkSize = src.m_iChunkSize - (iSrcStart % src.m_iChunkSize);
int32_t iCopySize = FX_MIN(iSrcCount, FX_MIN(iSrcChunkSize, iDstChunkSize));
@@ -262,7 +262,7 @@ void CFX_BaseMassArrayImp::Append(int32_t iDstStart, const CFX_BaseMassArrayImp
if (iSrcChunkSize < 1) {
iSrcChunkSize = src.m_iChunkSize;
iSrcChunkIndex ++;
- pSrcChunk = (FX_LPBYTE)src.m_pData->GetAt(iSrcChunkIndex);
+ pSrcChunk = (uint8_t*)src.m_pData->GetAt(iSrcChunkIndex);
} else {
pSrcChunk += iCopyBytes;
}
@@ -270,7 +270,7 @@ void CFX_BaseMassArrayImp::Append(int32_t iDstStart, const CFX_BaseMassArrayImp
if (iDstChunkSize < 1) {
iDstChunkSize = m_iChunkSize;
iDstChunkIndex ++;
- pDstChunk = (FX_LPBYTE)m_pData->GetAt(iDstChunkIndex);
+ pDstChunk = (uint8_t*)m_pData->GetAt(iDstChunkIndex);
} else {
pDstChunk += iCopyBytes;
}
@@ -294,7 +294,7 @@ void CFX_BaseMassArrayImp::RemoveAll(FX_BOOL bLeaveMemory)
return;
}
for (int32_t i = 0; i < m_iChunkCount; i ++) {
- FX_LPVOID p = m_pData->GetAt(i);
+ void* p = m_pData->GetAt(i);
if (p == NULL) {
continue;
}
@@ -316,11 +316,11 @@ int32_t CFX_BaseMassArray::GetSize() const
{
return m_pData->m_iBlockCount;
}
-FX_LPBYTE CFX_BaseMassArray::AddSpaceTo(int32_t index)
+uint8_t* CFX_BaseMassArray::AddSpaceTo(int32_t index)
{
return m_pData->AddSpaceTo(index);
}
-FX_LPBYTE CFX_BaseMassArray::GetAt(int32_t index) const
+uint8_t* CFX_BaseMassArray::GetAt(int32_t index) const
{
return m_pData->GetAt(index);
}
@@ -362,20 +362,20 @@ CFX_BaseDiscreteArray::~CFX_BaseDiscreteArray()
RemoveAll();
delete (FX_LPBASEDISCRETEARRAYDATA)m_pData;
}
-FX_LPBYTE CFX_BaseDiscreteArray::AddSpaceTo(int32_t index)
+uint8_t* CFX_BaseDiscreteArray::AddSpaceTo(int32_t index)
{
FXSYS_assert(index > -1);
FX_LPBASEDISCRETEARRAYDATA pData = (FX_LPBASEDISCRETEARRAYDATA)m_pData;
int32_t &iChunkCount = pData->iChunkCount;
int32_t iChunkSize = pData->iChunkSize;
- FX_LPBYTE pChunk = NULL;
+ uint8_t* pChunk = NULL;
int32_t iChunk = index / iChunkSize;
if (iChunk < iChunkCount) {
- pChunk = (FX_LPBYTE)pData->ChunkBuffer.GetAt(iChunk);
+ pChunk = (uint8_t*)pData->ChunkBuffer.GetAt(iChunk);
}
if (pChunk == NULL) {
int32_t iMemSize = iChunkSize * pData->iBlockSize;
- pChunk = (FX_LPBYTE)FX_Alloc(uint8_t, iMemSize);
+ pChunk = (uint8_t*)FX_Alloc(uint8_t, iMemSize);
FXSYS_memset(pChunk, 0, iMemSize);
pData->ChunkBuffer.SetAtGrow(iChunk, pChunk);
if (iChunkCount <= iChunk) {
@@ -384,7 +384,7 @@ FX_LPBYTE CFX_BaseDiscreteArray::AddSpaceTo(int32_t index)
}
return pChunk + (index % iChunkSize) * pData->iBlockSize;
}
-FX_LPBYTE CFX_BaseDiscreteArray::GetAt(int32_t index) const
+uint8_t* CFX_BaseDiscreteArray::GetAt(int32_t index) const
{
FXSYS_assert(index > -1);
FX_LPBASEDISCRETEARRAYDATA pData = (FX_LPBASEDISCRETEARRAYDATA)m_pData;
@@ -393,7 +393,7 @@ FX_LPBYTE CFX_BaseDiscreteArray::GetAt(int32_t index) const
if (iChunk >= pData->iChunkCount) {
return NULL;
}
- FX_LPBYTE pChunk = (FX_LPBYTE)pData->ChunkBuffer.GetAt(iChunk);
+ uint8_t* pChunk = (uint8_t*)pData->ChunkBuffer.GetAt(iChunk);
if (pChunk == NULL) {
return NULL;
}
@@ -405,7 +405,7 @@ void CFX_BaseDiscreteArray::RemoveAll()
CFX_PtrArray &ChunkBuffer = pData->ChunkBuffer;
int32_t &iChunkCount = pData->iChunkCount;
for (int32_t i = 0; i < iChunkCount; i++) {
- FX_LPVOID p = ChunkBuffer.GetAt(i);
+ void* p = ChunkBuffer.GetAt(i);
if (p == NULL) {
continue;
}
@@ -422,7 +422,7 @@ CFX_BaseStack::~CFX_BaseStack()
{
FXTARGET_Delete (CFX_BaseMassArrayImp*)m_pData;
}
-FX_LPBYTE CFX_BaseStack::Push()
+uint8_t* CFX_BaseStack::Push()
{
return m_pData->AddSpace();
}
@@ -434,7 +434,7 @@ void CFX_BaseStack::Pop()
}
iBlockCount --;
}
-FX_LPBYTE CFX_BaseStack::GetTopElement() const
+uint8_t* CFX_BaseStack::GetTopElement() const
{
int32_t iSize = m_pData->m_iBlockCount;
if (iSize < 1) {
@@ -446,7 +446,7 @@ int32_t CFX_BaseStack::GetSize() const
{
return m_pData->m_iBlockCount;
}
-FX_LPBYTE CFX_BaseStack::GetAt(int32_t index) const
+uint8_t* CFX_BaseStack::GetAt(int32_t index) const
{
return m_pData->GetAt(index);
}
diff --git a/xfa/src/fgas/src/crt/fx_utils.h b/xfa/src/fgas/src/crt/fx_utils.h
index 92c2bcb198..42326570f0 100644
--- a/xfa/src/fgas/src/crt/fx_utils.h
+++ b/xfa/src/fgas/src/crt/fx_utils.h
@@ -11,12 +11,12 @@ class CFX_BaseMassArrayImp : public CFX_Target
public:
CFX_BaseMassArrayImp(int32_t iChunkSize, int32_t iBlockSize);
~CFX_BaseMassArrayImp();
- FX_LPBYTE AddSpace()
+ uint8_t* AddSpace()
{
return AddSpaceTo(m_iBlockCount);
}
- FX_LPBYTE AddSpaceTo(int32_t index);
- FX_LPBYTE GetAt(int32_t index) const;
+ uint8_t* AddSpaceTo(int32_t index);
+ uint8_t* GetAt(int32_t index) const;
int32_t Append(const CFX_BaseMassArrayImp &src, int32_t iStart = 0, int32_t iCount = -1);
int32_t Copy(const CFX_BaseMassArrayImp &src, int32_t iStart = 0, int32_t iCount = -1);
int32_t RemoveLast(int32_t iCount = -1);
diff --git a/xfa/src/fgas/src/font/fx_fontutils.cpp b/xfa/src/fgas/src/font/fx_fontutils.cpp
index 24e77c1c93..f6fe9c66e7 100644
--- a/xfa/src/fgas/src/font/fx_fontutils.cpp
+++ b/xfa/src/fgas/src/font/fx_fontutils.cpp
@@ -29,7 +29,7 @@ FX_DWORD FGAS_GetFontHashCode(FX_WORD wCodePage, FX_DWORD dwFontStyles)
}
return dwHash;
}
-FX_DWORD FGAS_GetFontFamilyHash(FX_LPCWSTR pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage)
+FX_DWORD FGAS_GetFontFamilyHash(const FX_WCHAR* pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage)
{
CFX_WideString wsFont(pszFontFamily);
if (dwFontStyles & FX_FONTSTYLE_Bold) {
@@ -39,7 +39,7 @@ FX_DWORD FGAS_GetFontFamilyHash(FX_LPCWSTR pszFontFamily, FX_DWORD dwFontStyles,
wsFont += L"Italic";
}
wsFont += wCodePage;
- return FX_HashCode_String_GetW((FX_LPCWSTR)wsFont, wsFont.GetLength());
+ return FX_HashCode_String_GetW((const FX_WCHAR*)wsFont, wsFont.GetLength());
}
static const FGAS_FONTUSB g_FXGdiFontUSBTable[] = {
{0x0000 , 0x007F , 0 , 1252 },
diff --git a/xfa/src/fgas/src/font/fx_fontutils.h b/xfa/src/fgas/src/font/fx_fontutils.h
index 1e3088fde8..2f13e7d1c2 100644
--- a/xfa/src/fgas/src/font/fx_fontutils.h
+++ b/xfa/src/fgas/src/font/fx_fontutils.h
@@ -14,6 +14,6 @@ typedef struct _FGAS_FONTUSB {
} FGAS_FONTUSB, * FGAS_LPFONTUSB;
typedef FGAS_FONTUSB const * FGAS_LPCFONTUSB;
FX_DWORD FGAS_GetFontHashCode(FX_WORD wCodePage, FX_DWORD dwFontStyles);
-FX_DWORD FGAS_GetFontFamilyHash(FX_LPCWSTR pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage);
+FX_DWORD FGAS_GetFontFamilyHash(const FX_WCHAR* pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage);
FGAS_LPCFONTUSB FGAS_GetUnicodeBitField(FX_WCHAR wUnicode);
#endif
diff --git a/xfa/src/fgas/src/font/fx_gdifont.cpp b/xfa/src/fgas/src/font/fx_gdifont.cpp
index 437a25c7e4..729af40e06 100644
--- a/xfa/src/fgas/src/font/fx_gdifont.cpp
+++ b/xfa/src/fgas/src/font/fx_gdifont.cpp
@@ -28,7 +28,7 @@ CFX_GdiFontCache::~CFX_GdiFontCache()
}
m_GlyphMap.RemoveAll();
}
-void CFX_GdiFontCache::SetCachedGlyphOutline(FX_DWORD dwGlyph, const GLYPHMETRICS &gm, FX_LPBYTE pOutline)
+void CFX_GdiFontCache::SetCachedGlyphOutline(FX_DWORD dwGlyph, const GLYPHMETRICS &gm, uint8_t* pOutline)
{
FXSYS_assert(pOutline != NULL);
FX_LPGDIGOCACHE pGlyph = (FX_LPGDIGOCACHE)FDE_Alloc(sizeof(FX_GDIGOCACHE));
@@ -44,7 +44,7 @@ FX_LPCGDIGOCACHE CFX_GdiFontCache::GetCachedGlyphOutline(FX_DWORD dwGlyph) const
}
return pGlyph;
}
-IFX_Font* IFX_Font::LoadFont(FX_LPCWSTR pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage, IFX_FontMgr *pFontMgr)
+IFX_Font* IFX_Font::LoadFont(const FX_WCHAR* pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage, IFX_FontMgr *pFontMgr)
{
CFX_GdiFont *pFont = FX_NEW CFX_GdiFont(pFontMgr);
if (!pFont->LoadFont(pszFontFamily, dwFontStyles, wCodePage)) {
@@ -53,7 +53,7 @@ IFX_Font* IFX_Font::LoadFont(FX_LPCWSTR pszFontFamily, FX_DWORD dwFontStyles, FX
}
return pFont;
}
-IFX_Font* IFX_Font::LoadFont(FX_LPCBYTE pBuffer, int32_t iLength, IFX_FontMgr *pFontMgr)
+IFX_Font* IFX_Font::LoadFont(const uint8_t* pBuffer, int32_t iLength, IFX_FontMgr *pFontMgr)
{
CFX_GdiFont *pFont = FX_NEW CFX_GdiFont(pFontMgr);
if (!pFont->LoadFont(pBuffer, iLength)) {
@@ -62,7 +62,7 @@ IFX_Font* IFX_Font::LoadFont(FX_LPCBYTE pBuffer, int32_t iLength, IFX_FontMgr *p
}
return pFont;
}
-IFX_Font* IFX_Font::LoadFont(FX_LPCWSTR pszFileName, IFX_FontMgr *pFontMgr)
+IFX_Font* IFX_Font::LoadFont(const FX_WCHAR* pszFileName, IFX_FontMgr *pFontMgr)
{
CFX_GdiFont *pFont = FX_NEW CFX_GdiFont(pFontMgr);
if (!pFont->LoadFont(pszFileName)) {
@@ -121,7 +121,7 @@ CFX_GdiFont::~CFX_GdiFont()
::DeleteDC(m_hDC);
if (m_hRes != NULL) {
if (m_wsFontFileName.GetLength() > 0) {
- ::RemoveFontResourceW((FX_LPCWSTR)m_wsFontFileName);
+ ::RemoveFontResourceW((const FX_WCHAR*)m_wsFontFileName);
} else {
::RemoveFontMemResourceEx(m_hRes);
}
@@ -162,7 +162,7 @@ IFX_Font* CFX_GdiFont::Retain()
++ m_iRefCount;
return this;
}
-FX_BOOL CFX_GdiFont::LoadFont(FX_LPCWSTR pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage)
+FX_BOOL CFX_GdiFont::LoadFont(const FX_WCHAR* pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage)
{
FXSYS_assert(m_hFont == NULL);
LOGFONTW lf;
@@ -190,7 +190,7 @@ FX_BOOL CFX_GdiFont::LoadFont(FX_LPCWSTR pszFontFamily, FX_DWORD dwFontStyles, F
}
return LoadFont(lf);
}
-FX_BOOL CFX_GdiFont::LoadFont(FX_LPCBYTE pBuffer, int32_t iLength)
+FX_BOOL CFX_GdiFont::LoadFont(const uint8_t* pBuffer, int32_t iLength)
{
FXSYS_assert(m_hFont == NULL && pBuffer != NULL && iLength > 0);
Gdiplus::PrivateFontCollection pfc;
@@ -206,7 +206,7 @@ FX_BOOL CFX_GdiFont::LoadFont(FX_LPCBYTE pBuffer, int32_t iLength)
return FALSE;
}
CFX_WideString wsFamily = m_FontFamilies[0];
- m_hFont = ::CreateFontW(-1000, 0, 0, 0, FW_NORMAL, FALSE, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, (FX_LPCWSTR)wsFamily);
+ m_hFont = ::CreateFontW(-1000, 0, 0, 0, FW_NORMAL, FALSE, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, (const FX_WCHAR*)wsFamily);
if (m_hFont == NULL) {
::RemoveFontMemResourceEx(m_hRes);
m_hRes = NULL;
@@ -217,7 +217,7 @@ FX_BOOL CFX_GdiFont::LoadFont(FX_LPCBYTE pBuffer, int32_t iLength)
::GetOutlineTextMetricsW(m_hDC, sizeof(m_OutlineTM), &m_OutlineTM);
return TRUE;
}
-FX_BOOL CFX_GdiFont::LoadFont(FX_LPCWSTR pszFileName)
+FX_BOOL CFX_GdiFont::LoadFont(const FX_WCHAR* pszFileName)
{
FXSYS_assert(m_hFont == NULL && pszFileName != NULL);
Gdiplus::PrivateFontCollection pfc;
@@ -233,7 +233,7 @@ FX_BOOL CFX_GdiFont::LoadFont(FX_LPCWSTR pszFileName)
return FALSE;
}
CFX_WideString wsFamily = m_FontFamilies[0];
- m_hFont = ::CreateFontW(-1000, 0, 0, 0, FW_NORMAL, FALSE, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, (FX_LPCWSTR)wsFamily);
+ m_hFont = ::CreateFontW(-1000, 0, 0, 0, FW_NORMAL, FALSE, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, (const FX_WCHAR*)wsFamily);
if (m_hFont == NULL) {
::RemoveFontResourceW(pszFileName);
m_hRes = NULL;
@@ -251,7 +251,7 @@ FX_BOOL CFX_GdiFont::LoadFont(IFX_Stream *pFontStream)
if (iLength < 1) {
return FALSE;
}
- FX_LPBYTE pBuf = (FX_LPBYTE)FDE_Alloc(iLength);
+ uint8_t* pBuf = (uint8_t*)FDE_Alloc(iLength);
if (pBuf == NULL) {
return FALSE;
}
@@ -286,7 +286,7 @@ int32_t CFX_GdiFont::GetFontFamilies(Gdiplus::FontCollection &fc)
fc.GetFamilies(iCount, pFontFamilies, &iFind);
for (int32_t i = 0; i < iCount; i ++) {
CFX_WideString wsFamilyName;
- FX_LPWSTR pName = wsFamilyName.GetBuffer(LF_FACESIZE);
+ FX_WCHAR* pName = wsFamilyName.GetBuffer(LF_FACESIZE);
pFontFamilies[i].GetFamilyName(pName);
wsFamilyName.ReleaseBuffer();
m_FontFamilies.Add(wsFamilyName);
@@ -451,7 +451,7 @@ IFX_Font* CFX_GdiFont::GetSubstFont(int32_t iGlyphIndex) const
}
return (IFX_Font*)m_SubstFonts[iHigher - 1];
}
-FX_DWORD CFX_GdiFont::GetGlyphDIBits(int32_t iGlyphIndex, FX_ARGB argb, const MAT2 *pMatrix, GLYPHMETRICS &gm, FX_LPVOID pBuffer, FX_DWORD bufSize)
+FX_DWORD CFX_GdiFont::GetGlyphDIBits(int32_t iGlyphIndex, FX_ARGB argb, const MAT2 *pMatrix, GLYPHMETRICS &gm, void* pBuffer, FX_DWORD bufSize)
{
static const UINT uFormat = GGO_GLYPH_INDEX | GGO_GRAY8_BITMAP;
IFX_Font *pFont = GetSubstFont(iGlyphIndex);
@@ -461,7 +461,7 @@ FX_DWORD CFX_GdiFont::GetGlyphDIBits(int32_t iGlyphIndex, FX_ARGB argb, const MA
if (pFont != (IFX_Font*)this) {
return ((CFX_GdiFont*)pFont)->GetGlyphDIBits(iGlyphIndex & 0x00FFFFFF, argb, pMatrix, gm, pBuffer, bufSize);
}
- FX_LPBYTE pGlyphOutline = NULL;
+ uint8_t* pGlyphOutline = NULL;
FXSYS_assert(pMatrix != NULL);
FX_DWORD dwMAT2 = GetMAT2HashCode((const FIXED*)pMatrix);
CFX_GdiFontCache *pCache = NULL;
@@ -477,7 +477,7 @@ FX_DWORD CFX_GdiFont::GetGlyphDIBits(int32_t iGlyphIndex, FX_ARGB argb, const MA
if (dwGlyphSize == 0 || dwGlyphSize == GDI_ERROR) {
return 0;
}
- pGlyphOutline = (FX_LPBYTE)FX_Alloc(dwGlyphSize);
+ pGlyphOutline = (uint8_t*)FX_Alloc(dwGlyphSize);
::GetGlyphOutlineW(m_hDC, iGlyphIndex, uFormat, &gm, dwGlyphSize, pGlyphOutline, pMatrix);
if (pCache == NULL) {
pCache = FX_NEW CFX_GdiFontCache;
@@ -492,7 +492,7 @@ FX_DWORD CFX_GdiFont::GetGlyphDIBits(int32_t iGlyphIndex, FX_ARGB argb, const MA
if (pBuffer == NULL || bufSize < dwDibSize) {
return dwDibSize;
}
- CreateGlyphBitmap(gm.gmBlackBoxX, gm.gmBlackBoxY, pGlyphOutline, (FX_LPDWORD)pBuffer, argb);
+ CreateGlyphBitmap(gm.gmBlackBoxX, gm.gmBlackBoxY, pGlyphOutline, (FX_DWORD*)pBuffer, argb);
return dwDibSize;
}
FX_DWORD CFX_GdiFont::GetHashCode() const
@@ -511,7 +511,7 @@ FX_DWORD CFX_GdiFont::GetMAT2HashCode(const FIXED *pFixed)
}
return ((dwHash1 & 0x0000FFFF) << 16) | (dwHash2 & 0x0000FFFF);
}
-void CFX_GdiFont::CreateGlyphBitmap(int32_t iWidth, int32_t iHeight, FX_LPBYTE pOutline, FX_LPDWORD pDIB, FX_ARGB argb)
+void CFX_GdiFont::CreateGlyphBitmap(int32_t iWidth, int32_t iHeight, uint8_t* pOutline, FX_DWORD* pDIB, FX_ARGB argb)
{
int32_t padding = ((iWidth + 3) / 4) * 4 - iWidth;
FX_DWORD alpha;
diff --git a/xfa/src/fgas/src/font/fx_gdifont.h b/xfa/src/fgas/src/font/fx_gdifont.h
index b9143602e6..85af1c9685 100644
--- a/xfa/src/fgas/src/font/fx_gdifont.h
+++ b/xfa/src/fgas/src/font/fx_gdifont.h
@@ -10,7 +10,7 @@
#if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN32_MOBILE_ || _FX_OS_ == _FX_WIN64_
typedef struct _FX_GDIGOCACHE {
GLYPHMETRICS gm;
- FX_LPBYTE pOutline;
+ uint8_t* pOutline;
} FX_GDIGOCACHE, * FX_LPGDIGOCACHE;
typedef FX_GDIGOCACHE const * FX_LPCGDIGOCACHE;
class CFX_GdiFontCache
@@ -18,7 +18,7 @@ class CFX_GdiFontCache
public:
CFX_GdiFontCache();
~CFX_GdiFontCache();
- void SetCachedGlyphOutline(FX_DWORD dwGlyph, const GLYPHMETRICS &gm, FX_LPBYTE pOutline);
+ void SetCachedGlyphOutline(FX_DWORD dwGlyph, const GLYPHMETRICS &gm, uint8_t* pOutline);
FX_LPCGDIGOCACHE GetCachedGlyphOutline(FX_DWORD dwGlyph) const;
protected:
CFX_MapPtrToPtr m_GlyphMap;
@@ -30,9 +30,9 @@ public:
~CFX_GdiFont();
virtual void Release();
virtual IFX_Font* Retain();
- FX_BOOL LoadFont(FX_LPCWSTR pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage);
- FX_BOOL LoadFont(FX_LPCBYTE pBuffer, int32_t iLength);
- FX_BOOL LoadFont(FX_LPCWSTR pszFileName);
+ FX_BOOL LoadFont(const FX_WCHAR* pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage);
+ FX_BOOL LoadFont(const uint8_t* pBuffer, int32_t iLength);
+ FX_BOOL LoadFont(const FX_WCHAR* pszFileName);
FX_BOOL LoadFont(IFX_Stream *pFontStream);
FX_BOOL LoadFont(const LOGFONTW &lf);
virtual IFX_Font* Derive(FX_DWORD dwFontStyles, FX_WORD wCodePage = 0)
@@ -56,7 +56,7 @@ public:
virtual FX_BOOL GetBBox(CFX_Rect &bbox);
virtual int32_t GetItalicAngle() const;
virtual void Reset();
- FX_DWORD GetGlyphDIBits(int32_t iGlyphIndex, FX_ARGB argb, const MAT2 *pMatrix, GLYPHMETRICS &gm, FX_LPVOID pBuffer, FX_DWORD bufSize);
+ FX_DWORD GetGlyphDIBits(int32_t iGlyphIndex, FX_ARGB argb, const MAT2 *pMatrix, GLYPHMETRICS &gm, void* pBuffer, FX_DWORD bufSize);
FX_DWORD GetHashCode() const;
protected:
IFX_FontMgr *m_pFontMgr;
@@ -81,7 +81,7 @@ protected:
FX_BOOL GetCharWidth(FX_WCHAR wUnicode, int32_t &iWidth, FX_BOOL bRecursive, FX_BOOL bCharCode = FALSE);
int32_t GetGlyphIndex(FX_WCHAR wUnicode, FX_BOOL bRecursive, IFX_Font **ppFont, FX_BOOL bCharCode = FALSE);
FX_DWORD GetMAT2HashCode(const FIXED *pFixed);
- void CreateGlyphBitmap(int32_t iWidth, int32_t iHeight, FX_LPBYTE pOutline, FX_LPDWORD pDIB, FX_ARGB argb);
+ void CreateGlyphBitmap(int32_t iWidth, int32_t iHeight, uint8_t* pOutline, FX_DWORD* pDIB, FX_ARGB argb);
friend class CFX_GdiFontMgr;
};
#endif
diff --git a/xfa/src/fgas/src/font/fx_gefont.cpp b/xfa/src/fgas/src/font/fx_gefont.cpp
index a67b7b47bb..c9948cfa4f 100644
--- a/xfa/src/fgas/src/font/fx_gefont.cpp
+++ b/xfa/src/fgas/src/font/fx_gefont.cpp
@@ -8,7 +8,7 @@
#include "fx_gefont.h"
#include "fx_fontutils.h"
#ifndef _FXPLUS
-IFX_Font* IFX_Font::LoadFont(FX_LPCWSTR pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage, IFX_FontMgr *pFontMgr)
+IFX_Font* IFX_Font::LoadFont(const FX_WCHAR* pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage, IFX_FontMgr *pFontMgr)
{
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
if (NULL != pFontMgr) {
@@ -24,7 +24,7 @@ IFX_Font* IFX_Font::LoadFont(FX_LPCWSTR pszFontFamily, FX_DWORD dwFontStyles, FX
return pFont;
#endif
}
-IFX_Font* IFX_Font::LoadFont(FX_LPCBYTE pBuffer, int32_t iLength, IFX_FontMgr *pFontMgr)
+IFX_Font* IFX_Font::LoadFont(const uint8_t* pBuffer, int32_t iLength, IFX_FontMgr *pFontMgr)
{
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
if (NULL != pFontMgr) {
@@ -40,7 +40,7 @@ IFX_Font* IFX_Font::LoadFont(FX_LPCBYTE pBuffer, int32_t iLength, IFX_FontMgr *p
return pFont;
#endif
}
-IFX_Font* IFX_Font::LoadFont(FX_LPCWSTR pszFileName, IFX_FontMgr *pFontMgr)
+IFX_Font* IFX_Font::LoadFont(const FX_WCHAR* pszFileName, IFX_FontMgr *pFontMgr)
{
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
if (NULL != pFontMgr) {
@@ -181,7 +181,7 @@ IFX_Font* CFX_GEFont::Retain()
++ m_iRefCount;
return this;
}
-FX_BOOL CFX_GEFont::LoadFont(FX_LPCWSTR pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage)
+FX_BOOL CFX_GEFont::LoadFont(const FX_WCHAR* pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage)
{
if (m_pFont != NULL) {
return FALSE;
@@ -235,7 +235,7 @@ FX_BOOL CFX_GEFont::LoadFont(FX_LPCWSTR pszFontFamily, FX_DWORD dwFontStyles, FX
Unlock();
return bRet;
}
-FX_BOOL CFX_GEFont::LoadFont(FX_LPCBYTE pBuffer, int32_t length)
+FX_BOOL CFX_GEFont::LoadFont(const uint8_t* pBuffer, int32_t length)
{
if (m_pFont != NULL) {
return FALSE;
@@ -250,7 +250,7 @@ FX_BOOL CFX_GEFont::LoadFont(FX_LPCBYTE pBuffer, int32_t length)
Unlock();
return bRet;
}
-FX_BOOL CFX_GEFont::LoadFont(FX_LPCWSTR pszFileName)
+FX_BOOL CFX_GEFont::LoadFont(const FX_WCHAR* pszFileName)
{
if (m_pFont != NULL) {
return FALSE;
@@ -446,7 +446,7 @@ FX_BOOL CFX_GEFont::GetCharBBox(FX_WCHAR wUnicode, CFX_Rect &bbox, FX_BOOL bRecu
{
FXSYS_assert(m_pRectArray != NULL);
FXSYS_assert(m_pBBoxMap != NULL);
- FX_LPVOID pRect = NULL;
+ void* pRect = NULL;
if (!m_pBBoxMap->Lookup((void*)(uintptr_t)wUnicode, pRect)) {
IFX_Font *pFont = NULL;
int32_t iGlyph = GetGlyphIndex(wUnicode, TRUE, &pFont, bCharCode);
@@ -533,9 +533,9 @@ int32_t CFX_GEFont::GetGlyphIndex(FX_WCHAR wUnicode, FX_BOOL bRecursive, IFX_Fon
CFX_WideString wsFamily;
GetFamilyName(wsFamily);
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
- IFX_Font *pFont = m_pFontMgr->GetDefFontByUnicode(wUnicode, GetFontStyles(), (FX_LPCWSTR)wsFamily);
+ IFX_Font *pFont = m_pFontMgr->GetDefFontByUnicode(wUnicode, GetFontStyles(), (const FX_WCHAR*)wsFamily);
#else
- IFX_Font *pFont = m_pFontMgr->GetFontByUnicode(wUnicode, GetFontStyles(), (FX_LPCWSTR)wsFamily);
+ IFX_Font *pFont = m_pFontMgr->GetFontByUnicode(wUnicode, GetFontStyles(), (const FX_WCHAR*)wsFamily);
if (NULL == pFont) {
pFont = m_pFontMgr->GetFontByUnicode(wUnicode, GetFontStyles(), NULL);
}
diff --git a/xfa/src/fgas/src/font/fx_gefont.h b/xfa/src/fgas/src/font/fx_gefont.h
index e03fd8844e..7c4aa754db 100644
--- a/xfa/src/fgas/src/font/fx_gefont.h
+++ b/xfa/src/fgas/src/font/fx_gefont.h
@@ -19,9 +19,9 @@ public:
~CFX_GEFont();
virtual void Release();
virtual IFX_Font* Retain();
- FX_BOOL LoadFont(FX_LPCWSTR pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage);
- FX_BOOL LoadFont(FX_LPCBYTE pBuffer, int32_t length);
- FX_BOOL LoadFont(FX_LPCWSTR pszFileName);
+ FX_BOOL LoadFont(const FX_WCHAR* pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage);
+ FX_BOOL LoadFont(const uint8_t* pBuffer, int32_t length);
+ FX_BOOL LoadFont(const FX_WCHAR* pszFileName);
FX_BOOL LoadFont(IFX_Stream *pFontStream, FX_BOOL bSaveStream);
FX_BOOL LoadFont(CFX_Font *pExtFont, FX_BOOL bTakeOver = FALSE);
virtual IFX_Font* Derive(FX_DWORD dwFontStyles, FX_WORD wCodePage = 0);
diff --git a/xfa/src/fgas/src/font/fx_stdfontmgr.cpp b/xfa/src/fgas/src/font/fx_stdfontmgr.cpp
index 2f4ef2038f..3569f78b11 100644
--- a/xfa/src/fgas/src/font/fx_stdfontmgr.cpp
+++ b/xfa/src/fgas/src/font/fx_stdfontmgr.cpp
@@ -8,11 +8,11 @@
#include "fx_stdfontmgr.h"
#include "fx_fontutils.h"
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
-IFX_FontMgr* IFX_FontMgr::Create(FX_LPEnumAllFonts pEnumerator, FX_LPMatchFont pMatcher , FX_LPVOID pUserData )
+IFX_FontMgr* IFX_FontMgr::Create(FX_LPEnumAllFonts pEnumerator, FX_LPMatchFont pMatcher , void* pUserData )
{
return FX_NEW CFX_StdFontMgrImp(pEnumerator, pMatcher, pUserData);
}
-CFX_StdFontMgrImp::CFX_StdFontMgrImp(FX_LPEnumAllFonts pEnumerator, FX_LPMatchFont pMatcher, FX_LPVOID pUserData)
+CFX_StdFontMgrImp::CFX_StdFontMgrImp(FX_LPEnumAllFonts pEnumerator, FX_LPMatchFont pMatcher, void* pUserData)
: m_pMatcher(pMatcher)
, m_pEnumerator(pEnumerator)
, m_FontFaces()
@@ -52,7 +52,7 @@ CFX_StdFontMgrImp::~CFX_StdFontMgrImp()
}
m_Fonts.RemoveAll();
}
-IFX_Font* CFX_StdFontMgrImp::GetDefFontByCodePage(FX_WORD wCodePage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily)
+IFX_Font* CFX_StdFontMgrImp::GetDefFontByCodePage(FX_WORD wCodePage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily)
{
FX_DWORD dwHash = FGAS_GetFontHashCode(wCodePage, dwFontStyles);
IFX_Font *pFont = NULL;
@@ -76,12 +76,12 @@ IFX_Font* CFX_StdFontMgrImp::GetDefFontByCodePage(FX_WORD wCodePage, FX_DWORD dw
}
return NULL;
}
-IFX_Font* CFX_StdFontMgrImp::GetDefFontByCharset(uint8_t nCharset, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily)
+IFX_Font* CFX_StdFontMgrImp::GetDefFontByCharset(uint8_t nCharset, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily)
{
return GetDefFontByCodePage(FX_GetCodePageFromCharset(nCharset), dwFontStyles, pszFontFamily);
}
#define _FX_USEGASFONTMGR_
-IFX_Font* CFX_StdFontMgrImp::GetDefFontByUnicode(FX_WCHAR wUnicode, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily)
+IFX_Font* CFX_StdFontMgrImp::GetDefFontByUnicode(FX_WCHAR wUnicode, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily)
{
FGAS_LPCFONTUSB pRet = FGAS_GetUnicodeBitField(wUnicode);
if (pRet->wBitField == 999) {
@@ -102,7 +102,7 @@ IFX_Font* CFX_StdFontMgrImp::GetDefFontByUnicode(FX_WCHAR wUnicode, FX_DWORD dwF
}
FXSYS_assert(pFD);
FX_WORD wCodePage = FX_GetCodePageFromCharset(pFD->uCharSet);
- FX_LPCWSTR pFontFace = pFD->wsFontFace;
+ const FX_WCHAR* pFontFace = pFD->wsFontFace;
pFont = IFX_Font::LoadFont(pFontFace, dwFontStyles, wCodePage, this);
#else
CFX_FontMapper* pBuiltinMapper = CFX_GEModule::Get()->GetFontMgr()->m_pBuiltinMapper;
@@ -125,7 +125,7 @@ IFX_Font* CFX_StdFontMgrImp::GetDefFontByUnicode(FX_WCHAR wUnicode, FX_DWORD dwF
pFont = IFX_Font::LoadFont(pFXFont, this);
FX_WORD wCodePage = pRet->wCodePage;
CFX_WideString wsPsName = pFXFont->GetPsName();
- FX_LPCWSTR pFontFace = wsPsName;
+ const FX_WCHAR* pFontFace = wsPsName;
#endif
if (pFont != NULL) {
m_Fonts.Add(pFont);
@@ -138,11 +138,11 @@ IFX_Font* CFX_StdFontMgrImp::GetDefFontByUnicode(FX_WCHAR wUnicode, FX_DWORD dwF
}
return NULL;
}
-IFX_Font* CFX_StdFontMgrImp::GetDefFontByLanguage(FX_WORD wLanguage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily)
+IFX_Font* CFX_StdFontMgrImp::GetDefFontByLanguage(FX_WORD wLanguage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily)
{
return GetDefFontByCodePage(FX_GetDefCodePageByLanguage(wLanguage), dwFontStyles, pszFontFamily);
}
-IFX_Font* CFX_StdFontMgrImp::LoadFont(FX_LPCWSTR pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage)
+IFX_Font* CFX_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage)
{
FX_DWORD dwHash = FGAS_GetFontFamilyHash(pszFontFamily, dwFontStyles, wCodePage);
IFX_Font *pFont = NULL;
@@ -168,7 +168,7 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(FX_LPCWSTR pszFontFamily, FX_DWORD dwFontS
}
return NULL;
}
-IFX_Font* CFX_StdFontMgrImp::LoadFont(FX_LPCBYTE pBuffer, int32_t iLength)
+IFX_Font* CFX_StdFontMgrImp::LoadFont(const uint8_t* pBuffer, int32_t iLength)
{
FXSYS_assert(pBuffer != NULL && iLength > 0);
IFX_Font *pFont = NULL;
@@ -185,7 +185,7 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(FX_LPCBYTE pBuffer, int32_t iLength)
}
return NULL;
}
-IFX_Font* CFX_StdFontMgrImp::LoadFont(FX_LPCWSTR pszFileName)
+IFX_Font* CFX_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFileName)
{
FXSYS_assert(pszFileName != NULL);
FX_DWORD dwHash = FX_HashCode_String_GetW(pszFileName, -1);
@@ -203,7 +203,7 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(FX_LPCWSTR pszFileName)
}
return NULL;
}
-IFX_Font* CFX_StdFontMgrImp::LoadFont(IFX_Stream *pFontStream, FX_LPCWSTR pszFontAlias , FX_DWORD dwFontStyles , FX_WORD wCodePage , FX_BOOL bSaveStream )
+IFX_Font* CFX_StdFontMgrImp::LoadFont(IFX_Stream *pFontStream, const FX_WCHAR* pszFontAlias , FX_DWORD dwFontStyles , FX_WORD wCodePage , FX_BOOL bSaveStream )
{
FXSYS_assert(pFontStream != NULL && pFontStream->GetLength() > 0);
IFX_Font *pFont = NULL;
@@ -235,7 +235,7 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(IFX_Font *pSrcFont, FX_DWORD dwFontStyles,
return pSrcFont->Retain();
}
void* buffer[3] = {pSrcFont, (void*)(uintptr_t)dwFontStyles, (void*)(uintptr_t)wCodePage};
- FX_DWORD dwHash = FX_HashCode_String_GetA((FX_LPCSTR)buffer, 3 * sizeof(void*));
+ FX_DWORD dwHash = FX_HashCode_String_GetA((const FX_CHAR*)buffer, 3 * sizeof(void*));
IFX_Font *pFont = NULL;
if (m_DeriveFonts.GetCount() > 0) {
m_DeriveFonts.Lookup((void*)(uintptr_t)dwHash, (void*&)pFont);
@@ -268,8 +268,8 @@ void CFX_StdFontMgrImp::ClearFontCache()
void CFX_StdFontMgrImp::RemoveFont(CFX_MapPtrToPtr &fontMap, IFX_Font *pFont)
{
FX_POSITION pos = fontMap.GetStartPosition();
- FX_LPVOID pKey;
- FX_LPVOID pFind;
+ void* pKey;
+ void* pFind;
while (pos != NULL) {
pFind = NULL;
fontMap.GetNextAssoc(pos, pKey, pFind);
@@ -294,7 +294,7 @@ void CFX_StdFontMgrImp::RemoveFont(IFX_Font *pFont)
m_Fonts.RemoveAt(iFind, 1);
}
}
-FX_LPCFONTDESCRIPTOR CFX_StdFontMgrImp::FindFont(FX_LPCWSTR pszFontFamily, FX_DWORD dwFontStyles, FX_DWORD dwMatchFlags, FX_WORD wCodePage, FX_DWORD dwUSB , FX_WCHAR wUnicode )
+FX_LPCFONTDESCRIPTOR CFX_StdFontMgrImp::FindFont(const FX_WCHAR* pszFontFamily, FX_DWORD dwFontStyles, FX_DWORD dwMatchFlags, FX_WORD wCodePage, FX_DWORD dwUSB , FX_WCHAR wUnicode )
{
if (m_pMatcher == NULL) {
return NULL;
@@ -330,7 +330,7 @@ FX_LPCFONTDESCRIPTOR CFX_StdFontMgrImp::FindFont(FX_LPCWSTR pszFontFamily, FX_DW
}
return NULL;
}
-FX_LPCFONTDESCRIPTOR FX_DefFontMatcher(FX_LPFONTMATCHPARAMS pParams, const CFX_FontDescriptors &fonts, FX_LPVOID pUserData)
+FX_LPCFONTDESCRIPTOR FX_DefFontMatcher(FX_LPFONTMATCHPARAMS pParams, const CFX_FontDescriptors &fonts, void* pUserData)
{
FX_LPCFONTDESCRIPTOR pBestFont = NULL;
int32_t iBestSimilar = 0;
@@ -440,21 +440,21 @@ static int32_t CALLBACK FX_GdiFontEnumProc(ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICE
FXSYS_memset(pFont, 0, sizeof(FX_FONTDESCRIPTOR));
pFont->uCharSet = lf.lfCharSet;
pFont->dwFontStyles = FX_GetGdiFontStyles(lf);
- FXSYS_wcsncpy(pFont->wsFontFace, (FX_LPCWSTR)lf.lfFaceName, 31);
+ FXSYS_wcsncpy(pFont->wsFontFace, (const FX_WCHAR*)lf.lfFaceName, 31);
pFont->wsFontFace[31] = 0;
FX_memcpy(&pFont->FontSignature, &lpntme->ntmFontSig, sizeof(lpntme->ntmFontSig));
((CFX_FontDescriptors*)lParam)->Add(*pFont);
FX_Free(pFont);
return 1;
}
-static void FX_EnumGdiFonts(CFX_FontDescriptors &fonts, FX_LPVOID pUserData, FX_LPCWSTR pwsFaceName, FX_WCHAR wUnicode)
+static void FX_EnumGdiFonts(CFX_FontDescriptors &fonts, void* pUserData, const FX_WCHAR* pwsFaceName, FX_WCHAR wUnicode)
{
HDC hDC = ::GetDC(NULL);
LOGFONTW lfFind;
FX_memset(&lfFind, 0, sizeof(lfFind));
lfFind.lfCharSet = DEFAULT_CHARSET;
if (pwsFaceName) {
- FXSYS_wcsncpy((FX_LPWSTR)lfFind.lfFaceName, pwsFaceName, 31);
+ FXSYS_wcsncpy((FX_WCHAR*)lfFind.lfFaceName, pwsFaceName, 31);
lfFind.lfFaceName[31] = 0;
}
EnumFontFamiliesExW(hDC, (LPLOGFONTW)&lfFind, (FONTENUMPROCW)FX_GdiFontEnumProc, (LPARAM)&fonts, 0);
@@ -465,7 +465,7 @@ FX_LPEnumAllFonts FX_GetDefFontEnumerator()
return FX_EnumGdiFonts;
}
#else
-FX_LPCSTR g_FontFolders[] = {
+const FX_CHAR* g_FontFolders[] = {
#if _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_
"/usr/share/fonts",
"/usr/share/X11/fonts/Type1",
@@ -481,14 +481,14 @@ FX_LPCSTR g_FontFolders[] = {
};
CFX_FontSourceEnum_File::CFX_FontSourceEnum_File()
{
- for (int32_t i = 0; i < sizeof(g_FontFolders) / sizeof(FX_LPCSTR); i++) {
+ for (int32_t i = 0; i < sizeof(g_FontFolders) / sizeof(const FX_CHAR*); i++) {
m_FolderPaths.Add(g_FontFolders[i]);
}
}
CFX_ByteString CFX_FontSourceEnum_File::GetNextFile()
{
Restart:
- FX_LPVOID pCurHandle = m_FolderQueue.GetSize() == 0 ? NULL : m_FolderQueue.GetDataPtr(m_FolderQueue.GetSize() - 1)->pFileHandle;
+ void* pCurHandle = m_FolderQueue.GetSize() == 0 ? NULL : m_FolderQueue.GetDataPtr(m_FolderQueue.GetSize() - 1)->pFileHandle;
if (NULL == pCurHandle) {
if (m_FolderPaths.GetSize() < 1) {
return "";
@@ -536,7 +536,7 @@ Restart:
}
return bsName;
}
-FX_POSITION CFX_FontSourceEnum_File::GetStartPosition( FX_LPVOID pUserData )
+FX_POSITION CFX_FontSourceEnum_File::GetStartPosition( void* pUserData )
{
m_wsNext = GetNextFile().UTF8Decode();
if (0 == m_wsNext.GetLength()) {
@@ -544,7 +544,7 @@ FX_POSITION CFX_FontSourceEnum_File::GetStartPosition( FX_LPVOID pUserData )
}
return (FX_POSITION) - 1;
}
-IFX_FileAccess* CFX_FontSourceEnum_File::GetNext( FX_POSITION& pos, FX_LPVOID pUserData )
+IFX_FileAccess* CFX_FontSourceEnum_File::GetNext( FX_POSITION& pos, void* pUserData )
{
IFX_FileAccess* pAccess = FX_CreateDefaultFileAccess(m_wsNext);
m_wsNext = GetNextFile().UTF8Decode();
@@ -555,7 +555,7 @@ IFX_FontSourceEnum* FX_CreateDefaultFontSourceEnum()
{
return (IFX_FontSourceEnum*)FX_NEW CFX_FontSourceEnum_File;
}
-IFX_FontMgr* IFX_FontMgr::Create(IFX_FontSourceEnum* pFontEnum, IFX_FontMgrDelegate* pDelegate, FX_LPVOID pUserData)
+IFX_FontMgr* IFX_FontMgr::Create(IFX_FontSourceEnum* pFontEnum, IFX_FontMgrDelegate* pDelegate, void* pUserData)
{
if (NULL == pFontEnum) {
return NULL;
@@ -570,7 +570,7 @@ IFX_FontMgr* IFX_FontMgr::Create(IFX_FontSourceEnum* pFontEnum, IFX_FontMgrDeleg
delete pFontMgr;
return NULL;
}
-CFX_FontMgrImp::CFX_FontMgrImp( IFX_FontSourceEnum* pFontEnum, IFX_FontMgrDelegate* pDelegate , FX_LPVOID pUserData )
+CFX_FontMgrImp::CFX_FontMgrImp( IFX_FontSourceEnum* pFontEnum, IFX_FontMgrDelegate* pDelegate , void* pUserData )
: m_pFontSource(pFontEnum)
, m_pDelegate(pDelegate)
, m_pUserData(pUserData)
@@ -673,23 +673,23 @@ void CFX_FontMgrImp::Release()
}
delete this;
}
-IFX_Font* CFX_FontMgrImp::GetDefFontByCodePage( FX_WORD wCodePage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily )
+IFX_Font* CFX_FontMgrImp::GetDefFontByCodePage( FX_WORD wCodePage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily )
{
return NULL == m_pDelegate ? NULL : m_pDelegate->GetDefFontByCodePage(this, wCodePage, dwFontStyles, pszFontFamily);
}
-IFX_Font* CFX_FontMgrImp::GetDefFontByCharset( uint8_t nCharset, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily )
+IFX_Font* CFX_FontMgrImp::GetDefFontByCharset( uint8_t nCharset, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily )
{
return NULL == m_pDelegate ? NULL : m_pDelegate->GetDefFontByCharset(this, nCharset, dwFontStyles, pszFontFamily);
}
-IFX_Font* CFX_FontMgrImp::GetDefFontByUnicode( FX_WCHAR wUnicode, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily )
+IFX_Font* CFX_FontMgrImp::GetDefFontByUnicode( FX_WCHAR wUnicode, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily )
{
return NULL == m_pDelegate ? NULL : m_pDelegate->GetDefFontByUnicode(this, wUnicode, dwFontStyles, pszFontFamily);
}
-IFX_Font* CFX_FontMgrImp::GetDefFontByLanguage( FX_WORD wLanguage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily )
+IFX_Font* CFX_FontMgrImp::GetDefFontByLanguage( FX_WORD wLanguage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily )
{
return NULL == m_pDelegate ? NULL : m_pDelegate->GetDefFontByLanguage(this, wLanguage, dwFontStyles, pszFontFamily);
}
-IFX_Font* CFX_FontMgrImp::GetFontByCodePage( FX_WORD wCodePage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily )
+IFX_Font* CFX_FontMgrImp::GetFontByCodePage( FX_WORD wCodePage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily )
{
CFX_ByteString bsHash;
bsHash.Format("%d, %d", wCodePage, dwFontStyles);
@@ -729,11 +729,11 @@ IFX_Font* CFX_FontMgrImp::GetFontByCodePage( FX_WORD wCodePage, FX_DWORD dwFontS
pFonts->Add(pFont);
return pFont;
}
-IFX_Font* CFX_FontMgrImp::GetFontByCharset( uint8_t nCharset, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily )
+IFX_Font* CFX_FontMgrImp::GetFontByCharset( uint8_t nCharset, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily )
{
return GetFontByCodePage(FX_GetCodePageFromCharset(nCharset), dwFontStyles, pszFontFamily);
}
-IFX_Font* CFX_FontMgrImp::GetFontByUnicode( FX_WCHAR wUnicode, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily )
+IFX_Font* CFX_FontMgrImp::GetFontByUnicode( FX_WCHAR wUnicode, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily )
{
IFX_Font* pFont = NULL;
if (m_FailedUnicodes2NULL.Lookup(wUnicode, pFont)) {
@@ -842,14 +842,14 @@ FX_BOOL CFX_FontMgrImp::VerifyUnicode( IFX_Font* pFont, FX_WCHAR wcUnicode )
}
return TRUE;
}
-IFX_Font* CFX_FontMgrImp::GetFontByLanguage( FX_WORD wLanguage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily )
+IFX_Font* CFX_FontMgrImp::GetFontByLanguage( FX_WORD wLanguage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily )
{
return GetFontByCodePage(FX_GetDefCodePageByLanguage(wLanguage), dwFontStyles, pszFontFamily);
}
-IFX_Font* CFX_FontMgrImp::LoadFont( FX_LPCBYTE pBuffer, int32_t iLength, int32_t iFaceIndex, int32_t* pFaceCount )
+IFX_Font* CFX_FontMgrImp::LoadFont( const uint8_t* pBuffer, int32_t iLength, int32_t iFaceIndex, int32_t* pFaceCount )
{
- FX_LPVOID Hash[2] = {(FX_LPVOID)(uintptr_t)pBuffer, (FX_LPVOID)(uintptr_t)iLength};
- FX_DWORD dwHash = FX_HashCode_String_GetA((FX_LPCSTR)Hash, 2 * sizeof (FX_LPVOID));
+ void* Hash[2] = {(void*)(uintptr_t)pBuffer, (void*)(uintptr_t)iLength};
+ FX_DWORD dwHash = FX_HashCode_String_GetA((const FX_CHAR*)Hash, 2 * sizeof (void*));
IFX_FileAccess* pFontAccess = NULL;
if (!m_Hash2FileAccess.Lookup(dwHash, pFontAccess)) {
}
@@ -859,11 +859,11 @@ IFX_Font* CFX_FontMgrImp::LoadFont( FX_LPCBYTE pBuffer, int32_t iLength, int32_t
return NULL;
}
}
-IFX_Font* CFX_FontMgrImp::LoadFont( FX_LPCWSTR pszFileName, int32_t iFaceIndex, int32_t* pFaceCount )
+IFX_Font* CFX_FontMgrImp::LoadFont( const FX_WCHAR* pszFileName, int32_t iFaceIndex, int32_t* pFaceCount )
{
CFX_ByteString bsHash;
bsHash += CFX_WideString(pszFileName).UTF8Encode();
- FX_DWORD dwHash = FX_HashCode_String_GetA((FX_LPCSTR)bsHash, bsHash.GetLength());
+ FX_DWORD dwHash = FX_HashCode_String_GetA((const FX_CHAR*)bsHash, bsHash.GetLength());
IFX_FileAccess* pFontAccess = NULL;
if (!m_Hash2FileAccess.Lookup(dwHash, pFontAccess)) {
pFontAccess = FX_CreateDefaultFileAccess(pszFileName);
@@ -877,8 +877,8 @@ IFX_Font* CFX_FontMgrImp::LoadFont( FX_LPCWSTR pszFileName, int32_t iFaceIndex,
}
IFX_Font* CFX_FontMgrImp::LoadFont( IFX_Stream* pFontStream, int32_t iFaceIndex, int32_t* pFaceCount, FX_BOOL bSaveStream )
{
- FX_LPVOID Hash[1] = {(FX_LPVOID)(uintptr_t)pFontStream};
- FX_DWORD dwHash = FX_HashCode_String_GetA((FX_LPCSTR)Hash, 1 * sizeof (FX_LPVOID));
+ void* Hash[1] = {(void*)(uintptr_t)pFontStream};
+ FX_DWORD dwHash = FX_HashCode_String_GetA((const FX_CHAR*)Hash, 1 * sizeof (void*));
IFX_FileAccess* pFontAccess = NULL;
if (!m_Hash2FileAccess.Lookup(dwHash, pFontAccess)) {
}
@@ -1263,7 +1263,7 @@ void CFX_FontMgrImp::ReportFace( FXFT_Face pFace, CFX_FontDescriptors& Fonts, IF
GetUSBCSB(pFace, pFont->m_dwUsb, pFont->m_dwCsb);
unsigned long nLength = 0;
FT_ULong dwTag;
- FX_LPBYTE pTable = NULL;
+ uint8_t* pTable = NULL;
FT_ENC_TAG(dwTag, 'n', 'a', 'm', 'e');
unsigned int error = FXFT_Load_Sfnt_Table(pFace, dwTag, 0, NULL, &nLength);
if (0 == error && 0 != nLength) {
@@ -1314,17 +1314,17 @@ FX_DWORD CFX_FontMgrImp::GetFlags(FXFT_Face pFace)
#define GetUInt8(p) ((uint8_t)((p)[0]))
#define GetUInt16(p) ((uint16_t)((p)[0] << 8 | (p)[1]))
#define GetUInt32(p) ((uint32_t)((p)[0] << 24 | (p)[1] << 16 | (p)[2] << 8 | (p)[3]))
-void CFX_FontMgrImp::GetNames(FX_LPCBYTE name_table, CFX_WideStringArray& Names)
+void CFX_FontMgrImp::GetNames(const uint8_t* name_table, CFX_WideStringArray& Names)
{
if (NULL == name_table) {
return;
}
- FX_LPBYTE lpTable = (FX_LPBYTE)name_table;
+ uint8_t* lpTable = (uint8_t*)name_table;
CFX_WideString wsFamily;
- FX_LPBYTE sp = lpTable + 2;
- FX_LPBYTE lpNameRecord = lpTable + 6;
+ uint8_t* sp = lpTable + 2;
+ uint8_t* lpNameRecord = lpTable + 6;
uint16_t nNameCount = GetUInt16(sp);
- FX_LPBYTE lpStr = lpTable + GetUInt16(sp + 2);
+ uint8_t* lpStr = lpTable + GetUInt16(sp + 2);
for (uint16_t j = 0; j < nNameCount; j++) {
uint16_t nNameID = GetUInt16(lpNameRecord + j * 12 + 6);
if (nNameID != 1) {
@@ -1482,7 +1482,7 @@ void CFX_FontMgrImp::NormalizeFontName( CFX_WideString& FontName )
}
int32_t CFX_FontMgrImp::IsPartName( const CFX_WideString& Name1, const CFX_WideString& Name2 )
{
- if (Name1.Find((FX_LPCWSTR)Name2) != -1) {
+ if (Name1.Find((const FX_WCHAR*)Name2) != -1) {
return 1;
}
return 0;
diff --git a/xfa/src/fgas/src/font/fx_stdfontmgr.h b/xfa/src/fgas/src/font/fx_stdfontmgr.h
index 37b0b63da0..3377995b70 100644
--- a/xfa/src/fgas/src/font/fx_stdfontmgr.h
+++ b/xfa/src/fgas/src/font/fx_stdfontmgr.h
@@ -8,24 +8,24 @@
#define _FX_FONTMGR_IMP
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
int32_t FX_GetSimilarValue(FX_LPCFONTDESCRIPTOR pFont, FX_DWORD dwFontStyles);
-FX_LPCFONTDESCRIPTOR FX_DefFontMatcher(FX_LPFONTMATCHPARAMS pParams, const CFX_FontDescriptors &fonts, FX_LPVOID pUserData);
+FX_LPCFONTDESCRIPTOR FX_DefFontMatcher(FX_LPFONTMATCHPARAMS pParams, const CFX_FontDescriptors &fonts, void* pUserData);
class CFX_StdFontMgrImp : public IFX_FontMgr
{
public:
- CFX_StdFontMgrImp(FX_LPEnumAllFonts pEnumerator, FX_LPMatchFont pMatcher, FX_LPVOID pUserData);
+ CFX_StdFontMgrImp(FX_LPEnumAllFonts pEnumerator, FX_LPMatchFont pMatcher, void* pUserData);
~CFX_StdFontMgrImp();
virtual void Release()
{
delete this;
}
- virtual IFX_Font* GetDefFontByCodePage(FX_WORD wCodePage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL);
- virtual IFX_Font* GetDefFontByCharset(uint8_t nCharset, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL);
- virtual IFX_Font* GetDefFontByUnicode(FX_WCHAR wUnicode, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL);
- virtual IFX_Font* GetDefFontByLanguage(FX_WORD wLanguage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL);
- virtual IFX_Font* LoadFont(FX_LPCWSTR pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF);
- virtual IFX_Font* LoadFont(FX_LPCBYTE pBuffer, int32_t iLength);
- virtual IFX_Font* LoadFont(FX_LPCWSTR pszFileName);
- virtual IFX_Font* LoadFont(IFX_Stream *pFontStream, FX_LPCWSTR pszFontAlias = NULL, FX_DWORD dwFontStyles = 0, FX_WORD wCodePage = 0, FX_BOOL bSaveStream = FALSE);
+ virtual IFX_Font* GetDefFontByCodePage(FX_WORD wCodePage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL);
+ virtual IFX_Font* GetDefFontByCharset(uint8_t nCharset, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL);
+ virtual IFX_Font* GetDefFontByUnicode(FX_WCHAR wUnicode, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL);
+ virtual IFX_Font* GetDefFontByLanguage(FX_WORD wLanguage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL);
+ virtual IFX_Font* LoadFont(const FX_WCHAR* pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF);
+ virtual IFX_Font* LoadFont(const uint8_t* pBuffer, int32_t iLength);
+ virtual IFX_Font* LoadFont(const FX_WCHAR* pszFileName);
+ virtual IFX_Font* LoadFont(IFX_Stream *pFontStream, const FX_WCHAR* pszFontAlias = NULL, FX_DWORD dwFontStyles = 0, FX_WORD wCodePage = 0, FX_BOOL bSaveStream = FALSE);
virtual IFX_Font* LoadFont(IFX_Font *pSrcFont, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF);
virtual void ClearFontCache();
virtual void RemoveFont(IFX_Font *pFont);
@@ -41,9 +41,9 @@ protected:
CFX_MapPtrToPtr m_FileFonts;
CFX_MapPtrToPtr m_StreamFonts;
CFX_MapPtrToPtr m_DeriveFonts;
- FX_LPVOID m_pUserData;
+ void* m_pUserData;
void RemoveFont(CFX_MapPtrToPtr &fontMap, IFX_Font *pFont);
- FX_LPCFONTDESCRIPTOR FindFont(FX_LPCWSTR pszFontFamily, FX_DWORD dwFontStyles, FX_DWORD dwMatchFlags, FX_WORD wCodePage, FX_DWORD dwUSB = 999, FX_WCHAR wUnicode = 0);
+ FX_LPCFONTDESCRIPTOR FindFont(const FX_WCHAR* pszFontFamily, FX_DWORD dwFontStyles, FX_DWORD dwMatchFlags, FX_WORD wCodePage, FX_DWORD dwUSB = 999, FX_WCHAR wUnicode = 0);
IFX_Font* GetFont(FX_LPCFONTDESCRIPTOR pFD, FX_DWORD dwFontStyles);
};
FX_DWORD FX_GetGdiFontStyles(const LOGFONTW &lf);
@@ -112,8 +112,8 @@ public:
{
delete this;
};
- virtual FX_POSITION GetStartPosition(FX_LPVOID pUserData = NULL);
- virtual IFX_FileAccess* GetNext(FX_POSITION& pos, FX_LPVOID pUserData = NULL);
+ virtual FX_POSITION GetStartPosition(void* pUserData = NULL);
+ virtual IFX_FileAccess* GetNext(FX_POSITION& pos, void* pUserData = NULL);
private:
CFX_ByteString GetNextFile();
CFX_WideString m_wsNext;
@@ -130,25 +130,25 @@ typedef CFX_MapPtrTemplate<IFX_Font*, IFX_FileRead*> CFX_FonStreamtMap;
class CFX_FontMgrImp : public IFX_FontMgr
{
public:
- CFX_FontMgrImp(IFX_FontSourceEnum* pFontEnum, IFX_FontMgrDelegate* pDelegate = NULL, FX_LPVOID pUserData = NULL);
+ CFX_FontMgrImp(IFX_FontSourceEnum* pFontEnum, IFX_FontMgrDelegate* pDelegate = NULL, void* pUserData = NULL);
virtual void Release();
- virtual IFX_Font* GetDefFontByCodePage(FX_WORD wCodePage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL);
- virtual IFX_Font* GetDefFontByCharset(uint8_t nCharset, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL);
- virtual IFX_Font* GetDefFontByUnicode(FX_WCHAR wUnicode, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL);
- virtual IFX_Font* GetDefFontByLanguage(FX_WORD wLanguage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL);
- virtual IFX_Font* GetFontByCodePage(FX_WORD wCodePage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL);
- virtual IFX_Font* GetFontByCharset(uint8_t nCharset, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL);
- virtual IFX_Font* GetFontByUnicode(FX_WCHAR wUnicode, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL);
- virtual IFX_Font* GetFontByLanguage(FX_WORD wLanguage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL);
- virtual IFX_Font* LoadFont(FX_LPCBYTE pBuffer, int32_t iLength, int32_t iFaceIndex, int32_t* pFaceCount);
- virtual IFX_Font* LoadFont(FX_LPCWSTR pszFileName, int32_t iFaceIndex, int32_t* pFaceCount);
+ virtual IFX_Font* GetDefFontByCodePage(FX_WORD wCodePage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL);
+ virtual IFX_Font* GetDefFontByCharset(uint8_t nCharset, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL);
+ virtual IFX_Font* GetDefFontByUnicode(FX_WCHAR wUnicode, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL);
+ virtual IFX_Font* GetDefFontByLanguage(FX_WORD wLanguage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL);
+ virtual IFX_Font* GetFontByCodePage(FX_WORD wCodePage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL);
+ virtual IFX_Font* GetFontByCharset(uint8_t nCharset, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL);
+ virtual IFX_Font* GetFontByUnicode(FX_WCHAR wUnicode, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL);
+ virtual IFX_Font* GetFontByLanguage(FX_WORD wLanguage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL);
+ virtual IFX_Font* LoadFont(const uint8_t* pBuffer, int32_t iLength, int32_t iFaceIndex, int32_t* pFaceCount);
+ virtual IFX_Font* LoadFont(const FX_WCHAR* pszFileName, int32_t iFaceIndex, int32_t* pFaceCount);
virtual IFX_Font* LoadFont(IFX_Stream* pFontStream, int32_t iFaceIndex, int32_t* pFaceCount, FX_BOOL bSaveStream = FALSE);
virtual void ClearFontCache();
virtual void RemoveFont(IFX_Font* pFont);
FX_BOOL EnumFonts();
protected:
void ReportFace(FXFT_Face pFace, CFX_FontDescriptors& Fonts, IFX_FileAccess* pFontAccess);
- void GetNames(FX_LPCBYTE name_table, CFX_WideStringArray& Names);
+ void GetNames(const uint8_t* name_table, CFX_WideStringArray& Names);
void GetCharsets(FXFT_Face pFace, CFX_WordArray& Charsets);
void GetUSBCSB(FXFT_Face pFace, FX_DWORD* USB, FX_DWORD* CSB);
FX_DWORD GetFlags(FXFT_Face pFace);
@@ -169,7 +169,7 @@ protected:
CFX_UnicodeFontMap m_FailedUnicodes2NULL;
IFX_FontSourceEnum* m_pFontSource;
IFX_FontMgrDelegate* m_pDelegate;
- FX_LPVOID m_pUserData;
+ void* m_pUserData;
};
#endif
#endif
diff --git a/xfa/src/fgas/src/layout/fx_linebreak.cpp b/xfa/src/fgas/src/layout/fx_linebreak.cpp
index dde8b8cc61..e4a0987fd7 100644
--- a/xfa/src/fgas/src/layout/fx_linebreak.cpp
+++ b/xfa/src/fgas/src/layout/fx_linebreak.cpp
@@ -72,7 +72,7 @@ extern const FX_LINEBREAKTYPE gs_FX_LineBreak_PairTable[64][32] = {
{FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN},
{FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN},
};
-void FX_GetLineBreakPositions(FX_LPCWSTR pwsText, FX_LINEBREAKTYPE *pBrkType, int32_t iLength)
+void FX_GetLineBreakPositions(const FX_WCHAR* pwsText, FX_LINEBREAKTYPE *pBrkType, int32_t iLength)
{
if (iLength < 2) {
return;
@@ -94,7 +94,7 @@ void FX_GetLineBreakPositions(FX_LPCWSTR pwsText, FX_LINEBREAKTYPE *pBrkType, in
}
pBrkType[iLength] = FX_LBT_INDIRECT_BRK;
}
-void FX_GetLineBreakPositions(FX_LPCWSTR pwsText, int32_t iLength, CFX_Int32MassArray &bp)
+void FX_GetLineBreakPositions(const FX_WCHAR* pwsText, int32_t iLength, CFX_Int32MassArray &bp)
{
if (iLength < 2) {
return;
diff --git a/xfa/src/fgas/src/layout/fx_rtfbreak.cpp b/xfa/src/fgas/src/layout/fx_rtfbreak.cpp
index 95c9118f90..44b0dc8fdd 100644
--- a/xfa/src/fgas/src/layout/fx_rtfbreak.cpp
+++ b/xfa/src/fgas/src/layout/fx_rtfbreak.cpp
@@ -1190,7 +1190,7 @@ int32_t CFX_RTFBreak::GetDisplayPos(FX_LPCRTFTEXTOBJ pText, FXTEXT_CHARPOS *pCha
return 0;
}
FXSYS_assert(pText->pStr != NULL && pText->pWidths != NULL && pText->pFont != NULL && pText->pRect != NULL);
- FX_LPCWSTR pStr = pText->pStr;
+ const FX_WCHAR* pStr = pText->pStr;
int32_t *pWidths = pText->pWidths;
int32_t iLength = pText->iLength - 1;
IFX_Font *pFont = pText->pFont;
@@ -1423,7 +1423,7 @@ int32_t CFX_RTFBreak::GetCharRects(FX_LPCRTFTEXTOBJ pText, CFX_RectFArray &rtArr
return 0;
}
FXSYS_assert(pText->pStr != NULL && pText->pWidths != NULL && pText->pFont != NULL && pText->pRect != NULL);
- FX_LPCWSTR pStr = pText->pStr;
+ const FX_WCHAR* pStr = pText->pStr;
int32_t *pWidths = pText->pWidths;
int32_t iLength = pText->iLength;
CFX_RectF rect(*pText->pRect);
diff --git a/xfa/src/fgas/src/layout/fx_textbreak.cpp b/xfa/src/fgas/src/layout/fx_textbreak.cpp
index 80d56c7191..7a740f5212 100644
--- a/xfa/src/fgas/src/layout/fx_textbreak.cpp
+++ b/xfa/src/fgas/src/layout/fx_textbreak.cpp
@@ -216,7 +216,7 @@ void CFX_TxtBreak::SetCombWidth(FX_FLOAT fCombWidth)
{
m_iCombWidth = FXSYS_round(fCombWidth * 20000.0f);
}
-void CFX_TxtBreak::SetUserData(FX_LPVOID pUserData)
+void CFX_TxtBreak::SetUserData(void* pUserData)
{
if (m_pUserData == pUserData) {
return;
@@ -1183,8 +1183,8 @@ int32_t CFX_TxtBreak::GetDisplayPos(FX_LPCTXTRUN pTxtRun, FXTEXT_CHARPOS *pCharP
return 0;
}
IFX_TxtAccess *pAccess = pTxtRun->pAccess;
- FX_LPVOID pIdentity = pTxtRun->pIdentity;
- FX_LPCWSTR pStr = pTxtRun->pStr;
+ void* pIdentity = pTxtRun->pIdentity;
+ const FX_WCHAR* pStr = pTxtRun->pStr;
int32_t *pWidths = pTxtRun->pWidths;
int32_t iLength = pTxtRun->iLength - 1;
IFX_Font *pFont = pTxtRun->pFont;
@@ -1550,8 +1550,8 @@ int32_t CFX_TxtBreak::GetCharRects(FX_LPCTXTRUN pTxtRun, CFX_RectFArray &rtArray
return 0;
}
IFX_TxtAccess *pAccess = pTxtRun->pAccess;
- FX_LPVOID pIdentity = pTxtRun->pIdentity;
- FX_LPCWSTR pStr = pTxtRun->pStr;
+ void* pIdentity = pTxtRun->pIdentity;
+ const FX_WCHAR* pStr = pTxtRun->pStr;
int32_t *pWidths = pTxtRun->pWidths;
int32_t iLength = pTxtRun->iLength;
CFX_RectF rect(*pTxtRun->pRect);
diff --git a/xfa/src/fgas/src/layout/fx_textbreak.h b/xfa/src/fgas/src/layout/fx_textbreak.h
index c38fc0b1ba..13e79dae60 100644
--- a/xfa/src/fgas/src/layout/fx_textbreak.h
+++ b/xfa/src/fgas/src/layout/fx_textbreak.h
@@ -45,7 +45,7 @@ public:
void GetString(CFX_WideString &wsStr) const
{
int32_t iCount = m_pLineChars->GetSize();
- FX_LPWSTR pBuf = wsStr.GetBuffer(iCount);
+ FX_WCHAR* pBuf = wsStr.GetBuffer(iCount);
CFX_Char *pChar;
for (int32_t i = 0; i < iCount; i ++) {
pChar = m_pLineChars->GetDataPtr(i);
@@ -96,7 +96,7 @@ public:
virtual FX_DWORD GetContextCharStyles() const;
virtual void SetContextCharStyles(FX_DWORD dwCharStyles);
virtual void SetCombWidth(FX_FLOAT fCombWidth);
- virtual void SetUserData(FX_LPVOID pUserData);
+ virtual void SetUserData(void* pUserData);
virtual FX_DWORD AppendChar(FX_WCHAR wch);
virtual FX_DWORD EndBreak(FX_DWORD dwStatus = FX_TXTBREAK_PieceBreak);
virtual int32_t CountBreakChars() const;
@@ -139,7 +139,7 @@ protected:
int32_t m_iAlignment;
FX_DWORD m_dwContextCharStyles;
int32_t m_iCombWidth;
- FX_LPVOID m_pUserData;
+ void* m_pUserData;
FX_DWORD m_dwCharType;
FX_BOOL m_bCurRTL;
int32_t m_iCurAlignment;
diff --git a/xfa/src/fgas/src/localization/fx_locale.cpp b/xfa/src/fgas/src/localization/fx_locale.cpp
index 4f046df119..8e564354a7 100644
--- a/xfa/src/fgas/src/localization/fx_locale.cpp
+++ b/xfa/src/fgas/src/localization/fx_locale.cpp
@@ -15,7 +15,7 @@
#define FX_LOCALECATEGORY_NullHash 0x052931bb
typedef struct _FX_LOCALESUBCATEGORYINFO {
uint32_t uHash;
- FX_LPCWSTR pName;
+ const FX_WCHAR* pName;
int32_t eSubCategory;
} FX_LOCALESUBCATEGORYINFO, * FX_LPLOCALESUBCATEGORYINFO;
typedef FX_LOCALESUBCATEGORYINFO const * FX_LPCLOCALESUBCATEGORYINFO;
@@ -57,10 +57,10 @@ static FX_STRSIZE FX_Local_Find(FX_WSTR wsSymbols, FX_WCHAR ch, FX_STRSIZE nStar
if (nLength < 1 || nStart > nLength) {
return -1;
}
- FX_LPCWSTR lpsz = (FX_LPCWSTR)FXSYS_wcschr(wsSymbols.GetPtr() + nStart, ch);
+ const FX_WCHAR* lpsz = (const FX_WCHAR*)FXSYS_wcschr(wsSymbols.GetPtr() + nStart, ch);
return (lpsz == NULL) ? -1 : (FX_STRSIZE)(lpsz - wsSymbols.GetPtr());
}
-const static FX_LPCWSTR gs_LocalNumberSymbols[] = {
+static const FX_WCHAR* const gs_LocalNumberSymbols[] = {
L"decimal", L"grouping", L"percent", L"minus", L"zero",
L"currencySymbol", L"currencyName",
};
@@ -163,7 +163,7 @@ void CFX_Locale::GetMeridiemName(CFX_WideString& wsMeridiemName, FX_BOOL bAM ) c
}
FX_GetCalendarSymbol(m_pElement, "meridiem", bAM ? 0 : 1, FALSE, wsMeridiemName);
}
-static int32_t FX_ParseTimeZone(FX_LPCWSTR pStr, int32_t iLen, FX_TIMEZONE& tz)
+static int32_t FX_ParseTimeZone(const FX_WCHAR* pStr, int32_t iLen, FX_TIMEZONE& tz)
{
tz.tzHour = 0;
tz.tzMinute = 0;
@@ -293,7 +293,7 @@ static FX_BOOL FX_WStringToNumeric(const CFX_WideString& wsValue, CFX_LCNumeric&
const int32_t nIntegralMaxLen = 17;
int32_t cc = 0;
FX_BOOL bNegative = FALSE, bExpSign = FALSE;
- FX_LPCWSTR str = (FX_LPCWSTR)wsValue;
+ const FX_WCHAR* str = (const FX_WCHAR*)wsValue;
int32_t len = wsValue.GetLength();
while (cc < len && FX_IsSpace(str[cc])) {
cc++;
@@ -436,7 +436,7 @@ CFX_WideString CFX_LCNumeric::ToString(int32_t nTreading, FX_BOOL bTrimTailZeros
const int32_t nIntegralMaxLen = 17;
int32_t cc = 0;
FX_BOOL bNegative = FALSE, bExpSign = FALSE;
- FX_LPCWSTR str = (FX_LPCWSTR)m_wsValue;
+ const FX_WCHAR* str = (const FX_WCHAR*)m_wsValue;
int32_t len = m_wsValue.GetLength();
while (cc < len && FX_IsSpace(str[cc])) {
cc++;
@@ -504,8 +504,8 @@ CFX_WideString CFX_LCNumeric::ToString(int32_t nTreading, FX_BOOL bTrimTailZeros
wsFormat.Format(L"%%.%dG", nTreading);
double dblMantissa = (dbValeu > 0) ? (dbValeu - iInte) : (iInte - dbValeu);
CFX_WideString wsFrac;
- wsFrac.Format((FX_LPCWSTR)wsFormat, dblMantissa);
- wsResult += CFX_WideStringC((FX_LPCWSTR)wsFrac + 1, wsFrac.GetLength() - 1);
+ wsFrac.Format((const FX_WCHAR*)wsFormat, dblMantissa);
+ wsResult += CFX_WideStringC((const FX_WCHAR*)wsFrac + 1, wsFrac.GetLength() - 1);
if (bTrimTailZeros && nTreading > 0) {
wsResult.TrimRight(L"0");
wsResult.TrimRight(L".");
@@ -515,7 +515,7 @@ CFX_WideString CFX_LCNumeric::ToString(int32_t nTreading, FX_BOOL bTrimTailZeros
CFX_WideString wsFormat;
wsFormat.Format(L"%%.%df", nTreading);
CFX_WideString wsResult;
- wsResult.Format(FX_LPCWSTR(wsFormat), GetDouble());
+ wsResult.Format(wsFormat.c_str(), GetDouble());
if (bTrimTailZeros && nTreading > 0) {
wsResult.TrimRight(L"0");
wsResult.TrimRight(L".");
@@ -540,9 +540,9 @@ CFX_FormatString::~CFX_FormatString()
void CFX_FormatString::SplitFormatString(const CFX_WideString& wsFormatString, CFX_WideStringArray& wsPatterns)
{
int32_t iStrLen = wsFormatString.GetLength();
- FX_LPCWSTR pStr = (FX_LPCWSTR)wsFormatString;
- FX_LPCWSTR pToken = pStr;
- FX_LPCWSTR pEnd = pStr + iStrLen;
+ const FX_WCHAR* pStr = (const FX_WCHAR*)wsFormatString;
+ const FX_WCHAR* pToken = pStr;
+ const FX_WCHAR* pEnd = pStr + iStrLen;
FX_BOOL iQuote = FALSE;
while (TRUE) {
if (pStr >= pEnd) {
@@ -559,7 +559,7 @@ void CFX_FormatString::SplitFormatString(const CFX_WideString& wsFormatString, C
pStr ++;
}
}
-static CFX_WideString FX_GetLiteralText(FX_LPCWSTR pStrPattern, int32_t &iPattern, int32_t iLenPattern)
+static CFX_WideString FX_GetLiteralText(const FX_WCHAR* pStrPattern, int32_t &iPattern, int32_t iLenPattern)
{
CFX_WideString wsOutput;
if (pStrPattern[iPattern] != '\'') {
@@ -599,7 +599,7 @@ static CFX_WideString FX_GetLiteralText(FX_LPCWSTR pStrPattern, int32_t &iPatter
}
return wsOutput;
}
-static CFX_WideString FX_GetLiteralTextReverse(FX_LPCWSTR pStrPattern, int32_t &iPattern)
+static CFX_WideString FX_GetLiteralTextReverse(const FX_WCHAR* pStrPattern, int32_t &iPattern)
{
CFX_WideString wsOutput;
if (pStrPattern[iPattern] != '\'') {
@@ -646,7 +646,7 @@ FX_LOCALECATEGORY CFX_FormatString::GetCategory(const CFX_WideString& wsPattern)
FX_LOCALECATEGORY eCategory = FX_LOCALECATEGORY_Unknown;
int32_t ccf = 0;
int32_t iLenf = wsPattern.GetLength();
- FX_LPCWSTR pStr = (FX_LPCWSTR)wsPattern;
+ const FX_WCHAR* pStr = (const FX_WCHAR*)wsPattern;
FX_BOOL bBraceOpen = FALSE;
while (ccf < iLenf) {
if (pStr[ccf] == '\'') {
@@ -697,7 +697,7 @@ FX_LOCALECATEGORY CFX_FormatString::GetCategory(const CFX_WideString& wsPattern)
}
return eCategory;
}
-static FX_WORD FX_WStringToLCID(FX_LPCWSTR pstrLCID)
+static FX_WORD FX_WStringToLCID(const FX_WCHAR* pstrLCID)
{
if (!pstrLCID) {
return 0;
@@ -713,7 +713,7 @@ CFX_WideString CFX_FormatString::GetLocaleName(const CFX_WideString& wsPattern)
{
int32_t ccf = 0;
int32_t iLenf = wsPattern.GetLength();
- FX_LPCWSTR pStr = (FX_LPCWSTR)wsPattern;
+ const FX_WCHAR* pStr = (const FX_WCHAR*)wsPattern;
while (ccf < iLenf) {
if (pStr[ccf] == '\'') {
FX_GetLiteralText(pStr, ccf, iLenf);
@@ -734,7 +734,7 @@ IFX_Locale* CFX_FormatString::GetTextFormat(const CFX_WideString &wsPattern, FX_
IFX_Locale* pLocale = NULL;
int32_t ccf = 0;
int32_t iLenf = wsPattern.GetLength();
- FX_LPCWSTR pStr = (FX_LPCWSTR)wsPattern;
+ const FX_WCHAR* pStr = (const FX_WCHAR*)wsPattern;
FX_BOOL bBrackOpen = FALSE;
while (ccf < iLenf) {
if (pStr[ccf] == '\'') {
@@ -787,7 +787,7 @@ IFX_Locale* CFX_FormatString::GetNumericFormat(const CFX_WideString& wsPattern,
IFX_Locale* pLocale = NULL;
int32_t ccf = 0;
int32_t iLenf = wsPattern.GetLength();
- FX_LPCWSTR pStr = (FX_LPCWSTR)wsPattern;
+ const FX_WCHAR* pStr = (const FX_WCHAR*)wsPattern;
FX_BOOL bFindDot = FALSE;
FX_BOOL bBrackOpen = FALSE;
while (ccf < iLenf) {
@@ -882,12 +882,12 @@ static FX_BOOL FX_GetNumericDotIndex(const CFX_WideString& wsNum, const CFX_Wide
{
int32_t ccf = 0;
int32_t iLenf = wsNum.GetLength();
- FX_LPCWSTR pStr = (FX_LPCWSTR)wsNum;
+ const FX_WCHAR* pStr = (const FX_WCHAR*)wsNum;
int32_t iLenDot = wsDotSymbol.GetLength();
while (ccf < iLenf) {
if (pStr[ccf] == '\'') {
FX_GetLiteralText(pStr, ccf, iLenf);
- } else if (ccf + iLenDot <= iLenf && !FXSYS_wcsncmp(pStr + ccf, (FX_LPCWSTR)wsDotSymbol, iLenDot)) {
+ } else if (ccf + iLenDot <= iLenf && !FXSYS_wcsncmp(pStr + ccf, (const FX_WCHAR*)wsDotSymbol, iLenDot)) {
iDotIndex = ccf;
return TRUE;
}
@@ -912,16 +912,16 @@ FX_BOOL CFX_FormatString::ParseText(const CFX_WideString& wsSrcText, const CFX_W
return FALSE;
}
int32_t iText = 0, iPattern = 0;
- FX_LPCWSTR pStrText = (FX_LPCWSTR)wsSrcText;
+ const FX_WCHAR* pStrText = (const FX_WCHAR*)wsSrcText;
int32_t iLenText = wsSrcText.GetLength();
- FX_LPCWSTR pStrPattern = (FX_LPCWSTR)wsTextFormat;
+ const FX_WCHAR* pStrPattern = (const FX_WCHAR*)wsTextFormat;
int32_t iLenPattern = wsTextFormat.GetLength();
while (iPattern < iLenPattern && iText < iLenText) {
switch (pStrPattern[iPattern]) {
case '\'': {
CFX_WideString wsLiteral = FX_GetLiteralText(pStrPattern, iPattern, iLenPattern);
int32_t iLiteralLen = wsLiteral.GetLength();
- if (iText + iLiteralLen > iLenText || FXSYS_wcsncmp(pStrText + iText, (FX_LPCWSTR)wsLiteral, iLiteralLen)) {
+ if (iText + iLiteralLen > iLenText || FXSYS_wcsncmp(pStrText + iText, (const FX_WCHAR*)wsLiteral, iLiteralLen)) {
wsValue = wsSrcText;
return FALSE;
}
@@ -992,9 +992,9 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
pLocale->GetNumbericSymbol(FX_LOCALENUMSYMBOL_Minus, wsMinus);
int32_t iMinusLen = wsMinus.GetLength();
int cc = 0, ccf = 0;
- FX_LPCWSTR str = (FX_LPCWSTR)wsSrcNum;
+ const FX_WCHAR* str = (const FX_WCHAR*)wsSrcNum;
int len = wsSrcNum.GetLength();
- FX_LPCWSTR strf = (FX_LPCWSTR)wsNumFormat;
+ const FX_WCHAR* strf = (const FX_WCHAR*)wsNumFormat;
int lenf = wsNumFormat.GetLength();
double dbRetValue = 0;
double coeff = 1;
@@ -1015,7 +1015,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
CFX_WideString wsLiteral = FX_GetLiteralTextReverse(strf, ccf);
int32_t iLiteralLen = wsLiteral.GetLength();
cc -= iLiteralLen - 1;
- if (cc < 0 || FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsLiteral, iLiteralLen)) {
+ if (cc < 0 || FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsLiteral, iLiteralLen)) {
return FALSE;
}
cc--;
@@ -1052,7 +1052,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
cc--;
} else {
cc -= iMinusLen - 1;
- if (cc < 0 || FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsMinus, iMinusLen)) {
+ if (cc < 0 || FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsMinus, iMinusLen)) {
return FALSE;
}
cc--;
@@ -1065,7 +1065,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
cc--;
} else {
cc -= iMinusLen - 1;
- if (cc < 0 || FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsMinus, iMinusLen)) {
+ if (cc < 0 || FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsMinus, iMinusLen)) {
return FALSE;
}
cc--;
@@ -1089,7 +1089,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
} else if (str[cc] == '+') {
cc--;
continue;
- } else if (cc - iMinusLen + 1 > 0 && !FXSYS_wcsncmp(str + (cc - iMinusLen + 1), (FX_LPCWSTR)wsMinus, iMinusLen)) {
+ } else if (cc - iMinusLen + 1 > 0 && !FXSYS_wcsncmp(str + (cc - iMinusLen + 1), (const FX_WCHAR*)wsMinus, iMinusLen)) {
bExpSign = TRUE;
cc -= iMinusLen;
} else {
@@ -1106,7 +1106,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
pLocale->GetNumbericSymbol(FX_LOCALENUMSYMBOL_CurrencySymbol, wsSymbol);
int32_t iSymbolLen = wsSymbol.GetLength();
cc -= iSymbolLen - 1;
- if (cc < 0 || FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsSymbol, iSymbolLen)) {
+ if (cc < 0 || FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsSymbol, iSymbolLen)) {
return FALSE;
}
cc--;
@@ -1170,7 +1170,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
pLocale->GetNumbericSymbol(FX_LOCALENUMSYMBOL_Percent, wsSymbol);
int32_t iSysmbolLen = wsSymbol.GetLength();
cc -= iSysmbolLen - 1;
- if (cc < 0 || FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsSymbol, iSysmbolLen)) {
+ if (cc < 0 || FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsSymbol, iSysmbolLen)) {
return FALSE;
}
cc--;
@@ -1191,7 +1191,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
case ',': {
if (cc >= 0) {
cc -= iGroupLen - 1;
- if (cc >= 0 && FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsGroupSymbol, iGroupLen) == 0) {
+ if (cc >= 0 && FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsGroupSymbol, iGroupLen) == 0) {
cc--;
} else {
cc += iGroupLen - 1;
@@ -1237,7 +1237,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
CFX_WideString wsLiteral = FX_GetLiteralTextReverse(strf, ccf);
int32_t iLiteralLen = wsLiteral.GetLength();
cc -= iLiteralLen - 1;
- if (cc < 0 || FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsLiteral, iLiteralLen)) {
+ if (cc < 0 || FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsLiteral, iLiteralLen)) {
return FALSE;
}
cc--;
@@ -1278,7 +1278,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
cc--;
} else {
cc -= iMinusLen - 1;
- if (cc < 0 || FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsMinus, iMinusLen)) {
+ if (cc < 0 || FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsMinus, iMinusLen)) {
return FALSE;
}
cc--;
@@ -1291,7 +1291,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
cc--;
} else {
cc -= iMinusLen - 1;
- if (cc < 0 || FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsMinus, iMinusLen)) {
+ if (cc < 0 || FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsMinus, iMinusLen)) {
return FALSE;
}
cc--;
@@ -1315,7 +1315,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
} else if (str[cc] == '+') {
cc--;
continue;
- } else if (cc - iMinusLen + 1 > 0 && !FXSYS_wcsncmp(str + (cc - iMinusLen + 1), (FX_LPCWSTR)wsMinus, iMinusLen)) {
+ } else if (cc - iMinusLen + 1 > 0 && !FXSYS_wcsncmp(str + (cc - iMinusLen + 1), (const FX_WCHAR*)wsMinus, iMinusLen)) {
bExpSign = TRUE;
cc -= iMinusLen;
} else {
@@ -1332,7 +1332,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
pLocale->GetNumbericSymbol(FX_LOCALENUMSYMBOL_CurrencySymbol, wsSymbol);
int32_t iSymbolLen = wsSymbol.GetLength();
cc -= iSymbolLen - 1;
- if (cc < 0 || FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsSymbol, iSymbolLen)) {
+ if (cc < 0 || FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsSymbol, iSymbolLen)) {
return FALSE;
}
cc--;
@@ -1396,7 +1396,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
pLocale->GetNumbericSymbol(FX_LOCALENUMSYMBOL_Percent, wsSymbol);
int32_t iSysmbolLen = wsSymbol.GetLength();
cc -= iSysmbolLen - 1;
- if (cc < 0 || FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsSymbol, iSysmbolLen)) {
+ if (cc < 0 || FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsSymbol, iSysmbolLen)) {
return FALSE;
}
cc--;
@@ -1409,7 +1409,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
case ',': {
if (cc >= 0) {
cc -= iGroupLen - 1;
- if (cc >= 0 && FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsGroupSymbol, iGroupLen) == 0) {
+ if (cc >= 0 && FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsGroupSymbol, iGroupLen) == 0) {
cc--;
} else {
cc += iGroupLen - 1;
@@ -1456,7 +1456,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
case '\'': {
CFX_WideString wsLiteral = FX_GetLiteralText(strf, ccf, lenf);
int32_t iLiteralLen = wsLiteral.GetLength();
- if (cc + iLiteralLen > len || FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsLiteral, iLiteralLen)) {
+ if (cc + iLiteralLen > len || FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsLiteral, iLiteralLen)) {
return FALSE;
}
cc += iLiteralLen;
@@ -1498,7 +1498,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
if (str[cc] == '+' || str[cc] == ' ') {
cc++;
} else {
- if (cc + iMinusLen > len || FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsMinus, iMinusLen)) {
+ if (cc + iMinusLen > len || FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsMinus, iMinusLen)) {
return FALSE;
}
bNeg = TRUE;
@@ -1510,7 +1510,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
if (str[cc] == '+') {
cc++;
} else {
- if (cc + iMinusLen > len || FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsMinus, iMinusLen)) {
+ if (cc + iMinusLen > len || FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsMinus, iMinusLen)) {
return FALSE;
}
bNeg = TRUE;
@@ -1547,7 +1547,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
CFX_WideString wsSymbol;
pLocale->GetNumbericSymbol(FX_LOCALENUMSYMBOL_CurrencySymbol, wsSymbol);
int32_t iSymbolLen = wsSymbol.GetLength();
- if (cc + iSymbolLen > len || FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsSymbol, iSymbolLen)) {
+ if (cc + iSymbolLen > len || FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsSymbol, iSymbolLen)) {
return FALSE;
}
cc += iSymbolLen;
@@ -1602,7 +1602,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
CFX_WideString wsSymbol;
pLocale->GetNumbericSymbol(FX_LOCALENUMSYMBOL_Percent, wsSymbol);
int32_t iSysmbolLen = wsSymbol.GetLength();
- if (cc + iSysmbolLen <= len && !FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsSymbol, iSysmbolLen)) {
+ if (cc + iSysmbolLen <= len && !FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsSymbol, iSysmbolLen)) {
cc += iSysmbolLen;
}
ccf++;
@@ -1621,7 +1621,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
}
break;
case ',': {
- if (cc + iGroupLen <= len && FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsGroupSymbol, iGroupLen) == 0) {
+ if (cc + iGroupLen <= len && FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsGroupSymbol, iGroupLen) == 0) {
cc += iGroupLen;
}
ccf++;
@@ -1672,8 +1672,8 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
void FX_ParseNumString(const CFX_WideString& wsNum, CFX_WideString& wsResult)
{
int32_t iCount = wsNum.GetLength();
- FX_LPCWSTR pStr = (FX_LPCWSTR)wsNum;
- FX_LPWSTR pDst = wsResult.GetBuffer(iCount);
+ const FX_WCHAR* pStr = (const FX_WCHAR*)wsNum;
+ FX_WCHAR* pDst = wsResult.GetBuffer(iCount);
int32_t nIndex = 0;
FX_BOOL bMinus = FALSE;
int32_t i = 0;
@@ -1741,9 +1741,9 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
pLocale->GetNumbericSymbol(FX_LOCALENUMSYMBOL_Minus, wsMinus);
int32_t iMinusLen = wsMinus.GetLength();
int cc = 0, ccf = 0;
- FX_LPCWSTR str = (FX_LPCWSTR)wsSrcNum;
+ const FX_WCHAR* str = (const FX_WCHAR*)wsSrcNum;
int len = wsSrcNum.GetLength();
- FX_LPCWSTR strf = (FX_LPCWSTR)wsNumFormat;
+ const FX_WCHAR* strf = (const FX_WCHAR*)wsNumFormat;
int lenf = wsNumFormat.GetLength();
FX_BOOL bHavePercentSymbol = FALSE;
FX_BOOL bNeg = FALSE;
@@ -1761,7 +1761,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
CFX_WideString wsLiteral = FX_GetLiteralTextReverse(strf, ccf);
int32_t iLiteralLen = wsLiteral.GetLength();
cc -= iLiteralLen - 1;
- if (cc < 0 || FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsLiteral, iLiteralLen)) {
+ if (cc < 0 || FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsLiteral, iLiteralLen)) {
return FALSE;
}
cc--;
@@ -1799,7 +1799,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
cc--;
} else {
cc -= iMinusLen - 1;
- if (cc < 0 || FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsMinus, iMinusLen)) {
+ if (cc < 0 || FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsMinus, iMinusLen)) {
return FALSE;
}
cc--;
@@ -1812,7 +1812,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
cc--;
} else {
cc -= iMinusLen - 1;
- if (cc < 0 || FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsMinus, iMinusLen)) {
+ if (cc < 0 || FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsMinus, iMinusLen)) {
return FALSE;
}
cc--;
@@ -1836,7 +1836,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
} else if (str[cc] == '+') {
cc--;
continue;
- } else if (cc - iMinusLen + 1 > 0 && !FXSYS_wcsncmp(str + (cc - iMinusLen + 1), (FX_LPCWSTR)wsMinus, iMinusLen)) {
+ } else if (cc - iMinusLen + 1 > 0 && !FXSYS_wcsncmp(str + (cc - iMinusLen + 1), (const FX_WCHAR*)wsMinus, iMinusLen)) {
bExpSign = TRUE;
cc -= iMinusLen;
} else {
@@ -1853,7 +1853,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
pLocale->GetNumbericSymbol(FX_LOCALENUMSYMBOL_CurrencySymbol, wsSymbol);
int32_t iSymbolLen = wsSymbol.GetLength();
cc -= iSymbolLen - 1;
- if (cc < 0 || FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsSymbol, iSymbolLen)) {
+ if (cc < 0 || FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsSymbol, iSymbolLen)) {
return FALSE;
}
cc--;
@@ -1917,7 +1917,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
pLocale->GetNumbericSymbol(FX_LOCALENUMSYMBOL_Percent, wsSymbol);
int32_t iSysmbolLen = wsSymbol.GetLength();
cc -= iSysmbolLen - 1;
- if (cc < 0 || FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsSymbol, iSysmbolLen)) {
+ if (cc < 0 || FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsSymbol, iSysmbolLen)) {
return FALSE;
}
cc--;
@@ -1930,7 +1930,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
case ',': {
if (cc >= 0) {
cc -= iGroupLen - 1;
- if (cc >= 0 && FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsGroupSymbol, iGroupLen) == 0) {
+ if (cc >= 0 && FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsGroupSymbol, iGroupLen) == 0) {
cc--;
} else {
cc += iGroupLen - 1;
@@ -1985,7 +1985,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
case '\'': {
CFX_WideString wsLiteral = FX_GetLiteralText(strf, ccf, lenf);
int32_t iLiteralLen = wsLiteral.GetLength();
- if (cc + iLiteralLen > len || FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsLiteral, iLiteralLen)) {
+ if (cc + iLiteralLen > len || FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsLiteral, iLiteralLen)) {
return FALSE;
}
cc += iLiteralLen;
@@ -2024,7 +2024,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
if (str[cc] == '+' || str[cc] == ' ') {
cc++;
} else {
- if (cc + iMinusLen > len || FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsMinus, iMinusLen)) {
+ if (cc + iMinusLen > len || FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsMinus, iMinusLen)) {
return FALSE;
}
bNeg = TRUE;
@@ -2036,7 +2036,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
if (str[cc] == '+') {
cc++;
} else {
- if (cc + iMinusLen > len || FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsMinus, iMinusLen)) {
+ if (cc + iMinusLen > len || FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsMinus, iMinusLen)) {
return FALSE;
}
bNeg = TRUE;
@@ -2073,7 +2073,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
CFX_WideString wsSymbol;
pLocale->GetNumbericSymbol(FX_LOCALENUMSYMBOL_CurrencySymbol, wsSymbol);
int32_t iSymbolLen = wsSymbol.GetLength();
- if (cc + iSymbolLen > len || FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsSymbol, iSymbolLen)) {
+ if (cc + iSymbolLen > len || FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsSymbol, iSymbolLen)) {
return FALSE;
}
cc += iSymbolLen;
@@ -2128,7 +2128,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
CFX_WideString wsSymbol;
pLocale->GetNumbericSymbol(FX_LOCALENUMSYMBOL_Percent, wsSymbol);
int32_t iSysmbolLen = wsSymbol.GetLength();
- if (cc + iSysmbolLen <= len && !FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsSymbol, iSysmbolLen)) {
+ if (cc + iSysmbolLen <= len && !FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsSymbol, iSysmbolLen)) {
cc += iSysmbolLen;
}
ccf++;
@@ -2146,7 +2146,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_Wid
}
break;
case ',': {
- if (cc + iGroupLen <= len && FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsGroupSymbol, iGroupLen) == 0) {
+ if (cc + iGroupLen <= len && FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsGroupSymbol, iGroupLen) == 0) {
cc += iGroupLen;
}
ccf++;
@@ -2204,7 +2204,7 @@ FX_DATETIMETYPE CFX_FormatString::GetDateTimeFormat(const CFX_WideString& wsPatt
FX_LOCALECATEGORY eCategory = FX_LOCALECATEGORY_Unknown;
int32_t ccf = 0;
int32_t iLenf = wsPattern.GetLength();
- FX_LPCWSTR pStr = (FX_LPCWSTR)wsPattern;
+ const FX_WCHAR* pStr = (const FX_WCHAR*)wsPattern;
int32_t iFindCategory = 0;
FX_BOOL bBraceOpen = FALSE;
while (ccf < iLenf) {
@@ -2331,15 +2331,15 @@ static FX_BOOL FX_ParseLocaleDate(const CFX_WideString& wsDate, const CFX_WideSt
int32_t month = 1;
int32_t day = 1;
int32_t ccf = 0;
- FX_LPCWSTR str = (FX_LPCWSTR)wsDate;
+ const FX_WCHAR* str = (const FX_WCHAR*)wsDate;
int32_t len = wsDate.GetLength();
- FX_LPCWSTR strf = (FX_LPCWSTR)wsDatePattern;
+ const FX_WCHAR* strf = (const FX_WCHAR*)wsDatePattern;
int32_t lenf = wsDatePattern.GetLength();
while (cc < len && ccf < lenf) {
if (strf[ccf] == '\'') {
CFX_WideString wsLiteral = FX_GetLiteralText(strf, ccf, lenf);
int32_t iLiteralLen = wsLiteral.GetLength();
- if (cc + iLiteralLen > len || FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsLiteral, iLiteralLen)) {
+ if (cc + iLiteralLen > len || FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsLiteral, iLiteralLen)) {
return FALSE;
}
cc += iLiteralLen;
@@ -2408,7 +2408,7 @@ static FX_BOOL FX_ParseLocaleDate(const CFX_WideString& wsDate, const CFX_WideSt
if (wsMonthNameAbbr.IsEmpty()) {
continue;
}
- if (!FXSYS_wcsncmp((FX_LPCWSTR)wsMonthNameAbbr, str + cc, wsMonthNameAbbr.GetLength())) {
+ if (!FXSYS_wcsncmp((const FX_WCHAR*)wsMonthNameAbbr, str + cc, wsMonthNameAbbr.GetLength())) {
break;
}
}
@@ -2424,7 +2424,7 @@ static FX_BOOL FX_ParseLocaleDate(const CFX_WideString& wsDate, const CFX_WideSt
if (wsMonthName.IsEmpty()) {
continue;
}
- if (!FXSYS_wcsncmp((FX_LPCWSTR)wsMonthName, str + cc, wsMonthName.GetLength())) {
+ if (!FXSYS_wcsncmp((const FX_WCHAR*)wsMonthName, str + cc, wsMonthName.GetLength())) {
break;
}
}
@@ -2442,7 +2442,7 @@ static FX_BOOL FX_ParseLocaleDate(const CFX_WideString& wsDate, const CFX_WideSt
if (wsDayNameAbbr.IsEmpty()) {
continue;
}
- if (!FXSYS_wcsncmp((FX_LPCWSTR)wsDayNameAbbr, str + cc, wsDayNameAbbr.GetLength())) {
+ if (!FXSYS_wcsncmp((const FX_WCHAR*)wsDayNameAbbr, str + cc, wsDayNameAbbr.GetLength())) {
break;
}
}
@@ -2457,7 +2457,7 @@ static FX_BOOL FX_ParseLocaleDate(const CFX_WideString& wsDate, const CFX_WideSt
if (wsDayName == L"") {
continue;
}
- if (!FXSYS_wcsncmp((FX_LPCWSTR)wsDayName, str + cc, wsDayName.GetLength())) {
+ if (!FXSYS_wcsncmp((const FX_WCHAR*)wsDayName, str + cc, wsDayName.GetLength())) {
break;
}
}
@@ -2536,9 +2536,9 @@ static FX_BOOL FX_ParseLocaleTime(const CFX_WideString& wsTime, const CFX_WideSt
uint8_t second = 0;
FX_WORD millisecond = 0;
int32_t ccf = 0;
- FX_LPCWSTR str = (FX_LPCWSTR)wsTime;
+ const FX_WCHAR* str = (const FX_WCHAR*)wsTime;
int len = wsTime.GetLength();
- FX_LPCWSTR strf = (FX_LPCWSTR)wsTimePattern;
+ const FX_WCHAR* strf = (const FX_WCHAR*)wsTimePattern;
int lenf = wsTimePattern.GetLength();
FX_BOOL bHasA = FALSE;
FX_BOOL bPM = FALSE;
@@ -2546,7 +2546,7 @@ static FX_BOOL FX_ParseLocaleTime(const CFX_WideString& wsTime, const CFX_WideSt
if (strf[ccf] == '\'') {
CFX_WideString wsLiteral = FX_GetLiteralText(strf, ccf, lenf);
int32_t iLiteralLen = wsLiteral.GetLength();
- if (cc + iLiteralLen > len || FXSYS_wcsncmp(str + cc, (FX_LPCWSTR)wsLiteral, iLiteralLen)) {
+ if (cc + iLiteralLen > len || FXSYS_wcsncmp(str + cc, (const FX_WCHAR*)wsLiteral, iLiteralLen)) {
return FALSE;
}
cc += iLiteralLen;
@@ -2762,15 +2762,15 @@ FX_BOOL CFX_FormatString::ParseZero(const CFX_WideString& wsSrcText, const CFX_W
CFX_WideString wsTextFormat;
IFX_Locale* pLocale = GetTextFormat(wsPattern, FX_WSTRC(L"zero"), wsTextFormat);
int32_t iText = 0, iPattern = 0;
- FX_LPCWSTR pStrText = (FX_LPCWSTR)wsSrcText;
+ const FX_WCHAR* pStrText = (const FX_WCHAR*)wsSrcText;
int32_t iLenText = wsSrcText.GetLength();
- FX_LPCWSTR pStrPattern = (FX_LPCWSTR)wsTextFormat;
+ const FX_WCHAR* pStrPattern = (const FX_WCHAR*)wsTextFormat;
int32_t iLenPattern = wsTextFormat.GetLength();
while (iPattern < iLenPattern && iText < iLenText) {
if (pStrPattern[iPattern] == '\'') {
CFX_WideString wsLiteral = FX_GetLiteralText(pStrPattern, iPattern, iLenPattern);
int32_t iLiteralLen = wsLiteral.GetLength();
- if (iText + iLiteralLen > iLenText || FXSYS_wcsncmp(pStrText + iText, (FX_LPCWSTR)wsLiteral, iLiteralLen)) {
+ if (iText + iLiteralLen > iLenText || FXSYS_wcsncmp(pStrText + iText, (const FX_WCHAR*)wsLiteral, iLiteralLen)) {
return FALSE;
}
iText += iLiteralLen;
@@ -2790,15 +2790,15 @@ FX_BOOL CFX_FormatString::ParseNull(const CFX_WideString& wsSrcText, const CFX_W
CFX_WideString wsTextFormat;
IFX_Locale* pLocale = GetTextFormat(wsPattern, FX_WSTRC(L"null"), wsTextFormat);
int32_t iText = 0, iPattern = 0;
- FX_LPCWSTR pStrText = (FX_LPCWSTR)wsSrcText;
+ const FX_WCHAR* pStrText = (const FX_WCHAR*)wsSrcText;
int32_t iLenText = wsSrcText.GetLength();
- FX_LPCWSTR pStrPattern = (FX_LPCWSTR)wsTextFormat;
+ const FX_WCHAR* pStrPattern = (const FX_WCHAR*)wsTextFormat;
int32_t iLenPattern = wsTextFormat.GetLength();
while (iPattern < iLenPattern && iText < iLenText) {
if (pStrPattern[iPattern] == '\'') {
CFX_WideString wsLiteral = FX_GetLiteralText(pStrPattern, iPattern, iLenPattern);
int32_t iLiteralLen = wsLiteral.GetLength();
- if (iText + iLiteralLen > iLenText || FXSYS_wcsncmp(pStrText + iText, (FX_LPCWSTR)wsLiteral, iLiteralLen)) {
+ if (iText + iLiteralLen > iLenText || FXSYS_wcsncmp(pStrText + iText, (const FX_WCHAR*)wsLiteral, iLiteralLen)) {
return FALSE;
}
iText += iLiteralLen;
@@ -2825,8 +2825,8 @@ FX_BOOL CFX_FormatString::FormatText(const CFX_WideString& wsSrcText, const CFX_
CFX_WideString wsTextFormat;
IFX_Locale* pLocale = GetTextFormat(wsPattern, FX_WSTRC(L"text"), wsTextFormat);
int32_t iText = 0, iPattern = 0;
- FX_LPCWSTR pStrText = (FX_LPCWSTR)wsSrcText;
- FX_LPCWSTR pStrPattern = (FX_LPCWSTR)wsTextFormat;
+ const FX_WCHAR* pStrText = (const FX_WCHAR*)wsSrcText;
+ const FX_WCHAR* pStrPattern = (const FX_WCHAR*)wsTextFormat;
int32_t iLenPattern = wsTextFormat.GetLength();
while (iPattern < iLenPattern) {
switch (pStrPattern[iPattern]) {
@@ -2900,7 +2900,7 @@ FX_BOOL CFX_FormatString::FormatStrNum(FX_WSTR wsInputNum, const CFX_WideString&
return FALSE;
}
int32_t cc = 0, ccf = 0;
- FX_LPCWSTR strf = (FX_LPCWSTR)wsNumFormat;
+ const FX_WCHAR* strf = (const FX_WCHAR*)wsNumFormat;
int lenf = wsNumFormat.GetLength();
CFX_WideString wsSrcNum = wsInputNum;
wsSrcNum.TrimLeft('0');
@@ -2969,7 +2969,7 @@ FX_BOOL CFX_FormatString::FormatStrNum(FX_WSTR wsInputNum, const CFX_WideString&
wsSrcNum.Delete(0, 1);
}
FX_BOOL bAddNeg = FALSE;
- FX_LPCWSTR str = (FX_LPCWSTR)wsSrcNum;
+ const FX_WCHAR* str = (const FX_WCHAR*)wsSrcNum;
int len = wsSrcNum.GetLength();
int dot_index = wsSrcNum.Find('.');
if (dot_index == -1) {
@@ -3330,7 +3330,7 @@ FX_BOOL CFX_FormatString::FormatLCNumeric(CFX_LCNumeric& lcNum, const CFX_WideSt
return FALSE;
}
int32_t cc = 0, ccf = 0;
- FX_LPCWSTR strf = (FX_LPCWSTR)wsNumFormat;
+ const FX_WCHAR* strf = (const FX_WCHAR*)wsNumFormat;
int lenf = wsNumFormat.GetLength();
double dbOrgRaw = lcNum.GetDouble();
double dbRetValue = dbOrgRaw;
@@ -3392,7 +3392,7 @@ FX_BOOL CFX_FormatString::FormatLCNumeric(CFX_LCNumeric& lcNum, const CFX_WideSt
wsNumeric.Delete(0, 1);
}
FX_BOOL bAddNeg = FALSE;
- FX_LPCWSTR str = (FX_LPCWSTR)wsNumeric;
+ const FX_WCHAR* str = (const FX_WCHAR*)wsNumeric;
int len = wsNumeric.GetLength();
int dot_index = wsNumeric.Find('.');
if (dot_index == -1) {
@@ -3747,7 +3747,7 @@ FX_BOOL FX_DateFromCanonical(const CFX_WideString& wsDate, CFX_Unitime& datetime
int32_t day = 1;
FX_WORD wYear = 0;
int cc_start = 0, cc = 0;
- FX_LPCWSTR str = (FX_LPCWSTR)wsDate;
+ const FX_WCHAR* str = (const FX_WCHAR*)wsDate;
int len = wsDate.GetLength();
if(len > 10) {
return FALSE;
@@ -3826,7 +3826,7 @@ FX_BOOL FX_TimeFromCanonical(FX_WSTR wsTime, CFX_Unitime& datetime, IFX_Locale*
uint8_t second = 0;
FX_WORD millisecond = 0;
int cc_start = 0, cc = cc_start;
- FX_LPCWSTR str = (FX_LPCWSTR)wsTime.GetPtr();
+ const FX_WCHAR* str = (const FX_WCHAR*)wsTime.GetPtr();
int len = wsTime.GetLength();
while (cc < len && cc < 2) {
if (!FX_IsDigit(str[cc])) {
@@ -3949,7 +3949,7 @@ static FX_BOOL FX_DateFormat(const CFX_WideString& wsDatePattern, IFX_Locale *pL
uint8_t month = datetime.GetMonth();
uint8_t day = datetime.GetDay();
int32_t ccf = 0;
- FX_LPCWSTR strf = (FX_LPCWSTR)wsDatePattern;
+ const FX_WCHAR* strf = (const FX_WCHAR*)wsDatePattern;
int32_t lenf = wsDatePattern.GetLength();
while (ccf < lenf) {
if (strf[ccf] == '\'') {
@@ -4066,7 +4066,7 @@ static FX_BOOL FX_TimeFormat(const CFX_WideString& wsTimePattern, IFX_Locale *pL
uint8_t second = datetime.GetSecond();
FX_WORD millisecond = datetime.GetMillisecond();
int32_t ccf = 0;
- FX_LPCWSTR strf = (FX_LPCWSTR)wsTimePattern;
+ const FX_WCHAR* strf = (const FX_WCHAR*)wsTimePattern;
int32_t lenf = wsTimePattern.GetLength();
FX_WORD wHour = hour;
FX_BOOL bPM = FALSE;
@@ -4259,8 +4259,8 @@ FX_BOOL CFX_FormatString::FormatDateTime(const CFX_WideString& wsSrcDateTime, co
return FX_FormatDateTime(dt, wsDatePattern, wsTimePattern, TRUE, pLocale, wsOutput);
}
} else {
- CFX_WideStringC wsSrcDate((FX_LPCWSTR)wsSrcDateTime, iT);
- CFX_WideStringC wsSrcTime((FX_LPCWSTR)wsSrcDateTime + iT + 1, wsSrcDateTime.GetLength() - iT - 1);
+ CFX_WideStringC wsSrcDate((const FX_WCHAR*)wsSrcDateTime, iT);
+ CFX_WideStringC wsSrcTime((const FX_WCHAR*)wsSrcDateTime + iT + 1, wsSrcDateTime.GetLength() - iT - 1);
if(wsSrcDate.IsEmpty() || wsSrcTime.IsEmpty()) {
return FALSE;
}
@@ -4291,7 +4291,7 @@ FX_BOOL CFX_FormatString::FormatZero(const CFX_WideString& wsPattern, CFX_WideSt
CFX_WideString wsTextFormat;
IFX_Locale* pLocale = GetTextFormat(wsPattern, FX_WSTRC(L"zero"), wsTextFormat);
int32_t iPattern = 0;
- FX_LPCWSTR pStrPattern = (FX_LPCWSTR)wsTextFormat;
+ const FX_WCHAR* pStrPattern = (const FX_WCHAR*)wsTextFormat;
int32_t iLenPattern = wsTextFormat.GetLength();
while (iPattern < iLenPattern) {
if (pStrPattern[iPattern] == '\'') {
@@ -4313,7 +4313,7 @@ FX_BOOL CFX_FormatString::FormatNull(const CFX_WideString& wsPattern, CFX_WideSt
CFX_WideString wsTextFormat;
IFX_Locale* pLocale = GetTextFormat(wsPattern, FX_WSTRC(L"null"), wsTextFormat);
int32_t iPattern = 0;
- FX_LPCWSTR pStrPattern = (FX_LPCWSTR)wsTextFormat;
+ const FX_WCHAR* pStrPattern = (const FX_WCHAR*)wsTextFormat;
int32_t iLenPattern = wsTextFormat.GetLength();
while (iPattern < iLenPattern) {
if (pStrPattern[iPattern] == '\'') {
@@ -4625,8 +4625,8 @@ CFX_Decimal::CFX_Decimal(FX_FLOAT val, uint8_t scale )
}
CFX_Decimal::CFX_Decimal(FX_WSTR strObj)
{
- FX_LPCWSTR str = strObj.GetPtr();
- FX_LPCWSTR strBound = str + strObj.GetLength();
+ const FX_WCHAR* str = strObj.GetPtr();
+ const FX_WCHAR* strBound = str + strObj.GetLength();
FX_BOOL pointmet = 0;
FX_BOOL negmet = 0;
uint8_t scale = 0;
diff --git a/xfa/src/fgas/src/localization/fx_localemgr.cpp b/xfa/src/fgas/src/localization/fx_localemgr.cpp
index b3f0e80d7a..0623fe1789 100644
--- a/xfa/src/fgas/src/localization/fx_localemgr.cpp
+++ b/xfa/src/fgas/src/localization/fx_localemgr.cpp
@@ -6,7 +6,7 @@
#include "../fgas_base.h"
#include "fx_localemgr.h"
-IFX_LocaleMgr* FX_LocaleMgr_Create(FX_LPCWSTR pszLocalPath, FX_WORD wDefaultLCID)
+IFX_LocaleMgr* FX_LocaleMgr_Create(const FX_WCHAR* pszLocalPath, FX_WORD wDefaultLCID)
{
void* pPathHandle = FX_OpenFolder(pszLocalPath);
if (!pPathHandle) {
@@ -38,10 +38,10 @@ IFX_LocaleMgr* FX_LocaleMgr_Create(FX_LPCWSTR pszLocalPath, FX_WORD wDefaultLCID
CFX_WideString wsLCID = pXmlLocale->GetAttrValue("", "lcid");
wchar_t* pEnd = NULL;
FX_DWORD dwLCID = wcstol(wsLCID, &pEnd, 16);
- if (pLocaleMgr->m_lcid2xml.GetValueAt((FX_LPVOID)(uintptr_t)dwLCID)) {
+ if (pLocaleMgr->m_lcid2xml.GetValueAt((void*)(uintptr_t)dwLCID)) {
delete pXmlLocale;
} else {
- pLocaleMgr->m_lcid2xml.SetAt((FX_LPVOID)(uintptr_t)dwLCID, pXmlLocale);
+ pLocaleMgr->m_lcid2xml.SetAt((void*)(uintptr_t)dwLCID, pXmlLocale);
}
} else {
delete pXmlLocale;
@@ -59,7 +59,7 @@ CFX_LocaleMgr::~CFX_LocaleMgr()
{
FX_POSITION ps = m_lcid2locale.GetStartPosition();
while (ps) {
- FX_LPVOID plcid;
+ void* plcid;
IFX_Locale* pLocale = NULL;
m_lcid2locale.GetNextAssoc(ps, plcid, (void*&)pLocale);
pLocale->Release();
@@ -67,7 +67,7 @@ CFX_LocaleMgr::~CFX_LocaleMgr()
m_lcid2locale.RemoveAll();
ps = m_lcid2xml.GetStartPosition();
while (ps) {
- FX_LPVOID plcid;
+ void* plcid;
CXML_Element* pxml = NULL;
m_lcid2xml.GetNextAssoc(ps, plcid, (void*&)pxml);
delete pxml;
@@ -84,12 +84,12 @@ IFX_Locale* CFX_LocaleMgr::GetDefLocale()
}
IFX_Locale* CFX_LocaleMgr::GetLocale(FX_WORD lcid)
{
- IFX_Locale* pLocale = (IFX_Locale*)m_lcid2locale.GetValueAt((FX_LPVOID)(uintptr_t)lcid);
+ IFX_Locale* pLocale = (IFX_Locale*)m_lcid2locale.GetValueAt((void*)(uintptr_t)lcid);
if (!pLocale) {
- CXML_Element* pxml = (CXML_Element*)m_lcid2xml.GetValueAt((FX_LPVOID)(uintptr_t)lcid);
+ CXML_Element* pxml = (CXML_Element*)m_lcid2xml.GetValueAt((void*)(uintptr_t)lcid);
if (pxml) {
pLocale = IFX_Locale::Create(pxml);
- m_lcid2locale.SetAt((FX_LPVOID)(uintptr_t)lcid, pLocale);
+ m_lcid2locale.SetAt((void*)(uintptr_t)lcid, pLocale);
}
}
return pLocale;
diff --git a/xfa/src/fgas/src/xml/fx_sax_imp.cpp b/xfa/src/fgas/src/xml/fx_sax_imp.cpp
index fedf89f9f9..0e47ce53d4 100644
--- a/xfa/src/fgas/src/xml/fx_sax_imp.cpp
+++ b/xfa/src/fgas/src/xml/fx_sax_imp.cpp
@@ -102,8 +102,8 @@ CFX_SAXReader::CFX_SAXReader()
, m_pCommentContext(NULL)
, m_dwParseMode(0)
{
- m_pszData = (FX_LPBYTE)FX_Alloc(uint8_t, m_iDataSize);
- m_pszName = (FX_LPBYTE)FX_Alloc(uint8_t, m_iNameSize);
+ m_pszData = (uint8_t*)FX_Alloc(uint8_t, m_iDataSize);
+ m_pszName = (uint8_t*)FX_Alloc(uint8_t, m_iNameSize);
}
CFX_SAXReader::~CFX_SAXReader()
{
@@ -179,7 +179,7 @@ void CFX_SAXReader::ReallocDataBuffer()
} else {
m_iDataSize += 1024 * 1024;
}
- m_pszData = (FX_LPBYTE)FX_Realloc(uint8_t, m_pszData, m_iDataSize);
+ m_pszData = (uint8_t*)FX_Realloc(uint8_t, m_pszData, m_iDataSize);
}
void CFX_SAXReader::ReallocNameBuffer()
{
@@ -191,7 +191,7 @@ void CFX_SAXReader::ReallocNameBuffer()
} else {
m_iNameSize += 1024 * 1024;
}
- m_pszName = (FX_LPBYTE)FX_Realloc(uint8_t, m_pszName, m_iNameSize);
+ m_pszName = (uint8_t*)FX_Realloc(uint8_t, m_pszName, m_iNameSize);
}
inline FX_BOOL CFX_SAXReader::SkipSpace(uint8_t ch)
{
@@ -239,7 +239,7 @@ int32_t CFX_SAXReader::ContinueParse(IFX_Pause *pPause )
while(m_File.m_dwCur < m_File.m_dwEnd) {
FX_DWORD &index = m_File.m_dwBufIndex;
FX_DWORD size = m_File.m_dwBufSize;
- FX_LPCBYTE pBuf = m_File.m_pBuf;
+ const uint8_t* pBuf = m_File.m_pBuf;
while (index < size) {
m_CurByte = pBuf[index];
(this->*g_FX_SAXReader_LPFParse[m_eMode])();
diff --git a/xfa/src/fgas/src/xml/fx_sax_imp.h b/xfa/src/fgas/src/xml/fx_sax_imp.h
index a2f7259235..6e95c81fae 100644
--- a/xfa/src/fgas/src/xml/fx_sax_imp.h
+++ b/xfa/src/fgas/src/xml/fx_sax_imp.h
@@ -18,7 +18,7 @@ public:
FX_DWORD m_dwStart;
FX_DWORD m_dwEnd;
FX_DWORD m_dwCur;
- FX_LPBYTE m_pBuf;
+ uint8_t* m_pBuf;
FX_DWORD m_dwBufSize;
FX_DWORD m_dwBufIndex;
};
@@ -49,7 +49,7 @@ public:
, m_pPrev(NULL)
, m_pNext(NULL)
{}
- FX_LPVOID m_pNode;
+ void* m_pNode;
FX_SAXNODE m_eNode;
FX_DWORD m_dwID;
FX_BOOL m_bSkip;
@@ -111,12 +111,12 @@ protected:
CFX_ByteArray m_SkipStack;
uint8_t m_SkipChar;
FX_DWORD m_dwNodePos;
- FX_LPBYTE m_pszData;
+ uint8_t* m_pszData;
int32_t m_iDataSize;
int32_t m_iDataLength;
int32_t m_iEntityStart;
int32_t m_iDataPos;
- FX_LPBYTE m_pszName;
+ uint8_t* m_pszName;
int32_t m_iNameSize;
int32_t m_iNameLength;
FX_DWORD m_dwParseMode;
diff --git a/xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp b/xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp
index 5658f87e13..7c489d2dee 100644
--- a/xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp
+++ b/xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp
@@ -288,7 +288,7 @@ int32_t CFWL_ComboList::MatchItem(const CFX_WideString &wsMatch)
FWL_HLISTITEM hItem = pData->GetItem(m_pInterface, i);
CFX_WideString wsText;
pData->GetItemText(m_pInterface, hItem, wsText);
- FX_STRSIZE pos = wsText.Find((FX_LPCWSTR)wsMatch);
+ FX_STRSIZE pos = wsText.Find((const FX_WCHAR*)wsMatch);
if (!pos) {
return i;
}
@@ -726,7 +726,7 @@ FWL_ERR CFWL_ComboBoxImp::DrawWidget(CFX_Graphics *pGraphics, const CFX_Matrix *
param.m_rtPart = rtTextBk;
if (m_iCurSel >= 0) {
IFWL_ListBoxDP* pData = (IFWL_ListBoxDP*)((CFWL_ComboList*)((IFWL_TargetData*)m_pListBox)->GetData())->m_pProperties->m_pDataProvider;
- FX_LPVOID p = pData->GetItemData(m_pListBox, pData->GetItem(m_pListBox, m_iCurSel));
+ void* p = pData->GetItemData(m_pListBox, pData->GetItem(m_pListBox, m_iCurSel));
if (p != NULL) {
param.m_pData = p;
}
diff --git a/xfa/src/fwl/src/basewidget/fwl_datetimepickerimp.cpp b/xfa/src/fwl/src/basewidget/fwl_datetimepickerimp.cpp
index c9f3367114..4c30244410 100644
--- a/xfa/src/fwl/src/basewidget/fwl_datetimepickerimp.cpp
+++ b/xfa/src/fwl/src/basewidget/fwl_datetimepickerimp.cpp
@@ -738,9 +738,9 @@ void CFWL_DateTimePickerImp::DrawDropDownButton(CFX_Graphics *pGraphics, IFWL_Th
void CFWL_DateTimePickerImp::FormatDateString(int32_t iYear, int32_t iMonth, int32_t iDay, CFX_WideString &wsText)
{
if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_DTP_ShortDateFormat) == FWL_STYLEEXT_DTP_ShortDateFormat) {
- wsText.Format(FX_LPCWSTR(L"%d-%d-%d"), iYear, iMonth, iDay);
+ wsText.Format(L"%d-%d-%d", iYear, iMonth, iDay);
} else if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_DTP_LongDateFormat) == FWL_STYLEEXT_DTP_LongDateFormat) {
- wsText.Format(FX_LPCWSTR(L"%d Year %d Month %d Day"), iYear, iMonth, iDay);
+ wsText.Format(L"%d Year %d Month %d Day", iYear, iMonth, iDay);
} else if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_DTP_TimeFormat) == FWL_STYLEEXT_DTP_TimeFormat) {
}
}
diff --git a/xfa/src/fwl/src/basewidget/fwl_editimp.cpp b/xfa/src/fwl/src/basewidget/fwl_editimp.cpp
index 0afa1d5467..a8c1655ec8 100644
--- a/xfa/src/fwl/src/basewidget/fwl_editimp.cpp
+++ b/xfa/src/fwl/src/basewidget/fwl_editimp.cpp
@@ -97,7 +97,7 @@ FWL_ERR IFWL_Edit::SetFormatString(const CFX_WideString &wsFormat)
{
return ((CFWL_EditImp*)m_pData)->SetFormatString(wsFormat);
}
-FWL_ERR IFWL_Edit::Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLen)
+FWL_ERR IFWL_Edit::Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLen)
{
return ((CFWL_EditImp*)m_pData)->Insert(nStart, lpText, nLen);
}
@@ -480,7 +480,7 @@ FX_BOOL CFWL_EditImp::ReplaceSpellCheckWord(CFX_PointF pointf, FX_BSTR bsReplace
}
int32_t nDestLen = bsReplace.GetLength();
CFX_WideString wsDest;
- FX_LPWSTR pBuffer = wsDest.GetBuffer(nDestLen);
+ FX_WCHAR* pBuffer = wsDest.GetBuffer(nDestLen);
for (int32_t i = 0; i < nDestLen; i++) {
pBuffer[i] = bsReplace[i];
}
@@ -663,7 +663,7 @@ FWL_ERR CFWL_EditImp::SetFormatString(const CFX_WideString &wsFormat)
m_pEdtEngine->SetFormatBlock(0, wsFormat);
return FWL_ERR_Succeeded;
}
-FWL_ERR CFWL_EditImp::Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLen)
+FWL_ERR CFWL_EditImp::Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLen)
{
_FWL_RETURN_VALUE_IF_FAIL(m_pEdtEngine, FWL_ERR_Succeeded);
if ( (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_ReadOnly)
@@ -803,7 +803,7 @@ FX_BOOL CFWL_EditImp::Paste(const CFX_WideString &wsPaste)
{
_FWL_RETURN_VALUE_IF_FAIL(m_pEdtEngine, FALSE);
int32_t nCaret = m_pEdtEngine->GetCaretPos();
- int32_t iError = m_pEdtEngine->Insert(nCaret, FX_LPCWSTR(wsPaste), wsPaste.GetLength());
+ int32_t iError = m_pEdtEngine->Insert(nCaret, wsPaste.c_str(), wsPaste.GetLength());
if (iError < 0) {
ProcessInsertError(iError);
return FALSE;
@@ -2126,12 +2126,12 @@ void CFWL_EditImpDelegate::OnChar(CFWL_MsgKey *pMsg)
break;
}
case FWL_VKEY_Tab: {
- iError = m_pOwner->m_pEdtEngine->Insert(nCaret, FX_LPCWSTR(L"\t"), 1);
+ iError = m_pOwner->m_pEdtEngine->Insert(nCaret, L"\t", 1);
break;
}
case FWL_VKEY_Return: {
if (m_pOwner->m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_WantReturn) {
- iError = m_pOwner->m_pEdtEngine->Insert(nCaret, FX_LPCWSTR(L"\n"), 1);
+ iError = m_pOwner->m_pEdtEngine->Insert(nCaret, L"\n", 1);
}
break;
}
diff --git a/xfa/src/fwl/src/basewidget/fwl_monthcalendarimp.cpp b/xfa/src/fwl/src/basewidget/fwl_monthcalendarimp.cpp
index aed47639b2..c99b5c6002 100644
--- a/xfa/src/fwl/src/basewidget/fwl_monthcalendarimp.cpp
+++ b/xfa/src/fwl/src/basewidget/fwl_monthcalendarimp.cpp
@@ -398,7 +398,7 @@ void CFWL_MonthCalendarImp::DrawWeekNumber(CFX_Graphics *pGraphics, IFWL_ThemePr
iTemp ++;
iWeekNum = CalWeekNumber(m_iCurYear, iMonthNum, i);
m_rtWeekNum.Set(fHStartPos, fVStartPos + m_fDateCellHei * iTemp, m_fWeekNumWid, m_fDateCellHei);
- wsWeekNum.Format(FX_LPCWSTR(L"%d"), iWeekNum);
+ wsWeekNum.Format(L"%d", iWeekNum);
params.m_wsText = wsWeekNum;
params.m_rtPart = m_rtWeekNum;
pTheme->DrawText(&params);
@@ -765,7 +765,7 @@ void CFWL_MonthCalendarImp::ReSetDateItem()
iDayOfWeek = 0;
}
CFX_WideString wsDay;
- wsDay.Format(FX_LPCWSTR(L"%d"), i + 1);
+ wsDay.Format(L"%d", i + 1);
FX_DWORD dwStates = 0;
if (m_iYear == m_iCurYear && m_iMonth == m_iCurMonth && m_iDay == (i + 1)) {
dwStates |= FWL_ITEMSTATE_MCD_Flag;
@@ -888,25 +888,25 @@ FX_BOOL CFWL_MonthCalendarImp::JumpToToday()
void CFWL_MonthCalendarImp::GetHeadText(int32_t iYear, int32_t iMonth, CFX_WideString &wsHead)
{
FXSYS_assert(iMonth > 0 && iMonth < 13);
- static FX_LPWSTR pMonth[] = {
- FX_LPWSTR(L"January"),
- FX_LPWSTR(L"February"),
- FX_LPWSTR(L"March"),
- FX_LPWSTR(L"April"),
- FX_LPWSTR(L"May"),
- FX_LPWSTR(L"June"),
- FX_LPWSTR(L"July"),
- FX_LPWSTR(L"August"),
- FX_LPWSTR(L"September"),
- FX_LPWSTR(L"October"),
- FX_LPWSTR(L"November"),
- FX_LPWSTR(L"December")
+ static const FX_WCHAR* const pMonth[] = {
+ L"January",
+ L"February",
+ L"March",
+ L"April",
+ L"May",
+ L"June",
+ L"July",
+ L"August",
+ L"September",
+ L"October",
+ L"November",
+ L"December"
};
- wsHead.Format(FX_LPCWSTR(L"%s, %d"), pMonth[iMonth - 1], iYear);
+ wsHead.Format(L"%s, %d", pMonth[iMonth - 1], iYear);
}
void CFWL_MonthCalendarImp::GetTodayText(int32_t iYear, int32_t iMonth, int32_t iDay, CFX_WideString &wsToday)
{
- wsToday.Format(FX_LPCWSTR(L", %d/%d/%d"), iDay, iMonth, iYear);
+ wsToday.Format(L", %d/%d/%d", iDay, iMonth, iYear);
}
int32_t CFWL_MonthCalendarImp::GetDayAtPoint(FX_FLOAT x, FX_FLOAT y)
{
diff --git a/xfa/src/fwl/src/basewidget/include/fwl_editimp.h b/xfa/src/fwl/src/basewidget/include/fwl_editimp.h
index db9e25fb5c..e06cfa8d67 100644
--- a/xfa/src/fwl/src/basewidget/include/fwl_editimp.h
+++ b/xfa/src/fwl/src/basewidget/include/fwl_editimp.h
@@ -45,7 +45,7 @@ public:
virtual FWL_ERR SetLimit(int32_t nLimit);
virtual FWL_ERR SetAliasChar(FX_WCHAR wAlias);
virtual FWL_ERR SetFormatString(const CFX_WideString &wsFormat);
- virtual FWL_ERR Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLen);
+ virtual FWL_ERR Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLen);
virtual FWL_ERR DeleteSelections();
virtual FWL_ERR DeleteRange(int32_t nStart, int32_t nCount = -1);
virtual FWL_ERR ReplaceSelections(const CFX_WideStringC &wsReplace);
diff --git a/xfa/src/fwl/src/core/fwl_noteimp.cpp b/xfa/src/fwl/src/core/fwl_noteimp.cpp
index 4a9c138d86..0ea8975adc 100644
--- a/xfa/src/fwl/src/core/fwl_noteimp.cpp
+++ b/xfa/src/fwl/src/core/fwl_noteimp.cpp
@@ -143,7 +143,7 @@ FX_BOOL CFWL_NoteDriver::SendNote(CFWL_Note *pNote)
m_sendEventCalled ++;
FX_POSITION pos = m_eventTargets.GetStartPosition();
while (pos) {
- FX_LPVOID key = NULL;
+ void* key = NULL;
CFWL_EventTarget *pEventTarget;
m_eventTargets.GetNextAssoc(pos, key, (void*&)pEventTarget);
if (pEventTarget && !pEventTarget->IsInvalid()) {
@@ -169,15 +169,15 @@ FX_BOOL CFWL_NoteDriver::PostMessage(CFWL_Message *pMessage)
#define FWL_NoteDriver_EventKey 1100
FWL_ERR CFWL_NoteDriver::RegisterEventTarget(IFWL_Widget *pListener, IFWL_Widget *pEventSource , FX_DWORD dwFilter )
{
- FX_DWORD dwkey = (FX_DWORD)(uintptr_t)pListener->GetPrivateData((FX_LPVOID)(uintptr_t)FWL_NoteDriver_EventKey);
+ FX_DWORD dwkey = (FX_DWORD)(uintptr_t)pListener->GetPrivateData((void*)(uintptr_t)FWL_NoteDriver_EventKey);
if (dwkey == 0) {
- FX_LPVOID random = FX_Random_MT_Start(0);
+ void* random = FX_Random_MT_Start(0);
dwkey = rand();
FX_Random_MT_Close(random);
- pListener->SetPrivateData((FX_LPVOID)(uintptr_t)FWL_NoteDriver_EventKey, (FX_LPVOID)(uintptr_t)dwkey, NULL);
+ pListener->SetPrivateData((void*)(uintptr_t)FWL_NoteDriver_EventKey, (void*)(uintptr_t)dwkey, NULL);
}
CFWL_EventTarget *value = NULL;
- if (!m_eventTargets.Lookup((void*)(uintptr_t)dwkey, (FX_LPVOID&)value)) {
+ if (!m_eventTargets.Lookup((void*)(uintptr_t)dwkey, (void*&)value)) {
value = FX_NEW CFWL_EventTarget(this, pListener);
m_eventTargets.SetAt((void*)(uintptr_t)dwkey, value);
}
@@ -186,12 +186,12 @@ FWL_ERR CFWL_NoteDriver::RegisterEventTarget(IFWL_Widget *pListener, IFWL_Widget
}
FWL_ERR CFWL_NoteDriver::UnregisterEventTarget(IFWL_Widget *pListener)
{
- FX_DWORD dwkey = (FX_DWORD)(uintptr_t)pListener->GetPrivateData((FX_LPVOID)(uintptr_t)FWL_NoteDriver_EventKey);
+ FX_DWORD dwkey = (FX_DWORD)(uintptr_t)pListener->GetPrivateData((void*)(uintptr_t)FWL_NoteDriver_EventKey);
if (dwkey == 0) {
return FWL_ERR_Indefinite;
}
CFWL_EventTarget *value = NULL;
- if (m_eventTargets.Lookup((void*)(uintptr_t)dwkey, (FX_LPVOID&)value)) {
+ if (m_eventTargets.Lookup((void*)(uintptr_t)dwkey, (void*&)value)) {
value->FlagInvalid();
}
return FWL_ERR_Succeeded;
@@ -442,7 +442,7 @@ int32_t CFWL_NoteDriver::CountLoop()
{
return m_noteLoopQueue.GetSize();
}
-void CFWL_NoteDriver::SetHook(FWLMessageHookCallback callback, FX_LPVOID info)
+void CFWL_NoteDriver::SetHook(FWLMessageHookCallback callback, void* info)
{
m_hook = callback;
m_hookInfo = info;
@@ -799,7 +799,7 @@ void CFWL_NoteDriver::ClearInvalidEventTargets(FX_BOOL bRemoveAll)
{
FX_POSITION pos = m_eventTargets.GetStartPosition();
while (pos) {
- FX_LPVOID key = NULL;
+ void* key = NULL;
CFWL_EventTarget *pEventTarget = NULL;
m_eventTargets.GetNextAssoc(pos, key, (void*&)pEventTarget);
if (pEventTarget && (bRemoveAll || pEventTarget->IsInvalid())) {
@@ -1119,7 +1119,7 @@ IFWL_Widget* FWL_GetCurrentThreadModalWidget(IFWL_NoteThread *pNoteThread)
_FWL_RETURN_VALUE_IF_FAIL(widget, NULL);
return widget->GetInterface();
}
-FWL_ERR FWL_SetHook(IFWL_NoteDriver *driver, FWLMessageHookCallback callback, FX_LPVOID info)
+FWL_ERR FWL_SetHook(IFWL_NoteDriver *driver, FWLMessageHookCallback callback, void* info)
{
CFWL_NoteDriver *noteDriver = (CFWL_NoteDriver*)driver;
noteDriver->SetHook(callback, info);
diff --git a/xfa/src/fwl/src/core/fwl_sdadapterimp.cpp b/xfa/src/fwl/src/core/fwl_sdadapterimp.cpp
index 25636ea582..2fdaee126e 100644
--- a/xfa/src/fwl/src/core/fwl_sdadapterimp.cpp
+++ b/xfa/src/fwl/src/core/fwl_sdadapterimp.cpp
@@ -107,15 +107,15 @@ FWL_ERR CFWL_SDAdapterWidgetMgr::DispatchMessage()
{
return FWL_ERR_Succeeded;
}
-FWL_ERR CFWL_SDAdapterWidgetMgr::GetWidgetDC(IFWL_Widget *pWidget, FX_LPVOID &pDC)
+FWL_ERR CFWL_SDAdapterWidgetMgr::GetWidgetDC(IFWL_Widget *pWidget, void* &pDC)
{
return FWL_ERR_Succeeded;
}
-FWL_ERR CFWL_SDAdapterWidgetMgr::ReleaseWidgetDC(IFWL_Widget *pWidget, FX_LPVOID pDC, CFX_RectF *pClip)
+FWL_ERR CFWL_SDAdapterWidgetMgr::ReleaseWidgetDC(IFWL_Widget *pWidget, void* pDC, CFX_RectF *pClip)
{
return FWL_ERR_Succeeded;
}
-FX_LPVOID CFWL_SDAdapterWidgetMgr::GetWindow(IFWL_Widget *pWidget)
+void* CFWL_SDAdapterWidgetMgr::GetWindow(IFWL_Widget *pWidget)
{
return NULL;
}
@@ -135,7 +135,7 @@ FWL_ERR CFWL_SDAdapterWidgetMgr::InitMenu(IFWL_Menu *pMenu, IFWL_MenuDP *pMenuD
{
return FWL_ERR_Succeeded;
}
-FWL_ERR CFWL_SDAdapterWidgetMgr::UpdateMenu(IFWL_Menu *pMenu, FX_LPCVOID hItem, int32_t iType)
+FWL_ERR CFWL_SDAdapterWidgetMgr::UpdateMenu(IFWL_Menu *pMenu, const void* hItem, int32_t iType)
{
return FWL_ERR_Succeeded;
}
diff --git a/xfa/src/fwl/src/core/fwl_targetimp.cpp b/xfa/src/fwl/src/core/fwl_targetimp.cpp
index 75e40db15a..c09b8ee447 100644
--- a/xfa/src/fwl/src/core/fwl_targetimp.cpp
+++ b/xfa/src/fwl/src/core/fwl_targetimp.cpp
@@ -91,11 +91,11 @@ FWL_ERR CFWL_Target::Finalize()
{
return FWL_ERR_Succeeded;
}
-FX_LPVOID IFWL_TargetData::GetData()
+void* IFWL_TargetData::GetData()
{
return m_pData;
}
-void IFWL_TargetData::SetData(FX_LPVOID pData)
+void IFWL_TargetData::SetData(void* pData)
{
m_pData = pData;
}
diff --git a/xfa/src/fwl/src/core/fwl_widgetimp.cpp b/xfa/src/fwl/src/core/fwl_widgetimp.cpp
index 4659e6bc9e..d966296f95 100644
--- a/xfa/src/fwl/src/core/fwl_widgetimp.cpp
+++ b/xfa/src/fwl/src/core/fwl_widgetimp.cpp
@@ -71,11 +71,11 @@ FWL_ERR IFWL_Widget::SetStates(FX_DWORD dwStates, FX_BOOL bSet )
{
return ((CFWL_WidgetImp*)m_pData)->SetStates(dwStates, bSet);
}
-FWL_ERR IFWL_Widget::SetPrivateData(FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback)
+FWL_ERR IFWL_Widget::SetPrivateData(void* module_id, void* pData, PD_CALLBACK_FREEDATA callback)
{
return ((CFWL_WidgetImp*)m_pData)->SetPrivateData(module_id, pData, callback);
}
-FX_LPVOID IFWL_Widget::GetPrivateData(FX_LPVOID module_id)
+void* IFWL_Widget::GetPrivateData(void* module_id)
{
return ((CFWL_WidgetImp*)m_pData)->GetPrivateData(module_id);
}
@@ -309,7 +309,7 @@ FWL_ERR CFWL_WidgetImp::SetStates(FX_DWORD dwStates, FX_BOOL bSet )
}
return ret;
}
-FWL_ERR CFWL_WidgetImp::SetPrivateData(FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback)
+FWL_ERR CFWL_WidgetImp::SetPrivateData(void* module_id, void* pData, PD_CALLBACK_FREEDATA callback)
{
if (!m_pPrivateData) {
m_pPrivateData = new CFX_PrivateData;
@@ -317,7 +317,7 @@ FWL_ERR CFWL_WidgetImp::SetPrivateData(FX_LPVOID module_id, FX_LPVOID pData, PD_
m_pPrivateData->SetPrivateData(module_id, pData, callback);
return FWL_ERR_Succeeded;
}
-FX_LPVOID CFWL_WidgetImp::GetPrivateData(FX_LPVOID module_id)
+void* CFWL_WidgetImp::GetPrivateData(void* module_id)
{
_FWL_RETURN_VALUE_IF_FAIL(m_pPrivateData, NULL);
return m_pPrivateData->GetPrivateData(module_id);
@@ -657,7 +657,7 @@ void CFWL_WidgetImp::GetRelativeRect(CFX_RectF &rect)
rect = m_pProperties->m_rtWidget;
rect.left = rect.top = 0;
}
-FX_LPVOID CFWL_WidgetImp::GetThemeCapacity(FX_DWORD dwCapacity)
+void* CFWL_WidgetImp::GetThemeCapacity(FX_DWORD dwCapacity)
{
IFWL_ThemeProvider *pTheme = GetAvailableTheme();
_FWL_RETURN_VALUE_IF_FAIL(pTheme, NULL);
@@ -709,7 +709,7 @@ CFWL_WidgetImp* CFWL_WidgetImp::GetSameAncestor(CFWL_WidgetImp *pWidget)
relation = pAncestor->IsPopup() ? FWL_WGTRELATION_Owner : FWL_WGTRELATION_Parent;
} while ((pAncestor = (CFWL_WidgetImp*)m_pWidgetMgr->GetWidget(pAncestor->m_pInterface, relation)) != NULL);
for (int32_t i = 0; i < arr1.GetSize(); i ++) {
- FX_LPVOID pVoid = arr1[i];
+ void* pVoid = arr1[i];
if (arr2.Find(pVoid) < 0) {
continue;
} else {
diff --git a/xfa/src/fwl/src/core/fwl_widgetmgrimp.cpp b/xfa/src/fwl/src/core/fwl_widgetmgrimp.cpp
index a1e1d45718..4a89951d7d 100644
--- a/xfa/src/fwl/src/core/fwl_widgetmgrimp.cpp
+++ b/xfa/src/fwl/src/core/fwl_widgetmgrimp.cpp
@@ -48,7 +48,7 @@ CFWL_WidgetMgr::~CFWL_WidgetMgr()
{
FX_POSITION ps = m_mapWidgetItem.GetStartPosition();
while (ps) {
- FX_LPVOID pWidget;
+ void* pWidget;
CFWL_WidgetMgrItem *pItem;
m_mapWidgetItem.GetNextAssoc(ps, pWidget, (void*&)pItem);
delete pItem;
@@ -213,7 +213,7 @@ FX_BOOL CFWL_WidgetMgr::SetWidgetIndex(IFWL_Widget *pWidget, int32_t nIndex)
}
return TRUE;
}
-FX_BOOL CFWL_WidgetMgr::IsWidget(FX_LPVOID pObj)
+FX_BOOL CFWL_WidgetMgr::IsWidget(void* pObj)
{
_FWL_RETURN_VALUE_IF_FAIL(pObj, FALSE);
return GetWidgetMgrItem((IFWL_Widget*)pObj) != NULL;
@@ -985,7 +985,7 @@ FX_BOOL CFWL_WidgetMgrDelegate::bUseOffscreenDirect(IFWL_Widget *pWidget)
#endif
return pItem->iRedrawCounter == 0;
}
-static void FWL_WriteBMP(CFX_DIBitmap* pBitmap, FX_LPCSTR filename)
+static void FWL_WriteBMP(CFX_DIBitmap* pBitmap, const FX_CHAR* filename)
{
FILE* file = fopen(filename, "wb");
if (file == NULL) {
@@ -1017,7 +1017,7 @@ static void FWL_WriteBMP(CFX_DIBitmap* pBitmap, FX_LPCSTR filename)
buffer[14] = pBitmap->GetBPP();
fwrite(buffer, 40, 1, file);
for (int row = 0; row < pBitmap->GetHeight(); row ++) {
- FX_LPBYTE scan_line = pBitmap->GetBuffer() + row * pBitmap->GetPitch();
+ uint8_t* scan_line = pBitmap->GetBuffer() + row * pBitmap->GetPitch();
fwrite(scan_line, pBitmap->GetPitch(), 1, file);
}
fclose(file);
diff --git a/xfa/src/fwl/src/core/include/fwl_noteimp.h b/xfa/src/fwl/src/core/include/fwl_noteimp.h
index 699840d27e..78afc35313 100644
--- a/xfa/src/fwl/src/core/include/fwl_noteimp.h
+++ b/xfa/src/fwl/src/core/include/fwl_noteimp.h
@@ -63,7 +63,7 @@ public:
FX_BOOL UnqueueMessage(CFWL_NoteLoop *pNoteLoop);
CFWL_NoteLoop* GetTopLoop();
int32_t CountLoop();
- void SetHook(FWLMessageHookCallback callback, FX_LPVOID info);
+ void SetHook(FWLMessageHookCallback callback, void* info);
FX_BOOL ProcessMessage(CFWL_Message *pMessage);
protected:
FX_BOOL DispatchMessage(CFWL_Message *pMessage, IFWL_Widget *pMessageForm);
@@ -94,9 +94,9 @@ protected:
IFWL_Widget *m_pGrab;
CFWL_NoteLoop *m_pNoteLoop;
FWLMessageHookCallback m_hook;
- FX_LPVOID m_hookInfo;
+ void* m_hookInfo;
};
-typedef CFX_MapPtrTemplate<FX_LPVOID, FX_DWORD> CFWL_EventSource;
+typedef CFX_MapPtrTemplate<void*, FX_DWORD> CFWL_EventSource;
class CFWL_EventTarget
{
public:
diff --git a/xfa/src/fwl/src/core/include/fwl_targetimp.h b/xfa/src/fwl/src/core/include/fwl_targetimp.h
index 2fa2bf7322..1287a63870 100644
--- a/xfa/src/fwl/src/core/include/fwl_targetimp.h
+++ b/xfa/src/fwl/src/core/include/fwl_targetimp.h
@@ -26,7 +26,7 @@ protected:
class IFWL_TargetData : public IFWL_Target
{
public:
- FX_LPVOID GetData();
- void SetData(FX_LPVOID pData);
+ void* GetData();
+ void SetData(void* pData);
};
#endif
diff --git a/xfa/src/fwl/src/core/include/fwl_widgetimp.h b/xfa/src/fwl/src/core/include/fwl_widgetimp.h
index 4d28722576..af4ceced95 100644
--- a/xfa/src/fwl/src/core/include/fwl_widgetimp.h
+++ b/xfa/src/fwl/src/core/include/fwl_widgetimp.h
@@ -36,8 +36,8 @@ public:
virtual FWL_ERR ModifyStylesEx(FX_DWORD dwStylesExAdded, FX_DWORD dwStylesExRemoved);
virtual FX_DWORD GetStates();
virtual FWL_ERR SetStates(FX_DWORD dwStates, FX_BOOL bSet = TRUE);
- virtual FWL_ERR SetPrivateData(FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback);
- virtual FX_LPVOID GetPrivateData(FX_LPVOID module_id);
+ virtual FWL_ERR SetPrivateData(void* module_id, void* pData, PD_CALLBACK_FREEDATA callback);
+ virtual void* GetPrivateData(void* module_id);
virtual FWL_ERR Update();
virtual FWL_ERR LockUpdate();
virtual FWL_ERR UnlockUpdate();
@@ -76,7 +76,7 @@ protected:
FX_FLOAT GetBorderSize(FX_BOOL bCX = TRUE);
FX_FLOAT GetEdgeWidth();
void GetRelativeRect(CFX_RectF &rect);
- FX_LPVOID GetThemeCapacity(FX_DWORD dwCapacity);
+ void* GetThemeCapacity(FX_DWORD dwCapacity);
IFWL_ThemeProvider* GetAvailableTheme();
CFWL_WidgetImp* GetRootOuter();
CFWL_WidgetImp* GetSameAncestor(CFWL_WidgetImp *pWidget);
diff --git a/xfa/src/fwl/src/core/include/fwl_widgetmgrimp.h b/xfa/src/fwl/src/core/include/fwl_widgetmgrimp.h
index f730f5b33d..12b629ff06 100644
--- a/xfa/src/fwl/src/core/include/fwl_widgetmgrimp.h
+++ b/xfa/src/fwl/src/core/include/fwl_widgetmgrimp.h
@@ -59,7 +59,7 @@ public:
virtual IFWL_Widget* GetWidget(IFWL_Widget *pWidget, FWL_WGTRELATION eRelation);
virtual int32_t GetWidgetIndex(IFWL_Widget *pWidget);
virtual FX_BOOL SetWidgetIndex(IFWL_Widget *pWidget, int32_t nIndex);
- virtual FX_BOOL IsWidget(FX_LPVOID pObj);
+ virtual FX_BOOL IsWidget(void* pObj);
virtual FWL_ERR RepaintWidget(IFWL_Widget *pWidget, const CFX_RectF *pRect = NULL);
virtual FX_DWORD GetCapability()
{
diff --git a/xfa/src/fwl/src/lightwidget/combobox.cpp b/xfa/src/fwl/src/lightwidget/combobox.cpp
index c443dfbcb3..c0806ef15b 100644
--- a/xfa/src/fwl/src/lightwidget/combobox.cpp
+++ b/xfa/src/fwl/src/lightwidget/combobox.cpp
@@ -135,14 +135,14 @@ FWL_ERR CFWL_ComboBox::SetMaxListHeight(FX_FLOAT fMaxHeight)
m_comboBoxData.m_fMaxListHeight = fMaxHeight;
return FWL_ERR_Succeeded;
}
-FWL_ERR CFWL_ComboBox::SetItemData(int32_t iIndex, FX_LPVOID pData)
+FWL_ERR CFWL_ComboBox::SetItemData(int32_t iIndex, void* pData)
{
CFWL_ComboBoxItem *pItem = (CFWL_ComboBoxItem*)(m_comboBoxData.GetItem((IFWL_Widget *)this, iIndex));
_FWL_RETURN_VALUE_IF_FAIL(pItem, FWL_ERR_Indefinite);
pItem->m_pData = pData;
return FWL_ERR_Succeeded;
}
-FX_LPVOID CFWL_ComboBox::GetItemData(int32_t iIndex)
+void* CFWL_ComboBox::GetItemData(int32_t iIndex)
{
CFWL_ComboBoxItem *pItem = (CFWL_ComboBoxItem*)(m_comboBoxData.GetItem((IFWL_Widget *)this, iIndex));
_FWL_RETURN_VALUE_IF_FAIL(pItem, NULL);
@@ -299,7 +299,7 @@ FWL_ERR CFWL_ComboBox::CFWL_ComboBoxDP::GetItemRect(IFWL_Widget *pWidget, FWL_HL
pItem->m_rtItem.height);
return FWL_ERR_Succeeded;
}
-FX_LPVOID CFWL_ComboBox::CFWL_ComboBoxDP::GetItemData(IFWL_Widget *pWidget, FWL_HLISTITEM hItem)
+void* CFWL_ComboBox::CFWL_ComboBoxDP::GetItemData(IFWL_Widget *pWidget, FWL_HLISTITEM hItem)
{
_FWL_RETURN_VALUE_IF_FAIL(hItem, NULL);
CFWL_ComboBoxItem *pItem = (CFWL_ComboBoxItem*)hItem;
@@ -311,7 +311,7 @@ FWL_ERR CFWL_ComboBox::CFWL_ComboBoxDP::SetItemStyles(IFWL_Widget *pWidget, FWL_
((CFWL_ComboBoxItem*)hItem)->m_dwStyles = dwStyle;
return FWL_ERR_Succeeded;
}
-FWL_ERR CFWL_ComboBox::CFWL_ComboBoxDP::SetItemText(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, FX_LPCWSTR pszText)
+FWL_ERR CFWL_ComboBox::CFWL_ComboBoxDP::SetItemText(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, const FX_WCHAR* pszText)
{
_FWL_RETURN_VALUE_IF_FAIL(hItem, FWL_ERR_Indefinite);
((CFWL_ComboBoxItem*)hItem)->m_wsText = pszText;
diff --git a/xfa/src/fwl/src/lightwidget/edit.cpp b/xfa/src/fwl/src/lightwidget/edit.cpp
index 8bace71d74..1ee1066793 100644
--- a/xfa/src/fwl/src/lightwidget/edit.cpp
+++ b/xfa/src/fwl/src/lightwidget/edit.cpp
@@ -112,7 +112,7 @@ FWL_ERR CFWL_Edit::SetFormatString(const CFX_WideString &wsFormat)
_FWL_RETURN_VALUE_IF_FAIL(m_pImp, FWL_ERR_Indefinite);
return ((IFWL_Edit*)m_pImp)->SetFormatString(wsFormat);
}
-FWL_ERR CFWL_Edit::Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLen)
+FWL_ERR CFWL_Edit::Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLen)
{
_FWL_RETURN_VALUE_IF_FAIL(m_pImp, FWL_ERR_Indefinite);
return ((IFWL_Edit*)m_pImp)->Insert(nStart, lpText, nLen);
diff --git a/xfa/src/fwl/src/lightwidget/listbox.cpp b/xfa/src/fwl/src/lightwidget/listbox.cpp
index f3278df1f9..a9890bd283 100644
--- a/xfa/src/fwl/src/lightwidget/listbox.cpp
+++ b/xfa/src/fwl/src/lightwidget/listbox.cpp
@@ -163,14 +163,14 @@ FWL_ERR CFWL_ListBox::GetItemString(FWL_HLISTITEM hItem, CFX_WideString &wsText)
wsText = pItem->m_wsText;
return FWL_ERR_Succeeded;
}
-FWL_ERR CFWL_ListBox::SetItemData(FWL_HLISTITEM hItem, FX_LPVOID pData)
+FWL_ERR CFWL_ListBox::SetItemData(FWL_HLISTITEM hItem, void* pData)
{
_FWL_RETURN_VALUE_IF_FAIL(hItem, FWL_ERR_Indefinite);
CFWL_ListItem *pItem = (CFWL_ListItem*)hItem;
pItem->m_pData = pData;
return FWL_ERR_Succeeded;
}
-FX_LPVOID CFWL_ListBox::GetItemData(FWL_HLISTITEM hItem)
+void* CFWL_ListBox::GetItemData(FWL_HLISTITEM hItem)
{
_FWL_RETURN_VALUE_IF_FAIL(hItem, NULL);
CFWL_ListItem *pItem = (CFWL_ListItem*)hItem;
@@ -270,7 +270,7 @@ FWL_ERR CFWL_ListBox::CFWL_ListBoxDP::GetItemRect(IFWL_Widget *pWidget, FWL_HLIS
rtItem = pItem->m_rtItem;
return FWL_ERR_Succeeded;
}
-FX_LPVOID CFWL_ListBox::CFWL_ListBoxDP::GetItemData(IFWL_Widget *pWidget, FWL_HLISTITEM hItem)
+void* CFWL_ListBox::CFWL_ListBoxDP::GetItemData(IFWL_Widget *pWidget, FWL_HLISTITEM hItem)
{
_FWL_RETURN_VALUE_IF_FAIL(hItem, NULL);
CFWL_ListItem *pItem = (CFWL_ListItem*)hItem;
@@ -282,7 +282,7 @@ FWL_ERR CFWL_ListBox::CFWL_ListBoxDP::SetItemStyles(IFWL_Widget *pWidget, FWL_HL
((CFWL_ListItem*)hItem)->m_dwStates = dwStyle;
return FWL_ERR_Succeeded;
}
-FWL_ERR CFWL_ListBox::CFWL_ListBoxDP::SetItemText(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, FX_LPCWSTR pszText)
+FWL_ERR CFWL_ListBox::CFWL_ListBoxDP::SetItemText(IFWL_Widget *pWidget, FWL_HLISTITEM hItem, const FX_WCHAR* pszText)
{
_FWL_RETURN_VALUE_IF_FAIL(hItem, FWL_ERR_Indefinite);
((CFWL_ListItem*)hItem)->m_wsText = pszText;
diff --git a/xfa/src/fwl/src/lightwidget/theme.cpp b/xfa/src/fwl/src/lightwidget/theme.cpp
index 84925f562e..f9a2bab6a2 100644
--- a/xfa/src/fwl/src/lightwidget/theme.cpp
+++ b/xfa/src/fwl/src/lightwidget/theme.cpp
@@ -47,7 +47,7 @@ FX_BOOL CFWL_Theme::DrawText(CFWL_ThemeText *pParams)
FXSYS_assert(pTheme);
return pTheme->DrawText(pParams);
}
-FX_LPVOID CFWL_Theme::GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity)
+void* CFWL_Theme::GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity)
{
CFWL_WidgetTP *pTheme = GetTheme(pThemePart->m_pWidget);
FXSYS_assert(pTheme);
@@ -133,7 +133,7 @@ CFWL_Theme::~CFWL_Theme()
}
m_arrThemes.RemoveAll();
}
-FWL_ERR CFWL_Theme::SetFont(IFWL_Widget *pWidget, FX_LPCWSTR strFont, FX_FLOAT fFontSize, FX_ARGB rgbFont)
+FWL_ERR CFWL_Theme::SetFont(IFWL_Widget *pWidget, const FX_WCHAR* strFont, FX_FLOAT fFontSize, FX_ARGB rgbFont)
{
int32_t iCount = m_arrThemes.GetSize();
for (int32_t i = 0; i < iCount; i ++) {
diff --git a/xfa/src/fwl/src/lightwidget/widget.cpp b/xfa/src/fwl/src/lightwidget/widget.cpp
index 6171eecf31..b1cbd9ae9e 100644
--- a/xfa/src/fwl/src/lightwidget/widget.cpp
+++ b/xfa/src/fwl/src/lightwidget/widget.cpp
@@ -54,7 +54,7 @@ FX_BOOL CFWL_Widget::IsInstance(FX_WSTR wsClass) const
_FWL_RETURN_VALUE_IF_FAIL(m_pImp, FALSE);
return m_pImp->IsInstance(wsClass);
}
-static FX_LPVOID gs_pFWLWidget = (FX_LPVOID)FXBSTR_ID('l', 'i', 'g', 't');
+static void* gs_pFWLWidget = (void*)FXBSTR_ID('l', 'i', 'g', 't');
FWL_ERR CFWL_Widget::Initialize(const CFWL_WidgetProperties *pProperties )
{
_FWL_RETURN_VALUE_IF_FAIL(m_pImp, FWL_ERR_Indefinite);
@@ -133,12 +133,12 @@ FWL_ERR CFWL_Widget::SetStates(FX_DWORD dwStates, FX_BOOL bSet )
_FWL_RETURN_VALUE_IF_FAIL(m_pImp, FWL_ERR_Indefinite);
return m_pImp->SetStates(dwStates, bSet);
}
-FWL_ERR CFWL_Widget::SetPrivateData(FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback)
+FWL_ERR CFWL_Widget::SetPrivateData(void* module_id, void* pData, PD_CALLBACK_FREEDATA callback)
{
_FWL_RETURN_VALUE_IF_FAIL(m_pImp, FWL_ERR_Indefinite);
return m_pImp->SetPrivateData(module_id, pData, callback);
}
-FX_LPVOID CFWL_Widget::GetPrivateData(FX_LPVOID module_id)
+void* CFWL_Widget::GetPrivateData(void* module_id)
{
_FWL_RETURN_VALUE_IF_FAIL(m_pImp, NULL);
return m_pImp->GetPrivateData(module_id);
diff --git a/xfa/src/fwl/src/theme/comboboxtp.cpp b/xfa/src/fwl/src/theme/comboboxtp.cpp
index c7218955c9..28a1958f58 100644
--- a/xfa/src/fwl/src/theme/comboboxtp.cpp
+++ b/xfa/src/fwl/src/theme/comboboxtp.cpp
@@ -78,7 +78,7 @@ void CFWL_ComboBoxTP::DrawStrethHandler(CFWL_ThemeBackground *pParams, FX_DWORD
pParams->m_pGraphics->SetFillColor(&cr);
pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, &pParams->m_matrix);
}
-FX_LPVOID CFWL_ComboBoxTP::GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity)
+void* CFWL_ComboBoxTP::GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity)
{
if (dwCapacity == FWL_WGTCAPACITY_CMB_ComboFormHandler) {
m_fValue = FWLTHEME_CAPACITY_ComboFormHandler;
diff --git a/xfa/src/fwl/src/theme/formtp.cpp b/xfa/src/fwl/src/theme/formtp.cpp
index ce12c15e78..db152edea5 100644
--- a/xfa/src/fwl/src/theme/formtp.cpp
+++ b/xfa/src/fwl/src/theme/formtp.cpp
@@ -144,7 +144,7 @@ FX_BOOL CFWL_FormTP::DrawText(CFWL_ThemeText *pParams)
}
return CFWL_WidgetTP::DrawText(pParams);
}
-FX_LPVOID CFWL_FormTP::GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity)
+void* CFWL_FormTP::GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity)
{
FX_BOOL bDefPro = FALSE;
FX_BOOL bDwordVal = FALSE;
diff --git a/xfa/src/fwl/src/theme/listboxtp.cpp b/xfa/src/fwl/src/theme/listboxtp.cpp
index a623509973..c16df585d9 100644
--- a/xfa/src/fwl/src/theme/listboxtp.cpp
+++ b/xfa/src/fwl/src/theme/listboxtp.cpp
@@ -67,7 +67,7 @@ FWL_ERR CFWL_ListBoxTP::Finalize()
FinalizeTTO();
return CFWL_WidgetTP::Finalize();
}
-void CFWL_ListBoxTP::DrawListBoxItem(CFX_Graphics *pGraphics, FX_DWORD dwStates, const CFX_RectF *prtItem, FX_LPVOID pData , CFX_Matrix *pMatrix )
+void CFWL_ListBoxTP::DrawListBoxItem(CFX_Graphics *pGraphics, FX_DWORD dwStates, const CFX_RectF *prtItem, void* pData , CFX_Matrix *pMatrix )
{
if (dwStates & FWL_PARTSTATE_LTB_Selected) {
pGraphics->SaveGraphState();
diff --git a/xfa/src/fwl/src/theme/monthcalendartp.cpp b/xfa/src/fwl/src/theme/monthcalendartp.cpp
index 2104d873f3..de7f3a847b 100644
--- a/xfa/src/fwl/src/theme/monthcalendartp.cpp
+++ b/xfa/src/fwl/src/theme/monthcalendartp.cpp
@@ -130,7 +130,7 @@ FX_BOOL CFWL_MonthCalendarTP::DrawText(CFWL_ThemeText *pParams)
}
return CFWL_WidgetTP::DrawText(pParams);
}
-FX_LPVOID CFWL_MonthCalendarTP::GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity)
+void* CFWL_MonthCalendarTP::GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity)
{
FX_BOOL bDefPro = FALSE;
FX_BOOL bDwordVal = FALSE;
diff --git a/xfa/src/fwl/src/theme/pushbuttontp.cpp b/xfa/src/fwl/src/theme/pushbuttontp.cpp
index 8194b249be..9f3127f5b7 100644
--- a/xfa/src/fwl/src/theme/pushbuttontp.cpp
+++ b/xfa/src/fwl/src/theme/pushbuttontp.cpp
@@ -94,7 +94,7 @@ FX_BOOL CFWL_PushButtonTP::DrawBackground(CFWL_ThemeBackground *pParams)
}
return TRUE;
}
-FX_LPVOID CFWL_PushButtonTP::GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity)
+void* CFWL_PushButtonTP::GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity)
{
if (dwCapacity == FWL_WGTCAPACITY_PSB_Margin) {
m_fValue = 0;
diff --git a/xfa/src/fwl/src/theme/scrollbartp.cpp b/xfa/src/fwl/src/theme/scrollbartp.cpp
index a90dafa17e..c10507a57e 100644
--- a/xfa/src/fwl/src/theme/scrollbartp.cpp
+++ b/xfa/src/fwl/src/theme/scrollbartp.cpp
@@ -23,7 +23,7 @@ FX_BOOL CFWL_ScrollBarTP::IsValidWidget(IFWL_Widget *pWidget)
_FWL_RETURN_VALUE_IF_FAIL(pWidget, FALSE);
return pWidget->GetClassID() == FWL_CLASSHASH_ScrollBar;
}
-FX_LPVOID CFWL_ScrollBarTP::GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity)
+void* CFWL_ScrollBarTP::GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity)
{
if (dwCapacity == FWL_CAPACITY_SCB_Size) {
m_fValue = 5;
diff --git a/xfa/src/fwl/src/theme/widgettp.cpp b/xfa/src/fwl/src/theme/widgettp.cpp
index aac6516799..a4c876956d 100644
--- a/xfa/src/fwl/src/theme/widgettp.cpp
+++ b/xfa/src/fwl/src/theme/widgettp.cpp
@@ -69,7 +69,7 @@ FX_BOOL CFWL_WidgetTP::DrawText(CFWL_ThemeText *pParams)
m_pTextOut->DrawLogicText(pParams->m_wsText, iLen, pParams->m_rtPart);
return TRUE;
}
-FX_LPVOID CFWL_WidgetTP::GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity)
+void* CFWL_WidgetTP::GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity)
{
switch(dwCapacity) {
case FWL_WGTCAPACITY_CXBorder: {
@@ -162,7 +162,7 @@ FWL_ERR CFWL_WidgetTP::Finalize()
CFWL_WidgetTP::~CFWL_WidgetTP()
{
}
-FWL_ERR CFWL_WidgetTP::SetFont(IFWL_Widget *pWidget, FX_LPCWSTR strFont, FX_FLOAT fFontSize, FX_ARGB rgbFont)
+FWL_ERR CFWL_WidgetTP::SetFont(IFWL_Widget *pWidget, const FX_WCHAR* strFont, FX_FLOAT fFontSize, FX_ARGB rgbFont)
{
if (!m_pTextOut) {
return FWL_ERR_Succeeded;
diff --git a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.cpp b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.cpp
index bdcbc4c418..5a4a2066fc 100644
--- a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.cpp
+++ b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.cpp
@@ -46,7 +46,7 @@ CBC_DataMatrixDetector::~CBC_DataMatrixDetector()
}
m_rectangleDetector = NULL;
}
-inline FX_BOOL ResultPointsAndTransitionsComparator(FX_LPVOID a, FX_LPVOID b)
+inline FX_BOOL ResultPointsAndTransitionsComparator(void* a, void* b)
{
return ((CBC_ResultPointsAndTransitions *)b)->GetTransitions() > ((CBC_ResultPointsAndTransitions *)a)->GetTransitions();
}
diff --git a/xfa/src/fxbarcode/datamatrix/BC_EdifactEncoder.cpp b/xfa/src/fxbarcode/datamatrix/BC_EdifactEncoder.cpp
index 8a0271f1a0..cc46b8156d 100644
--- a/xfa/src/fxbarcode/datamatrix/BC_EdifactEncoder.cpp
+++ b/xfa/src/fxbarcode/datamatrix/BC_EdifactEncoder.cpp
@@ -131,7 +131,7 @@ CFX_WideString CBC_EdifactEncoder::encodeToCodewords(CFX_WideString sb, int32_t
int32_t len = sb.GetLength() - startPos;
if (len == 0) {
e = BCExceptionNoContents;
- return (FX_LPWSTR)"";
+ return (FX_WCHAR*)"";
}
FX_WCHAR c1 = sb.GetAt(startPos);
FX_WCHAR c2 = len >= 2 ? sb.GetAt(startPos + 1) : 0;
diff --git a/xfa/src/fxbarcode/datamatrix/BC_ErrorCorrection.cpp b/xfa/src/fxbarcode/datamatrix/BC_ErrorCorrection.cpp
index e574742b54..89b920825f 100644
--- a/xfa/src/fxbarcode/datamatrix/BC_ErrorCorrection.cpp
+++ b/xfa/src/fxbarcode/datamatrix/BC_ErrorCorrection.cpp
@@ -106,14 +106,14 @@ CFX_WideString CBC_ErrorCorrection::encodeECC200(CFX_WideString codewords, CBC_S
{
if (codewords.GetLength() != symbolInfo->m_dataCapacity) {
e = BCExceptionIllegalArgument;
- return (FX_LPWSTR)"";
+ return (FX_WCHAR*)"";
}
CFX_WideString sb;
sb += codewords;
int32_t blockCount = symbolInfo->getInterleavedBlockCount();
if (blockCount == 1) {
CFX_WideString ecc = createECCBlock(codewords, symbolInfo->m_errorCodewords, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, (FX_LPWSTR)"");
+ BC_EXCEPTION_CHECK_ReturnValue(e, (FX_WCHAR*)"");
sb += ecc;
} else {
CFX_Int32Array dataSizes;
@@ -136,7 +136,7 @@ CFX_WideString CBC_ErrorCorrection::encodeECC200(CFX_WideString codewords, CBC_S
temp += (FX_WCHAR)codewords.GetAt(d);
}
CFX_WideString ecc = createECCBlock(temp, errorSizes[block], e);
- BC_EXCEPTION_CHECK_ReturnValue(e, (FX_LPWSTR)"");
+ BC_EXCEPTION_CHECK_ReturnValue(e, (FX_WCHAR*)"");
int32_t pos = 0;
for (int32_t l = block; l < errorSizes[block] * blockCount; l += blockCount) {
sb.SetAt(symbolInfo->m_dataCapacity + l, ecc.GetAt(pos++));
@@ -160,7 +160,7 @@ CFX_WideString CBC_ErrorCorrection::createECCBlock(CFX_WideString codewords, int
}
if (table < 0) {
e = BCExceptionIllegalArgument;
- return (FX_LPWSTR)"";
+ return (FX_WCHAR*)"";
}
FX_WORD* ecc = FX_Alloc(FX_WORD, numECWords);
FXSYS_memset32(ecc, 0, numECWords * sizeof(FX_WORD));
diff --git a/xfa/src/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp b/xfa/src/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
index 3866f45a5e..3aded2d349 100644
--- a/xfa/src/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
+++ b/xfa/src/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
@@ -72,7 +72,7 @@ CFX_WideString CBC_HighLevelEncoder::encodeHighLevel(CFX_WideString msg, CFX_Wid
CFX_WideString CBC_HighLevelEncoder::encodeHighLevel(CFX_WideString msg, CFX_WideString ecLevel, SymbolShapeHint shape, CBC_Dimension* minSize, CBC_Dimension* maxSize, int32_t &e)
{
CBC_EncoderContext context(msg, ecLevel, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, (FX_LPWSTR)"");
+ BC_EXCEPTION_CHECK_ReturnValue(e, (FX_WCHAR*)"");
context.setSymbolShape(shape);
context.setSizeConstraints(minSize, maxSize);
if ((msg.Mid(0, 6) == MACRO_05_HEADER) && (msg.Mid(msg.GetLength() - 1, 1) == MACRO_TRAILER)) {
@@ -99,7 +99,7 @@ CFX_WideString CBC_HighLevelEncoder::encodeHighLevel(CFX_WideString msg, CFX_Wi
delete (CBC_Encoder*)encoders.GetAt(i);
}
encoders.RemoveAll();
- return (FX_LPWSTR)"";
+ return (FX_WCHAR*)"";
}
if (context.m_newEncoding >= 0) {
encodingMode = context.m_newEncoding;
@@ -113,7 +113,7 @@ CFX_WideString CBC_HighLevelEncoder::encodeHighLevel(CFX_WideString msg, CFX_Wi
delete (CBC_Encoder*)encoders.GetAt(i);
}
encoders.RemoveAll();
- return (FX_LPWSTR)"";
+ return (FX_WCHAR*)"";
}
int32_t capacity = context.m_symbolInfo->m_dataCapacity;
if (len < capacity) {
diff --git a/xfa/src/fxbarcode/datamatrix/BC_SymbolInfo.cpp b/xfa/src/fxbarcode/datamatrix/BC_SymbolInfo.cpp
index 0044683a5c..587bdd3128 100644
--- a/xfa/src/fxbarcode/datamatrix/BC_SymbolInfo.cpp
+++ b/xfa/src/fxbarcode/datamatrix/BC_SymbolInfo.cpp
@@ -217,24 +217,24 @@ int32_t CBC_SymbolInfo::getErrorLengthForInterleavedBlock(int32_t index)
CFX_WideString CBC_SymbolInfo::toString(int32_t &e)
{
CFX_WideString sb;
- sb += (FX_LPWSTR)(m_rectangular ? "Rectangular Symbol:" : "Square Symbol:");
- sb += (FX_LPWSTR)" data region ";
+ sb += (FX_WCHAR*)(m_rectangular ? "Rectangular Symbol:" : "Square Symbol:");
+ sb += (FX_WCHAR*)" data region ";
sb += m_matrixWidth;
sb += (FX_WCHAR)'x';
sb += m_matrixHeight;
- sb += (FX_LPWSTR)", symbol size ";
+ sb += (FX_WCHAR*)", symbol size ";
sb += getSymbolWidth(e);
- BC_EXCEPTION_CHECK_ReturnValue(e, (FX_LPWSTR)"");
+ BC_EXCEPTION_CHECK_ReturnValue(e, (FX_WCHAR*)"");
sb += (FX_WCHAR)'x';
sb += getSymbolHeight(e);
- BC_EXCEPTION_CHECK_ReturnValue(e, (FX_LPWSTR)"");
- sb += (FX_LPWSTR)", symbol data size ";
+ BC_EXCEPTION_CHECK_ReturnValue(e, (FX_WCHAR*)"");
+ sb += (FX_WCHAR*)", symbol data size ";
sb += getSymbolDataWidth(e);
- BC_EXCEPTION_CHECK_ReturnValue(e, (FX_LPWSTR)"");
+ BC_EXCEPTION_CHECK_ReturnValue(e, (FX_WCHAR*)"");
sb += (FX_WCHAR)'x';
sb += getSymbolDataHeight(e);
- BC_EXCEPTION_CHECK_ReturnValue(e, (FX_LPWSTR)"");
- sb += (FX_LPWSTR)", codewords ";
+ BC_EXCEPTION_CHECK_ReturnValue(e, (FX_WCHAR*)"");
+ sb += (FX_WCHAR*)", codewords ";
sb += m_dataCapacity;
sb += (FX_WCHAR)'+';
sb += m_errorCodewords;
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp b/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp
index ca115391ef..7f7a69c1b7 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp
@@ -26,7 +26,7 @@
#include "../oned/BC_OneDReader.h"
#include "../oned/BC_OnedCode39Reader.h"
#include "../oned/BC_OnedCodaBarReader.h"
-FX_LPCSTR CBC_OnedCodaBarReader::ALPHABET_STRING = "0123456789-$:/.+ABCDTN";
+const FX_CHAR* CBC_OnedCodaBarReader::ALPHABET_STRING = "0123456789-$:/.+ABCDTN";
const int32_t CBC_OnedCodaBarReader::CHARACTER_ENCODINGS[22] = {
0x003, 0x006, 0x009, 0x060, 0x012, 0x042, 0x021, 0x024, 0x030, 0x048,
0x00c, 0x018, 0x045, 0x051, 0x054, 0x015, 0x01A, 0x029, 0x00B, 0x00E,
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.h b/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.h
index 18aab8ba8d..dbd2559dc6 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.h
+++ b/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.h
@@ -18,7 +18,7 @@ public:
CFX_Int32Array *FindAsteriskPattern(CBC_CommonBitArray *row, int32_t &e);
FX_BOOL ArrayContains(const FX_CHAR array[], FX_CHAR key);
FX_CHAR ToNarrowWidePattern(CFX_Int32Array *counter);
- static FX_LPCSTR ALPHABET_STRING;
+ static const FX_CHAR* ALPHABET_STRING;
const static int32_t CHARACTER_ENCODINGS[22];
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp b/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp
index e5e6392c17..a678338894 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp
@@ -25,8 +25,8 @@
#include "../common/BC_CommonBitArray.h"
#include "BC_OneDReader.h"
#include "BC_OnedCode39Reader.h"
-FX_LPCSTR CBC_OnedCode39Reader::ALPHABET_STRING = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. *$/+%";
-FX_LPCSTR CBC_OnedCode39Reader::CHECKSUM_STRING = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%";
+const FX_CHAR* CBC_OnedCode39Reader::ALPHABET_STRING = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. *$/+%";
+const FX_CHAR* CBC_OnedCode39Reader::CHECKSUM_STRING = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%";
const int32_t CBC_OnedCode39Reader::CHARACTER_ENCODINGS[44] = {
0x034, 0x121, 0x061, 0x160, 0x031, 0x130, 0x070, 0x025, 0x124, 0x064,
0x109, 0x049, 0x148, 0x019, 0x118, 0x058, 0x00D, 0x10C, 0x04C, 0x01C,
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.h b/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.h
index 3e7db70f95..fa1e2e2dd6 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.h
+++ b/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.h
@@ -12,8 +12,8 @@ class CBC_OnedCoda39Reader;
class CBC_OnedCode39Reader : public CBC_OneDReader
{
public:
- static FX_LPCSTR ALPHABET_STRING;
- static FX_LPCSTR CHECKSUM_STRING;
+ static const FX_CHAR* ALPHABET_STRING;
+ static const FX_CHAR* CHECKSUM_STRING;
const static int32_t CHARACTER_ENCODINGS[44];
const static int32_t ASTERISK_ENCODING;
CBC_OnedCode39Reader();
diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp
index 85c01d60b0..38efe93339 100644
--- a/xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp
+++ b/xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp
@@ -62,7 +62,7 @@ CFX_WideString CBC_PDF417HighLevelEncoder::encodeHighLevel(CFX_WideString wideMs
FX_WCHAR ch = (FX_WCHAR)(bytes.GetAt(i) & 0xff);
if (ch == '?' && bytes.GetAt(i) != '?') {
e = BCExceptionCharactersOutsideISO88591Encoding;
- return (FX_LPWSTR)"";
+ return (FX_WCHAR*)"";
}
msg += ch;
}
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.cpp b/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.cpp
index b521222f00..ab2702e343 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.cpp
+++ b/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.cpp
@@ -28,7 +28,7 @@
#include "../common/BC_CommonDecoderResult.h"
#include "BC_QRCoderMode.h"
#include "BC_QRDecodedBitStreamParser.h"
-FX_LPCSTR CBC_QRDecodedBitStreamParser::UTF_8 = "utf8";
+const FX_CHAR* CBC_QRDecodedBitStreamParser::UTF_8 = "utf8";
const FX_CHAR CBC_QRDecodedBitStreamParser::ALPHANUMERIC_CHARS[45] = {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B',
'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.h b/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.h
index d607e72da8..e6b556e1e1 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.h
+++ b/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.h
@@ -15,7 +15,7 @@ class CBC_QRDecodedBitStreamParser
{
private:
const static FX_CHAR ALPHANUMERIC_CHARS[45];
- static FX_LPCSTR UTF_8;
+ static const FX_CHAR* UTF_8;
CBC_QRDecodedBitStreamParser();
public:
virtual ~CBC_QRDecodedBitStreamParser();
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp b/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp
index 975776db3f..0ff22c77dd 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp
+++ b/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp
@@ -412,7 +412,7 @@ FX_BOOL CBC_QRFinderPatternFinder::HaveMultiplyConfirmedCenters()
}
return totalDeviation <= 0.05f * totalModuleSize;
}
-inline FX_BOOL centerComparator(FX_LPVOID a, FX_LPVOID b)
+inline FX_BOOL centerComparator(void* a, void* b)
{
return ((CBC_QRFinderPattern*)b)->GetCount() < ((CBC_QRFinderPattern*)a)->GetCount();
}
diff --git a/xfa/src/fxbarcode/utils.h b/xfa/src/fxbarcode/utils.h
index 9639ba8504..95b5ff05e6 100644
--- a/xfa/src/fxbarcode/utils.h
+++ b/xfa/src/fxbarcode/utils.h
@@ -6,11 +6,11 @@
#ifndef _BC_UTILS_H_
#define _BC_UTILS_H_
-typedef CFX_MapPtrTemplate<FX_LPVOID, int32_t> CFX_PtrToInt32;
+typedef CFX_MapPtrTemplate<void*, int32_t> CFX_PtrToInt32;
FX_BOOL BC_FX_ByteString_Replace(CFX_ByteString &dst, FX_DWORD first, FX_DWORD last, int32_t count, FX_CHAR c);
void BC_FX_ByteString_Append(CFX_ByteString &dst, int32_t count, FX_CHAR c);
void BC_FX_ByteString_Append(CFX_ByteString &dst, const CFX_ByteArray &ba);
-typedef FX_BOOL (*BC_PtrArrayCompareCallback)(FX_LPVOID l, FX_LPVOID r);
+typedef FX_BOOL (*BC_PtrArrayCompareCallback)(void* l, void* r);
void BC_FX_PtrArray_Sort(CFX_PtrArray &src, BC_PtrArrayCompareCallback fun);
template<class _Ty>
class CBC_AutoPtr
diff --git a/xfa/src/fxfa/src/app/xfa_checksum.cpp b/xfa/src/fxfa/src/app/xfa_checksum.cpp
index 9f4345f408..0bb63ce79a 100644
--- a/xfa/src/fxfa/src/app/xfa_checksum.cpp
+++ b/xfa/src/fxfa/src/app/xfa_checksum.cpp
@@ -15,7 +15,7 @@ CXFA_SAXReaderHandler::CXFA_SAXReaderHandler(CXFA_ChecksumContext *pContext)
CXFA_SAXReaderHandler::~CXFA_SAXReaderHandler()
{
}
-FX_LPVOID CXFA_SAXReaderHandler::OnTagEnter(FX_BSTR bsTagName, FX_SAXNODE eType, FX_DWORD dwStartPos)
+void* CXFA_SAXReaderHandler::OnTagEnter(FX_BSTR bsTagName, FX_SAXNODE eType, FX_DWORD dwStartPos)
{
UpdateChecksum(TRUE);
if (eType != FX_SAXNODE_Tag && eType != FX_SAXNODE_Instruction) {
@@ -31,7 +31,7 @@ FX_LPVOID CXFA_SAXReaderHandler::OnTagEnter(FX_BSTR bsTagName, FX_SAXNODE eType,
m_SAXContext.m_bsTagName = bsTagName;
return &m_SAXContext;
}
-void CXFA_SAXReaderHandler::OnTagAttribute(FX_LPVOID pTag, FX_BSTR bsAttri, FX_BSTR bsValue)
+void CXFA_SAXReaderHandler::OnTagAttribute(void* pTag, FX_BSTR bsAttri, FX_BSTR bsValue)
{
if (pTag == NULL) {
return;
@@ -43,7 +43,7 @@ void CXFA_SAXReaderHandler::OnTagAttribute(FX_LPVOID pTag, FX_BSTR bsAttri, FX_B
textBuf << bsValue;
textBuf << FX_BSTRC("\"");
}
-void CXFA_SAXReaderHandler::OnTagBreak(FX_LPVOID pTag)
+void CXFA_SAXReaderHandler::OnTagBreak(void* pTag)
{
if (pTag == NULL) {
return;
@@ -52,7 +52,7 @@ void CXFA_SAXReaderHandler::OnTagBreak(FX_LPVOID pTag)
textBuf << FX_BSTRC(">");
UpdateChecksum(FALSE);
}
-void CXFA_SAXReaderHandler::OnTagData(FX_LPVOID pTag, FX_SAXNODE eType, FX_BSTR bsData, FX_DWORD dwStartPos)
+void CXFA_SAXReaderHandler::OnTagData(void* pTag, FX_SAXNODE eType, FX_BSTR bsData, FX_DWORD dwStartPos)
{
if (pTag == NULL) {
return;
@@ -66,7 +66,7 @@ void CXFA_SAXReaderHandler::OnTagData(FX_LPVOID pTag, FX_SAXNODE eType, FX_BSTR
textBuf << FX_BSTRC("]]>");
}
}
-void CXFA_SAXReaderHandler::OnTagClose(FX_LPVOID pTag, FX_DWORD dwEndPos)
+void CXFA_SAXReaderHandler::OnTagClose(void* pTag, FX_DWORD dwEndPos)
{
if (pTag == NULL) {
return;
@@ -82,7 +82,7 @@ void CXFA_SAXReaderHandler::OnTagClose(FX_LPVOID pTag, FX_DWORD dwEndPos)
}
UpdateChecksum(FALSE);
}
-void CXFA_SAXReaderHandler::OnTagEnd(FX_LPVOID pTag, FX_BSTR bsTagName, FX_DWORD dwEndPos)
+void CXFA_SAXReaderHandler::OnTagEnd(void* pTag, FX_BSTR bsTagName, FX_DWORD dwEndPos)
{
if (pTag == NULL) {
return;
@@ -93,7 +93,7 @@ void CXFA_SAXReaderHandler::OnTagEnd(FX_LPVOID pTag, FX_BSTR bsTagName, FX_DWORD
textBuf << FX_BSTRC(">");
UpdateChecksum(FALSE);
}
-void CXFA_SAXReaderHandler::OnTargetData(FX_LPVOID pTag, FX_SAXNODE eType, FX_BSTR bsData, FX_DWORD dwStartPos)
+void CXFA_SAXReaderHandler::OnTargetData(void* pTag, FX_SAXNODE eType, FX_BSTR bsData, FX_DWORD dwStartPos)
{
if (pTag == NULL && eType != FX_SAXNODE_Comment) {
return;
@@ -116,7 +116,7 @@ void CXFA_SAXReaderHandler::UpdateChecksum(FX_BOOL bCheckSpace)
if (iLength < 1) {
return;
}
- FX_LPBYTE pBuffer = m_SAXContext.m_TextBuf.GetBuffer();
+ uint8_t* pBuffer = m_SAXContext.m_TextBuf.GetBuffer();
FX_BOOL bUpdata = TRUE;
if (bCheckSpace) {
bUpdata = FALSE;
@@ -184,7 +184,7 @@ void CXFA_ChecksumContext::FinishChecksum()
FXSYS_memset(digest, 0, 20);
CRYPT_SHA1Finish(m_pByteContext, digest);
int32_t nLen = FX_Base64EncodeA(digest, 20, NULL);
- FX_LPSTR pBuffer = m_bsChecksum.GetBuffer(nLen);
+ FX_CHAR* pBuffer = m_bsChecksum.GetBuffer(nLen);
FX_Base64EncodeA(digest, 20, pBuffer);
m_bsChecksum.ReleaseBuffer(nLen);
FX_Free(m_pByteContext);
diff --git a/xfa/src/fxfa/src/app/xfa_checksum.h b/xfa/src/fxfa/src/app/xfa_checksum.h
index dc080096bd..8b6ecb56a6 100644
--- a/xfa/src/fxfa/src/app/xfa_checksum.h
+++ b/xfa/src/fxfa/src/app/xfa_checksum.h
@@ -23,14 +23,14 @@ class CXFA_SAXReaderHandler : public IFX_SAXReaderHandler
public:
CXFA_SAXReaderHandler(CXFA_ChecksumContext *pContext);
virtual ~CXFA_SAXReaderHandler();
- virtual FX_LPVOID OnTagEnter(FX_BSTR bsTagName, FX_SAXNODE eType, FX_DWORD dwStartPos);
- virtual void OnTagAttribute(FX_LPVOID pTag, FX_BSTR bsAttri, FX_BSTR bsValue);
- virtual void OnTagBreak(FX_LPVOID pTag);
- virtual void OnTagData(FX_LPVOID pTag, FX_SAXNODE eType, FX_BSTR bsData, FX_DWORD dwStartPos);
- virtual void OnTagClose(FX_LPVOID pTag, FX_DWORD dwEndPos);
- virtual void OnTagEnd(FX_LPVOID pTag, FX_BSTR bsTagName, FX_DWORD dwEndPos);
+ virtual void* OnTagEnter(FX_BSTR bsTagName, FX_SAXNODE eType, FX_DWORD dwStartPos);
+ virtual void OnTagAttribute(void* pTag, FX_BSTR bsAttri, FX_BSTR bsValue);
+ virtual void OnTagBreak(void* pTag);
+ virtual void OnTagData(void* pTag, FX_SAXNODE eType, FX_BSTR bsData, FX_DWORD dwStartPos);
+ virtual void OnTagClose(void* pTag, FX_DWORD dwEndPos);
+ virtual void OnTagEnd(void* pTag, FX_BSTR bsTagName, FX_DWORD dwEndPos);
- virtual void OnTargetData(FX_LPVOID pTag, FX_SAXNODE eType, FX_BSTR bsData, FX_DWORD dwStartPos);
+ virtual void OnTargetData(void* pTag, FX_SAXNODE eType, FX_BSTR bsData, FX_DWORD dwStartPos);
protected:
void UpdateChecksum(FX_BOOL bCheckSpace);
CXFA_ChecksumContext *m_pContext;
@@ -52,7 +52,7 @@ public:
void Update(FX_BSTR bsText);
protected:
IFX_SAXReader *m_pSAXReader;
- FX_LPBYTE m_pByteContext;
+ uint8_t* m_pByteContext;
CFX_ByteString m_bsChecksum;
};
#endif
diff --git a/xfa/src/fxfa/src/app/xfa_ffapp.cpp b/xfa/src/fxfa/src/app/xfa_ffapp.cpp
index 2fc52722ef..bea64daf5f 100644
--- a/xfa/src/fxfa/src/app/xfa_ffapp.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffapp.cpp
@@ -30,7 +30,7 @@ FX_FILESIZE CXFA_FileRead::GetSize()
}
int32_t iCount = m_Streams.GetSize();
FX_DWORD iBufferSize = 4096;
- FX_LPBYTE pBuf = FX_Alloc(uint8_t, iBufferSize);
+ uint8_t* pBuf = FX_Alloc(uint8_t, iBufferSize);
for (int32_t i = 0; i < iCount; i++) {
CPDF_StreamFilter* pStreamFilter = m_Streams[i]->GetStreamFilter(FALSE);
FX_DWORD dwCurSize = 0;
@@ -65,11 +65,11 @@ FX_BOOL CXFA_FileRead::ReadBlock(void* buffer, FX_FILESIZE offset, size_t size)
}
CPDF_StreamFilter* pStreamFilter = m_Streams[i]->GetStreamFilter(FALSE);
if ((offset -= dwLen) > 0) {
- FX_LPBYTE pBuf = FX_Alloc(uint8_t, offset);
+ uint8_t* pBuf = FX_Alloc(uint8_t, offset);
FX_DWORD dwRead = pStreamFilter->ReadBlock(pBuf, offset);
FX_Free(pBuf);
}
- FX_DWORD dwHadRead = pStreamFilter->ReadBlock((FX_LPBYTE)buffer, size);
+ FX_DWORD dwHadRead = pStreamFilter->ReadBlock((uint8_t*)buffer, size);
delete pStreamFilter;
size -= dwHadRead;
if (size <= 0) {
@@ -78,7 +78,7 @@ FX_BOOL CXFA_FileRead::ReadBlock(void* buffer, FX_FILESIZE offset, size_t size)
FX_DWORD dwReadSize = dwHadRead;
for (int32_t iStart = i + 1; iStart < iCount; iStart++) {
CPDF_StreamFilter* pStreamFilter = m_Streams[iStart]->GetStreamFilter(FALSE);
- FX_DWORD dwHadRead = pStreamFilter->ReadBlock(((FX_LPBYTE)buffer) + dwReadSize, size);
+ FX_DWORD dwHadRead = pStreamFilter->ReadBlock(((uint8_t*)buffer) + dwReadSize, size);
delete pStreamFilter;
size -= dwHadRead;
if (size <= 0) {
@@ -128,7 +128,7 @@ FX_BOOL CXFA_FileRead2::ReadBlock(void* buffer, FX_FILESIZE offset, size_t size)
if (size == 0) {
return TRUE;
}
- buffer = (FX_LPBYTE)buffer + dwRead;
+ buffer = (uint8_t*)buffer + dwRead;
offset = 0;
index++;
}
diff --git a/xfa/src/fxfa/src/app/xfa_ffbarcode.h b/xfa/src/fxfa/src/app/xfa_ffbarcode.h
index d6589c090a..20ae9c278e 100644
--- a/xfa/src/fxfa/src/app/xfa_ffbarcode.h
+++ b/xfa/src/fxfa/src/app/xfa_ffbarcode.h
@@ -84,7 +84,7 @@ enum XFA_BARCODETYPEENUM {
};
struct XFA_BARCODETYPEENUMINFO {
uint32_t uHash;
- FX_LPCWSTR pName;
+ const FX_WCHAR* pName;
XFA_BARCODETYPEENUM eName;
BC_TYPE eBCType;
};
diff --git a/xfa/src/fxfa/src/app/xfa_ffdoc.cpp b/xfa/src/fxfa/src/app/xfa_ffdoc.cpp
index 10ed9d85bc..97514c83ae 100644
--- a/xfa/src/fxfa/src/app/xfa_ffdoc.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffdoc.cpp
@@ -39,7 +39,7 @@ int32_t CXFA_FFDoc::StartLoad()
m_pDocument = pDocParser->GetDocument();
return iStatus;
}
-FX_BOOL XFA_GetPDFContentsFromPDFXML(IFDE_XMLNode *pPDFElement, FX_LPBYTE &pByteBuffer, int32_t& iBufferSize)
+FX_BOOL XFA_GetPDFContentsFromPDFXML(IFDE_XMLNode *pPDFElement, uint8_t* &pByteBuffer, int32_t& iBufferSize)
{
IFDE_XMLElement* pDocumentElement = NULL;
for (IFDE_XMLNode *pXMLNode = pPDFElement->GetNodeItem(IFDE_XMLNode::FirstChild); pXMLNode; pXMLNode = pXMLNode->GetNodeItem(IFDE_XMLNode::NextSibling)) {
@@ -111,7 +111,7 @@ int32_t CXFA_FFDoc::DoLoad(IFX_Pause *pPause )
return XFA_PARSESTATUS_SyntaxErr;
}
int32_t iBufferSize = 0;
- FX_LPBYTE pByteBuffer = NULL;
+ uint8_t* pByteBuffer = NULL;
IFX_FileRead* pXFAReader = NULL;
if (XFA_GetPDFContentsFromPDFXML(pPDFXML, pByteBuffer, iBufferSize)) {
pXFAReader = FX_CreateMemoryStream(pByteBuffer, iBufferSize, TRUE);
@@ -183,10 +183,10 @@ void CXFA_FFDoc::StopLoad()
}
IXFA_DocView* CXFA_FFDoc::CreateDocView(FX_DWORD dwView )
{
- CXFA_FFDocView* pDocView = (CXFA_FFDocView*)m_mapTypeToDocView.GetValueAt((FX_LPVOID)(uintptr_t)dwView);
+ CXFA_FFDocView* pDocView = (CXFA_FFDocView*)m_mapTypeToDocView.GetValueAt((void*)(uintptr_t)dwView);
if (!pDocView) {
pDocView = FX_NEW CXFA_FFDocView(this);
- m_mapTypeToDocView.SetAt((FX_LPVOID)(uintptr_t)dwView, pDocView);
+ m_mapTypeToDocView.SetAt((void*)(uintptr_t)dwView, pDocView);
}
return pDocView;
}
@@ -194,7 +194,7 @@ CXFA_FFDocView* CXFA_FFDoc::GetDocView(IXFA_DocLayout* pLayout)
{
FX_POSITION ps = m_mapTypeToDocView.GetStartPosition();
while (ps) {
- FX_LPVOID pType;
+ void* pType;
CXFA_FFDocView* pDocView;
m_mapTypeToDocView.GetNextAssoc(ps, pType, (void*&)pDocView);
if (pDocView->GetXFALayout() == pLayout) {
@@ -207,7 +207,7 @@ CXFA_FFDocView* CXFA_FFDoc::GetDocView()
{
FX_POSITION ps = m_mapTypeToDocView.GetStartPosition();
if (ps) {
- FX_LPVOID pType;
+ void* pType;
CXFA_FFDocView* pDocView;
m_mapTypeToDocView.GetNextAssoc(ps, pType, (void*&)pDocView);
return pDocView;
@@ -271,7 +271,7 @@ FX_BOOL CXFA_FFDoc::CloseDoc()
{
FX_POSITION psClose = m_mapTypeToDocView.GetStartPosition();
while (psClose) {
- FX_LPVOID pType;
+ void* pType;
CXFA_FFDocView* pDocView;
m_mapTypeToDocView.GetNextAssoc(psClose, pType, (void*&)pDocView);
pDocView->RunDocClose();
@@ -281,7 +281,7 @@ FX_BOOL CXFA_FFDoc::CloseDoc()
}
FX_POSITION ps = m_mapTypeToDocView.GetStartPosition();
while (ps) {
- FX_LPVOID pType;
+ void* pType;
CXFA_FFDocView* pDocView;
m_mapTypeToDocView.GetNextAssoc(ps, pType, (void*&)pDocView);
delete pDocView;
@@ -303,7 +303,7 @@ FX_BOOL CXFA_FFDoc::CloseDoc()
}
ps = m_mapNamedImages.GetStartPosition();
while (ps) {
- FX_LPVOID pName;
+ void* pName;
FX_IMAGEDIB_AND_DPI* pImage = NULL;
m_mapNamedImages.GetNextAssoc(ps, pName, (void*&)pImage);
if (pImage) {
@@ -390,7 +390,7 @@ CFX_DIBitmap* CXFA_FFDoc::GetPDFNamedImage(FX_WSTR wsName, int32_t &iImageXDpi,
imageDIBDpi->iImageYDpi = 0;
CPDF_StreamAcc streamAcc;
streamAcc.LoadAllData((CPDF_Stream*)pObject);
- IFX_FileRead* pImageFileRead = FX_CreateMemoryStream((FX_LPBYTE)streamAcc.GetData(), streamAcc.GetSize());
+ IFX_FileRead* pImageFileRead = FX_CreateMemoryStream((uint8_t*)streamAcc.GetData(), streamAcc.GetSize());
imageDIBDpi->pDibSource = XFA_LoadImageFromBuffer(pImageFileRead, FXCODEC_IMAGE_UNKNOWN, iImageXDpi, iImageYDpi);
imageDIBDpi->iImageXDpi = iImageXDpi;
imageDIBDpi->iImageYDpi = iImageYDpi;
@@ -430,7 +430,7 @@ FX_BOOL CXFA_FFDoc::SavePackage(FX_WSTR wsPackage, IFX_FileWrite* pFile, IXFA_Ch
if (pCSContext) {
pCSContext->GetChecksum(bsChecksum);
}
- bFlags = pExport->Export(pFile, pNode, 0, bsChecksum.GetLength() ? (FX_LPCSTR)bsChecksum : NULL);
+ bFlags = pExport->Export(pFile, pNode, 0, bsChecksum.GetLength() ? (const FX_CHAR*)bsChecksum : NULL);
} else {
bFlags = pExport->Export(pFile);
}
diff --git a/xfa/src/fxfa/src/app/xfa_ffdocview.cpp b/xfa/src/fxfa/src/app/xfa_ffdocview.cpp
index dcf6c28816..1532e28607 100644
--- a/xfa/src/fxfa/src/app/xfa_ffdocview.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffdocview.cpp
@@ -171,7 +171,7 @@ void CXFA_FFDocView::ShowNullTestMsg()
pAppProvider->LoadString(XFA_IDS_ValidateLimit, wsLimit);
if (!wsLimit.IsEmpty()) {
CFX_WideString wsTemp;
- wsTemp.Format((FX_LPCWSTR)wsLimit, iRemain);
+ wsTemp.Format((const FX_WCHAR*)wsLimit, iRemain);
wsMsg += FX_WSTRC(L"\n") + wsTemp;
}
}
@@ -696,7 +696,7 @@ void CXFA_FFDocView::RunCalculateRecursive(int32_t& iIndex)
AddCalculateNodeNotify(pCurAcc->GetNode());
int32_t iRefCount = (int32_t)(uintptr_t)pCurAcc->GetNode()->GetUserData(XFA_CalcRefCount);
iRefCount++;
- pCurAcc->GetNode()->SetUserData(XFA_CalcRefCount, (FX_LPVOID)(uintptr_t)iRefCount);
+ pCurAcc->GetNode()->SetUserData(XFA_CalcRefCount, (void*)(uintptr_t)iRefCount);
if (iRefCount > 11) {
break;
}
@@ -719,7 +719,7 @@ int32_t CXFA_FFDocView::RunCalculateWidgets()
}
for (int32_t i = 0; i < m_CalculateAccs.GetSize(); i++) {
CXFA_WidgetAcc* pCurAcc = (CXFA_WidgetAcc*)m_CalculateAccs[i];
- pCurAcc->GetNode()->SetUserData(XFA_CalcRefCount, (FX_LPVOID)(uintptr_t)0);
+ pCurAcc->GetNode()->SetUserData(XFA_CalcRefCount, (void*)(uintptr_t)0);
}
m_CalculateAccs.RemoveAll();
return XFA_EVENTERROR_Sucess;
diff --git a/xfa/src/fxfa/src/app/xfa_ffimageedit.cpp b/xfa/src/fxfa/src/app/xfa_ffimageedit.cpp
index 0174ee71c5..21bd95895a 100644
--- a/xfa/src/fxfa/src/app/xfa_ffimageedit.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffimageedit.cpp
@@ -132,11 +132,11 @@ FX_BOOL CXFA_FFImageEdit::OnLButtonDown(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT
int32_t nDataSize = pFileRead->GetSize();
if (nDataSize > 0) {
CFX_ByteString bsBuf;
- FX_LPSTR pImageBuffer = bsBuf.GetBuffer(nDataSize);
+ FX_CHAR* pImageBuffer = bsBuf.GetBuffer(nDataSize);
pFileRead->ReadBlock(pImageBuffer, 0, nDataSize);
bsBuf.ReleaseBuffer();
if (!bsBuf.IsEmpty()) {
- FX_LPSTR pData = XFA_Base64Encode(bsBuf, nDataSize);
+ FX_CHAR* pData = XFA_Base64Encode(bsBuf, nDataSize);
wsImage = CFX_WideString::FromLocal(pData);
if (pData != NULL) {
FX_Free(pData);
diff --git a/xfa/src/fxfa/src/app/xfa_ffnotify.cpp b/xfa/src/fxfa/src/app/xfa_ffnotify.cpp
index d42e7e611c..3f96278e24 100644
--- a/xfa/src/fxfa/src/app/xfa_ffnotify.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffnotify.cpp
@@ -30,7 +30,7 @@
#include "xfa_textlayout.h"
#include "xfa_ffwidgetacc.h"
#include "xfa_ffnotify.h"
-static void XFA_FFDeleteWidgetAcc(FX_LPVOID pData)
+static void XFA_FFDeleteWidgetAcc(void* pData)
{
if (pData) {
delete (CXFA_WidgetAcc*)pData;
@@ -44,7 +44,7 @@ CXFA_FFNotify::CXFA_FFNotify(CXFA_FFDoc* pDoc)
CXFA_FFNotify::~CXFA_FFNotify()
{
}
-void CXFA_FFNotify::OnPageEvent(IXFA_LayoutPage *pSender, XFA_PAGEEVENT eEvent, FX_LPVOID pParam)
+void CXFA_FFNotify::OnPageEvent(IXFA_LayoutPage *pSender, XFA_PAGEEVENT eEvent, void* pParam)
{
CXFA_FFDocView* pDocView = m_pDoc->GetDocView(pSender->GetLayout());
if (!pDocView) {
@@ -52,7 +52,7 @@ void CXFA_FFNotify::OnPageEvent(IXFA_LayoutPage *pSender, XFA_PAGEEVENT eEvent,
}
pDocView->OnPageEvent(pSender, eEvent, (int32_t)(uintptr_t)pParam);
}
-void CXFA_FFNotify::OnNodeEvent(CXFA_Node *pSender, XFA_NODEEVENT eEvent, FX_LPVOID pParam , FX_LPVOID pParam2 , FX_LPVOID pParam3, FX_LPVOID pParam4)
+void CXFA_FFNotify::OnNodeEvent(CXFA_Node *pSender, XFA_NODEEVENT eEvent, void* pParam , void* pParam2 , void* pParam3, void* pParam4)
{
switch (eEvent) {
case XFA_NODEEVENT_Ready:
@@ -72,7 +72,7 @@ void CXFA_FFNotify::OnNodeEvent(CXFA_Node *pSender, XFA_NODEEVENT eEvent, FX_LPV
break;
}
}
-void CXFA_FFNotify::OnWidgetDataEvent(CXFA_WidgetData* pSender, FX_DWORD dwEvent, FX_LPVOID pParam , FX_LPVOID pAdditional , FX_LPVOID pAdditional2 )
+void CXFA_FFNotify::OnWidgetDataEvent(CXFA_WidgetData* pSender, FX_DWORD dwEvent, void* pParam , void* pAdditional , void* pAdditional2 )
{
CXFA_WidgetAcc* pWidgetAcc = (CXFA_WidgetAcc*)pSender;
switch (dwEvent) {
@@ -91,9 +91,9 @@ void CXFA_FFNotify::OnWidgetDataEvent(CXFA_WidgetData* pSender, FX_DWORD dwEvent
while (pWidget) {
if (pWidget->IsLoaded()) {
if (pWidgetAcc->IsListBox()) {
- ((CXFA_FFListBox*)pWidget)->InsertItem((FX_WSTR)(FX_LPCWSTR)pParam, (int32_t)(uintptr_t)pAdditional2);
+ ((CXFA_FFListBox*)pWidget)->InsertItem((FX_WSTR)(const FX_WCHAR*)pParam, (int32_t)(uintptr_t)pAdditional2);
} else {
- ((CXFA_FFComboBox*)pWidget)->InsertItem((FX_WSTR)(FX_LPCWSTR)pParam, (int32_t)(uintptr_t)pAdditional2);
+ ((CXFA_FFComboBox*)pWidget)->InsertItem((FX_WSTR)(const FX_WCHAR*)pParam, (int32_t)(uintptr_t)pAdditional2);
}
}
if (bStaticNotify) {
@@ -219,7 +219,7 @@ CXFA_LayoutItem* CXFA_FFNotify::OnCreateLayoutItem(CXFA_Node* pNode)
pWidget->SetDocView(pDocView);
return pWidget->GetLayoutItem();
}
-void CXFA_FFNotify::OnLayoutEvent(IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, XFA_LAYOUTEVENT eEvent, FX_LPVOID pParam , FX_LPVOID pParam2 )
+void CXFA_FFNotify::OnLayoutEvent(IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, XFA_LAYOUTEVENT eEvent, void* pParam , void* pParam2 )
{
CXFA_FFDocView* pDocView = m_pDoc->GetDocView(pLayout);
if (!pDocView || !XFA_GetWidgetFromLayoutItem(pSender)) {
@@ -410,7 +410,7 @@ void CXFA_FFNotify::OnNodeReady(CXFA_Node *pNode)
break;
}
}
-void CXFA_FFNotify::OnValueChanging(CXFA_Node *pSender, FX_LPVOID pParam, FX_LPVOID pParam2)
+void CXFA_FFNotify::OnValueChanging(CXFA_Node *pSender, void* pParam, void* pParam2)
{
CXFA_FFDocView* pDocView = m_pDoc->GetDocView();
if (!pDocView) {
@@ -437,7 +437,7 @@ void CXFA_FFNotify::OnValueChanging(CXFA_Node *pSender, FX_LPVOID pParam, FX_LPV
}
}
}
-void CXFA_FFNotify::OnValueChanged(CXFA_Node *pSender, FX_LPVOID pParam, FX_LPVOID pParam2, FX_LPVOID pParam3, FX_LPVOID pParam4)
+void CXFA_FFNotify::OnValueChanged(CXFA_Node *pSender, void* pParam, void* pParam2, void* pParam3, void* pParam4)
{
CXFA_FFDocView* pDocView = m_pDoc->GetDocView();
if (!pDocView) {
@@ -518,7 +518,7 @@ void CXFA_FFNotify::OnValueChanged(CXFA_Node *pSender, FX_LPVOID pParam, FX_LPVO
}
}
}
-void CXFA_FFNotify::OnChildAdded(CXFA_Node *pSender, FX_LPVOID pParam, FX_LPVOID pParam2)
+void CXFA_FFNotify::OnChildAdded(CXFA_Node *pSender, void* pParam, void* pParam2)
{
if (!pSender->IsFormContainer()) {
return;
@@ -532,7 +532,7 @@ void CXFA_FFNotify::OnChildAdded(CXFA_Node *pSender, FX_LPVOID pParam, FX_LPVOID
m_pDoc->GetDocProvider()->SetChangeMark(m_pDoc);
}
}
-void CXFA_FFNotify::OnChildRemoved(CXFA_Node *pSender, FX_LPVOID pParam, FX_LPVOID pParam2)
+void CXFA_FFNotify::OnChildRemoved(CXFA_Node *pSender, void* pParam, void* pParam2)
{
if (CXFA_FFDocView* pDocView = m_pDoc->GetDocView()) {
FX_BOOL bLayoutReady = !(pDocView->m_bInLayoutStatus) && (pDocView->GetLayoutStatus() >= XFA_DOCVIEW_LAYOUTSTATUS_End);
@@ -541,7 +541,7 @@ void CXFA_FFNotify::OnChildRemoved(CXFA_Node *pSender, FX_LPVOID pParam, FX_LPVO
}
}
}
-void CXFA_FFNotify::OnLayoutItemAdd(CXFA_FFDocView* pDocView, IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, FX_LPVOID pParam, FX_LPVOID pParam2)
+void CXFA_FFNotify::OnLayoutItemAdd(CXFA_FFDocView* pDocView, IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, void* pParam, void* pParam2)
{
CXFA_FFWidget* pWidget = (CXFA_FFWidget*)(CXFA_ContentLayoutItemImpl*)pSender;
int32_t iPageIdx = (int32_t)(uintptr_t)pParam;
@@ -573,7 +573,7 @@ void CXFA_FFNotify::OnLayoutItemAdd(CXFA_FFDocView* pDocView, IXFA_DocLayout *pL
pWidget->SetPageView(pNewPageView);
}
}
-void CXFA_FFNotify::OnLayoutItemRemoving(CXFA_FFDocView* pDocView, IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, FX_LPVOID pParam, FX_LPVOID pParam2)
+void CXFA_FFNotify::OnLayoutItemRemoving(CXFA_FFDocView* pDocView, IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, void* pParam, void* pParam2)
{
CXFA_FFWidget* pWidget = (CXFA_FFWidget*)pSender;
pDocView->DeleteLayoutItem(pWidget);
@@ -583,10 +583,10 @@ void CXFA_FFNotify::OnLayoutItemRemoving(CXFA_FFDocView* pDocView, IXFA_DocLayou
m_pDoc->GetDocProvider()->WidgetEvent(pWidget, pWidget->GetDataAcc(), XFA_WIDGETEVENT_PreRemoved, NULL, NULL);
pWidget->AddInvalidateRect(NULL);
}
-void CXFA_FFNotify::OnLayoutItemRectChanged(CXFA_FFDocView* pDocView, IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, FX_LPVOID pParam, FX_LPVOID pParam2)
+void CXFA_FFNotify::OnLayoutItemRectChanged(CXFA_FFDocView* pDocView, IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, void* pParam, void* pParam2)
{
}
-void CXFA_FFNotify::OnLayoutItemStatustChanged(CXFA_FFDocView* pDocView, IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, FX_LPVOID pParam, FX_LPVOID pParam2)
+void CXFA_FFNotify::OnLayoutItemStatustChanged(CXFA_FFDocView* pDocView, IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, void* pParam, void* pParam2)
{
CXFA_FFWidget* pWidget = (CXFA_FFWidget*)(CXFA_ContentLayoutItemImpl*)pSender;
if (!pWidget) {
diff --git a/xfa/src/fxfa/src/app/xfa_ffnotify.h b/xfa/src/fxfa/src/app/xfa_ffnotify.h
index d289a1074a..7dd594d1b5 100644
--- a/xfa/src/fxfa/src/app/xfa_ffnotify.h
+++ b/xfa/src/fxfa/src/app/xfa_ffnotify.h
@@ -12,12 +12,12 @@ public:
CXFA_FFNotify(CXFA_FFDoc* pDoc);
~CXFA_FFNotify();
- virtual void OnPageEvent(IXFA_LayoutPage *pSender, XFA_PAGEEVENT eEvent, FX_LPVOID pParam = NULL);
+ virtual void OnPageEvent(IXFA_LayoutPage *pSender, XFA_PAGEEVENT eEvent, void* pParam = NULL);
- virtual void OnNodeEvent(CXFA_Node *pSender, XFA_NODEEVENT eEvent, FX_LPVOID pParam = NULL, FX_LPVOID pParam2 = NULL, FX_LPVOID pParam3 = NULL, FX_LPVOID pParam4 = NULL);
- virtual void OnWidgetDataEvent(CXFA_WidgetData* pSender, FX_DWORD dwEvent, FX_LPVOID pParam = NULL, FX_LPVOID pAdditional = NULL, FX_LPVOID pAdditional2 = NULL);
+ virtual void OnNodeEvent(CXFA_Node *pSender, XFA_NODEEVENT eEvent, void* pParam = NULL, void* pParam2 = NULL, void* pParam3 = NULL, void* pParam4 = NULL);
+ virtual void OnWidgetDataEvent(CXFA_WidgetData* pSender, FX_DWORD dwEvent, void* pParam = NULL, void* pAdditional = NULL, void* pAdditional2 = NULL);
virtual CXFA_LayoutItem* OnCreateLayoutItem(CXFA_Node *pNode);
- virtual void OnLayoutEvent(IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, XFA_LAYOUTEVENT eEvent, FX_LPVOID pParam = NULL, FX_LPVOID pParam2 = NULL);
+ virtual void OnLayoutEvent(IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, XFA_LAYOUTEVENT eEvent, void* pParam = NULL, void* pParam2 = NULL);
virtual void StartFieldDrawLayout(CXFA_Node *pItem, FX_FLOAT &fCalcWidth, FX_FLOAT &fCalcHeight);
virtual FX_BOOL FindSplitPos(CXFA_Node *pItem, int32_t iBlockIndex, FX_FLOAT &fCalcHeightPos);
@@ -39,14 +39,14 @@ public:
virtual void SetFocusWidgetNode(CXFA_Node* pNode);
protected:
void OnNodeReady(CXFA_Node *pNode);
- void OnValueChanging(CXFA_Node *pSender, FX_LPVOID pParam, FX_LPVOID pParam2);
- void OnValueChanged(CXFA_Node *pSender, FX_LPVOID pParam, FX_LPVOID pParam2, FX_LPVOID pParam3, FX_LPVOID pParam4);
- void OnChildAdded(CXFA_Node *pSender, FX_LPVOID pParam, FX_LPVOID pParam2);
- void OnChildRemoved(CXFA_Node *pSender, FX_LPVOID pParam, FX_LPVOID pParam2);
- void OnLayoutItemAdd(CXFA_FFDocView* pDocView, IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, FX_LPVOID pParam, FX_LPVOID pParam2);
- void OnLayoutItemRemoving(CXFA_FFDocView* pDocView, IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, FX_LPVOID pParam, FX_LPVOID pParam2);
- void OnLayoutItemRectChanged(CXFA_FFDocView* pDocView, IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, FX_LPVOID pParam, FX_LPVOID pParam2);
- void OnLayoutItemStatustChanged(CXFA_FFDocView* pDocView, IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, FX_LPVOID pParam, FX_LPVOID pParam2);
+ void OnValueChanging(CXFA_Node *pSender, void* pParam, void* pParam2);
+ void OnValueChanged(CXFA_Node *pSender, void* pParam, void* pParam2, void* pParam3, void* pParam4);
+ void OnChildAdded(CXFA_Node *pSender, void* pParam, void* pParam2);
+ void OnChildRemoved(CXFA_Node *pSender, void* pParam, void* pParam2);
+ void OnLayoutItemAdd(CXFA_FFDocView* pDocView, IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, void* pParam, void* pParam2);
+ void OnLayoutItemRemoving(CXFA_FFDocView* pDocView, IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, void* pParam, void* pParam2);
+ void OnLayoutItemRectChanged(CXFA_FFDocView* pDocView, IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, void* pParam, void* pParam2);
+ void OnLayoutItemStatustChanged(CXFA_FFDocView* pDocView, IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, void* pParam, void* pParam2);
CXFA_FFDoc* m_pDoc;
};
#endif
diff --git a/xfa/src/fxfa/src/app/xfa_ffpageview.cpp b/xfa/src/fxfa/src/app/xfa_ffpageview.cpp
index 11384b141e..ccc5d07d1a 100644
--- a/xfa/src/fxfa/src/app/xfa_ffpageview.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffpageview.cpp
@@ -383,7 +383,7 @@ void CXFA_FFTabOrderPageWidgetIterator::OrderContainer(CXFA_LayoutItemIterator*
}
int32_t iChildren = tabParams.GetSize();
if (iChildren > 1) {
- FXSYS_qsort(tabParams.GetData(), iChildren, sizeof(FX_LPVOID), XFA_TabOrderWidgetComparator);
+ FXSYS_qsort(tabParams.GetData(), iChildren, sizeof(void*), XFA_TabOrderWidgetComparator);
}
for (int32_t iStart = 0; iStart < iChildren; iStart++) {
CXFA_TabParam* pParam = (CXFA_TabParam*)tabParams[iStart];
diff --git a/xfa/src/fxfa/src/app/xfa_fftext.cpp b/xfa/src/fxfa/src/app/xfa_fftext.cpp
index 2d153c2968..b6cb5b79d3 100644
--- a/xfa/src/fxfa/src/app/xfa_fftext.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fftext.cpp
@@ -110,7 +110,7 @@ FX_BOOL CXFA_FFText::OnLButtonDown(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)
if (!rtBox.Contains(fx, fy)) {
return FALSE;
}
- FX_LPCWSTR wsURLContent = GetLinkURLAtPoint(fx, fy);
+ const FX_WCHAR* wsURLContent = GetLinkURLAtPoint(fx, fy);
if (NULL == wsURLContent) {
return FALSE;
}
@@ -124,7 +124,7 @@ FX_BOOL CXFA_FFText::OnMouseMove(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)
if (!rtBox.Contains(fx, fy)) {
return FALSE;
}
- FX_LPCWSTR wsURLContent = GetLinkURLAtPoint(fx, fy);
+ const FX_WCHAR* wsURLContent = GetLinkURLAtPoint(fx, fy);
if (NULL == wsURLContent) {
return FALSE;
}
@@ -136,7 +136,7 @@ FX_BOOL CXFA_FFText::OnLButtonUp(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)
return FALSE;
}
SetButtonDown(FALSE);
- FX_LPCWSTR wsURLContent = GetLinkURLAtPoint(fx, fy);
+ const FX_WCHAR* wsURLContent = GetLinkURLAtPoint(fx, fy);
if (NULL == wsURLContent) {
return FALSE;
}
@@ -151,13 +151,13 @@ FX_DWORD CXFA_FFText::OnHitTest(FX_FLOAT fx, FX_FLOAT fy)
if (!rtBox.Contains(fx, fy)) {
return FWL_WGTHITTEST_Unknown;
}
- FX_LPCWSTR wsURLContent = GetLinkURLAtPoint(fx, fy);
+ const FX_WCHAR* wsURLContent = GetLinkURLAtPoint(fx, fy);
if (NULL == wsURLContent) {
return FWL_WGTHITTEST_Unknown;
}
return FWL_WGTHITTEST_Transparent;
}
-FX_LPCWSTR CXFA_FFText::GetLinkURLAtPoint(FX_FLOAT fx, FX_FLOAT fy)
+const FX_WCHAR* CXFA_FFText::GetLinkURLAtPoint(FX_FLOAT fx, FX_FLOAT fy)
{
CXFA_TextLayout* pTextLayout = m_pDataAcc->GetTextLayout();
if ( NULL == pTextLayout) {
diff --git a/xfa/src/fxfa/src/app/xfa_fftext.h b/xfa/src/fxfa/src/app/xfa_fftext.h
index 0210b55610..c74998a94e 100644
--- a/xfa/src/fxfa/src/app/xfa_fftext.h
+++ b/xfa/src/fxfa/src/app/xfa_fftext.h
@@ -20,7 +20,7 @@ public:
virtual FX_BOOL IsLoaded();
virtual FX_BOOL LayoutWidget();
private:
- virtual FX_LPCWSTR GetLinkURLAtPoint(FX_FLOAT fx, FX_FLOAT fy);
+ virtual const FX_WCHAR* GetLinkURLAtPoint(FX_FLOAT fx, FX_FLOAT fy);
void FWLToClient(FX_FLOAT &fx, FX_FLOAT &fy);
};
#endif
diff --git a/xfa/src/fxfa/src/app/xfa_fftextedit.cpp b/xfa/src/fxfa/src/app/xfa_fftextedit.cpp
index afdfd1fee8..d04a561b4c 100644
--- a/xfa/src/fxfa/src/app/xfa_fftextedit.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fftextedit.cpp
@@ -195,7 +195,7 @@ void CXFA_FFTextEdit::ValidateNumberField(const CFX_WideString& wsText)
pAppProvider->LoadString(XFA_IDS_ValidateNumberError, wsError);
CFX_WideString wsSomField;
pAcc->GetNode()->GetSOMExpression(wsSomField);
- wsMessage.Format(wsError, (FX_LPCWSTR)wsText, (FX_LPCWSTR)wsSomField);
+ wsMessage.Format(wsError, (const FX_WCHAR*)wsText, (const FX_WCHAR*)wsSomField);
pAppProvider->MsgBox(wsMessage, wsTitle, XFA_MBICON_Error, XFA_MB_OK);
}
}
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidget.cpp b/xfa/src/fxfa/src/app/xfa_ffwidget.cpp
index f747bdd2f9..be1418169f 100644
--- a/xfa/src/fxfa/src/app/xfa_ffwidget.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffwidget.cpp
@@ -514,7 +514,7 @@ protected:
FX_ARGB m_FillArgb;
FX_DWORD m_Flags;
CFX_ImageTransformer* m_pTransformer;
- FX_LPVOID m_DeviceHandle;
+ void* m_DeviceHandle;
int32_t m_BlendType;
FX_BOOL m_Result;
FX_BOOL m_bPrint;
@@ -835,14 +835,14 @@ const static uint8_t g_inv_base64[128] = {
41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51, 255, 255, 255, 255, 255,
};
-static FX_LPBYTE XFA_RemoveBase64Whitespace(FX_LPCBYTE pStr, int32_t iLen)
+static uint8_t* XFA_RemoveBase64Whitespace(const uint8_t* pStr, int32_t iLen)
{
- FX_LPBYTE pCP;
+ uint8_t* pCP;
int32_t i = 0, j = 0;
if (iLen == 0) {
iLen = FXSYS_strlen((FX_CHAR*)pStr);
}
- pCP = (FX_LPBYTE)FDE_Alloc(iLen + 1);
+ pCP = (uint8_t*)FDE_Alloc(iLen + 1);
for (; i < iLen; i++) {
if ((pStr[i] & 128) == 0) {
if (g_inv_base64[pStr[i]] != 0xFF || pStr[i] == '=') {
@@ -853,12 +853,12 @@ static FX_LPBYTE XFA_RemoveBase64Whitespace(FX_LPCBYTE pStr, int32_t iLen)
pCP[j] = '\0';
return pCP;
}
-static int32_t XFA_Base64Decode(FX_LPCSTR pStr, FX_LPBYTE pOutBuffer)
+static int32_t XFA_Base64Decode(const FX_CHAR* pStr, uint8_t* pOutBuffer)
{
if (pStr == NULL) {
return 0;
}
- FX_LPBYTE pBuffer = XFA_RemoveBase64Whitespace((FX_LPBYTE)pStr, FXSYS_strlen((FX_CHAR*)pStr));
+ uint8_t* pBuffer = XFA_RemoveBase64Whitespace((uint8_t*)pStr, FXSYS_strlen((FX_CHAR*)pStr));
if (pBuffer == NULL) {
return 0;
}
@@ -899,12 +899,12 @@ static int32_t XFA_Base64Decode(FX_LPCSTR pStr, FX_LPBYTE pOutBuffer)
return j;
}
static FX_CHAR g_base64_chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-FX_LPSTR XFA_Base64Encode(FX_LPCBYTE buf, int32_t buf_len)
+FX_CHAR* XFA_Base64Encode(const uint8_t* buf, int32_t buf_len)
{
- FX_LPSTR out = NULL;
+ FX_CHAR* out = NULL;
int i, j;
FX_DWORD limb;
- out = (FX_LPSTR)FX_Alloc(FX_CHAR, ((buf_len * 8 + 5) / 6) + 5);
+ out = (FX_CHAR*)FX_Alloc(FX_CHAR, ((buf_len * 8 + 5) / 6) + 5);
for (i = 0, j = 0, limb = 0; i + 2 < buf_len; i += 3, j += 4) {
limb =
((FX_DWORD)buf[i] << 16) |
@@ -972,7 +972,7 @@ CFX_DIBitmap* XFA_LoadImageData(CXFA_FFDoc *pDoc, CXFA_Image *pImage, FX_BOOL &b
pImage->GetContentType(wsContentType);
FXCODEC_IMAGE_TYPE type = XFA_GetImageType(wsContentType);
CFX_ByteString bsContent;
- FX_LPBYTE pImageBuffer = NULL;
+ uint8_t* pImageBuffer = NULL;
IFX_FileRead* pImageFileRead = NULL;
if (wsImage.GetLength() > 0) {
XFA_ATTRIBUTEENUM iEncoding = (XFA_ATTRIBUTEENUM)pImage->GetTransferEncoding();
@@ -980,13 +980,13 @@ CFX_DIBitmap* XFA_LoadImageData(CXFA_FFDoc *pDoc, CXFA_Image *pImage, FX_BOOL &b
CFX_ByteString bsData = wsImage.UTF8Encode();
int32_t iLength = bsData.GetLength();
pImageBuffer = FDE_Alloc(iLength);
- int32_t iRead = XFA_Base64Decode((FX_LPCSTR)bsData, pImageBuffer);
+ int32_t iRead = XFA_Base64Decode((const FX_CHAR*)bsData, pImageBuffer);
if (iRead > 0) {
pImageFileRead = FX_CreateMemoryStream(pImageBuffer, iRead);
}
} else {
bsContent = CFX_ByteString::FromUnicode(wsImage);
- pImageFileRead = FX_CreateMemoryStream((FX_LPBYTE)(FX_LPCBYTE)bsContent, bsContent.GetLength());
+ pImageFileRead = FX_CreateMemoryStream((uint8_t*)(const uint8_t*)bsContent, bsContent.GetLength());
}
} else {
CFX_WideString wsURL = wsHref;
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidget.h b/xfa/src/fxfa/src/app/xfa_ffwidget.h
index 80f4be4d30..b1d33bb94b 100644
--- a/xfa/src/fxfa/src/app/xfa_ffwidget.h
+++ b/xfa/src/fxfa/src/app/xfa_ffwidget.h
@@ -194,7 +194,7 @@ void XFA_DrawImage(CFX_Graphics* pGS, const CFX_RectF &rtImage, CFX_Matrix* pM
CFX_DIBitmap* XFA_LoadImageData(CXFA_FFDoc *pDoc, CXFA_Image *pImage, FX_BOOL &bNameImage, int32_t &iImageXDpi, int32_t &iImageYDpi);
CFX_DIBitmap* XFA_LoadImageFromBuffer(IFX_FileRead* pImageFileRead, FXCODEC_IMAGE_TYPE type, int32_t &iImageXDpi, int32_t &iImageYDpi);
FXCODEC_IMAGE_TYPE XFA_GetImageType(FX_WSTR wsType);
-FX_LPSTR XFA_Base64Encode(FX_LPCBYTE buf, int32_t buf_len);
+FX_CHAR* XFA_Base64Encode(const uint8_t* buf, int32_t buf_len);
void XFA_RectWidthoutMargin(CFX_RectF &rt, const CXFA_Margin &mg, FX_BOOL bUI = FALSE);
FX_FLOAT XFA_GetEdgeThickness(const CXFA_StrokeArray &strokes, FX_BOOL b3DStyle, int32_t nIndex);
CXFA_FFWidget* XFA_GetWidgetFromLayoutItem(CXFA_LayoutItem* pLayoutItem);
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp b/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp
index 3f105d98d6..e12a50e8e5 100644
--- a/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp
@@ -18,7 +18,7 @@
#include "xfa_ffcheckbutton.h"
#include "xfa_ffwidgetacc.h"
#include "xfa_fontmgr.h"
-static void XFA_FFDeleteCalcData(FX_LPVOID pData)
+static void XFA_FFDeleteCalcData(void* pData)
{
if (pData) {
delete ((CXFA_CalcData*)pData);
@@ -546,7 +546,7 @@ int32_t CXFA_WidgetAcc::ProcessNullTestValidate(CXFA_Validate validate, int32_t
GetValidateCaptionName(wsCaptionName, bVersionFlag);
CFX_WideString wsError;
pAppProvider->LoadString(XFA_IDS_ValidateNullError, wsError);
- wsNullMsg.Format(wsError, (FX_LPCWSTR)wsCaptionName);
+ wsNullMsg.Format(wsError, (const FX_WCHAR*)wsCaptionName);
}
pAppProvider->MsgBox(wsNullMsg, wsTitle, XFA_MBICON_Status, XFA_MB_OK);
return XFA_EVENTERROR_Error;
@@ -559,7 +559,7 @@ int32_t CXFA_WidgetAcc::ProcessNullTestValidate(CXFA_Validate validate, int32_t
GetValidateCaptionName(wsCaptionName, bVersionFlag);
CFX_WideString wsWarning;
pAppProvider->LoadString(XFA_IDS_ValidateNullWarning, wsWarning);
- wsNullMsg.Format(wsWarning, (FX_LPCWSTR)wsCaptionName, (FX_LPCWSTR)wsCaptionName);
+ wsNullMsg.Format(wsWarning, (const FX_WCHAR*)wsCaptionName, (const FX_WCHAR*)wsCaptionName);
}
if (pAppProvider->MsgBox(wsNullMsg, wsTitle, XFA_MBICON_Warning, XFA_MB_YesNo) == XFA_IDYes) {
this->GetNode()->SetFlag(XFA_NODEFLAG_UserInteractive, TRUE, FALSE);
@@ -597,17 +597,17 @@ void CXFA_WidgetAcc::GetValidateMessage(IXFA_AppProvider* pAppProvider, CFX_Wide
CFX_WideString wsError;
if (bVersionFlag) {
pAppProvider->LoadString(XFA_IDS_ValidateFailed, wsError);
- wsMessage.Format(wsError, (FX_LPCWSTR)wsCaptionName);
+ wsMessage.Format(wsError, (const FX_WCHAR*)wsCaptionName);
return;
}
if (bError) {
pAppProvider->LoadString(XFA_IDS_ValidateError, wsError);
- wsMessage.Format(wsError, (FX_LPCWSTR)wsCaptionName);
+ wsMessage.Format(wsError, (const FX_WCHAR*)wsCaptionName);
return;
}
CFX_WideString wsWarning;
pAppProvider->LoadString(XFA_IDS_ValidateWarning, wsWarning);
- wsMessage.Format(wsWarning, (FX_LPCWSTR)wsCaptionName, (FX_LPCWSTR)wsCaptionName);
+ wsMessage.Format(wsWarning, (const FX_WCHAR*)wsCaptionName, (const FX_WCHAR*)wsCaptionName);
}
int32_t CXFA_WidgetAcc::ProcessValidate(int32_t iFlags)
{
@@ -748,7 +748,7 @@ void CXFA_WidgetAcc::UpdateUIDisplay(CXFA_FFWidget* pExcept )
pWidget->AddInvalidateRect();
}
}
-void CXFA_WidgetAcc::NotifyEvent(FX_DWORD dwEvent, CXFA_FFWidget* pWidget , FX_LPVOID pParam , FX_LPVOID pAdditional )
+void CXFA_WidgetAcc::NotifyEvent(FX_DWORD dwEvent, CXFA_FFWidget* pWidget , void* pParam , void* pAdditional )
{
IXFA_DocProvider* pDocProvider = GetDoc()->GetDocProvider();
if (pWidget) {
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp b/xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp
index d43c5a6312..cdaaeccd6e 100644
--- a/xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp
@@ -48,11 +48,11 @@ FX_BOOL CXFA_FFWidgetHandler::GetToolTip(IXFA_Widget* hWidget, CFX_WideString &w
{
return static_cast<CXFA_FFWidget*>(hWidget)->GetToolTip(wsToolTip);
}
-void CXFA_FFWidgetHandler::SetPrivateData(IXFA_Widget* hWidget, FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback)
+void CXFA_FFWidgetHandler::SetPrivateData(IXFA_Widget* hWidget, void* module_id, void* pData, PD_CALLBACK_FREEDATA callback)
{
static_cast<CXFA_FFWidget*>(hWidget)->SetPrivateData(module_id, pData, callback);
}
-FX_LPVOID CXFA_FFWidgetHandler::GetPrivateData(IXFA_Widget* hWidget, FX_LPVOID module_id)
+void* CXFA_FFWidgetHandler::GetPrivateData(IXFA_Widget* hWidget, void* module_id)
{
return static_cast<CXFA_FFWidget*>(hWidget)->GetPrivateData(module_id);
}
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidgethandler.h b/xfa/src/fxfa/src/app/xfa_ffwidgethandler.h
index 7c47b8d1a1..bc4afce02d 100644
--- a/xfa/src/fxfa/src/app/xfa_ffwidgethandler.h
+++ b/xfa/src/fxfa/src/app/xfa_ffwidgethandler.h
@@ -20,8 +20,8 @@ public:
virtual CXFA_WidgetAcc* GetDataAcc(IXFA_Widget* hWidget);
virtual void GetName(IXFA_Widget* hWidget, CFX_WideString &wsName, int32_t iNameType = 0);
virtual FX_BOOL GetToolTip(IXFA_Widget* hWidget, CFX_WideString &wsToolTip);
- virtual void SetPrivateData(IXFA_Widget* hWidget, FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback);
- virtual FX_LPVOID GetPrivateData(IXFA_Widget* hWidget, FX_LPVOID module_id);
+ virtual void SetPrivateData(IXFA_Widget* hWidget, void* module_id, void* pData, PD_CALLBACK_FREEDATA callback);
+ virtual void* GetPrivateData(IXFA_Widget* hWidget, void* module_id);
virtual FX_BOOL OnMouseEnter(IXFA_Widget* hWidget);
virtual FX_BOOL OnMouseExit(IXFA_Widget* hWidget);
virtual FX_BOOL OnLButtonDown(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
diff --git a/xfa/src/fxfa/src/app/xfa_fontmgr.cpp b/xfa/src/fxfa/src/app/xfa_fontmgr.cpp
index 127278fb46..db1742b788 100644
--- a/xfa/src/fxfa/src/app/xfa_fontmgr.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fontmgr.cpp
@@ -1035,11 +1035,11 @@ IFX_Font* CXFA_DefFontMgr::GetFont(IXFA_Doc* hDoc, FX_WSTR wsFontFamily, FX_DWOR
#ifdef _FXFA_USEGASFONTMGR_
const XFA_FONTINFO *pCurFont = NULL;
FX_BOOL bGetFontInfo = TRUE;
- IFX_Font* pFont = pFDEFontMgr->LoadFont((FX_LPCWSTR)wsFontName, dwFontStyles, wCodePage);
+ IFX_Font* pFont = pFDEFontMgr->LoadFont((const FX_WCHAR*)wsFontName, dwFontStyles, wCodePage);
#else
const XFA_FONTINFO *pCurFont = XFA_GetFontINFOByFontName(wsFontName);
FX_BOOL bGetFontInfo = FALSE;
- IFX_Font* pFont = IFX_Font::LoadFont((FX_LPCWSTR)wsFontName, dwFontStyles | FX_FONTSTYLE_ExactMatch, pCurFont ? pCurFont->wCodePage : wCodePage, pFDEFontMgr);
+ IFX_Font* pFont = IFX_Font::LoadFont((const FX_WCHAR*)wsFontName, dwFontStyles | FX_FONTSTYLE_ExactMatch, pCurFont ? pCurFont->wCodePage : wCodePage, pFDEFontMgr);
#endif
if (!pFont && hDoc) {
if (bGetFontInfo) {
@@ -1053,10 +1053,10 @@ IFX_Font* CXFA_DefFontMgr::GetFont(IXFA_Doc* hDoc, FX_WSTR wsFontFamily, FX_DWOR
if (dwFontStyles & FX_FONTSTYLE_Italic) {
dwStyle |= FX_FONTSTYLE_Italic;
}
- FX_LPCWSTR pReplace = pCurFont->pReplaceFont;
+ const FX_WCHAR* pReplace = pCurFont->pReplaceFont;
int32_t iLength = FXSYS_wcslen(pReplace);
while (iLength > 0) {
- FX_LPCWSTR pNameText = pReplace;
+ const FX_WCHAR* pNameText = pReplace;
while (*pNameText != L',' && iLength > 0) {
pNameText++;
iLength--;
@@ -1065,7 +1065,7 @@ IFX_Font* CXFA_DefFontMgr::GetFont(IXFA_Doc* hDoc, FX_WSTR wsFontFamily, FX_DWOR
#ifdef _FXFA_USEGASFONTMGR_
pFont = pFDEFontMgr->LoadFont(wsReplace, dwStyle, wCodePage);
#else
- pFont = IFX_Font::LoadFont((FX_LPCWSTR)wsReplace, dwStyle | FX_FONTSTYLE_ExactMatch, pCurFont->wCodePage, pFDEFontMgr);
+ pFont = IFX_Font::LoadFont((const FX_WCHAR*)wsReplace, dwStyle | FX_FONTSTYLE_ExactMatch, pCurFont->wCodePage, pFDEFontMgr);
#endif
if (pFont != NULL) {
break;
@@ -1092,9 +1092,9 @@ IFX_Font* CXFA_DefFontMgr::GetDefaultFont(IXFA_Doc* hDoc, FX_WSTR wsFontFamily,
#endif
if (!pFont)
#ifdef _FXFA_USEGASFONTMGR_
- pFont = pFDEFontMgr->LoadFont((FX_LPCWSTR)NULL, dwFontStyles, wCodePage);
+ pFont = pFDEFontMgr->LoadFont((const FX_WCHAR*)NULL, dwFontStyles, wCodePage);
#else
- pFont = IFX_Font::LoadFont((FX_LPCWSTR)NULL, dwFontStyles, pCurFont ? pCurFont->wCodePage : 1252, pFDEFontMgr);
+ pFont = IFX_Font::LoadFont((const FX_WCHAR*)NULL, dwFontStyles, pCurFont ? pCurFont->wCodePage : 1252, pFDEFontMgr);
#endif
FXSYS_assert(pFont != NULL);
if (pFont) {
@@ -1103,11 +1103,11 @@ IFX_Font* CXFA_DefFontMgr::GetDefaultFont(IXFA_Doc* hDoc, FX_WSTR wsFontFamily,
return pFont;
}
struct XFA_PDFFONTNAME {
- FX_LPCSTR lpPsName;
- FX_LPCSTR lpNormal;
- FX_LPCSTR lpBold;
- FX_LPCSTR lpItalic;
- FX_LPCSTR lpBoldItalic;
+ const FX_CHAR* lpPsName;
+ const FX_CHAR* lpNormal;
+ const FX_CHAR* lpBold;
+ const FX_CHAR* lpItalic;
+ const FX_CHAR* lpBoldItalic;
};
const XFA_PDFFONTNAME g_XFAPDFFontName[] = {
{"Adobe PI Std", "AdobePIStd", "AdobePIStd", "AdobePIStd", "AdobePIStd"},
diff --git a/xfa/src/fxfa/src/app/xfa_fontmgr.h b/xfa/src/fxfa/src/app/xfa_fontmgr.h
index f612664644..3a41cea913 100644
--- a/xfa/src/fxfa/src/app/xfa_fontmgr.h
+++ b/xfa/src/fxfa/src/app/xfa_fontmgr.h
@@ -8,8 +8,8 @@
#define _FXFA_FORMFILLER_FONTMGR_IMP_H
struct XFA_FONTINFO {
FX_DWORD dwFontNameHash;
- FX_LPCWSTR pPsName;
- FX_LPCWSTR pReplaceFont;
+ const FX_WCHAR* pPsName;
+ const FX_WCHAR* pReplaceFont;
FX_WORD dwStyles;
FX_WORD wCodePage;
};
diff --git a/xfa/src/fxfa/src/app/xfa_fwltheme.cpp b/xfa/src/fxfa/src/app/xfa_fwltheme.cpp
index ca9bf5e890..e080757f3b 100644
--- a/xfa/src/fxfa/src/app/xfa_fwltheme.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fwltheme.cpp
@@ -57,7 +57,7 @@ CXFA_FWLTheme::~CXFA_FWLTheme()
delete m_pCaretTP;
delete m_pBarcodeTP;
}
-static FX_LPCWSTR g_FWLTheme_CalFonts[] = {
+static const FX_WCHAR* g_FWLTheme_CalFonts[] = {
L"Arial",
L"Courier New",
L"DejaVu Sans",
@@ -65,7 +65,7 @@ static FX_LPCWSTR g_FWLTheme_CalFonts[] = {
FWL_ERR CXFA_FWLTheme::Initialize()
{
m_pTextOut = IFDE_TextOut::Create();
- for (int32_t i = 0; NULL == m_pCalendarFont && i < sizeof(g_FWLTheme_CalFonts) / sizeof(FX_LPCWSTR); i++) {
+ for (int32_t i = 0; NULL == m_pCalendarFont && i < sizeof(g_FWLTheme_CalFonts) / sizeof(const FX_WCHAR*); i++) {
m_pCalendarFont = IFX_Font::LoadFont(g_FWLTheme_CalFonts[i], 0, 0, m_pApp->GetFDEFontMgr());
}
if (NULL == m_pCalendarFont)
@@ -169,7 +169,7 @@ FX_BOOL CXFA_FWLTheme::DrawText(CFWL_ThemeText *pParams)
m_pTextOut->DrawLogicText(pParams->m_wsText, pParams->m_wsText.GetLength(), pParams->m_rtPart);
return TRUE;
}
-FX_LPVOID CXFA_FWLTheme::GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity)
+void* CXFA_FWLTheme::GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity)
{
switch(dwCapacity) {
case FWL_WGTCAPACITY_Font: {
diff --git a/xfa/src/fxfa/src/app/xfa_fwltheme.h b/xfa/src/fxfa/src/app/xfa_fwltheme.h
index 37b8d1336a..5ce70aa2e4 100644
--- a/xfa/src/fxfa/src/app/xfa_fwltheme.h
+++ b/xfa/src/fxfa/src/app/xfa_fwltheme.h
@@ -35,7 +35,7 @@ public:
virtual FX_DWORD SetThemeID(IFWL_Widget *pWidget, FX_DWORD dwThemeID, FX_BOOL bChildren = TRUE);
virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams);
virtual FX_BOOL DrawText(CFWL_ThemeText *pParams);
- virtual FX_LPVOID GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity);
+ virtual void* GetCapacity(CFWL_ThemePart *pThemePart, FX_DWORD dwCapacity);
virtual FX_BOOL IsCustomizedLayout(IFWL_Widget *pWidget);
virtual FWL_ERR GetPartRect(CFWL_ThemePart* pThemePart);
virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart, FX_FLOAT fx, FX_FLOAT fy);
diff --git a/xfa/src/fxfa/src/app/xfa_textlayout.cpp b/xfa/src/fxfa/src/app/xfa_textlayout.cpp
index 3043b772b8..75b6d3c2ca 100644
--- a/xfa/src/fxfa/src/app/xfa_textlayout.cpp
+++ b/xfa/src/fxfa/src/app/xfa_textlayout.cpp
@@ -118,11 +118,12 @@ void CXFA_TextParser::InitCSSData(IXFA_TextProvider *pTextProvider)
}
IFDE_CSSStyleSheet* CXFA_TextParser::LoadDefaultSheetStyle()
{
- static const FX_LPCWSTR s_pStyle = L"html,body,ol,p,ul{display:block}"
- L"li{display:list-item}"
- L"ol,ul{padding-left:33px}ol{list-style-type:decimal}ol,ul{margin-top:0;margin-bottom:0}ul,ol{margin:1.12em 0}"
- L"a{color:#0000ff;text-decoration:underline}b{font-weight:bolder}i{font-style:italic}"
- L"sup{vertical-align:+15em;font-size:.66em}sub{vertical-align:-15em;font-size:.66em}";
+ static const FX_WCHAR s_pStyle[] =
+ L"html,body,ol,p,ul{display:block}"
+ L"li{display:list-item}"
+ L"ol,ul{padding-left:33px}ol{list-style-type:decimal}ol,ul{margin-top:0;margin-bottom:0}ul,ol{margin:1.12em 0}"
+ L"a{color:#0000ff;text-decoration:underline}b{font-weight:bolder}i{font-style:italic}"
+ L"sup{vertical-align:+15em;font-size:.66em}sub{vertical-align:-15em;font-size:.66em}";
return IFDE_CSSStyleSheet::LoadFromBuffer(CFX_WideString(), s_pStyle, FXSYS_wcslen(s_pStyle), FX_CODEPAGE_UTF8);
}
IFDE_CSSComputedStyle* CXFA_TextParser::CreateRootStyle(IXFA_TextProvider *pTextProvider)
@@ -573,7 +574,7 @@ FX_BOOL CXFA_TextParser::GetTabstops(IFDE_CSSComputedStyle *pStyle, CXFA_TextTab
return FALSE;
}
int32_t iLength = wsValue.GetLength();
- FX_LPCWSTR pTabStops = wsValue;
+ const FX_WCHAR* pTabStops = wsValue;
int32_t iCur = 0;
int32_t iLast = 0;
CFX_WideString wsAlign;
@@ -1408,7 +1409,7 @@ FX_BOOL CXFA_TextLayout::LoadRichText(IFDE_XMLNode *pXMLNode, const CFX_SizeF &
} else if (wsName == FX_WSTRC(L"li")) {
bCurLi = TRUE;
if (bIsOl) {
- wsText.Format(FX_LPCWSTR(L"%d. "), iLiCount);
+ wsText.Format(L"%d. ", iLiCount);
} else {
wsText = 0x00B7 + FX_WSTRC(L" ");
}
@@ -1571,7 +1572,7 @@ void CXFA_TextLayout::ProcessText(CFX_WideString &wsText)
if (iLen == 0) {
return;
}
- FX_LPWSTR psz = wsText.GetBuffer(iLen);
+ FX_WCHAR* psz = wsText.GetBuffer(iLen);
int32_t iTrimLeft = 0;
FX_WCHAR wch = 0, wPrev = 0;
for (int32_t i = 0; i < iLen; i++) {
@@ -1671,7 +1672,7 @@ void CXFA_TextLayout::AppendTextLine(FX_DWORD dwStatus, FX_FLOAT &fLinePos, FX_B
}
FX_FLOAT fVerScale = pPiece->m_iVerticalScale / 100.0f;
XFA_LPTEXTPIECE pTP = (XFA_LPTEXTPIECE)m_pAllocator->Alloc(sizeof(XFA_TEXTPIECE));
- pTP->pszText = (FX_LPWSTR)m_pAllocator->Alloc(pPiece->m_iChars * sizeof(FX_WCHAR));
+ pTP->pszText = (FX_WCHAR*)m_pAllocator->Alloc(pPiece->m_iChars * sizeof(FX_WCHAR));
pTP->pWidths = (int32_t*)m_pAllocator->Alloc(pPiece->m_iChars * sizeof(int32_t));
pTP->iChars = pPiece->m_iChars;
pPiece->GetString(pTP->pszText);
diff --git a/xfa/src/fxfa/src/app/xfa_textlayout.h b/xfa/src/fxfa/src/app/xfa_textlayout.h
index 96d94956d6..bb8b4b528d 100644
--- a/xfa/src/fxfa/src/app/xfa_textlayout.h
+++ b/xfa/src/fxfa/src/app/xfa_textlayout.h
@@ -153,7 +153,7 @@ public:
class CXFA_LinkUserData : public IFX_Unknown, public CFX_Target
{
public:
- CXFA_LinkUserData(IFX_MEMAllocator *pAllocator, FX_LPWSTR pszText)
+ CXFA_LinkUserData(IFX_MEMAllocator *pAllocator, FX_WCHAR* pszText)
: m_pAllocator(pAllocator)
, m_dwRefCount(1)
{
@@ -173,7 +173,7 @@ public:
return ++m_dwRefCount;
}
public:
- FX_LPCWSTR GetLinkURL()
+ const FX_WCHAR* GetLinkURL()
{
return m_pszURLContent;
};
@@ -236,7 +236,7 @@ protected:
FX_DWORD m_dwRefCount;
};
typedef struct _XFA_TEXTPIECE : public CFX_Target {
- FX_LPWSTR pszText;
+ FX_WCHAR* pszText;
int32_t iChars;
int32_t *pWidths;
int32_t iHorScale;
diff --git a/xfa/src/fxfa/src/common/xfa_docdata.h b/xfa/src/fxfa/src/common/xfa_docdata.h
index 9e9c8d1a12..7befa23d7f 100644
--- a/xfa/src/fxfa/src/common/xfa_docdata.h
+++ b/xfa/src/fxfa/src/common/xfa_docdata.h
@@ -15,7 +15,7 @@ public:
static IXFA_PacketExport* Create(CXFA_Document *pDocument, XFA_DATAFORMAT eFormat = XFA_DATAFORMAT_XDP);
virtual void Release() = 0;
virtual FX_BOOL Export(IFX_FileWrite *pWrite) = 0;
- virtual FX_BOOL Export(IFX_FileWrite *pWrite, CXFA_Node *pNode, FX_DWORD dwFlag = 0, FX_LPCSTR pChecksum = NULL) = 0;
+ virtual FX_BOOL Export(IFX_FileWrite *pWrite, CXFA_Node *pNode, FX_DWORD dwFlag = 0, const FX_CHAR* pChecksum = NULL) = 0;
};
class IXFA_PacketImport
{
diff --git a/xfa/src/fxfa/src/common/xfa_document.h b/xfa/src/fxfa/src/common/xfa_document.h
index 1a45bd4126..6ef3fd776c 100644
--- a/xfa/src/fxfa/src/common/xfa_document.h
+++ b/xfa/src/fxfa/src/common/xfa_document.h
@@ -64,13 +64,13 @@ enum XFA_LAYOUTRESULT {
class IXFA_Notify
{
public:
- virtual void OnPageEvent(IXFA_LayoutPage *pSender, XFA_PAGEEVENT eEvent, FX_LPVOID pParam = NULL) = 0;
+ virtual void OnPageEvent(IXFA_LayoutPage *pSender, XFA_PAGEEVENT eEvent, void* pParam = NULL) = 0;
- virtual void OnNodeEvent(CXFA_Node *pSender, XFA_NODEEVENT eEvent, FX_LPVOID pParam = NULL, FX_LPVOID pParam2 = NULL, FX_LPVOID pParam3 = NULL, FX_LPVOID pParam4 = NULL) = 0;
- virtual void OnWidgetDataEvent(CXFA_WidgetData* pSender, FX_DWORD dwEvent, FX_LPVOID pParam = NULL, FX_LPVOID pAdditional = NULL, FX_LPVOID pAdditional2 = NULL) = 0;
+ virtual void OnNodeEvent(CXFA_Node *pSender, XFA_NODEEVENT eEvent, void* pParam = NULL, void* pParam2 = NULL, void* pParam3 = NULL, void* pParam4 = NULL) = 0;
+ virtual void OnWidgetDataEvent(CXFA_WidgetData* pSender, FX_DWORD dwEvent, void* pParam = NULL, void* pAdditional = NULL, void* pAdditional2 = NULL) = 0;
virtual CXFA_LayoutItem* OnCreateLayoutItem(CXFA_Node *pNode) = 0;
- virtual void OnLayoutEvent(IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, XFA_LAYOUTEVENT eEvent, FX_LPVOID pParam = NULL, FX_LPVOID pParam2 = NULL) = 0;
+ virtual void OnLayoutEvent(IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, XFA_LAYOUTEVENT eEvent, void* pParam = NULL, void* pParam2 = NULL) = 0;
virtual void StartFieldDrawLayout(CXFA_Node *pItem, FX_FLOAT &fCalcWidth, FX_FLOAT &fCalcHeight) = 0;
virtual FX_BOOL FindSplitPos(CXFA_Node *pItem, int32_t iBlockIndex, FX_FLOAT &fCalcHeightPos) = 0;
virtual FX_BOOL RunScript(CXFA_Node* pScript, CXFA_Node* pFormItem) = 0;
diff --git a/xfa/src/fxfa/src/common/xfa_fm2jsapi.h b/xfa/src/fxfa/src/common/xfa_fm2jsapi.h
index 10b96dd44e..511b1b7a1a 100644
--- a/xfa/src/fxfa/src/common/xfa_fm2jsapi.h
+++ b/xfa/src/fxfa/src/common/xfa_fm2jsapi.h
@@ -12,7 +12,7 @@ extern "C"
{
#endif
typedef struct XFA_HFM2JSCONTEXT_ {
- FX_LPVOID* pData;
+ void** pData;
}* XFA_HFM2JSCONTEXT;
int32_t XFA_FM2JS_Translate(FX_WSTR wsFormcalc, CFX_WideTextBuf& wsJavascript, CFX_WideString& wsError);
XFA_HFM2JSCONTEXT XFA_FM2JS_ContextCreate();
diff --git a/xfa/src/fxfa/src/common/xfa_object.h b/xfa/src/fxfa/src/common/xfa_object.h
index 7c4acd4105..4d2c764457 100644
--- a/xfa/src/fxfa/src/common/xfa_object.h
+++ b/xfa/src/fxfa/src/common/xfa_object.h
@@ -104,26 +104,26 @@ enum XFA_SOM_MESSAGETYPE {
};
typedef CFX_StackTemplate<CXFA_Node*> CXFA_NodeStack;
typedef CXFA_PtrSetTemplate<CXFA_Node*> CXFA_NodeSet;
-typedef void (*PD_CALLBACK_DUPLICATEDATA)(FX_LPVOID& pData);
+typedef void (*PD_CALLBACK_DUPLICATEDATA)(void*& pData);
typedef struct _XFA_MAPDATABLOCKCALLBACKINFO {
PD_CALLBACK_FREEDATA pFree;
PD_CALLBACK_DUPLICATEDATA pCopy;
} XFA_MAPDATABLOCKCALLBACKINFO;
typedef struct _XFA_MAPDATABLOCK {
- FX_LPBYTE GetData() const
+ uint8_t* GetData() const
{
- return (FX_LPBYTE)this + sizeof(_XFA_MAPDATABLOCK);
+ return (uint8_t*)this + sizeof(_XFA_MAPDATABLOCK);
}
XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo;
int32_t iBytes;
} XFA_MAPDATABLOCK, * XFA_LPMAPDATABLOCK;
typedef struct _XFA_MAPMODULEDATA {
CFX_MapPtrToPtr m_ValueMap;
- CFX_MapPtrTemplate<FX_LPVOID, XFA_LPMAPDATABLOCK> m_BufferMap;
+ CFX_MapPtrTemplate<void*, XFA_LPMAPDATABLOCK> m_BufferMap;
} XFA_MAPMODULEDATA, * XFA_LPMAPMODULEDATA;
-#define XFA_CalcRefCount (FX_LPVOID)(uintptr_t)FXBSTR_ID('X', 'F', 'A', 'R')
-#define XFA_CalcData (FX_LPVOID)(uintptr_t)FXBSTR_ID('X', 'F', 'A', 'C')
-#define XFA_LAYOUTITEMKEY (FX_LPVOID)(uintptr_t)FXBSTR_ID('L', 'Y', 'I', 'M')
+#define XFA_CalcRefCount (void*)(uintptr_t)FXBSTR_ID('X', 'F', 'A', 'R')
+#define XFA_CalcData (void*)(uintptr_t)FXBSTR_ID('X', 'F', 'A', 'C')
+#define XFA_LAYOUTITEMKEY (void*)(uintptr_t)FXBSTR_ID('L', 'Y', 'I', 'M')
class CXFA_Node : public CXFA_Object
{
public:
@@ -176,7 +176,7 @@ public:
FX_BOOL SetBoolean(XFA_ATTRIBUTE eAttr, FX_BOOL bValue, FX_BOOL bNotify = FALSE)
{
- return SetValue(eAttr, XFA_ATTRIBUTETYPE_Boolean, (FX_LPVOID)(uintptr_t)bValue, bNotify);
+ return SetValue(eAttr, XFA_ATTRIBUTETYPE_Boolean, (void*)(uintptr_t)bValue, bNotify);
}
FX_BOOL TryBoolean(XFA_ATTRIBUTE eAttr, FX_BOOL &bValue, FX_BOOL bUseDefault = TRUE);
FX_BOOL GetBoolean(XFA_ATTRIBUTE eAttr)
@@ -186,7 +186,7 @@ public:
}
FX_BOOL SetInteger(XFA_ATTRIBUTE eAttr, int32_t iValue, FX_BOOL bNotify = FALSE)
{
- return SetValue(eAttr, XFA_ATTRIBUTETYPE_Integer, (FX_LPVOID)(uintptr_t)iValue, bNotify);
+ return SetValue(eAttr, XFA_ATTRIBUTETYPE_Integer, (void*)(uintptr_t)iValue, bNotify);
}
FX_BOOL TryInteger(XFA_ATTRIBUTE eAttr, int32_t &iValue, FX_BOOL bUseDefault = TRUE);
int32_t GetInteger(XFA_ATTRIBUTE eAttr)
@@ -196,7 +196,7 @@ public:
}
FX_BOOL SetEnum(XFA_ATTRIBUTE eAttr, XFA_ATTRIBUTEENUM eValue, FX_BOOL bNotify = FALSE)
{
- return SetValue(eAttr, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)(uintptr_t)eValue, bNotify);
+ return SetValue(eAttr, XFA_ATTRIBUTETYPE_Enum, (void*)(uintptr_t)eValue, bNotify);
}
FX_BOOL TryEnum(XFA_ATTRIBUTE eAttr, XFA_ATTRIBUTEENUM &eValue, FX_BOOL bUseDefault = TRUE);
XFA_ATTRIBUTEENUM GetEnum(XFA_ATTRIBUTE eAttr)
@@ -220,18 +220,18 @@ public:
CXFA_Measurement mValue;
return TryMeasure(eAttr, mValue, TRUE) ? mValue : CXFA_Measurement();
}
- FX_BOOL SetObject(XFA_ATTRIBUTE eAttr, FX_LPVOID pData, XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = NULL);
- FX_BOOL TryObject(XFA_ATTRIBUTE eAttr, FX_LPVOID &pData);
- FX_LPVOID GetObject(XFA_ATTRIBUTE eAttr)
+ FX_BOOL SetObject(XFA_ATTRIBUTE eAttr, void* pData, XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = NULL);
+ FX_BOOL TryObject(XFA_ATTRIBUTE eAttr, void* &pData);
+ void* GetObject(XFA_ATTRIBUTE eAttr)
{
- FX_LPVOID pData;
+ void* pData;
return TryObject(eAttr, pData) ? pData : NULL;
}
- FX_BOOL SetUserData(FX_LPVOID pKey, FX_LPVOID pData, XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = NULL);
- FX_BOOL TryUserData(FX_LPVOID pKey, FX_LPVOID &pData, FX_BOOL bProtoAlso = FALSE);
- FX_LPVOID GetUserData(FX_LPVOID pKey, FX_BOOL bProtoAlso = FALSE)
+ FX_BOOL SetUserData(void* pKey, void* pData, XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = NULL);
+ FX_BOOL TryUserData(void* pKey, void* &pData, FX_BOOL bProtoAlso = FALSE);
+ void* GetUserData(void* pKey, FX_BOOL bProtoAlso = FALSE)
{
- FX_LPVOID pData;
+ void* pData;
return TryUserData(pKey, pData, bProtoAlso) ? pData : NULL;
}
CXFA_Node* GetProperty(int32_t index, XFA_ELEMENT eProperty, FX_BOOL bCreateProperty = TRUE);
@@ -310,7 +310,7 @@ public:
void Script_Delta_CurrentValue(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
void Script_Delta_SavedValue(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
void Script_Delta_Target(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Attribute_SendAttributeChangeMessage(FX_LPVOID eAttribute, FX_LPVOID eValue, FX_BOOL bScriptModify);
+ void Script_Attribute_SendAttributeChangeMessage(void* eAttribute, void* eValue, FX_BOOL bScriptModify);
void Script_Attribute_Integer(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
void Script_Attribute_IntegerRead(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
void Script_Attribute_BOOL(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
@@ -429,26 +429,26 @@ protected:
~CXFA_Node();
friend class CXFA_Document;
CXFA_Node* Deprecated_GetPrevSibling();
- FX_BOOL SetValue(XFA_ATTRIBUTE eAttr, XFA_ATTRIBUTETYPE eType, FX_LPVOID pValue, FX_BOOL bNotify);
- FX_BOOL GetValue(XFA_ATTRIBUTE eAttr, XFA_ATTRIBUTETYPE eType, FX_BOOL bUseDefault, FX_LPVOID &pValue);
+ FX_BOOL SetValue(XFA_ATTRIBUTE eAttr, XFA_ATTRIBUTETYPE eType, void* pValue, FX_BOOL bNotify);
+ FX_BOOL GetValue(XFA_ATTRIBUTE eAttr, XFA_ATTRIBUTETYPE eType, FX_BOOL bUseDefault, void* &pValue);
void OnRemoved(CXFA_Node *pParent, CXFA_Node *pRemoved, FX_BOOL bNotify);
- void OnChanging(XFA_ATTRIBUTE eAttr, FX_LPVOID pNewValue, FX_BOOL bNotify);
- void OnChanged(XFA_ATTRIBUTE eAttr, FX_LPVOID pNewValue, FX_BOOL bNotify, FX_BOOL bScriptModify = FALSE);
+ void OnChanging(XFA_ATTRIBUTE eAttr, void* pNewValue, FX_BOOL bNotify);
+ void OnChanged(XFA_ATTRIBUTE eAttr, void* pNewValue, FX_BOOL bNotify, FX_BOOL bScriptModify = FALSE);
int32_t execSingleEventByName(FX_WSTR wsEventName, XFA_ELEMENT eElementType);
FX_BOOL SetScriptContent(const CFX_WideString& wsContent, const CFX_WideString& wsXMLValue, FX_BOOL bNotify = TRUE, FX_BOOL bScriptModify = FALSE, FX_BOOL bSyncData = TRUE);
CFX_WideString GetScriptContent(FX_BOOL bScriptModify = FALSE);
XFA_LPMAPMODULEDATA GetMapModuleData(FX_BOOL bCreateNew);
- void SetMapModuleValue(FX_LPVOID pKey, FX_LPVOID pValue);
- FX_BOOL GetMapModuleValue(FX_LPVOID pKey, FX_LPVOID &pValue);
- void SetMapModuleString(FX_LPVOID pKey, FX_WSTR wsValue);
- FX_BOOL GetMapModuleString(FX_LPVOID pKey, CFX_WideStringC &wsValue);
- void SetMapModuleBuffer(FX_LPVOID pKey, FX_LPVOID pValue, int32_t iBytes, XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = NULL);
- FX_BOOL GetMapModuleBuffer(FX_LPVOID pKey, FX_LPVOID &pValue, int32_t &iBytes, FX_BOOL bProtoAlso = TRUE);
- FX_BOOL HasMapModuleKey(FX_LPVOID pKey, FX_BOOL bProtoAlso = FALSE);
- void RemoveMapModuleKey(FX_LPVOID pKey = NULL);
- void MergeAllData(FX_LPVOID pDstModule, FX_BOOL bUseSrcAttr = TRUE);
- void MoveBufferMapData(CXFA_Node* pDstModule, FX_LPVOID pKey);
- void MoveBufferMapData(CXFA_Node* pSrcModule, CXFA_Node* pDstModule, FX_LPVOID pKey, FX_BOOL bRecursive = FALSE);
+ void SetMapModuleValue(void* pKey, void* pValue);
+ FX_BOOL GetMapModuleValue(void* pKey, void* &pValue);
+ void SetMapModuleString(void* pKey, FX_WSTR wsValue);
+ FX_BOOL GetMapModuleString(void* pKey, CFX_WideStringC &wsValue);
+ void SetMapModuleBuffer(void* pKey, void* pValue, int32_t iBytes, XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = NULL);
+ FX_BOOL GetMapModuleBuffer(void* pKey, void* &pValue, int32_t &iBytes, FX_BOOL bProtoAlso = TRUE);
+ FX_BOOL HasMapModuleKey(void* pKey, FX_BOOL bProtoAlso = FALSE);
+ void RemoveMapModuleKey(void* pKey = NULL);
+ void MergeAllData(void* pDstModule, FX_BOOL bUseSrcAttr = TRUE);
+ void MoveBufferMapData(CXFA_Node* pDstModule, void* pKey);
+ void MoveBufferMapData(CXFA_Node* pSrcModule, CXFA_Node* pDstModule, void* pKey, FX_BOOL bRecursive = FALSE);
protected:
CXFA_Node *m_pNext;
CXFA_Node *m_pChild;
@@ -554,15 +554,15 @@ protected:
class CXFA_TraverseStrategy_XFAContainerNode
{
public:
- static CXFA_Node* GetFirstChild(CXFA_Node* pTemplateNode, FX_LPVOID pUserData = NULL)
+ static CXFA_Node* GetFirstChild(CXFA_Node* pTemplateNode, void* pUserData = NULL)
{
return pTemplateNode->GetNodeItem(XFA_NODEITEM_FirstChild, XFA_OBJECTTYPE_ContainerNode);
}
- static CXFA_Node* GetNextSibling(CXFA_Node* pTemplateNode, FX_LPVOID pUserData = NULL)
+ static CXFA_Node* GetNextSibling(CXFA_Node* pTemplateNode, void* pUserData = NULL)
{
return pTemplateNode->GetNodeItem(XFA_NODEITEM_NextSibling, XFA_OBJECTTYPE_ContainerNode);
}
- static CXFA_Node* GetParent(CXFA_Node* pTemplateNode, FX_LPVOID pUserData = NULL)
+ static CXFA_Node* GetParent(CXFA_Node* pTemplateNode, void* pUserData = NULL)
{
return pTemplateNode->GetNodeItem(XFA_NODEITEM_Parent, XFA_OBJECTTYPE_ContainerNode);
}
diff --git a/xfa/src/fxfa/src/common/xfa_script.h b/xfa/src/fxfa/src/common/xfa_script.h
index 5be9077083..d4c867aa31 100644
--- a/xfa/src/fxfa/src/common/xfa_script.h
+++ b/xfa/src/fxfa/src/common/xfa_script.h
@@ -72,7 +72,7 @@ typedef struct _XFA_RESOLVENODE_RS {
} XFA_RESOLVENODE_RS, * XFA_LPRESOLVENODE_RS;
typedef struct _XFA_JSBUILTININFO {
uint32_t uUnicodeHash;
- FX_LPCSTR pName;
+ const FX_CHAR* pName;
} XFA_JSBUILTININFO, * XFA_LPJSBUILTININFO;
typedef XFA_JSBUILTININFO const * XFA_LPCJSBUILTININFO;
XFA_LPCJSBUILTININFO XFA_GetJSBuiltinByHash(uint32_t uHashCode);
diff --git a/xfa/src/fxfa/src/common/xfa_utils.h b/xfa/src/fxfa/src/common/xfa_utils.h
index abb9dd208a..191fcf2bbb 100644
--- a/xfa/src/fxfa/src/common/xfa_utils.h
+++ b/xfa/src/fxfa/src/common/xfa_utils.h
@@ -176,7 +176,7 @@ public:
FX_BOOL Lookup(KeyType key) const
{
- FX_LPVOID pValue = NULL;
+ void* pValue = NULL;
return CFX_MapPtrToPtr::Lookup((void*)key, pValue);
}
@@ -235,5 +235,5 @@ FX_BOOL XFA_IsFlowingLayout(XFA_ATTRIBUTEENUM eLayout);
FX_BOOL XFA_IsHorizontalFlow(XFA_ATTRIBUTEENUM eLayout);
void XFA_DataExporter_DealWithDataGroupNode(CXFA_Node *pDataNode);
void XFA_DataExporter_RegenerateFormFile(CXFA_Node* pNode, IFX_Stream* pStream,
- FX_LPCSTR pChecksum = NULL, FX_BOOL bSaveXML = FALSE);
+ const FX_CHAR* pChecksum = NULL, FX_BOOL bSaveXML = FALSE);
#endif
diff --git a/xfa/src/fxfa/src/fm2js/xfa_error.cpp b/xfa/src/fxfa/src/fm2js/xfa_error.cpp
index ec6e69590a..a24641917c 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_error.cpp
+++ b/xfa/src/fxfa/src/fm2js/xfa_error.cpp
@@ -5,7 +5,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "xfa_fm2js.h"
-static FX_LPCWSTR gs_lpStrErrorMsgInfo[] = {
+static const FX_WCHAR* gs_lpStrErrorMsgInfo[] = {
L"unsupported char '%c'",
L"bad suffix on number",
L"invalidate char '%c'",
@@ -15,7 +15,7 @@ static FX_LPCWSTR gs_lpStrErrorMsgInfo[] = {
L"unexpected expression '%s'",
L"expected operator '%s' instead of '%s'",
};
-FX_LPCWSTR XFA_FM_ErrorMsg(XFA_FM_ERRMSG msg)
+const FX_WCHAR* XFA_FM_ErrorMsg(XFA_FM_ERRMSG msg)
{
if(msg < FMERR_MAXIMUM) {
return gs_lpStrErrorMsgInfo[msg];
diff --git a/xfa/src/fxfa/src/fm2js/xfa_error.h b/xfa/src/fxfa/src/fm2js/xfa_error.h
index 84f3917c94..6b9fc92d9e 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_error.h
+++ b/xfa/src/fxfa/src/fm2js/xfa_error.h
@@ -25,5 +25,5 @@ public:
FX_DWORD linenum;
CFX_WideString message;
};
-FX_LPCWSTR XFA_FM_ErrorMsg( XFA_FM_ERRMSG msg);
+const FX_WCHAR* XFA_FM_ErrorMsg( XFA_FM_ERRMSG msg);
#endif
diff --git a/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp b/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp
index 84a7747e7a..466aaeefbd 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp
+++ b/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp
@@ -9,11 +9,11 @@
#define FINANCIAL_PRECISION 0.00000001
struct XFA_FMHtmlReserveCode {
uint32_t m_uCode;
- FX_LPCWSTR m_htmlReserve;
+ const FX_WCHAR* m_htmlReserve;
};
struct XFA_FMHtmlHashedReserveCode {
uint32_t m_uHash;
- FX_LPCWSTR m_htmlReserve;
+ const FX_WCHAR* m_htmlReserve;
uint32_t m_uCode;
};
static XFA_FMHtmlHashedReserveCode reservesForDecode [] = {
@@ -1866,7 +1866,7 @@ void CXFA_FM2JSContext::TimeFmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"TimeFmt");
}
}
-FX_BOOL CXFA_FM2JSContext::IsIsoDateFormat(FX_LPCSTR pData, int32_t iLength, int32_t &iStyle, int32_t &iYear, int32_t &iMonth, int32_t &iDay)
+FX_BOOL CXFA_FM2JSContext::IsIsoDateFormat(const FX_CHAR* pData, int32_t iLength, int32_t &iStyle, int32_t &iYear, int32_t &iMonth, int32_t &iDay)
{
iYear = 0;
iMonth = 1;
@@ -1979,7 +1979,7 @@ FX_BOOL CXFA_FM2JSContext::IsIsoDateFormat(FX_LPCSTR pData, int32_t iLength, int
iRet = TRUE;
return iRet;
}
-FX_BOOL CXFA_FM2JSContext::IsIsoTimeFormat(FX_LPCSTR pData, int32_t iLength, int32_t &iHour, int32_t &iMinute, int32_t &iSecond, int32_t &iMilliSecond, int32_t &iZoneHour, int32_t &iZoneMinute)
+FX_BOOL CXFA_FM2JSContext::IsIsoTimeFormat(const FX_CHAR* pData, int32_t iLength, int32_t &iHour, int32_t &iMinute, int32_t &iSecond, int32_t &iMilliSecond, int32_t &iZoneHour, int32_t &iZoneMinute)
{
iHour = 0;
iMinute = 0;
@@ -2121,7 +2121,7 @@ FX_BOOL CXFA_FM2JSContext::IsIsoTimeFormat(FX_LPCSTR pData, int32_t iLength, int
iRet = TRUE;
return iRet;
}
-FX_BOOL CXFA_FM2JSContext::IsIsoDateTimeFormat(FX_LPCSTR pData, int32_t iLength, int32_t &iYear, int32_t &iMonth, int32_t &iDay, int32_t &iHour, int32_t &iMinute, int32_t &iSecond, int32_t &iMillionSecond, int32_t &iZoneHour, int32_t &iZoneMinute)
+FX_BOOL CXFA_FM2JSContext::IsIsoDateTimeFormat(const FX_CHAR* pData, int32_t iLength, int32_t &iYear, int32_t &iMonth, int32_t &iDay, int32_t &iHour, int32_t &iMinute, int32_t &iSecond, int32_t &iMillionSecond, int32_t &iZoneHour, int32_t &iZoneMinute)
{
iYear = 0;
iMonth = 0;
@@ -3359,7 +3359,7 @@ void CXFA_FM2JSContext::UnitType(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE
};
unitspanString.MakeLower();
CFX_WideString wsTypeString = CFX_WideString::FromUTF8(unitspanString, unitspanString.GetLength());
- FX_LPCWSTR pData = wsTypeString;
+ const FX_WCHAR* pData = wsTypeString;
int32_t u = 0;
int32_t uLen = wsTypeString.GetLength();
while (*(pData + u) == 0x20 || *(pData + u) == 0x09 || *(pData + u) == 0x0B || *(pData + u) == 0x0C || *(pData + u) == 0x0A || *(pData + u) == 0x0D) {
@@ -3447,7 +3447,7 @@ void CXFA_FM2JSContext::UnitValue(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJS
FXJSE_Value_SetNull(args.GetReturnValue());
} else {
HValueToUTF8String(unitspanValue, unitspanString);
- FX_LPCSTR pData = unitspanString;
+ const FX_CHAR* pData = unitspanString;
if (pData) {
int32_t u = 0;
while (*(pData + u) == 0x20 || *(pData + u) == 0x09 || *(pData + u) == 0x0B || *(pData + u) == 0x0C || *(pData + u) == 0x0A || *(pData + u) == 0x0D) {
@@ -3479,7 +3479,7 @@ void CXFA_FM2JSContext::UnitValue(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJS
unitValue = GetSimpleHValue(hThis, args, 1);
CFX_ByteString unitTempString;
HValueToUTF8String(unitValue, unitTempString);
- FX_LPCSTR pData = unitTempString;
+ const FX_CHAR* pData = unitTempString;
int32_t u = 0;
while (*(pData + u) == ' ' || *(pData + u) == 0x09 || *(pData + u) == 0x0B || *(pData + u) == 0x0C || *(pData + u) == 0x0A || *(pData + u) == 0x0D) {
++u;
@@ -3685,7 +3685,7 @@ void CXFA_FM2JSContext::Decode(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_A
void CXFA_FM2JSContext::DecodeURL (FX_BSTR szURLString, CFX_ByteTextBuf &szResultString)
{
CFX_WideString wsURLString = CFX_WideString::FromUTF8(szURLString.GetCStr(), szURLString.GetLength());
- FX_LPCWSTR pData = wsURLString;
+ const FX_WCHAR* pData = wsURLString;
int32_t iLen = wsURLString.GetLength();
int32_t i = 0;
FX_WCHAR ch = 0;
@@ -3743,7 +3743,7 @@ void CXFA_FM2JSContext::DecodeHTML(FX_BSTR szHTMLString, CFX_ByteTextBuf &szResu
int32_t i = 0;
int32_t iCode = 0;
FX_WCHAR ch = 0;
- FX_LPCWSTR pData = wsHTMLString;
+ const FX_WCHAR* pData = wsHTMLString;
CFX_WideTextBuf wsResultBuf;
while (i < iLen) {
ch = *(pData + i);
@@ -3813,7 +3813,7 @@ void CXFA_FM2JSContext::DecodeXML (FX_BSTR szXMLString, CFX_ByteTextBuf &szResu
int32_t i = 0;
int32_t iCode = 0;
FX_WCHAR ch = 0;
- FX_LPCWSTR pData = wsXMLString;
+ const FX_WCHAR* pData = wsXMLString;
CFX_WideTextBuf wsXMLBuf;
while (i < iLen) {
ch = *(pData + i);
@@ -3861,7 +3861,7 @@ void CXFA_FM2JSContext::DecodeXML (FX_BSTR szXMLString, CFX_ByteTextBuf &szResu
++i;
continue;
}
- FX_LPCWSTR const strName[] = {
+ const FX_WCHAR* const strName[] = {
L"quot",
L"amp",
L"apos",
@@ -3958,7 +3958,7 @@ void CXFA_FM2JSContext::EncodeURL (FX_BSTR szURLString, CFX_ByteTextBuf &szResu
FX_WCHAR strUnsafe[] = { ' ', '<', '>', '"', '#', '%', '{', '}', '|', '\\', '^', '~', '[', ']', '`' };
FX_WCHAR strReserved[] = {';', '/', '?', ':', '@', '=', '&'};
FX_WCHAR strSpecial[] = {'$', '-', '+', '!', '*', '\'', '(', ')', ','};
- const FX_LPCWSTR strCode = L"0123456789abcdef";
+ const FX_WCHAR* strCode = L"0123456789abcdef";
for (int32_t u = 0; u < iLength; ++u) {
ch = wsURLString.GetAt(u);
int32_t i = 0;
@@ -4054,7 +4054,7 @@ void CXFA_FM2JSContext::EncodeHTML(FX_BSTR szHTMLString, CFX_ByteTextBuf &szResu
{
CFX_ByteString str = szHTMLString.GetCStr();
CFX_WideString wsHTMLString = CFX_WideString::FromUTF8(str, str.GetLength());
- FX_LPCWSTR strCode = L"0123456789abcdef";
+ const FX_WCHAR* strCode = L"0123456789abcdef";
FX_WCHAR strEncode[9];
strEncode[0] = '&';
strEncode[1] = '#';
@@ -4067,7 +4067,7 @@ void CXFA_FM2JSContext::EncodeHTML(FX_BSTR szHTMLString, CFX_ByteTextBuf &szResu
uint32_t ch = 0;
int32_t iLen = wsHTMLString.GetLength();
int32_t i = 0;
- FX_LPCWSTR pData = wsHTMLString;
+ const FX_WCHAR* pData = wsHTMLString;
int32_t iIndex = 0;
CFX_WideString htmlReserve;
while (i < iLen) {
@@ -4121,19 +4121,19 @@ void CXFA_FM2JSContext::EncodeXML (FX_BSTR szXMLString, CFX_ByteTextBuf &szResu
strEncode[6] = 0;
strEncode[7] = ';';
strEncode[8] = 0;
- FX_LPCWSTR const strName[] = {
+ const FX_WCHAR* const strName[] = {
L"quot",
L"amp",
L"apos",
L"lt",
L"gt"
};
- const FX_LPCWSTR strCode = L"0123456789abcdef";
+ const FX_WCHAR* strCode = L"0123456789abcdef";
FX_WCHAR ch = 0;
int32_t iLength = wsXMLString.GetLength();
int32_t iIndex = 0;
int32_t u = 0;
- FX_LPCWSTR pData = wsXMLString;
+ const FX_WCHAR* pData = wsXMLString;
for (u = 0; u < iLength; ++u) {
ch = *(pData + u);
switch (ch) {
@@ -4259,7 +4259,7 @@ static FX_BOOL XFA_PATTERN_STRING_Type(FX_BSTR szPattern, FX_DWORD& patternType)
}
patternType = XFA_VT_NULL;
wsPattern.MakeLower();
- FX_LPCWSTR pData = wsPattern;
+ const FX_WCHAR* pData = wsPattern;
int32_t iLength = wsPattern.GetLength();
int32_t iIndex = 0;
FX_BOOL bSingleQuotation = FALSE;
@@ -4452,7 +4452,7 @@ void CXFA_FM2JSContext::Lower(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
HValueToUTF8String(argOne, argString);
CFX_WideTextBuf lowStringBuf;
CFX_WideString wsArgString = CFX_WideString::FromUTF8(argString, argString.GetLength());
- FX_LPCWSTR pData = wsArgString;
+ const FX_WCHAR* pData = wsArgString;
int32_t iLen = argString.GetLength();
int32_t i = 0;
int32_t ch = 0;
@@ -4801,7 +4801,7 @@ void CXFA_FM2JSContext::Str(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
}
formatStr += "f";
numberString.Format(formatStr, fNumber);
- FX_LPCSTR pData = numberString;
+ const FX_CHAR* pData = numberString;
int32_t iLength = numberString.GetLength();
int32_t u = 0;
while (u < iLength) {
@@ -5029,7 +5029,7 @@ void CXFA_FM2JSContext::Upper(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
HValueToUTF8String(argOne, argString);
CFX_WideTextBuf upperStringBuf;
CFX_WideString wsArgString = CFX_WideString::FromUTF8(argString, argString.GetLength());
- FX_LPCWSTR pData = wsArgString;
+ const FX_WCHAR* pData = wsArgString;
int32_t iLen = wsArgString.GetLength();
int32_t i = 0;
int32_t ch = 0;
@@ -5122,7 +5122,7 @@ void CXFA_FM2JSContext::TrillionUS(FX_BSTR szData, CFX_ByteTextBuf &strBuf)
CFX_ByteStringC pLastTens[] = {"Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety"};
CFX_ByteStringC pComm[] = {" Hundred ", " Thousand ", " Million ", " Billion ", "Trillion"};
int32_t iComm = 0;
- FX_LPCSTR pData = szData.GetCStr();
+ const FX_CHAR* pData = szData.GetCStr();
int32_t iLength = szData.GetLength();
if (iLength > 12) {
iComm = 4;
@@ -5207,7 +5207,7 @@ void CXFA_FM2JSContext::TrillionUS(FX_BSTR szData, CFX_ByteTextBuf &strBuf)
}
void CXFA_FM2JSContext::WordUS(FX_BSTR szData, int32_t iStyle, CFX_ByteTextBuf &strBuf)
{
- FX_LPCSTR pData = szData.GetCStr();
+ const FX_CHAR* pData = szData.GetCStr();
int32_t iLength = szData.GetLength();
switch (iStyle) {
case 0: {
@@ -5324,7 +5324,7 @@ void CXFA_FM2JSContext::Get(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
IFX_FileRead* pFile = pAppProvider->DownloadURL(CFX_WideString::FromUTF8(urlString, urlString.GetLength()));
if (pFile) {
int32_t size = pFile->GetSize();
- FX_LPBYTE pData = FX_Alloc(uint8_t, size);
+ uint8_t* pData = FX_Alloc(uint8_t, size);
if(pData) {
pFile->ReadBlock(pData, size);
FXJSE_Value_SetUTF8String(args.GetReturnValue(), CFX_ByteStringC(pData, size));
@@ -5915,7 +5915,7 @@ void CXFA_FM2JSContext::dot_accessor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CF
} else {
CFX_WideString wsPropertyName = CFX_WideString::FromUTF8(szName, szName.GetLength());
CFX_WideString wsSomExpression = CFX_WideString::FromUTF8(szSomExp, szSomExp.GetLength());
- pContext->ThrowScriptErrorMessage(XFA_IDS_ACCESS_PROPERTY_IN_NOT_OBJECT, (FX_LPCWSTR)wsPropertyName, (FX_LPCWSTR)wsSomExpression);
+ pContext->ThrowScriptErrorMessage(XFA_IDS_ACCESS_PROPERTY_IN_NOT_OBJECT, (const FX_WCHAR*)wsPropertyName, (const FX_WCHAR*)wsSomExpression);
}
for(int32_t i = 0; i < iLength - 2; i++) {
for(int32_t j = 0; j < iSizes[i]; j++) {
@@ -5968,7 +5968,7 @@ void CXFA_FM2JSContext::dot_accessor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CF
} else {
CFX_WideString wsPropertyName = CFX_WideString::FromUTF8(szName, szName.GetLength());
CFX_WideString wsSomExpression = CFX_WideString::FromUTF8(szSomExp, szSomExp.GetLength());
- pContext->ThrowScriptErrorMessage(XFA_IDS_ACCESS_PROPERTY_IN_NOT_OBJECT, (FX_LPCWSTR)wsPropertyName, (FX_LPCWSTR)wsSomExpression);
+ pContext->ThrowScriptErrorMessage(XFA_IDS_ACCESS_PROPERTY_IN_NOT_OBJECT, (const FX_WCHAR*)wsPropertyName, (const FX_WCHAR*)wsSomExpression);
}
}
if(argc == 5) {
@@ -6044,7 +6044,7 @@ void CXFA_FM2JSContext::dotdot_accessor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName,
} else {
CFX_WideString wsPropertyName = CFX_WideString::FromUTF8(szName, szName.GetLength());
CFX_WideString wsSomExpression = CFX_WideString::FromUTF8(szSomExp, szSomExp.GetLength());
- pContext->ThrowScriptErrorMessage(XFA_IDS_ACCESS_PROPERTY_IN_NOT_OBJECT, (FX_LPCWSTR)wsPropertyName, (FX_LPCWSTR)wsSomExpression);
+ pContext->ThrowScriptErrorMessage(XFA_IDS_ACCESS_PROPERTY_IN_NOT_OBJECT, (const FX_WCHAR*)wsPropertyName, (const FX_WCHAR*)wsSomExpression);
}
for(int32_t i = 0; i < iLength - 2; i++) {
for(int32_t j = 0; j < iSizes[i]; j++) {
@@ -6096,7 +6096,7 @@ void CXFA_FM2JSContext::dotdot_accessor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName,
} else {
CFX_WideString wsPropertyName = CFX_WideString::FromUTF8(szName, szName.GetLength());
CFX_WideString wsSomExpression = CFX_WideString::FromUTF8(szSomExp, szSomExp.GetLength());
- pContext->ThrowScriptErrorMessage(XFA_IDS_ACCESS_PROPERTY_IN_NOT_OBJECT, (FX_LPCWSTR)wsPropertyName, (FX_LPCWSTR)wsSomExpression);
+ pContext->ThrowScriptErrorMessage(XFA_IDS_ACCESS_PROPERTY_IN_NOT_OBJECT, (const FX_WCHAR*)wsPropertyName, (const FX_WCHAR*)wsSomExpression);
}
}
if(argc == 5) {
@@ -7179,7 +7179,7 @@ void CXFA_FM2JSContext::ThrowScriptErrorMessage(int32_t iStringID, ...)
CFX_WideString wsMessage;
va_list arg_ptr;
va_start(arg_ptr, iStringID);
- wsMessage.FormatV((FX_LPCWSTR)wsFormat, arg_ptr);
+ wsMessage.FormatV((const FX_WCHAR*)wsFormat, arg_ptr);
va_end(arg_ptr);
FXJSE_ThrowMessage(FX_BSTRC(""), FX_UTF8Encode(wsMessage, wsMessage.GetLength()));
}
diff --git a/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.h b/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.h
index 923401b901..b947bfa740 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.h
+++ b/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.h
@@ -33,9 +33,9 @@ public:
static void Time2Num (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
static void TimeFmt (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static FX_BOOL IsIsoDateFormat (FX_LPCSTR pData, int32_t iLength, int32_t &iStyle, int32_t &iYear, int32_t &iMonth, int32_t &iDay);
- static FX_BOOL IsIsoTimeFormat (FX_LPCSTR pData, int32_t iLength, int32_t &iHour, int32_t &iMinute, int32_t &iSecond, int32_t &iMilliSecond, int32_t &iZoneHour, int32_t &iZoneMinute);
- static FX_BOOL IsIsoDateTimeFormat (FX_LPCSTR pData, int32_t iLength, int32_t &iYear, int32_t &iMonth, int32_t &iDay, int32_t &iHour, int32_t &iMinute, int32_t &iSecond, int32_t &iMillionSecond, int32_t &iZoneHour, int32_t &iZoneMinute);
+ static FX_BOOL IsIsoDateFormat (const FX_CHAR* pData, int32_t iLength, int32_t &iStyle, int32_t &iYear, int32_t &iMonth, int32_t &iDay);
+ static FX_BOOL IsIsoTimeFormat (const FX_CHAR* pData, int32_t iLength, int32_t &iHour, int32_t &iMinute, int32_t &iSecond, int32_t &iMilliSecond, int32_t &iZoneHour, int32_t &iZoneMinute);
+ static FX_BOOL IsIsoDateTimeFormat (const FX_CHAR* pData, int32_t iLength, int32_t &iYear, int32_t &iMonth, int32_t &iDay, int32_t &iHour, int32_t &iMinute, int32_t &iSecond, int32_t &iMillionSecond, int32_t &iZoneHour, int32_t &iZoneMinute);
static FX_BOOL Local2IsoDate (FXJSE_HOBJECT hThis, FX_BSTR szDate, FX_BSTR szFormat, FX_BSTR szLocale, CFX_ByteString &strIsoDate);
static FX_BOOL Local2IsoTime (FXJSE_HOBJECT hThis, FX_BSTR szTime, FX_BSTR szFormat, FX_BSTR szLocale, CFX_ByteString &strIsoTime);
static FX_BOOL IsoDate2Local (FXJSE_HOBJECT hThis, FX_BSTR szDate, FX_BSTR szFormat, FX_BSTR szLocale, CFX_ByteString &strLocalDate);
diff --git a/xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp b/xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp
index a3e127f3c6..590fa3fd76 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp
+++ b/xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp
@@ -48,14 +48,14 @@ void CXFA_FMParse::Check( XFA_FM_TOKEN op )
{
if (m_pToken->m_type != op) {
CFX_WideString ws_TempString = m_pToken->m_wstring;
- Error(m_pToken->m_uLinenum, FMERR_EXPECTED_TOKEN, XFA_FM_KeywordToString(op), FX_LPCWSTR(ws_TempString));
+ Error(m_pToken->m_uLinenum, FMERR_EXPECTED_TOKEN, XFA_FM_KeywordToString(op), ws_TempString.c_str());
}
NextToken();
}
void CXFA_FMParse::Error(FX_DWORD lineNum, XFA_FM_ERRMSG msg, ...)
{
m_pErrorInfo->linenum = lineNum;
- FX_LPCWSTR lpMessageInfo = XFA_FM_ErrorMsg(msg);
+ const FX_WCHAR* lpMessageInfo = XFA_FM_ErrorMsg(msg);
va_list ap;
va_start(ap, msg);
m_pErrorInfo->message.FormatV(lpMessageInfo, ap);
@@ -109,7 +109,7 @@ CXFA_FMExpression * CXFA_FMParse::ParseFunction()
NextToken();
if (m_pToken->m_type != TOKidentifier) {
CFX_WideString ws_TempString = m_pToken->m_wstring;
- Error(m_pToken->m_uLinenum, FMERR_EXPECTED_IDENTIFIER, FX_LPCWSTR(ws_TempString));
+ Error(m_pToken->m_uLinenum, FMERR_EXPECTED_IDENTIFIER, ws_TempString.c_str());
} else {
ident = m_pToken->m_wstring;
NextToken();
@@ -137,7 +137,7 @@ CXFA_FMExpression * CXFA_FMParse::ParseFunction()
}
} else {
CFX_WideString ws_TempString = m_pToken->m_wstring;
- Error(m_pToken->m_uLinenum, FMERR_EXPECTED_IDENTIFIER, FX_LPCWSTR(ws_TempString));
+ Error(m_pToken->m_uLinenum, FMERR_EXPECTED_IDENTIFIER, ws_TempString.c_str());
NextToken();
break;
}
@@ -219,7 +219,7 @@ CXFA_FMExpression * CXFA_FMParse::ParseExpression()
break;
default:
CFX_WideString ws_TempString = m_pToken->m_wstring;
- Error(m_pToken->m_uLinenum, FMERR_UNEXPECTED_EXPRESSION, FX_LPCWSTR(ws_TempString));
+ Error(m_pToken->m_uLinenum, FMERR_UNEXPECTED_EXPRESSION, ws_TempString.c_str());
NextToken();
break;
}
@@ -233,7 +233,7 @@ CXFA_FMExpression * CXFA_FMParse::ParseVarExpression()
NextToken();
if (m_pToken->m_type != TOKidentifier) {
CFX_WideString ws_TempString = m_pToken->m_wstring;
- Error(m_pToken->m_uLinenum, FMERR_EXPECTED_IDENTIFIER, FX_LPCWSTR(ws_TempString));
+ Error(m_pToken->m_uLinenum, FMERR_EXPECTED_IDENTIFIER, ws_TempString.c_str());
} else {
ident = m_pToken->m_wstring;
NextToken();
@@ -571,7 +571,7 @@ CXFA_FMSimpleExpression * CXFA_FMParse::ParsePrimaryExpression()
break;
default:
CFX_WideString ws_TempString = m_pToken->m_wstring;
- Error(m_pToken->m_uLinenum, FMERR_UNEXPECTED_EXPRESSION, FX_LPCWSTR(ws_TempString));
+ Error(m_pToken->m_uLinenum, FMERR_UNEXPECTED_EXPRESSION, ws_TempString.c_str());
NextToken();
break;
}
@@ -605,7 +605,7 @@ CXFA_FMSimpleExpression *CXFA_FMParse::ParsePostExpression(CXFA_FMSimpleExpressi
}
if (m_pToken->m_type != TOKrparen) {
CFX_WideString ws_TempString = m_pToken->m_wstring;
- Error(m_pToken->m_uLinenum, FMERR_EXPECTED_TOKEN, XFA_FM_KeywordToString(TOKrparen), FX_LPCWSTR(ws_TempString));
+ Error(m_pToken->m_uLinenum, FMERR_EXPECTED_TOKEN, XFA_FM_KeywordToString(TOKrparen), ws_TempString.c_str());
}
}
if (m_pErrorInfo->message.IsEmpty()) {
@@ -658,7 +658,7 @@ CXFA_FMSimpleExpression *CXFA_FMParse::ParsePostExpression(CXFA_FMSimpleExpressi
}
if (m_pToken->m_type != TOKrparen) {
CFX_WideString ws_TempString = m_pToken->m_wstring;
- Error(m_pToken->m_uLinenum, FMERR_EXPECTED_TOKEN, XFA_FM_KeywordToString(TOKrparen), FX_LPCWSTR(ws_TempString));
+ Error(m_pToken->m_uLinenum, FMERR_EXPECTED_TOKEN, XFA_FM_KeywordToString(TOKrparen), ws_TempString.c_str());
}
}
if (m_pErrorInfo->message.IsEmpty()) {
@@ -707,7 +707,7 @@ CXFA_FMSimpleExpression *CXFA_FMParse::ParsePostExpression(CXFA_FMSimpleExpressi
}
} else {
CFX_WideString ws_TempString = m_pToken->m_wstring;
- Error(m_pToken->m_uLinenum, FMERR_EXPECTED_IDENTIFIER, FX_LPCWSTR(ws_TempString));
+ Error(m_pToken->m_uLinenum, FMERR_EXPECTED_IDENTIFIER, ws_TempString.c_str());
return e;
}
break;
@@ -738,7 +738,7 @@ CXFA_FMSimpleExpression *CXFA_FMParse::ParsePostExpression(CXFA_FMSimpleExpressi
}
} else {
CFX_WideString ws_TempString = m_pToken->m_wstring;
- Error(m_pToken->m_uLinenum, FMERR_EXPECTED_IDENTIFIER, FX_LPCWSTR(ws_TempString));
+ Error(m_pToken->m_uLinenum, FMERR_EXPECTED_IDENTIFIER, ws_TempString.c_str());
return e;
}
break;
@@ -769,7 +769,7 @@ CXFA_FMSimpleExpression *CXFA_FMParse::ParsePostExpression(CXFA_FMSimpleExpressi
}
} else {
CFX_WideString ws_TempString = m_pToken->m_wstring;
- Error(m_pToken->m_uLinenum, FMERR_EXPECTED_IDENTIFIER, FX_LPCWSTR(ws_TempString));
+ Error(m_pToken->m_uLinenum, FMERR_EXPECTED_IDENTIFIER, ws_TempString.c_str());
return e;
}
break;
@@ -797,7 +797,7 @@ CXFA_FMSimpleExpression *CXFA_FMParse::ParseIndexExpression()
NextToken();
if (m_pToken->m_type != TOKrbracket) {
CFX_WideString ws_TempString = m_pToken->m_wstring;
- Error(m_pToken->m_uLinenum, FMERR_EXPECTED_TOKEN, XFA_FM_KeywordToString(TOKrparen), FX_LPCWSTR(ws_TempString));
+ Error(m_pToken->m_uLinenum, FMERR_EXPECTED_TOKEN, XFA_FM_KeywordToString(TOKrparen), ws_TempString.c_str());
if (pExp) {
delete pExp;
pExp = 0;
@@ -815,7 +815,7 @@ CXFA_FMSimpleExpression *CXFA_FMParse::ParseIndexExpression()
s = ParseSimpleExpression();
if (m_pToken->m_type != TOKrbracket) {
CFX_WideString ws_TempString = m_pToken->m_wstring;
- Error(m_pToken->m_uLinenum, FMERR_EXPECTED_TOKEN, XFA_FM_KeywordToString(TOKrparen), FX_LPCWSTR(ws_TempString));
+ Error(m_pToken->m_uLinenum, FMERR_EXPECTED_TOKEN, XFA_FM_KeywordToString(TOKrparen), ws_TempString.c_str());
if (s) {
delete s;
}
@@ -901,7 +901,7 @@ CXFA_FMExpression * CXFA_FMParse::ParseIfExpression()
CXFA_FMExpression *pIfExpression = 0;
CXFA_FMExpression *pElseExpression = 0;
FX_DWORD line = m_pToken->m_uLinenum;
- FX_LPCWSTR pStartPos = m_lexer->SavePos();
+ const FX_WCHAR* pStartPos = m_lexer->SavePos();
NextToken();
Check(TOKlparen);
while (m_pToken->m_type != TOKrparen) {
@@ -949,7 +949,7 @@ CXFA_FMExpression * CXFA_FMParse::ParseIfExpression()
break;
default:
CFX_WideString ws_TempString = m_pToken->m_wstring;
- Error(m_pToken->m_uLinenum, FMERR_EXPECTED_IFEND, FX_LPCWSTR(ws_TempString));
+ Error(m_pToken->m_uLinenum, FMERR_EXPECTED_IFEND, ws_TempString.c_str());
NextToken();
break;
}
@@ -997,14 +997,13 @@ CXFA_FMExpression * CXFA_FMParse::ParseWhileExpression()
CXFA_FMSimpleExpression * CXFA_FMParse::ParseSubassignmentInForExpression()
{
CXFA_FMSimpleExpression *e = 0;
- FX_DWORD line = m_pToken->m_uLinenum;
switch (m_pToken->m_type) {
case TOKidentifier:
e = ParseSimpleExpression();
break;
default:
CFX_WideString ws_TempString = m_pToken->m_wstring;
- Error(m_pToken->m_uLinenum, FMERR_UNEXPECTED_EXPRESSION, FX_LPCWSTR(ws_TempString));
+ Error(m_pToken->m_uLinenum, FMERR_UNEXPECTED_EXPRESSION, ws_TempString.c_str());
NextToken();
break;
}
@@ -1022,7 +1021,7 @@ CXFA_FMExpression * CXFA_FMParse::ParseForExpression()
NextToken();
if (m_pToken->m_type != TOKidentifier) {
CFX_WideString ws_TempString = m_pToken->m_wstring;
- Error(m_pToken->m_uLinenum, FMERR_EXPECTED_TOKEN, XFA_FM_KeywordToString(m_pToken->m_type), FX_LPCWSTR(ws_TempString));
+ Error(m_pToken->m_uLinenum, FMERR_EXPECTED_TOKEN, XFA_FM_KeywordToString(m_pToken->m_type), ws_TempString.c_str());
}
wsVariant = m_pToken->m_wstring;
NextToken();
@@ -1031,7 +1030,7 @@ CXFA_FMExpression * CXFA_FMParse::ParseForExpression()
pAssignment = ParseSimpleExpression();
} else {
CFX_WideString ws_TempString = m_pToken->m_wstring;
- Error(m_pToken->m_uLinenum, FMERR_EXPECTED_TOKEN, XFA_FM_KeywordToString(m_pToken->m_type), FX_LPCWSTR(ws_TempString));
+ Error(m_pToken->m_uLinenum, FMERR_EXPECTED_TOKEN, XFA_FM_KeywordToString(m_pToken->m_type), ws_TempString.c_str());
}
int32_t iDirection = 0;
if (m_pToken->m_type == TOKupto) {
@@ -1040,7 +1039,7 @@ CXFA_FMExpression * CXFA_FMParse::ParseForExpression()
iDirection = -1;
} else {
CFX_WideString ws_TempString = m_pToken->m_wstring;
- Error(m_pToken->m_uLinenum, FMERR_EXPECTED_TOKEN, L"upto or downto", (FX_LPCWSTR)ws_TempString);
+ Error(m_pToken->m_uLinenum, FMERR_EXPECTED_TOKEN, L"upto or downto", (const FX_WCHAR*)ws_TempString);
}
NextToken();
pAccessor = ParseSimpleExpression();
@@ -1079,7 +1078,7 @@ CXFA_FMExpression * CXFA_FMParse::ParseForeachExpression()
NextToken();
if (m_pToken->m_type != TOKidentifier) {
CFX_WideString ws_TempString = m_pToken->m_wstring;
- Error(m_pToken->m_uLinenum, FMERR_EXPECTED_TOKEN, XFA_FM_KeywordToString(m_pToken->m_type), FX_LPCWSTR(ws_TempString));
+ Error(m_pToken->m_uLinenum, FMERR_EXPECTED_TOKEN, XFA_FM_KeywordToString(m_pToken->m_type), ws_TempString.c_str());
}
wsIdentifier = m_pToken->m_wstring;
NextToken();
@@ -1087,7 +1086,7 @@ CXFA_FMExpression * CXFA_FMParse::ParseForeachExpression()
Check(TOKlparen);
if (m_pToken->m_type == TOKrparen) {
CFX_WideString ws_TempString = m_pToken->m_wstring;
- Error(m_pToken->m_uLinenum, FMERR_UNEXPECTED_EXPRESSION, FX_LPCWSTR(ws_TempString));
+ Error(m_pToken->m_uLinenum, FMERR_UNEXPECTED_EXPRESSION, ws_TempString.c_str());
NextToken();
} else {
pAccessors = FX_NEW CFX_PtrArray();
diff --git a/xfa/src/fxfa/src/fm2js/xfa_fmparse.h b/xfa/src/fxfa/src/fm2js/xfa_fmparse.h
index 496a3dfa6e..e610ab56ef 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_fmparse.h
+++ b/xfa/src/fxfa/src/fm2js/xfa_fmparse.h
@@ -40,7 +40,7 @@ public:
CXFA_FMSimpleExpression *ParsePostExpression(CXFA_FMSimpleExpression *e);
CXFA_FMSimpleExpression *ParseIndexExpression();
private:
- FX_LPCWSTR m_pScript;
+ const FX_WCHAR* m_pScript;
FX_STRSIZE m_uLength;
CXFA_FMLexer *m_lexer;
CXFA_FMToken *m_pToken;
diff --git a/xfa/src/fxfa/src/fm2js/xfa_lexer.cpp b/xfa/src/fxfa/src/fm2js/xfa_lexer.cpp
index 7ce3355861..4c24f78b1d 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_lexer.cpp
+++ b/xfa/src/fxfa/src/fm2js/xfa_lexer.cpp
@@ -6,53 +6,53 @@
#include "xfa_fm2js.h"
struct XFA_FMDChar {
- static FX_LPCWSTR inc(FX_LPCWSTR &p)
+ static const FX_WCHAR* inc(const FX_WCHAR* &p)
{
++p;
return p;
}
- static FX_LPCWSTR dec(FX_LPCWSTR &p)
+ static const FX_WCHAR* dec(const FX_WCHAR* &p)
{
--p;
return p;
}
- static uint16_t get(FX_LPCWSTR p)
+ static uint16_t get(const FX_WCHAR* p)
{
return *p;
}
- static FX_BOOL isWhiteSpace(FX_LPCWSTR p)
+ static FX_BOOL isWhiteSpace(const FX_WCHAR* p)
{
return (*p) == 0x09 || (*p) == 0x0b || (*p) == 0x0c || (*p) == 0x20;
}
- static FX_BOOL isLineTerminator(FX_LPCWSTR p)
+ static FX_BOOL isLineTerminator(const FX_WCHAR* p)
{
return *p == 0x0A || *p == 0x0D;
}
- static FX_BOOL isBinary(FX_LPCWSTR p)
+ static FX_BOOL isBinary(const FX_WCHAR* p)
{
return (*p) >= '0' && (*p) <= '1';
}
- static FX_BOOL isOctal(FX_LPCWSTR p)
+ static FX_BOOL isOctal(const FX_WCHAR* p)
{
return (*p) >= '0' && (*p) <= '7';
}
- static FX_BOOL isDigital(FX_LPCWSTR p)
+ static FX_BOOL isDigital(const FX_WCHAR* p)
{
return (*p) >= '0' && (*p) <= '9';
}
- static FX_BOOL isHex(FX_LPCWSTR p)
+ static FX_BOOL isHex(const FX_WCHAR* p)
{
return isDigital(p) || ((*p) >= 'a' && (*p) <= 'f') || ((*p) >= 'A' && (*p) <= 'F');
}
- static FX_BOOL isAlpha(FX_LPCWSTR p)
+ static FX_BOOL isAlpha(const FX_WCHAR* p)
{
return ((*p) <= 'z' && (*p) >= 'a') || ((*p) <= 'Z' && (*p) >= 'A');
}
- static FX_BOOL isAvalid(FX_LPCWSTR p, FX_BOOL flag = 0);
- static FX_BOOL string2number(FX_LPCWSTR s, FX_DOUBLE *pValue, FX_LPCWSTR &pEnd);
+ static FX_BOOL isAvalid(const FX_WCHAR* p, FX_BOOL flag = 0);
+ static FX_BOOL string2number(const FX_WCHAR* s, FX_DOUBLE *pValue, const FX_WCHAR* &pEnd);
static FX_BOOL isUnicodeAlpha(uint16_t ch);
};
-inline FX_BOOL XFA_FMDChar::isAvalid(FX_LPCWSTR p, FX_BOOL flag)
+inline FX_BOOL XFA_FMDChar::isAvalid(const FX_WCHAR* p, FX_BOOL flag)
{
if (*p == 0) {
return 1;
@@ -67,7 +67,7 @@ inline FX_BOOL XFA_FMDChar::isAvalid(FX_LPCWSTR p, FX_BOOL flag)
}
return 0;
}
-inline FX_BOOL XFA_FMDChar::string2number(FX_LPCWSTR s, FX_DOUBLE *pValue, FX_LPCWSTR &pEnd)
+inline FX_BOOL XFA_FMDChar::string2number(const FX_WCHAR* s, FX_DOUBLE *pValue, const FX_WCHAR* &pEnd)
{
if (s) {
*pValue = wcstod((wchar_t *)s, (wchar_t **)&pEnd);
@@ -147,7 +147,7 @@ static XFA_FMKeyword keyWords[] = {
};
static const FX_WORD KEYWORD_START = TOKdo;
static const FX_WORD KEYWORD_END = TOKendif;
-FX_LPCWSTR XFA_FM_KeywordToString(XFA_FM_TOKEN op)
+const FX_WCHAR* XFA_FM_KeywordToString(XFA_FM_TOKEN op)
{
return keyWords[op].m_keword;
}
@@ -223,13 +223,13 @@ CXFA_FMToken * CXFA_FMLexer::Scan()
XFA_FMDChar::inc(m_ptr);
break;
case ';': {
- FX_LPCWSTR pTemp = 0;
+ const FX_WCHAR* pTemp = 0;
Comment(m_ptr, pTemp);
m_ptr = pTemp;
}
break;
case '"': {
- FX_LPCWSTR pTemp = 0;
+ const FX_WCHAR* pTemp = 0;
p->m_type = TOKstring;
iRet = String(p, m_ptr, pTemp);
if (iRet) {
@@ -249,7 +249,7 @@ CXFA_FMToken * CXFA_FMLexer::Scan()
case '8':
case '9': {
p->m_type = TOKnumber;
- FX_LPCWSTR pTemp = 0;
+ const FX_WCHAR* pTemp = 0;
iRet = Number(p, m_ptr, pTemp);
m_ptr = pTemp;
if (iRet) {
@@ -361,7 +361,7 @@ CXFA_FMToken * CXFA_FMLexer::Scan()
if (XFA_FMDChar::isAvalid(m_ptr)) {
ch = XFA_FMDChar::get(m_ptr);
if (ch == '/') {
- FX_LPCWSTR pTemp = 0;
+ const FX_WCHAR* pTemp = 0;
Comment(m_ptr, pTemp);
m_ptr = pTemp;
break;
@@ -393,7 +393,7 @@ CXFA_FMToken * CXFA_FMLexer::Scan()
return p;
} else if (ch <= '9' && ch >= '0') {
p->m_type = TOKnumber;
- FX_LPCWSTR pTemp = 0;
+ const FX_WCHAR* pTemp = 0;
XFA_FMDChar::dec(m_ptr);
iRet = Number(p, m_ptr, pTemp);
m_ptr = pTemp;
@@ -417,7 +417,7 @@ CXFA_FMToken * CXFA_FMLexer::Scan()
XFA_FMDChar::inc(m_ptr);
break;
default: {
- FX_LPCWSTR pTemp = 0;
+ const FX_WCHAR* pTemp = 0;
iRet = Identifiers(p, m_ptr, pTemp);
m_ptr = pTemp;
if (iRet) {
@@ -429,7 +429,7 @@ CXFA_FMToken * CXFA_FMLexer::Scan()
}
}
}
-FX_DWORD CXFA_FMLexer::Number(CXFA_FMToken *t, FX_LPCWSTR p, FX_LPCWSTR &pEnd)
+FX_DWORD CXFA_FMLexer::Number(CXFA_FMToken *t, const FX_WCHAR* p, const FX_WCHAR* &pEnd)
{
FX_DOUBLE number = 0;
if (XFA_FMDChar::string2number(p, &number, pEnd)) {
@@ -441,9 +441,9 @@ FX_DWORD CXFA_FMLexer::Number(CXFA_FMToken *t, FX_LPCWSTR p, FX_LPCWSTR &pEnd)
t->m_wstring = CFX_WideStringC(p, (pEnd - p));
return 0;
}
-FX_DWORD CXFA_FMLexer::String(CXFA_FMToken *t, FX_LPCWSTR p, FX_LPCWSTR &pEnd)
+FX_DWORD CXFA_FMLexer::String(CXFA_FMToken *t, const FX_WCHAR* p, const FX_WCHAR* &pEnd)
{
- FX_LPCWSTR pStart = p;
+ const FX_WCHAR* pStart = p;
uint16_t ch = 0;
XFA_FMDChar::inc(p);
ch = XFA_FMDChar::get(p);
@@ -479,9 +479,9 @@ NEXT:
t->m_wstring = CFX_WideStringC(pStart, (pEnd - pStart));
return 0;
}
-FX_DWORD CXFA_FMLexer::Identifiers(CXFA_FMToken *t, FX_LPCWSTR p, FX_LPCWSTR &pEnd)
+FX_DWORD CXFA_FMLexer::Identifiers(CXFA_FMToken *t, const FX_WCHAR* p, const FX_WCHAR* &pEnd)
{
- FX_LPCWSTR pStart = p;
+ const FX_WCHAR* pStart = p;
uint16_t ch = 0;
ch = XFA_FMDChar::get(p);
XFA_FMDChar::inc(p);
@@ -512,7 +512,7 @@ FX_DWORD CXFA_FMLexer::Identifiers(CXFA_FMToken *t, FX_LPCWSTR p, FX_LPCWSTR &pE
t->m_wstring = CFX_WideStringC(pStart, (pEnd - pStart));
return 0;
}
-void CXFA_FMLexer::Comment( FX_LPCWSTR p, FX_LPCWSTR &pEnd )
+void CXFA_FMLexer::Comment( const FX_WCHAR* p, const FX_WCHAR* &pEnd )
{
unsigned ch = 0;
XFA_FMDChar::inc(p);
@@ -574,7 +574,7 @@ CXFA_FMLexer::~CXFA_FMLexer()
void CXFA_FMLexer::Error(XFA_FM_ERRMSG msg, ...)
{
m_pErrorInfo->linenum = m_uCurrentLine;
- FX_LPCWSTR lpMessageInfo = XFA_FM_ErrorMsg(msg);
+ const FX_WCHAR* lpMessageInfo = XFA_FM_ErrorMsg(msg);
va_list ap;
va_start(ap, msg);
m_pErrorInfo->message.FormatV(lpMessageInfo, ap);
diff --git a/xfa/src/fxfa/src/fm2js/xfa_lexer.h b/xfa/src/fxfa/src/fm2js/xfa_lexer.h
index 709307046b..2850ce5f75 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_lexer.h
+++ b/xfa/src/fxfa/src/fm2js/xfa_lexer.h
@@ -24,9 +24,9 @@ enum XFA_FM_TOKEN {
struct XFA_FMKeyword {
XFA_FM_TOKEN m_type;
uint32_t m_uHash;
- FX_LPCWSTR m_keword;
+ const FX_WCHAR* m_keword;
};
-FX_LPCWSTR XFA_FM_KeywordToString(XFA_FM_TOKEN op);
+const FX_WCHAR* XFA_FM_KeywordToString(XFA_FM_TOKEN op);
class CXFA_FMToken
{
public:
@@ -44,10 +44,10 @@ public:
CXFA_FMLexer(FX_WSTR wsFormcalc, CXFA_FMErrorInfo *pErrorInfo);
~CXFA_FMLexer();
CXFA_FMToken* NextToken();
- FX_DWORD Number(CXFA_FMToken *t, FX_LPCWSTR p, FX_LPCWSTR &pEnd);
- FX_DWORD String(CXFA_FMToken *t, FX_LPCWSTR p, FX_LPCWSTR &pEnd);
- FX_DWORD Identifiers(CXFA_FMToken *t, FX_LPCWSTR p, FX_LPCWSTR &pEnd);
- void Comment(FX_LPCWSTR p, FX_LPCWSTR &pEnd);
+ FX_DWORD Number(CXFA_FMToken *t, const FX_WCHAR* p, const FX_WCHAR* &pEnd);
+ FX_DWORD String(CXFA_FMToken *t, const FX_WCHAR* p, const FX_WCHAR* &pEnd);
+ FX_DWORD Identifiers(CXFA_FMToken *t, const FX_WCHAR* p, const FX_WCHAR* &pEnd);
+ void Comment(const FX_WCHAR* p, const FX_WCHAR* &pEnd);
XFA_FM_TOKEN IsKeyword(FX_WSTR p);
void SetCurrentLine(FX_DWORD line)
{
@@ -60,11 +60,11 @@ public:
}
m_pToken = pToken;
}
- FX_LPCWSTR SavePos()
+ const FX_WCHAR* SavePos()
{
return m_ptr;
}
- void RestorePos(FX_LPCWSTR pPos)
+ void RestorePos(const FX_WCHAR* pPos)
{
m_ptr = pPos;
}
@@ -72,8 +72,8 @@ public:
FX_BOOL HasError() const;
protected:
CXFA_FMToken* Scan();
- FX_LPCWSTR m_pScript;
- FX_LPCWSTR m_ptr;
+ const FX_WCHAR* m_pScript;
+ const FX_WCHAR* m_ptr;
FX_STRSIZE m_uLength;
FX_DWORD m_uCurrentLine;
CXFA_FMToken* m_pToken;
diff --git a/xfa/src/fxfa/src/fm2js/xfa_simpleexpression.h b/xfa/src/fxfa/src/fm2js/xfa_simpleexpression.h
index 7d9f9d5f79..bacd1d3c38 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_simpleexpression.h
+++ b/xfa/src/fxfa/src/fm2js/xfa_simpleexpression.h
@@ -36,11 +36,11 @@ enum XFA_FM_SimpleExpressionType {
CFX_WideStringC XFA_FM_EXPTypeToString(XFA_FM_SimpleExpressionType simpleExpType);
struct XFA_FMBuildInFunc {
uint32_t m_uHash;
- FX_LPCWSTR m_buildinfunc;
+ const FX_WCHAR* m_buildinfunc;
};
struct XFA_FMSOMMethod {
uint32_t m_uHash;
- FX_LPCWSTR m_wsSomMethodName;
+ const FX_WCHAR* m_wsSomMethodName;
FX_DWORD m_dParameters;
};
enum XFA_FM_AccessorIndex {
diff --git a/xfa/src/fxfa/src/parser/xfa_basic_data.cpp b/xfa/src/fxfa/src/parser/xfa_basic_data.cpp
index c061b80a34..a53041e26d 100644
--- a/xfa/src/fxfa/src/parser/xfa_basic_data.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_basic_data.cpp
@@ -304,300 +304,300 @@ static const CXFA_Measurement g_XFAMeasurementData[] = {
CXFA_Measurement(0.5, XFA_UNIT_Pt),
};
extern const XFA_ATTRIBUTEINFO g_XFAAttributeData[] = {
- {0x68, L"h", XFA_ATTRIBUTE_H, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 0)},
- {0x77, L"w", XFA_ATTRIBUTE_W, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 0)},
- {0x78, L"x", XFA_ATTRIBUTE_X, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Config | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 0)},
- {0x79, L"y", XFA_ATTRIBUTE_Y, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Config | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 0)},
- {0x21aed, L"id", XFA_ATTRIBUTE_Id, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Template | XFA_XDPPACKET_ConnectionSet | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x25363, L"to", XFA_ATTRIBUTE_To, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Config, (FX_LPVOID)NULL},
- {0xcb0ac9, L"lineThrough", XFA_ATTRIBUTE_LineThrough, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)0},
- {0x2282c73, L"hAlign", XFA_ATTRIBUTE_HAlign, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Left},
- {0x2c1c7f1, L"typeface", XFA_ATTRIBUTE_Typeface, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Config | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)L"Courier"},
- {0x3106c3a, L"beforeTarget", XFA_ATTRIBUTE_BeforeTarget, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x31b19c1, L"name", XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_NOTSURE, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Config | XFA_XDPPACKET_LocaleSet | XFA_XDPPACKET_Template | XFA_XDPPACKET_Datasets | XFA_XDPPACKET_Form | XFA_XDPPACKET_ConnectionSet | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x3848b3f, L"next", XFA_ATTRIBUTE_Next, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_None},
- {0x43e349b, L"dataRowCount", XFA_ATTRIBUTE_DataRowCount, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x5518c25, L"break", XFA_ATTRIBUTE_Break, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Close},
- {0x5ce6195, L"vScrollPolicy", XFA_ATTRIBUTE_VScrollPolicy, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Auto},
- {0x8c74ae9, L"fontHorizontalScale", XFA_ATTRIBUTE_FontHorizontalScale, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)L"100%"},
- {0x8d4f1c7, L"textIndent", XFA_ATTRIBUTE_TextIndent, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 0)},
- {0x97c1c65, L"context", XFA_ATTRIBUTE_Context, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_UNKNOWN, (FX_LPVOID)0},
- {0x9876578, L"trayOut", XFA_ATTRIBUTE_TrayOut, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Auto},
- {0xa2e3514, L"cap", XFA_ATTRIBUTE_Cap, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Square},
- {0xb3543a6, L"max", XFA_ATTRIBUTE_Max, XFA_ATTRIBUTETYPE_NOTSURE, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xb356ca4, L"min", XFA_ATTRIBUTE_Min, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)1},
- {0xbb8df5d, L"ref", XFA_ATTRIBUTE_Ref, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Config | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xbb8f3df, L"rid", XFA_ATTRIBUTE_Rid, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xc080cd3, L"url", XFA_ATTRIBUTE_Url, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xc0811ed, L"use", XFA_ATTRIBUTE_Use, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Template | XFA_XDPPACKET_ConnectionSet | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xcfea02e, L"leftInset", XFA_ATTRIBUTE_LeftInset, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 0)},
- {0x1026c59d, L"widows", XFA_ATTRIBUTE_Widows, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)0},
- {0x1059ec18, L"level", XFA_ATTRIBUTE_Level, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Config, (FX_LPVOID)0},
- {0x1356caf8, L"bottomInset", XFA_ATTRIBUTE_BottomInset, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 0)},
- {0x13a08bdb, L"overflowTarget", XFA_ATTRIBUTE_OverflowTarget, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x1414d431, L"allowMacro", XFA_ATTRIBUTE_AllowMacro, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)0},
- {0x14a32d52, L"pagePosition", XFA_ATTRIBUTE_PagePosition, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Any},
- {0x1517dfa1, L"columnWidths", XFA_ATTRIBUTE_ColumnWidths, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x169134a1, L"overflowLeader", XFA_ATTRIBUTE_OverflowLeader, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x1b8dce3e, L"action", XFA_ATTRIBUTE_Action, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Include},
- {0x1e459b8f, L"nonRepudiation", XFA_ATTRIBUTE_NonRepudiation, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x1ec8ab2c, L"rate", XFA_ATTRIBUTE_Rate, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)50},
- {0x1ef3a64a, L"allowRichText", XFA_ATTRIBUTE_AllowRichText, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)0},
- {0x2038c9b2, L"role", XFA_ATTRIBUTE_Role, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x20914367, L"overflowTrailer", XFA_ATTRIBUTE_OverflowTrailer, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x226ca8f1, L"operation", XFA_ATTRIBUTE_Operation, XFA_ATTRIBUTETYPE_NOTSURE, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x24d85167, L"timeout", XFA_ATTRIBUTE_Timeout, XFA_ATTRIBUTETYPE_NOTSURE, XFA_XDPPACKET_SourceSet, (FX_LPVOID)NULL},
- {0x25764436, L"topInset", XFA_ATTRIBUTE_TopInset, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 0)},
- {0x25839852, L"access", XFA_ATTRIBUTE_Access, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Open},
- {0x268b7ec1, L"commandType", XFA_ATTRIBUTE_CommandType, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_SourceSet, (FX_LPVOID)XFA_ATTRIBUTEENUM_Unknown},
- {0x28dee6e9, L"format", XFA_ATTRIBUTE_Format, XFA_ATTRIBUTETYPE_NOTSURE, XFA_XDPPACKET_Config | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x28e17e91, L"dataPrep", XFA_ATTRIBUTE_DataPrep, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_None},
- {0x292b88fe, L"widgetData", XFA_ATTRIBUTE_WidgetData, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_UNKNOWN, (FX_LPVOID)0},
- {0x29418bb7, L"abbr", XFA_ATTRIBUTE_Abbr, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_LocaleSet, (FX_LPVOID)0},
- {0x2a82d99c, L"marginRight", XFA_ATTRIBUTE_MarginRight, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 0)},
- {0x2b5df51e, L"dataDescription", XFA_ATTRIBUTE_DataDescription, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_ConnectionSet, (FX_LPVOID)NULL},
- {0x2bb3f470, L"encipherOnly", XFA_ATTRIBUTE_EncipherOnly, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x2cd79033, L"kerningMode", XFA_ATTRIBUTE_KerningMode, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_None},
- {0x2ee7678f, L"rotate", XFA_ATTRIBUTE_Rotate, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 5)},
- {0x2f105f72, L"wordCharacterCount", XFA_ATTRIBUTE_WordCharacterCount, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)7},
- {0x2f16a382, L"type", XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_NOTSURE, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x34ae103c, L"reserve", XFA_ATTRIBUTE_Reserve, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 4)},
- {0x3650557e, L"textLocation", XFA_ATTRIBUTE_TextLocation, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Below},
- {0x39cdb0a2, L"priority", XFA_ATTRIBUTE_Priority, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Custom},
- {0x3a0273a6, L"underline", XFA_ATTRIBUTE_Underline, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)0},
- {0x3b582286, L"moduleWidth", XFA_ATTRIBUTE_ModuleWidth, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 3)},
- {0x3d123c26, L"hyphenate", XFA_ATTRIBUTE_Hyphenate, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)0},
- {0x3e7af94f, L"listen", XFA_ATTRIBUTE_Listen, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_RefOnly},
- {0x4156ee3f, L"delimiter", XFA_ATTRIBUTE_Delimiter, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x42fed1fd, L"contentType", XFA_ATTRIBUTE_ContentType, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Template | XFA_XDPPACKET_Datasets | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x453eaf38, L"startNew", XFA_ATTRIBUTE_StartNew, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)0},
- {0x45a6daf8, L"eofAction", XFA_ATTRIBUTE_EofAction, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_SourceSet, (FX_LPVOID)XFA_ATTRIBUTEENUM_MoveLast},
- {0x47cfa43a, L"allowNeutral", XFA_ATTRIBUTE_AllowNeutral, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)0},
- {0x47d03490, L"connection", XFA_ATTRIBUTE_Connection, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x4873c601, L"baselineShift", XFA_ATTRIBUTE_BaselineShift, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 0)},
- {0x4b319767, L"overlinePeriod", XFA_ATTRIBUTE_OverlinePeriod, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_All},
- {0x4b8bc840, L"fracDigits", XFA_ATTRIBUTE_FracDigits, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)2},
- {0x4ef3d02c, L"orientation", XFA_ATTRIBUTE_Orientation, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Portrait},
- {0x4fdc3454, L"timeStamp", XFA_ATTRIBUTE_TimeStamp, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_XDP, (FX_LPVOID)NULL},
- {0x52666f1c, L"printCheckDigit", XFA_ATTRIBUTE_PrintCheckDigit, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)0},
- {0x534729c9, L"marginLeft", XFA_ATTRIBUTE_MarginLeft, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 0)},
- {0x5392ea58, L"stroke", XFA_ATTRIBUTE_Stroke, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Solid},
- {0x5404d6df, L"moduleHeight", XFA_ATTRIBUTE_ModuleHeight, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 2)},
- {0x54fa722c, L"transferEncoding", XFA_ATTRIBUTE_TransferEncoding, XFA_ATTRIBUTETYPE_NOTSURE, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x552d9ad5, L"usage", XFA_ATTRIBUTE_Usage, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_ExportAndImport},
- {0x570ce835, L"presence", XFA_ATTRIBUTE_Presence, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Visible},
- {0x5739d1ff, L"radixOffset", XFA_ATTRIBUTE_RadixOffset, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 0)},
- {0x577682ac, L"preserve", XFA_ATTRIBUTE_Preserve, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x58be2870, L"aliasNode", XFA_ATTRIBUTE_AliasNode, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_UNKNOWN, (FX_LPVOID)0},
- {0x5a32e493, L"multiLine", XFA_ATTRIBUTE_MultiLine, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)0},
- {0x5a50e9e6, L"version", XFA_ATTRIBUTE_Version, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x5ab23b6c, L"startChar", XFA_ATTRIBUTE_StartChar, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x5b707a35, L"scriptTest", XFA_ATTRIBUTE_ScriptTest, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Error},
- {0x5c054755, L"startAngle", XFA_ATTRIBUTE_StartAngle, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 5)},
- {0x5ec958c0, L"cursorType", XFA_ATTRIBUTE_CursorType, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_SourceSet, (FX_LPVOID)XFA_ATTRIBUTEENUM_ForwardOnly},
- {0x5f760b50, L"digitalSignature", XFA_ATTRIBUTE_DigitalSignature, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x60a61edd, L"codeType", XFA_ATTRIBUTE_CodeType, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x60d4c8b1, L"output", XFA_ATTRIBUTE_Output, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_ConnectionSet, (FX_LPVOID)NULL},
- {0x64110ab5, L"bookendTrailer", XFA_ATTRIBUTE_BookendTrailer, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x65e30c67, L"imagingBBox", XFA_ATTRIBUTE_ImagingBBox, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)L"none"},
- {0x66539c48, L"excludeInitialCap", XFA_ATTRIBUTE_ExcludeInitialCap, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)0},
- {0x66642f8f, L"force", XFA_ATTRIBUTE_Force, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Config, (FX_LPVOID)NULL},
- {0x69aa2292, L"crlSign", XFA_ATTRIBUTE_CrlSign, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x6a3405dd, L"previous", XFA_ATTRIBUTE_Previous, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_None},
- {0x6a95c976, L"pushCharacterCount", XFA_ATTRIBUTE_PushCharacterCount, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)3},
- {0x6b6ddcfb, L"nullTest", XFA_ATTRIBUTE_NullTest, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Disabled},
- {0x6cfa828a, L"runAt", XFA_ATTRIBUTE_RunAt, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Client},
- {0x731e0665, L"spaceBelow", XFA_ATTRIBUTE_SpaceBelow, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 0)},
- {0x74788f8b, L"sweepAngle", XFA_ATTRIBUTE_SweepAngle, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 7)},
- {0x78bff531, L"numberOfCells", XFA_ATTRIBUTE_NumberOfCells, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)0},
- {0x79543055, L"letterSpacing", XFA_ATTRIBUTE_LetterSpacing, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x79975f2b, L"lockType", XFA_ATTRIBUTE_LockType, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_SourceSet, (FX_LPVOID)XFA_ATTRIBUTEENUM_ReadOnly},
- {0x7a0cc471, L"passwordChar", XFA_ATTRIBUTE_PasswordChar, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)L"*"},
- {0x7a7cc341, L"vAlign", XFA_ATTRIBUTE_VAlign, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Top},
- {0x7b29630a, L"sourceBelow", XFA_ATTRIBUTE_SourceBelow, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Config, (FX_LPVOID)XFA_ATTRIBUTEENUM_Update},
- {0x7b95e661, L"inverted", XFA_ATTRIBUTE_Inverted, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)0},
- {0x7c2fd80b, L"mark", XFA_ATTRIBUTE_Mark, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Default},
- {0x7c2ff6ae, L"maxH", XFA_ATTRIBUTE_MaxH, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 0)},
- {0x7c2ff6bd, L"maxW", XFA_ATTRIBUTE_MaxW, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 0)},
- {0x7c732a66, L"truncate", XFA_ATTRIBUTE_Truncate, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)0},
- {0x7d02356c, L"minH", XFA_ATTRIBUTE_MinH, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 0)},
- {0x7d02357b, L"minW", XFA_ATTRIBUTE_MinW, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 0)},
- {0x7d0b5fca, L"initial", XFA_ATTRIBUTE_Initial, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)1},
- {0x7d9fd7c5, L"mode", XFA_ATTRIBUTE_Mode, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Config, (FX_LPVOID)XFA_ATTRIBUTEENUM_UsePrinterSetting},
- {0x7e7e845e, L"layout", XFA_ATTRIBUTE_Layout, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Position},
- {0x7f6fd3d7, L"server", XFA_ATTRIBUTE_Server, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x824f21b7, L"embedPDF", XFA_ATTRIBUTE_EmbedPDF, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)0},
- {0x8340ea66, L"oddOrEven", XFA_ATTRIBUTE_OddOrEven, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Any},
- {0x836d4d7c, L"tabDefault", XFA_ATTRIBUTE_TabDefault, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x8855805f, L"contains", XFA_ATTRIBUTE_Contains, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Datasets, (FX_LPVOID)XFA_ATTRIBUTEENUM_Data},
- {0x8a692521, L"rightInset", XFA_ATTRIBUTE_RightInset, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 0)},
- {0x8af2e657, L"maxChars", XFA_ATTRIBUTE_MaxChars, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)0},
- {0x8b90e1f2, L"open", XFA_ATTRIBUTE_Open, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_UserControl},
- {0x8c99377e, L"relation", XFA_ATTRIBUTE_Relation, XFA_ATTRIBUTETYPE_NOTSURE, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x8d181d61, L"wideNarrowRatio", XFA_ATTRIBUTE_WideNarrowRatio, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)L"3:1"},
- {0x8e1c2921, L"relevant", XFA_ATTRIBUTE_Relevant, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x8e29d794, L"signatureType", XFA_ATTRIBUTE_SignatureType, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Filter},
- {0x8ec6204c, L"lineThroughPeriod", XFA_ATTRIBUTE_LineThroughPeriod, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_All},
- {0x8ed182d1, L"shape", XFA_ATTRIBUTE_Shape, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Square},
- {0x8fa01790, L"tabStops", XFA_ATTRIBUTE_TabStops, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x8fc36c0a, L"outputBelow", XFA_ATTRIBUTE_OutputBelow, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Config, (FX_LPVOID)XFA_ATTRIBUTEENUM_Warn},
- {0x9041d4b0, L"short", XFA_ATTRIBUTE_Short, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 0)},
- {0x907c7719, L"fontVerticalScale", XFA_ATTRIBUTE_FontVerticalScale, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)L"100%"},
- {0x94446dcc, L"thickness", XFA_ATTRIBUTE_Thickness, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 8)},
- {0x957fa006, L"commitOn", XFA_ATTRIBUTE_CommitOn, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Select},
- {0x982bd892, L"remainCharacterCount", XFA_ATTRIBUTE_RemainCharacterCount, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)3},
- {0x98fd4d81, L"keyAgreement", XFA_ATTRIBUTE_KeyAgreement, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x99800d7a, L"errorCorrectionLevel", XFA_ATTRIBUTE_ErrorCorrectionLevel, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0x9a63da3d, L"upsMode", XFA_ATTRIBUTE_UpsMode, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_UsCarrier},
- {0x9cc17d75, L"mergeMode", XFA_ATTRIBUTE_MergeMode, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_ConsumeData},
- {0x9d833d75, L"circular", XFA_ATTRIBUTE_Circular, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)0},
- {0x9d8ee204, L"psName", XFA_ATTRIBUTE_PsName, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Config, (FX_LPVOID)NULL},
- {0x9dcc3ab3, L"trailer", XFA_ATTRIBUTE_Trailer, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xa0933954, L"unicodeRange", XFA_ATTRIBUTE_UnicodeRange, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Config, (FX_LPVOID)NULL},
- {0xa1b0d2f5, L"executeType", XFA_ATTRIBUTE_ExecuteType, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Import},
- {0xa25a883d, L"duplexImposition", XFA_ATTRIBUTE_DuplexImposition, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_LongEdge},
- {0xa42ca1b7, L"trayIn", XFA_ATTRIBUTE_TrayIn, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Auto},
- {0xa433f001, L"bindingNode", XFA_ATTRIBUTE_BindingNode, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_UNKNOWN, (FX_LPVOID)0},
- {0xa5340ff5, L"bofAction", XFA_ATTRIBUTE_BofAction, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_SourceSet, (FX_LPVOID)XFA_ATTRIBUTEENUM_MoveFirst},
- {0xa5b410cf, L"save", XFA_ATTRIBUTE_Save, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)0},
- {0xa6118c89, L"targetType", XFA_ATTRIBUTE_TargetType, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Auto},
- {0xa66404cb, L"keyEncipherment", XFA_ATTRIBUTE_KeyEncipherment, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xa6710262, L"credentialServerPolicy", XFA_ATTRIBUTE_CredentialServerPolicy, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Optional},
- {0xa686975b, L"size", XFA_ATTRIBUTE_Size, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 6)},
- {0xa85e74f3, L"initialNumber", XFA_ATTRIBUTE_InitialNumber, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)1},
- {0xabef37e3, L"slope", XFA_ATTRIBUTE_Slope, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Backslash},
- {0xabfa6c4f, L"cSpace", XFA_ATTRIBUTE_CSpace, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)L"SRGB"},
- {0xac06e2b0, L"colSpan", XFA_ATTRIBUTE_ColSpan, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)1},
- {0xadc4c77b, L"binding", XFA_ATTRIBUTE_Binding, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xaf754613, L"checksum", XFA_ATTRIBUTE_Checksum, XFA_ATTRIBUTETYPE_NOTSURE, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xb045fbc5, L"charEncoding", XFA_ATTRIBUTE_CharEncoding, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)L"UTF-8"},
- {0xb0e5485d, L"bind", XFA_ATTRIBUTE_Bind, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_SourceSet, (FX_LPVOID)NULL},
- {0xb12128b7, L"textEntry", XFA_ATTRIBUTE_TextEntry, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)0},
- {0xb373a862, L"archive", XFA_ATTRIBUTE_Archive, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xb598a1f7, L"uuid", XFA_ATTRIBUTE_Uuid, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_XDP, (FX_LPVOID)NULL},
- {0xb5e49bf2, L"posture", XFA_ATTRIBUTE_Posture, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Config | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Normal},
- {0xb6b44172, L"after", XFA_ATTRIBUTE_After, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Auto},
- {0xb716467b, L"orphans", XFA_ATTRIBUTE_Orphans, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)0},
- {0xbc0c4695, L"qualifiedName", XFA_ATTRIBUTE_QualifiedName, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_UNKNOWN, (FX_LPVOID)NULL},
- {0xbc254332, L"usehref", XFA_ATTRIBUTE_Usehref, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Template | XFA_XDPPACKET_ConnectionSet | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xbc8fa350, L"locale", XFA_ATTRIBUTE_Locale, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xbd6e1d88, L"weight", XFA_ATTRIBUTE_Weight, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Config | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Normal},
- {0xbd96a0e9, L"underlinePeriod", XFA_ATTRIBUTE_UnderlinePeriod, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_All},
- {0xbde9abda, L"data", XFA_ATTRIBUTE_Data, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Link},
- {0xbe52dfbf, L"desc", XFA_ATTRIBUTE_Desc, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Config | XFA_XDPPACKET_LocaleSet, (FX_LPVOID)NULL},
- {0xbe9ba472, L"numbered", XFA_ATTRIBUTE_Numbered, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)1},
- {0xc035c6b1, L"dataColumnCount", XFA_ATTRIBUTE_DataColumnCount, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xc0ec9fa4, L"overline", XFA_ATTRIBUTE_Overline, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)0},
- {0xc2ba0923, L"urlPolicy", XFA_ATTRIBUTE_UrlPolicy, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xc2bd40fd, L"anchorType", XFA_ATTRIBUTE_AnchorType, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_TopLeft},
- {0xc39a88bd, L"labelRef", XFA_ATTRIBUTE_LabelRef, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xc3c1442f, L"bookendLeader", XFA_ATTRIBUTE_BookendLeader, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xc4547a08, L"maxLength", XFA_ATTRIBUTE_MaxLength, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID) - 1},
- {0xc4fed09b, L"accessKey", XFA_ATTRIBUTE_AccessKey, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xc5762157, L"cursorLocation", XFA_ATTRIBUTE_CursorLocation, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_SourceSet, (FX_LPVOID)XFA_ATTRIBUTEENUM_Client},
- {0xc860f30a, L"delayedOpen", XFA_ATTRIBUTE_DelayedOpen, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_SourceSet, (FX_LPVOID)NULL},
- {0xc8da4da7, L"target", XFA_ATTRIBUTE_Target, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xca5dc27c, L"dataEncipherment", XFA_ATTRIBUTE_DataEncipherment, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xcb150479, L"afterTarget", XFA_ATTRIBUTE_AfterTarget, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xcbcaf66d, L"leader", XFA_ATTRIBUTE_Leader, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xcca7897e, L"picker", XFA_ATTRIBUTE_Picker, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Host},
- {0xcd7f7b54, L"from", XFA_ATTRIBUTE_From, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Config, (FX_LPVOID)NULL},
- {0xcea5e62c, L"baseProfile", XFA_ATTRIBUTE_BaseProfile, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Full},
- {0xd171b240, L"aspect", XFA_ATTRIBUTE_Aspect, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Fit},
- {0xd3c84d25, L"rowColumnRatio", XFA_ATTRIBUTE_RowColumnRatio, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xd4b01921, L"lineHeight", XFA_ATTRIBUTE_LineHeight, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 1)},
- {0xd4cc53f8, L"highlight", XFA_ATTRIBUTE_Highlight, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Inverted},
- {0xd50f903a, L"valueRef", XFA_ATTRIBUTE_ValueRef, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xd52482e0, L"maxEntries", XFA_ATTRIBUTE_MaxEntries, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Config, (FX_LPVOID)5},
- {0xd57c513c, L"dataLength", XFA_ATTRIBUTE_DataLength, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xd6128d8d, L"activity", XFA_ATTRIBUTE_Activity, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Click},
- {0xd6a39990, L"input", XFA_ATTRIBUTE_Input, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_ConnectionSet, (FX_LPVOID)NULL},
- {0xd6e27f1d, L"value", XFA_ATTRIBUTE_Value, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Config | XFA_XDPPACKET_LocaleSet | XFA_XDPPACKET_Template | XFA_XDPPACKET_Datasets | XFA_XDPPACKET_ConnectionSet | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xd70798c2, L"blankOrNotBlank", XFA_ATTRIBUTE_BlankOrNotBlank, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Any},
- {0xd861f8af, L"addRevocationInfo", XFA_ATTRIBUTE_AddRevocationInfo, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xd8f982bf, L"genericFamily", XFA_ATTRIBUTE_GenericFamily, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Config, (FX_LPVOID)XFA_ATTRIBUTEENUM_Serif},
- {0xd996fa9b, L"hand", XFA_ATTRIBUTE_Hand, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Even},
- {0xdb55fec5, L"href", XFA_ATTRIBUTE_Href, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xdc75676c, L"textEncoding", XFA_ATTRIBUTE_TextEncoding, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xde7f92ba, L"leadDigits", XFA_ATTRIBUTE_LeadDigits, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID) - 1},
- {0xe11a2cbc, L"permissions", XFA_ATTRIBUTE_Permissions, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)2},
- {0xe18b5659, L"spaceAbove", XFA_ATTRIBUTE_SpaceAbove, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 0)},
- {0xe1a26b56, L"codeBase", XFA_ATTRIBUTE_CodeBase, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xe349d044, L"stock", XFA_ATTRIBUTE_Stock, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xe372ae97, L"isNull", XFA_ATTRIBUTE_IsNull, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Datasets, (FX_LPVOID)0},
- {0xe4c3a5e5, L"restoreState", XFA_ATTRIBUTE_RestoreState, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Manual},
- {0xe5c96d6a, L"excludeAllCaps", XFA_ATTRIBUTE_ExcludeAllCaps, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)0},
- {0xe64b1129, L"formatTest", XFA_ATTRIBUTE_FormatTest, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Warning},
- {0xe6f99487, L"hScrollPolicy", XFA_ATTRIBUTE_HScrollPolicy, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Auto},
- {0xe8dddf50, L"join", XFA_ATTRIBUTE_Join, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Square},
- {0xe8f118a8, L"keyCertSign", XFA_ATTRIBUTE_KeyCertSign, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xe948b9a8, L"radius", XFA_ATTRIBUTE_Radius, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 0)},
- {0xe996b2fe, L"sourceAbove", XFA_ATTRIBUTE_SourceAbove, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Config, (FX_LPVOID)XFA_ATTRIBUTEENUM_Warn},
- {0xea7090a0, L"override", XFA_ATTRIBUTE_Override, XFA_ATTRIBUTETYPE_NOTSURE, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xeb091003, L"classId", XFA_ATTRIBUTE_ClassId, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xeb511b54, L"disable", XFA_ATTRIBUTE_Disable, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)0},
- {0xeda9017a, L"scope", XFA_ATTRIBUTE_Scope, XFA_ATTRIBUTETYPE_NOTSURE, XFA_XDPPACKET_Config | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xf197844d, L"match", XFA_ATTRIBUTE_Match, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Once},
- {0xf2009339, L"placement", XFA_ATTRIBUTE_Placement, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Left},
- {0xf4ffce73, L"before", XFA_ATTRIBUTE_Before, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_Auto},
- {0xf531b059, L"writingScript", XFA_ATTRIBUTE_WritingScript, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Config, (FX_LPVOID)XFA_ATTRIBUTEENUM_Asterisk},
- {0xf575ca75, L"endChar", XFA_ATTRIBUTE_EndChar, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xf6b47749, L"lock", XFA_ATTRIBUTE_Lock, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Config, (FX_LPVOID)0},
- {0xf6b4afb0, L"long", XFA_ATTRIBUTE_Long, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)(g_XFAMeasurementData + 0)},
- {0xf6b59543, L"intact", XFA_ATTRIBUTE_Intact, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)XFA_ATTRIBUTEENUM_None},
- {0xf889e747, L"xdpContent", XFA_ATTRIBUTE_XdpContent, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
- {0xfea53ec6, L"decipherOnly", XFA_ATTRIBUTE_DecipherOnly, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
+ {0x68, L"h", XFA_ATTRIBUTE_H, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 0)},
+ {0x77, L"w", XFA_ATTRIBUTE_W, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 0)},
+ {0x78, L"x", XFA_ATTRIBUTE_X, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Config | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 0)},
+ {0x79, L"y", XFA_ATTRIBUTE_Y, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Config | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 0)},
+ {0x21aed, L"id", XFA_ATTRIBUTE_Id, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Template | XFA_XDPPACKET_ConnectionSet | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x25363, L"to", XFA_ATTRIBUTE_To, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Config, (void*)NULL},
+ {0xcb0ac9, L"lineThrough", XFA_ATTRIBUTE_LineThrough, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)0},
+ {0x2282c73, L"hAlign", XFA_ATTRIBUTE_HAlign, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Left},
+ {0x2c1c7f1, L"typeface", XFA_ATTRIBUTE_Typeface, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Config | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)L"Courier"},
+ {0x3106c3a, L"beforeTarget", XFA_ATTRIBUTE_BeforeTarget, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x31b19c1, L"name", XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_NOTSURE, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Config | XFA_XDPPACKET_LocaleSet | XFA_XDPPACKET_Template | XFA_XDPPACKET_Datasets | XFA_XDPPACKET_Form | XFA_XDPPACKET_ConnectionSet | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x3848b3f, L"next", XFA_ATTRIBUTE_Next, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_None},
+ {0x43e349b, L"dataRowCount", XFA_ATTRIBUTE_DataRowCount, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x5518c25, L"break", XFA_ATTRIBUTE_Break, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Close},
+ {0x5ce6195, L"vScrollPolicy", XFA_ATTRIBUTE_VScrollPolicy, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Auto},
+ {0x8c74ae9, L"fontHorizontalScale", XFA_ATTRIBUTE_FontHorizontalScale, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)L"100%"},
+ {0x8d4f1c7, L"textIndent", XFA_ATTRIBUTE_TextIndent, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 0)},
+ {0x97c1c65, L"context", XFA_ATTRIBUTE_Context, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_UNKNOWN, (void*)0},
+ {0x9876578, L"trayOut", XFA_ATTRIBUTE_TrayOut, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Auto},
+ {0xa2e3514, L"cap", XFA_ATTRIBUTE_Cap, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Square},
+ {0xb3543a6, L"max", XFA_ATTRIBUTE_Max, XFA_ATTRIBUTETYPE_NOTSURE, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xb356ca4, L"min", XFA_ATTRIBUTE_Min, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)1},
+ {0xbb8df5d, L"ref", XFA_ATTRIBUTE_Ref, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Config | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xbb8f3df, L"rid", XFA_ATTRIBUTE_Rid, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xc080cd3, L"url", XFA_ATTRIBUTE_Url, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xc0811ed, L"use", XFA_ATTRIBUTE_Use, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Template | XFA_XDPPACKET_ConnectionSet | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xcfea02e, L"leftInset", XFA_ATTRIBUTE_LeftInset, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 0)},
+ {0x1026c59d, L"widows", XFA_ATTRIBUTE_Widows, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)0},
+ {0x1059ec18, L"level", XFA_ATTRIBUTE_Level, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Config, (void*)0},
+ {0x1356caf8, L"bottomInset", XFA_ATTRIBUTE_BottomInset, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 0)},
+ {0x13a08bdb, L"overflowTarget", XFA_ATTRIBUTE_OverflowTarget, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x1414d431, L"allowMacro", XFA_ATTRIBUTE_AllowMacro, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)0},
+ {0x14a32d52, L"pagePosition", XFA_ATTRIBUTE_PagePosition, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Any},
+ {0x1517dfa1, L"columnWidths", XFA_ATTRIBUTE_ColumnWidths, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x169134a1, L"overflowLeader", XFA_ATTRIBUTE_OverflowLeader, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x1b8dce3e, L"action", XFA_ATTRIBUTE_Action, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Include},
+ {0x1e459b8f, L"nonRepudiation", XFA_ATTRIBUTE_NonRepudiation, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x1ec8ab2c, L"rate", XFA_ATTRIBUTE_Rate, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)50},
+ {0x1ef3a64a, L"allowRichText", XFA_ATTRIBUTE_AllowRichText, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)0},
+ {0x2038c9b2, L"role", XFA_ATTRIBUTE_Role, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x20914367, L"overflowTrailer", XFA_ATTRIBUTE_OverflowTrailer, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x226ca8f1, L"operation", XFA_ATTRIBUTE_Operation, XFA_ATTRIBUTETYPE_NOTSURE, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x24d85167, L"timeout", XFA_ATTRIBUTE_Timeout, XFA_ATTRIBUTETYPE_NOTSURE, XFA_XDPPACKET_SourceSet, (void*)NULL},
+ {0x25764436, L"topInset", XFA_ATTRIBUTE_TopInset, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 0)},
+ {0x25839852, L"access", XFA_ATTRIBUTE_Access, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Open},
+ {0x268b7ec1, L"commandType", XFA_ATTRIBUTE_CommandType, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_SourceSet, (void*)XFA_ATTRIBUTEENUM_Unknown},
+ {0x28dee6e9, L"format", XFA_ATTRIBUTE_Format, XFA_ATTRIBUTETYPE_NOTSURE, XFA_XDPPACKET_Config | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x28e17e91, L"dataPrep", XFA_ATTRIBUTE_DataPrep, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_None},
+ {0x292b88fe, L"widgetData", XFA_ATTRIBUTE_WidgetData, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_UNKNOWN, (void*)0},
+ {0x29418bb7, L"abbr", XFA_ATTRIBUTE_Abbr, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_LocaleSet, (void*)0},
+ {0x2a82d99c, L"marginRight", XFA_ATTRIBUTE_MarginRight, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 0)},
+ {0x2b5df51e, L"dataDescription", XFA_ATTRIBUTE_DataDescription, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_ConnectionSet, (void*)NULL},
+ {0x2bb3f470, L"encipherOnly", XFA_ATTRIBUTE_EncipherOnly, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x2cd79033, L"kerningMode", XFA_ATTRIBUTE_KerningMode, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_None},
+ {0x2ee7678f, L"rotate", XFA_ATTRIBUTE_Rotate, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 5)},
+ {0x2f105f72, L"wordCharacterCount", XFA_ATTRIBUTE_WordCharacterCount, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)7},
+ {0x2f16a382, L"type", XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_NOTSURE, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x34ae103c, L"reserve", XFA_ATTRIBUTE_Reserve, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 4)},
+ {0x3650557e, L"textLocation", XFA_ATTRIBUTE_TextLocation, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Below},
+ {0x39cdb0a2, L"priority", XFA_ATTRIBUTE_Priority, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Custom},
+ {0x3a0273a6, L"underline", XFA_ATTRIBUTE_Underline, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)0},
+ {0x3b582286, L"moduleWidth", XFA_ATTRIBUTE_ModuleWidth, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 3)},
+ {0x3d123c26, L"hyphenate", XFA_ATTRIBUTE_Hyphenate, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)0},
+ {0x3e7af94f, L"listen", XFA_ATTRIBUTE_Listen, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_RefOnly},
+ {0x4156ee3f, L"delimiter", XFA_ATTRIBUTE_Delimiter, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x42fed1fd, L"contentType", XFA_ATTRIBUTE_ContentType, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Template | XFA_XDPPACKET_Datasets | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x453eaf38, L"startNew", XFA_ATTRIBUTE_StartNew, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)0},
+ {0x45a6daf8, L"eofAction", XFA_ATTRIBUTE_EofAction, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_SourceSet, (void*)XFA_ATTRIBUTEENUM_MoveLast},
+ {0x47cfa43a, L"allowNeutral", XFA_ATTRIBUTE_AllowNeutral, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)0},
+ {0x47d03490, L"connection", XFA_ATTRIBUTE_Connection, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x4873c601, L"baselineShift", XFA_ATTRIBUTE_BaselineShift, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 0)},
+ {0x4b319767, L"overlinePeriod", XFA_ATTRIBUTE_OverlinePeriod, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_All},
+ {0x4b8bc840, L"fracDigits", XFA_ATTRIBUTE_FracDigits, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)2},
+ {0x4ef3d02c, L"orientation", XFA_ATTRIBUTE_Orientation, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Portrait},
+ {0x4fdc3454, L"timeStamp", XFA_ATTRIBUTE_TimeStamp, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_XDP, (void*)NULL},
+ {0x52666f1c, L"printCheckDigit", XFA_ATTRIBUTE_PrintCheckDigit, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)0},
+ {0x534729c9, L"marginLeft", XFA_ATTRIBUTE_MarginLeft, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 0)},
+ {0x5392ea58, L"stroke", XFA_ATTRIBUTE_Stroke, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Solid},
+ {0x5404d6df, L"moduleHeight", XFA_ATTRIBUTE_ModuleHeight, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 2)},
+ {0x54fa722c, L"transferEncoding", XFA_ATTRIBUTE_TransferEncoding, XFA_ATTRIBUTETYPE_NOTSURE, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x552d9ad5, L"usage", XFA_ATTRIBUTE_Usage, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_ExportAndImport},
+ {0x570ce835, L"presence", XFA_ATTRIBUTE_Presence, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Visible},
+ {0x5739d1ff, L"radixOffset", XFA_ATTRIBUTE_RadixOffset, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 0)},
+ {0x577682ac, L"preserve", XFA_ATTRIBUTE_Preserve, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x58be2870, L"aliasNode", XFA_ATTRIBUTE_AliasNode, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_UNKNOWN, (void*)0},
+ {0x5a32e493, L"multiLine", XFA_ATTRIBUTE_MultiLine, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)0},
+ {0x5a50e9e6, L"version", XFA_ATTRIBUTE_Version, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x5ab23b6c, L"startChar", XFA_ATTRIBUTE_StartChar, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x5b707a35, L"scriptTest", XFA_ATTRIBUTE_ScriptTest, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Error},
+ {0x5c054755, L"startAngle", XFA_ATTRIBUTE_StartAngle, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 5)},
+ {0x5ec958c0, L"cursorType", XFA_ATTRIBUTE_CursorType, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_SourceSet, (void*)XFA_ATTRIBUTEENUM_ForwardOnly},
+ {0x5f760b50, L"digitalSignature", XFA_ATTRIBUTE_DigitalSignature, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x60a61edd, L"codeType", XFA_ATTRIBUTE_CodeType, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x60d4c8b1, L"output", XFA_ATTRIBUTE_Output, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_ConnectionSet, (void*)NULL},
+ {0x64110ab5, L"bookendTrailer", XFA_ATTRIBUTE_BookendTrailer, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x65e30c67, L"imagingBBox", XFA_ATTRIBUTE_ImagingBBox, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)L"none"},
+ {0x66539c48, L"excludeInitialCap", XFA_ATTRIBUTE_ExcludeInitialCap, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)0},
+ {0x66642f8f, L"force", XFA_ATTRIBUTE_Force, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Config, (void*)NULL},
+ {0x69aa2292, L"crlSign", XFA_ATTRIBUTE_CrlSign, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x6a3405dd, L"previous", XFA_ATTRIBUTE_Previous, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_None},
+ {0x6a95c976, L"pushCharacterCount", XFA_ATTRIBUTE_PushCharacterCount, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)3},
+ {0x6b6ddcfb, L"nullTest", XFA_ATTRIBUTE_NullTest, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Disabled},
+ {0x6cfa828a, L"runAt", XFA_ATTRIBUTE_RunAt, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Client},
+ {0x731e0665, L"spaceBelow", XFA_ATTRIBUTE_SpaceBelow, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 0)},
+ {0x74788f8b, L"sweepAngle", XFA_ATTRIBUTE_SweepAngle, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 7)},
+ {0x78bff531, L"numberOfCells", XFA_ATTRIBUTE_NumberOfCells, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)0},
+ {0x79543055, L"letterSpacing", XFA_ATTRIBUTE_LetterSpacing, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x79975f2b, L"lockType", XFA_ATTRIBUTE_LockType, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_SourceSet, (void*)XFA_ATTRIBUTEENUM_ReadOnly},
+ {0x7a0cc471, L"passwordChar", XFA_ATTRIBUTE_PasswordChar, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)L"*"},
+ {0x7a7cc341, L"vAlign", XFA_ATTRIBUTE_VAlign, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Top},
+ {0x7b29630a, L"sourceBelow", XFA_ATTRIBUTE_SourceBelow, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Config, (void*)XFA_ATTRIBUTEENUM_Update},
+ {0x7b95e661, L"inverted", XFA_ATTRIBUTE_Inverted, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)0},
+ {0x7c2fd80b, L"mark", XFA_ATTRIBUTE_Mark, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Default},
+ {0x7c2ff6ae, L"maxH", XFA_ATTRIBUTE_MaxH, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 0)},
+ {0x7c2ff6bd, L"maxW", XFA_ATTRIBUTE_MaxW, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 0)},
+ {0x7c732a66, L"truncate", XFA_ATTRIBUTE_Truncate, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)0},
+ {0x7d02356c, L"minH", XFA_ATTRIBUTE_MinH, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 0)},
+ {0x7d02357b, L"minW", XFA_ATTRIBUTE_MinW, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 0)},
+ {0x7d0b5fca, L"initial", XFA_ATTRIBUTE_Initial, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)1},
+ {0x7d9fd7c5, L"mode", XFA_ATTRIBUTE_Mode, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Config, (void*)XFA_ATTRIBUTEENUM_UsePrinterSetting},
+ {0x7e7e845e, L"layout", XFA_ATTRIBUTE_Layout, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Position},
+ {0x7f6fd3d7, L"server", XFA_ATTRIBUTE_Server, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x824f21b7, L"embedPDF", XFA_ATTRIBUTE_EmbedPDF, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)0},
+ {0x8340ea66, L"oddOrEven", XFA_ATTRIBUTE_OddOrEven, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Any},
+ {0x836d4d7c, L"tabDefault", XFA_ATTRIBUTE_TabDefault, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x8855805f, L"contains", XFA_ATTRIBUTE_Contains, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Datasets, (void*)XFA_ATTRIBUTEENUM_Data},
+ {0x8a692521, L"rightInset", XFA_ATTRIBUTE_RightInset, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 0)},
+ {0x8af2e657, L"maxChars", XFA_ATTRIBUTE_MaxChars, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)0},
+ {0x8b90e1f2, L"open", XFA_ATTRIBUTE_Open, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_UserControl},
+ {0x8c99377e, L"relation", XFA_ATTRIBUTE_Relation, XFA_ATTRIBUTETYPE_NOTSURE, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x8d181d61, L"wideNarrowRatio", XFA_ATTRIBUTE_WideNarrowRatio, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)L"3:1"},
+ {0x8e1c2921, L"relevant", XFA_ATTRIBUTE_Relevant, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x8e29d794, L"signatureType", XFA_ATTRIBUTE_SignatureType, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Filter},
+ {0x8ec6204c, L"lineThroughPeriod", XFA_ATTRIBUTE_LineThroughPeriod, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_All},
+ {0x8ed182d1, L"shape", XFA_ATTRIBUTE_Shape, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Square},
+ {0x8fa01790, L"tabStops", XFA_ATTRIBUTE_TabStops, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x8fc36c0a, L"outputBelow", XFA_ATTRIBUTE_OutputBelow, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Config, (void*)XFA_ATTRIBUTEENUM_Warn},
+ {0x9041d4b0, L"short", XFA_ATTRIBUTE_Short, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 0)},
+ {0x907c7719, L"fontVerticalScale", XFA_ATTRIBUTE_FontVerticalScale, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)L"100%"},
+ {0x94446dcc, L"thickness", XFA_ATTRIBUTE_Thickness, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 8)},
+ {0x957fa006, L"commitOn", XFA_ATTRIBUTE_CommitOn, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Select},
+ {0x982bd892, L"remainCharacterCount", XFA_ATTRIBUTE_RemainCharacterCount, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)3},
+ {0x98fd4d81, L"keyAgreement", XFA_ATTRIBUTE_KeyAgreement, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x99800d7a, L"errorCorrectionLevel", XFA_ATTRIBUTE_ErrorCorrectionLevel, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0x9a63da3d, L"upsMode", XFA_ATTRIBUTE_UpsMode, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_UsCarrier},
+ {0x9cc17d75, L"mergeMode", XFA_ATTRIBUTE_MergeMode, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_ConsumeData},
+ {0x9d833d75, L"circular", XFA_ATTRIBUTE_Circular, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)0},
+ {0x9d8ee204, L"psName", XFA_ATTRIBUTE_PsName, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Config, (void*)NULL},
+ {0x9dcc3ab3, L"trailer", XFA_ATTRIBUTE_Trailer, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xa0933954, L"unicodeRange", XFA_ATTRIBUTE_UnicodeRange, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Config, (void*)NULL},
+ {0xa1b0d2f5, L"executeType", XFA_ATTRIBUTE_ExecuteType, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Import},
+ {0xa25a883d, L"duplexImposition", XFA_ATTRIBUTE_DuplexImposition, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_LongEdge},
+ {0xa42ca1b7, L"trayIn", XFA_ATTRIBUTE_TrayIn, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Auto},
+ {0xa433f001, L"bindingNode", XFA_ATTRIBUTE_BindingNode, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_UNKNOWN, (void*)0},
+ {0xa5340ff5, L"bofAction", XFA_ATTRIBUTE_BofAction, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_SourceSet, (void*)XFA_ATTRIBUTEENUM_MoveFirst},
+ {0xa5b410cf, L"save", XFA_ATTRIBUTE_Save, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)0},
+ {0xa6118c89, L"targetType", XFA_ATTRIBUTE_TargetType, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Auto},
+ {0xa66404cb, L"keyEncipherment", XFA_ATTRIBUTE_KeyEncipherment, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xa6710262, L"credentialServerPolicy", XFA_ATTRIBUTE_CredentialServerPolicy, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Optional},
+ {0xa686975b, L"size", XFA_ATTRIBUTE_Size, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 6)},
+ {0xa85e74f3, L"initialNumber", XFA_ATTRIBUTE_InitialNumber, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)1},
+ {0xabef37e3, L"slope", XFA_ATTRIBUTE_Slope, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Backslash},
+ {0xabfa6c4f, L"cSpace", XFA_ATTRIBUTE_CSpace, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)L"SRGB"},
+ {0xac06e2b0, L"colSpan", XFA_ATTRIBUTE_ColSpan, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)1},
+ {0xadc4c77b, L"binding", XFA_ATTRIBUTE_Binding, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xaf754613, L"checksum", XFA_ATTRIBUTE_Checksum, XFA_ATTRIBUTETYPE_NOTSURE, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xb045fbc5, L"charEncoding", XFA_ATTRIBUTE_CharEncoding, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)L"UTF-8"},
+ {0xb0e5485d, L"bind", XFA_ATTRIBUTE_Bind, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_SourceSet, (void*)NULL},
+ {0xb12128b7, L"textEntry", XFA_ATTRIBUTE_TextEntry, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)0},
+ {0xb373a862, L"archive", XFA_ATTRIBUTE_Archive, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xb598a1f7, L"uuid", XFA_ATTRIBUTE_Uuid, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_XDP, (void*)NULL},
+ {0xb5e49bf2, L"posture", XFA_ATTRIBUTE_Posture, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Config | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Normal},
+ {0xb6b44172, L"after", XFA_ATTRIBUTE_After, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Auto},
+ {0xb716467b, L"orphans", XFA_ATTRIBUTE_Orphans, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)0},
+ {0xbc0c4695, L"qualifiedName", XFA_ATTRIBUTE_QualifiedName, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_UNKNOWN, (void*)NULL},
+ {0xbc254332, L"usehref", XFA_ATTRIBUTE_Usehref, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Template | XFA_XDPPACKET_ConnectionSet | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xbc8fa350, L"locale", XFA_ATTRIBUTE_Locale, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xbd6e1d88, L"weight", XFA_ATTRIBUTE_Weight, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Config | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Normal},
+ {0xbd96a0e9, L"underlinePeriod", XFA_ATTRIBUTE_UnderlinePeriod, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_All},
+ {0xbde9abda, L"data", XFA_ATTRIBUTE_Data, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Link},
+ {0xbe52dfbf, L"desc", XFA_ATTRIBUTE_Desc, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Config | XFA_XDPPACKET_LocaleSet, (void*)NULL},
+ {0xbe9ba472, L"numbered", XFA_ATTRIBUTE_Numbered, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)1},
+ {0xc035c6b1, L"dataColumnCount", XFA_ATTRIBUTE_DataColumnCount, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xc0ec9fa4, L"overline", XFA_ATTRIBUTE_Overline, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)0},
+ {0xc2ba0923, L"urlPolicy", XFA_ATTRIBUTE_UrlPolicy, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xc2bd40fd, L"anchorType", XFA_ATTRIBUTE_AnchorType, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_TopLeft},
+ {0xc39a88bd, L"labelRef", XFA_ATTRIBUTE_LabelRef, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xc3c1442f, L"bookendLeader", XFA_ATTRIBUTE_BookendLeader, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xc4547a08, L"maxLength", XFA_ATTRIBUTE_MaxLength, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*) - 1},
+ {0xc4fed09b, L"accessKey", XFA_ATTRIBUTE_AccessKey, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xc5762157, L"cursorLocation", XFA_ATTRIBUTE_CursorLocation, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_SourceSet, (void*)XFA_ATTRIBUTEENUM_Client},
+ {0xc860f30a, L"delayedOpen", XFA_ATTRIBUTE_DelayedOpen, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_SourceSet, (void*)NULL},
+ {0xc8da4da7, L"target", XFA_ATTRIBUTE_Target, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xca5dc27c, L"dataEncipherment", XFA_ATTRIBUTE_DataEncipherment, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xcb150479, L"afterTarget", XFA_ATTRIBUTE_AfterTarget, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xcbcaf66d, L"leader", XFA_ATTRIBUTE_Leader, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xcca7897e, L"picker", XFA_ATTRIBUTE_Picker, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Host},
+ {0xcd7f7b54, L"from", XFA_ATTRIBUTE_From, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Config, (void*)NULL},
+ {0xcea5e62c, L"baseProfile", XFA_ATTRIBUTE_BaseProfile, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Full},
+ {0xd171b240, L"aspect", XFA_ATTRIBUTE_Aspect, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Fit},
+ {0xd3c84d25, L"rowColumnRatio", XFA_ATTRIBUTE_RowColumnRatio, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xd4b01921, L"lineHeight", XFA_ATTRIBUTE_LineHeight, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 1)},
+ {0xd4cc53f8, L"highlight", XFA_ATTRIBUTE_Highlight, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Inverted},
+ {0xd50f903a, L"valueRef", XFA_ATTRIBUTE_ValueRef, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xd52482e0, L"maxEntries", XFA_ATTRIBUTE_MaxEntries, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Config, (void*)5},
+ {0xd57c513c, L"dataLength", XFA_ATTRIBUTE_DataLength, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xd6128d8d, L"activity", XFA_ATTRIBUTE_Activity, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Click},
+ {0xd6a39990, L"input", XFA_ATTRIBUTE_Input, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_ConnectionSet, (void*)NULL},
+ {0xd6e27f1d, L"value", XFA_ATTRIBUTE_Value, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Config | XFA_XDPPACKET_LocaleSet | XFA_XDPPACKET_Template | XFA_XDPPACKET_Datasets | XFA_XDPPACKET_ConnectionSet | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xd70798c2, L"blankOrNotBlank", XFA_ATTRIBUTE_BlankOrNotBlank, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Any},
+ {0xd861f8af, L"addRevocationInfo", XFA_ATTRIBUTE_AddRevocationInfo, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xd8f982bf, L"genericFamily", XFA_ATTRIBUTE_GenericFamily, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Config, (void*)XFA_ATTRIBUTEENUM_Serif},
+ {0xd996fa9b, L"hand", XFA_ATTRIBUTE_Hand, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Even},
+ {0xdb55fec5, L"href", XFA_ATTRIBUTE_Href, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xdc75676c, L"textEncoding", XFA_ATTRIBUTE_TextEncoding, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xde7f92ba, L"leadDigits", XFA_ATTRIBUTE_LeadDigits, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*) - 1},
+ {0xe11a2cbc, L"permissions", XFA_ATTRIBUTE_Permissions, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)2},
+ {0xe18b5659, L"spaceAbove", XFA_ATTRIBUTE_SpaceAbove, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 0)},
+ {0xe1a26b56, L"codeBase", XFA_ATTRIBUTE_CodeBase, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xe349d044, L"stock", XFA_ATTRIBUTE_Stock, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xe372ae97, L"isNull", XFA_ATTRIBUTE_IsNull, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Datasets, (void*)0},
+ {0xe4c3a5e5, L"restoreState", XFA_ATTRIBUTE_RestoreState, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Manual},
+ {0xe5c96d6a, L"excludeAllCaps", XFA_ATTRIBUTE_ExcludeAllCaps, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)0},
+ {0xe64b1129, L"formatTest", XFA_ATTRIBUTE_FormatTest, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Warning},
+ {0xe6f99487, L"hScrollPolicy", XFA_ATTRIBUTE_HScrollPolicy, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Auto},
+ {0xe8dddf50, L"join", XFA_ATTRIBUTE_Join, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Square},
+ {0xe8f118a8, L"keyCertSign", XFA_ATTRIBUTE_KeyCertSign, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xe948b9a8, L"radius", XFA_ATTRIBUTE_Radius, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 0)},
+ {0xe996b2fe, L"sourceAbove", XFA_ATTRIBUTE_SourceAbove, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Config, (void*)XFA_ATTRIBUTEENUM_Warn},
+ {0xea7090a0, L"override", XFA_ATTRIBUTE_Override, XFA_ATTRIBUTETYPE_NOTSURE, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xeb091003, L"classId", XFA_ATTRIBUTE_ClassId, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xeb511b54, L"disable", XFA_ATTRIBUTE_Disable, XFA_ATTRIBUTETYPE_Boolean, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)0},
+ {0xeda9017a, L"scope", XFA_ATTRIBUTE_Scope, XFA_ATTRIBUTETYPE_NOTSURE, XFA_XDPPACKET_Config | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xf197844d, L"match", XFA_ATTRIBUTE_Match, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Once},
+ {0xf2009339, L"placement", XFA_ATTRIBUTE_Placement, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Left},
+ {0xf4ffce73, L"before", XFA_ATTRIBUTE_Before, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_Auto},
+ {0xf531b059, L"writingScript", XFA_ATTRIBUTE_WritingScript, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Config, (void*)XFA_ATTRIBUTEENUM_Asterisk},
+ {0xf575ca75, L"endChar", XFA_ATTRIBUTE_EndChar, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xf6b47749, L"lock", XFA_ATTRIBUTE_Lock, XFA_ATTRIBUTETYPE_Integer, XFA_XDPPACKET_Config, (void*)0},
+ {0xf6b4afb0, L"long", XFA_ATTRIBUTE_Long, XFA_ATTRIBUTETYPE_Measure, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)(g_XFAMeasurementData + 0)},
+ {0xf6b59543, L"intact", XFA_ATTRIBUTE_Intact, XFA_ATTRIBUTETYPE_Enum, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)XFA_ATTRIBUTEENUM_None},
+ {0xf889e747, L"xdpContent", XFA_ATTRIBUTE_XdpContent, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
+ {0xfea53ec6, L"decipherOnly", XFA_ATTRIBUTE_DecipherOnly, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (void*)NULL},
};
extern const int32_t g_iXFAAttributeCount = sizeof(g_XFAAttributeData) / sizeof(XFA_ATTRIBUTEINFO);
extern const XFA_NOTSUREATTRIBUTE g_XFANotsureAttributes[] = {
- {XFA_ELEMENT_SubformSet, XFA_ATTRIBUTE_Relation, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Ordered},
- {XFA_ELEMENT_NumberPattern, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Numeric},
- {XFA_ELEMENT_KeyUsage, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Optional},
- {XFA_ELEMENT_LabelPrinter, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Zpl},
- {XFA_ELEMENT_CalendarSymbols, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Gregorian},
- {XFA_ELEMENT_Barcode, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Cdata, (FX_LPVOID)NULL},
- {XFA_ELEMENT_Barcode, XFA_ATTRIBUTE_Checksum, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_None},
- {XFA_ELEMENT_TimePattern, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Med},
- {XFA_ELEMENT_BatchOutput, XFA_ATTRIBUTE_Format, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_None},
- {XFA_ELEMENT_SubjectDNs, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Optional},
- {XFA_ELEMENT_Issuers, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Optional},
- {XFA_ELEMENT_EncryptionMethods, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Optional},
- {XFA_ELEMENT_Pattern, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_CrossHatch},
- {XFA_ELEMENT_Compress, XFA_ATTRIBUTE_Scope, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_ImageOnly},
- {XFA_ELEMENT_Image, XFA_ATTRIBUTE_TransferEncoding, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Base64},
- {XFA_ELEMENT_TimeStamp, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Optional},
- {XFA_ELEMENT_Subform, XFA_ATTRIBUTE_Scope, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Name},
- {XFA_ELEMENT_Handler, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Optional},
- {XFA_ELEMENT_Record, XFA_ATTRIBUTE_Max, XFA_ATTRIBUTETYPE_Integer, (FX_LPVOID)0},
- {XFA_ELEMENT_Command, XFA_ATTRIBUTE_Timeout, XFA_ATTRIBUTETYPE_Integer, (FX_LPVOID)30},
- {XFA_ELEMENT_DigestMethods, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Optional},
- {XFA_ELEMENT_PageSet, XFA_ATTRIBUTE_Relation, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_OrderedOccurrence},
- {XFA_ELEMENT_Equate, XFA_ATTRIBUTE_From, XFA_ATTRIBUTETYPE_Cdata, (FX_LPVOID)NULL},
- {XFA_ELEMENT_Equate, XFA_ATTRIBUTE_To, XFA_ATTRIBUTETYPE_Cdata, (FX_LPVOID)NULL},
- {XFA_ELEMENT_Traverse, XFA_ATTRIBUTE_Operation, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Next},
- {XFA_ELEMENT_Encodings, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Optional},
- {XFA_ELEMENT_Signing, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Optional},
- {XFA_ELEMENT_Oids, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Optional},
- {XFA_ELEMENT_Signature, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_PDF1_3},
- {XFA_ELEMENT_ExData, XFA_ATTRIBUTE_TransferEncoding, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_None},
- {XFA_ELEMENT_Linear, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_ToRight},
- {XFA_ELEMENT_CurrencySymbol, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Symbol},
- {XFA_ELEMENT_EquateRange, XFA_ATTRIBUTE_From, XFA_ATTRIBUTETYPE_Cdata, (FX_LPVOID)NULL},
- {XFA_ELEMENT_EquateRange, XFA_ATTRIBUTE_To, XFA_ATTRIBUTETYPE_Cdata, (FX_LPVOID)NULL},
- {XFA_ELEMENT_SignData, XFA_ATTRIBUTE_Operation, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Sign},
- {XFA_ELEMENT_DatePattern, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Med},
- {XFA_ELEMENT_Bind, XFA_ATTRIBUTE_TransferEncoding, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_None},
- {XFA_ELEMENT_Reasons, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Optional},
- {XFA_ELEMENT_AppearanceFilter, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Optional},
- {XFA_ELEMENT_Form, XFA_ATTRIBUTE_Checksum, XFA_ATTRIBUTETYPE_Cdata, (FX_LPVOID)NULL},
- {XFA_ELEMENT_Value, XFA_ATTRIBUTE_Override, XFA_ATTRIBUTETYPE_Boolean, (FX_LPVOID)0},
- {XFA_ELEMENT_Calculate, XFA_ATTRIBUTE_Override, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Error},
- {XFA_ELEMENT_Connect, XFA_ATTRIBUTE_Timeout, XFA_ATTRIBUTETYPE_Integer, (FX_LPVOID)15},
- {XFA_ELEMENT_Submit, XFA_ATTRIBUTE_Format, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Xdp},
- {XFA_ELEMENT_Radial, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_ToEdge},
- {XFA_ELEMENT_LockDocument, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Optional},
- {XFA_ELEMENT_Occur, XFA_ATTRIBUTE_Max, XFA_ATTRIBUTETYPE_Integer, (FX_LPVOID)1},
- {XFA_ELEMENT_NumberSymbol, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Decimal},
+ {XFA_ELEMENT_SubformSet, XFA_ATTRIBUTE_Relation, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Ordered},
+ {XFA_ELEMENT_NumberPattern, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Numeric},
+ {XFA_ELEMENT_KeyUsage, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional},
+ {XFA_ELEMENT_LabelPrinter, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Zpl},
+ {XFA_ELEMENT_CalendarSymbols, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Gregorian},
+ {XFA_ELEMENT_Barcode, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Cdata, (void*)NULL},
+ {XFA_ELEMENT_Barcode, XFA_ATTRIBUTE_Checksum, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_None},
+ {XFA_ELEMENT_TimePattern, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Med},
+ {XFA_ELEMENT_BatchOutput, XFA_ATTRIBUTE_Format, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_None},
+ {XFA_ELEMENT_SubjectDNs, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional},
+ {XFA_ELEMENT_Issuers, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional},
+ {XFA_ELEMENT_EncryptionMethods, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional},
+ {XFA_ELEMENT_Pattern, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_CrossHatch},
+ {XFA_ELEMENT_Compress, XFA_ATTRIBUTE_Scope, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_ImageOnly},
+ {XFA_ELEMENT_Image, XFA_ATTRIBUTE_TransferEncoding, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Base64},
+ {XFA_ELEMENT_TimeStamp, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional},
+ {XFA_ELEMENT_Subform, XFA_ATTRIBUTE_Scope, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Name},
+ {XFA_ELEMENT_Handler, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional},
+ {XFA_ELEMENT_Record, XFA_ATTRIBUTE_Max, XFA_ATTRIBUTETYPE_Integer, (void*)0},
+ {XFA_ELEMENT_Command, XFA_ATTRIBUTE_Timeout, XFA_ATTRIBUTETYPE_Integer, (void*)30},
+ {XFA_ELEMENT_DigestMethods, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional},
+ {XFA_ELEMENT_PageSet, XFA_ATTRIBUTE_Relation, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_OrderedOccurrence},
+ {XFA_ELEMENT_Equate, XFA_ATTRIBUTE_From, XFA_ATTRIBUTETYPE_Cdata, (void*)NULL},
+ {XFA_ELEMENT_Equate, XFA_ATTRIBUTE_To, XFA_ATTRIBUTETYPE_Cdata, (void*)NULL},
+ {XFA_ELEMENT_Traverse, XFA_ATTRIBUTE_Operation, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Next},
+ {XFA_ELEMENT_Encodings, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional},
+ {XFA_ELEMENT_Signing, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional},
+ {XFA_ELEMENT_Oids, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional},
+ {XFA_ELEMENT_Signature, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_PDF1_3},
+ {XFA_ELEMENT_ExData, XFA_ATTRIBUTE_TransferEncoding, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_None},
+ {XFA_ELEMENT_Linear, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_ToRight},
+ {XFA_ELEMENT_CurrencySymbol, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Symbol},
+ {XFA_ELEMENT_EquateRange, XFA_ATTRIBUTE_From, XFA_ATTRIBUTETYPE_Cdata, (void*)NULL},
+ {XFA_ELEMENT_EquateRange, XFA_ATTRIBUTE_To, XFA_ATTRIBUTETYPE_Cdata, (void*)NULL},
+ {XFA_ELEMENT_SignData, XFA_ATTRIBUTE_Operation, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Sign},
+ {XFA_ELEMENT_DatePattern, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Med},
+ {XFA_ELEMENT_Bind, XFA_ATTRIBUTE_TransferEncoding, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_None},
+ {XFA_ELEMENT_Reasons, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional},
+ {XFA_ELEMENT_AppearanceFilter, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional},
+ {XFA_ELEMENT_Form, XFA_ATTRIBUTE_Checksum, XFA_ATTRIBUTETYPE_Cdata, (void*)NULL},
+ {XFA_ELEMENT_Value, XFA_ATTRIBUTE_Override, XFA_ATTRIBUTETYPE_Boolean, (void*)0},
+ {XFA_ELEMENT_Calculate, XFA_ATTRIBUTE_Override, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Error},
+ {XFA_ELEMENT_Connect, XFA_ATTRIBUTE_Timeout, XFA_ATTRIBUTETYPE_Integer, (void*)15},
+ {XFA_ELEMENT_Submit, XFA_ATTRIBUTE_Format, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Xdp},
+ {XFA_ELEMENT_Radial, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_ToEdge},
+ {XFA_ELEMENT_LockDocument, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional},
+ {XFA_ELEMENT_Occur, XFA_ATTRIBUTE_Max, XFA_ATTRIBUTETYPE_Integer, (void*)1},
+ {XFA_ELEMENT_NumberSymbol, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Decimal},
};
extern const int32_t g_iXFANotsureCount = sizeof(g_XFANotsureAttributes) / sizeof(XFA_NOTSUREATTRIBUTE);
extern const XFA_ELEMENTINFO g_XFAElementData[] = {
diff --git a/xfa/src/fxfa/src/parser/xfa_basic_imp.cpp b/xfa/src/fxfa/src/parser/xfa_basic_imp.cpp
index 618b7a2945..151147b4dc 100644
--- a/xfa/src/fxfa/src/parser/xfa_basic_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_basic_imp.cpp
@@ -129,7 +129,7 @@ XFA_LPCATTRIBUTEINFO XFA_GetAttributeByID(XFA_ATTRIBUTE eName)
{
return (eName < g_iXFAAttributeCount) ? (g_XFAAttributeData + eName) : NULL;
}
-FX_BOOL XFA_GetAttributeDefaultValue(FX_LPVOID &pValue, XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, XFA_ATTRIBUTETYPE eType, FX_DWORD dwPacket)
+FX_BOOL XFA_GetAttributeDefaultValue(void* &pValue, XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, XFA_ATTRIBUTETYPE eType, FX_DWORD dwPacket)
{
XFA_LPCATTRIBUTEINFO pInfo = XFA_GetAttributeByID(eAttribute);
if (pInfo == NULL) {
@@ -152,7 +152,7 @@ FX_BOOL XFA_GetAttributeDefaultValue(FX_LPVOID &pValue, XFA_ELEMENT eElement, XF
}
XFA_ATTRIBUTEENUM XFA_GetAttributeDefaultValue_Enum(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, FX_DWORD dwPacket)
{
- FX_LPVOID pValue;
+ void* pValue;
if (XFA_GetAttributeDefaultValue(pValue, eElement, eAttribute, XFA_ATTRIBUTETYPE_Enum, dwPacket)) {
return (XFA_ATTRIBUTEENUM)(uintptr_t)pValue;
}
@@ -160,15 +160,15 @@ XFA_ATTRIBUTEENUM XFA_GetAttributeDefaultValue_Enum(XFA_ELEMENT eElement, XFA_AT
}
CFX_WideStringC XFA_GetAttributeDefaultValue_Cdata(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, FX_DWORD dwPacket)
{
- FX_LPVOID pValue;
+ void* pValue;
if (XFA_GetAttributeDefaultValue(pValue, eElement, eAttribute, XFA_ATTRIBUTETYPE_Cdata, dwPacket)) {
- return (FX_LPCWSTR)pValue;
+ return (const FX_WCHAR*)pValue;
}
return NULL;
}
FX_BOOL XFA_GetAttributeDefaultValue_Boolean(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, FX_DWORD dwPacket)
{
- FX_LPVOID pValue;
+ void* pValue;
if (XFA_GetAttributeDefaultValue(pValue, eElement, eAttribute, XFA_ATTRIBUTETYPE_Boolean, dwPacket)) {
return (FX_BOOL)(uintptr_t)pValue;
}
@@ -176,7 +176,7 @@ FX_BOOL XFA_GetAttributeDefaultValue_Boolean(XFA_ELEMENT eElement, XFA_ATTRIBUTE
}
int32_t XFA_GetAttributeDefaultValue_Integer(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, FX_DWORD dwPacket)
{
- FX_LPVOID pValue;
+ void* pValue;
if (XFA_GetAttributeDefaultValue(pValue, eElement, eAttribute, XFA_ATTRIBUTETYPE_Integer, dwPacket)) {
return (int32_t)(uintptr_t)pValue;
}
@@ -184,7 +184,7 @@ int32_t XFA_GetAttributeDefaultValue_Integer(XFA_ELEMENT eElement, XFA_ATTRIBUTE
}
CXFA_Measurement XFA_GetAttributeDefaultValue_Measure(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, FX_DWORD dwPacket)
{
- FX_LPVOID pValue;
+ void* pValue;
if (XFA_GetAttributeDefaultValue(pValue, eElement, eAttribute, XFA_ATTRIBUTETYPE_Measure, dwPacket)) {
return *(CXFA_Measurement*)pValue;
}
@@ -219,7 +219,7 @@ XFA_LPCELEMENTINFO XFA_GetElementByID(XFA_ELEMENT eName)
{
return (eName < g_iXFAElementCount) ? (g_XFAElementData + eName) : NULL;
}
-FX_LPCWORD XFA_GetElementChildren(XFA_ELEMENT eElement, int32_t &iCount)
+const FX_WORD* XFA_GetElementChildren(XFA_ELEMENT eElement, int32_t &iCount)
{
if (eElement >= g_iXFAElementCount) {
return NULL;
@@ -228,7 +228,7 @@ FX_LPCWORD XFA_GetElementChildren(XFA_ELEMENT eElement, int32_t &iCount)
iCount = pElement->wCount;
return g_XFAElementChildrenData + pElement->wStart;
}
-FX_LPCBYTE XFA_GetElementAttributes(XFA_ELEMENT eElement, int32_t &iCount)
+const uint8_t* XFA_GetElementAttributes(XFA_ELEMENT eElement, int32_t &iCount)
{
if (eElement >= g_iXFAElementCount) {
return NULL;
@@ -240,7 +240,7 @@ FX_LPCBYTE XFA_GetElementAttributes(XFA_ELEMENT eElement, int32_t &iCount)
XFA_LPCATTRIBUTEINFO XFA_GetAttributeOfElement(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, FX_DWORD dwPacket)
{
int32_t iCount = 0;
- FX_LPCBYTE pAttr = XFA_GetElementAttributes(eElement, iCount);
+ const uint8_t* pAttr = XFA_GetElementAttributes(eElement, iCount);
if (pAttr == NULL || iCount < 1) {
return NULL;
}
@@ -259,7 +259,7 @@ XFA_LPCATTRIBUTEINFO XFA_GetAttributeOfElement(XFA_ELEMENT eElement, XFA_ATTRIBU
XFA_LPCELEMENTINFO XFA_GetChildOfElement(XFA_ELEMENT eElement, XFA_ELEMENT eChild, FX_DWORD dwPacket)
{
int32_t iCount = 0;
- FX_LPCWORD pChild = XFA_GetElementChildren(eElement, iCount);
+ const FX_WORD* pChild = XFA_GetElementChildren(eElement, iCount);
if (pChild == NULL || iCount < 1) {
return NULL;
}
@@ -614,12 +614,12 @@ FX_BOOL CXFA_WideTextRead::IsEOF() const
{
return m_iPosition >= m_wsBuffer.GetLength();
}
-int32_t CXFA_WideTextRead::ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_BOOL &bEOS, int32_t const *pByteSize )
+int32_t CXFA_WideTextRead::ReadString(FX_WCHAR* pStr, int32_t iMaxLength, FX_BOOL &bEOS, int32_t const *pByteSize )
{
if (iMaxLength > m_wsBuffer.GetLength() - m_iPosition) {
iMaxLength = m_wsBuffer.GetLength() - m_iPosition;
}
- FXSYS_wcsncpy(pStr, (FX_LPCWSTR)m_wsBuffer + m_iPosition, iMaxLength);
+ FXSYS_wcsncpy(pStr, (const FX_WCHAR*)m_wsBuffer + m_iPosition, iMaxLength);
m_iPosition += iMaxLength;
bEOS = IsEOF();
return iMaxLength;
diff --git a/xfa/src/fxfa/src/parser/xfa_basic_imp.h b/xfa/src/fxfa/src/parser/xfa_basic_imp.h
index cbffe4e635..1e8e64e6cb 100644
--- a/xfa/src/fxfa/src/parser/xfa_basic_imp.h
+++ b/xfa/src/fxfa/src/parser/xfa_basic_imp.h
@@ -10,7 +10,7 @@ typedef struct _XFA_NOTSUREATTRIBUTE {
XFA_ELEMENT eElement;
XFA_ATTRIBUTE eAttribute;
XFA_ATTRIBUTETYPE eType;
- FX_LPVOID pValue;
+ void* pValue;
} XFA_NOTSUREATTRIBUTE, * XFA_LPNOTSUREATTRIBUTE;
typedef XFA_NOTSUREATTRIBUTE const * XFA_LPCNOTSUREATTRIBUTE;
XFA_LPCNOTSUREATTRIBUTE XFA_GetNotsureAttribute(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, XFA_ATTRIBUTETYPE eType = XFA_ATTRIBUTETYPE_NOTSURE);
@@ -27,16 +27,16 @@ public:
virtual int32_t GetPosition();
virtual FX_BOOL IsEOF() const;
- virtual int32_t ReadData(FX_LPBYTE pBuffer, int32_t iBufferSize)
+ virtual int32_t ReadData(uint8_t* pBuffer, int32_t iBufferSize)
{
return 0;
}
- virtual int32_t ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_BOOL &bEOS, int32_t const *pByteSize = NULL);
- virtual int32_t WriteData(FX_LPCBYTE pBuffer, int32_t iBufferSize)
+ virtual int32_t ReadString(FX_WCHAR* pStr, int32_t iMaxLength, FX_BOOL &bEOS, int32_t const *pByteSize = NULL);
+ virtual int32_t WriteData(const uint8_t* pBuffer, int32_t iBufferSize)
{
return 0;
}
- virtual int32_t WriteString(FX_LPCWSTR pStr, int32_t iLength)
+ virtual int32_t WriteString(const FX_WCHAR* pStr, int32_t iLength)
{
return 0;
}
diff --git a/xfa/src/fxfa/src/parser/xfa_document_imp.cpp b/xfa/src/fxfa/src/parser/xfa_document_imp.cpp
index d634079f58..690ed2960e 100644
--- a/xfa/src/fxfa/src/parser/xfa_document_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_document_imp.cpp
@@ -379,19 +379,19 @@ void CXFA_Document::DoProtoMerge()
if(uSharpPos < 0) {
wsURI = wsUseVal;
} else {
- wsURI = CFX_WideStringC((FX_LPCWSTR)wsUseVal, uSharpPos);
+ wsURI = CFX_WideStringC((const FX_WCHAR*)wsUseVal, uSharpPos);
FX_STRSIZE uLen = wsUseVal.GetLength();
- if(uLen >= uSharpPos + 5 && CFX_WideStringC((FX_LPCWSTR)wsUseVal + uSharpPos, 5) == FX_WSTRC(L"#som(") && wsUseVal[uLen - 1] == ')') {
- wsSOM = CFX_WideStringC((FX_LPCWSTR)wsUseVal + uSharpPos + 5, uLen - 1 - uSharpPos - 5);
+ if(uLen >= uSharpPos + 5 && CFX_WideStringC((const FX_WCHAR*)wsUseVal + uSharpPos, 5) == FX_WSTRC(L"#som(") && wsUseVal[uLen - 1] == ')') {
+ wsSOM = CFX_WideStringC((const FX_WCHAR*)wsUseVal + uSharpPos + 5, uLen - 1 - uSharpPos - 5);
} else {
- wsID = CFX_WideStringC((FX_LPCWSTR)wsUseVal + uSharpPos + 1, uLen - uSharpPos - 1);
+ wsID = CFX_WideStringC((const FX_WCHAR*)wsUseVal + uSharpPos + 1, uLen - uSharpPos - 1);
}
}
} else if(pUseHrefNode->TryCData(XFA_ATTRIBUTE_Use, wsUseVal) && !wsUseVal.IsEmpty()) {
if(wsUseVal[0] == '#') {
- wsID = CFX_WideStringC((FX_LPCWSTR)wsUseVal + 1, wsUseVal.GetLength() - 1);
+ wsID = CFX_WideStringC((const FX_WCHAR*)wsUseVal + 1, wsUseVal.GetLength() - 1);
} else {
- wsSOM = CFX_WideStringC((FX_LPCWSTR)wsUseVal, wsUseVal.GetLength());
+ wsSOM = CFX_WideStringC((const FX_WCHAR*)wsUseVal, wsUseVal.GetLength());
}
}
if (!wsURI.IsEmpty() && wsURI != FX_WSTRC(L".")) {
diff --git a/xfa/src/fxfa/src/parser/xfa_document_serialize.cpp b/xfa/src/fxfa/src/parser/xfa_document_serialize.cpp
index f9c22e8149..c8412873d2 100644
--- a/xfa/src/fxfa/src/parser/xfa_document_serialize.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_document_serialize.cpp
@@ -203,7 +203,7 @@ static void XFA_DataExporter_RegenerateFormFile_Changed(CXFA_Node* pNode, CFX_Wi
{
CFX_WideString wsAttrs;
int32_t iAttrs = 0;
- FX_LPCBYTE pAttrs = XFA_GetElementAttributes(pNode->GetClassID(), iAttrs);
+ const uint8_t* pAttrs = XFA_GetElementAttributes(pNode->GetClassID(), iAttrs);
while (iAttrs--) {
XFA_LPCATTRIBUTEINFO pAttr = XFA_GetAttributeByID((XFA_ATTRIBUTE)pAttrs[iAttrs]);
if (pAttr->eName == XFA_ATTRIBUTE_Name || (XFA_DataExporter_AttributeSaveInDataModel(pNode, pAttr->eName) && !bSaveXML)) {
@@ -241,7 +241,7 @@ static void XFA_DataExporter_RegenerateFormFile_Changed(CXFA_Node* pNode, CFX_Wi
IFX_Stream *pTempStream = IFX_Stream::CreateStream((IFX_FileWrite*)pMemStream, FX_STREAMACCESS_Text | FX_STREAMACCESS_Write | FX_STREAMACCESS_Append);
pTempStream->SetCodePage(FX_CODEPAGE_UTF8);
pRichTextXML->SaveXMLNode(pTempStream);
- wsChildren += CFX_WideString::FromUTF8((FX_LPCSTR)pMemStream->GetBuffer(), pMemStream->GetSize());
+ wsChildren += CFX_WideString::FromUTF8((const FX_CHAR*)pMemStream->GetBuffer(), pMemStream->GetSize());
pTempStream->Release();
pMemStream->Release();
} else if (pRawValueNode->GetClassID() == XFA_ELEMENT_Sharpxml && wsContentType.Equal(FX_WSTRC(L"text/xml"))) {
@@ -353,7 +353,7 @@ static void XFA_DataExporter_RegenerateFormFile_Container(CXFA_Node* pNode, IFX_
XFA_DataExporter_RegenerateFormFile_Changed(pNode, buf, bSaveXML);
FX_STRSIZE nLen = buf.GetLength();
if (nLen > 0) {
- pStream->WriteString((FX_LPCWSTR)buf.GetBuffer(), nLen);
+ pStream->WriteString((const FX_WCHAR*)buf.GetBuffer(), nLen);
}
return;
}
@@ -365,7 +365,7 @@ static void XFA_DataExporter_RegenerateFormFile_Container(CXFA_Node* pNode, IFX_
XFA_SaveAttribute(pNode, XFA_ATTRIBUTE_Name, FX_WSTRC(L"name"), TRUE, wsOutput);
CFX_WideString wsAttrs;
int32_t iAttrs = 0;
- FX_LPCBYTE pAttrs = XFA_GetElementAttributes(pNode->GetClassID(), iAttrs);
+ const uint8_t* pAttrs = XFA_GetElementAttributes(pNode->GetClassID(), iAttrs);
while (iAttrs--) {
XFA_LPCATTRIBUTEINFO pAttr = XFA_GetAttributeByID((XFA_ATTRIBUTE)pAttrs[iAttrs]);
if (pAttr->eName == XFA_ATTRIBUTE_Name) {
@@ -376,7 +376,7 @@ static void XFA_DataExporter_RegenerateFormFile_Container(CXFA_Node* pNode, IFX_
wsOutput += wsAttr;
}
if (!wsOutput.IsEmpty()) {
- pStream->WriteString((FX_LPCWSTR)wsOutput, wsOutput.GetLength());
+ pStream->WriteString((const FX_WCHAR*)wsOutput, wsOutput.GetLength());
}
CXFA_Node* pChildNode = pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
if (pChildNode) {
@@ -392,21 +392,21 @@ static void XFA_DataExporter_RegenerateFormFile_Container(CXFA_Node* pNode, IFX_
pStream->WriteString(L"\n/>", 3);
}
}
-void XFA_DataExporter_RegenerateFormFile(CXFA_Node* pNode, IFX_Stream* pStream, FX_LPCSTR pChecksum , FX_BOOL bSaveXML)
+void XFA_DataExporter_RegenerateFormFile(CXFA_Node* pNode, IFX_Stream* pStream, const FX_CHAR* pChecksum , FX_BOOL bSaveXML)
{
if(pNode->GetObjectType() == XFA_OBJECTTYPE_ModelNode) {
- static FX_LPCWSTR s_pwsTagName = L"<form";
- static FX_LPCWSTR s_pwsClose = L"</form\n>";
+ static const FX_WCHAR* s_pwsTagName = L"<form";
+ static const FX_WCHAR* s_pwsClose = L"</form\n>";
pStream->WriteString(s_pwsTagName, FXSYS_wcslen(s_pwsTagName));
if (pChecksum != NULL) {
- static FX_LPCWSTR s_pwChecksum = L" checksum=\"";
+ static const FX_WCHAR* s_pwChecksum = L" checksum=\"";
CFX_WideString wsChecksum = CFX_WideString::FromUTF8(pChecksum, FXSYS_strlen(pChecksum));
pStream->WriteString(s_pwChecksum, FXSYS_wcslen(s_pwChecksum));
- pStream->WriteString((FX_LPCWSTR)wsChecksum, wsChecksum.GetLength());
+ pStream->WriteString((const FX_WCHAR*)wsChecksum, wsChecksum.GetLength());
pStream->WriteString(L"\"", 1);
}
pStream->WriteString(L" xmlns=\"", FXSYS_wcslen(L" xmlns=\""));
- FX_LPCWSTR pURI = XFA_GetPacketByIndex(XFA_PACKET_Form)->pURI;
+ const FX_WCHAR* pURI = XFA_GetPacketByIndex(XFA_PACKET_Form)->pURI;
pStream->WriteString(pURI, FXSYS_wcslen(pURI));
CFX_WideString wsVersionNumber;
XFA_DataExporter_RecognizeXFAVersionNumber((CXFA_Node*)pNode->GetDocument()->GetXFANode(XFA_XDPPACKET_Template), wsVersionNumber);
@@ -414,7 +414,7 @@ void XFA_DataExporter_RegenerateFormFile(CXFA_Node* pNode, IFX_Stream* pStream,
wsVersionNumber = FX_WSTRC(L"2.8");
}
wsVersionNumber += FX_WSTRC(L"/\"\n>");
- pStream->WriteString((FX_LPCWSTR)wsVersionNumber, wsVersionNumber.GetLength());
+ pStream->WriteString((const FX_WCHAR*)wsVersionNumber, wsVersionNumber.GetLength());
CXFA_Node* pChildNode = pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
while (pChildNode) {
XFA_DataExporter_RegenerateFormFile_Container(pChildNode, pStream);
@@ -438,7 +438,7 @@ FX_BOOL CXFA_DataExporter::Export(IFX_FileWrite *pWrite)
{
return Export(pWrite, m_pDocument->GetRoot());
}
-FX_BOOL CXFA_DataExporter::Export(IFX_FileWrite *pWrite, CXFA_Node *pNode, FX_DWORD dwFlag , FX_LPCSTR pChecksum )
+FX_BOOL CXFA_DataExporter::Export(IFX_FileWrite *pWrite, CXFA_Node *pNode, FX_DWORD dwFlag , const FX_CHAR* pChecksum )
{
ASSERT(pWrite != NULL);
if (pWrite == NULL) {
@@ -453,18 +453,18 @@ FX_BOOL CXFA_DataExporter::Export(IFX_FileWrite *pWrite, CXFA_Node *pNode, FX_DW
pStream->Release();
return bRet;
}
-FX_BOOL CXFA_DataExporter::Export(IFX_Stream *pStream, CXFA_Node *pNode, FX_DWORD dwFlag, FX_LPCSTR pChecksum)
+FX_BOOL CXFA_DataExporter::Export(IFX_Stream *pStream, CXFA_Node *pNode, FX_DWORD dwFlag, const FX_CHAR* pChecksum)
{
IFDE_XMLDoc* pXMLDoc = m_pDocument->GetParser()->GetXMLDoc();
if(pNode->GetObjectType() == XFA_OBJECTTYPE_ModelNode) {
switch (pNode->GetPacketID()) {
case XFA_XDPPACKET_XDP: {
- static FX_LPCWSTR s_pwsPreamble = L"<xdp:xdp xmlns:xdp=\"http://ns.adobe.com/xdp/\">";
+ static const FX_WCHAR* s_pwsPreamble = L"<xdp:xdp xmlns:xdp=\"http://ns.adobe.com/xdp/\">";
pStream->WriteString(s_pwsPreamble, FXSYS_wcslen(s_pwsPreamble));
for(CXFA_Node *pChild = pNode->GetNodeItem(XFA_NODEITEM_FirstChild); pChild; pChild = pChild->GetNodeItem(XFA_NODEITEM_NextSibling)) {
Export(pStream, pChild, dwFlag, pChecksum);
}
- static FX_LPCWSTR s_pwsPostamble = L"</xdp:xdp\n>";
+ static const FX_WCHAR* s_pwsPostamble = L"</xdp:xdp\n>";
pStream->WriteString(s_pwsPostamble, FXSYS_wcslen(s_pwsPostamble));
}
break;
@@ -509,7 +509,7 @@ FX_BOOL CXFA_DataExporter::Export(IFX_Stream *pStream, CXFA_Node *pNode, FX_DWOR
XFA_DataExporter_DealWithDataGroupNode(pExportNode);
pElement->SetString(FX_WSTRC(L"xmlns:xfa"), FX_WSTRC(L"http://www.xfa.org/schema/xfa-data/1.0/"));
pXMLDoc->SaveXMLNode(pStream, pElement);
- pElement->RemoveAttribute(FX_LPCWSTR(L"xmlns:xfa"));
+ pElement->RemoveAttribute(L"xmlns:xfa");
}
return TRUE;
}
diff --git a/xfa/src/fxfa/src/parser/xfa_document_serialize.h b/xfa/src/fxfa/src/parser/xfa_document_serialize.h
index b4548de07c..e2a3ce6a1a 100644
--- a/xfa/src/fxfa/src/parser/xfa_document_serialize.h
+++ b/xfa/src/fxfa/src/parser/xfa_document_serialize.h
@@ -27,9 +27,9 @@ public:
delete this;
}
virtual FX_BOOL Export(IFX_FileWrite *pWrite);
- virtual FX_BOOL Export(IFX_FileWrite *pWrite, CXFA_Node *pNode, FX_DWORD dwFlag = 0, FX_LPCSTR pChecksum = NULL);
+ virtual FX_BOOL Export(IFX_FileWrite *pWrite, CXFA_Node *pNode, FX_DWORD dwFlag = 0, const FX_CHAR* pChecksum = NULL);
protected:
- FX_BOOL Export(IFX_Stream *pStream, CXFA_Node *pNode, FX_DWORD dwFlag, FX_LPCSTR pChecksum);
+ FX_BOOL Export(IFX_Stream *pStream, CXFA_Node *pNode, FX_DWORD dwFlag, const FX_CHAR* pChecksum);
CXFA_Document *m_pDocument;
};
#endif
diff --git a/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp b/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp
index 4ebc248ec2..fc6ec20f40 100644
--- a/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp
@@ -2388,7 +2388,7 @@ FX_BOOL CXFA_ItemLayoutProcessor::JudgeLeaderOrTrailerForOccur(CXFA_Node* pFormN
return FALSE;
}
iCount++;
- m_PendingNodesCount.SetAt(pTemplate, (FX_LPVOID)(uintptr_t)(iCount));
+ m_PendingNodesCount.SetAt(pTemplate, (void*)(uintptr_t)(iCount));
return TRUE;
}
return TRUE;
diff --git a/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp b/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp
index d5814b921b..699500ddde 100644
--- a/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp
@@ -62,7 +62,7 @@ FX_BOOL CXFA_LayoutPageMgr::InitLayoutPage(CXFA_Node* pFormNode)
m_pPageSetLayoutItemRoot = FX_NEW CXFA_ContainerLayoutItemImpl(m_pTemplatePageSetRoot);
}
m_pPageSetCurRoot = m_pPageSetLayoutItemRoot;
- m_pTemplatePageSetRoot->SetUserData(XFA_LAYOUTITEMKEY, (FX_LPVOID)m_pPageSetLayoutItemRoot);
+ m_pTemplatePageSetRoot->SetUserData(XFA_LAYOUTITEMKEY, (void*)m_pPageSetLayoutItemRoot);
XFA_ATTRIBUTEENUM eRelation = m_pTemplatePageSetRoot->GetEnum(XFA_ATTRIBUTE_Relation);
if(eRelation != XFA_ATTRIBUTEENUM_Unknown) {
m_ePageSetMode = eRelation;
@@ -324,7 +324,7 @@ CXFA_ContainerRecord* CXFA_LayoutPageMgr::CreateContainerRecord(CXFA_Node* pPage
pParentPageSetLayout = (CXFA_ContainerLayoutItemImpl*)pPageSet->GetNodeItem(XFA_NODEITEM_Parent)->GetUserData(XFA_LAYOUTITEMKEY);
}
CXFA_ContainerLayoutItemImpl* pPageSetLayoutItem = FX_NEW CXFA_ContainerLayoutItemImpl(pPageSet);
- pPageSet->SetUserData(XFA_LAYOUTITEMKEY, (FX_LPVOID)pPageSetLayoutItem);
+ pPageSet->SetUserData(XFA_LAYOUTITEMKEY, (void*)pPageSetLayoutItem);
if(pParentPageSetLayout == NULL) {
CXFA_ContainerLayoutItemImpl* pPrePageSet = m_pPageSetLayoutItemRoot;
while(pPrePageSet->m_pNextSibling) {
@@ -344,7 +344,7 @@ CXFA_ContainerRecord* CXFA_LayoutPageMgr::CreateContainerRecord(CXFA_Node* pPage
pNewRecord->pCurPageSet = m_pPageSetLayoutItemRoot;
} else {
CXFA_ContainerLayoutItemImpl* pPageSetLayoutItem = FX_NEW CXFA_ContainerLayoutItemImpl(pPageSet);
- pPageSet->SetUserData(XFA_LAYOUTITEMKEY, (FX_LPVOID)pPageSetLayoutItem);
+ pPageSet->SetUserData(XFA_LAYOUTITEMKEY, (void*)pPageSetLayoutItem);
m_pPageSetLayoutItemRoot->AddChild(pPageSetLayoutItem);
pNewRecord->pCurPageSet = pPageSetLayoutItem;
}
@@ -368,7 +368,7 @@ void CXFA_LayoutPageMgr::AddPageAreaLayoutItem(CXFA_ContainerRecord* pNewRecord,
CXFA_ContainerLayoutItemImpl* pContainerItem = (CXFA_ContainerLayoutItemImpl*)pNotify->OnCreateLayoutItem(pNewPageArea);
m_PageArray.Add(pContainerItem);
m_nAvailPages++;
- pNotify->OnPageEvent((IXFA_LayoutPage*)pContainerItem, XFA_PAGEEVENT_PageAdded, (FX_LPVOID)(uintptr_t)m_nAvailPages);
+ pNotify->OnPageEvent((IXFA_LayoutPage*)pContainerItem, XFA_PAGEEVENT_PageAdded, (void*)(uintptr_t)m_nAvailPages);
pNewPageAreaLayoutItem = pContainerItem;
}
pNewRecord->pCurPageSet->AddChild(pNewPageAreaLayoutItem);
@@ -1548,7 +1548,7 @@ void XFA_SyncContainer(IXFA_Notify* pNotify, IXFA_DocLayout* pDocLayout, CXFA_La
dwRelevantContainer = XFA_GetRelevant(pContainerItem->m_pFormNode, dwRelevant);
dwStatus = (bVisibleItem ? XFA_LAYOUTSTATUS_Visible : 0) | dwRelevantContainer;
}
- pNotify->OnLayoutEvent(pDocLayout, (CXFA_LayoutItem*)pContainerItem, XFA_LAYOUTEVENT_ItemAdded, (FX_LPVOID)(uintptr_t)nPageIndex, (FX_LPVOID)(uintptr_t)dwStatus);
+ pNotify->OnLayoutEvent(pDocLayout, (CXFA_LayoutItem*)pContainerItem, XFA_LAYOUTEVENT_ItemAdded, (void*)(uintptr_t)nPageIndex, (void*)(uintptr_t)dwStatus);
CXFA_LayoutItemImpl *pChild = pContainerItem->m_pFirstChild;
while (pChild) {
if (!pChild->IsContentLayoutItem()) {
diff --git a/xfa/src/fxfa/src/parser/xfa_locale.cpp b/xfa/src/fxfa/src/parser/xfa_locale.cpp
index 83c61d1a72..56a55cd4c3 100644
--- a/xfa/src/fxfa/src/parser/xfa_locale.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_locale.cpp
@@ -17,10 +17,10 @@
#include "../common/xfa_fm2jsapi.h"
#include "xfa_debug_parser.h"
#include "xfa_locale.h"
-const static FX_LPCWSTR g_FX_Percent = L"z,zzz,zzz,zzz,zzz,zzz%";
-const static FX_LPCWSTR g_FX_Currency = L"$z,zzz,zzz,zzz,zzz,zz9.99";
-const static FX_LPCWSTR g_FX_Decimal = L"z,zzz,zzz,zzz,zzz,zz9.zzz";
-const static FX_LPCWSTR g_FX_Integer = L"z,zzz,zzz,zzz,zzz,zzz";
+static const FX_WCHAR* g_FX_Percent = L"z,zzz,zzz,zzz,zzz,zzz%";
+static const FX_WCHAR* g_FX_Currency = L"$z,zzz,zzz,zzz,zzz,zz9.99";
+static const FX_WCHAR* g_FX_Decimal = L"z,zzz,zzz,zzz,zzz,zz9.zzz";
+static const FX_WCHAR* g_FX_Integer = L"z,zzz,zzz,zzz,zzz,zzz";
CXFA_XMLLocale::CXFA_XMLLocale(CXML_Element* pLocaleData)
{
m_pLocaleData = pLocaleData;
@@ -79,7 +79,7 @@ void CXFA_XMLLocale::GetNumbericSymbol(FX_LOCALENUMSYMBOL eType, CFX_WideString&
if (!pElement) {
return;
}
- GetPattern(pElement, CFX_ByteStringC((FX_LPCSTR)bsSymbols, bsSymbols.GetLength() - 1), wsName, wsNumSymbol);
+ GetPattern(pElement, CFX_ByteStringC((const FX_CHAR*)bsSymbols, bsSymbols.GetLength() - 1), wsName, wsNumSymbol);
}
void CXFA_XMLLocale::GetDateTimeSymbols(CFX_WideString& wsDtSymbol) const
{
diff --git a/xfa/src/fxfa/src/parser/xfa_localemgr.cpp b/xfa/src/fxfa/src/parser/xfa_localemgr.cpp
index cc136ae2ac..69b34993b9 100644
--- a/xfa/src/fxfa/src/parser/xfa_localemgr.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_localemgr.cpp
@@ -648,7 +648,7 @@ const uint8_t g_ruRU_Locale[] = {
0xB9, 0xB4, 0x0A, 0x19, 0x89, 0x26, 0xB5, 0x2C, 0xA3, 0xB6, 0x4E, 0x5C, 0xA6, 0x17, 0xA4, 0x7B, 0xB3, 0x85, 0xFA, 0x59,
0x2A, 0x7A, 0xFF, 0x3D, 0xC4, 0x3F, 0xDE, 0xCB, 0x8B, 0xC4
};
-static IFX_Locale* XFA_GetLocaleFromBuffer(FX_LPCBYTE pBuf, int nBufLen)
+static IFX_Locale* XFA_GetLocaleFromBuffer(const uint8_t* pBuf, int nBufLen)
{
if (pBuf == NULL || nBufLen <= 0) {
return NULL;
@@ -662,7 +662,7 @@ static IFX_Locale* XFA_GetLocaleFromBuffer(FX_LPCBYTE pBuf, int nBufLen)
return NULL;
}
CXML_Element* pLocale = NULL;
- FX_LPBYTE pOut = NULL;
+ uint8_t* pOut = NULL;
FX_DWORD dwSize;
pCodecMgr->GetFlateModule()->FlateOrLZWDecode(FALSE,
pBuf, nBufLen, TRUE, 0, 0, 0, 0, 0, pOut, dwSize);
diff --git a/xfa/src/fxfa/src/parser/xfa_localevalue.cpp b/xfa/src/fxfa/src/parser/xfa_localevalue.cpp
index 3f9d066122..b8d1526998 100644
--- a/xfa/src/fxfa/src/parser/xfa_localevalue.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_localevalue.cpp
@@ -204,7 +204,7 @@ FX_FLOAT CXFA_LocaleValue::GetNum() const
int32_t nExponent = 0;
int cc = 0;
FX_BOOL bNegative = FALSE, bExpSign = FALSE;
- FX_LPCWSTR str = (FX_LPCWSTR)m_wsValue;
+ const FX_WCHAR* str = (const FX_WCHAR*)m_wsValue;
int len = m_wsValue.GetLength();
while (XFA_IsSpace(str[cc]) && cc < len) {
cc++;
@@ -280,7 +280,7 @@ FX_DOUBLE CXFA_LocaleValue::GetDoubleNum() const
int32_t nExponent = 0;
int32_t cc = 0;
FX_BOOL bNegative = FALSE, bExpSign = FALSE;
- FX_LPCWSTR str = (FX_LPCWSTR)m_wsValue;
+ const FX_WCHAR* str = (const FX_WCHAR*)m_wsValue;
int len = m_wsValue.GetLength();
while (XFA_IsSpace(str[cc]) && cc < len) {
cc++;
@@ -581,7 +581,7 @@ FX_BOOL CXFA_LocaleValue::ValidateCanonicalDate(const CFX_WideString& wsDate, CF
}
FX_BOOL bSymbol = (wsDate.Find(0x2D) == -1) ? FALSE : TRUE;
FX_WORD wYear = 0, wMonth = 0, wDay = 0;
- FX_LPCWSTR pDate = (FX_LPCWSTR)wsDate;
+ const FX_WCHAR* pDate = (const FX_WCHAR*)wsDate;
int nIndex = 0, nStart = 0;
while (pDate[nIndex] != '\0' && nIndex < wCountY) {
if (!XFA_IsDigit(pDate[nIndex])) {
@@ -663,7 +663,7 @@ FX_BOOL CXFA_LocaleValue::ValidateCanonicalTime(const CFX_WideString& wsTime)
const FX_WORD wCountH = 2, wCountM = 2, wCountS = 2, wCountF = 3;
FX_BOOL bSymbol = (wsTime.Find(':') == -1) ? FALSE : TRUE;
FX_WORD wHour = 0, wMinute = 0, wSecond = 0, wFraction = 0;
- FX_LPCWSTR pTime = (FX_LPCWSTR)wsTime;
+ const FX_WCHAR* pTime = (const FX_WCHAR*)wsTime;
int nIndex = 0, nStart = 0;
while (pTime[nIndex] != '\0' && nIndex - nStart < wCountH) {
if (!XFA_IsDigit(pTime[nIndex])) {
@@ -876,7 +876,7 @@ void CXFA_LocaleValue::GetNumbericFormat(CFX_WideString &wsFormat, int32_t nIntL
+ (bSign ? 1 : 0) \
+ (nDecLen >= 0 ? nDecLen : 2) \
+ (nDecLen == 0 ? 0 : 1);
- FX_LPWSTR lpBuf = wsFormat.GetBuffer(nTotalLen);
+ FX_WCHAR* lpBuf = wsFormat.GetBuffer(nTotalLen);
int32_t nPos = 0;
if (bSign) {
lpBuf[nPos++] = L's';
@@ -909,8 +909,8 @@ FX_BOOL CXFA_LocaleValue::ValidateNumericTemp(CFX_WideString& wsNumeric, CFX_Wid
if (wsFormat.IsEmpty() || wsNumeric.IsEmpty()) {
return TRUE;
}
- FX_LPCWSTR pNum = FX_LPCWSTR(wsNumeric);
- FX_LPCWSTR pFmt = FX_LPCWSTR(wsFormat);
+ const FX_WCHAR* pNum = wsNumeric.c_str();
+ const FX_WCHAR* pFmt = wsFormat.c_str();
int32_t n = 0, nf = 0;
FX_WCHAR c = pNum[n];
FX_WCHAR cf = pFmt[nf];
diff --git a/xfa/src/fxfa/src/parser/xfa_object_imp.cpp b/xfa/src/fxfa/src/parser/xfa_object_imp.cpp
index 153110492f..c1d09fdbdc 100644
--- a/xfa/src/fxfa/src/parser/xfa_object_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_object_imp.cpp
@@ -68,17 +68,17 @@ void CXFA_Object::ThrowScriptErrorMessage(int32_t iStringID, ...)
CFX_WideString wsMessage;
va_list arg_ptr;
va_start(arg_ptr, iStringID);
- wsMessage.FormatV((FX_LPCWSTR)wsFormat, arg_ptr);
+ wsMessage.FormatV((const FX_WCHAR*)wsFormat, arg_ptr);
va_end(arg_ptr);
FXJSE_ThrowMessage(FX_BSTRC(""), FX_UTF8Encode(wsMessage, wsMessage.GetLength()));
}
-static void XFA_DeleteWideString(FX_LPVOID pData)
+static void XFA_DeleteWideString(void* pData)
{
if (pData) {
delete (CFX_WideString*)pData;
}
}
-static void XFA_CopyWideString(FX_LPVOID& pData)
+static void XFA_CopyWideString(void*& pData)
{
if (pData) {
CFX_WideString* pNewData = FX_NEW CFX_WideString(*(CFX_WideString*)pData);
@@ -339,7 +339,7 @@ int32_t CXFA_Node::GetBindItems(CXFA_NodeArray& formItems)
{
if (m_uFlags & XFA_NODEFLAG_BindFormItems) {
CXFA_NodeArray* pItems = NULL;
- TryObject(XFA_ATTRIBUTE_BindingNode, (FX_LPVOID&)pItems);
+ TryObject(XFA_ATTRIBUTE_BindingNode, (void*&)pItems);
formItems.Copy(*pItems);
return formItems.GetSize();
}
@@ -349,7 +349,7 @@ int32_t CXFA_Node::GetBindItems(CXFA_NodeArray& formItems)
}
return formItems.GetSize();
}
-static void XFA_DataNodeDeleteBindItem(FX_LPVOID pData)
+static void XFA_DataNodeDeleteBindItem(void* pData)
{
if (pData) {
delete ((CXFA_NodeArray*)pData);
@@ -361,7 +361,7 @@ int32_t CXFA_Node::AddBindItem(CXFA_Node* pFormNode)
ASSERT(pFormNode);
if (m_uFlags & XFA_NODEFLAG_BindFormItems) {
CXFA_NodeArray* pItems = NULL;
- TryObject(XFA_ATTRIBUTE_BindingNode, (FX_LPVOID&)pItems);
+ TryObject(XFA_ATTRIBUTE_BindingNode, (void*&)pItems);
ASSERT(pItems);
if (pItems->Find(pFormNode) < 0) {
pItems->Add(pFormNode);
@@ -386,7 +386,7 @@ int32_t CXFA_Node::RemoveBindItem(CXFA_Node* pFormNode)
{
if (m_uFlags & XFA_NODEFLAG_BindFormItems) {
CXFA_NodeArray* pItems = NULL;
- TryObject(XFA_ATTRIBUTE_BindingNode, (FX_LPVOID&)pItems);
+ TryObject(XFA_ATTRIBUTE_BindingNode, (void*&)pItems);
ASSERT(pItems);
int32_t iIndex = pItems->Find(pFormNode);
int32_t iCount = pItems->GetSize();
@@ -1243,7 +1243,7 @@ void CXFA_Node::Script_Attribute_BOOLRead(FXJSE_HVALUE hValue, FX_BOOL bSetting,
ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
}
}
-void CXFA_Node::Script_Attribute_SendAttributeChangeMessage(FX_LPVOID eAttribute, FX_LPVOID eValue, FX_BOOL bScriptModify)
+void CXFA_Node::Script_Attribute_SendAttributeChangeMessage(void* eAttribute, void* eValue, FX_BOOL bScriptModify)
{
CXFA_LayoutProcessor* pLayoutPro = m_pDocument->GetLayoutProcessor();
if (!pLayoutPro) {
@@ -1403,9 +1403,9 @@ void CXFA_Node::Script_Attribute_String(FXJSE_HVALUE hValue, FX_BOOL bSetting, X
CXFA_Node* pProtoRoot = pTemplateNode->GetFirstChildByClass(XFA_ELEMENT_Subform)->GetFirstChildByClass(XFA_ELEMENT_Proto);
if(!wsUseVal.IsEmpty()) {
if(wsUseVal[0] == '#') {
- wsID = CFX_WideString((FX_LPCWSTR)wsUseVal + 1, wsUseVal.GetLength() - 1);
+ wsID = CFX_WideString((const FX_WCHAR*)wsUseVal + 1, wsUseVal.GetLength() - 1);
} else {
- wsSOM = CFX_WideString((FX_LPCWSTR)wsUseVal, wsUseVal.GetLength());
+ wsSOM = CFX_WideString((const FX_WCHAR*)wsUseVal, wsUseVal.GetLength());
}
}
CXFA_Node* pProtoNode = NULL;
@@ -1646,7 +1646,7 @@ void CXFA_Node::Script_Boolean_Value(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_
struct XFA_ExecEventParaInfo {
public:
uint32_t m_uHash;
- FX_LPCWSTR m_lpcEventName;
+ const FX_WCHAR* m_lpcEventName;
XFA_EVENTTYPE m_eventType;
uint32_t m_validFlags;
};
@@ -2581,7 +2581,7 @@ void CXFA_Node::Script_Template_CreateNode(CFXJSE_Arguments* pArguments)
}
FXJSE_Value_Set(pArguments->GetReturnValue(), m_pDocument->GetScriptContext()->GetJSValueFromMap(pNewNode));
} else {
- ThrowScriptErrorMessage(XFA_IDS_NOT_HAVE_PROPERTY, (FX_LPCWSTR)strTagName, L"name");
+ ThrowScriptErrorMessage(XFA_IDS_NOT_HAVE_PROPERTY, (const FX_WCHAR*)strTagName, L"name");
}
} else {
FXJSE_Value_Set(pArguments->GetReturnValue(), m_pDocument->GetScriptContext()->GetJSValueFromMap(pNewNode));
@@ -3504,23 +3504,23 @@ enum XFA_KEYTYPE {
XFA_KEYTYPE_Custom,
XFA_KEYTYPE_Element,
};
-FX_LPVOID XFA_GetMapKey_Custom(FX_WSTR wsKey)
+void* XFA_GetMapKey_Custom(FX_WSTR wsKey)
{
FX_DWORD dwKey = FX_HashCode_String_GetW(wsKey.GetPtr(), wsKey.GetLength());
- return (FX_LPVOID)(uintptr_t)((dwKey << 1) | XFA_KEYTYPE_Custom);
+ return (void*)(uintptr_t)((dwKey << 1) | XFA_KEYTYPE_Custom);
}
-FX_LPVOID XFA_GetMapKey_Element(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute)
+void* XFA_GetMapKey_Element(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute)
{
- return (FX_LPVOID)(uintptr_t)((eElement << 16) | (eAttribute << 8) | XFA_KEYTYPE_Element);
+ return (void*)(uintptr_t)((eElement << 16) | (eAttribute << 8) | XFA_KEYTYPE_Element);
}
-static inline FX_BOOL XFA_NodeData_PrepareKey(XFA_ELEMENT eElem, XFA_ATTRIBUTE eAttr, FX_LPVOID &pKey)
+static inline FX_BOOL XFA_NodeData_PrepareKey(XFA_ELEMENT eElem, XFA_ATTRIBUTE eAttr, void* &pKey)
{
pKey = XFA_GetMapKey_Element(eElem, eAttr);
return TRUE;
}
FX_BOOL CXFA_Node::HasAttribute(XFA_ATTRIBUTE eAttr, FX_BOOL bCanInherit )
{
- FX_LPVOID pKey = NULL;
+ void* pKey = NULL;
if (!XFA_NodeData_PrepareKey(GetClassID(), eAttr, pKey)) {
return FALSE;
}
@@ -3624,7 +3624,7 @@ FX_BOOL CXFA_Node::SetAttribute(FX_WSTR wsAttr, FX_WSTR wsValue, FX_BOOL bNotify
if (pAttributeInfo) {
return SetAttribute(pAttributeInfo->eName, wsValue, bNotify);
}
- FX_LPVOID pKey = XFA_GetMapKey_Custom(wsAttr);
+ void* pKey = XFA_GetMapKey_Custom(wsAttr);
SetMapModuleString(pKey, wsValue);
return TRUE;
}
@@ -3634,7 +3634,7 @@ FX_BOOL CXFA_Node::GetAttribute(FX_WSTR wsAttr, CFX_WideString &wsValue, FX_BOOL
if (pAttributeInfo) {
return GetAttribute(pAttributeInfo->eName, wsValue, bUseDefault);
}
- FX_LPVOID pKey = XFA_GetMapKey_Custom(wsAttr);
+ void* pKey = XFA_GetMapKey_Custom(wsAttr);
CFX_WideStringC wsValueC;
if (GetMapModuleString(pKey, wsValueC)) {
wsValue = wsValueC;
@@ -3643,13 +3643,13 @@ FX_BOOL CXFA_Node::GetAttribute(FX_WSTR wsAttr, CFX_WideString &wsValue, FX_BOOL
}
FX_BOOL CXFA_Node::RemoveAttribute(FX_WSTR wsAttr)
{
- FX_LPVOID pKey = XFA_GetMapKey_Custom(wsAttr);
+ void* pKey = XFA_GetMapKey_Custom(wsAttr);
RemoveMapModuleKey(pKey);
return TRUE;
}
FX_BOOL CXFA_Node::TryBoolean(XFA_ATTRIBUTE eAttr, FX_BOOL &bValue, FX_BOOL bUseDefault )
{
- FX_LPVOID pValue = NULL;
+ void* pValue = NULL;
if (!GetValue(eAttr, XFA_ATTRIBUTETYPE_Boolean, bUseDefault, pValue)) {
return FALSE;
}
@@ -3658,7 +3658,7 @@ FX_BOOL CXFA_Node::TryBoolean(XFA_ATTRIBUTE eAttr, FX_BOOL &bValue, FX_BOOL bUse
}
FX_BOOL CXFA_Node::TryInteger(XFA_ATTRIBUTE eAttr, int32_t &iValue, FX_BOOL bUseDefault)
{
- FX_LPVOID pValue = NULL;
+ void* pValue = NULL;
if (!GetValue(eAttr, XFA_ATTRIBUTETYPE_Integer, bUseDefault, pValue)) {
return FALSE;
}
@@ -3667,7 +3667,7 @@ FX_BOOL CXFA_Node::TryInteger(XFA_ATTRIBUTE eAttr, int32_t &iValue, FX_BOOL bUse
}
FX_BOOL CXFA_Node::TryEnum(XFA_ATTRIBUTE eAttr, XFA_ATTRIBUTEENUM &eValue, FX_BOOL bUseDefault)
{
- FX_LPVOID pValue = NULL;
+ void* pValue = NULL;
if (!GetValue(eAttr, XFA_ATTRIBUTETYPE_Enum, bUseDefault, pValue)) {
return FALSE;
}
@@ -3676,7 +3676,7 @@ FX_BOOL CXFA_Node::TryEnum(XFA_ATTRIBUTE eAttr, XFA_ATTRIBUTEENUM &eValue, FX_BO
}
FX_BOOL CXFA_Node::SetMeasure(XFA_ATTRIBUTE eAttr, CXFA_Measurement mValue, FX_BOOL bNotify )
{
- FX_LPVOID pKey = NULL;
+ void* pKey = NULL;
if (!XFA_NodeData_PrepareKey(GetClassID(), eAttr, pKey)) {
return FALSE;
}
@@ -3687,11 +3687,11 @@ FX_BOOL CXFA_Node::SetMeasure(XFA_ATTRIBUTE eAttr, CXFA_Measurement mValue, FX_B
}
FX_BOOL CXFA_Node::TryMeasure(XFA_ATTRIBUTE eAttr, CXFA_Measurement &mValue, FX_BOOL bUseDefault)
{
- FX_LPVOID pKey = NULL;
+ void* pKey = NULL;
if (!XFA_NodeData_PrepareKey(GetClassID(), eAttr, pKey)) {
return FALSE;
}
- FX_LPVOID pValue;
+ void* pValue;
int32_t iBytes;
if(GetMapModuleBuffer(pKey, pValue, iBytes) && iBytes == sizeof(mValue)) {
FX_memcpy(&mValue, pValue, sizeof(mValue));
@@ -3705,11 +3705,11 @@ FX_BOOL CXFA_Node::TryMeasure(XFA_ATTRIBUTE eAttr, CXFA_Measurement &mValue, FX_
}
FX_BOOL CXFA_Node::SetCData(XFA_ATTRIBUTE eAttr, const CFX_WideString& wsValue, FX_BOOL bNotify, FX_BOOL bScriptModify)
{
- FX_LPVOID pKey = NULL;
+ void* pKey = NULL;
if (!XFA_NodeData_PrepareKey(GetClassID(), eAttr, pKey)) {
return FALSE;
}
- OnChanging(eAttr, (FX_LPVOID)(FX_LPCWSTR)wsValue, bNotify);
+ OnChanging(eAttr, (void*)(const FX_WCHAR*)wsValue, bNotify);
if (eAttr == XFA_ATTRIBUTE_Value) {
CFX_WideString *pClone = FX_NEW CFX_WideString(wsValue);
if (pClone == NULL) {
@@ -3725,7 +3725,7 @@ FX_BOOL CXFA_Node::SetCData(XFA_ATTRIBUTE eAttr, const CFX_WideString& wsValue,
}
}
}
- OnChanged(eAttr, (FX_LPVOID)(FX_LPCWSTR)wsValue, bNotify, bScriptModify);
+ OnChanged(eAttr, (void*)(const FX_WCHAR*)wsValue, bNotify, bScriptModify);
if (IsNeedSavingXMLNode() && eAttr != XFA_ATTRIBUTE_QualifiedName && eAttr != XFA_ATTRIBUTE_BindingNode) {
if (eAttr == XFA_ATTRIBUTE_Name && (m_eNodeClass == XFA_ELEMENT_DataValue || m_eNodeClass == XFA_ELEMENT_DataGroup)) {
return TRUE;
@@ -3775,17 +3775,17 @@ FX_BOOL CXFA_Node::SetCData(XFA_ATTRIBUTE eAttr, const CFX_WideString& wsValue,
}
FX_BOOL CXFA_Node::SetAttributeValue(const CFX_WideString& wsValue, const CFX_WideString& wsXMLValue, FX_BOOL bNotify, FX_BOOL bScriptModify)
{
- FX_LPVOID pKey = NULL;
+ void* pKey = NULL;
if (!XFA_NodeData_PrepareKey(GetClassID(), XFA_ATTRIBUTE_Value, pKey)) {
return FALSE;
}
- OnChanging(XFA_ATTRIBUTE_Value, (FX_LPVOID)(FX_LPCWSTR)wsValue, bNotify);
+ OnChanging(XFA_ATTRIBUTE_Value, (void*)(const FX_WCHAR*)wsValue, bNotify);
CFX_WideString *pClone = FX_NEW CFX_WideString(wsValue);
if (pClone == NULL) {
return FALSE;
}
SetUserData(pKey, pClone, &deleteWideStringCallBack);
- OnChanged(XFA_ATTRIBUTE_Value, (FX_LPVOID)(FX_LPCWSTR)wsValue, bNotify, bScriptModify);
+ OnChanged(XFA_ATTRIBUTE_Value, (void*)(const FX_WCHAR*)wsValue, bNotify, bScriptModify);
if (IsNeedSavingXMLNode()) {
FDE_XMLNODETYPE eXMLType = m_pXMLNode->GetType();
switch (eXMLType) {
@@ -3820,7 +3820,7 @@ FX_BOOL CXFA_Node::SetAttributeValue(const CFX_WideString& wsValue, const CFX_Wi
}
FX_BOOL CXFA_Node::TryCData(XFA_ATTRIBUTE eAttr, CFX_WideString &wsValue, FX_BOOL bUseDefault, FX_BOOL bProto)
{
- FX_LPVOID pKey = NULL;
+ void* pKey = NULL;
if (!XFA_NodeData_PrepareKey(GetClassID(), eAttr, pKey)) {
return FALSE;
}
@@ -3840,16 +3840,16 @@ FX_BOOL CXFA_Node::TryCData(XFA_ATTRIBUTE eAttr, CFX_WideString &wsValue, FX_BOO
if (!bUseDefault) {
return FALSE;
}
- FX_LPVOID pValue = NULL;
+ void* pValue = NULL;
if (XFA_GetAttributeDefaultValue(pValue, GetClassID(), eAttr, XFA_ATTRIBUTETYPE_Cdata, m_ePacket)) {
- wsValue = (FX_LPCWSTR)pValue;
+ wsValue = (const FX_WCHAR*)pValue;
return TRUE;
}
return FALSE;
}
FX_BOOL CXFA_Node::TryCData(XFA_ATTRIBUTE eAttr, CFX_WideStringC &wsValue, FX_BOOL bUseDefault, FX_BOOL bProto)
{
- FX_LPVOID pKey = NULL;
+ void* pKey = NULL;
if (!XFA_NodeData_PrepareKey(GetClassID(), eAttr, pKey)) {
return FALSE;
}
@@ -3867,33 +3867,33 @@ FX_BOOL CXFA_Node::TryCData(XFA_ATTRIBUTE eAttr, CFX_WideStringC &wsValue, FX_BO
if (!bUseDefault) {
return FALSE;
}
- FX_LPVOID pValue = NULL;
+ void* pValue = NULL;
if (XFA_GetAttributeDefaultValue(pValue, GetClassID(), eAttr, XFA_ATTRIBUTETYPE_Cdata, m_ePacket)) {
- wsValue = (CFX_WideStringC)(FX_LPCWSTR)pValue;
+ wsValue = (CFX_WideStringC)(const FX_WCHAR*)pValue;
return TRUE;
}
return FALSE;
}
-FX_BOOL CXFA_Node::SetObject(XFA_ATTRIBUTE eAttr, FX_LPVOID pData, XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo )
+FX_BOOL CXFA_Node::SetObject(XFA_ATTRIBUTE eAttr, void* pData, XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo )
{
- FX_LPVOID pKey = NULL;
+ void* pKey = NULL;
if (!XFA_NodeData_PrepareKey(GetClassID(), eAttr, pKey)) {
return FALSE;
}
return SetUserData(pKey, pData, pCallbackInfo);
}
-FX_BOOL CXFA_Node::TryObject(XFA_ATTRIBUTE eAttr, FX_LPVOID &pData)
+FX_BOOL CXFA_Node::TryObject(XFA_ATTRIBUTE eAttr, void* &pData)
{
- FX_LPVOID pKey = NULL;
+ void* pKey = NULL;
if (!XFA_NodeData_PrepareKey(GetClassID(), eAttr, pKey)) {
return FALSE;
}
pData = GetUserData(pKey);
return pData != NULL;
}
-FX_BOOL CXFA_Node::SetValue(XFA_ATTRIBUTE eAttr, XFA_ATTRIBUTETYPE eType, FX_LPVOID pValue, FX_BOOL bNotify)
+FX_BOOL CXFA_Node::SetValue(XFA_ATTRIBUTE eAttr, XFA_ATTRIBUTETYPE eType, void* pValue, FX_BOOL bNotify)
{
- FX_LPVOID pKey = NULL;
+ void* pKey = NULL;
if (!XFA_NodeData_PrepareKey(GetClassID(), eAttr, pKey)) {
return FALSE;
}
@@ -3921,9 +3921,9 @@ FX_BOOL CXFA_Node::SetValue(XFA_ATTRIBUTE eAttr, XFA_ATTRIBUTETYPE eType, FX_LPV
}
return TRUE;
}
-FX_BOOL CXFA_Node::GetValue(XFA_ATTRIBUTE eAttr, XFA_ATTRIBUTETYPE eType, FX_BOOL bUseDefault, FX_LPVOID &pValue)
+FX_BOOL CXFA_Node::GetValue(XFA_ATTRIBUTE eAttr, XFA_ATTRIBUTETYPE eType, FX_BOOL bUseDefault, void* &pValue)
{
- FX_LPVOID pKey = NULL;
+ void* pKey = NULL;
if (!XFA_NodeData_PrepareKey(GetClassID(), eAttr, pKey)) {
return FALSE;
}
@@ -3935,22 +3935,22 @@ FX_BOOL CXFA_Node::GetValue(XFA_ATTRIBUTE eAttr, XFA_ATTRIBUTETYPE eType, FX_BOO
}
return XFA_GetAttributeDefaultValue(pValue, GetClassID(), eAttr, eType, m_ePacket);
}
-static void XFA_DefaultFreeData(FX_LPVOID pData)
+static void XFA_DefaultFreeData(void* pData)
{
}
static XFA_MAPDATABLOCKCALLBACKINFO gs_XFADefaultFreeData = {XFA_DefaultFreeData, NULL};
-FX_BOOL CXFA_Node::SetUserData(FX_LPVOID pKey, FX_LPVOID pData, XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo )
+FX_BOOL CXFA_Node::SetUserData(void* pKey, void* pData, XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo )
{
- SetMapModuleBuffer(pKey, &pData, sizeof(FX_LPVOID), pCallbackInfo ? pCallbackInfo : &gs_XFADefaultFreeData);
+ SetMapModuleBuffer(pKey, &pData, sizeof(void*), pCallbackInfo ? pCallbackInfo : &gs_XFADefaultFreeData);
return TRUE;
}
-FX_BOOL CXFA_Node::TryUserData(FX_LPVOID pKey, FX_LPVOID &pData, FX_BOOL bProtoAlso)
+FX_BOOL CXFA_Node::TryUserData(void* pKey, void* &pData, FX_BOOL bProtoAlso)
{
int32_t iBytes = 0;
if (!GetMapModuleBuffer(pKey, pData, iBytes, bProtoAlso)) {
return FALSE;
}
- return iBytes == sizeof(FX_LPVOID) && FXSYS_memcpy(&pData, pData, iBytes);
+ return iBytes == sizeof(void*) && FXSYS_memcpy(&pData, pData, iBytes);
}
FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent, const CFX_WideString& wsXMLValue, FX_BOOL bNotify, FX_BOOL bScriptModify, FX_BOOL bSyncData)
{
@@ -4607,19 +4607,19 @@ void CXFA_Node::OnRemoved(CXFA_Node *pParent, CXFA_Node *pRemoved, FX_BOOL bNoti
}
}
}
-void CXFA_Node::OnChanging(XFA_ATTRIBUTE eAttr, FX_LPVOID pNewValue, FX_BOOL bNotify)
+void CXFA_Node::OnChanging(XFA_ATTRIBUTE eAttr, void* pNewValue, FX_BOOL bNotify)
{
if (bNotify && HasFlag(XFA_NODEFLAG_Initialized)) {
IXFA_Notify *pNotify = m_pDocument->GetParser()->GetNotify();
if (pNotify) {
- pNotify->OnNodeEvent(this, XFA_NODEEVENT_ValueChanging, (FX_LPVOID)(uintptr_t)eAttr, pNewValue);
+ pNotify->OnNodeEvent(this, XFA_NODEEVENT_ValueChanging, (void*)(uintptr_t)eAttr, pNewValue);
}
}
}
-void CXFA_Node::OnChanged(XFA_ATTRIBUTE eAttr, FX_LPVOID pNewValue, FX_BOOL bNotify, FX_BOOL bScriptModify)
+void CXFA_Node::OnChanged(XFA_ATTRIBUTE eAttr, void* pNewValue, FX_BOOL bNotify, FX_BOOL bScriptModify)
{
if (bNotify && HasFlag(XFA_NODEFLAG_Initialized)) {
- Script_Attribute_SendAttributeChangeMessage((FX_LPVOID)(uintptr_t)eAttr, pNewValue, bScriptModify);
+ Script_Attribute_SendAttributeChangeMessage((void*)(uintptr_t)eAttr, pNewValue, bScriptModify);
}
}
int32_t CXFA_Node::execSingleEventByName(FX_WSTR wsEventName, XFA_ELEMENT eElementType)
@@ -4703,7 +4703,7 @@ XFA_LPMAPMODULEDATA CXFA_Node::GetMapModuleData(FX_BOOL bCreateNew)
}
return m_pMapModuleData;
}
-void CXFA_Node::SetMapModuleValue(FX_LPVOID pKey, FX_LPVOID pValue)
+void CXFA_Node::SetMapModuleValue(void* pKey, void* pValue)
{
XFA_LPMAPMODULEDATA pMoudle = this->GetMapModuleData(TRUE);
if (!pMoudle) {
@@ -4711,7 +4711,7 @@ void CXFA_Node::SetMapModuleValue(FX_LPVOID pKey, FX_LPVOID pValue)
}
pMoudle->m_ValueMap.SetAt(pKey, pValue);
}
-FX_BOOL CXFA_Node::GetMapModuleValue(FX_LPVOID pKey, FX_LPVOID &pValue)
+FX_BOOL CXFA_Node::GetMapModuleValue(void* pKey, void* &pValue)
{
CXFA_Node* pNode = this;
while (pNode) {
@@ -4723,21 +4723,21 @@ FX_BOOL CXFA_Node::GetMapModuleValue(FX_LPVOID pKey, FX_LPVOID &pValue)
}
return FALSE;
}
-void CXFA_Node::SetMapModuleString(FX_LPVOID pKey, FX_WSTR wsValue)
+void CXFA_Node::SetMapModuleString(void* pKey, FX_WSTR wsValue)
{
- SetMapModuleBuffer(pKey, (FX_LPVOID)wsValue.GetPtr(), wsValue.GetLength() * sizeof(FX_WCHAR));
+ SetMapModuleBuffer(pKey, (void*)wsValue.GetPtr(), wsValue.GetLength() * sizeof(FX_WCHAR));
}
-FX_BOOL CXFA_Node::GetMapModuleString(FX_LPVOID pKey, CFX_WideStringC &wsValue)
+FX_BOOL CXFA_Node::GetMapModuleString(void* pKey, CFX_WideStringC &wsValue)
{
- FX_LPVOID pValue;
+ void* pValue;
int32_t iBytes;
if (!GetMapModuleBuffer(pKey, pValue, iBytes)) {
return FALSE;
}
- wsValue = CFX_WideStringC((FX_LPCWSTR)pValue, iBytes / sizeof(FX_WCHAR));
+ wsValue = CFX_WideStringC((const FX_WCHAR*)pValue, iBytes / sizeof(FX_WCHAR));
return TRUE;
}
-void CXFA_Node::SetMapModuleBuffer(FX_LPVOID pKey, FX_LPVOID pValue, int32_t iBytes, XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo )
+void CXFA_Node::SetMapModuleBuffer(void* pKey, void* pValue, int32_t iBytes, XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo )
{
XFA_LPMAPMODULEDATA pMoudle = this->GetMapModuleData(TRUE);
if (!pMoudle) {
@@ -4761,7 +4761,7 @@ void CXFA_Node::SetMapModuleBuffer(FX_LPVOID pKey, FX_LPVOID pValue, int32_t iBy
pBuffer->iBytes = iBytes;
FXSYS_memcpy(pBuffer->GetData(), pValue, iBytes);
}
-FX_BOOL CXFA_Node::GetMapModuleBuffer(FX_LPVOID pKey, FX_LPVOID &pValue, int32_t &iBytes, FX_BOOL bProtoAlso)
+FX_BOOL CXFA_Node::GetMapModuleBuffer(void* pKey, void* &pValue, int32_t &iBytes, FX_BOOL bProtoAlso)
{
XFA_LPMAPDATABLOCK pBuffer = NULL;
CXFA_Node* pNode = this;
@@ -4779,11 +4779,11 @@ FX_BOOL CXFA_Node::GetMapModuleBuffer(FX_LPVOID pKey, FX_LPVOID &pValue, int32_t
iBytes = pBuffer->iBytes;
return TRUE;
}
-FX_BOOL CXFA_Node::HasMapModuleKey(FX_LPVOID pKey, FX_BOOL bProtoAlso)
+FX_BOOL CXFA_Node::HasMapModuleKey(void* pKey, FX_BOOL bProtoAlso)
{
CXFA_Node* pNode = this;
while (pNode) {
- FX_LPVOID pVal;
+ void* pVal;
XFA_LPMAPMODULEDATA pMoudle = pNode->GetMapModuleData(FALSE);
if (pMoudle && (pMoudle->m_ValueMap.Lookup(pKey, pVal) || pMoudle->m_BufferMap.Lookup(pKey, (XFA_LPMAPDATABLOCK&)pVal))) {
return TRUE;
@@ -4792,7 +4792,7 @@ FX_BOOL CXFA_Node::HasMapModuleKey(FX_LPVOID pKey, FX_BOOL bProtoAlso)
}
return FALSE;
}
-void CXFA_Node::RemoveMapModuleKey(FX_LPVOID pKey )
+void CXFA_Node::RemoveMapModuleKey(void* pKey )
{
XFA_LPMAPMODULEDATA pMoudle = this->GetMapModuleData(FALSE);
if (!pMoudle) {
@@ -4829,7 +4829,7 @@ void CXFA_Node::RemoveMapModuleKey(FX_LPVOID pKey )
}
}
}
-void CXFA_Node::MergeAllData(FX_LPVOID pDstModule, FX_BOOL bUseSrcAttr )
+void CXFA_Node::MergeAllData(void* pDstModule, FX_BOOL bUseSrcAttr )
{
XFA_LPMAPMODULEDATA pDstModuleData = ((CXFA_Node*)pDstModule)->GetMapModuleData(TRUE);
if (!pDstModuleData) {
@@ -4841,8 +4841,8 @@ void CXFA_Node::MergeAllData(FX_LPVOID pDstModule, FX_BOOL bUseSrcAttr )
}
FX_POSITION psValue = pSrcModuleData->m_ValueMap.GetStartPosition();
while (psValue) {
- FX_LPVOID pKey;
- FX_LPVOID pValue;
+ void* pKey;
+ void* pValue;
pSrcModuleData->m_ValueMap.GetNextAssoc(psValue, pKey, pValue);
if (bUseSrcAttr || !pDstModuleData->m_ValueMap.GetValueAt(pKey)) {
pDstModuleData->m_ValueMap.SetAt(pKey, pValue);
@@ -4850,7 +4850,7 @@ void CXFA_Node::MergeAllData(FX_LPVOID pDstModule, FX_BOOL bUseSrcAttr )
}
FX_POSITION psBuffer = pSrcModuleData->m_BufferMap.GetStartPosition();
while (psBuffer) {
- FX_LPVOID pKey;
+ void* pKey;
XFA_LPMAPDATABLOCK pSrcBuffer;
pSrcModuleData->m_BufferMap.GetNextAssoc(psBuffer, pKey, pSrcBuffer);
XFA_LPMAPDATABLOCK &pBuffer = pDstModuleData->m_BufferMap[pKey];
@@ -4885,7 +4885,7 @@ void CXFA_Node::MergeAllData(FX_LPVOID pDstModule, FX_BOOL bUseSrcAttr )
}
}
}
-void CXFA_Node::MoveBufferMapData(CXFA_Node* pDstModule, FX_LPVOID pKey)
+void CXFA_Node::MoveBufferMapData(CXFA_Node* pDstModule, void* pKey)
{
if (!pDstModule) {
return;
@@ -4910,7 +4910,7 @@ void CXFA_Node::MoveBufferMapData(CXFA_Node* pDstModule, FX_LPVOID pKey)
}
}
if (bNeedMove) {
- FX_LPVOID pBufferBlockData = pSrcModuleData->m_BufferMap.GetValueAt(pKey);
+ void* pBufferBlockData = pSrcModuleData->m_BufferMap.GetValueAt(pKey);
if (pBufferBlockData) {
pSrcModuleData->m_BufferMap.RemoveKey(pKey);
pDstModuleData->m_BufferMap.RemoveKey(pKey);
@@ -4927,7 +4927,7 @@ void CXFA_Node::MoveBufferMapData(CXFA_Node* pDstModule, FX_LPVOID pKey)
pDstModule->SetScriptContent(wsValue, wsFormatValue, TRUE, TRUE);
}
}
-void CXFA_Node::MoveBufferMapData(CXFA_Node* pSrcModule, CXFA_Node* pDstModule, FX_LPVOID pKey, FX_BOOL bRecursive )
+void CXFA_Node::MoveBufferMapData(CXFA_Node* pSrcModule, CXFA_Node* pDstModule, void* pKey, FX_BOOL bRecursive )
{
if (!pSrcModule || !pDstModule || !pKey) {
return;
diff --git a/xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp b/xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp
index 1cc9d4aa03..b00b29700f 100644
--- a/xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp
@@ -23,7 +23,7 @@ static FX_ARGB XFA_WStringToColor(FX_WSTR wsValue)
return 0xff000000;
}
int cc = 0;
- FX_LPCWSTR str = wsValue.GetPtr();
+ const FX_WCHAR* str = wsValue.GetPtr();
int len = wsValue.GetLength();
while (XFA_IsSpace(str[cc]) && cc < len) {
cc++;
@@ -287,14 +287,14 @@ FX_FLOAT CXFA_Font::GetHorizontalScale()
{
CFX_WideString wsValue;
m_pNode->TryCData(XFA_ATTRIBUTE_FontHorizontalScale, wsValue);
- int32_t iScale = FXSYS_wtoi((FX_LPCWSTR)wsValue);
+ int32_t iScale = FXSYS_wtoi((const FX_WCHAR*)wsValue);
return iScale > 0 ? (FX_FLOAT)iScale : 100.0f;
}
FX_FLOAT CXFA_Font::GetVerticalScale()
{
CFX_WideString wsValue;
m_pNode->TryCData(XFA_ATTRIBUTE_FontVerticalScale, wsValue);
- int32_t iScale = FXSYS_wtoi((FX_LPCWSTR)wsValue);
+ int32_t iScale = FXSYS_wtoi((const FX_WCHAR*)wsValue);
return iScale > 0 ? (FX_FLOAT)iScale : 100.0f;
}
FX_FLOAT CXFA_Font::GetLetterSpacing()
@@ -2689,7 +2689,7 @@ void CXFA_WidgetData::InsertItem(const CFX_WideString &wsLabel, const CFX_WideSt
if(!bNotify) {
return;
}
- m_pNode->GetDocument()->GetNotify()->OnWidgetDataEvent(this, XFA_WIDGETEVENT_ListItemAdded, (FX_LPVOID)(FX_LPCWSTR)wsLabel, (FX_LPVOID)(FX_LPCWSTR)wsValue, (FX_LPVOID)(uintptr_t)nIndex);
+ m_pNode->GetDocument()->GetNotify()->OnWidgetDataEvent(this, XFA_WIDGETEVENT_ListItemAdded, (void*)(const FX_WCHAR*)wsLabel, (void*)(const FX_WCHAR*)wsValue, (void*)(uintptr_t)nIndex);
}
void CXFA_WidgetData::GetItemLabel(FX_WSTR wsValue, CFX_WideString &wsLabel)
{
@@ -2811,7 +2811,7 @@ FX_BOOL CXFA_WidgetData::DeleteItem(int32_t nIndex, FX_BOOL bNotify, FX_BOOL bSc
if(!bNotify) {
return TRUE;
}
- m_pNode->GetDocument()->GetNotify()->OnWidgetDataEvent(this, XFA_WIDGETEVENT_ListItemRemoved, (FX_LPVOID)(uintptr_t)nIndex);
+ m_pNode->GetDocument()->GetNotify()->OnWidgetDataEvent(this, XFA_WIDGETEVENT_ListItemRemoved, (void*)(uintptr_t)nIndex);
return TRUE;
}
int32_t CXFA_WidgetData::GetHorizontalScrollPolicy()
@@ -3112,7 +3112,7 @@ static CFX_WideString XFA_NumericNormalize(const CFX_WideString &wsValue, IFX_Lo
}
int32_t iIndex = 0;
CFX_WideString wsRet;
- FX_LPWSTR pRetBuffer = wsRet.GetBuffer(iCount);
+ FX_WCHAR* pRetBuffer = wsRet.GetBuffer(iCount);
int32_t iDestCount = 0;
int32_t i = 0;
if (wsNewValue[i] == L'-') {
@@ -3126,7 +3126,7 @@ static CFX_WideString XFA_NumericNormalize(const CFX_WideString &wsValue, IFX_Lo
FX_WCHAR wc = wsNewValue[i];
if (XFA_IsDigit(wc)) {
if (nCharStart != -1) {
- CFX_WideStringC wsChar((FX_LPCWSTR)wsNewValue + nCharStart, i - nCharStart);
+ CFX_WideStringC wsChar((const FX_WCHAR*)wsNewValue + nCharStart, i - nCharStart);
if (wsChar == '.' || wsChar == wsDecimalSymbol) {
bHasPoint = TRUE;
nCharStart = -1;
diff --git a/xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp b/xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp
index 5a1eff1a4a..ffbdd6c8ba 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp
@@ -369,9 +369,9 @@ static int32_t XFA_FilterName(FX_WSTR wsExpression, int32_t nStart, CFX_WideStri
if (nStart >= iLength) {
return iLength;
}
- FX_LPWSTR pBuf = wsFilter.GetBuffer(iLength - nStart);
+ FX_WCHAR* pBuf = wsFilter.GetBuffer(iLength - nStart);
int32_t nCount = 0;
- FX_LPCWSTR pSrc = wsExpression.GetPtr();
+ const FX_WCHAR* pSrc = wsExpression.GetPtr();
FX_WCHAR wCur;
while (nStart < iLength) {
wCur = pSrc[nStart ++];
diff --git a/xfa/src/fxfa/src/parser/xfa_script_imp.cpp b/xfa/src/fxfa/src/parser/xfa_script_imp.cpp
index be10dff62a..4dc48f75c7 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_script_imp.cpp
@@ -138,7 +138,7 @@ void CXFA_ScriptContext::GlobalPropertySetter(FXJSE_HOBJECT hObject, FX_BSTR szP
CXFA_Document* pDoc = lpOrginalNode->GetDocument();
CXFA_ScriptContext* lpScriptContext = (CXFA_ScriptContext*)pDoc->GetScriptContext();
CXFA_Object* lpCurNode = lpScriptContext->GetVariablesThis(lpOrginalNode);
- CFX_WideString wsPropName = CFX_WideString::FromUTF8((FX_LPCSTR)szPropName.GetPtr(), szPropName.GetLength());
+ CFX_WideString wsPropName = CFX_WideString::FromUTF8((const FX_CHAR*)szPropName.GetPtr(), szPropName.GetLength());
FX_DWORD dwFlag = XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Attributes;
CXFA_Node* pRefNode = (CXFA_Node*)lpScriptContext->GetThisObject();
if(lpOrginalNode->GetObjectType() == XFA_OBJECTTYPE_VariablesThis) {
@@ -184,7 +184,7 @@ void CXFA_ScriptContext::GlobalPropertyGetter(FXJSE_HOBJECT hObject, FX_BSTR szP
CXFA_Document* pDoc = pOrginalObject->GetDocument();
CXFA_ScriptContext* lpScriptContext = (CXFA_ScriptContext*)pDoc->GetScriptContext();
CXFA_Object* lpCurNode = lpScriptContext->GetVariablesThis(pOrginalObject);
- CFX_WideString wsPropName = CFX_WideString::FromUTF8((FX_LPCSTR)szPropName.GetPtr(), szPropName.GetLength());
+ CFX_WideString wsPropName = CFX_WideString::FromUTF8((const FX_CHAR*)szPropName.GetPtr(), szPropName.GetLength());
if (lpScriptContext->GetType() == XFA_SCRIPTLANGTYPE_Formcalc) {
if(szPropName == FX_BSTRC(FOXIT_XFA_FM2JS_FORMCALC_RUNTIME)) {
XFA_FM2JS_GlobalPropertyGetter(lpScriptContext->m_hFM2JSContext, hValue);
@@ -231,7 +231,7 @@ void CXFA_ScriptContext::NormalPropertyGetter(FXJSE_HOBJECT hObject, FX_BSTR szP
FXJSE_Value_SetUndefined(hValue);
return;
}
- CFX_WideString wsPropName = CFX_WideString::FromUTF8((FX_LPCSTR)szPropName.GetPtr(), szPropName.GetLength());
+ CFX_WideString wsPropName = CFX_WideString::FromUTF8((const FX_CHAR*)szPropName.GetPtr(), szPropName.GetLength());
CXFA_ScriptContext* lpScriptContext = (CXFA_ScriptContext*)pOrginalObject->GetDocument()->GetScriptContext();
CXFA_Object* pObject = lpScriptContext->GetVariablesThis(pOrginalObject);
if(wsPropName == FX_WSTRC(L"xfa")) {
@@ -267,7 +267,7 @@ void CXFA_ScriptContext::NormalPropertySetter(FXJSE_HOBJECT hObject, FX_BSTR szP
}
CXFA_ScriptContext* lpScriptContext = (CXFA_ScriptContext*)pOrginalObject->GetDocument()->GetScriptContext();
CXFA_Object* pObject = lpScriptContext->GetVariablesThis(pOrginalObject);
- CFX_WideString wsPropName = CFX_WideString::FromUTF8((FX_LPCSTR)szPropName.GetPtr(), szPropName.GetLength());
+ CFX_WideString wsPropName = CFX_WideString::FromUTF8((const FX_CHAR*)szPropName.GetPtr(), szPropName.GetLength());
XFA_LPCSCRIPTATTRIBUTEINFO lpAttributeInfo = XFA_GetScriptAttributeByName(pObject->GetClassID(), wsPropName);
if(lpAttributeInfo) {
(pObject->*(lpAttributeInfo->lpfnCallback))(hValue, TRUE, (XFA_ATTRIBUTE)lpAttributeInfo->eAttribute);
@@ -308,7 +308,7 @@ int32_t CXFA_ScriptContext::NormalPropTypeGetter(FXJSE_HOBJECT hObject, FX_BSTR
CXFA_ScriptContext* lpScriptContext = (CXFA_ScriptContext*)pObject->GetDocument()->GetScriptContext();
pObject = lpScriptContext->GetVariablesThis(pObject);
XFA_ELEMENT objElement = pObject->GetClassID();
- CFX_WideString wsPropName = CFX_WideString::FromUTF8((FX_LPCSTR)szPropName.GetPtr(), szPropName.GetLength());
+ CFX_WideString wsPropName = CFX_WideString::FromUTF8((const FX_CHAR*)szPropName.GetPtr(), szPropName.GetLength());
if(XFA_GetMethodByName(objElement, wsPropName)) {
return FXJSE_ClassPropType_Method;
}
@@ -326,7 +326,7 @@ int32_t CXFA_ScriptContext::GlobalPropTypeGetter(FXJSE_HOBJECT hObject, FX_BSTR
CXFA_ScriptContext* lpScriptContext = (CXFA_ScriptContext*)pObject->GetDocument()->GetScriptContext();
pObject = lpScriptContext->GetVariablesThis(pObject);
XFA_ELEMENT objElement = pObject->GetClassID();
- CFX_WideString wsPropName = CFX_WideString::FromUTF8((FX_LPCSTR)szPropName.GetPtr(), szPropName.GetLength());
+ CFX_WideString wsPropName = CFX_WideString::FromUTF8((const FX_CHAR*)szPropName.GetPtr(), szPropName.GetLength());
if(XFA_GetMethodByName(objElement, wsPropName)) {
return FXJSE_ClassPropType_Method;
}
@@ -340,7 +340,7 @@ void CXFA_ScriptContext::NormalMethodCall(FXJSE_HOBJECT hThis, FX_BSTR szFuncNam
}
CXFA_ScriptContext* lpScriptContext = (CXFA_ScriptContext*)pObject->GetDocument()->GetScriptContext();
pObject = lpScriptContext->GetVariablesThis(pObject);
- CFX_WideString wsFunName = CFX_WideString::FromUTF8((FX_LPCSTR)szFuncName.GetPtr(), szFuncName.GetLength());
+ CFX_WideString wsFunName = CFX_WideString::FromUTF8((const FX_CHAR*)szFuncName.GetPtr(), szFuncName.GetLength());
XFA_LPCMETHODINFO lpMethodInfo = XFA_GetMethodByName(pObject->GetClassID(), wsFunName);
if(NULL == lpMethodInfo) {
return;
@@ -446,7 +446,7 @@ FX_BOOL CXFA_ScriptContext::QueryVariableHValue(CXFA_Node* pScriptNode, FX_BSTR
return FALSE;
}
FX_BOOL bRes = FALSE;
- FX_LPVOID lpVariables = m_mapVariableToHValue.GetValueAt(pScriptNode);
+ void* lpVariables = m_mapVariableToHValue.GetValueAt(pScriptNode);
if(lpVariables) {
FXJSE_HCONTEXT hVariableContext = (FXJSE_HCONTEXT)lpVariables;
FXJSE_HVALUE hObject = FXJSE_Context_GetGlobalObject(hVariableContext);
@@ -677,7 +677,7 @@ FXJSE_HVALUE CXFA_ScriptContext::GetJSValueFromMap(CXFA_Object* pObject)
if(pObject->IsNode()) {
RunVariablesScript((CXFA_Node*)pObject);
}
- FX_LPVOID pValue = m_mapXFAToHValue.GetValueAt(pObject);
+ void* pValue = m_mapXFAToHValue.GetValueAt(pObject);
if(pValue == NULL) {
FXJSE_HVALUE jsHvalue = FXJSE_Value_Create(m_hJsRuntime);
FXJSE_Value_SetObject(jsHvalue, pObject, m_hJsClass);
diff --git a/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp b/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp
index e28b0b7658..282dbe22b9 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp
@@ -45,7 +45,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_HWXY(CFXJSE_Arguments*
{
int32_t iLength = pArguments->GetLength();
if ( iLength < 1 || iLength > 3) {
- FX_LPCWSTR methodName = NULL;
+ const FX_WCHAR* methodName = NULL;
switch (layoutModel) {
case XFA_LAYOUTMODEL_H:
methodName = L"h";
@@ -490,7 +490,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_PageImp(CFXJSE_Argument
{
int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
- FX_LPCWSTR methodName;
+ const FX_WCHAR* methodName;
if (bAbsPage) {
methodName = L"absPage";
} else {
diff --git a/xfa/src/fxfa/src/parser/xfa_script_nodehelper.cpp b/xfa/src/fxfa/src/parser/xfa_script_nodehelper.cpp
index 0c793b2692..a1562a0838 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_nodehelper.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_script_nodehelper.cpp
@@ -27,7 +27,7 @@ CXFA_NodeHelper::CXFA_NodeHelper(void)
CXFA_NodeHelper::~CXFA_NodeHelper(void)
{
}
-CXFA_Node* CXFA_NodeHelper::XFA_ResolveNodes_GetOneChild(CXFA_Node* parent, FX_LPCWSTR pwsName, FX_BOOL bIsClassName)
+CXFA_Node* CXFA_NodeHelper::XFA_ResolveNodes_GetOneChild(CXFA_Node* parent, const FX_WCHAR* pwsName, FX_BOOL bIsClassName)
{
if(parent == NULL) {
return NULL;
@@ -252,12 +252,12 @@ void CXFA_NodeHelper::XFA_GetNameExpression(CXFA_Node* refNode, CFX_WideString &
if (refNode->IsUnnamed() || (bIsProperty && refNode->GetClassID() != XFA_ELEMENT_PageSet)) {
refNode->GetClassName(wsTagName);
ws = wsTagName;
- wsName.Format(L"#%s[%d]", (FX_LPCWSTR)ws, XFA_GetIndex(refNode, eLogicType, bIsProperty, TRUE));
+ wsName.Format(L"#%s[%d]", (const FX_WCHAR*)ws, XFA_GetIndex(refNode, eLogicType, bIsProperty, TRUE));
return;
}
ws = refNode->GetCData(XFA_ATTRIBUTE_Name);
ws.Replace(L".", L"\\.");
- wsName.Format(L"%s[%d]", (FX_LPCWSTR)ws, XFA_GetIndex(refNode, eLogicType, bIsProperty, FALSE));
+ wsName.Format(L"%s[%d]", (const FX_WCHAR*)ws, XFA_GetIndex(refNode, eLogicType, bIsProperty, FALSE));
}
}
FX_BOOL CXFA_NodeHelper::XFA_NodeIsTransparent(CXFA_Node* refNode)
diff --git a/xfa/src/fxfa/src/parser/xfa_script_nodehelper.h b/xfa/src/fxfa/src/parser/xfa_script_nodehelper.h
index ea3e180385..6ac97ab25a 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_nodehelper.h
+++ b/xfa/src/fxfa/src/parser/xfa_script_nodehelper.h
@@ -16,7 +16,7 @@ class CXFA_NodeHelper
public:
CXFA_NodeHelper(void);
~CXFA_NodeHelper(void);
- CXFA_Node* XFA_ResolveNodes_GetOneChild(CXFA_Node* parent, FX_LPCWSTR pwsName, FX_BOOL bIsClassName = FALSE);
+ CXFA_Node* XFA_ResolveNodes_GetOneChild(CXFA_Node* parent, const FX_WCHAR* pwsName, FX_BOOL bIsClassName = FALSE);
CXFA_Node* XFA_ResolveNodes_GetParent(CXFA_Node* pNode, XFA_LOGIC_TYPE eLogicType = XFA_LOGIC_NoTransparent);
int32_t XFA_NodeAcc_TraverseSiblings(CXFA_Node* parent, FX_DWORD dNameHash, CXFA_NodeArray* pSiblings, XFA_LOGIC_TYPE eLogicType, FX_BOOL bIsClassName = FALSE, FX_BOOL bIsFindProperty = TRUE);
diff --git a/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp b/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp
index a79a8bf9ca..841176ed69 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp
@@ -119,7 +119,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Dollar(CXFA_ResolveNodesData &rn
if (rnd.m_nLevel > 0) {
return -1;
}
- FX_DWORD dwNameHash = FX_HashCode_String_GetW((FX_LPCWSTR)wsName + 1, iNameLen - 1);
+ FX_DWORD dwNameHash = FX_HashCode_String_GetW((const FX_WCHAR*)wsName + 1, iNameLen - 1);
if (dwNameHash == XFA_HASHCODE_Xfa) {
nodes.Add(rnd.m_pSC->GetDocument()->GetRoot());
} else {
@@ -505,14 +505,14 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_GetFilter(FX_WSTR wsExpression,
}
CFX_WideString& wsName = rnd.m_wsName;
CFX_WideString& wsCondition = rnd.m_wsCondition;
- FX_LPWSTR pNameBuf = wsName.GetBuffer(iLength - nStart);
- FX_LPWSTR pConditionBuf = wsCondition.GetBuffer(iLength - nStart);
+ FX_WCHAR* pNameBuf = wsName.GetBuffer(iLength - nStart);
+ FX_WCHAR* pConditionBuf = wsCondition.GetBuffer(iLength - nStart);
int32_t nCount = 0;
int32_t nNameCount = 0;
int32_t nConditionCount = 0;
CFX_Int32Array stack;
int32_t nType = -1;
- FX_LPCWSTR pSrc = wsExpression.GetPtr();
+ const FX_WCHAR* pSrc = wsExpression.GetPtr();
FX_WCHAR wPrev = 0, wCur;
FX_BOOL bIsCondition = FALSE;
while (nStart < iLength) {
diff --git a/xfa/src/fxfa/src/parser/xfa_utils_imp.cpp b/xfa/src/fxfa/src/parser/xfa_utils_imp.cpp
index a15690cdcd..f35602b4be 100644
--- a/xfa/src/fxfa/src/parser/xfa_utils_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_utils_imp.cpp
@@ -306,7 +306,7 @@ FX_DOUBLE XFA_WideStringToDouble(const CFX_WideString &wsStringVal)
int32_t nExponent = 0;
int32_t cc = 0;
FX_BOOL bNegative = FALSE, bExpSign = FALSE;
- FX_LPCWSTR str = (FX_LPCWSTR)wsValue;
+ const FX_WCHAR* str = (const FX_WCHAR*)wsValue;
int32_t len = wsValue.GetLength();
if (str[0] == '+') {
cc++;
diff --git a/xfa/src/fxgraphics/src/fx_graphics.cpp b/xfa/src/fxgraphics/src/fx_graphics.cpp
index ee746b7fce..a915a17065 100644
--- a/xfa/src/fxgraphics/src/fx_graphics.cpp
+++ b/xfa/src/fxgraphics/src/fx_graphics.cpp
@@ -755,7 +755,7 @@ FX_ERR CFX_Graphics::InverseRect(const CFX_RectF & rect)
FX_ARGB c = *pLine;
*pLine ++ = (c & 0xFF000000) | (0xFFFFFF - (c & 0x00FFFFFF));
}
- pBuf = (FX_ARGB*)((FX_LPBYTE)pBuf + bitmap->GetPitch());
+ pBuf = (FX_ARGB*)((uint8_t*)pBuf + bitmap->GetPitch());
}
return FX_ERR_Succeeded;
}
@@ -784,8 +784,8 @@ FX_ERR CFX_Graphics::XorDIBitmap(const CFX_DIBitmap * srcBitmap, const CFX_RectF
*pDstLine ++ = ArgbEncode(FXARGB_A(c), (c & 0xFFFFFF) ^ (*pSrcLine & 0xFFFFFF));
pSrcLine ++;
}
- pSrcBuf = (FX_ARGB*)((FX_LPBYTE)pSrcBuf + srcBitmap->GetPitch());
- pDstBuf = (FX_ARGB*)((FX_LPBYTE)pDstBuf + dst->GetPitch());
+ pSrcBuf = (FX_ARGB*)((uint8_t*)pSrcBuf + srcBitmap->GetPitch());
+ pDstBuf = (FX_ARGB*)((uint8_t*)pDstBuf + dst->GetPitch());
}
return FX_ERR_Succeeded;
}
@@ -814,8 +814,8 @@ FX_ERR CFX_Graphics::EqvDIBitmap(const CFX_DIBitmap * srcBitmap, const CFX_RectF
*pDstLine ++ = ArgbEncode(FXARGB_A(c), ~((c & 0xFFFFFF) ^ (*pSrcLine & 0xFFFFFF)));
pSrcLine ++;
}
- pSrcBuf = (FX_ARGB*)((FX_LPBYTE)pSrcBuf + srcBitmap->GetPitch());
- pDstBuf = (FX_ARGB*)((FX_LPBYTE)pDstBuf + dst->GetPitch());
+ pSrcBuf = (FX_ARGB*)((uint8_t*)pSrcBuf + srcBitmap->GetPitch());
+ pDstBuf = (FX_ARGB*)((uint8_t*)pDstBuf + dst->GetPitch());
}
return FX_ERR_Succeeded;
}
diff --git a/xfa/src/fxjse/src/class.cpp b/xfa/src/fxjse/src/class.cpp
index 735a77f1f1..42db877fc9 100644
--- a/xfa/src/fxjse/src/class.cpp
+++ b/xfa/src/fxjse/src/class.cpp
@@ -168,7 +168,7 @@ CFX_ByteString CFXJSE_Arguments::GetUTF8String(int32_t index) const
v8::String::Utf8Value szStringVal(hString);
return CFX_ByteString(*szStringVal);
}
-FX_LPVOID CFXJSE_Arguments::GetObject(int32_t index, FXJSE_HCLASS hClass ) const
+void* CFXJSE_Arguments::GetObject(int32_t index, FXJSE_HCLASS hClass ) const
{
const CFXJSE_ArgumentsImpl* lpArguments = reinterpret_cast<const CFXJSE_ArgumentsImpl* const>(this);
v8::Local<v8::Value> hValue = (*lpArguments->m_pInfo)[index];
@@ -193,7 +193,7 @@ static void FXJSE_Context_GlobalObjToString(const v8::FunctionCallbackInfo<v8::V
if(info.This() == info.Holder() && lpClass->name) {
CFX_ByteString szStringVal;
szStringVal.Format("[object %s]", lpClass->name);
- info.GetReturnValue().Set(v8::String::NewFromUtf8(info.GetIsolate(), (FX_LPCSTR)szStringVal, v8::String::kNormalString, szStringVal.GetLength()));
+ info.GetReturnValue().Set(v8::String::NewFromUtf8(info.GetIsolate(), (const FX_CHAR*)szStringVal, v8::String::kNormalString, szStringVal.GetLength()));
} else {
info.GetReturnValue().Set(info.This()->ObjectProtoToString());
}
diff --git a/xfa/src/fxjse/src/context.cpp b/xfa/src/fxjse/src/context.cpp
index d2b10db38d..3aee73203e 100644
--- a/xfa/src/fxjse/src/context.cpp
+++ b/xfa/src/fxjse/src/context.cpp
@@ -11,7 +11,7 @@
#include "value.h"
#include "scope_inline.h"
#include "util_inline.h"
-FXJSE_HCONTEXT FXJSE_Context_Create(FXJSE_HRUNTIME hRuntime, const FXJSE_CLASS* lpGlobalClass , FX_LPVOID lpGlobalObject )
+FXJSE_HCONTEXT FXJSE_Context_Create(FXJSE_HRUNTIME hRuntime, const FXJSE_CLASS* lpGlobalClass , void* lpGlobalObject )
{
CFXJSE_Context* pContext = CFXJSE_Context::Create(reinterpret_cast<v8::Isolate*>(hRuntime), lpGlobalClass, lpGlobalObject);
return reinterpret_cast<FXJSE_HCONTEXT>(pContext);
@@ -39,7 +39,7 @@ FXJSE_HRUNTIME FXJSE_Context_GetRuntime(FXJSE_HCONTEXT hContext)
CFXJSE_Context* pContext = reinterpret_cast<CFXJSE_Context*>(hContext);
return pContext ? reinterpret_cast<FXJSE_HRUNTIME>(pContext->GetRuntime()) : NULL;
}
-static FX_LPCSTR szCompatibleModeScripts[] = {
+static const FX_CHAR* szCompatibleModeScripts[] = {
"(function (global, list) { 'use strict'; var objname; for (objname in list) { var globalobj = global[objname];\n\
if (globalobj) { list[objname].forEach( function (name) { if (!globalobj[name]) { Object.defineProperty(globalobj, name, {writable: true, enumerable: false, value: \n\
(function (obj) {\n\
@@ -57,7 +57,7 @@ void FXJSE_Context_EnableCompatibleMode(FXJSE_HCONTEXT hContext, FX_DWORD dwComp
}
}
}
-FX_BOOL FXJSE_ExecuteScript(FXJSE_HCONTEXT hContext, FX_LPCSTR szScript, FXJSE_HVALUE hRetValue, FXJSE_HVALUE hNewThisObject )
+FX_BOOL FXJSE_ExecuteScript(FXJSE_HCONTEXT hContext, const FX_CHAR* szScript, FXJSE_HVALUE hRetValue, FXJSE_HVALUE hNewThisObject )
{
CFXJSE_Context* pContext = reinterpret_cast<CFXJSE_Context*>(hContext);
ASSERT(pContext);
@@ -129,7 +129,7 @@ FX_BOOL FXJSE_ReturnValue_GetLineInfo(FXJSE_HVALUE hRetValue, int32_t& nLine, in
nCol = hValue.As<v8::Object>()->Get(5)->ToInt32()->Value();
return TRUE;
}
-CFXJSE_Context* CFXJSE_Context::Create(v8::Isolate* pIsolate, const FXJSE_CLASS* lpGlobalClass , FX_LPVOID lpGlobalObject )
+CFXJSE_Context* CFXJSE_Context::Create(v8::Isolate* pIsolate, const FXJSE_CLASS* lpGlobalClass , void* lpGlobalObject )
{
CFXJSE_ScopeUtil_IsolateHandle scope(pIsolate);
CFXJSE_Context* pContext = FX_NEW CFXJSE_Context(pIsolate);
@@ -179,7 +179,7 @@ void CFXJSE_Context::GetGlobalObject(CFXJSE_Value* pValue)
v8::Local<v8::Object> hGlobalObject = hContext->Global();
pValue->ForceSetValue(hGlobalObject);
}
-FX_BOOL CFXJSE_Context::ExecuteScript(FX_LPCSTR szScript, CFXJSE_Value* lpRetValue, CFXJSE_Value* lpNewThisObject )
+FX_BOOL CFXJSE_Context::ExecuteScript(const FX_CHAR* szScript, CFXJSE_Value* lpRetValue, CFXJSE_Value* lpNewThisObject )
{
CFXJSE_ScopeUtil_IsolateHandleContext scope(this);
v8::TryCatch trycatch;
diff --git a/xfa/src/fxjse/src/context.h b/xfa/src/fxjse/src/context.h
index 973536932b..69ee7acce5 100644
--- a/xfa/src/fxjse/src/context.h
+++ b/xfa/src/fxjse/src/context.h
@@ -13,14 +13,14 @@ class CFXJSE_Context
protected:
CFXJSE_Context(v8::Isolate* pIsolate) : m_pIsolate(pIsolate) {}
public:
- static CFXJSE_Context* Create(v8::Isolate* pIsolate, const FXJSE_CLASS* lpGlobalClass = NULL, FX_LPVOID lpGlobalObject = NULL);
+ static CFXJSE_Context* Create(v8::Isolate* pIsolate, const FXJSE_CLASS* lpGlobalClass = NULL, void* lpGlobalObject = NULL);
~CFXJSE_Context();
V8_INLINE v8::Isolate* GetRuntime(void)
{
return m_pIsolate;
}
void GetGlobalObject(CFXJSE_Value* pValue);
- FX_BOOL ExecuteScript(FX_LPCSTR szScript, CFXJSE_Value* lpRetValue, CFXJSE_Value* lpNewThisObject = NULL);
+ FX_BOOL ExecuteScript(const FX_CHAR* szScript, CFXJSE_Value* lpRetValue, CFXJSE_Value* lpNewThisObject = NULL);
protected:
CFXJSE_Context();
CFXJSE_Context(const CFXJSE_Context&);
diff --git a/xfa/src/fxjse/src/runtime.cpp b/xfa/src/fxjse/src/runtime.cpp
index 6f0dbf7601..e47c5b1a3b 100644
--- a/xfa/src/fxjse/src/runtime.cpp
+++ b/xfa/src/fxjse/src/runtime.cpp
@@ -38,7 +38,7 @@ void FXJSE_Initialize()
}
bV8Initialized = TRUE;
atexit(FXJSE_KillV8);
- FX_LPCSTR szCmdFlags =
+ const FX_CHAR* szCmdFlags =
"--harmony_proxies "
"--block_concurrent_recompilation "
;
diff --git a/xfa/src/fxjse/src/util_inline.h b/xfa/src/fxjse/src/util_inline.h
index 517b5545e8..3425465844 100644
--- a/xfa/src/fxjse/src/util_inline.h
+++ b/xfa/src/fxjse/src/util_inline.h
@@ -10,13 +10,13 @@ static V8_INLINE v8::Local<v8::Object> FXJSE_GetGlobalObjectFromContext(const v8
{
return hContext->Global()->GetPrototype().As<v8::Object>();
}
-static V8_INLINE void FXJSE_UpdateObjectBinding(v8::Local<v8::Object>& hObject, FX_LPVOID lpNewBinding)
+static V8_INLINE void FXJSE_UpdateObjectBinding(v8::Local<v8::Object>& hObject, void* lpNewBinding)
{
ASSERT(!hObject.IsEmpty());
ASSERT(hObject->InternalFieldCount() > 0);
hObject->SetAlignedPointerInInternalField(0, lpNewBinding);
}
-static V8_INLINE FX_LPVOID FXJSE_RetrieveObjectBinding(const v8::Local<v8::Object>& hJSObject, CFXJSE_Class* lpClass = NULL)
+static V8_INLINE void* FXJSE_RetrieveObjectBinding(const v8::Local<v8::Object>& hJSObject, CFXJSE_Class* lpClass = NULL)
{
ASSERT(!hJSObject.IsEmpty());
if(!hJSObject->IsObject()) {
diff --git a/xfa/src/fxjse/src/value.cpp b/xfa/src/fxjse/src/value.cpp
index 783961657a..8b5b5feb92 100644
--- a/xfa/src/fxjse/src/value.cpp
+++ b/xfa/src/fxjse/src/value.cpp
@@ -90,7 +90,7 @@ int32_t FXJSE_Value_ToInteger (FXJSE_HVALUE hValue)
ASSERT(lpValue);
return lpValue->ToInteger();
}
-FX_LPVOID FXJSE_Value_ToObject (FXJSE_HVALUE hValue, FXJSE_HCLASS hClass)
+void* FXJSE_Value_ToObject (FXJSE_HVALUE hValue, FXJSE_HCLASS hClass)
{
CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hValue);
CFXJSE_Class* lpClass = reinterpret_cast<CFXJSE_Class*>(hClass);
@@ -139,7 +139,7 @@ void FXJSE_Value_SetDouble (FXJSE_HVALUE hValue, FXJSE_DOUBLE dDouble)
ASSERT(lpValue);
return lpValue->SetDouble(dDouble);
}
-void FXJSE_Value_SetObject (FXJSE_HVALUE hValue, FX_LPVOID lpObject, FXJSE_HCLASS hClass)
+void FXJSE_Value_SetObject (FXJSE_HVALUE hValue, void* lpObject, FXJSE_HCLASS hClass)
{
CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hValue);
CFXJSE_Class* lpClass = reinterpret_cast<CFXJSE_Class*>(hClass);
@@ -276,7 +276,7 @@ CFXJSE_Value* CFXJSE_Value::Create(v8::Isolate* pIsolate)
{
return FX_NEW CFXJSE_Value(pIsolate);
}
-FX_LPVOID CFXJSE_Value::ToObject(CFXJSE_Class* lpClass) const
+void* CFXJSE_Value::ToObject(CFXJSE_Class* lpClass) const
{
ASSERT(!m_hValue.IsEmpty());
CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
@@ -330,7 +330,7 @@ void CFXJSE_Value::SetFloat(FX_FLOAT fFloat)
v8::Local<v8::Value> hValue = v8::Number::New(m_pIsolate, FXJSE_ftod(fFloat));
m_hValue.Reset(m_pIsolate, hValue);
}
-void CFXJSE_Value::SetHostObject(FX_LPVOID lpObject, CFXJSE_Class* lpClass)
+void CFXJSE_Value::SetHostObject(void* lpObject, CFXJSE_Class* lpClass)
{
CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
ASSERT(lpClass);
@@ -453,7 +453,7 @@ FX_BOOL CFXJSE_Value::SetFunctionBind(CFXJSE_Value* lpOldFunction, CFXJSE_Value*
m_hValue.Reset(m_pIsolate, hBoundFunction);
return TRUE;
}
-#define FXJSE_INVALID_PTR ((FX_LPVOID)(intptr_t)-1)
+#define FXJSE_INVALID_PTR ((void*)(intptr_t)-1)
FX_BOOL CFXJSE_Value::Call(CFXJSE_Value* lpReceiver, CFXJSE_Value* lpRetValue, uint32_t nArgCount, FXJSE_HVALUE* lpArgs)
{
CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
diff --git a/xfa/src/fxjse/src/value.h b/xfa/src/fxjse/src/value.h
index 482015811b..db8a4faa95 100644
--- a/xfa/src/fxjse/src/value.h
+++ b/xfa/src/fxjse/src/value.h
@@ -144,7 +144,7 @@ public:
v8::String::Utf8Value hStringVal(hString);
szStrOutput = *hStringVal;
}
- FX_LPVOID ToObject(CFXJSE_Class* lpClass) const;
+ void* ToObject(CFXJSE_Class* lpClass) const;
public:
V8_INLINE void SetUndefined()
{
@@ -191,7 +191,7 @@ public:
v8::Local<v8::Value> hValue = v8::Object::New(m_pIsolate);
m_hValue.Reset(m_pIsolate, hValue);
}
- void SetHostObject(FX_LPVOID lpObject, CFXJSE_Class* lpClass);
+ void SetHostObject(void* lpObject, CFXJSE_Class* lpClass);
void SetArray(uint32_t uValueCount, CFXJSE_Value** rgValues);
void SetDate(FXJSE_DOUBLE dDouble);
public: