summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/include/fpdfapi/fpdf_objects.h78
-rw-r--r--core/include/fpdfapi/fpdf_page.h2
-rw-r--r--core/include/fpdfapi/fpdf_pageobj.h6
-rw-r--r--core/include/fpdfapi/fpdf_parser.h18
-rw-r--r--core/include/fpdfapi/fpdf_resource.h2
-rw-r--r--core/include/fpdfdoc/fpdf_doc.h30
-rw-r--r--core/include/fpdfdoc/fpdf_tagged.h10
-rw-r--r--core/include/fxcrt/fx_basic.h36
-rw-r--r--core/include/fxcrt/fx_stream.h22
-rw-r--r--core/include/fxcrt/fx_string.h42
-rw-r--r--core/include/fxcrt/fx_xml.h50
-rw-r--r--core/include/fxge/fpf.h4
-rw-r--r--core/include/fxge/fx_font.h2
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp6
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_font/font_int.h2
-rw-r--r--core/src/fpdfapi/fpdf_font/fpdf_font.cpp6
-rw-r--r--core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp8
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp8
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp6
-rw-r--r--core/src/fpdfapi/fpdf_page/pageint.h4
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp64
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp10
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp12
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp5
-rw-r--r--core/src/fpdfdoc/doc_basic.cpp16
-rw-r--r--core/src/fpdfdoc/doc_form.cpp10
-rw-r--r--core/src/fpdfdoc/doc_formcontrol.cpp12
-rw-r--r--core/src/fpdfdoc/doc_metadata.cpp2
-rw-r--r--core/src/fpdfdoc/doc_ocg.cpp6
-rw-r--r--core/src/fpdfdoc/doc_tagged.cpp14
-rw-r--r--core/src/fpdfdoc/tagged_int.h12
-rw-r--r--core/src/fpdftext/unicodenormalization.cpp4
-rw-r--r--core/src/fxcrt/extension.h6
-rw-r--r--core/src/fxcrt/fx_basic_bstring.cpp20
-rw-r--r--core/src/fxcrt/fx_basic_buffer.cpp10
-rw-r--r--core/src/fxcrt/fx_basic_maps.cpp18
-rw-r--r--core/src/fxcrt/fx_basic_util.cpp4
-rw-r--r--core/src/fxcrt/fx_extension.cpp6
-rw-r--r--core/src/fxcrt/fx_xml_composer.cpp6
-rw-r--r--core/src/fxcrt/fx_xml_parser.cpp34
-rw-r--r--core/src/fxcrt/fxcrt_platforms.cpp20
-rw-r--r--core/src/fxcrt/fxcrt_platforms.h4
-rw-r--r--core/src/fxcrt/fxcrt_posix.cpp20
-rw-r--r--core/src/fxcrt/fxcrt_posix.h4
-rw-r--r--core/src/fxcrt/fxcrt_windows.cpp20
-rw-r--r--core/src/fxcrt/fxcrt_windows.h4
-rw-r--r--core/src/fxcrt/xml_int.h6
-rw-r--r--core/src/fxge/android/fpf_skiafont.cpp2
-rw-r--r--core/src/fxge/android/fpf_skiafont.h2
-rw-r--r--core/src/fxge/android/fpf_skiafontmgr.cpp18
-rw-r--r--core/src/fxge/android/fpf_skiafontmgr.h10
-rw-r--r--core/src/fxge/ge/fx_ge_fontmap.cpp2
-rw-r--r--core/src/reflow/layoutprovider_taggedpdf.cpp4
-rw-r--r--core/src/reflow/layoutprovider_taggedpdf.h2
-rw-r--r--fpdfsdk/include/fpdfxfa/fpdfxfa_app.h18
-rw-r--r--fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h22
-rw-r--r--fpdfsdk/include/fsdk_mgr.h2
-rw-r--r--fpdfsdk/include/javascript/IJavaScript.h4
-rw-r--r--fpdfsdk/include/javascript/JS_Runtime.h4
-rw-r--r--fpdfsdk/src/fpdf_ext.cpp47
-rw-r--r--fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp16
-rw-r--r--fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp16
-rw-r--r--fpdfsdk/src/javascript/JS_Runtime.cpp4
-rw-r--r--xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h6
-rw-r--r--xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h2
-rw-r--r--xfa/include/fwl/adapter/fwl_sdadapterimp.h2
-rw-r--r--xfa/include/fwl/basewidget/fwl_combobox.h4
-rw-r--r--xfa/include/fwl/basewidget/fwl_edit.h6
-rw-r--r--xfa/include/fwl/basewidget/fxmath_barcode.h4
-rw-r--r--xfa/include/fwl/core/fwl_app.h2
-rw-r--r--xfa/include/fwl/core/fwl_note.h2
-rw-r--r--xfa/include/fwl/core/fwl_target.h2
-rw-r--r--xfa/include/fwl/lightwidget/checkbox.h2
-rw-r--r--xfa/include/fwl/lightwidget/combobox.h10
-rw-r--r--xfa/include/fwl/lightwidget/datetimepicker.h2
-rw-r--r--xfa/include/fwl/lightwidget/edit.h6
-rw-r--r--xfa/include/fwl/lightwidget/listbox.h4
-rw-r--r--xfa/include/fwl/lightwidget/pushbutton.h2
-rw-r--r--xfa/include/fwl/lightwidget/tooltipctrl.h2
-rw-r--r--xfa/include/fwl/lightwidget/widget.h2
-rw-r--r--xfa/include/fwl/theme/widgettp.h6
-rw-r--r--xfa/include/fxbarcode/BC_BarCode.h32
-rw-r--r--xfa/include/fxfa/fxfa.h50
-rw-r--r--xfa/include/fxfa/fxfa_basic.h18
-rw-r--r--xfa/include/fxfa/fxfa_objectacc.h18
-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.h8
-rw-r--r--xfa/src/fdp/src/css/fde_csscache.cpp6
-rw-r--r--xfa/src/fdp/src/css/fde_csscache.h6
-rw-r--r--xfa/src/fdp/src/css/fde_cssstyleselector.h2
-rw-r--r--xfa/src/fee/include/ifde_txtedtengine.h6
-rw-r--r--xfa/src/fee/src/fee/fde_txtedtengine.cpp26
-rw-r--r--xfa/src/fee/src/fee/fde_txtedtengine.h26
-rw-r--r--xfa/src/fgas/include/fx_locale.h8
-rw-r--r--xfa/src/fgas/include/fx_sax.h10
-rw-r--r--xfa/src/fgas/src/localization/fx_locale.cpp16
-rw-r--r--xfa/src/fgas/src/localization/fx_localeimp.h6
-rw-r--r--xfa/src/fgas/src/localization/fx_localemgr.cpp2
-rw-r--r--xfa/src/fgas/src/localization/fx_localemgr.h2
-rw-r--r--xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp8
-rw-r--r--xfa/src/fwl/src/basewidget/fwl_editimp.cpp16
-rw-r--r--xfa/src/fwl/src/basewidget/fwl_formproxyimp.cpp2
-rw-r--r--xfa/src/fwl/src/basewidget/fxmath_barcodeimp.cpp4
-rw-r--r--xfa/src/fwl/src/basewidget/include/fwl_comboboximp.h4
-rw-r--r--xfa/src/fwl/src/basewidget/include/fwl_editimp.h10
-rw-r--r--xfa/src/fwl/src/basewidget/include/fwl_formproxyimp.h2
-rw-r--r--xfa/src/fwl/src/basewidget/include/fxmath_barcodeimp.h4
-rw-r--r--xfa/src/fwl/src/core/fwl_formimp.cpp2
-rw-r--r--xfa/src/fwl/src/core/fwl_sdadapterimp.cpp2
-rw-r--r--xfa/src/fwl/src/core/fwl_targetimp.cpp4
-rw-r--r--xfa/src/fwl/src/core/fwl_widgetmgrimp.cpp2
-rw-r--r--xfa/src/fwl/src/core/include/fwl_formimp.h2
-rw-r--r--xfa/src/fwl/src/core/include/fwl_targetimp.h2
-rw-r--r--xfa/src/fwl/src/core/include/fwl_widgetmgrimp.h2
-rw-r--r--xfa/src/fwl/src/lightwidget/checkbox.cpp2
-rw-r--r--xfa/src/fwl/src/lightwidget/combobox.cpp10
-rw-r--r--xfa/src/fwl/src/lightwidget/datetimepicker.cpp2
-rw-r--r--xfa/src/fwl/src/lightwidget/edit.cpp6
-rw-r--r--xfa/src/fwl/src/lightwidget/listbox.cpp4
-rw-r--r--xfa/src/fwl/src/lightwidget/pushbutton.cpp2
-rw-r--r--xfa/src/fwl/src/lightwidget/tooltipctrl.cpp2
-rw-r--r--xfa/src/fwl/src/lightwidget/widget.cpp2
-rw-r--r--xfa/src/fwl/src/theme/widgettp.cpp6
-rw-r--r--xfa/src/fxbarcode/BC_BarCode.cpp28
-rw-r--r--xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp8
-rw-r--r--xfa/src/fxbarcode/oned/BC_OneDimWriter.h14
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.cpp8
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.h8
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCode128Writer.cpp4
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCode128Writer.h4
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCode39Writer.cpp16
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCode39Writer.h16
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp8
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.h8
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp8
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.h8
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.cpp8
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.h8
-rw-r--r--xfa/src/fxfa/src/app/xfa_checksum.cpp12
-rw-r--r--xfa/src/fxfa/src/app/xfa_checksum.h12
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffbarcode.cpp4
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffchoicelist.cpp4
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffchoicelist.h4
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffdoc.cpp6
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffdoc.h6
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffdochandler.cpp6
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffdochandler.h6
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffdocview.cpp8
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffdocview.h8
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffnotify.cpp4
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffpageview.cpp2
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffpageview.h2
-rw-r--r--xfa/src/fxfa/src/app/xfa_fftextedit.cpp6
-rw-r--r--xfa/src/fxfa/src/app/xfa_fftextedit.h6
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffwidget.cpp2
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffwidget.h4
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp2
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp2
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffwidgethandler.h2
-rw-r--r--xfa/src/fxfa/src/app/xfa_fontmgr.cpp14
-rw-r--r--xfa/src/fxfa/src/app/xfa_fontmgr.h10
-rw-r--r--xfa/src/fxfa/src/app/xfa_fwladapter.h4
-rw-r--r--xfa/src/fxfa/src/common/xfa_document.h4
-rw-r--r--xfa/src/fxfa/src/common/xfa_fm2jsapi.h2
-rw-r--r--xfa/src/fxfa/src/common/xfa_localemgr.h2
-rw-r--r--xfa/src/fxfa/src/common/xfa_object.h18
-rw-r--r--xfa/src/fxfa/src/common/xfa_script.h4
-rw-r--r--xfa/src/fxfa/src/common/xfa_utils.h4
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_expression.cpp8
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_expression.h8
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_fm2jsapi.cpp2
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp232
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.h230
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp2
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_fmparse.h2
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_lexer.cpp4
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_lexer.h4
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_program.cpp2
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_program.h2
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_simpleexpression.cpp2
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_simpleexpression.h2
-rw-r--r--xfa/src/fxfa/src/parser/xfa_basic_imp.cpp16
-rw-r--r--xfa/src/fxfa/src/parser/xfa_document_datadescription_imp.cpp2
-rw-r--r--xfa/src/fxfa/src/parser/xfa_document_datadescription_imp.h2
-rw-r--r--xfa/src/fxfa/src/parser/xfa_document_imp.cpp4
-rw-r--r--xfa/src/fxfa/src/parser/xfa_document_serialize.cpp4
-rw-r--r--xfa/src/fxfa/src/parser/xfa_locale.cpp8
-rw-r--r--xfa/src/fxfa/src/parser/xfa_locale.h8
-rw-r--r--xfa/src/fxfa/src/parser/xfa_localemgr.cpp2
-rw-r--r--xfa/src/fxfa/src/parser/xfa_object_imp.cpp22
-rw-r--r--xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp20
-rw-r--r--xfa/src/fxfa/src/parser/xfa_parser_imp.cpp10
-rw-r--r--xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp2
-rw-r--r--xfa/src/fxfa/src/parser/xfa_script_imp.cpp24
-rw-r--r--xfa/src/fxfa/src/parser/xfa_script_imp.h24
-rw-r--r--xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp4
-rw-r--r--xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.h4
-rw-r--r--xfa/src/fxfa/src/parser/xfa_utils_imp.cpp2
-rw-r--r--xfa/src/fxjse/src/class.cpp4
-rw-r--r--xfa/src/fxjse/src/class.h2
-rw-r--r--xfa/src/fxjse/src/dynprop.cpp8
-rw-r--r--xfa/src/fxjse/src/value.cpp24
-rw-r--r--xfa/src/fxjse/src/value.h12
209 files changed, 1174 insertions, 1172 deletions
diff --git a/core/include/fpdfapi/fpdf_objects.h b/core/include/fpdfapi/fpdf_objects.h
index 5b5811d2be..861ce5bddc 100644
--- a/core/include/fpdfapi/fpdf_objects.h
+++ b/core/include/fpdfapi/fpdf_objects.h
@@ -144,7 +144,7 @@ public:
return FX_NEW CPDF_Number(value);
}
- static CPDF_Number* Create(FX_BSTR str)
+ static CPDF_Number* Create(const CFX_ByteStringC& str)
{
return FX_NEW CPDF_Number(str);
}
@@ -162,13 +162,13 @@ public:
CPDF_Number(FX_FLOAT value);
- CPDF_Number(FX_BSTR str);
+ CPDF_Number(const CFX_ByteStringC& str);
FX_BOOL Identical(CPDF_Number* pOther) const;
CFX_ByteString GetString() const;
- void SetString(FX_BSTR str);
+ void SetString(const CFX_ByteStringC& str);
FX_BOOL IsInteger() const
{
@@ -260,7 +260,7 @@ public:
return FX_NEW CPDF_Name(str);
}
- static CPDF_Name* Create(FX_BSTR str)
+ static CPDF_Name* Create(const CFX_ByteStringC& str)
{
return FX_NEW CPDF_Name(str);
}
@@ -271,7 +271,7 @@ public:
}
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(const CFX_ByteStringC& str) : CPDF_Object(PDFOBJ_NAME), m_Name(str) { }
CPDF_Name(const FX_CHAR* str) : CPDF_Object(PDFOBJ_NAME), m_Name(str) { }
CFX_ByteString& GetString()
@@ -396,95 +396,95 @@ public:
CPDF_Dictionary() : CPDF_Object(PDFOBJ_DICTIONARY) { }
- CPDF_Object* GetElement(FX_BSTR key) const;
+ CPDF_Object* GetElement(const CFX_ByteStringC& key) const;
- CPDF_Object* GetElementValue(FX_BSTR key) const;
+ CPDF_Object* GetElementValue(const CFX_ByteStringC& key) const;
- CFX_ByteString GetString(FX_BSTR key) const;
+ CFX_ByteString GetString(const CFX_ByteStringC& key) const;
- CFX_ByteStringC GetConstString(FX_BSTR key) const;
+ CFX_ByteStringC GetConstString(const CFX_ByteStringC& key) const;
- CFX_ByteString GetString(FX_BSTR key, FX_BSTR default_str) const;
+ CFX_ByteString GetString(const CFX_ByteStringC& key, const CFX_ByteStringC& default_str) const;
- CFX_ByteStringC GetConstString(FX_BSTR key, FX_BSTR default_str) const;
+ CFX_ByteStringC GetConstString(const CFX_ByteStringC& key, const CFX_ByteStringC& default_str) const;
- CFX_WideString GetUnicodeText(FX_BSTR key, CFX_CharMap* pCharMap = NULL) const;
+ CFX_WideString GetUnicodeText(const CFX_ByteStringC& key, CFX_CharMap* pCharMap = NULL) const;
- int GetInteger(FX_BSTR key) const;
+ int GetInteger(const CFX_ByteStringC& key) const;
- int GetInteger(FX_BSTR key, int default_int) const;
+ int GetInteger(const CFX_ByteStringC& key, int default_int) const;
- FX_BOOL GetBoolean(FX_BSTR key, FX_BOOL bDefault = FALSE) const;
+ FX_BOOL GetBoolean(const CFX_ByteStringC& key, FX_BOOL bDefault = FALSE) const;
- FX_FLOAT GetNumber(FX_BSTR key) const;
+ FX_FLOAT GetNumber(const CFX_ByteStringC& key) const;
- CPDF_Dictionary* GetDict(FX_BSTR key) const;
+ CPDF_Dictionary* GetDict(const CFX_ByteStringC& key) const;
- CPDF_Stream* GetStream(FX_BSTR key) const;
+ CPDF_Stream* GetStream(const CFX_ByteStringC& key) const;
- CPDF_Array* GetArray(FX_BSTR key) const;
+ CPDF_Array* GetArray(const CFX_ByteStringC& key) const;
- CFX_FloatRect GetRect(FX_BSTR key) const;
+ CFX_FloatRect GetRect(const CFX_ByteStringC& key) const;
- CFX_AffineMatrix GetMatrix(FX_BSTR key) const;
+ CFX_AffineMatrix GetMatrix(const CFX_ByteStringC& key) const;
- FX_FLOAT GetFloat(FX_BSTR key) const
+ FX_FLOAT GetFloat(const CFX_ByteStringC& key) const
{
return GetNumber(key);
}
- FX_BOOL KeyExist(FX_BSTR key) const;
+ FX_BOOL KeyExist(const CFX_ByteStringC& key) const;
FX_POSITION GetStartPos() const;
CPDF_Object* GetNextElement(FX_POSITION& pos, CFX_ByteString& key) const;
- void SetAt(FX_BSTR key, CPDF_Object* pObj, CPDF_IndirectObjects* pObjs = NULL);
+ void SetAt(const CFX_ByteStringC& key, CPDF_Object* pObj, CPDF_IndirectObjects* pObjs = NULL);
- void SetAtName(FX_BSTR key, const CFX_ByteString& name);
+ void SetAtName(const CFX_ByteStringC& key, const CFX_ByteString& name);
- void SetAtString(FX_BSTR key, const CFX_ByteString& string);
+ void SetAtString(const CFX_ByteStringC& key, const CFX_ByteString& string);
- void SetAtInteger(FX_BSTR key, int i);
+ void SetAtInteger(const CFX_ByteStringC& key, int i);
- void SetAtNumber(FX_BSTR key, FX_FLOAT f);
+ void SetAtNumber(const CFX_ByteStringC& key, FX_FLOAT f);
- void SetAtReference(FX_BSTR key, CPDF_IndirectObjects* pDoc, FX_DWORD objnum);
+ void SetAtReference(const CFX_ByteStringC& key, CPDF_IndirectObjects* pDoc, FX_DWORD objnum);
- void SetAtReference(FX_BSTR key, CPDF_IndirectObjects* pDoc, CPDF_Object* obj)
+ void SetAtReference(const CFX_ByteStringC& key, CPDF_IndirectObjects* pDoc, CPDF_Object* obj)
{
SetAtReference(key, pDoc, obj->GetObjNum());
}
- void AddReference(FX_BSTR key, CPDF_IndirectObjects* pDoc, FX_DWORD objnum);
+ void AddReference(const CFX_ByteStringC& key, CPDF_IndirectObjects* pDoc, FX_DWORD objnum);
- void AddReference(FX_BSTR key, CPDF_IndirectObjects* pDoc, CPDF_Object* obj)
+ void AddReference(const CFX_ByteStringC& key, CPDF_IndirectObjects* pDoc, CPDF_Object* obj)
{
AddReference(key, pDoc, obj->GetObjNum());
}
- void SetAtRect(FX_BSTR key, const CFX_FloatRect& rect);
+ void SetAtRect(const CFX_ByteStringC& key, const CFX_FloatRect& rect);
- void SetAtMatrix(FX_BSTR key, const CFX_AffineMatrix& matrix);
+ void SetAtMatrix(const CFX_ByteStringC& key, const CFX_AffineMatrix& matrix);
- void SetAtBoolean(FX_BSTR key, FX_BOOL bValue);
+ void SetAtBoolean(const CFX_ByteStringC& key, FX_BOOL bValue);
- void RemoveAt(FX_BSTR key);
+ void RemoveAt(const CFX_ByteStringC& key);
- void ReplaceKey(FX_BSTR oldkey, FX_BSTR newkey);
+ void ReplaceKey(const CFX_ByteStringC& oldkey, const CFX_ByteStringC& newkey);
FX_BOOL Identical(CPDF_Dictionary* pDict) const;
@@ -493,7 +493,7 @@ public:
return m_Map.GetCount();
}
- void AddValue(FX_BSTR key, CPDF_Object* pObj);
+ void AddValue(const CFX_ByteStringC& key, CPDF_Object* pObj);
protected:
~CPDF_Dictionary();
@@ -622,7 +622,7 @@ protected:
uint8_t* m_pSrcData;
};
-CFX_DataFilter* FPDF_CreateFilter(FX_BSTR name, const CPDF_Dictionary* pParam, int width = 0, int height = 0);
+CFX_DataFilter* FPDF_CreateFilter(const CFX_ByteStringC& name, const CPDF_Dictionary* pParam, int width = 0, int height = 0);
#define FPDF_FILTER_BUFFER_SIZE 20480
class CPDF_StreamFilter
{
diff --git a/core/include/fpdfapi/fpdf_page.h b/core/include/fpdfapi/fpdf_page.h
index 867f00208b..959ed1382f 100644
--- a/core/include/fpdfapi/fpdf_page.h
+++ b/core/include/fpdfapi/fpdf_page.h
@@ -173,7 +173,7 @@ public:
return m_PageMatrix;
}
- CPDF_Object* GetPageAttr(FX_BSTR name) const;
+ CPDF_Object* GetPageAttr(const CFX_ByteStringC& name) const;
diff --git a/core/include/fpdfapi/fpdf_pageobj.h b/core/include/fpdfapi/fpdf_pageobj.h
index e09c0456fe..340c8d3b75 100644
--- a/core/include/fpdfapi/fpdf_pageobj.h
+++ b/core/include/fpdfapi/fpdf_pageobj.h
@@ -274,7 +274,7 @@ public:
CPDF_GeneralStateData(const CPDF_GeneralStateData& src);
~CPDF_GeneralStateData();
- void SetBlendMode(FX_BSTR blend_mode);
+ void SetBlendMode(const CFX_ByteStringC& blend_mode);
char m_BlendMode[16];
@@ -422,9 +422,9 @@ public:
return m_pObject ? m_pObject->GetMCID() : -1;
}
- FX_BOOL HasMark(FX_BSTR mark) const;
+ FX_BOOL HasMark(const CFX_ByteStringC& mark) const;
- FX_BOOL LookupMark(FX_BSTR mark, CPDF_Dictionary*& pDict) const;
+ FX_BOOL LookupMark(const CFX_ByteStringC& mark, CPDF_Dictionary*& pDict) const;
};
#define PDFPAGE_TEXT 1
#define PDFPAGE_PATH 2
diff --git a/core/include/fpdfapi/fpdf_parser.h b/core/include/fpdfapi/fpdf_parser.h
index cdd7aaaa11..f579527db4 100644
--- a/core/include/fpdfapi/fpdf_parser.h
+++ b/core/include/fpdfapi/fpdf_parser.h
@@ -204,18 +204,18 @@ public:
CPDF_SimpleParser(const uint8_t* pData, FX_DWORD dwSize);
- CPDF_SimpleParser(FX_BSTR str);
+ CPDF_SimpleParser(const CFX_ByteStringC& str);
CFX_ByteStringC GetWord();
- FX_BOOL SearchToken(FX_BSTR token);
+ FX_BOOL SearchToken(const CFX_ByteStringC& token);
- FX_BOOL SkipWord(FX_BSTR token);
+ FX_BOOL SkipWord(const CFX_ByteStringC& token);
- FX_BOOL FindTagPair(FX_BSTR start_token, FX_BSTR end_token,
+ FX_BOOL FindTagPair(const CFX_ByteStringC& start_token, const CFX_ByteStringC& end_token,
FX_DWORD& start_pos, FX_DWORD& end_pos);
- FX_BOOL FindTagParam(FX_BSTR token, int nParams);
+ FX_BOOL FindTagParam(const CFX_ByteStringC& token, int nParams);
FX_DWORD GetPos()
{
@@ -275,11 +275,11 @@ public:
void ToNextWord();
- FX_BOOL SearchWord(FX_BSTR word, FX_BOOL bWholeWord, FX_BOOL bForward, FX_FILESIZE limit);
+ FX_BOOL SearchWord(const CFX_ByteStringC& word, FX_BOOL bWholeWord, FX_BOOL bForward, FX_FILESIZE limit);
- int SearchMultiWord(FX_BSTR words, FX_BOOL bWholeWord, FX_FILESIZE limit);
+ int SearchMultiWord(const CFX_ByteStringC& words, FX_BOOL bWholeWord, FX_FILESIZE limit);
- FX_FILESIZE FindTag(FX_BSTR tag, FX_FILESIZE limit);
+ FX_FILESIZE FindTag(const CFX_ByteStringC& tag, FX_FILESIZE limit);
void SetEncrypt(CPDF_CryptoHandler* pCryptoHandler)
{
@@ -756,7 +756,7 @@ public:
#define CPDF_Rect CFX_FloatRect
#define CPDF_Matrix CFX_AffineMatrix
-CFX_ByteString PDF_NameDecode(FX_BSTR orig);
+CFX_ByteString PDF_NameDecode(const CFX_ByteStringC& 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);
diff --git a/core/include/fpdfapi/fpdf_resource.h b/core/include/fpdfapi/fpdf_resource.h
index f962fef916..c841e5b635 100644
--- a/core/include/fpdfapi/fpdf_resource.h
+++ b/core/include/fpdfapi/fpdf_resource.h
@@ -78,7 +78,7 @@ class CPDF_Font
{
public:
static CPDF_Font* CreateFontF(CPDF_Document* pDoc, CPDF_Dictionary* pFontDict);
- static CPDF_Font* GetStockFont(CPDF_Document* pDoc, FX_BSTR fontname);
+ static CPDF_Font* GetStockFont(CPDF_Document* pDoc, const CFX_ByteStringC& fontname);
virtual ~CPDF_Font();
diff --git a/core/include/fpdfdoc/fpdf_doc.h b/core/include/fpdfdoc/fpdf_doc.h
index be1bcd90e3..d6341acbfe 100644
--- a/core/include/fpdfdoc/fpdf_doc.h
+++ b/core/include/fpdfdoc/fpdf_doc.h
@@ -49,13 +49,13 @@ public:
m_pRoot = pRoot;
}
- CPDF_NameTree(CPDF_Document* pDoc, FX_BSTR category);
+ CPDF_NameTree(CPDF_Document* pDoc, const CFX_ByteStringC& category);
CPDF_Object* LookupValue(int nIndex, CFX_ByteString& csName) const;
CPDF_Object* LookupValue(const CFX_ByteString& csName) const;
- CPDF_Array* LookupNamedDest(CPDF_Document* pDoc, FX_BSTR sName);
+ CPDF_Array* LookupNamedDest(CPDF_Document* pDoc, const CFX_ByteStringC& sName);
int GetIndex(const CFX_ByteString& csName) const;
@@ -167,7 +167,7 @@ public:
void ResetOCContext();
protected:
- FX_BOOL LoadOCGStateFromConfig(FX_BSTR csConfig, const CPDF_Dictionary *pOCGDict, FX_BOOL &bValidConfig) const;
+ FX_BOOL LoadOCGStateFromConfig(const CFX_ByteStringC& csConfig, const CPDF_Dictionary *pOCGDict, FX_BOOL &bValidConfig) const;
FX_BOOL LoadOCGState(const CPDF_Dictionary *pOCGDict) const;
@@ -459,7 +459,7 @@ public:
CPDF_Stream* GetFileStream() const;
- void SetFileName(FX_WSTR wsFileName, FX_BOOL bURL = FALSE);
+ void SetFileName(const CFX_WideStringC& wsFileName, FX_BOOL bURL = FALSE);
protected:
CPDF_Object *m_pObj;
@@ -882,9 +882,9 @@ public:
CPDF_FormField* CheckRequiredFields(const CFX_PtrArray *fields = NULL, FX_BOOL bIncludeOrExclude = TRUE) const;
- CFDF_Document* ExportToFDF(FX_WSTR pdf_path, FX_BOOL bSimpleFileSpec = FALSE) const;
+ CFDF_Document* ExportToFDF(const CFX_WideStringC& pdf_path, FX_BOOL bSimpleFileSpec = FALSE) const;
- CFDF_Document* ExportToFDF(FX_WSTR pdf_path, CFX_PtrArray& fields, FX_BOOL bIncludeOrExclude = TRUE, FX_BOOL bSimpleFileSpec = FALSE) const;
+ CFDF_Document* ExportToFDF(const CFX_WideStringC& pdf_path, CFX_PtrArray& fields, FX_BOOL bIncludeOrExclude = TRUE, FX_BOOL bSimpleFileSpec = FALSE) const;
FX_BOOL ImportFromFDF(const CFDF_Document* pFDFDoc, FX_BOOL bNotify = FALSE);
@@ -1519,10 +1519,10 @@ public:
CFX_WideString GetLabel(int nPage) const;
- int32_t GetPageByLabel(FX_BSTR bsLabel) const;
+ int32_t GetPageByLabel(const CFX_ByteStringC& bsLabel) const;
- int32_t GetPageByLabel(FX_WSTR wsLabel) const;
+ int32_t GetPageByLabel(const CFX_WideStringC& wsLabel) const;
protected:
CPDF_Document* m_pDocument;
@@ -1539,7 +1539,7 @@ public:
void LoadDoc(CPDF_Document *pDoc);
- int32_t GetString(FX_BSTR bsItem, CFX_WideString &wsStr);
+ int32_t GetString(const CFX_ByteStringC& bsItem, CFX_WideString &wsStr);
CXML_Element* GetRoot() const;
@@ -1585,7 +1585,7 @@ public:
return m_pDict;
}
- FX_BOOL HasMKEntry(FX_BSTR csEntry);
+ FX_BOOL HasMKEntry(const CFX_ByteStringC& csEntry);
@@ -1688,15 +1688,15 @@ public:
CPDF_Dictionary* m_pDict;
protected:
- FX_ARGB GetColor(int& iColorType, FX_BSTR csEntry);
+ FX_ARGB GetColor(int& iColorType, const CFX_ByteStringC& csEntry);
- FX_FLOAT GetOriginalColor(int index, FX_BSTR csEntry);
+ FX_FLOAT GetOriginalColor(int index, const CFX_ByteStringC& csEntry);
- void GetOriginalColor(int& iColorType, FX_FLOAT fc[4], FX_BSTR csEntry);
+ void GetOriginalColor(int& iColorType, FX_FLOAT fc[4], const CFX_ByteStringC& csEntry);
- CFX_WideString GetCaption(FX_BSTR csEntry);
+ CFX_WideString GetCaption(const CFX_ByteStringC& csEntry);
- CPDF_Stream* GetIcon(FX_BSTR csEntry);
+ CPDF_Stream* GetIcon(const CFX_ByteStringC& csEntry);
friend class CPDF_FormControl;
};
diff --git a/core/include/fpdfdoc/fpdf_tagged.h b/core/include/fpdfdoc/fpdf_tagged.h
index 4943ad0ce6..58f613bf96 100644
--- a/core/include/fpdfdoc/fpdf_tagged.h
+++ b/core/include/fpdfdoc/fpdf_tagged.h
@@ -85,17 +85,17 @@ public:
virtual CFX_PtrArray* GetObjectArray() = 0;
- virtual CPDF_Object* GetAttr(FX_BSTR owner, FX_BSTR name, FX_BOOL bInheritable = FALSE, FX_FLOAT fLevel = 0.0F) = 0;
+ virtual CPDF_Object* GetAttr(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, FX_BOOL bInheritable = FALSE, FX_FLOAT fLevel = 0.0F) = 0;
- virtual CFX_ByteString GetName(FX_BSTR owner, FX_BSTR name, FX_BSTR default_value, FX_BOOL bInheritable = FALSE, int subindex = -1) = 0;
+ virtual CFX_ByteString GetName(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, const CFX_ByteStringC& default_value, FX_BOOL bInheritable = FALSE, int subindex = -1) = 0;
- virtual FX_ARGB GetColor(FX_BSTR owner, FX_BSTR name, FX_ARGB default_value, FX_BOOL bInheritable = FALSE, int subindex = -1) = 0;
+ virtual FX_ARGB GetColor(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, FX_ARGB default_value, FX_BOOL bInheritable = FALSE, int subindex = -1) = 0;
- virtual FX_FLOAT GetNumber(FX_BSTR owner, FX_BSTR name, FX_FLOAT default_value, FX_BOOL bInheritable = FALSE, int subindex = -1) = 0;
+ virtual FX_FLOAT GetNumber(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, FX_FLOAT default_value, FX_BOOL bInheritable = FALSE, int subindex = -1) = 0;
- virtual int GetInteger(FX_BSTR owner, FX_BSTR name, int default_value, FX_BOOL bInheritable = FALSE, int subindex = -1) = 0;
+ virtual int GetInteger(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, int default_value, FX_BOOL bInheritable = FALSE, int subindex = -1) = 0;
};
diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h
index 924420da91..da83b14b08 100644
--- a/core/include/fxcrt/fx_basic.h
+++ b/core/include/fxcrt/fx_basic.h
@@ -43,7 +43,7 @@ public:
void AppendFill(uint8_t byte, FX_STRSIZE count);
- void AppendString(FX_BSTR str)
+ void AppendString(const CFX_ByteStringC& str)
{
AppendBlock(str.GetPtr(), str.GetLength());
}
@@ -95,7 +95,7 @@ class CFX_ByteTextBuf : public CFX_BinaryBuf
{
public:
- void operator = (FX_BSTR str);
+ void operator = (const CFX_ByteStringC& str);
void AppendChar(int ch)
{
@@ -108,7 +108,7 @@ public:
CFX_ByteTextBuf& operator << (double f);
- CFX_ByteTextBuf& operator << (FX_BSTR lpsz);
+ CFX_ByteTextBuf& operator << (const CFX_ByteStringC& lpsz);
CFX_ByteTextBuf& operator << (const CFX_ByteTextBuf& buf);
@@ -123,7 +123,7 @@ public:
void operator = (const FX_WCHAR* lpsz);
- void operator = (FX_WSTR str);
+ void operator = (const CFX_WideStringC& str);
void AppendChar(FX_WCHAR wch);
@@ -133,7 +133,7 @@ public:
CFX_WideTextBuf& operator << (const FX_WCHAR* lpsz);
- CFX_WideTextBuf& operator << (FX_WSTR str);
+ CFX_WideTextBuf& operator << (const CFX_WideStringC& str);
CFX_WideTextBuf& operator << (const CFX_WideString &str);
CFX_WideTextBuf& operator << (const CFX_WideTextBuf& buf);
@@ -170,7 +170,7 @@ public:
CFX_ArchiveSaver& operator << (double i);
- CFX_ArchiveSaver& operator << (FX_BSTR bstr);
+ CFX_ArchiveSaver& operator << (const CFX_ByteStringC& bstr);
CFX_ArchiveSaver& operator << (const FX_WCHAR* bstr);
@@ -248,7 +248,7 @@ public:
int32_t AppendDWord(FX_DWORD i);
- int32_t AppendString(FX_BSTR lpsz);
+ int32_t AppendString(const CFX_ByteStringC& lpsz);
protected:
@@ -332,7 +332,7 @@ public:
void Input(FX_WCHAR unicode);
- void AppendStr(FX_BSTR str)
+ void AppendStr(const CFX_ByteStringC& str)
{
m_UTF16First = 0;
m_Buffer << str;
@@ -934,16 +934,16 @@ public:
return m_nCount == 0;
}
- FX_BOOL Lookup(FX_BSTR key, void*& rValue) const;
+ FX_BOOL Lookup(const CFX_ByteStringC& key, void*& rValue) const;
- void*& operator[](FX_BSTR key);
+ void*& operator[](const CFX_ByteStringC& key);
- void SetAt(FX_BSTR key, void* newValue)
+ void SetAt(const CFX_ByteStringC& key, void* newValue)
{
(*this)[key] = newValue;
}
- FX_BOOL RemoveKey(FX_BSTR key);
+ FX_BOOL RemoveKey(const CFX_ByteStringC& key);
void RemoveAll();
@@ -963,7 +963,7 @@ public:
void InitHashTable(FX_DWORD hashSize, FX_BOOL bAllocNow = TRUE);
- FX_DWORD HashKey(FX_BSTR key) const;
+ FX_DWORD HashKey(const CFX_ByteStringC& key) const;
protected:
CAssoc** m_pHashTable;
@@ -982,7 +982,7 @@ protected:
void FreeAssoc(CAssoc* pAssoc);
- CAssoc* GetAssocAt(FX_BSTR key, FX_DWORD& hash) const;
+ CAssoc* GetAssocAt(const CFX_ByteStringC& key, FX_DWORD& hash) const;
public:
~CFX_MapByteStringToPtr();
@@ -1002,15 +1002,15 @@ public:
void* GetNextValue(FX_POSITION& rNextPosition) const;
- FX_BOOL Lookup(FX_BSTR key, void*& rValue) const;
+ FX_BOOL Lookup(const CFX_ByteStringC& key, void*& rValue) const;
- void SetAt(FX_BSTR key, void* value);
+ void SetAt(const CFX_ByteStringC& key, void* value);
- void RemoveKey(FX_BSTR key);
+ void RemoveKey(const CFX_ByteStringC& key);
int GetCount() const;
- void AddValue(FX_BSTR key, void* pValue);
+ void AddValue(const CFX_ByteStringC& key, void* pValue);
private:
CFX_BaseSegmentedArray m_Buffer;
diff --git a/core/include/fxcrt/fx_stream.h b/core/include/fxcrt/fx_stream.h
index ea3d23bab1..09a8e359fb 100644
--- a/core/include/fxcrt/fx_stream.h
+++ b/core/include/fxcrt/fx_stream.h
@@ -44,8 +44,8 @@ typedef struct FX_HFILE_ {
#define FX_FILEMODE_Write 0
#define FX_FILEMODE_ReadOnly 1
#define FX_FILEMODE_Truncate 2
-FX_HFILE FX_File_Open(FX_BSTR fileName, FX_DWORD dwMode);
-FX_HFILE FX_File_Open(FX_WSTR fileName, FX_DWORD dwMode);
+FX_HFILE FX_File_Open(const CFX_ByteStringC& fileName, FX_DWORD dwMode);
+FX_HFILE FX_File_Open(const CFX_WideStringC& fileName, FX_DWORD dwMode);
void FX_File_Close(FX_HFILE hFile);
FX_FILESIZE FX_File_GetSize(FX_HFILE hFile);
FX_FILESIZE FX_File_GetPosition(FX_HFILE hFile);
@@ -56,14 +56,14 @@ size_t FX_File_Write(FX_HFILE hFile, const void* pBuffer, size_t szBuffer);
size_t FX_File_WritePos(FX_HFILE hFile, const void* pBuffer, size_t szBuffer, FX_FILESIZE pos);
FX_BOOL FX_File_Flush(FX_HFILE hFile);
FX_BOOL FX_File_Truncate(FX_HFILE hFile, FX_FILESIZE szFile);
-FX_BOOL FX_File_Exist(FX_BSTR fileName);
-FX_BOOL FX_File_Exist(FX_WSTR fileName);
-FX_BOOL FX_File_Delete(FX_BSTR fileName);
-FX_BOOL FX_File_Delete(FX_WSTR fileName);
-FX_BOOL FX_File_Copy(FX_BSTR fileNameSrc, FX_BSTR fileNameDst);
-FX_BOOL FX_File_Copy(FX_WSTR fileNameSrc, FX_WSTR fileNameDst);
-FX_BOOL FX_File_Move(FX_BSTR fileNameSrc, FX_BSTR fileNameDst);
-FX_BOOL FX_File_Move(FX_WSTR fileNameSrc, FX_WSTR fileNameDst);
+FX_BOOL FX_File_Exist(const CFX_ByteStringC& fileName);
+FX_BOOL FX_File_Exist(const CFX_WideStringC& fileName);
+FX_BOOL FX_File_Delete(const CFX_ByteStringC& fileName);
+FX_BOOL FX_File_Delete(const CFX_WideStringC& fileName);
+FX_BOOL FX_File_Copy(const CFX_ByteStringC& fileNameSrc, const CFX_ByteStringC& fileNameDst);
+FX_BOOL FX_File_Copy(const CFX_WideStringC& fileNameSrc, const CFX_WideStringC& fileNameDst);
+FX_BOOL FX_File_Move(const CFX_ByteStringC& fileNameSrc, const CFX_ByteStringC& fileNameDst);
+FX_BOOL FX_File_Move(const CFX_WideStringC& fileNameSrc, const CFX_WideStringC& fileNameDst);
class IFX_StreamWrite
{
public:
@@ -172,7 +172,7 @@ public:
virtual void GetPath(CFX_WideString& wsPath) = 0;
virtual IFX_FileStream* CreateFileStream(FX_DWORD dwModes) = 0;
};
-IFX_FileAccess* FX_CreateDefaultFileAccess(FX_WSTR wsPath);
+IFX_FileAccess* FX_CreateDefaultFileAccess(const CFX_WideStringC& wsPath);
class IFX_MemoryStream : public IFX_FileStream
{
public:
diff --git a/core/include/fxcrt/fx_string.h b/core/include/fxcrt/fx_string.h
index 5923ffdf2d..4ce8b81937 100644
--- a/core/include/fxcrt/fx_string.h
+++ b/core/include/fxcrt/fx_string.h
@@ -167,7 +167,6 @@ inline bool operator== (const char* lhs, const CFX_ByteStringC& rhs) {
inline bool operator!= (const char* lhs, const CFX_ByteStringC& rhs) {
return rhs != lhs;
}
-typedef const CFX_ByteStringC& FX_BSTR;
#define FX_BSTRC(str) CFX_ByteStringC(str, sizeof str-1)
#define FXBSTR_ID(c1, c2, c3, c4) ((c1 << 24) | (c2 << 16) | (c3 << 8) | (c4))
@@ -196,8 +195,8 @@ public:
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(const CFX_ByteStringC& bstrc);
+ CFX_ByteString(const CFX_ByteStringC& bstrc1, const CFX_ByteStringC& bstrc2);
~CFX_ByteString();
@@ -232,14 +231,14 @@ public:
return !GetLength();
}
- int Compare(FX_BSTR str) const;
+ int Compare(const CFX_ByteStringC& str) const;
bool Equal(const char* ptr) const;
bool Equal(const CFX_ByteStringC& str) const;
bool Equal(const CFX_ByteString& other) const;
- bool EqualNoCase(FX_BSTR str) const;
+ bool EqualNoCase(const CFX_ByteStringC& str) const;
bool operator== (const char* ptr) const { return Equal(ptr); }
bool operator== (const CFX_ByteStringC& str) const { return Equal(str); }
@@ -263,7 +262,7 @@ public:
const CFX_ByteString& operator = (const FX_CHAR* str);
- const CFX_ByteString& operator = (FX_BSTR bstrc);
+ const CFX_ByteString& operator = (const CFX_ByteStringC& bstrc);
const CFX_ByteString& operator = (const CFX_ByteString& stringSrc);
@@ -277,7 +276,7 @@ public:
const CFX_ByteString& operator += (const CFX_ByteString& str);
- const CFX_ByteString& operator += (FX_BSTR bstrc);
+ const CFX_ByteString& operator += (const CFX_ByteStringC& bstrc);
uint8_t GetAt(FX_STRSIZE nIndex) const
{
@@ -315,7 +314,7 @@ public:
CFX_ByteString Right(FX_STRSIZE count) const;
- FX_STRSIZE Find(FX_BSTR lpszSub, FX_STRSIZE start = 0) const;
+ FX_STRSIZE Find(const CFX_ByteStringC& lpszSub, FX_STRSIZE start = 0) const;
FX_STRSIZE Find(FX_CHAR ch, FX_STRSIZE start = 0) const;
@@ -329,15 +328,15 @@ public:
void TrimRight(FX_CHAR chTarget);
- void TrimRight(FX_BSTR lpszTargets);
+ void TrimRight(const CFX_ByteStringC& lpszTargets);
void TrimLeft();
void TrimLeft(FX_CHAR chTarget);
- void TrimLeft(FX_BSTR lpszTargets);
+ void TrimLeft(const CFX_ByteStringC& lpszTargets);
- FX_STRSIZE Replace(FX_BSTR lpszOld, FX_BSTR lpszNew);
+ FX_STRSIZE Replace(const CFX_ByteStringC& lpszOld, const CFX_ByteStringC& lpszNew);
FX_STRSIZE Remove(FX_CHAR ch);
@@ -418,23 +417,23 @@ inline bool operator!= (const CFX_ByteStringC& lhs, const CFX_ByteString& rhs) {
return rhs != lhs;
}
-inline CFX_ByteString operator + (FX_BSTR str1, FX_BSTR str2)
+inline CFX_ByteString operator + (const CFX_ByteStringC& str1, const CFX_ByteStringC& str2)
{
return CFX_ByteString(str1, str2);
}
-inline CFX_ByteString operator + (FX_BSTR str1, const FX_CHAR* str2)
+inline CFX_ByteString operator + (const CFX_ByteStringC& str1, const FX_CHAR* str2)
{
return CFX_ByteString(str1, str2);
}
-inline CFX_ByteString operator + (const FX_CHAR* str1, FX_BSTR str2)
+inline CFX_ByteString operator + (const FX_CHAR* str1, const CFX_ByteStringC& str2)
{
return CFX_ByteString(str1, str2);
}
-inline CFX_ByteString operator + (FX_BSTR str1, FX_CHAR ch)
+inline CFX_ByteString operator + (const CFX_ByteStringC& str1, FX_CHAR ch)
{
return CFX_ByteString(str1, CFX_ByteStringC(ch));
}
-inline CFX_ByteString operator + (FX_CHAR ch, FX_BSTR str2)
+inline CFX_ByteString operator + (FX_CHAR ch, const CFX_ByteStringC& str2)
{
return CFX_ByteString(ch, str2);
}
@@ -458,11 +457,11 @@ inline CFX_ByteString operator + (const FX_CHAR* str1, const CFX_ByteString& str
{
return CFX_ByteString(str1, str2);
}
-inline CFX_ByteString operator + (const CFX_ByteString& str1, FX_BSTR str2)
+inline CFX_ByteString operator + (const CFX_ByteString& str1, const CFX_ByteStringC& str2)
{
return CFX_ByteString(str1, str2);
}
-inline CFX_ByteString operator + (FX_BSTR str1, const CFX_ByteString& str2)
+inline CFX_ByteString operator + (const CFX_ByteStringC& str1, const CFX_ByteString& str2)
{
return CFX_ByteString(str1, str2);
}
@@ -615,7 +614,6 @@ inline bool operator== (const wchar_t* lhs, const CFX_WideStringC& rhs) {
inline bool operator!= (const wchar_t* lhs, const CFX_WideStringC& rhs) {
return rhs != lhs;
}
-typedef const CFX_WideStringC& FX_WSTR;
#define FX_WSTRC(wstr) CFX_WideStringC(wstr, FX_ArraySize(wstr) - 1)
// A mutable string with shared buffers using copy-on-write semantics that
@@ -896,11 +894,11 @@ inline bool operator!= (const wchar_t* lhs, const CFX_WideString& rhs) {
inline bool operator!= (const CFX_WideStringC& lhs, const CFX_WideString& rhs) {
return rhs != lhs;
}
-FX_FLOAT FX_atof(FX_BSTR str);
-void FX_atonum(FX_BSTR str, FX_BOOL& bInteger, void* pData);
+FX_FLOAT FX_atof(const CFX_ByteStringC& str);
+void FX_atonum(const CFX_ByteStringC& str, FX_BOOL& bInteger, void* pData);
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)
+inline CFX_ByteString FX_UTF8Encode(const CFX_WideStringC& wsStr)
{
return FX_UTF8Encode(wsStr.GetPtr(), wsStr.GetLength());
}
diff --git a/core/include/fxcrt/fx_xml.h b/core/include/fxcrt/fx_xml.h
index b2fb24c6df..fb24f61b13 100644
--- a/core/include/fxcrt/fx_xml.h
+++ b/core/include/fxcrt/fx_xml.h
@@ -27,9 +27,9 @@ public:
{
RemoveAll();
}
- const CFX_WideString* Lookup(FX_BSTR space, FX_BSTR name) const;
- void SetAt(FX_BSTR space, FX_BSTR name, FX_WSTR value);
- void RemoveAt(FX_BSTR space, FX_BSTR name);
+ const CFX_WideString* Lookup(const CFX_ByteStringC& space, const CFX_ByteStringC& name) const;
+ void SetAt(const CFX_ByteStringC& space, const CFX_ByteStringC& name, const CFX_WideStringC& value);
+ void RemoveAt(const CFX_ByteStringC& space, const CFX_ByteStringC& name);
void RemoveAll();
int GetSize() const;
CXML_AttrItem& GetAt(int index) const;
@@ -39,7 +39,7 @@ class CXML_Content
{
public:
CXML_Content() : m_bCDATA(FALSE), m_Content() {}
- void Set(FX_BOOL bCDATA, FX_WSTR content)
+ void Set(FX_BOOL bCDATA, const CFX_WideStringC& content)
{
m_bCDATA = bCDATA;
m_Content = content;
@@ -53,8 +53,8 @@ public:
static CXML_Element* Parse(const void* pBuffer, size_t size, FX_BOOL bSaveSpaceChars = FALSE, FX_FILESIZE* pParsedSize = NULL);
static CXML_Element* Parse(IFX_FileRead *pFile, FX_BOOL bSaveSpaceChars = FALSE, FX_FILESIZE* pParsedSize = NULL);
static CXML_Element* Parse(IFX_BufferRead *pBuffer, FX_BOOL bSaveSpaceChars = FALSE, FX_FILESIZE* pParsedSize = NULL);
- CXML_Element(FX_BSTR qSpace, FX_BSTR tagName);
- CXML_Element(FX_BSTR qTagName);
+ CXML_Element(const CFX_ByteStringC& qSpace, const CFX_ByteStringC& tagName);
+ CXML_Element(const CFX_ByteStringC& qTagName);
CXML_Element();
~CXML_Element();
@@ -67,7 +67,7 @@ public:
CFX_ByteString GetNamespace(FX_BOOL bQualified = FALSE) const;
- CFX_ByteString GetNamespaceURI(FX_BSTR qName) const;
+ CFX_ByteString GetNamespaceURI(const CFX_ByteStringC& qName) const;
CXML_Element* GetParent() const
{
@@ -81,50 +81,50 @@ public:
void GetAttrByIndex(int index, CFX_ByteString &space, CFX_ByteString &name, CFX_WideString &value) const;
- FX_BOOL HasAttr(FX_BSTR qName) const;
+ FX_BOOL HasAttr(const CFX_ByteStringC& qName) const;
- FX_BOOL GetAttrValue(FX_BSTR name, CFX_WideString& attribute) const;
- CFX_WideString GetAttrValue(FX_BSTR name) const
+ FX_BOOL GetAttrValue(const CFX_ByteStringC& name, CFX_WideString& attribute) const;
+ CFX_WideString GetAttrValue(const CFX_ByteStringC& name) const
{
CFX_WideString attr;
GetAttrValue(name, attr);
return attr;
}
- FX_BOOL GetAttrValue(FX_BSTR space, FX_BSTR name, CFX_WideString& attribute) const;
- CFX_WideString GetAttrValue(FX_BSTR space, FX_BSTR name) const
+ FX_BOOL GetAttrValue(const CFX_ByteStringC& space, const CFX_ByteStringC& name, CFX_WideString& attribute) const;
+ CFX_WideString GetAttrValue(const CFX_ByteStringC& space, const CFX_ByteStringC& name) const
{
CFX_WideString attr;
GetAttrValue(space, name, attr);
return attr;
}
- FX_BOOL GetAttrInteger(FX_BSTR name, int& attribute) const;
- int GetAttrInteger(FX_BSTR name) const
+ FX_BOOL GetAttrInteger(const CFX_ByteStringC& name, int& attribute) const;
+ int GetAttrInteger(const CFX_ByteStringC& name) const
{
int attr = 0;
GetAttrInteger(name, attr);
return attr;
}
- FX_BOOL GetAttrInteger(FX_BSTR space, FX_BSTR name, int& attribute) const;
- int GetAttrInteger(FX_BSTR space, FX_BSTR name) const
+ FX_BOOL GetAttrInteger(const CFX_ByteStringC& space, const CFX_ByteStringC& name, int& attribute) const;
+ int GetAttrInteger(const CFX_ByteStringC& space, const CFX_ByteStringC& name) const
{
int attr = 0;
GetAttrInteger(space, name, attr);
return attr;
}
- FX_BOOL GetAttrFloat(FX_BSTR name, FX_FLOAT& attribute) const;
- FX_FLOAT GetAttrFloat(FX_BSTR name) const
+ FX_BOOL GetAttrFloat(const CFX_ByteStringC& name, FX_FLOAT& attribute) const;
+ FX_FLOAT GetAttrFloat(const CFX_ByteStringC& name) const
{
FX_FLOAT attr = 0;
GetAttrFloat(name, attr);
return attr;
}
- FX_BOOL GetAttrFloat(FX_BSTR space, FX_BSTR name, FX_FLOAT& attribute) const;
- FX_FLOAT GetAttrFloat(FX_BSTR space, FX_BSTR name) const
+ FX_BOOL GetAttrFloat(const CFX_ByteStringC& space, const CFX_ByteStringC& name, FX_FLOAT& attribute) const;
+ FX_FLOAT GetAttrFloat(const CFX_ByteStringC& space, const CFX_ByteStringC& name) const
{
FX_FLOAT attr = 0;
GetAttrFloat(space, name, attr);
@@ -141,23 +141,23 @@ public:
CXML_Element* GetElement(FX_DWORD index) const;
- CXML_Element* GetElement(FX_BSTR space, FX_BSTR tag) const
+ CXML_Element* GetElement(const CFX_ByteStringC& space, const CFX_ByteStringC& tag) const
{
return GetElement(space, tag, 0);
}
- FX_DWORD CountElements(FX_BSTR space, FX_BSTR tag) const;
+ FX_DWORD CountElements(const CFX_ByteStringC& space, const CFX_ByteStringC& tag) const;
- CXML_Element* GetElement(FX_BSTR space, FX_BSTR tag, int index) const;
+ CXML_Element* GetElement(const CFX_ByteStringC& space, const CFX_ByteStringC& tag, int index) const;
FX_DWORD FindElement(CXML_Element *pChild) const;
- void SetTag(FX_BSTR qSpace, FX_BSTR tagname);
+ void SetTag(const CFX_ByteStringC& qSpace, const CFX_ByteStringC& tagname);
- void SetTag(FX_BSTR qTagName);
+ void SetTag(const CFX_ByteStringC& qTagName);
void RemoveChildren();
diff --git a/core/include/fxge/fpf.h b/core/include/fxge/fpf.h
index 710600c84f..e288d1847b 100644
--- a/core/include/fxge/fpf.h
+++ b/core/include/fxge/fpf.h
@@ -55,10 +55,10 @@ public:
virtual ~IFPF_FontMgr() { }
virtual void LoadSystemFonts() = 0;
virtual void LoadPrivateFont(IFX_FileRead* pFontFile) = 0;
- virtual void LoadPrivateFont(FX_BSTR bsFileName) = 0;
+ virtual void LoadPrivateFont(const CFX_ByteStringC& bsFileName) = 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;
+ virtual IFPF_Font* CreateFont(const CFX_ByteStringC& bsFamilyname, uint8_t charset, FX_DWORD dwStyle, FX_DWORD dwMatch = 0) = 0;
};
#endif // CORE_INCLUDE_FXGE_FPF_H_
diff --git a/core/include/fxge/fx_font.h b/core/include/fxge/fx_font.h
index c950130d8f..a3c8f89fda 100644
--- a/core/include/fxge/fx_font.h
+++ b/core/include/fxge/fx_font.h
@@ -360,7 +360,7 @@ class CFX_FolderFontInfo : public IFX_SystemFontInfo
public:
CFX_FolderFontInfo();
virtual ~CFX_FolderFontInfo();
- void AddPath(FX_BSTR path);
+ void AddPath(const CFX_ByteStringC& path);
virtual void Release();
virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper);
virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* face, FX_BOOL& bExact);
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
index 717386041d..8cfbd1b40e 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
@@ -106,11 +106,11 @@ void CPDF_PageContentGenerate::ProcessForm(CFX_ByteTextBuf& buf, const uint8_t*
}
CPDF_Stream* pStream = new CPDF_Stream(NULL, 0, NULL);
CPDF_Dictionary* pFormDict = CPDF_Dictionary::Create();
- pFormDict->SetAtName(FX_BSTR("Type"), FX_BSTR("XObject"));
- pFormDict->SetAtName(FX_BSTR("Subtype"), FX_BSTR("Form"));
+ pFormDict->SetAtName("Type", "XObject");
+ pFormDict->SetAtName("Subtype", "Form");
CFX_FloatRect bbox = m_pPage->GetPageBBox();
matrix.TransformRect(bbox);
- pFormDict->SetAtRect(FX_BSTR("BBox"), bbox);
+ pFormDict->SetAtRect("BBox", bbox);
pStream->InitStream((uint8_t*)data, size, pFormDict);
buf << "q " << matrix << " cm ";
CFX_ByteString name = RealizeResource(pStream, "XObject");
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
index 7176a62435..18913a0020 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
@@ -1170,8 +1170,8 @@ void CPDF_Document::DeletePage(int iPage)
}
m_PageList.RemoveAt(iPage);
}
-CPDF_Object* FPDFAPI_GetPageAttr(CPDF_Dictionary* pPageDict, FX_BSTR name);
-void FPDFAPI_FlatPageAttr(CPDF_Dictionary* pPageDict, FX_BSTR name)
+CPDF_Object* FPDFAPI_GetPageAttr(CPDF_Dictionary* pPageDict, const CFX_ByteStringC& name);
+void FPDFAPI_FlatPageAttr(CPDF_Dictionary* pPageDict, const CFX_ByteStringC& name)
{
if (pPageDict->KeyExist(name)) {
return;
diff --git a/core/src/fpdfapi/fpdf_font/font_int.h b/core/src/fpdfapi/fpdf_font/font_int.h
index 6f32f4fa98..aa46f16f75 100644
--- a/core/src/fpdfapi/fpdf_font/font_int.h
+++ b/core/src/fpdfapi/fpdf_font/font_int.h
@@ -57,7 +57,7 @@ public:
CPDF_CMapParser();
~CPDF_CMapParser() {}
FX_BOOL Initialize(CPDF_CMap*);
- void ParseWord(FX_BSTR str);
+ void ParseWord(const CFX_ByteStringC& str);
CFX_BinaryBuf m_AddMaps;
private:
CPDF_CMap* m_pCMap;
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
index c6922d11f8..48a96dc554 100644
--- a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
+++ b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
@@ -391,7 +391,7 @@ int CPDF_Font::GetCharTypeWidth(FX_DWORD charcode)
return m_Font.GetGlyphWidth(glyph_index);
}
int _PDF_GetStandardFontName(CFX_ByteString& name);
-CPDF_Font* CPDF_Font::GetStockFont(CPDF_Document* pDoc, FX_BSTR name)
+CPDF_Font* CPDF_Font::GetStockFont(CPDF_Document* pDoc, const CFX_ByteStringC& name)
{
CFX_ByteString fontname(name);
int font_id = _PDF_GetStandardFontName(fontname);
@@ -532,7 +532,7 @@ FX_DWORD CPDF_ToUnicodeMap::ReverseLookup(FX_WCHAR unicode)
}
return 0;
}
-static FX_DWORD _StringToCode(FX_BSTR str)
+static FX_DWORD _StringToCode(const CFX_ByteStringC& str)
{
const FX_CHAR* buf = str.GetCStr();
int len = str.GetLength();
@@ -584,7 +584,7 @@ static CFX_WideString _StringDataAdd(CFX_WideString str)
}
return ret;
}
-static CFX_WideString _StringToWideString(FX_BSTR str)
+static CFX_WideString _StringToWideString(const CFX_ByteStringC& str)
{
const FX_CHAR* buf = str.GetCStr();
int len = str.GetLength();
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
index bec2c90144..ed5ef5c5fe 100644
--- a/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
+++ b/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
@@ -119,7 +119,7 @@ FX_BOOL CPDF_CMapParser::Initialize(CPDF_CMap* pCMap)
m_AddMaps.EstimateSize(0, 10240);
return TRUE;
}
-static FX_DWORD CMap_GetCode(FX_BSTR word)
+static FX_DWORD CMap_GetCode(const CFX_ByteStringC& word)
{
int num = 0;
if (word.GetAt(0) == '<') {
@@ -146,7 +146,7 @@ static FX_DWORD CMap_GetCode(FX_BSTR word)
}
return num;
}
-static FX_BOOL _CMap_GetCodeRange(_CMap_CodeRange& range, FX_BSTR first, FX_BSTR second)
+static FX_BOOL _CMap_GetCodeRange(_CMap_CodeRange& range, const CFX_ByteStringC& first, const CFX_ByteStringC& second)
{
if (first.GetLength() == 0 || first.GetAt(0) != '<') {
return FALSE;
@@ -177,11 +177,11 @@ static FX_BOOL _CMap_GetCodeRange(_CMap_CodeRange& range, FX_BSTR first, FX_BSTR
}
return TRUE;
}
-static CFX_ByteString CMap_GetString(FX_BSTR word)
+static CFX_ByteString CMap_GetString(const CFX_ByteStringC& word)
{
return word.Mid(1, word.GetLength() - 2);
}
-void CPDF_CMapParser::ParseWord(FX_BSTR word)
+void CPDF_CMapParser::ParseWord(const CFX_ByteStringC& word)
{
if (word.IsEmpty()) {
return;
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
index 046cebeb98..688066e3a3 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
@@ -902,7 +902,7 @@ CPDF_Page::~CPDF_Page()
pModule->DestroyPageCache(m_pPageRender);
}
}
-CPDF_Object* FPDFAPI_GetPageAttr(CPDF_Dictionary* pPageDict, FX_BSTR name)
+CPDF_Object* FPDFAPI_GetPageAttr(CPDF_Dictionary* pPageDict, const CFX_ByteStringC& name)
{
int level = 0;
while (1) {
@@ -921,7 +921,7 @@ CPDF_Object* FPDFAPI_GetPageAttr(CPDF_Dictionary* pPageDict, FX_BSTR name)
}
}
}
-CPDF_Object* CPDF_Page::GetPageAttr(FX_BSTR name) const
+CPDF_Object* CPDF_Page::GetPageAttr(const CFX_ByteStringC& name) const
{
return FPDFAPI_GetPageAttr(m_pFormDict, name);
}
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp
index 00ea4c5fce..305c1a9183 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp
@@ -310,7 +310,7 @@ CPDF_Font* CPDF_DocPageData::GetFont(CPDF_Dictionary* pFontDict, FX_BOOL findOnl
m_FontMap.SetAt(pFontDict, fontData);
return pFont;
}
-CPDF_Font* CPDF_DocPageData::GetStandardFont(FX_BSTR fontName, CPDF_FontEncoding* pEncoding)
+CPDF_Font* CPDF_DocPageData::GetStandardFont(const CFX_ByteStringC& fontName, CPDF_FontEncoding* pEncoding)
{
if (fontName.IsEmpty()) {
return NULL;
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 3ce4baf20c..8752acf536 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
@@ -376,7 +376,7 @@ CPDF_GeneralStateData::~CPDF_GeneralStateData()
pDocCache->ReleaseTransferFunc(m_pTR);
}
}
-static int GetBlendType(FX_BSTR mode)
+static int GetBlendType(const CFX_ByteStringC& mode)
{
switch (mode.GetID()) {
case FXBSTR_ID('N', 'o', 'r', 'm'):
@@ -417,7 +417,7 @@ static int GetBlendType(FX_BSTR mode)
}
return FXDIB_BLEND_NORMAL;
}
-void CPDF_GeneralStateData::SetBlendMode(FX_BSTR blend_mode)
+void CPDF_GeneralStateData::SetBlendMode(const CFX_ByteStringC& blend_mode)
{
if (blend_mode.GetLength() > 15) {
return;
@@ -677,7 +677,7 @@ void CPDF_ContentMarkData::DeleteLastMark()
}
m_Marks.RemoveAt(size - 1);
}
-FX_BOOL CPDF_ContentMark::HasMark(FX_BSTR mark) const
+FX_BOOL CPDF_ContentMark::HasMark(const CFX_ByteStringC& mark) const
{
if (m_pObject == NULL) {
return FALSE;
@@ -690,7 +690,7 @@ FX_BOOL CPDF_ContentMark::HasMark(FX_BSTR mark) const
}
return FALSE;
}
-FX_BOOL CPDF_ContentMark::LookupMark(FX_BSTR mark, CPDF_Dictionary*& pDict) const
+FX_BOOL CPDF_ContentMark::LookupMark(const CFX_ByteStringC& mark, CPDF_Dictionary*& pDict) const
{
if (m_pObject == NULL) {
return FALSE;
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index d898feecf4..ebe75484e0 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
@@ -438,7 +438,7 @@ const _FX_BSTR _PDF_InlineValueAbbr[] = {
_FX_BSTRC("CCITTFaxDecode"), _FX_BSTRC("CCF"),
_FX_BSTRC("DCTDecode"), _FX_BSTRC("DCT"),
};
-static CFX_ByteStringC _PDF_FindFullName(const _FX_BSTR* table, int count, FX_BSTR abbr)
+static CFX_ByteStringC _PDF_FindFullName(const _FX_BSTR* table, int count, const CFX_ByteStringC& abbr)
{
int i = 0;
while (i < count) {
@@ -496,7 +496,7 @@ void _PDF_ReplaceAbbr(CPDF_Object* pObj)
}
}
}
-static CFX_ByteStringC _PDF_FindAbbrName(const _FX_BSTR* table, int count, FX_BSTR fullName)
+static CFX_ByteStringC _PDF_FindAbbrName(const _FX_BSTR* table, int count, const CFX_ByteStringC& fullName)
{
int i = 0;
while (i < count) {
@@ -1178,7 +1178,7 @@ void CPDF_StreamContentParser::Handle_SetFont()
m_pCurStates->m_TextState.SetFont(pFont);
}
}
-CPDF_Object* CPDF_StreamContentParser::FindResourceObj(FX_BSTR type, const CFX_ByteString& name)
+CPDF_Object* CPDF_StreamContentParser::FindResourceObj(const CFX_ByteStringC& type, const CFX_ByteString& name)
{
if (m_pResources == NULL) {
return NULL;
diff --git a/core/src/fpdfapi/fpdf_page/pageint.h b/core/src/fpdfapi/fpdf_page/pageint.h
index 9ff1c4cb11..5bf854948a 100644
--- a/core/src/fpdfapi/fpdf_page/pageint.h
+++ b/core/src/fpdfapi/fpdf_page/pageint.h
@@ -205,7 +205,7 @@ public:
CPDF_Font* FindFont(const CFX_ByteString& name);
CPDF_ColorSpace* FindColorSpace(const CFX_ByteString& name);
CPDF_Pattern* FindPattern(const CFX_ByteString& name, FX_BOOL bShading);
- CPDF_Object* FindResourceObj(FX_BSTR type, const CFX_ByteString& name);
+ CPDF_Object* FindResourceObj(const CFX_ByteStringC& type, const CFX_ByteString& name);
void Handle_CloseFillStrokePath();
void Handle_FillStrokePath();
void Handle_CloseEOFillStrokePath();
@@ -367,7 +367,7 @@ public:
~CPDF_DocPageData();
void Clear(FX_BOOL bRelease = FALSE);
CPDF_Font* GetFont(CPDF_Dictionary* pFontDict, FX_BOOL findOnly);
- CPDF_Font* GetStandardFont(FX_BSTR fontName, CPDF_FontEncoding* pEncoding);
+ CPDF_Font* GetStandardFont(const CFX_ByteStringC& fontName, CPDF_FontEncoding* pEncoding);
void ReleaseFont(CPDF_Dictionary* pFontDict);
CPDF_ColorSpace* GetColorSpace(CPDF_Object* pCSObj, CPDF_Dictionary* pResources);
CPDF_ColorSpace* GetCopiedColorSpace(CPDF_Object* pCSObj);
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp
index 973a14e33b..b4366ba277 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp
@@ -103,7 +103,7 @@ FX_DWORD CPDF_StandardSecurityHandler::GetPermissions()
{
return m_Permissions;
}
-static FX_BOOL _LoadCryptInfo(CPDF_Dictionary* pEncryptDict, FX_BSTR name, int& cipher, int& keylen)
+static FX_BOOL _LoadCryptInfo(CPDF_Dictionary* pEncryptDict, const CFX_ByteStringC& name, int& cipher, int& keylen)
{
int Version = pEncryptDict->GetInteger(FX_BSTRC("V"));
cipher = FXCIPHER_RC4;
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp
index 97e68b5c0c..f0cabe5412 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp
@@ -66,7 +66,7 @@ void CFX_DataFilter::ReportEOF(FX_DWORD left_input)
m_bEOF = TRUE;
m_SrcPos -= left_input;
}
-CFX_DataFilter* FPDF_CreateFilter(FX_BSTR name, const CPDF_Dictionary* pParam, int width, int height)
+CFX_DataFilter* FPDF_CreateFilter(const CFX_ByteStringC& name, const CPDF_Dictionary* pParam, int width, int height)
{
FX_DWORD id = name.GetID();
switch (id) {
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
index 5cc06e7929..8533859bef 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
@@ -353,11 +353,11 @@ CPDF_Number::CPDF_Number(FX_BOOL bInteger, void* pData)
: CPDF_Object(PDFOBJ_NUMBER), m_bInteger(bInteger), m_Integer(*(int*)pData) {
}
-CPDF_Number::CPDF_Number(FX_BSTR str) : CPDF_Object(PDFOBJ_NUMBER) {
+CPDF_Number::CPDF_Number(const CFX_ByteStringC& str) : CPDF_Object(PDFOBJ_NUMBER) {
FX_atonum(str, m_bInteger, &m_Integer);
}
-void CPDF_Number::SetString(FX_BSTR str)
+void CPDF_Number::SetString(const CFX_ByteStringC& str)
{
FX_atonum(str, m_bInteger, &m_Integer);
}
@@ -588,19 +588,19 @@ CPDF_Object* CPDF_Dictionary::GetNextElement(FX_POSITION& pos, CFX_ByteString& k
m_Map.GetNextAssoc(pos, key, (void*&)p);
return p;
}
-CPDF_Object* CPDF_Dictionary::GetElement(FX_BSTR key) const
+CPDF_Object* CPDF_Dictionary::GetElement(const CFX_ByteStringC& key) const
{
CPDF_Object* p = NULL;
m_Map.Lookup(key, (void*&)p);
return p;
}
-CPDF_Object* CPDF_Dictionary::GetElementValue(FX_BSTR key) const
+CPDF_Object* CPDF_Dictionary::GetElementValue(const CFX_ByteStringC& key) const
{
CPDF_Object* p = NULL;
m_Map.Lookup(key, (void*&)p);
return p ? p->GetDirect() : NULL;
}
-CFX_ByteString CPDF_Dictionary::GetString(FX_BSTR key) const
+CFX_ByteString CPDF_Dictionary::GetString(const CFX_ByteStringC& key) const
{
CPDF_Object* p = NULL;
m_Map.Lookup(key, (void*&)p);
@@ -609,7 +609,7 @@ CFX_ByteString CPDF_Dictionary::GetString(FX_BSTR key) const
else
return CFX_ByteString();
}
-CFX_ByteStringC CPDF_Dictionary::GetConstString(FX_BSTR key) const
+CFX_ByteStringC CPDF_Dictionary::GetConstString(const CFX_ByteStringC& key) const
{
CPDF_Object* p = NULL;
m_Map.Lookup(key, (void*&)p);
@@ -618,7 +618,7 @@ CFX_ByteStringC CPDF_Dictionary::GetConstString(FX_BSTR key) const
else
return CFX_ByteStringC();
}
-CFX_WideString CPDF_Dictionary::GetUnicodeText(FX_BSTR key, CFX_CharMap* pCharMap) const
+CFX_WideString CPDF_Dictionary::GetUnicodeText(const CFX_ByteStringC& key, CFX_CharMap* pCharMap) const
{
CPDF_Object* p = NULL;
m_Map.Lookup(key, (void*&)p);
@@ -634,7 +634,7 @@ CFX_WideString CPDF_Dictionary::GetUnicodeText(FX_BSTR key, CFX_CharMap* pCharMa
}
return CFX_WideString();
}
-CFX_ByteString CPDF_Dictionary::GetString(FX_BSTR key, FX_BSTR def) const
+CFX_ByteString CPDF_Dictionary::GetString(const CFX_ByteStringC& key, const CFX_ByteStringC& def) const
{
CPDF_Object* p = NULL;
m_Map.Lookup(key, (void*&)p);
@@ -643,7 +643,7 @@ CFX_ByteString CPDF_Dictionary::GetString(FX_BSTR key, FX_BSTR def) const
}
return CFX_ByteString(def);
}
-CFX_ByteStringC CPDF_Dictionary::GetConstString(FX_BSTR key, FX_BSTR def) const
+CFX_ByteStringC CPDF_Dictionary::GetConstString(const CFX_ByteStringC& key, const CFX_ByteStringC& def) const
{
CPDF_Object* p = NULL;
m_Map.Lookup(key, (void*&)p);
@@ -652,7 +652,7 @@ CFX_ByteStringC CPDF_Dictionary::GetConstString(FX_BSTR key, FX_BSTR def) const
else
return CFX_ByteStringC(def);
}
-int CPDF_Dictionary::GetInteger(FX_BSTR key) const
+int CPDF_Dictionary::GetInteger(const CFX_ByteStringC& key) const
{
CPDF_Object* p = NULL;
m_Map.Lookup(key, (void*&)p);
@@ -661,7 +661,7 @@ int CPDF_Dictionary::GetInteger(FX_BSTR key) const
}
return 0;
}
-int CPDF_Dictionary::GetInteger(FX_BSTR key, int def) const
+int CPDF_Dictionary::GetInteger(const CFX_ByteStringC& key, int def) const
{
CPDF_Object* p = NULL;
m_Map.Lookup(key, (void*&)p);
@@ -670,7 +670,7 @@ int CPDF_Dictionary::GetInteger(FX_BSTR key, int def) const
}
return def;
}
-FX_FLOAT CPDF_Dictionary::GetNumber(FX_BSTR key) const
+FX_FLOAT CPDF_Dictionary::GetNumber(const CFX_ByteStringC& key) const
{
CPDF_Object* p = NULL;
m_Map.Lookup(key, (void*&)p);
@@ -679,7 +679,7 @@ FX_FLOAT CPDF_Dictionary::GetNumber(FX_BSTR key) const
}
return 0;
}
-FX_BOOL CPDF_Dictionary::GetBoolean(FX_BSTR key, FX_BOOL bDefault) const
+FX_BOOL CPDF_Dictionary::GetBoolean(const CFX_ByteStringC& key, FX_BOOL bDefault) const
{
CPDF_Object* p = NULL;
m_Map.Lookup(key, (void*&)p);
@@ -688,7 +688,7 @@ FX_BOOL CPDF_Dictionary::GetBoolean(FX_BSTR key, FX_BOOL bDefault) const
}
return bDefault;
}
-CPDF_Dictionary* CPDF_Dictionary::GetDict(FX_BSTR key) const
+CPDF_Dictionary* CPDF_Dictionary::GetDict(const CFX_ByteStringC& key) const
{
CPDF_Object* p = GetElementValue(key);
if (p == NULL) {
@@ -700,7 +700,7 @@ CPDF_Dictionary* CPDF_Dictionary::GetDict(FX_BSTR key) const
}
return NULL;
}
-CPDF_Array* CPDF_Dictionary::GetArray(FX_BSTR key) const
+CPDF_Array* CPDF_Dictionary::GetArray(const CFX_ByteStringC& key) const
{
CPDF_Object* p = GetElementValue(key);
if (p == NULL || p->GetType() != PDFOBJ_ARRAY) {
@@ -708,7 +708,7 @@ CPDF_Array* CPDF_Dictionary::GetArray(FX_BSTR key) const
}
return (CPDF_Array*)p;
}
-CPDF_Stream* CPDF_Dictionary::GetStream(FX_BSTR key) const
+CPDF_Stream* CPDF_Dictionary::GetStream(const CFX_ByteStringC& key) const
{
CPDF_Object* p = GetElementValue(key);
if (p == NULL || p->GetType() != PDFOBJ_STREAM) {
@@ -716,7 +716,7 @@ CPDF_Stream* CPDF_Dictionary::GetStream(FX_BSTR key) const
}
return (CPDF_Stream*)p;
}
-CFX_FloatRect CPDF_Dictionary::GetRect(FX_BSTR key) const
+CFX_FloatRect CPDF_Dictionary::GetRect(const CFX_ByteStringC& key) const
{
CFX_FloatRect rect;
CPDF_Array* pArray = GetArray(key);
@@ -725,7 +725,7 @@ CFX_FloatRect CPDF_Dictionary::GetRect(FX_BSTR key) const
}
return rect;
}
-CFX_AffineMatrix CPDF_Dictionary::GetMatrix(FX_BSTR key) const
+CFX_AffineMatrix CPDF_Dictionary::GetMatrix(const CFX_ByteStringC& key) const
{
CFX_AffineMatrix matrix;
CPDF_Array* pArray = GetArray(key);
@@ -734,12 +734,12 @@ CFX_AffineMatrix CPDF_Dictionary::GetMatrix(FX_BSTR key) const
}
return matrix;
}
-FX_BOOL CPDF_Dictionary::KeyExist(FX_BSTR key) const
+FX_BOOL CPDF_Dictionary::KeyExist(const CFX_ByteStringC& key) const
{
void* value;
return m_Map.Lookup(key, value);
}
-void CPDF_Dictionary::SetAt(FX_BSTR key, CPDF_Object* pObj, CPDF_IndirectObjects* pObjs)
+void CPDF_Dictionary::SetAt(const CFX_ByteStringC& key, CPDF_Object* pObj, CPDF_IndirectObjects* pObjs)
{
ASSERT(m_Type == PDFOBJ_DICTIONARY);
CPDF_Object* p = NULL;
@@ -759,12 +759,12 @@ void CPDF_Dictionary::SetAt(FX_BSTR key, CPDF_Object* pObj, CPDF_IndirectObjects
m_Map.RemoveKey(key);
}
}
-void CPDF_Dictionary::AddValue(FX_BSTR key, CPDF_Object* pObj)
+void CPDF_Dictionary::AddValue(const CFX_ByteStringC& key, CPDF_Object* pObj)
{
ASSERT(m_Type == PDFOBJ_DICTIONARY);
m_Map.AddValue(key, pObj);
}
-void CPDF_Dictionary::RemoveAt(FX_BSTR key)
+void CPDF_Dictionary::RemoveAt(const CFX_ByteStringC& key)
{
ASSERT(m_Type == PDFOBJ_DICTIONARY);
CPDF_Object* p = NULL;
@@ -775,7 +775,7 @@ void CPDF_Dictionary::RemoveAt(FX_BSTR key)
p->Release();
m_Map.RemoveKey(key);
}
-void CPDF_Dictionary::ReplaceKey(FX_BSTR oldkey, FX_BSTR newkey)
+void CPDF_Dictionary::ReplaceKey(const CFX_ByteStringC& oldkey, const CFX_ByteStringC& newkey)
{
ASSERT(m_Type == PDFOBJ_DICTIONARY);
CPDF_Object* p = NULL;
@@ -807,37 +807,37 @@ FX_BOOL CPDF_Dictionary::Identical(CPDF_Dictionary* pOther) const
}
return TRUE;
}
-void CPDF_Dictionary::SetAtInteger(FX_BSTR key, int i)
+void CPDF_Dictionary::SetAtInteger(const CFX_ByteStringC& key, int i)
{
SetAt(key, new CPDF_Number(i));
}
-void CPDF_Dictionary::SetAtName(FX_BSTR key, const CFX_ByteString& name)
+void CPDF_Dictionary::SetAtName(const CFX_ByteStringC& key, const CFX_ByteString& name)
{
SetAt(key, new CPDF_Name(name));
}
-void CPDF_Dictionary::SetAtString(FX_BSTR key, const CFX_ByteString& str)
+void CPDF_Dictionary::SetAtString(const CFX_ByteStringC& key, const CFX_ByteString& str)
{
SetAt(key, new CPDF_String(str));
}
-void CPDF_Dictionary::SetAtReference(FX_BSTR key, CPDF_IndirectObjects* pDoc, FX_DWORD objnum)
+void CPDF_Dictionary::SetAtReference(const CFX_ByteStringC& key, CPDF_IndirectObjects* pDoc, FX_DWORD objnum)
{
SetAt(key, new CPDF_Reference(pDoc, objnum));
}
-void CPDF_Dictionary::AddReference(FX_BSTR key, CPDF_IndirectObjects* pDoc, FX_DWORD objnum)
+void CPDF_Dictionary::AddReference(const CFX_ByteStringC& key, CPDF_IndirectObjects* pDoc, FX_DWORD objnum)
{
AddValue(key, new CPDF_Reference(pDoc, objnum));
}
-void CPDF_Dictionary::SetAtNumber(FX_BSTR key, FX_FLOAT f)
+void CPDF_Dictionary::SetAtNumber(const CFX_ByteStringC& key, FX_FLOAT f)
{
CPDF_Number* pNumber = new CPDF_Number;
pNumber->SetNumber(f);
SetAt(key, pNumber);
}
-void CPDF_Dictionary::SetAtBoolean(FX_BSTR key, FX_BOOL bValue)
+void CPDF_Dictionary::SetAtBoolean(const CFX_ByteStringC& key, FX_BOOL bValue)
{
SetAt(key, new CPDF_Boolean(bValue));
}
-void CPDF_Dictionary::SetAtRect(FX_BSTR key, const CFX_FloatRect& rect)
+void CPDF_Dictionary::SetAtRect(const CFX_ByteStringC& key, const CFX_FloatRect& rect)
{
CPDF_Array* pArray = new CPDF_Array;
pArray->AddNumber(rect.left);
@@ -846,7 +846,7 @@ void CPDF_Dictionary::SetAtRect(FX_BSTR key, const CFX_FloatRect& rect)
pArray->AddNumber(rect.top);
SetAt(key, pArray);
}
-void CPDF_Dictionary::SetAtMatrix(FX_BSTR key, const CFX_AffineMatrix& matrix)
+void CPDF_Dictionary::SetAtMatrix(const CFX_ByteStringC& key, const CFX_AffineMatrix& matrix)
{
CPDF_Array* pArray = new CPDF_Array;
pArray->AddNumber16(matrix.a);
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
index 09c5c39e4f..f4fa8ff499 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
@@ -335,7 +335,7 @@ FX_FILESIZE CPDF_Parser::GetObjectOffset(FX_DWORD objnum)
}
return 0;
}
-static int32_t GetDirectInteger(CPDF_Dictionary* pDict, FX_BSTR key)
+static int32_t GetDirectInteger(CPDF_Dictionary* pDict, const CFX_ByteStringC& key)
{
CPDF_Object* pObj = pDict->GetElement(key);
if (pObj == NULL) {
@@ -346,7 +346,7 @@ static int32_t GetDirectInteger(CPDF_Dictionary* pDict, FX_BSTR key)
}
return 0;
}
-static FX_BOOL CheckDirectType(CPDF_Dictionary* pDict, FX_BSTR key, int32_t iType)
+static FX_BOOL CheckDirectType(CPDF_Dictionary* pDict, const CFX_ByteStringC& key, int32_t iType)
{
CPDF_Object* pObj = pDict->GetElement(key);
if (!pObj) {
@@ -2549,7 +2549,7 @@ FX_BOOL CPDF_SyntaxParser::IsWholeWord(FX_FILESIZE startpos, FX_FILESIZE limit,
}
return TRUE;
}
-FX_BOOL CPDF_SyntaxParser::SearchWord(FX_BSTR tag, FX_BOOL bWholeWord, FX_BOOL bForward, FX_FILESIZE limit)
+FX_BOOL CPDF_SyntaxParser::SearchWord(const CFX_ByteStringC& tag, FX_BOOL bWholeWord, FX_BOOL bForward, FX_FILESIZE limit)
{
int32_t taglen = tag.GetLength();
if (taglen == 0) {
@@ -2620,7 +2620,7 @@ struct _SearchTagRecord {
FX_DWORD m_Len;
FX_DWORD m_Offset;
};
-int32_t CPDF_SyntaxParser::SearchMultiWord(FX_BSTR tags, FX_BOOL bWholeWord, FX_FILESIZE limit)
+int32_t CPDF_SyntaxParser::SearchMultiWord(const CFX_ByteStringC& tags, FX_BOOL bWholeWord, FX_FILESIZE limit)
{
int32_t ntags = 1, i;
for (i = 0; i < tags.GetLength(); i ++)
@@ -2682,7 +2682,7 @@ end:
FX_Free(pPatterns);
return found;
}
-FX_FILESIZE CPDF_SyntaxParser::FindTag(FX_BSTR tag, FX_FILESIZE limit)
+FX_FILESIZE CPDF_SyntaxParser::FindTag(const CFX_ByteStringC& tag, FX_FILESIZE limit)
{
int32_t taglen = tag.GetLength();
int32_t match = 0;
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
index e6474550a2..61134f5df4 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
@@ -49,7 +49,7 @@ CPDF_SimpleParser::CPDF_SimpleParser(const uint8_t* pData, FX_DWORD dwSize)
m_dwSize = dwSize;
m_dwCurPos = 0;
}
-CPDF_SimpleParser::CPDF_SimpleParser(FX_BSTR str)
+CPDF_SimpleParser::CPDF_SimpleParser(const CFX_ByteStringC& str)
{
m_pData = str.GetPtr();
m_dwSize = str.GetLength();
@@ -194,7 +194,7 @@ CFX_ByteStringC CPDF_SimpleParser::GetWord()
}
return CFX_ByteStringC(pStart, dwSize);
}
-FX_BOOL CPDF_SimpleParser::SearchToken(FX_BSTR token)
+FX_BOOL CPDF_SimpleParser::SearchToken(const CFX_ByteStringC& token)
{
int token_len = token.GetLength();
while (m_dwCurPos < m_dwSize - token_len) {
@@ -209,7 +209,7 @@ FX_BOOL CPDF_SimpleParser::SearchToken(FX_BSTR token)
m_dwCurPos += token_len;
return TRUE;
}
-FX_BOOL CPDF_SimpleParser::SkipWord(FX_BSTR token)
+FX_BOOL CPDF_SimpleParser::SkipWord(const CFX_ByteStringC& token)
{
while (1) {
CFX_ByteStringC word = GetWord();
@@ -222,7 +222,7 @@ FX_BOOL CPDF_SimpleParser::SkipWord(FX_BSTR token)
}
return FALSE;
}
-FX_BOOL CPDF_SimpleParser::FindTagPair(FX_BSTR start_token, FX_BSTR end_token,
+FX_BOOL CPDF_SimpleParser::FindTagPair(const CFX_ByteStringC& start_token, const CFX_ByteStringC& end_token,
FX_DWORD& start_pos, FX_DWORD& end_pos)
{
if (!start_token.IsEmpty()) {
@@ -243,7 +243,7 @@ FX_BOOL CPDF_SimpleParser::FindTagPair(FX_BSTR start_token, FX_BSTR end_token,
}
return FALSE;
}
-FX_BOOL CPDF_SimpleParser::FindTagParam(FX_BSTR token, int nParams)
+FX_BOOL CPDF_SimpleParser::FindTagParam(const CFX_ByteStringC& token, int nParams)
{
nParams ++;
FX_DWORD* pBuf = FX_Alloc(FX_DWORD, nParams);
@@ -287,7 +287,7 @@ static int _hex2dec(char ch)
}
return 0;
}
-CFX_ByteString PDF_NameDecode(FX_BSTR bstr)
+CFX_ByteString PDF_NameDecode(const CFX_ByteStringC& bstr)
{
int size = bstr.GetLength();
const FX_CHAR* pSrc = bstr.GetCStr();
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
index 2cbe2e8eb6..5851aabbe0 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
@@ -603,8 +603,9 @@ int CPDF_DIBSource::CreateDecoder()
if (decoder == FX_BSTRC("CCITTFaxDecode")) {
m_pDecoder = FPDFAPI_CreateFaxDecoder(src_data, src_size, m_Width, m_Height, pParams);
} else if (decoder == FX_BSTRC("DCTDecode")) {
- m_pDecoder = CPDF_ModuleMgr::Get()->GetJpegModule()->CreateDecoder(src_data, src_size, m_Width, m_Height,
- m_nComponents, pParams ? pParams->GetInteger(FX_BSTR("ColorTransform"), 1) : 1);
+ m_pDecoder = CPDF_ModuleMgr::Get()->GetJpegModule()->CreateDecoder(
+ src_data, src_size, m_Width, m_Height, m_nComponents,
+ pParams ? pParams->GetInteger("ColorTransform", 1) : 1);
if (!m_pDecoder) {
FX_BOOL bTransform = FALSE;
int comps, bpc;
diff --git a/core/src/fpdfdoc/doc_basic.cpp b/core/src/fpdfdoc/doc_basic.cpp
index f9e692cb69..e559c0ef16 100644
--- a/core/src/fpdfdoc/doc_basic.cpp
+++ b/core/src/fpdfdoc/doc_basic.cpp
@@ -72,7 +72,7 @@ CFX_ByteString CPDF_Dest::GetRemoteName()
}
return m_pObj->GetString();
}
-CPDF_NameTree::CPDF_NameTree(CPDF_Document* pDoc, FX_BSTR category)
+CPDF_NameTree::CPDF_NameTree(CPDF_Document* pDoc, const CFX_ByteStringC& category)
{
if (pDoc->GetRoot() && pDoc->GetRoot()->GetDict(FX_BSTRC("Names")))
m_pRoot = pDoc->GetRoot()->GetDict(FX_BSTRC("Names"))->GetDict(category);
@@ -229,7 +229,7 @@ CPDF_Object* CPDF_NameTree::LookupValue(const CFX_ByteString& csName) const
int nIndex = 0;
return SearchNameNode(m_pRoot, csName, nIndex, NULL);
}
-CPDF_Array* CPDF_NameTree::LookupNamedDest(CPDF_Document* pDoc, FX_BSTR sName)
+CPDF_Array* CPDF_NameTree::LookupNamedDest(CPDF_Document* pDoc, const CFX_ByteStringC& sName)
{
CPDF_Object* pValue = LookupValue(sName);
if (pValue == NULL) {
@@ -282,7 +282,7 @@ static CFX_WideString ChangeSlashToPDF(const FX_WCHAR* str)
return result;
}
#endif
-static CFX_WideString FILESPEC_DecodeFileName(FX_WSTR filepath)
+static CFX_WideString FILESPEC_DecodeFileName(const CFX_WideStringC& filepath)
{
if (filepath.GetLength() <= 1) {
return CFX_WideString();
@@ -362,7 +362,7 @@ FX_BOOL CPDF_FileSpec::IsURL() const
}
return ((CPDF_Dictionary*)m_pObj)->GetString(FX_BSTRC("FS")) == FX_BSTRC("URL");
}
-CFX_WideString FILESPEC_EncodeFileName(FX_WSTR filepath)
+CFX_WideString FILESPEC_EncodeFileName(const CFX_WideStringC& filepath)
{
if (filepath.GetLength() <= 1) {
return CFX_WideString();
@@ -417,7 +417,7 @@ CPDF_Stream* CPDF_FileSpec::GetFileStream() const
}
return NULL;
}
-static void FPDFDOC_FILESPEC_SetFileName(CPDF_Object *pObj, FX_WSTR wsFileName, FX_BOOL bURL)
+static void FPDFDOC_FILESPEC_SetFileName(CPDF_Object *pObj, const CFX_WideStringC& wsFileName, FX_BOOL bURL)
{
ASSERT(pObj != NULL);
CFX_WideString wsStr;
@@ -435,7 +435,7 @@ static void FPDFDOC_FILESPEC_SetFileName(CPDF_Object *pObj, FX_WSTR wsFileName,
pDict->SetAtString(FX_BSTRC("UF"), PDF_EncodeText(wsStr));
}
}
-void CPDF_FileSpec::SetFileName(FX_WSTR wsFileName, FX_BOOL bURL)
+void CPDF_FileSpec::SetFileName(const CFX_WideStringC& wsFileName, FX_BOOL bURL)
{
ASSERT(m_pObj != NULL);
if (m_pObj->GetType() == PDFOBJ_DICTIONARY && bURL) {
@@ -540,7 +540,7 @@ CFX_WideString CPDF_PageLabel::GetLabel(int nPage) const
wsLabel.Format(L"%d", nPage + 1);
return wsLabel;
}
-int32_t CPDF_PageLabel::GetPageByLabel(FX_BSTR bsLabel) const
+int32_t CPDF_PageLabel::GetPageByLabel(const CFX_ByteStringC& bsLabel) const
{
if (m_pDocument == NULL) {
return -1;
@@ -565,7 +565,7 @@ int32_t CPDF_PageLabel::GetPageByLabel(FX_BSTR bsLabel) const
}
return -1;
}
-int32_t CPDF_PageLabel::GetPageByLabel(FX_WSTR wsLabel) const
+int32_t CPDF_PageLabel::GetPageByLabel(const CFX_WideStringC& wsLabel) const
{
CFX_ByteString bsLabel = PDF_EncodeText(wsLabel.GetPtr());
return GetPageByLabel(bsLabel);
diff --git a/core/src/fpdfdoc/doc_form.cpp b/core/src/fpdfdoc/doc_form.cpp
index 8dab922d74..deb77111a1 100644
--- a/core/src/fpdfdoc/doc_form.cpp
+++ b/core/src/fpdfdoc/doc_form.cpp
@@ -1297,8 +1297,8 @@ CPDF_FormField* CPDF_InterForm::AddTerminalField(const CPDF_Dictionary* pFieldDi
pField = m_pFieldTree->GetField(csWName);
if (pField == NULL) {
CPDF_Dictionary *pParent = (CPDF_Dictionary*)pFieldDict;
- if (!pFieldDict->KeyExist(FX_BSTR("T")) &&
- pFieldDict->GetString(FX_BSTRC("Subtype")) == FX_BSTRC("Widget")) {
+ if (!pFieldDict->KeyExist(FX_BSTRC("T")) &&
+ pFieldDict->GetString(FX_BSTRC("Subtype")) == FX_BSTRC("Widget")) {
pParent = pFieldDict->GetDict(FX_BSTRC("Parent"));
if (!pParent) {
pParent = (CPDF_Dictionary*)pFieldDict;
@@ -1392,7 +1392,7 @@ CPDF_FormField* CPDF_InterForm::CheckRequiredFields(const CFX_PtrArray *fields,
}
return NULL;
}
-CFDF_Document* CPDF_InterForm::ExportToFDF(FX_WSTR pdf_path, FX_BOOL bSimpleFileSpec) const
+CFDF_Document* CPDF_InterForm::ExportToFDF(const CFX_WideStringC& pdf_path, FX_BOOL bSimpleFileSpec) const
{
CFX_PtrArray fields;
int nCount = m_pFieldTree->m_Root.CountFields();
@@ -1402,8 +1402,8 @@ CFDF_Document* CPDF_InterForm::ExportToFDF(FX_WSTR pdf_path, FX_BOOL bSimpleFile
}
return ExportToFDF(pdf_path, fields, TRUE, bSimpleFileSpec);
}
-CFX_WideString FILESPEC_EncodeFileName(FX_WSTR filepath);
-CFDF_Document* CPDF_InterForm::ExportToFDF(FX_WSTR pdf_path, CFX_PtrArray& fields, FX_BOOL bIncludeOrExclude, FX_BOOL bSimpleFileSpec) const
+CFX_WideString FILESPEC_EncodeFileName(const CFX_WideStringC& filepath);
+CFDF_Document* CPDF_InterForm::ExportToFDF(const CFX_WideStringC& pdf_path, CFX_PtrArray& fields, FX_BOOL bIncludeOrExclude, FX_BOOL bSimpleFileSpec) const
{
CFDF_Document* pDoc = CFDF_Document::CreateNewDoc();
if (pDoc == NULL) {
diff --git a/core/src/fpdfdoc/doc_formcontrol.cpp b/core/src/fpdfdoc/doc_formcontrol.cpp
index 1ab63234d6..da28a0b824 100644
--- a/core/src/fpdfdoc/doc_formcontrol.cpp
+++ b/core/src/fpdfdoc/doc_formcontrol.cpp
@@ -339,7 +339,7 @@ int CPDF_FormControl::GetControlAlignment()
return pObj->GetInteger();
}
}
-FX_BOOL CPDF_ApSettings::HasMKEntry(FX_BSTR csEntry)
+FX_BOOL CPDF_ApSettings::HasMKEntry(const CFX_ByteStringC& csEntry)
{
if (m_pDict == NULL) {
return FALSE;
@@ -353,7 +353,7 @@ int CPDF_ApSettings::GetRotation()
}
return m_pDict->GetInteger(FX_BSTRC("R"));
}
-FX_ARGB CPDF_ApSettings::GetColor(int& iColorType, FX_BSTR csEntry)
+FX_ARGB CPDF_ApSettings::GetColor(int& iColorType, const CFX_ByteStringC& csEntry)
{
iColorType = COLORTYPE_TRANSPARENT;
if (m_pDict == NULL) {
@@ -388,7 +388,7 @@ FX_ARGB CPDF_ApSettings::GetColor(int& iColorType, FX_BSTR csEntry)
}
return color;
}
-FX_FLOAT CPDF_ApSettings::GetOriginalColor(int index, FX_BSTR csEntry)
+FX_FLOAT CPDF_ApSettings::GetOriginalColor(int index, const CFX_ByteStringC& csEntry)
{
if (m_pDict == NULL) {
return 0;
@@ -399,7 +399,7 @@ FX_FLOAT CPDF_ApSettings::GetOriginalColor(int index, FX_BSTR csEntry)
}
return 0;
}
-void CPDF_ApSettings::GetOriginalColor(int& iColorType, FX_FLOAT fc[4], FX_BSTR csEntry)
+void CPDF_ApSettings::GetOriginalColor(int& iColorType, FX_FLOAT fc[4], const CFX_ByteStringC& csEntry)
{
iColorType = COLORTYPE_TRANSPARENT;
for (int i = 0; i < 4; i ++) {
@@ -429,7 +429,7 @@ void CPDF_ApSettings::GetOriginalColor(int& iColorType, FX_FLOAT fc[4], FX_BSTR
fc[3] = pEntry->GetNumber(3);
}
}
-CFX_WideString CPDF_ApSettings::GetCaption(FX_BSTR csEntry)
+CFX_WideString CPDF_ApSettings::GetCaption(const CFX_ByteStringC& csEntry)
{
CFX_WideString csCaption;
if (m_pDict == NULL) {
@@ -437,7 +437,7 @@ CFX_WideString CPDF_ApSettings::GetCaption(FX_BSTR csEntry)
}
return m_pDict->GetUnicodeText(csEntry);
}
-CPDF_Stream* CPDF_ApSettings::GetIcon(FX_BSTR csEntry)
+CPDF_Stream* CPDF_ApSettings::GetIcon(const CFX_ByteStringC& csEntry)
{
if (m_pDict == NULL) {
return NULL;
diff --git a/core/src/fpdfdoc/doc_metadata.cpp b/core/src/fpdfdoc/doc_metadata.cpp
index 07cba96e61..21f427ac6f 100644
--- a/core/src/fpdfdoc/doc_metadata.cpp
+++ b/core/src/fpdfdoc/doc_metadata.cpp
@@ -74,7 +74,7 @@ void CPDF_Metadata::LoadDoc(CPDF_Document *pDoc)
pElmntRdf = pXmlElmnt->GetElement(NULL, FX_BSTRC("RDF"));
}
}
-int32_t CPDF_Metadata::GetString(FX_BSTR bsItem, CFX_WideString &wsStr)
+int32_t CPDF_Metadata::GetString(const CFX_ByteStringC& bsItem, CFX_WideString &wsStr)
{
if (!((PDFDOC_LPMETADATA)m_pData)->m_pXmlElmnt) {
return -1;
diff --git a/core/src/fpdfdoc/doc_ocg.cpp b/core/src/fpdfdoc/doc_ocg.cpp
index 318e9318ce..1906603178 100644
--- a/core/src/fpdfdoc/doc_ocg.cpp
+++ b/core/src/fpdfdoc/doc_ocg.cpp
@@ -25,7 +25,7 @@ static int32_t FPDFDOC_OCG_FindGroup(const CPDF_Object *pObject, const CPDF_Dict
}
return -1;
}
-static FX_BOOL FPDFDOC_OCG_HasIntent(const CPDF_Dictionary *pDict, FX_BSTR csElement, FX_BSTR csDef = FX_BSTRC(""))
+static FX_BOOL FPDFDOC_OCG_HasIntent(const CPDF_Dictionary *pDict, const CFX_ByteStringC& csElement, const CFX_ByteStringC& csDef = FX_BSTRC(""))
{
FXSYS_assert(pDict != NULL);
CPDF_Object *pIntent = pDict->GetElementValue(FX_BSTRC("Intent"));
@@ -46,7 +46,7 @@ static FX_BOOL FPDFDOC_OCG_HasIntent(const CPDF_Dictionary *pDict, FX_BSTR csEle
bsIntent = pIntent->GetString();
return bsIntent == FX_BSTRC("All") || bsIntent == csElement;
}
-static CPDF_Dictionary* FPDFDOC_OCG_GetConfig(CPDF_Document *pDoc, const CPDF_Dictionary *pOCGDict, FX_BSTR bsState)
+static CPDF_Dictionary* FPDFDOC_OCG_GetConfig(CPDF_Document *pDoc, const CPDF_Dictionary *pOCGDict, const CFX_ByteStringC& bsState)
{
FXSYS_assert(pDoc && pOCGDict);
CPDF_Dictionary *pOCProperties = pDoc->GetRoot()->GetDict(FX_BSTRC("OCProperties"));
@@ -101,7 +101,7 @@ CPDF_OCContext::~CPDF_OCContext()
{
m_OCGStates.RemoveAll();
}
-FX_BOOL CPDF_OCContext::LoadOCGStateFromConfig(FX_BSTR csConfig, const CPDF_Dictionary *pOCGDict, FX_BOOL &bValidConfig) const
+FX_BOOL CPDF_OCContext::LoadOCGStateFromConfig(const CFX_ByteStringC& csConfig, const CPDF_Dictionary *pOCGDict, FX_BOOL &bValidConfig) const
{
CPDF_Dictionary *pConfig = FPDFDOC_OCG_GetConfig(m_pDocument, pOCGDict, csConfig);
if (!pConfig) {
diff --git a/core/src/fpdfdoc/doc_tagged.cpp b/core/src/fpdfdoc/doc_tagged.cpp
index 0bf229e7d8..8a6865aa5e 100644
--- a/core/src/fpdfdoc/doc_tagged.cpp
+++ b/core/src/fpdfdoc/doc_tagged.cpp
@@ -327,7 +327,7 @@ void CPDF_StructElementImpl::LoadKid(FX_DWORD PageObjNum, CPDF_Object* pKidObj,
}
}
}
-static CPDF_Dictionary* FindAttrDict(CPDF_Object* pAttrs, FX_BSTR owner, FX_FLOAT nLevel = 0.0F)
+static CPDF_Dictionary* FindAttrDict(CPDF_Object* pAttrs, const CFX_ByteStringC& owner, FX_FLOAT nLevel = 0.0F)
{
if (nLevel > nMaxRecursion) {
return NULL;
@@ -355,7 +355,7 @@ static CPDF_Dictionary* FindAttrDict(CPDF_Object* pAttrs, FX_BSTR owner, FX_FLOA
}
return NULL;
}
-CPDF_Object* CPDF_StructElementImpl::GetAttr(FX_BSTR owner, FX_BSTR name, FX_BOOL bInheritable, FX_FLOAT fLevel)
+CPDF_Object* CPDF_StructElementImpl::GetAttr(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, FX_BOOL bInheritable, FX_FLOAT fLevel)
{
if (fLevel > nMaxRecursion) {
return NULL;
@@ -406,7 +406,7 @@ CPDF_Object* CPDF_StructElementImpl::GetAttr(FX_BSTR owner, FX_BSTR name, FX_BOO
}
return NULL;
}
-CPDF_Object* CPDF_StructElementImpl::GetAttr(FX_BSTR owner, FX_BSTR name, FX_BOOL bInheritable, int subindex)
+CPDF_Object* CPDF_StructElementImpl::GetAttr(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, FX_BOOL bInheritable, int subindex)
{
CPDF_Object* pAttr = GetAttr(owner, name, bInheritable);
if (pAttr == NULL || subindex == -1 || pAttr->GetType() != PDFOBJ_ARRAY) {
@@ -418,7 +418,7 @@ CPDF_Object* CPDF_StructElementImpl::GetAttr(FX_BSTR owner, FX_BSTR name, FX_BOO
}
return pArray->GetElementValue(subindex);
}
-CFX_ByteString CPDF_StructElementImpl::GetName(FX_BSTR owner, FX_BSTR name, FX_BSTR default_value, FX_BOOL bInheritable, int subindex)
+CFX_ByteString CPDF_StructElementImpl::GetName(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, const CFX_ByteStringC& default_value, FX_BOOL bInheritable, int subindex)
{
CPDF_Object* pAttr = GetAttr(owner, name, bInheritable, subindex);
if (pAttr == NULL || pAttr->GetType() != PDFOBJ_NAME) {
@@ -426,7 +426,7 @@ CFX_ByteString CPDF_StructElementImpl::GetName(FX_BSTR owner, FX_BSTR name, FX_B
}
return pAttr->GetString();
}
-FX_ARGB CPDF_StructElementImpl::GetColor(FX_BSTR owner, FX_BSTR name, FX_ARGB default_value, FX_BOOL bInheritable, int subindex)
+FX_ARGB CPDF_StructElementImpl::GetColor(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, FX_ARGB default_value, FX_BOOL bInheritable, int subindex)
{
CPDF_Object* pAttr = GetAttr(owner, name, bInheritable, subindex);
if (pAttr == NULL || pAttr->GetType() != PDFOBJ_ARRAY) {
@@ -435,7 +435,7 @@ FX_ARGB CPDF_StructElementImpl::GetColor(FX_BSTR owner, FX_BSTR name, FX_ARGB de
CPDF_Array* pArray = (CPDF_Array*)pAttr;
return 0xff000000 | ((int)(pArray->GetNumber(0) * 255) << 16) | ((int)(pArray->GetNumber(1) * 255) << 8) | (int)(pArray->GetNumber(2) * 255);
}
-FX_FLOAT CPDF_StructElementImpl::GetNumber(FX_BSTR owner, FX_BSTR name, FX_FLOAT default_value, FX_BOOL bInheritable, int subindex)
+FX_FLOAT CPDF_StructElementImpl::GetNumber(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, FX_FLOAT default_value, FX_BOOL bInheritable, int subindex)
{
CPDF_Object* pAttr = GetAttr(owner, name, bInheritable, subindex);
if (pAttr == NULL || pAttr->GetType() != PDFOBJ_NUMBER) {
@@ -443,7 +443,7 @@ FX_FLOAT CPDF_StructElementImpl::GetNumber(FX_BSTR owner, FX_BSTR name, FX_FLOAT
}
return pAttr->GetNumber();
}
-int CPDF_StructElementImpl::GetInteger(FX_BSTR owner, FX_BSTR name, int default_value, FX_BOOL bInheritable, int subindex)
+int CPDF_StructElementImpl::GetInteger(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, int default_value, FX_BOOL bInheritable, int subindex)
{
CPDF_Object* pAttr = GetAttr(owner, name, bInheritable, subindex);
if (pAttr == NULL || pAttr->GetType() != PDFOBJ_NUMBER) {
diff --git a/core/src/fpdfdoc/tagged_int.h b/core/src/fpdfdoc/tagged_int.h
index 44ba527a60..4ac8d750d3 100644
--- a/core/src/fpdfdoc/tagged_int.h
+++ b/core/src/fpdfdoc/tagged_int.h
@@ -67,16 +67,16 @@ public:
return &m_ObjectArray;
}
- CPDF_Object* GetAttr(FX_BSTR owner, FX_BSTR name, FX_BOOL bInheritable = FALSE, FX_FLOAT fLevel = 0.0F);
+ CPDF_Object* GetAttr(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, FX_BOOL bInheritable = FALSE, FX_FLOAT fLevel = 0.0F);
- CFX_ByteString GetName(FX_BSTR owner, FX_BSTR name, FX_BSTR default_value, FX_BOOL bInheritable = FALSE, int subindex = -1);
- FX_ARGB GetColor(FX_BSTR owner, FX_BSTR name, FX_ARGB default_value, FX_BOOL bInheritable = FALSE, int subindex = -1);
- FX_FLOAT GetNumber(FX_BSTR owner, FX_BSTR name, FX_FLOAT default_value, FX_BOOL bInheritable = FALSE, int subindex = -1);
- int GetInteger(FX_BSTR owner, FX_BSTR name, int default_value, FX_BOOL bInheritable = FALSE, int subindex = -1);
+ CFX_ByteString GetName(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, const CFX_ByteStringC& default_value, FX_BOOL bInheritable = FALSE, int subindex = -1);
+ FX_ARGB GetColor(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, FX_ARGB default_value, FX_BOOL bInheritable = FALSE, int subindex = -1);
+ FX_FLOAT GetNumber(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, FX_FLOAT default_value, FX_BOOL bInheritable = FALSE, int subindex = -1);
+ int GetInteger(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, int default_value, FX_BOOL bInheritable = FALSE, int subindex = -1);
CFX_PtrArray m_ObjectArray;
void LoadKids(CPDF_Dictionary* pDict);
void LoadKid(FX_DWORD PageObjNum, CPDF_Object* pObj, CPDF_StructKid* pKid);
- CPDF_Object* GetAttr(FX_BSTR owner, FX_BSTR name, FX_BOOL bInheritable, int subindex);
+ CPDF_Object* GetAttr(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, FX_BOOL bInheritable, int subindex);
CPDF_StructElementImpl* Retain();
void Release();
protected:
diff --git a/core/src/fpdftext/unicodenormalization.cpp b/core/src/fpdftext/unicodenormalization.cpp
index 7b01830582..fa3d8120f9 100644
--- a/core/src/fpdftext/unicodenormalization.cpp
+++ b/core/src/fpdftext/unicodenormalization.cpp
@@ -49,7 +49,7 @@ FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_WCHAR* pDst)
}
return (FX_STRSIZE)wFind;
}
-FX_STRSIZE FX_WideString_GetNormalization(FX_WSTR wsSrc, FX_WCHAR* pDst)
+FX_STRSIZE FX_WideString_GetNormalization(const CFX_WideStringC& wsSrc, FX_WCHAR* pDst)
{
FX_STRSIZE nCount = 0;
for (FX_STRSIZE len = 0; len < wsSrc.GetLength(); len ++) {
@@ -62,7 +62,7 @@ FX_STRSIZE FX_WideString_GetNormalization(FX_WSTR wsSrc, FX_WCHAR* pDst)
}
return nCount;
}
-FX_STRSIZE FX_WideString_GetNormalization(FX_WSTR wsSrc, CFX_WideString &wsDst)
+FX_STRSIZE FX_WideString_GetNormalization(const CFX_WideStringC& wsSrc, CFX_WideString &wsDst)
{
FX_STRSIZE nLen = FX_WideString_GetNormalization(wsSrc, (FX_WCHAR*)NULL);
if (!nLen) {
diff --git a/core/src/fxcrt/extension.h b/core/src/fxcrt/extension.h
index c526a2ea6e..869cf30aad 100644
--- a/core/src/fxcrt/extension.h
+++ b/core/src/fxcrt/extension.h
@@ -13,8 +13,8 @@ class IFXCRT_FileAccess
{
public:
virtual ~IFXCRT_FileAccess() {}
- virtual FX_BOOL Open(FX_BSTR fileName, FX_DWORD dwMode) = 0;
- virtual FX_BOOL Open(FX_WSTR fileName, FX_DWORD dwMode) = 0;
+ virtual FX_BOOL Open(const CFX_ByteStringC& fileName, FX_DWORD dwMode) = 0;
+ virtual FX_BOOL Open(const CFX_WideStringC& fileName, FX_DWORD dwMode) = 0;
virtual void Close() = 0;
virtual void Release() = 0;
virtual FX_FILESIZE GetSize() const = 0;
@@ -45,7 +45,7 @@ public:
return (IFX_FileAccess*)this;
}
- virtual FX_BOOL Init(FX_WSTR wsPath)
+ virtual FX_BOOL Init(const CFX_WideStringC& wsPath)
{
m_path = wsPath;
m_RefCount = 1;
diff --git a/core/src/fxcrt/fx_basic_bstring.cpp b/core/src/fxcrt/fx_basic_bstring.cpp
index 2baeb83b5d..c6fa998077 100644
--- a/core/src/fxcrt/fx_basic_bstring.cpp
+++ b/core/src/fxcrt/fx_basic_bstring.cpp
@@ -127,7 +127,7 @@ CFX_ByteString::CFX_ByteString(const CFX_ByteString& stringSrc)
*this = stringSrc;
}
}
-CFX_ByteString::CFX_ByteString(FX_BSTR stringSrc)
+CFX_ByteString::CFX_ByteString(const CFX_ByteStringC& stringSrc)
{
if (stringSrc.IsEmpty()) {
m_pData = NULL;
@@ -137,7 +137,7 @@ CFX_ByteString::CFX_ByteString(FX_BSTR stringSrc)
*this = stringSrc;
}
}
-CFX_ByteString::CFX_ByteString(FX_BSTR str1, FX_BSTR str2)
+CFX_ByteString::CFX_ByteString(const CFX_ByteStringC& str1, const CFX_ByteStringC& str2)
{
m_pData = NULL;
int nNewLen = str1.GetLength() + str2.GetLength();
@@ -159,7 +159,7 @@ const CFX_ByteString& CFX_ByteString::operator=(const FX_CHAR* lpsz)
}
return *this;
}
-const CFX_ByteString& CFX_ByteString::operator=(FX_BSTR str)
+const CFX_ByteString& CFX_ByteString::operator=(const CFX_ByteStringC& str)
{
if (str.IsEmpty()) {
Empty();
@@ -224,7 +224,7 @@ const CFX_ByteString& CFX_ByteString::operator+=(const CFX_ByteString& string)
ConcatInPlace(string.m_pData->m_nDataLength, string.m_pData->m_String);
return *this;
}
-const CFX_ByteString& CFX_ByteString::operator+=(FX_BSTR string)
+const CFX_ByteString& CFX_ByteString::operator+=(const CFX_ByteStringC& string)
{
if (string.IsEmpty()) {
return *this;
@@ -271,7 +271,7 @@ void CFX_ByteString::Empty()
m_pData = NULL;
}
}
-bool CFX_ByteString::EqualNoCase(FX_BSTR str) const
+bool CFX_ByteString::EqualNoCase(const CFX_ByteStringC& str) const
{
if (m_pData == NULL) {
return str.IsEmpty();
@@ -815,7 +815,7 @@ const FX_CHAR* FX_strstr(const FX_CHAR* str1, int len1, const FX_CHAR* str2, int
}
return NULL;
}
-FX_STRSIZE CFX_ByteString::Find(FX_BSTR lpszSub, FX_STRSIZE nStart) const
+FX_STRSIZE CFX_ByteString::Find(const CFX_ByteStringC& lpszSub, FX_STRSIZE nStart) const
{
if (m_pData == NULL) {
return -1;
@@ -874,7 +874,7 @@ FX_STRSIZE CFX_ByteString::Remove(FX_CHAR chRemove)
m_pData->m_nDataLength -= nCount;
return nCount;
}
-FX_STRSIZE CFX_ByteString::Replace(FX_BSTR lpszOld, FX_BSTR lpszNew)
+FX_STRSIZE CFX_ByteString::Replace(const CFX_ByteStringC& lpszOld, const CFX_ByteStringC& lpszNew)
{
if (m_pData == NULL) {
return 0;
@@ -960,7 +960,7 @@ void CFX_ByteString::ConvertFrom(const CFX_WideString& str, CFX_CharMap* pCharMa
}
*this = (*pCharMap->m_GetByteString)(pCharMap, str);
}
-int CFX_ByteString::Compare(FX_BSTR str) const
+int CFX_ByteString::Compare(const CFX_ByteStringC& str) const
{
if (m_pData == NULL) {
return str.IsEmpty() ? 0 : -1;
@@ -982,7 +982,7 @@ int CFX_ByteString::Compare(FX_BSTR str) const
}
return 0;
}
-void CFX_ByteString::TrimRight(FX_BSTR lpszTargets)
+void CFX_ByteString::TrimRight(const CFX_ByteStringC& lpszTargets)
{
if (m_pData == NULL || lpszTargets.IsEmpty()) {
return;
@@ -1015,7 +1015,7 @@ void CFX_ByteString::TrimRight()
{
TrimRight(FX_BSTRC("\x09\x0a\x0b\x0c\x0d\x20"));
}
-void CFX_ByteString::TrimLeft(FX_BSTR lpszTargets)
+void CFX_ByteString::TrimLeft(const CFX_ByteStringC& lpszTargets)
{
if (m_pData == NULL) {
return;
diff --git a/core/src/fxcrt/fx_basic_buffer.cpp b/core/src/fxcrt/fx_basic_buffer.cpp
index f56c4299cc..43da8e9ebf 100644
--- a/core/src/fxcrt/fx_basic_buffer.cpp
+++ b/core/src/fxcrt/fx_basic_buffer.cpp
@@ -139,7 +139,7 @@ CFX_ByteStringC CFX_BinaryBuf::GetByteString() const
{
return CFX_ByteStringC(m_pBuffer, m_DataSize);
}
-CFX_ByteTextBuf& CFX_ByteTextBuf::operator << (FX_BSTR lpsz)
+CFX_ByteTextBuf& CFX_ByteTextBuf::operator << (const CFX_ByteStringC& lpsz)
{
AppendBlock(lpsz.GetPtr(), lpsz.GetLength());
return *this;
@@ -183,7 +183,7 @@ void CFX_WideTextBuf::AppendChar(FX_WCHAR ch)
*(FX_WCHAR*)(m_pBuffer + m_DataSize) = ch;
m_DataSize += sizeof(FX_WCHAR);
}
-CFX_WideTextBuf& CFX_WideTextBuf::operator << (FX_WSTR str)
+CFX_WideTextBuf& CFX_WideTextBuf::operator << (const CFX_WideStringC& str)
{
AppendBlock(str.GetPtr(), str.GetLength() * sizeof(FX_WCHAR));
return *this;
@@ -234,7 +234,7 @@ CFX_WideTextBuf& CFX_WideTextBuf::operator << (const CFX_WideTextBuf& buf)
AppendBlock(buf.m_pBuffer, buf.m_DataSize);
return *this;
}
-void CFX_WideTextBuf::operator =(FX_WSTR str)
+void CFX_WideTextBuf::operator =(const CFX_WideStringC& str)
{
CopyData(str.GetPtr(), str.GetLength() * sizeof(FX_WCHAR));
}
@@ -278,7 +278,7 @@ CFX_ArchiveSaver& CFX_ArchiveSaver::operator << (FX_FLOAT f)
}
return *this;
}
-CFX_ArchiveSaver& CFX_ArchiveSaver::operator << (FX_BSTR bstr)
+CFX_ArchiveSaver& CFX_ArchiveSaver::operator << (const CFX_ByteStringC& bstr)
{
int len = bstr.GetLength();
if (m_pStream) {
@@ -481,7 +481,7 @@ int32_t IFX_BufferArchive::AppendDWord(FX_DWORD i)
FXSYS_itoa(i, buf, 10);
return AppendBlock(buf, (size_t)FXSYS_strlen(buf));
}
-int32_t IFX_BufferArchive::AppendString(FX_BSTR lpsz)
+int32_t IFX_BufferArchive::AppendString(const CFX_ByteStringC& lpsz)
{
return AppendBlock(lpsz.GetPtr(), lpsz.GetLength());
}
diff --git a/core/src/fxcrt/fx_basic_maps.cpp b/core/src/fxcrt/fx_basic_maps.cpp
index 7df4cdb8ed..afc7c8219e 100644
--- a/core/src/fxcrt/fx_basic_maps.cpp
+++ b/core/src/fxcrt/fx_basic_maps.cpp
@@ -261,7 +261,7 @@ void* CFX_MapByteStringToPtr::GetNextValue(FX_POSITION& rNextPosition) const
rNextPosition = (FX_POSITION) pAssocNext;
return pAssocRet->value;
}
-void*& CFX_MapByteStringToPtr::operator[](FX_BSTR key)
+void*& CFX_MapByteStringToPtr::operator[](const CFX_ByteStringC& key)
{
FX_DWORD nHash;
CAssoc* pAssoc;
@@ -310,7 +310,7 @@ void CFX_MapByteStringToPtr::FreeAssoc(CFX_MapByteStringToPtr::CAssoc* pAssoc)
}
}
CFX_MapByteStringToPtr::CAssoc*
-CFX_MapByteStringToPtr::GetAssocAt(FX_BSTR key, FX_DWORD& nHash) const
+CFX_MapByteStringToPtr::GetAssocAt(const CFX_ByteStringC& key, FX_DWORD& nHash) const
{
nHash = HashKey(key) % m_nHashTableSize;
if (m_pHashTable == NULL) {
@@ -324,7 +324,7 @@ CFX_MapByteStringToPtr::GetAssocAt(FX_BSTR key, FX_DWORD& nHash) const
}
return NULL;
}
-FX_BOOL CFX_MapByteStringToPtr::Lookup(FX_BSTR key, void*& rValue) const
+FX_BOOL CFX_MapByteStringToPtr::Lookup(const CFX_ByteStringC& key, void*& rValue) const
{
FX_DWORD nHash;
CAssoc* pAssoc = GetAssocAt(key, nHash);
@@ -348,7 +348,7 @@ void CFX_MapByteStringToPtr::InitHashTable(
}
m_nHashTableSize = nHashSize;
}
-inline FX_DWORD CFX_MapByteStringToPtr::HashKey(FX_BSTR key) const
+inline FX_DWORD CFX_MapByteStringToPtr::HashKey(const CFX_ByteStringC& key) const
{
FX_DWORD nHash = 0;
int len = key.GetLength();
@@ -358,7 +358,7 @@ inline FX_DWORD CFX_MapByteStringToPtr::HashKey(FX_BSTR key) const
}
return nHash;
}
-FX_BOOL CFX_MapByteStringToPtr::RemoveKey(FX_BSTR key)
+FX_BOOL CFX_MapByteStringToPtr::RemoveKey(const CFX_ByteStringC& key)
{
if (m_pHashTable == NULL) {
return FALSE;
@@ -500,7 +500,7 @@ FX_BOOL _CMapLookupCallback(void* param, void* pData)
{
return !_CompactStringSame((_CompactString*)pData, ((CFX_ByteStringC*)param)->GetPtr(), ((CFX_ByteStringC*)param)->GetLength());
}
-FX_BOOL CFX_CMapByteStringToPtr::Lookup(FX_BSTR key, void*& rValue) const
+FX_BOOL CFX_CMapByteStringToPtr::Lookup(const CFX_ByteStringC& key, void*& rValue) const
{
void* p = m_Buffer.Iterate(_CMapLookupCallback, (void*)&key);
if (!p) {
@@ -509,7 +509,7 @@ FX_BOOL CFX_CMapByteStringToPtr::Lookup(FX_BSTR key, void*& rValue) const
rValue = *(void**)((_CompactString*)p + 1);
return TRUE;
}
-void CFX_CMapByteStringToPtr::SetAt(FX_BSTR key, void* value)
+void CFX_CMapByteStringToPtr::SetAt(const CFX_ByteStringC& key, void* value)
{
ASSERT(value != NULL);
int index, key_len = key.GetLength();
@@ -535,14 +535,14 @@ void CFX_CMapByteStringToPtr::SetAt(FX_BSTR key, void* value)
_CompactStringStore(pKey, key.GetPtr(), key_len);
*(void**)(pKey + 1) = value;
}
-void CFX_CMapByteStringToPtr::AddValue(FX_BSTR key, void* value)
+void CFX_CMapByteStringToPtr::AddValue(const CFX_ByteStringC& key, void* value)
{
ASSERT(value != NULL);
_CompactString* pKey = (_CompactString*)m_Buffer.Add();
_CompactStringStore(pKey, key.GetPtr(), key.GetLength());
*(void**)(pKey + 1) = value;
}
-void CFX_CMapByteStringToPtr::RemoveKey(FX_BSTR key)
+void CFX_CMapByteStringToPtr::RemoveKey(const CFX_ByteStringC& key)
{
int key_len = key.GetLength();
int size = m_Buffer.GetSize();
diff --git a/core/src/fxcrt/fx_basic_util.cpp b/core/src/fxcrt/fx_basic_util.cpp
index 5870baa020..c9230872f7 100644
--- a/core/src/fxcrt/fx_basic_util.cpp
+++ b/core/src/fxcrt/fx_basic_util.cpp
@@ -90,7 +90,7 @@ void CFX_PrivateData::ClearAll()
}
m_DataList.RemoveAll();
}
-void FX_atonum(FX_BSTR strc, FX_BOOL& bInteger, void* pData)
+void FX_atonum(const CFX_ByteStringC& strc, FX_BOOL& bInteger, void* pData)
{
if (FXSYS_memchr(strc.GetPtr(), '.', strc.GetLength()) == NULL) {
bInteger = TRUE;
@@ -123,7 +123,7 @@ void FX_atonum(FX_BSTR strc, FX_BOOL& bInteger, void* pData)
*(FX_FLOAT*)pData = FX_atof(strc);
}
}
-FX_FLOAT FX_atof(FX_BSTR strc)
+FX_FLOAT FX_atof(const CFX_ByteStringC& strc)
{
if (strc.GetLength() == 0) {
return 0.0;
diff --git a/core/src/fxcrt/fx_extension.cpp b/core/src/fxcrt/fx_extension.cpp
index 21aeffddc6..16974459fc 100644
--- a/core/src/fxcrt/fx_extension.cpp
+++ b/core/src/fxcrt/fx_extension.cpp
@@ -11,7 +11,7 @@
#else
#include <ctime>
#endif
-FX_HFILE FX_File_Open(FX_BSTR fileName, FX_DWORD dwMode)
+FX_HFILE FX_File_Open(const CFX_ByteStringC& fileName, FX_DWORD dwMode)
{
IFXCRT_FileAccess* pFA = FXCRT_FileAccess_Create();
if (pFA && !pFA->Open(fileName, dwMode)) {
@@ -20,7 +20,7 @@ FX_HFILE FX_File_Open(FX_BSTR fileName, FX_DWORD dwMode)
}
return (FX_HFILE)pFA;
}
-FX_HFILE FX_File_Open(FX_WSTR fileName, FX_DWORD dwMode)
+FX_HFILE FX_File_Open(const CFX_WideStringC& fileName, FX_DWORD dwMode)
{
IFXCRT_FileAccess* pFA = FXCRT_FileAccess_Create();
if (pFA && !pFA->Open(fileName, dwMode)) {
@@ -80,7 +80,7 @@ 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)
+IFX_FileAccess* FX_CreateDefaultFileAccess(const CFX_WideStringC& wsPath)
{
if (wsPath.GetLength() == 0)
return NULL;
diff --git a/core/src/fxcrt/fx_xml_composer.cpp b/core/src/fxcrt/fx_xml_composer.cpp
index 7858290f9a..97971aa841 100644
--- a/core/src/fxcrt/fx_xml_composer.cpp
+++ b/core/src/fxcrt/fx_xml_composer.cpp
@@ -6,7 +6,7 @@
#include "../../include/fxcrt/fx_xml.h"
#include "xml_int.h"
-void FX_XML_SplitQualifiedName(FX_BSTR bsFullName, CFX_ByteStringC &bsSpace, CFX_ByteStringC &bsName)
+void FX_XML_SplitQualifiedName(const CFX_ByteStringC& bsFullName, CFX_ByteStringC &bsSpace, CFX_ByteStringC &bsName)
{
if (bsFullName.IsEmpty()) {
return;
@@ -25,12 +25,12 @@ void FX_XML_SplitQualifiedName(FX_BSTR bsFullName, CFX_ByteStringC &bsSpace, CFX
bsName = CFX_ByteStringC(bsFullName.GetCStr() + iStart, bsFullName.GetLength() - iStart);
}
}
-void CXML_Element::SetTag(FX_BSTR qSpace, FX_BSTR tagname)
+void CXML_Element::SetTag(const CFX_ByteStringC& qSpace, const CFX_ByteStringC& tagname)
{
m_QSpaceName = qSpace;
m_TagName = tagname;
}
-void CXML_Element::SetTag(FX_BSTR qTagName)
+void CXML_Element::SetTag(const CFX_ByteStringC& qTagName)
{
ASSERT(!qTagName.IsEmpty());
CFX_ByteStringC bsSpace, bsName;
diff --git a/core/src/fxcrt/fx_xml_parser.cpp b/core/src/fxcrt/fx_xml_parser.cpp
index 1eec20c371..f41db0e5cb 100644
--- a/core/src/fxcrt/fx_xml_parser.cpp
+++ b/core/src/fxcrt/fx_xml_parser.cpp
@@ -156,7 +156,7 @@ void CXML_Parser::GetName(CFX_ByteString &space, CFX_ByteString &name)
} while (ReadNextBlock());
name = buf.GetByteString();
}
-void CXML_Parser::SkipLiterals(FX_BSTR str)
+void CXML_Parser::SkipLiterals(const CFX_ByteStringC& str)
{
m_nOffset = m_nBufferOffset + (FX_FILESIZE)m_dwIndex;
if (IsEOF()) {
@@ -524,7 +524,7 @@ CXML_Element* CXML_Parser::ParseElement(CXML_Element* pParent, FX_BOOL bStartTag
bCDATA = FALSE;
return pElement;
}
-void CXML_Parser::InsertContentSegment(FX_BOOL bCDATA, FX_WSTR content, CXML_Element* pElement)
+void CXML_Parser::InsertContentSegment(FX_BOOL bCDATA, const CFX_WideStringC& content, CXML_Element* pElement)
{
if (content.IsEmpty()) {
return;
@@ -577,7 +577,7 @@ CXML_Element::CXML_Element()
, m_AttrMap()
{
}
-CXML_Element::CXML_Element(FX_BSTR qSpace, FX_BSTR tagName)
+CXML_Element::CXML_Element(const CFX_ByteStringC& qSpace, const CFX_ByteStringC& tagName)
: m_QSpaceName()
, m_TagName()
, m_AttrMap()
@@ -585,7 +585,7 @@ CXML_Element::CXML_Element(FX_BSTR qSpace, FX_BSTR tagName)
m_QSpaceName = qSpace;
m_TagName = tagName;
}
-CXML_Element::CXML_Element(FX_BSTR qTagName)
+CXML_Element::CXML_Element(const CFX_ByteStringC& qTagName)
: m_pParent(NULL)
, m_QSpaceName()
, m_TagName()
@@ -633,7 +633,7 @@ CFX_ByteString CXML_Element::GetNamespace(FX_BOOL bQualified) const
}
return GetNamespaceURI(m_QSpaceName);
}
-CFX_ByteString CXML_Element::GetNamespaceURI(FX_BSTR qName) const
+CFX_ByteString CXML_Element::GetNamespaceURI(const CFX_ByteStringC& qName) const
{
const CFX_WideString* pwsSpace;
const CXML_Element *pElement = this;
@@ -660,19 +660,19 @@ void CXML_Element::GetAttrByIndex(int index, CFX_ByteString& space, CFX_ByteStri
name = item.m_AttrName;
value = item.m_Value;
}
-FX_BOOL CXML_Element::HasAttr(FX_BSTR name) const
+FX_BOOL CXML_Element::HasAttr(const CFX_ByteStringC& name) const
{
CFX_ByteStringC bsSpace, bsName;
FX_XML_SplitQualifiedName(name, bsSpace, bsName);
return m_AttrMap.Lookup(bsSpace, bsName) != NULL;
}
-FX_BOOL CXML_Element::GetAttrValue(FX_BSTR name, CFX_WideString& attribute) const
+FX_BOOL CXML_Element::GetAttrValue(const CFX_ByteStringC& name, CFX_WideString& attribute) const
{
CFX_ByteStringC bsSpace, bsName;
FX_XML_SplitQualifiedName(name, bsSpace, bsName);
return GetAttrValue(bsSpace, bsName, attribute);
}
-FX_BOOL CXML_Element::GetAttrValue(FX_BSTR space, FX_BSTR name, CFX_WideString& attribute) const
+FX_BOOL CXML_Element::GetAttrValue(const CFX_ByteStringC& space, const CFX_ByteStringC& name, CFX_WideString& attribute) const
{
const CFX_WideString* pValue = m_AttrMap.Lookup(space, name);
if (pValue) {
@@ -681,7 +681,7 @@ FX_BOOL CXML_Element::GetAttrValue(FX_BSTR space, FX_BSTR name, CFX_WideString&
}
return FALSE;
}
-FX_BOOL CXML_Element::GetAttrInteger(FX_BSTR name, int& attribute) const
+FX_BOOL CXML_Element::GetAttrInteger(const CFX_ByteStringC& name, int& attribute) const
{
CFX_ByteStringC bsSpace, bsName;
FX_XML_SplitQualifiedName(name, bsSpace, bsName);
@@ -692,7 +692,7 @@ FX_BOOL CXML_Element::GetAttrInteger(FX_BSTR name, int& attribute) const
}
return FALSE;
}
-FX_BOOL CXML_Element::GetAttrInteger(FX_BSTR space, FX_BSTR name, int& attribute) const
+FX_BOOL CXML_Element::GetAttrInteger(const CFX_ByteStringC& space, const CFX_ByteStringC& name, int& attribute) const
{
const CFX_WideString* pwsValue = m_AttrMap.Lookup(space, name);
if (pwsValue) {
@@ -701,13 +701,13 @@ FX_BOOL CXML_Element::GetAttrInteger(FX_BSTR space, FX_BSTR name, int& attribute
}
return FALSE;
}
-FX_BOOL CXML_Element::GetAttrFloat(FX_BSTR name, FX_FLOAT& attribute) const
+FX_BOOL CXML_Element::GetAttrFloat(const CFX_ByteStringC& name, FX_FLOAT& attribute) const
{
CFX_ByteStringC bsSpace, bsName;
FX_XML_SplitQualifiedName(name, bsSpace, bsName);
return GetAttrFloat(bsSpace, bsName, attribute);
}
-FX_BOOL CXML_Element::GetAttrFloat(FX_BSTR space, FX_BSTR name, FX_FLOAT& attribute) const
+FX_BOOL CXML_Element::GetAttrFloat(const CFX_ByteStringC& space, const CFX_ByteStringC& name, FX_FLOAT& attribute) const
{
const CFX_WideString* pValue = m_AttrMap.Lookup(space, name);
if (pValue) {
@@ -750,7 +750,7 @@ CXML_Element* CXML_Element::GetElement(FX_DWORD index) const
}
return (CXML_Element*)m_Children.GetAt(index + 1);
}
-FX_DWORD CXML_Element::CountElements(FX_BSTR space, FX_BSTR tag) const
+FX_DWORD CXML_Element::CountElements(const CFX_ByteStringC& space, const CFX_ByteStringC& tag) const
{
int count = 0;
for (int i = 0; i < m_Children.GetSize(); i += 2) {
@@ -765,7 +765,7 @@ FX_DWORD CXML_Element::CountElements(FX_BSTR space, FX_BSTR tag) const
}
return count;
}
-CXML_Element* CXML_Element::GetElement(FX_BSTR space, FX_BSTR tag, int index) const
+CXML_Element* CXML_Element::GetElement(const CFX_ByteStringC& space, const CFX_ByteStringC& tag, int index) const
{
if (index < 0) {
return NULL;
@@ -795,7 +795,7 @@ FX_DWORD CXML_Element::FindElement(CXML_Element *pChild) const
}
return (FX_DWORD) - 1;
}
-const CFX_WideString* CXML_AttrMap::Lookup(FX_BSTR space, FX_BSTR name) const
+const CFX_WideString* CXML_AttrMap::Lookup(const CFX_ByteStringC& space, const CFX_ByteStringC& name) const
{
if (m_pMap == NULL) {
return NULL;
@@ -808,7 +808,7 @@ const CFX_WideString* CXML_AttrMap::Lookup(FX_BSTR space, FX_BSTR name) const
}
return NULL;
}
-void CXML_AttrMap::SetAt(FX_BSTR space, FX_BSTR name, FX_WSTR value)
+void CXML_AttrMap::SetAt(const CFX_ByteStringC& space, const CFX_ByteStringC& name, const CFX_WideStringC& value)
{
for (int i = 0; i < GetSize(); i++) {
CXML_AttrItem& item = GetAt(i);
@@ -831,7 +831,7 @@ void CXML_AttrMap::SetAt(FX_BSTR space, FX_BSTR name, FX_WSTR value)
pItem->m_AttrName = name;
pItem->m_Value = value;
}
-void CXML_AttrMap::RemoveAt(FX_BSTR space, FX_BSTR name)
+void CXML_AttrMap::RemoveAt(const CFX_ByteStringC& space, const CFX_ByteStringC& name)
{
if (m_pMap == NULL) {
return;
diff --git a/core/src/fxcrt/fxcrt_platforms.cpp b/core/src/fxcrt/fxcrt_platforms.cpp
index e5259c2b54..ae0f829255 100644
--- a/core/src/fxcrt/fxcrt_platforms.cpp
+++ b/core/src/fxcrt/fxcrt_platforms.cpp
@@ -39,7 +39,7 @@ CFXCRT_FileAccess_CRT::~CFXCRT_FileAccess_CRT()
{
Close();
}
-FX_BOOL CFXCRT_FileAccess_CRT::Open(FX_BSTR fileName, FX_DWORD dwMode)
+FX_BOOL CFXCRT_FileAccess_CRT::Open(const CFX_ByteStringC& fileName, FX_DWORD dwMode)
{
if (m_hFile) {
return FALSE;
@@ -49,7 +49,7 @@ FX_BOOL CFXCRT_FileAccess_CRT::Open(FX_BSTR fileName, FX_DWORD dwMode)
m_hFile = FXSYS_fopen(fileName.GetCStr(), strMode.c_str());
return m_hFile != NULL;
}
-FX_BOOL CFXCRT_FileAccess_CRT::Open(FX_WSTR fileName, FX_DWORD dwMode)
+FX_BOOL CFXCRT_FileAccess_CRT::Open(const CFX_WideStringC& fileName, FX_DWORD dwMode)
{
if (m_hFile) {
return FALSE;
@@ -138,23 +138,23 @@ FX_BOOL CFXCRT_FileAccess_CRT::Truncate(FX_FILESIZE szFile)
{
return FALSE;
}
-FX_BOOL FX_File_Exist(FX_BSTR fileName)
+FX_BOOL FX_File_Exist(const CFX_ByteStringC& fileName)
{
return access(fileName.GetCStr(), F_OK) > -1;
}
-FX_BOOL FX_File_Exist(FX_WSTR fileName)
+FX_BOOL FX_File_Exist(const CFX_WideStringC& fileName)
{
return FX_File_Exist(FX_UTF8Encode(fileName));
}
-FX_BOOL FX_File_Delete(FX_BSTR fileName)
+FX_BOOL FX_File_Delete(const CFX_ByteStringC& fileName)
{
return remove(fileName.GetCStr()) > -1;
}
-FX_BOOL FX_File_Delete(FX_WSTR fileName)
+FX_BOOL FX_File_Delete(const CFX_WideStringC& fileName)
{
return FX_File_Delete(FX_UTF8Encode(fileName));
}
-FX_BOOL FX_File_Copy(FX_BSTR fileNameSrc, FX_BSTR fileNameDst)
+FX_BOOL FX_File_Copy(const CFX_ByteStringC& fileNameSrc, const CFX_ByteStringC& fileNameDst)
{
CFXCRT_FileAccess_CRT src, dst;
if (!src.Open(fileNameSrc, FX_FILEMODE_ReadOnly)) {
@@ -177,15 +177,15 @@ FX_BOOL FX_File_Copy(FX_BSTR fileNameSrc, FX_BSTR fileNameDst)
FX_Free(pBuffer);
return TRUE;
}
-FX_BOOL FX_File_Copy(FX_WSTR fileNameSrc, FX_WSTR fileNameDst)
+FX_BOOL FX_File_Copy(const CFX_WideStringC& fileNameSrc, const CFX_WideStringC& fileNameDst)
{
return FX_File_Copy(FX_UTF8Encode(fileNameSrc), FX_UTF8Encode(fileNameDst));
}
-FX_BOOL FX_File_Move(FX_BSTR fileNameSrc, FX_BSTR fileNameDst)
+FX_BOOL FX_File_Move(const CFX_ByteStringC& fileNameSrc, const CFX_ByteStringC& fileNameDst)
{
return rename(fileNameSrc.GetCStr(), fileNameDst.GetCStr());
}
-FX_BOOL FX_File_Move(FX_WSTR fileNameSrc, FX_WSTR fileNameDst)
+FX_BOOL FX_File_Move(const CFX_WideStringC& fileNameSrc, const CFX_WideStringC& fileNameDst)
{
return FX_File_Move(FX_UTF8Encode(fileNameSrc), FX_UTF8Encode(fileNameDst));
}
diff --git a/core/src/fxcrt/fxcrt_platforms.h b/core/src/fxcrt/fxcrt_platforms.h
index be51724352..6df020a34c 100644
--- a/core/src/fxcrt/fxcrt_platforms.h
+++ b/core/src/fxcrt/fxcrt_platforms.h
@@ -17,8 +17,8 @@ class CFXCRT_FileAccess_CRT : public IFXCRT_FileAccess
public:
CFXCRT_FileAccess_CRT();
virtual ~CFXCRT_FileAccess_CRT();
- virtual FX_BOOL Open(FX_BSTR fileName, FX_DWORD dwMode);
- virtual FX_BOOL Open(FX_WSTR fileName, FX_DWORD dwMode);
+ virtual FX_BOOL Open(const CFX_ByteStringC& fileName, FX_DWORD dwMode);
+ virtual FX_BOOL Open(const CFX_WideStringC& fileName, FX_DWORD dwMode);
virtual void Close();
virtual void Release();
virtual FX_FILESIZE GetSize() const;
diff --git a/core/src/fxcrt/fxcrt_posix.cpp b/core/src/fxcrt/fxcrt_posix.cpp
index dd2aaf27d0..da39f8cd5e 100644
--- a/core/src/fxcrt/fxcrt_posix.cpp
+++ b/core/src/fxcrt/fxcrt_posix.cpp
@@ -33,7 +33,7 @@ CFXCRT_FileAccess_Posix::~CFXCRT_FileAccess_Posix()
{
Close();
}
-FX_BOOL CFXCRT_FileAccess_Posix::Open(FX_BSTR fileName, FX_DWORD dwMode)
+FX_BOOL CFXCRT_FileAccess_Posix::Open(const CFX_ByteStringC& fileName, FX_DWORD dwMode)
{
if (m_nFD > -1) {
return FALSE;
@@ -43,7 +43,7 @@ FX_BOOL CFXCRT_FileAccess_Posix::Open(FX_BSTR fileName, FX_DWORD dwMode)
m_nFD = open(fileName.GetCStr(), nFlags, nMasks);
return m_nFD > -1;
}
-FX_BOOL CFXCRT_FileAccess_Posix::Open(FX_WSTR fileName, FX_DWORD dwMode)
+FX_BOOL CFXCRT_FileAccess_Posix::Open(const CFX_WideStringC& fileName, FX_DWORD dwMode)
{
return Open(FX_UTF8Encode(fileName), dwMode);
}
@@ -134,23 +134,23 @@ FX_BOOL CFXCRT_FileAccess_Posix::Truncate(FX_FILESIZE szFile)
}
return !ftruncate(m_nFD, szFile);
}
-FX_BOOL FX_File_Exist(FX_BSTR fileName)
+FX_BOOL FX_File_Exist(const CFX_ByteStringC& fileName)
{
return access(fileName.GetCStr(), F_OK) > -1;
}
-FX_BOOL FX_File_Exist(FX_WSTR fileName)
+FX_BOOL FX_File_Exist(const CFX_WideStringC& fileName)
{
return FX_File_Exist(FX_UTF8Encode(fileName));
}
-FX_BOOL FX_File_Delete(FX_BSTR fileName)
+FX_BOOL FX_File_Delete(const CFX_ByteStringC& fileName)
{
return remove(fileName.GetCStr()) > -1;
}
-FX_BOOL FX_File_Delete(FX_WSTR fileName)
+FX_BOOL FX_File_Delete(const CFX_WideStringC& fileName)
{
return FX_File_Delete(FX_UTF8Encode(fileName));
}
-FX_BOOL FX_File_Copy(FX_BSTR fileNameSrc, FX_BSTR fileNameDst)
+FX_BOOL FX_File_Copy(const CFX_ByteStringC& fileNameSrc, const CFX_ByteStringC& fileNameDst)
{
CFXCRT_FileAccess_Posix src, dst;
if (!src.Open(fileNameSrc, FX_FILEMODE_ReadOnly)) {
@@ -175,15 +175,15 @@ FX_BOOL FX_File_Copy(FX_BSTR fileNameSrc, FX_BSTR fileNameDst)
FX_Free(pBuffer);
return TRUE;
}
-FX_BOOL FX_File_Copy(FX_WSTR fileNameSrc, FX_WSTR fileNameDst)
+FX_BOOL FX_File_Copy(const CFX_WideStringC& fileNameSrc, const CFX_WideStringC& fileNameDst)
{
return FX_File_Copy(FX_UTF8Encode(fileNameSrc), FX_UTF8Encode(fileNameDst));
}
-FX_BOOL FX_File_Move(FX_BSTR fileNameSrc, FX_BSTR fileNameDst)
+FX_BOOL FX_File_Move(const CFX_ByteStringC& fileNameSrc, const CFX_ByteStringC& fileNameDst)
{
return rename(fileNameSrc.GetCStr(), fileNameDst.GetCStr());
}
-FX_BOOL FX_File_Move(FX_WSTR fileNameSrc, FX_WSTR fileNameDst)
+FX_BOOL FX_File_Move(const CFX_WideStringC& fileNameSrc, const CFX_WideStringC& fileNameDst)
{
return FX_File_Move(FX_UTF8Encode(fileNameSrc), FX_UTF8Encode(fileNameDst));
}
diff --git a/core/src/fxcrt/fxcrt_posix.h b/core/src/fxcrt/fxcrt_posix.h
index 0b4509ec73..c798ad848a 100644
--- a/core/src/fxcrt/fxcrt_posix.h
+++ b/core/src/fxcrt/fxcrt_posix.h
@@ -15,8 +15,8 @@ class CFXCRT_FileAccess_Posix : public IFXCRT_FileAccess
public:
CFXCRT_FileAccess_Posix();
virtual ~CFXCRT_FileAccess_Posix();
- virtual FX_BOOL Open(FX_BSTR fileName, FX_DWORD dwMode);
- virtual FX_BOOL Open(FX_WSTR fileName, FX_DWORD dwMode);
+ virtual FX_BOOL Open(const CFX_ByteStringC& fileName, FX_DWORD dwMode);
+ virtual FX_BOOL Open(const CFX_WideStringC& fileName, FX_DWORD dwMode);
virtual void Close();
virtual void Release();
virtual FX_FILESIZE GetSize() const;
diff --git a/core/src/fxcrt/fxcrt_windows.cpp b/core/src/fxcrt/fxcrt_windows.cpp
index 6b0f0f290d..ac9c60185d 100644
--- a/core/src/fxcrt/fxcrt_windows.cpp
+++ b/core/src/fxcrt/fxcrt_windows.cpp
@@ -7,7 +7,7 @@
#include "../../include/fxcrt/fx_ext.h"
#include "fxcrt_windows.h"
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
-FX_BOOL FX_File_Exist(FX_BSTR fileName)
+FX_BOOL FX_File_Exist(const CFX_ByteStringC& fileName)
{
FX_DWORD dwAttri = ::GetFileAttributesA(fileName.GetCStr());
if (dwAttri == -1) {
@@ -15,7 +15,7 @@ FX_BOOL FX_File_Exist(FX_BSTR fileName)
}
return (dwAttri & FILE_ATTRIBUTE_DIRECTORY) == 0;
}
-FX_BOOL FX_File_Exist(FX_WSTR fileName)
+FX_BOOL FX_File_Exist(const CFX_WideStringC& fileName)
{
FX_DWORD dwAttri = ::GetFileAttributesW((LPCWSTR)fileName.GetPtr());
if (dwAttri == -1) {
@@ -54,7 +54,7 @@ CFXCRT_FileAccess_Win64::~CFXCRT_FileAccess_Win64()
{
Close();
}
-FX_BOOL CFXCRT_FileAccess_Win64::Open(FX_BSTR fileName, FX_DWORD dwMode)
+FX_BOOL CFXCRT_FileAccess_Win64::Open(const CFX_ByteStringC& fileName, FX_DWORD dwMode)
{
if (m_hFile) {
return FALSE;
@@ -67,7 +67,7 @@ FX_BOOL CFXCRT_FileAccess_Win64::Open(FX_BSTR fileName, FX_DWORD dwMode)
}
return m_hFile != NULL;
}
-FX_BOOL CFXCRT_FileAccess_Win64::Open(FX_WSTR fileName, FX_DWORD dwMode)
+FX_BOOL CFXCRT_FileAccess_Win64::Open(const CFX_WideStringC& fileName, FX_DWORD dwMode)
{
if (m_hFile) {
return FALSE;
@@ -187,27 +187,27 @@ FX_BOOL CFXCRT_FileAccess_Win64::Truncate(FX_FILESIZE szFile)
}
return ::SetEndOfFile(m_hFile);
}
-FX_BOOL FX_File_Delete(FX_BSTR fileName)
+FX_BOOL FX_File_Delete(const CFX_ByteStringC& fileName)
{
return ::DeleteFileA(fileName.GetCStr());
}
-FX_BOOL FX_File_Delete(FX_WSTR fileName)
+FX_BOOL FX_File_Delete(const CFX_WideStringC& fileName)
{
return ::DeleteFileW((LPCWSTR)fileName.GetPtr());
}
-FX_BOOL FX_File_Copy(FX_BSTR fileNameSrc, FX_BSTR fileNameDst)
+FX_BOOL FX_File_Copy(const CFX_ByteStringC& fileNameSrc, const CFX_ByteStringC& fileNameDst)
{
return ::CopyFileA(fileNameSrc.GetCStr(), fileNameDst.GetCStr(), FALSE);
}
-FX_BOOL FX_File_Copy(FX_WSTR fileNameSrc, FX_WSTR fileNameDst)
+FX_BOOL FX_File_Copy(const CFX_WideStringC& fileNameSrc, const CFX_WideStringC& fileNameDst)
{
return ::CopyFileW((LPCWSTR)fileNameSrc.GetPtr(), (LPCWSTR)fileNameDst.GetPtr(), FALSE);
}
-FX_BOOL FX_File_Move(FX_BSTR fileNameSrc, FX_BSTR fileNameDst)
+FX_BOOL FX_File_Move(const CFX_ByteStringC& fileNameSrc, const CFX_ByteStringC& fileNameDst)
{
return ::MoveFileA(fileNameSrc.GetCStr(), fileNameDst.GetCStr());
}
-FX_BOOL FX_File_Move(FX_WSTR fileNameSrc, FX_WSTR fileNameDst)
+FX_BOOL FX_File_Move(const CFX_WideStringC& fileNameSrc, const CFX_WideStringC& fileNameDst)
{
return ::MoveFileW((LPCWSTR)fileNameSrc.GetPtr(), (LPCWSTR)fileNameDst.GetPtr());
}
diff --git a/core/src/fxcrt/fxcrt_windows.h b/core/src/fxcrt/fxcrt_windows.h
index 32531d568f..8dd2cddc82 100644
--- a/core/src/fxcrt/fxcrt_windows.h
+++ b/core/src/fxcrt/fxcrt_windows.h
@@ -15,8 +15,8 @@ class CFXCRT_FileAccess_Win64 : public IFXCRT_FileAccess
public:
CFXCRT_FileAccess_Win64();
virtual ~CFXCRT_FileAccess_Win64();
- virtual FX_BOOL Open(FX_BSTR fileName, FX_DWORD dwMode);
- virtual FX_BOOL Open(FX_WSTR fileName, FX_DWORD dwMode);
+ virtual FX_BOOL Open(const CFX_ByteStringC& fileName, FX_DWORD dwMode);
+ virtual FX_BOOL Open(const CFX_WideStringC& fileName, FX_DWORD dwMode);
virtual void Close();
virtual void Release();
virtual FX_FILESIZE GetSize() const;
diff --git a/core/src/fxcrt/xml_int.h b/core/src/fxcrt/xml_int.h
index 0220301d17..9469a758cb 100644
--- a/core/src/fxcrt/xml_int.h
+++ b/core/src/fxcrt/xml_int.h
@@ -153,11 +153,11 @@ public:
void GetAttrValue(CFX_WideString &value);
FX_DWORD GetCharRef();
void GetTagName(CFX_ByteString &space, CFX_ByteString &name, FX_BOOL &bEndTag, FX_BOOL bStartTag = FALSE);
- void SkipLiterals(FX_BSTR str);
+ void SkipLiterals(const CFX_ByteStringC& str);
CXML_Element* ParseElement(CXML_Element* pParent, FX_BOOL bStartTag = FALSE);
- void InsertContentSegment(FX_BOOL bCDATA, FX_WSTR content, CXML_Element* pElement);
+ void InsertContentSegment(FX_BOOL bCDATA, const CFX_WideStringC& content, CXML_Element* pElement);
void InsertCDATASegment(CFX_UTF8Decoder& decoder, CXML_Element* pElement);
};
-void FX_XML_SplitQualifiedName(FX_BSTR bsFullName, CFX_ByteStringC &bsSpace, CFX_ByteStringC &bsName);
+void FX_XML_SplitQualifiedName(const CFX_ByteStringC& bsFullName, CFX_ByteStringC &bsSpace, CFX_ByteStringC &bsName);
#endif // CORE_SRC_FXCRT_XML_INT_H_
diff --git a/core/src/fxge/android/fpf_skiafont.cpp b/core/src/fxge/android/fpf_skiafont.cpp
index 213a6595aa..e94f20f876 100644
--- a/core/src/fxge/android/fpf_skiafont.cpp
+++ b/core/src/fxge/android/fpf_skiafont.cpp
@@ -166,7 +166,7 @@ FX_DWORD CFPF_SkiaFont::GetFontData(FX_DWORD dwTable, uint8_t* pBuffer, FX_DWORD
}
return dwSize;
}
-FX_BOOL CFPF_SkiaFont::InitFont(CFPF_SkiaFontMgr *pFontMgr, CFPF_SkiaFontDescriptor *pFontDes, FX_BSTR bsFamily, FX_DWORD dwStyle, uint8_t uCharset)
+FX_BOOL CFPF_SkiaFont::InitFont(CFPF_SkiaFontMgr *pFontMgr, CFPF_SkiaFontDescriptor *pFontDes, const CFX_ByteStringC& bsFamily, FX_DWORD dwStyle, uint8_t uCharset)
{
if (!pFontMgr || !pFontDes) {
return FALSE;
diff --git a/core/src/fxge/android/fpf_skiafont.h b/core/src/fxge/android/fpf_skiafont.h
index af33402846..f3a61c9611 100644
--- a/core/src/fxge/android/fpf_skiafont.h
+++ b/core/src/fxge/android/fpf_skiafont.h
@@ -45,7 +45,7 @@ public:
virtual int32_t GetHeight() const;
virtual int32_t GetItalicAngle() const;
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);
+ FX_BOOL InitFont(CFPF_SkiaFontMgr *pFontMgr, CFPF_SkiaFontDescriptor *pFontDes, const CFX_ByteStringC& bsFamily, FX_DWORD dwStyle, uint8_t uCharset);
protected:
CFPF_SkiaFontMgr *m_pFontMgr;
CFPF_SkiaFontDescriptor *m_pFontDes;
diff --git a/core/src/fxge/android/fpf_skiafontmgr.cpp b/core/src/fxge/android/fpf_skiafontmgr.cpp
index df9ce8983a..db3dcfea25 100644
--- a/core/src/fxge/android/fpf_skiafontmgr.cpp
+++ b/core/src/fxge/android/fpf_skiafontmgr.cpp
@@ -181,7 +181,7 @@ static FX_DWORD FPF_SkiaGetCharset(uint8_t uCharset)
}
return FPF_SKIACHARSET_Default;
}
-static FX_DWORD FPF_SKIANormalizeFontName(FX_BSTR bsfamily)
+static FX_DWORD FPF_SKIANormalizeFontName(const CFX_ByteStringC& bsfamily)
{
FX_DWORD dwHash = 0;
int32_t iLength = bsfamily.GetLength();
@@ -195,7 +195,7 @@ static FX_DWORD FPF_SKIANormalizeFontName(FX_BSTR bsfamily)
}
return dwHash;
}
-static FX_DWORD FPF_SKIAGetFamilyHash(FX_BSTR bsFamily, FX_DWORD dwStyle, uint8_t uCharset)
+static FX_DWORD FPF_SKIAGetFamilyHash(const CFX_ByteStringC& bsFamily, FX_DWORD dwStyle, uint8_t uCharset)
{
CFX_ByteString bsFont(bsFamily);
if (dwStyle & FXFONT_BOLD) {
@@ -215,13 +215,13 @@ static FX_BOOL FPF_SkiaIsCJK(uint8_t uCharset)
return (uCharset == FXFONT_GB2312_CHARSET) || (uCharset == FXFONT_CHINESEBIG5_CHARSET)
|| (uCharset == FXFONT_HANGEUL_CHARSET) || (uCharset == FXFONT_SHIFTJIS_CHARSET);
}
-static FX_BOOL FPF_SkiaMaybeSymbol(FX_BSTR bsFacename)
+static FX_BOOL FPF_SkiaMaybeSymbol(const CFX_ByteStringC& bsFacename)
{
CFX_ByteString bsName = bsFacename;
bsName.MakeLower();
return bsName.Find("symbol") > -1;
}
-static FX_BOOL FPF_SkiaMaybeArabic(FX_BSTR bsFacename)
+static FX_BOOL FPF_SkiaMaybeArabic(const CFX_ByteStringC& bsFacename)
{
CFX_ByteString bsName = bsFacename;
bsName.MakeLower();
@@ -273,13 +273,13 @@ void CFPF_SkiaFontMgr::LoadSystemFonts()
void CFPF_SkiaFontMgr::LoadPrivateFont(IFX_FileRead* pFontFile)
{
}
-void CFPF_SkiaFontMgr::LoadPrivateFont(FX_BSTR bsFileName)
+void CFPF_SkiaFontMgr::LoadPrivateFont(const CFX_ByteStringC& bsFileName)
{
}
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)
+IFPF_Font* CFPF_SkiaFontMgr::CreateFont(const CFX_ByteStringC& bsFamilyname, uint8_t uCharset, FX_DWORD dwStyle, FX_DWORD dwMatch)
{
FX_DWORD dwHash = FPF_SKIAGetFamilyHash(bsFamilyname, dwStyle, uCharset);
IFPF_Font *pFont = NULL;
@@ -399,7 +399,7 @@ FXFT_Face CFPF_SkiaFontMgr::GetFontFace(IFX_FileRead *pFileRead, int32_t iFaceIn
FXFT_Set_Pixel_Sizes(face, 0, 64);
return face;
}
-FXFT_Face CFPF_SkiaFontMgr::GetFontFace(FX_BSTR bsFile, int32_t iFaceIndex )
+FXFT_Face CFPF_SkiaFontMgr::GetFontFace(const CFX_ByteStringC& bsFile, int32_t iFaceIndex )
{
if (bsFile.IsEmpty()) {
return NULL;
@@ -436,7 +436,7 @@ FXFT_Face CFPF_SkiaFontMgr::GetFontFace(const uint8_t* pBuffer, size_t szBuffer,
FXFT_Set_Pixel_Sizes(face, 0, 64);
return face;
}
-void CFPF_SkiaFontMgr::ScanPath(FX_BSTR path)
+void CFPF_SkiaFontMgr::ScanPath(const CFX_ByteStringC& path)
{
void *handle = FX_OpenFolder(path.GetCStr());
if (!handle) {
@@ -467,7 +467,7 @@ void CFPF_SkiaFontMgr::ScanPath(FX_BSTR path)
}
FX_CloseFolder(handle);
}
-void CFPF_SkiaFontMgr::ScanFile(FX_BSTR file)
+void CFPF_SkiaFontMgr::ScanFile(const CFX_ByteStringC& file)
{
FXFT_Face face = GetFontFace(file);
if (face) {
diff --git a/core/src/fxge/android/fpf_skiafontmgr.h b/core/src/fxge/android/fpf_skiafontmgr.h
index ba9ea9134a..5acf14e3ac 100644
--- a/core/src/fxge/android/fpf_skiafontmgr.h
+++ b/core/src/fxge/android/fpf_skiafontmgr.h
@@ -97,16 +97,16 @@ public:
FX_BOOL InitFTLibrary();
virtual void LoadSystemFonts();
virtual void LoadPrivateFont(IFX_FileRead* pFontFile);
- virtual void LoadPrivateFont(FX_BSTR bsFileName);
+ virtual void LoadPrivateFont(const CFX_ByteStringC& bsFileName);
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);
+ virtual IFPF_Font* CreateFont(const CFX_ByteStringC& 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(const CFX_ByteStringC& bsFile, 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);
+ void ScanPath(const CFX_ByteStringC& path);
+ void ScanFile(const CFX_ByteStringC& file);
void ReportFace(FXFT_Face face, CFPF_SkiaFontDescriptor *pFontDesc);
void OutputSystemFonts();
FX_BOOL m_bLoaded;
diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp
index 620b82953c..dbf9768148 100644
--- a/core/src/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/src/fxge/ge/fx_ge_fontmap.cpp
@@ -1395,7 +1395,7 @@ CFX_FolderFontInfo::~CFX_FolderFontInfo()
delete (CFontFaceInfo*)value;
}
}
-void CFX_FolderFontInfo::AddPath(FX_BSTR path)
+void CFX_FolderFontInfo::AddPath(const CFX_ByteStringC& path)
{
m_PathList.Add(path);
}
diff --git a/core/src/reflow/layoutprovider_taggedpdf.cpp b/core/src/reflow/layoutprovider_taggedpdf.cpp
index c40c1cdb64..3893144ab2 100644
--- a/core/src/reflow/layoutprovider_taggedpdf.cpp
+++ b/core/src/reflow/layoutprovider_taggedpdf.cpp
@@ -21,7 +21,7 @@ CPDF_LayoutElement::~CPDF_LayoutElement()
}
m_ChildArray.RemoveAll();
}
-LayoutType CPDF_LayoutElement::ConvertLayoutType(FX_BSTR name)
+LayoutType CPDF_LayoutElement::ConvertLayoutType(const CFX_ByteStringC& name)
{
if(name == (const char*)("Document")) {
return LayoutDocument;
@@ -127,7 +127,7 @@ LayoutType CPDF_LayoutElement::ConvertLayoutType(FX_BSTR name)
}
CFX_ByteStringC CPDF_LayoutElement::ConvertLayoutType(LayoutType type)
{
- FX_BSTR name = "";
+ const CFX_ByteStringC& name = "";
if(type == LayoutArifact) {
return "Arifact";
} else if( type == LayoutDocument) {
diff --git a/core/src/reflow/layoutprovider_taggedpdf.h b/core/src/reflow/layoutprovider_taggedpdf.h
index 3e11f17067..fa6c994bf0 100644
--- a/core/src/reflow/layoutprovider_taggedpdf.h
+++ b/core/src/reflow/layoutprovider_taggedpdf.h
@@ -36,7 +36,7 @@ public:
CPDF_StructElement* m_pTaggedElement;
CPDF_LayoutElement* m_pParentElement;
CFX_PtrArray m_ChildArray;
- LayoutType ConvertLayoutType(FX_BSTR name);
+ LayoutType ConvertLayoutType(const CFX_ByteStringC& name);
CFX_ByteStringC ConvertLayoutType(LayoutType type);
CFX_ByteStringC ConvertLayoutAttr(LayoutAttr attr);
LayoutEnum ConvertLayoutEnum(CFX_ByteStringC Enum);
diff --git a/fpdfsdk/include/fpdfxfa/fpdfxfa_app.h b/fpdfsdk/include/fpdfxfa/fpdfxfa_app.h
index 1a8a6b41b0..e650c6235b 100644
--- a/fpdfsdk/include/fpdfxfa/fpdfxfa_app.h
+++ b/fpdfsdk/include/fpdfxfa/fpdfxfa_app.h
@@ -33,7 +33,7 @@ public:
// IFXA_AppProvider:
void GetAppType(CFX_WideString &wsAppType) override;
- void SetAppType(FX_WSTR wsAppType) override;
+ void SetAppType(const CFX_WideStringC& wsAppType) override;
void GetLanguage(CFX_WideString &wsLanguage) override;
void GetPlatform(CFX_WideString &wsPlatform) override;
@@ -49,20 +49,20 @@ public:
}
void Beep(FX_DWORD dwType) override;
- int32_t MsgBox(FX_WSTR wsMessage, FX_WSTR wsTitle, FX_DWORD dwIconType, FX_DWORD dwButtonType) override;
- void Response(CFX_WideString &wsAnswer, FX_WSTR wsQuestion, FX_WSTR wsTitle,
- FX_WSTR wsDefaultAnswer, FX_BOOL bMark) override;
+ int32_t MsgBox(const CFX_WideStringC& wsMessage, const CFX_WideStringC& wsTitle, FX_DWORD dwIconType, FX_DWORD dwButtonType) override;
+ void Response(CFX_WideString &wsAnswer, const CFX_WideStringC& wsQuestion, const CFX_WideStringC& wsTitle,
+ const CFX_WideStringC& wsDefaultAnswer, FX_BOOL bMark) override;
int32_t GetDocumentCountInBatch() override;
int32_t GetCurDocumentInBatch() override;
- IFX_FileRead* DownloadURL(FX_WSTR wsURL) override;
- FX_BOOL PostRequestURL(FX_WSTR wsURL, FX_WSTR wsData, FX_WSTR wsContentType,
- FX_WSTR wsEncode, FX_WSTR wsHeader, CFX_WideString &wsResponse) override;
- FX_BOOL PutRequestURL(FX_WSTR wsURL, FX_WSTR wsData, FX_WSTR wsEncode) override;
+ IFX_FileRead* DownloadURL(const CFX_WideStringC& wsURL) override;
+ FX_BOOL PostRequestURL(const CFX_WideStringC& wsURL, const CFX_WideStringC& wsData, const CFX_WideStringC& wsContentType,
+ const CFX_WideStringC& wsEncode, const CFX_WideStringC& wsHeader, CFX_WideString &wsResponse) override;
+ FX_BOOL PutRequestURL(const CFX_WideStringC& wsURL, const CFX_WideStringC& wsData, const CFX_WideStringC& wsEncode) override;
void LoadString(int32_t iStringID, CFX_WideString &wsString) override;
- FX_BOOL ShowFileDialog(FX_WSTR wsTitle, FX_WSTR wsFilter, CFX_WideStringArray &wsPathArr, FX_BOOL bOpen) override;
+ FX_BOOL ShowFileDialog(const CFX_WideStringC& wsTitle, const CFX_WideStringC& wsFilter, CFX_WideStringArray &wsPathArr, FX_BOOL bOpen) override;
IFWL_AdapterTimerMgr* GetTimerMgr() override;
CFX_ArrayTemplate<CPDFDoc_Environment*> m_pEnvList;
diff --git a/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h b/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
index 163120b928..cc871badb2 100644
--- a/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
+++ b/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
@@ -68,10 +68,10 @@ public:
virtual FX_BOOL IsCalculationsEnabled(IXFA_Doc* hDoc);
virtual void SetCalculationsEnabled(IXFA_Doc* hDoc, FX_BOOL bEnabled);
virtual void GetTitle(IXFA_Doc* hDoc, CFX_WideString &wsTitle);
- virtual void SetTitle(IXFA_Doc* hDoc, FX_WSTR wsTitle);
- virtual void ExportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath, FX_BOOL bXDP = TRUE);
- virtual void ImportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath);
- virtual void GotoURL(IXFA_Doc* hDoc, FX_WSTR bsURL, FX_BOOL bAppend = TRUE);
+ virtual void SetTitle(IXFA_Doc* hDoc, const CFX_WideStringC& wsTitle);
+ virtual void ExportData(IXFA_Doc* hDoc, const CFX_WideStringC& wsFilePath, FX_BOOL bXDP = TRUE);
+ virtual void ImportData(IXFA_Doc* hDoc, const CFX_WideStringC& wsFilePath);
+ virtual void GotoURL(IXFA_Doc* hDoc, const CFX_WideStringC& bsURL, FX_BOOL bAppend = TRUE);
virtual FX_BOOL IsValidationsEnabled(IXFA_Doc* hDoc);
virtual void SetValidationsEnabled(IXFA_Doc* hDoc, FX_BOOL bEnabled);
virtual void SetFocusWidget(IXFA_Doc* hDoc, IXFA_Widget* hWidget);
@@ -86,7 +86,7 @@ public:
//SignaturePseudoModel method
//TODO:
virtual int32_t Verify(IXFA_Doc* hDoc, CXFA_Node* pSigNode, FX_BOOL bUsed = TRUE/*, SecurityHandler* pHandler, SignatureInfo &info*/) {return 0;}
- virtual FX_BOOL Sign(IXFA_Doc* hDoc, CXFA_NodeList* pNodeList, FX_WSTR wsExpression, FX_WSTR wsXMLIdent, FX_WSTR wsValue = FX_WSTRC(L"open"), FX_BOOL bUsed = TRUE/*, SecurityHandler* pHandler = NULL, SignatureInfo &info*/) {return 0;}
+ virtual FX_BOOL Sign(IXFA_Doc* hDoc, CXFA_NodeList* pNodeList, const CFX_WideStringC& wsExpression, const CFX_WideStringC& wsXMLIdent, const CFX_WideStringC& wsValue = FX_WSTRC(L"open"), FX_BOOL bUsed = TRUE/*, SecurityHandler* pHandler = NULL, SignatureInfo &info*/) {return 0;}
virtual CXFA_NodeList* Enumerate(IXFA_Doc* hDoc) {return 0;}
virtual FX_BOOL Clear(IXFA_Doc* hDoc, CXFA_Node* pSigNode, FX_BOOL bCleared = TRUE) {return 0;}
@@ -105,19 +105,19 @@ public:
*/
virtual FX_BOOL SubmitData(IXFA_Doc* hDoc, CXFA_Submit submit);
- virtual FX_BOOL CheckWord(IXFA_Doc* hDoc, FX_BSTR sWord){return FALSE;}
- virtual FX_BOOL GetSuggestWords(IXFA_Doc* hDoc, FX_BSTR sWord, CFX_ByteStringArray& sSuggest){return FALSE;}
+ virtual FX_BOOL CheckWord(IXFA_Doc* hDoc, const CFX_ByteStringC& sWord){return FALSE;}
+ virtual FX_BOOL GetSuggestWords(IXFA_Doc* hDoc, const CFX_ByteStringC& sWord, CFX_ByteStringArray& sSuggest){return FALSE;}
//Get PDF javascript object, set the object to hValue.
- virtual FX_BOOL GetPDFScriptObject(IXFA_Doc* hDoc, FX_BSTR utf8Name, FXJSE_HVALUE hValue);
+ virtual FX_BOOL GetPDFScriptObject(IXFA_Doc* hDoc, const CFX_ByteStringC& utf8Name, FXJSE_HVALUE hValue);
- virtual FX_BOOL GetGlobalProperty(IXFA_Doc* hDoc, FX_BSTR szPropName, FXJSE_HVALUE hValue);
- virtual FX_BOOL SetGlobalProperty(IXFA_Doc* hDoc, FX_BSTR szPropName, FXJSE_HVALUE hValue);
+ virtual FX_BOOL GetGlobalProperty(IXFA_Doc* hDoc, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue);
+ virtual FX_BOOL SetGlobalProperty(IXFA_Doc* hDoc, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue);
virtual CPDF_Document* OpenPDF(IXFA_Doc* hDoc, IFX_FileRead* pFile, FX_BOOL bTakeOverFile){return NULL;}
virtual IFX_FileRead* OpenLinkedFile(IXFA_Doc* hDoc, const CFX_WideString& wsLink);
- FX_BOOL _GetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue, IFXJS_Runtime* runTime);
+ FX_BOOL _GetHValueByName(const CFX_ByteStringC& utf8Name, FXJSE_HVALUE hValue, IFXJS_Runtime* runTime);
FX_BOOL _OnBeforeNotifySumbit();
void _OnAfterNotifySumbit();
FX_BOOL _NotifySubmit(FX_BOOL bPrevOrPost);
diff --git a/fpdfsdk/include/fsdk_mgr.h b/fpdfsdk/include/fsdk_mgr.h
index b0ff5a7599..eb557f5830 100644
--- a/fpdfsdk/include/fsdk_mgr.h
+++ b/fpdfsdk/include/fsdk_mgr.h
@@ -412,7 +412,7 @@ public:
return L"";
}
- void FFI_GotoURL(FPDF_DOCUMENT document, FX_WSTR wsURL, FX_BOOL bAppend)
+ void FFI_GotoURL(FPDF_DOCUMENT document, const CFX_WideStringC& wsURL, FX_BOOL bAppend)
{
if (m_pInfo && m_pInfo->FFI_GotoURL)
{
diff --git a/fpdfsdk/include/javascript/IJavaScript.h b/fpdfsdk/include/javascript/IJavaScript.h
index d40c87b1f5..ddab4cfde7 100644
--- a/fpdfsdk/include/javascript/IJavaScript.h
+++ b/fpdfsdk/include/javascript/IJavaScript.h
@@ -85,8 +85,8 @@ public:
virtual CPDFSDK_Document* GetReaderDocument() = 0;
- virtual FX_BOOL GetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue) = 0;
- virtual FX_BOOL SetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue) = 0;
+ virtual FX_BOOL GetHValueByName(const CFX_ByteStringC& utf8Name, FXJSE_HVALUE hValue) = 0;
+ virtual FX_BOOL SetHValueByName(const CFX_ByteStringC& utf8Name, FXJSE_HVALUE hValue) = 0;
protected:
~IFXJS_Runtime() { }
diff --git a/fpdfsdk/include/javascript/JS_Runtime.h b/fpdfsdk/include/javascript/JS_Runtime.h
index 91a82da375..950d43fa47 100644
--- a/fpdfsdk/include/javascript/JS_Runtime.h
+++ b/fpdfsdk/include/javascript/JS_Runtime.h
@@ -61,8 +61,8 @@ public:
v8::Local<v8::Context> NewJSContext();
- virtual FX_BOOL GetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue);
- virtual FX_BOOL SetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue);
+ virtual FX_BOOL GetHValueByName(const CFX_ByteStringC& utf8Name, FXJSE_HVALUE hValue);
+ virtual FX_BOOL SetHValueByName(const CFX_ByteStringC& utf8Name, FXJSE_HVALUE hValue);
protected:
CFX_ArrayTemplate<CJS_Context*> m_ContextArray;
CPDFDoc_Environment* m_pApp;
diff --git a/fpdfsdk/src/fpdf_ext.cpp b/fpdfsdk/src/fpdf_ext.cpp
index c258b93c7d..2dd242b372 100644
--- a/fpdfsdk/src/fpdf_ext.cpp
+++ b/fpdfsdk/src/fpdf_ext.cpp
@@ -208,27 +208,30 @@ void CheckUnSupportError(CPDF_Document * pDoc, FX_DWORD err_code)
DLLEXPORT int FPDFDoc_GetPageMode(FPDF_DOCUMENT document)
{
- if (!document) return PAGEMODE_UNKNOWN;
+ if (!document)
+ return PAGEMODE_UNKNOWN;
+
CPDF_Dictionary *pRoot = (((CPDFXFA_Document*)document)->GetPDFDoc())->GetRoot();
- if (!pRoot)
- return PAGEMODE_UNKNOWN;
- CPDF_Object* pName = pRoot->GetElement("PageMode");
- if (!pName)
- return PAGEMODE_USENONE;
- CFX_ByteString strPageMode = pName->GetString();
-
- if (strPageMode.IsEmpty()||strPageMode.EqualNoCase(FX_BSTR("UseNone")))
- return PAGEMODE_USENONE;
- else if (strPageMode.EqualNoCase(FX_BSTR("UseOutlines")))
- return PAGEMODE_USEOUTLINES;
- else if (strPageMode.EqualNoCase(FX_BSTR("UseThumbs")))
- return PAGEMODE_USETHUMBS;
- else if (strPageMode.EqualNoCase(FX_BSTR("FullScreen")))
- return PAGEMODE_FULLSCREEN;
- else if (strPageMode.EqualNoCase(FX_BSTR("UseOC")))
- return PAGEMODE_USEOC;
- else if (strPageMode.EqualNoCase(FX_BSTR("UseAttachments")))
- return PAGEMODE_USEATTACHMENTS;
-
- return PAGEMODE_UNKNOWN;
+ if (!pRoot)
+ return PAGEMODE_UNKNOWN;
+
+ CPDF_Object* pName = pRoot->GetElement("PageMode");
+ if (!pName)
+ return PAGEMODE_USENONE;
+
+ CFX_ByteString strPageMode = pName->GetString();
+ if (strPageMode.IsEmpty()||strPageMode.EqualNoCase("UseNone"))
+ return PAGEMODE_USENONE;
+ if (strPageMode.EqualNoCase("UseOutlines"))
+ return PAGEMODE_USEOUTLINES;
+ if (strPageMode.EqualNoCase("UseThumbs"))
+ return PAGEMODE_USETHUMBS;
+ if (strPageMode.EqualNoCase("FullScreen"))
+ return PAGEMODE_FULLSCREEN;
+ if (strPageMode.EqualNoCase("UseOC"))
+ return PAGEMODE_USEOC;
+ if (strPageMode.EqualNoCase("UseAttachments"))
+ return PAGEMODE_USEATTACHMENTS;
+
+ return PAGEMODE_UNKNOWN;
}
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp
index cf5db2b3c3..72fc91e708 100644
--- a/fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp
+++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp
@@ -136,7 +136,7 @@ void CPDFXFA_App::GetAppName(CFX_WideString& wsName)
}
}
-void CPDFXFA_App::SetAppType(FX_WSTR wsAppType)
+void CPDFXFA_App::SetAppType(const CFX_WideStringC& wsAppType)
{
m_csAppType = wsAppType;
}
@@ -178,7 +178,7 @@ void CPDFXFA_App::Beep(FX_DWORD dwType)
}
}
-int32_t CPDFXFA_App::MsgBox(FX_WSTR wsMessage, FX_WSTR wsTitle, FX_DWORD dwIconType, FX_DWORD dwButtonType)
+int32_t CPDFXFA_App::MsgBox(const CFX_WideStringC& wsMessage, const CFX_WideStringC& wsTitle, FX_DWORD dwIconType, FX_DWORD dwButtonType)
{
CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
if (!pEnv)
@@ -231,7 +231,7 @@ int32_t CPDFXFA_App::MsgBox(FX_WSTR wsMessage, FX_WSTR wsTitle, FX_DWORD dwIconT
return XFA_IDYes;
}
-void CPDFXFA_App::Response(CFX_WideString &wsAnswer, FX_WSTR wsQuestion, FX_WSTR wsTitle, FX_WSTR wsDefaultAnswer, FX_BOOL bMark)
+void CPDFXFA_App::Response(CFX_WideString &wsAnswer, const CFX_WideStringC& wsQuestion, const CFX_WideStringC& wsTitle, const CFX_WideStringC& wsDefaultAnswer, FX_BOOL bMark)
{
CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
if (pEnv)
@@ -271,7 +271,7 @@ int32_t CPDFXFA_App::GetDocumentCountInBatch()
return 0;
}
-IFX_FileRead* CPDFXFA_App::DownloadURL(FX_WSTR wsURL)
+IFX_FileRead* CPDFXFA_App::DownloadURL(const CFX_WideStringC& wsURL)
{
CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
if (pEnv)
@@ -281,8 +281,8 @@ IFX_FileRead* CPDFXFA_App::DownloadURL(FX_WSTR wsURL)
return NULL;
}
-FX_BOOL CPDFXFA_App::PostRequestURL(FX_WSTR wsURL, FX_WSTR wsData, FX_WSTR wsContentType,
- FX_WSTR wsEncode, FX_WSTR wsHeader, CFX_WideString &wsResponse)
+FX_BOOL CPDFXFA_App::PostRequestURL(const CFX_WideStringC& wsURL, const CFX_WideStringC& wsData, const CFX_WideStringC& wsContentType,
+ const CFX_WideStringC& wsEncode, const CFX_WideStringC& wsHeader, CFX_WideString &wsResponse)
{
CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
if (pEnv)
@@ -293,7 +293,7 @@ FX_BOOL CPDFXFA_App::PostRequestURL(FX_WSTR wsURL, FX_WSTR wsData, FX_WSTR wsCon
return FALSE;
}
-FX_BOOL CPDFXFA_App::PutRequestURL(FX_WSTR wsURL, FX_WSTR wsData, FX_WSTR wsEncode)
+FX_BOOL CPDFXFA_App::PutRequestURL(const CFX_WideStringC& wsURL, const CFX_WideStringC& wsData, const CFX_WideStringC& wsEncode)
{
CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
if (pEnv)
@@ -545,7 +545,7 @@ void CPDFXFA_App::LoadString(int32_t iStringID, CFX_WideString &wsString)
}
-FX_BOOL CPDFXFA_App::ShowFileDialog(FX_WSTR wsTitle, FX_WSTR wsFilter, CFX_WideStringArray &wsPathArr, FX_BOOL bOpen)
+FX_BOOL CPDFXFA_App::ShowFileDialog(const CFX_WideStringC& wsTitle, const CFX_WideStringC& wsFilter, CFX_WideStringArray &wsPathArr, FX_BOOL bOpen)
{
return FALSE;
}
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
index c1f402e393..b4ac5f0e17 100644
--- a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
+++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
@@ -701,7 +701,7 @@ void CPDFXFA_Document::GetTitle(IXFA_Doc* hDoc, CFX_WideString &wsTitle)
wsTitle = wsTitle.FromLocal(csTitle.GetBuffer(csTitle.GetLength()));
csTitle.ReleaseBuffer(csTitle.GetLength());
}
-void CPDFXFA_Document::SetTitle(IXFA_Doc* hDoc, FX_WSTR wsTitle)
+void CPDFXFA_Document::SetTitle(IXFA_Doc* hDoc, const CFX_WideStringC& wsTitle)
{
if (hDoc != m_pXFADoc)
return;
@@ -713,7 +713,7 @@ void CPDFXFA_Document::SetTitle(IXFA_Doc* hDoc, FX_WSTR wsTitle)
return;
pInfoDict->SetAt("Title", FX_NEW CPDF_String(wsTitle));
}
-void CPDFXFA_Document::ExportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath, FX_BOOL bXDP)
+void CPDFXFA_Document::ExportData(IXFA_Doc* hDoc, const CFX_WideStringC& wsFilePath, FX_BOOL bXDP)
{
if (hDoc != m_pXFADoc)
return;
@@ -834,12 +834,12 @@ void CPDFXFA_Document::ExportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath, FX_BOOL bX
}
FX_BOOL bError= fileWrite.Flush();
}
-void CPDFXFA_Document::ImportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath)
+void CPDFXFA_Document::ImportData(IXFA_Doc* hDoc, const CFX_WideStringC& wsFilePath)
{
//TODO...
}
-void CPDFXFA_Document::GotoURL(IXFA_Doc* hDoc, FX_WSTR bsURL, FX_BOOL bAppend)
+void CPDFXFA_Document::GotoURL(IXFA_Doc* hDoc, const CFX_WideStringC& bsURL, FX_BOOL bAppend)
{
if (hDoc != m_pXFADoc)
return;
@@ -1392,7 +1392,7 @@ FX_BOOL CPDFXFA_Document::_SubmitData(IXFA_Doc* hDoc, CXFA_Submit submit)
return bRet;
}
-FX_BOOL CPDFXFA_Document::SetGlobalProperty(IXFA_Doc* hDoc, FX_BSTR szPropName, FXJSE_HVALUE hValue)
+FX_BOOL CPDFXFA_Document::SetGlobalProperty(IXFA_Doc* hDoc, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue)
{
if (hDoc != m_pXFADoc)
return FALSE;
@@ -1401,7 +1401,7 @@ FX_BOOL CPDFXFA_Document::SetGlobalProperty(IXFA_Doc* hDoc, FX_BSTR szPropName,
return m_pSDKDoc->GetEnv()->GetJSRuntime()->SetHValueByName(szPropName, hValue);
return FALSE;
}
-FX_BOOL CPDFXFA_Document::GetPDFScriptObject(IXFA_Doc* hDoc, FX_BSTR utf8Name, FXJSE_HVALUE hValue)
+FX_BOOL CPDFXFA_Document::GetPDFScriptObject(IXFA_Doc* hDoc, const CFX_ByteStringC& utf8Name, FXJSE_HVALUE hValue)
{
if (hDoc != m_pXFADoc)
return FALSE;
@@ -1418,7 +1418,7 @@ FX_BOOL CPDFXFA_Document::GetPDFScriptObject(IXFA_Doc* hDoc, FX_BSTR utf8Name, F
return _GetHValueByName(utf8Name, hValue, m_pSDKDoc->GetEnv()->GetJSRuntime());
}
-FX_BOOL CPDFXFA_Document::GetGlobalProperty(IXFA_Doc* hDoc, FX_BSTR szPropName, FXJSE_HVALUE hValue)
+FX_BOOL CPDFXFA_Document::GetGlobalProperty(IXFA_Doc* hDoc, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue)
{
if (hDoc != m_pXFADoc)
return FALSE;
@@ -1434,7 +1434,7 @@ FX_BOOL CPDFXFA_Document::GetGlobalProperty(IXFA_Doc* hDoc, FX_BSTR szPropName,
return _GetHValueByName(szPropName, hValue, m_pSDKDoc->GetEnv()->GetJSRuntime());
}
-FX_BOOL CPDFXFA_Document::_GetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue, IFXJS_Runtime* runTime)
+FX_BOOL CPDFXFA_Document::_GetHValueByName(const CFX_ByteStringC& utf8Name, FXJSE_HVALUE hValue, IFXJS_Runtime* runTime)
{
return runTime->GetHValueByName(utf8Name, hValue);
}
diff --git a/fpdfsdk/src/javascript/JS_Runtime.cpp b/fpdfsdk/src/javascript/JS_Runtime.cpp
index e3e38bcf3d..d8fea8d768 100644
--- a/fpdfsdk/src/javascript/JS_Runtime.cpp
+++ b/fpdfsdk/src/javascript/JS_Runtime.cpp
@@ -359,7 +359,7 @@ CFX_WideString ChangeObjName(const CFX_WideString& str)
sRet.Replace(L"_", L".");
return sRet;
}
-FX_BOOL CJS_Runtime::GetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue)
+FX_BOOL CJS_Runtime::GetHValueByName(const CFX_ByteStringC& utf8Name, FXJSE_HVALUE hValue)
{
const FX_CHAR* name = utf8Name.GetCStr();
@@ -382,7 +382,7 @@ FX_BOOL CJS_Runtime::GetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue)
return TRUE;
}
-FX_BOOL CJS_Runtime::SetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue)
+FX_BOOL CJS_Runtime::SetHValueByName(const CFX_ByteStringC& utf8Name, FXJSE_HVALUE hValue)
{
if (utf8Name.IsEmpty() || hValue == NULL)
return FALSE;
diff --git a/xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h b/xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h
index 1ad09eda96..943d7caa12 100644
--- a/xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h
+++ b/xfa/include/fwl/adapter/fwl_adapterclipboardmgr.h
@@ -26,11 +26,11 @@ public:
virtual int32_t GetDataSize(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;
+ virtual FWL_ERR SetStringData(const CFX_WideStringC& ws) = 0;
+ virtual FWL_ERR SetStringData(const CFX_ByteStringC& bs) = 0;
virtual FWL_ERR GetStringData(CFX_WideString &ws) = 0;
virtual FWL_ERR GetStringData(CFX_ByteString &bs) = 0;
virtual FWL_ERR EnumFormats(CFX_DWordArray &formats) = 0;
- virtual FX_DWORD RegisterFormat(FX_WSTR wsFormat) = 0;
+ virtual FX_DWORD RegisterFormat(const CFX_WideStringC& wsFormat) = 0;
};
#endif
diff --git a/xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h b/xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h
index bff8e8a885..603e931084 100644
--- a/xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h
+++ b/xfa/include/fwl/adapter/fwl_adapterwidgetmgr.h
@@ -24,7 +24,7 @@ public:
virtual FWL_ERR SetWidgetPosition(IFWL_Widget *pWidget, FX_FLOAT fx, FX_FLOAT fy) = 0;
virtual FWL_ERR SetParentWidget(IFWL_Widget *pWidget, IFWL_Widget *pParent) = 0;
virtual FWL_ERR SetWidgetIcon(IFWL_Widget *pWidget, const CFX_DIBitmap *pIcon, FX_BOOL bBig) = 0;
- virtual FWL_ERR SetWidgetCaption(IFWL_Widget *pWidget, FX_WSTR wsCaption) = 0;
+ virtual FWL_ERR SetWidgetCaption(IFWL_Widget *pWidget, const CFX_WideStringC& wsCaption) = 0;
virtual FWL_ERR SetBorderRegion(IFWL_Widget *pWidget, CFX_Path *pPath) = 0;
virtual FWL_ERR SetTransparent(IFWL_Widget *pWidget, FX_DWORD dwAlpha) = 0;
virtual FWL_ERR ShowWidget(IFWL_Widget *pWidget) = 0;
diff --git a/xfa/include/fwl/adapter/fwl_sdadapterimp.h b/xfa/include/fwl/adapter/fwl_sdadapterimp.h
index ba14ae66c6..733a14da33 100644
--- a/xfa/include/fwl/adapter/fwl_sdadapterimp.h
+++ b/xfa/include/fwl/adapter/fwl_sdadapterimp.h
@@ -37,7 +37,7 @@ public:
public:
virtual FWL_ERR GetWidgetRect(IFWL_Widget *pWidget, CFX_RectF &rect);
virtual FWL_ERR SetWidgetIcon(IFWL_Widget *pWidget, const CFX_DIBitmap *pIcon, FX_BOOL bBig);
- virtual FWL_ERR SetWidgetCaption(IFWL_Widget *pWidget, FX_WSTR wsCaption);
+ virtual FWL_ERR SetWidgetCaption(IFWL_Widget *pWidget, const CFX_WideStringC& wsCaption);
virtual FWL_ERR SetBorderRegion(IFWL_Widget *pWidget, CFX_Path *pPath);
virtual FWL_ERR SetTransparent(IFWL_Widget *pWidget, FX_DWORD dwAlpha);
virtual FWL_ERR SetFullScreen(IFWL_Widget *pWidget, FX_BOOL bFullScreen);
diff --git a/xfa/include/fwl/basewidget/fwl_combobox.h b/xfa/include/fwl/basewidget/fwl_combobox.h
index 950189bbba..ddccd6bea3 100644
--- a/xfa/include/fwl/basewidget/fwl_combobox.h
+++ b/xfa/include/fwl/basewidget/fwl_combobox.h
@@ -112,8 +112,8 @@ public:
int32_t GetEditLimit();
FWL_ERR SetEditLimit(int32_t nLimit);
FWL_ERR EditDoClipboard(int32_t iCmd);
- FX_BOOL EditRedo(FX_BSTR bsRecord);
- FX_BOOL EditUndo(FX_BSTR bsRecord);
+ FX_BOOL EditRedo(const CFX_ByteStringC& bsRecord);
+ FX_BOOL EditUndo(const CFX_ByteStringC& bsRecord);
IFWL_ListBox* GetListBoxt();
FX_BOOL AfterFocusShowDropList();
FX_ERR OpenDropDownList(FX_BOOL bActivate);
diff --git a/xfa/include/fwl/basewidget/fwl_edit.h b/xfa/include/fwl/basewidget/fwl_edit.h
index ae8aea0bd3..82b0055322 100644
--- a/xfa/include/fwl/basewidget/fwl_edit.h
+++ b/xfa/include/fwl/basewidget/fwl_edit.h
@@ -144,8 +144,8 @@ public:
FX_BOOL Cut(CFX_WideString &wsCut);
FX_BOOL Paste(const CFX_WideString &wsPaste);
FX_BOOL Delete();
- FX_BOOL Redo(FX_BSTR bsRecord);
- FX_BOOL Undo(FX_BSTR bsRecord);
+ FX_BOOL Redo(const CFX_ByteStringC& bsRecord);
+ FX_BOOL Undo(const CFX_ByteStringC& bsRecord);
FX_BOOL Undo();
FX_BOOL Redo();
FX_BOOL CanUndo();
@@ -157,7 +157,7 @@ public:
FWL_ERR SetFont(const CFX_WideString &wsFont, FX_FLOAT fSize);
void SetScrollOffset(FX_FLOAT fScrollOffset);
FX_BOOL GetSuggestWords(CFX_PointF pointf, CFX_ByteStringArray &sSuggest);
- FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, FX_BSTR bsReplace);
+ FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, const CFX_ByteStringC& bsReplace);
protected:
IFWL_Edit();
virtual ~IFWL_Edit();
diff --git a/xfa/include/fwl/basewidget/fxmath_barcode.h b/xfa/include/fwl/basewidget/fxmath_barcode.h
index 3fcd341892..15babc8253 100644
--- a/xfa/include/fwl/basewidget/fxmath_barcode.h
+++ b/xfa/include/fwl/basewidget/fxmath_barcode.h
@@ -11,7 +11,7 @@ class IFX_Barcode
public:
virtual void Release() = 0;
virtual BC_TYPE GetType() = 0;
- virtual FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e) = 0;
+ virtual FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e) = 0;
virtual FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, int32_t &e) = 0;
virtual FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, int32_t &e) = 0;
virtual CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t height, int32_t &errorCode) = 0;
@@ -21,7 +21,7 @@ public:
virtual FX_BOOL SetModuleWidth(int32_t moduleWidth) = 0;
virtual FX_BOOL SetHeight(int32_t height) = 0;
virtual FX_BOOL SetWidth(int32_t width) = 0;
- virtual FX_BOOL CheckContentValidity(FX_WSTR contents) = 0;
+ virtual FX_BOOL CheckContentValidity(const CFX_WideStringC& contents) = 0;
virtual FX_BOOL SetPrintChecksum(FX_BOOL checksum) = 0;
virtual FX_BOOL SetDataLength(int32_t length) = 0;
virtual FX_BOOL SetCalChecksum(int32_t state) = 0;
diff --git a/xfa/include/fwl/core/fwl_app.h b/xfa/include/fwl/core/fwl_app.h
index b0cb1857e4..bc38db0854 100644
--- a/xfa/include/fwl/core/fwl_app.h
+++ b/xfa/include/fwl/core/fwl_app.h
@@ -29,7 +29,7 @@ void FWL_SetApp(IFWL_App *pApp);
IFWL_AdapterNative* FWL_GetAdapterNative();
IFWL_AdapterWidgetMgr* FWL_GetAdapterWidgetMgr();
IFWL_ThemeProvider* FWL_GetThemeProvider();
-extern FWL_ERR FWL_Execute(FX_WSTR wsExecutable, FX_WSTR wsParameters);
+extern FWL_ERR FWL_Execute(const CFX_WideStringC& wsExecutable, const CFX_WideStringC& wsParameters);
FWL_ERR FWL_SetFullScreen(IFWL_Widget *pWidget, FX_BOOL bFullScreen);
FX_BOOL FWL_AppIsActived();
#endif
diff --git a/xfa/include/fwl/core/fwl_note.h b/xfa/include/fwl/core/fwl_note.h
index c3dcead1e4..ea8328fffb 100644
--- a/xfa/include/fwl/core/fwl_note.h
+++ b/xfa/include/fwl/core/fwl_note.h
@@ -146,7 +146,7 @@ public:
{
return 0;
}
- virtual FX_BOOL IsInstance(FX_WSTR wsClass) const
+ virtual FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const
{
return TRUE;
}
diff --git a/xfa/include/fwl/core/fwl_target.h b/xfa/include/fwl/core/fwl_target.h
index d04a1f9c75..7ba7bf7cda 100644
--- a/xfa/include/fwl/core/fwl_target.h
+++ b/xfa/include/fwl/core/fwl_target.h
@@ -15,7 +15,7 @@ public:
FX_DWORD GetRefCount() const;
FWL_ERR GetClassName(CFX_WideString &wsClass) const;
FX_DWORD GetClassID() const;
- FX_BOOL IsInstance(FX_WSTR wsClass) const;
+ FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const;
FWL_ERR Initialize();
FWL_ERR Finalize();
protected:
diff --git a/xfa/include/fwl/lightwidget/checkbox.h b/xfa/include/fwl/lightwidget/checkbox.h
index ebad96fd8e..f06750821f 100644
--- a/xfa/include/fwl/lightwidget/checkbox.h
+++ b/xfa/include/fwl/lightwidget/checkbox.h
@@ -18,7 +18,7 @@ public:
FWL_ERR Initialize(const CFWL_WidgetProperties *pProperties = NULL);
FWL_ERR GetCaption(CFX_WideString &wsCaption);
- FWL_ERR SetCaption(FX_WSTR wsCaption);
+ FWL_ERR SetCaption(const CFX_WideStringC& wsCaption);
FWL_ERR SetBoxSize(FX_FLOAT fHeight);
int32_t GetCheckState();
FWL_ERR SetCheckState(int32_t iCheck);
diff --git a/xfa/include/fwl/lightwidget/combobox.h b/xfa/include/fwl/lightwidget/combobox.h
index fe1b5c4f25..fc09f63af0 100644
--- a/xfa/include/fwl/lightwidget/combobox.h
+++ b/xfa/include/fwl/lightwidget/combobox.h
@@ -17,15 +17,15 @@ class CFWL_ComboBox : public CFWL_Widget
public:
static CFWL_ComboBox* Create();
FWL_ERR Initialize(const CFWL_WidgetProperties *pProperties = NULL);
- int32_t AddString(FX_WSTR wsText);
- int32_t AddString(FX_WSTR wsText, CFX_DIBitmap *pIcon);
+ int32_t AddString(const CFX_WideStringC& wsText);
+ int32_t AddString(const CFX_WideStringC& wsText, CFX_DIBitmap *pIcon);
int32_t RemoveAt(int32_t iIndex);
int32_t RemoveAll();
int32_t CountItems();
FWL_ERR GetTextByIndex(int32_t iIndex, CFX_WideString &wsText);
int32_t GetCurSel();
FWL_ERR SetCurSel(int32_t iSel);
- FWL_ERR SetEditText(FX_WSTR wsText);
+ FWL_ERR SetEditText(const CFX_WideStringC& wsText);
int32_t GetEditTextLength() const;
FWL_ERR GetEditText(CFX_WideString &wsText, int32_t nStart = 0, int32_t nCount = -1) const ;
FWL_ERR SetEditSelRange(int32_t nStart, int32_t nCount = -1);
@@ -33,8 +33,8 @@ public:
int32_t GetEditLimit();
FWL_ERR SetEditLimit(int32_t nLimit);
FWL_ERR EditDoClipboard(int32_t iCmd);
- FX_BOOL EditRedo(FX_BSTR bsRecord);
- FX_BOOL EditUndo(FX_BSTR bsRecord);
+ FX_BOOL EditRedo(const CFX_ByteStringC& bsRecord);
+ FX_BOOL EditUndo(const CFX_ByteStringC& bsRecord);
FWL_ERR SetMaxListHeight(FX_FLOAT fMaxHeight);
FWL_ERR SetItemData(int32_t iIndex, void* pData);
void* GetItemData(int32_t iIndex);
diff --git a/xfa/include/fwl/lightwidget/datetimepicker.h b/xfa/include/fwl/lightwidget/datetimepicker.h
index 4af07a99bc..13d223cf8e 100644
--- a/xfa/include/fwl/lightwidget/datetimepicker.h
+++ b/xfa/include/fwl/lightwidget/datetimepicker.h
@@ -18,7 +18,7 @@ public:
FWL_ERR Initialize(const CFWL_WidgetProperties *pProperties = NULL);
FWL_ERR SetToday(int32_t iYear, int32_t iMonth, int32_t iDay);
FWL_ERR GetEditText(CFX_WideString &wsText);
- FWL_ERR SetEditText(FX_WSTR wsText);
+ FWL_ERR SetEditText(const CFX_WideStringC& wsText);
int32_t CountSelRanges();
int32_t GetSelRange(int32_t nIndex, int32_t &nStart);
FWL_ERR GetCurSel(int32_t &iYear, int32_t &iMonth, int32_t &iDay);
diff --git a/xfa/include/fwl/lightwidget/edit.h b/xfa/include/fwl/lightwidget/edit.h
index 94a4ac48e4..06c10728b0 100644
--- a/xfa/include/fwl/lightwidget/edit.h
+++ b/xfa/include/fwl/lightwidget/edit.h
@@ -34,8 +34,8 @@ public:
FWL_ERR ReplaceSelections(const CFX_WideStringC &wsReplace);
FWL_ERR Replace(int32_t nStart, int32_t nLen, const CFX_WideStringC &wsReplace);
FWL_ERR DoClipboard(int32_t iCmd);
- FX_BOOL Redo(FX_BSTR bsRecord);
- FX_BOOL Undo(FX_BSTR bsRecord);
+ FX_BOOL Redo(const CFX_ByteStringC& bsRecord);
+ FX_BOOL Undo(const CFX_ByteStringC& bsRecord);
FWL_ERR SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant);
FWL_ERR SetNumberRange(int32_t iMin, int32_t iMax);
FWL_ERR SetBackColor(FX_DWORD dwColor);
@@ -50,7 +50,7 @@ public:
FX_BOOL Delete();
void SetScrollOffset(FX_FLOAT fScrollOffset);
FX_BOOL GetSuggestWords(CFX_PointF pointf, CFX_ByteStringArray &sSuggest);
- FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, FX_BSTR bsReplace);
+ FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, const CFX_ByteStringC& bsReplace);
CFWL_Edit();
virtual ~CFWL_Edit();
};
diff --git a/xfa/include/fwl/lightwidget/listbox.h b/xfa/include/fwl/lightwidget/listbox.h
index 839bc18a9a..d095e0e5e3 100644
--- a/xfa/include/fwl/lightwidget/listbox.h
+++ b/xfa/include/fwl/lightwidget/listbox.h
@@ -17,7 +17,7 @@ public:
static CFWL_ListBox* Create();
FWL_ERR Initialize(const CFWL_WidgetProperties *pProperties = NULL);
FWL_ERR AddDIBitmap(CFX_DIBitmap * pDIB, FWL_HLISTITEM hItem);
- FWL_HLISTITEM AddString(FX_WSTR wsAdd, FX_BOOL bSelect = FALSE);
+ FWL_HLISTITEM AddString(const CFX_WideStringC& wsAdd, FX_BOOL bSelect = FALSE);
FX_BOOL DeleteString(FWL_HLISTITEM hItem);
FX_BOOL DeleteAll();
int32_t CountSelItems();
@@ -32,7 +32,7 @@ public:
FWL_ERR* Sort(IFWL_ListBoxCompare *pCom);
int32_t CountItems();
FWL_HLISTITEM GetItem(int32_t nIndex);
- FWL_ERR SetItemString(FWL_HLISTITEM hItem, FX_WSTR wsText);
+ FWL_ERR SetItemString(FWL_HLISTITEM hItem, const CFX_WideStringC& wsText);
FWL_ERR GetItemString(FWL_HLISTITEM hItem, CFX_WideString &wsText);
FWL_ERR SetItemData(FWL_HLISTITEM hItem, void* pData);
void* GetItemData(FWL_HLISTITEM hItem);
diff --git a/xfa/include/fwl/lightwidget/pushbutton.h b/xfa/include/fwl/lightwidget/pushbutton.h
index a7c2a13cfa..feb9450951 100644
--- a/xfa/include/fwl/lightwidget/pushbutton.h
+++ b/xfa/include/fwl/lightwidget/pushbutton.h
@@ -17,7 +17,7 @@ public:
static CFWL_PushButton* Create();
FWL_ERR Initialize(const CFWL_WidgetProperties *pProperties = NULL);
FWL_ERR GetCaption(CFX_WideString &wsCaption);
- FWL_ERR SetCaption(FX_WSTR wsCaption);
+ FWL_ERR SetCaption(const CFX_WideStringC& wsCaption);
CFX_DIBitmap* GetPicture();
FWL_ERR SetPicture(CFX_DIBitmap *pBitmap);
CFWL_PushButton();
diff --git a/xfa/include/fwl/lightwidget/tooltipctrl.h b/xfa/include/fwl/lightwidget/tooltipctrl.h
index 821e042533..703283963b 100644
--- a/xfa/include/fwl/lightwidget/tooltipctrl.h
+++ b/xfa/include/fwl/lightwidget/tooltipctrl.h
@@ -17,7 +17,7 @@ public:
static CFWL_ToolTip* Create();
FWL_ERR Initialize(const CFWL_WidgetProperties *pProperties = NULL);
FWL_ERR GetCaption(CFX_WideString &wsCaption);
- FWL_ERR SetCaption(FX_WSTR wsCaption);
+ FWL_ERR SetCaption(const CFX_WideStringC& wsCaption);
int32_t GetInitialDelay();
int32_t SetInitialDelay(int32_t nDelayTime);
int32_t GetAutoPopDelay();
diff --git a/xfa/include/fwl/lightwidget/widget.h b/xfa/include/fwl/lightwidget/widget.h
index b6bd62bb2a..8f1246ba41 100644
--- a/xfa/include/fwl/lightwidget/widget.h
+++ b/xfa/include/fwl/lightwidget/widget.h
@@ -44,7 +44,7 @@ public:
FX_DWORD GetRefCount() const;
FWL_ERR GetClassName(CFX_WideString &wsClass) const;
FX_DWORD GetClassID() const;
- virtual FX_BOOL IsInstance(FX_WSTR wsClass) const;
+ virtual FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const;
protected:
FWL_ERR Initialize(const CFWL_WidgetProperties *pProperties = NULL);
public:
diff --git a/xfa/include/fwl/theme/widgettp.h b/xfa/include/fwl/theme/widgettp.h
index 9d0578478e..6460b2bd57 100644
--- a/xfa/include/fwl/theme/widgettp.h
+++ b/xfa/include/fwl/theme/widgettp.h
@@ -96,8 +96,8 @@ class CFWL_FontData
public:
CFWL_FontData();
virtual ~CFWL_FontData();
- FX_BOOL Equal(FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage);
- FX_BOOL LoadFont(FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage);
+ FX_BOOL Equal(const CFX_WideStringC& wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage);
+ FX_BOOL LoadFont(const CFX_WideStringC& wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage);
IFX_Font* GetFont() const
{
return m_pFont;
@@ -117,7 +117,7 @@ class CFWL_FontManager
public:
CFWL_FontManager();
virtual ~CFWL_FontManager();
- IFX_Font* FindFont(FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD dwCodePage);
+ IFX_Font* FindFont(const CFX_WideStringC& wsFontFamily, FX_DWORD dwFontStyles, FX_WORD dwCodePage);
protected:
CFX_PtrArray m_arrFonts;
};
diff --git a/xfa/include/fxbarcode/BC_BarCode.h b/xfa/include/fxbarcode/BC_BarCode.h
index 29820c7ce7..a67653ee60 100644
--- a/xfa/include/fxbarcode/BC_BarCode.h
+++ b/xfa/include/fxbarcode/BC_BarCode.h
@@ -42,7 +42,7 @@ public:
CBC_CodeBase();
virtual ~CBC_CodeBase();
virtual BC_TYPE GetType() = 0;
- virtual FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e) = 0;
+ virtual FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e) = 0;
virtual FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, int32_t &e) = 0;
virtual FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, int32_t &e) = 0;
virtual CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t &e) = 0;
@@ -66,13 +66,13 @@ public:
CBC_OneCode();
virtual ~CBC_OneCode();
virtual BC_TYPE GetType() = 0;
- virtual FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e) = 0;
+ virtual FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e) = 0;
virtual FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, int32_t &e) = 0;
virtual FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, int32_t &e) = 0;
virtual CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t &e) = 0;
virtual CFX_WideString Decode(CFX_DIBitmap *pBitmap, int32_t &e) = 0;
- virtual FX_BOOL CheckContentValidity(FX_WSTR contents);
- virtual CFX_WideString FilterContents(FX_WSTR contents);
+ virtual FX_BOOL CheckContentValidity(const CFX_WideStringC& contents);
+ virtual CFX_WideString FilterContents(const CFX_WideStringC& contents);
virtual void SetPrintChecksum(FX_BOOL checksum);
virtual void SetDataLength(int32_t length);
virtual void SetCalChecksum(FX_BOOL calc);
@@ -88,7 +88,7 @@ public:
CBC_Code39(FX_BOOL usingCheckDigit);
CBC_Code39(FX_BOOL usingCheckDigit, FX_BOOL extendedMode);
virtual ~CBC_Code39();
- FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e);
+ FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e);
FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, int32_t &e);
FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, int32_t &e);
CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t &e);
@@ -107,7 +107,7 @@ class CBC_Codabar : public CBC_OneCode
public:
CBC_Codabar();
virtual ~CBC_Codabar();
- FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e);
+ FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e);
FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, int32_t &e);
FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, int32_t &e);
CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t &e);
@@ -130,7 +130,7 @@ private:
public:
CBC_Code128(BC_TYPE type);
virtual ~CBC_Code128();
- FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e);
+ FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e);
FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, int32_t &e);
FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, int32_t &e);
CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t &e);
@@ -148,7 +148,7 @@ class CBC_EAN8 : public CBC_OneCode
public:
CBC_EAN8();
virtual ~CBC_EAN8();
- FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e);
+ FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e);
FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, int32_t &e);
FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, int32_t &e);
CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t &e);
@@ -158,7 +158,7 @@ public:
return BC_EAN8;
}
private:
- CFX_WideString Preprocess(FX_WSTR contents);
+ CFX_WideString Preprocess(const CFX_WideStringC& contents);
CFX_WideString m_renderContents;
};
class CBC_EAN13 : public CBC_OneCode
@@ -166,7 +166,7 @@ class CBC_EAN13 : public CBC_OneCode
public:
CBC_EAN13();
virtual ~CBC_EAN13();
- FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e);
+ FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e);
FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, int32_t &e);
FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, int32_t &e);
CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t &e);
@@ -176,7 +176,7 @@ public:
return BC_EAN13;
}
private:
- CFX_WideString Preprocess(FX_WSTR contents);
+ CFX_WideString Preprocess(const CFX_WideStringC& contents);
CFX_WideString m_renderContents;
};
class CBC_UPCA : public CBC_OneCode
@@ -184,7 +184,7 @@ class CBC_UPCA : public CBC_OneCode
public:
CBC_UPCA();
virtual ~CBC_UPCA();
- FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e);
+ FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e);
FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, int32_t &e);
FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, int32_t &e);
CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t &e);
@@ -194,7 +194,7 @@ public:
return BC_UPCA;
}
private:
- CFX_WideString Preprocess(FX_WSTR contents);
+ CFX_WideString Preprocess(const CFX_WideStringC& contents);
CFX_WideString m_renderContents;
};
class CBC_QRCode : public CBC_CodeBase
@@ -202,7 +202,7 @@ class CBC_QRCode : public CBC_CodeBase
public:
CBC_QRCode();
virtual ~CBC_QRCode();
- FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e);
+ FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e);
FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, int32_t &e);
FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, int32_t &e);
CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t &e);
@@ -219,7 +219,7 @@ class CBC_PDF417I : public CBC_CodeBase
public:
CBC_PDF417I();
virtual ~CBC_PDF417I();
- FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e);
+ FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e);
FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, int32_t &e);
FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, int32_t &e);
CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t &e);
@@ -236,7 +236,7 @@ class CBC_DataMatrix : public CBC_CodeBase
public:
CBC_DataMatrix();
virtual ~CBC_DataMatrix();
- FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e);
+ FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e);
FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, int32_t &e);
FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, int32_t &e);
CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t &e);
diff --git a/xfa/include/fxfa/fxfa.h b/xfa/include/fxfa/fxfa.h
index a6cc5e1484..648b042c6f 100644
--- a/xfa/include/fxfa/fxfa.h
+++ b/xfa/include/fxfa/fxfa.h
@@ -217,15 +217,15 @@ public:
* @param[in] dwButtonType Button type, refer to XFA_MESSAGEBUTTON.
* @return A valid integer representing the value of the button pressed by the user, refer to XFA_ID.
*/
- virtual int32_t MsgBox(FX_WSTR wsMessage, FX_WSTR wsTitle = FX_WSTRC(L""),
+ virtual int32_t MsgBox(const CFX_WideStringC& wsMessage, const CFX_WideStringC& wsTitle = FX_WSTRC(L""),
FX_DWORD dwIconType = 0, FX_DWORD dwButtonType = 0) = 0;
/**
* Get a response from the user.
* @param[in] bMark - Mask the user input with * (asterisks) when true,
*/
- virtual void Response(CFX_WideString &wsAnswer, FX_WSTR wsQuestion, FX_WSTR wsTitle = FX_WSTRC(L""),
- FX_WSTR wsDefaultAnswer = FX_WSTRC(L""), FX_BOOL bMark = TRUE) = 0;
+ virtual void Response(CFX_WideString &wsAnswer, const CFX_WideStringC& wsQuestion, const CFX_WideStringC& wsTitle = FX_WSTRC(L""),
+ const CFX_WideStringC& wsDefaultAnswer = FX_WSTRC(L""), FX_BOOL bMark = TRUE) = 0;
virtual int32_t GetDocumentCountInBatch() = 0;
virtual int32_t GetCurDocumentInBatch() = 0;
@@ -234,7 +234,7 @@ public:
* Download something from somewhere.
* @param[in] wsURL - http, ftp, such as "http://www.w3.org/TR/REC-xml-names/".
*/
- virtual IFX_FileRead* DownloadURL(FX_WSTR wsURL) = 0;
+ virtual IFX_FileRead* DownloadURL(const CFX_WideStringC& wsURL) = 0;
/**
* POST data to the given url.
@@ -247,8 +247,8 @@ public:
* @param[out] wsResponse decoded response from server.
* @return TRUE Server permitted the post request, FALSE otherwise.
*/
- virtual FX_BOOL PostRequestURL(FX_WSTR wsURL, FX_WSTR wsData, FX_WSTR wsContentType,
- FX_WSTR wsEncode, FX_WSTR wsHeader, CFX_WideString &wsResponse) = 0;
+ virtual FX_BOOL PostRequestURL(const CFX_WideStringC& wsURL, const CFX_WideStringC& wsData, const CFX_WideStringC& wsContentType,
+ const CFX_WideStringC& wsEncode, const CFX_WideStringC& wsHeader, CFX_WideString &wsResponse) = 0;
/**
* PUT data to the given url.
@@ -257,10 +257,10 @@ public:
* @param[in] wsEncode the encode of data including UTF-8, UTF-16, ISO8859-1, any recognized [IANA]character encoding
* @return TRUE Server permitted the post request, FALSE otherwise.
*/
- virtual FX_BOOL PutRequestURL(FX_WSTR wsURL, FX_WSTR wsData, FX_WSTR wsEncode) = 0;
+ virtual FX_BOOL PutRequestURL(const CFX_WideStringC& wsURL, const CFX_WideStringC& wsData, const CFX_WideStringC& wsEncode) = 0;
virtual void LoadString(int32_t iStringID, CFX_WideString &wsString) = 0;
- virtual FX_BOOL ShowFileDialog(FX_WSTR wsTitle, FX_WSTR wsFilter, CFX_WideStringArray &wsPathArr, FX_BOOL bOpen = TRUE) = 0;
+ virtual FX_BOOL ShowFileDialog(const CFX_WideStringC& wsTitle, const CFX_WideStringC& wsFilter, CFX_WideStringArray &wsPathArr, FX_BOOL bOpen = TRUE) = 0;
virtual IFWL_AdapterTimerMgr* GetTimerMgr() = 0;
};
class IXFA_FontMgr
@@ -269,8 +269,8 @@ public:
static IXFA_FontMgr* CreateDefault();
virtual ~IXFA_FontMgr();
- virtual IFX_Font* GetFont(IXFA_Doc* hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF) = 0;
- virtual IFX_Font* GetDefaultFont(IXFA_Doc* hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF) = 0;
+ virtual IFX_Font* GetFont(IXFA_Doc* hDoc, const CFX_WideStringC& wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF) = 0;
+ virtual IFX_Font* GetDefaultFont(IXFA_Doc* hDoc, const CFX_WideStringC& wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF) = 0;
};
class IXFA_App
{
@@ -307,7 +307,7 @@ public:
virtual FX_BOOL Undo(IXFA_Widget* hWidget) = 0;
virtual FX_BOOL Redo(IXFA_Widget* hWidget) = 0;
virtual FX_BOOL GetSuggestWords(IXFA_Widget* hWidget, CFX_PointF pointf, CFX_ByteStringArray &sSuggest) = 0;
- virtual FX_BOOL ReplaceSpellCheckWord(IXFA_Widget* hWidget, CFX_PointF pointf, FX_BSTR bsReplace) = 0;
+ virtual FX_BOOL ReplaceSpellCheckWord(IXFA_Widget* hWidget, CFX_PointF pointf, const CFX_ByteStringC& bsReplace) = 0;
};
#define XFA_INVALIDATE_AllPages 0x00000000
#define XFA_INVALIDATE_CurrentPage 0x00000001
@@ -348,10 +348,10 @@ public:
virtual FX_BOOL IsCalculationsEnabled(IXFA_Doc* hDoc) = 0;
virtual void SetCalculationsEnabled(IXFA_Doc* hDoc, FX_BOOL bEnabled) = 0;
virtual void GetTitle(IXFA_Doc* hDoc, CFX_WideString &wsTitle) = 0;
- virtual void SetTitle(IXFA_Doc* hDoc, FX_WSTR wsTitle) = 0;
- virtual void ExportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath, FX_BOOL bXDP = TRUE) = 0;
- virtual void ImportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath) = 0;
- virtual void GotoURL(IXFA_Doc* hDoc, FX_WSTR bsURL, FX_BOOL bAppend = TRUE) = 0;
+ virtual void SetTitle(IXFA_Doc* hDoc, const CFX_WideStringC& wsTitle) = 0;
+ virtual void ExportData(IXFA_Doc* hDoc, const CFX_WideStringC& wsFilePath, FX_BOOL bXDP = TRUE) = 0;
+ virtual void ImportData(IXFA_Doc* hDoc, const CFX_WideStringC& wsFilePath) = 0;
+ virtual void GotoURL(IXFA_Doc* hDoc, const CFX_WideStringC& bsURL, FX_BOOL bAppend = TRUE) = 0;
virtual FX_BOOL IsValidationsEnabled(IXFA_Doc* hDoc) = 0;
virtual void SetValidationsEnabled(IXFA_Doc* hDoc, FX_BOOL bEnabled) = 0;
virtual void SetFocusWidget(IXFA_Doc* hDoc, IXFA_Widget* hWidget) = 0;
@@ -364,7 +364,7 @@ public:
{
return 0;
}
- virtual FX_BOOL Sign(IXFA_Doc* hDoc, CXFA_NodeList* pNodeList, FX_WSTR wsExpression, FX_WSTR wsXMLIdent, FX_WSTR wsValue = FX_WSTRC(L"open"), FX_BOOL bUsed = TRUE)
+ virtual FX_BOOL Sign(IXFA_Doc* hDoc, CXFA_NodeList* pNodeList, const CFX_WideStringC& wsExpression, const CFX_WideStringC& wsXMLIdent, const CFX_WideStringC& wsValue = FX_WSTRC(L"open"), FX_BOOL bUsed = TRUE)
{
return 0;
}
@@ -381,11 +381,11 @@ public:
virtual void AddDoRecord(IXFA_Widget* hWidget) = 0;
virtual FX_BOOL SubmitData(IXFA_Doc* hDoc, CXFA_Submit submit) = 0;
- virtual FX_BOOL CheckWord(IXFA_Doc* hDoc, FX_BSTR sWord) = 0;
- virtual FX_BOOL GetSuggestWords(IXFA_Doc* hDoc, FX_BSTR sWord, CFX_ByteStringArray& sSuggest) = 0;
- virtual FX_BOOL GetPDFScriptObject(IXFA_Doc* hDoc, FX_BSTR utf8Name, FXJSE_HVALUE hValue) = 0;
- virtual FX_BOOL GetGlobalProperty(IXFA_Doc* hDoc, FX_BSTR szPropName, FXJSE_HVALUE hValue) = 0;
- virtual FX_BOOL SetGlobalProperty(IXFA_Doc* hDoc, FX_BSTR szPropName, FXJSE_HVALUE hValue) = 0;
+ virtual FX_BOOL CheckWord(IXFA_Doc* hDoc, const CFX_ByteStringC& sWord) = 0;
+ virtual FX_BOOL GetSuggestWords(IXFA_Doc* hDoc, const CFX_ByteStringC& sWord, CFX_ByteStringArray& sSuggest) = 0;
+ virtual FX_BOOL GetPDFScriptObject(IXFA_Doc* hDoc, const CFX_ByteStringC& utf8Name, FXJSE_HVALUE hValue) = 0;
+ virtual FX_BOOL GetGlobalProperty(IXFA_Doc* hDoc, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue) = 0;
+ virtual FX_BOOL SetGlobalProperty(IXFA_Doc* hDoc, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue) = 0;
virtual CPDF_Document* OpenPDF(IXFA_Doc* hDoc, IFX_FileRead* pFile, FX_BOOL bTakeOverFile) = 0;
virtual IFX_FileRead* OpenLinkedFile(IXFA_Doc* hDoc, const CFX_WideString& wsLink) = 0;
};
@@ -418,14 +418,14 @@ public:
virtual int32_t CountPackages(IXFA_Doc* hDoc) = 0;
virtual void GetPackageName(IXFA_Doc* hDoc, int32_t iPackage, CFX_WideStringC &wsPackage) = 0;
- virtual FX_BOOL SavePackage(IXFA_Doc* hDoc, FX_WSTR wsPackage, IFX_FileWrite* pFile, IXFA_ChecksumContext *pCSContext = NULL) = 0;
+ virtual FX_BOOL SavePackage(IXFA_Doc* hDoc, const CFX_WideStringC& wsPackage, IFX_FileWrite* pFile, IXFA_ChecksumContext *pCSContext = NULL) = 0;
virtual FX_BOOL CloseDoc(IXFA_Doc* hDoc) = 0;
virtual FX_BOOL ImportData(IXFA_Doc* hDoc, IFX_FileRead* pStream, FX_BOOL bXDP = TRUE) = 0;
virtual void SetJSERuntime(IXFA_Doc* hDoc, FXJSE_HRUNTIME hRuntime) = 0;
virtual FXJSE_HVALUE GetXFAScriptObject(IXFA_Doc* hDoc) = 0;
virtual XFA_ATTRIBUTEENUM GetRestoreState(IXFA_Doc* hDoc) = 0;
- virtual FX_BOOL RunDocScript(IXFA_Doc* hDoc, XFA_SCRIPTTYPE eScriptType, FX_WSTR wsScript, FXJSE_HVALUE hRetValue, FXJSE_HVALUE hThisObject) = 0;
+ virtual FX_BOOL RunDocScript(IXFA_Doc* hDoc, XFA_SCRIPTTYPE eScriptType, const CFX_WideStringC& wsScript, FXJSE_HVALUE hRetValue, FXJSE_HVALUE hThisObject) = 0;
};
enum XFA_EVENTTYPE {
XFA_EVENT_Click,
@@ -537,8 +537,8 @@ public:
virtual void UpdateDocView() = 0;
virtual int32_t CountPageViews() = 0;
virtual IXFA_PageView* GetPageView(int32_t nIndex) = 0;
- virtual IXFA_Widget* GetWidgetByName(FX_WSTR wsName) = 0;
- virtual CXFA_WidgetAcc* GetWidgetAccByName(FX_WSTR wsName) = 0;
+ virtual IXFA_Widget* GetWidgetByName(const CFX_WideStringC& wsName) = 0;
+ virtual CXFA_WidgetAcc* GetWidgetAccByName(const CFX_WideStringC& wsName) = 0;
virtual void ResetWidgetData(CXFA_WidgetAcc* pWidgetAcc = NULL) = 0;
virtual int32_t ProcessWidgetEvent(CXFA_EventParam* pParam, CXFA_WidgetAcc* pWidgetAcc = NULL) = 0;
virtual IXFA_WidgetHandler* GetWidgetHandler() = 0;
diff --git a/xfa/include/fxfa/fxfa_basic.h b/xfa/include/fxfa/fxfa_basic.h
index b157fff24c..7b635e01e4 100644
--- a/xfa/include/fxfa/fxfa_basic.h
+++ b/xfa/include/fxfa/fxfa_basic.h
@@ -83,7 +83,7 @@ typedef struct _XFA_PACKETINFO {
FX_DWORD eFlags;
} XFA_PACKETINFO, * XFA_LPPACKETINFO;
typedef XFA_PACKETINFO const * XFA_LPCPACKETINFO;
-XFA_LPCPACKETINFO XFA_GetPacketByName(FX_WSTR wsName);
+XFA_LPCPACKETINFO XFA_GetPacketByName(const CFX_WideStringC& wsName);
XFA_LPCPACKETINFO XFA_GetPacketByID(FX_DWORD dwPacket);
extern const XFA_PACKETINFO g_XFAPacketData[];
inline XFA_LPCPACKETINFO XFA_GetPacketByIndex(XFA_PACKET ePacket)
@@ -927,7 +927,7 @@ typedef struct _XFA_ELEMENTINFO {
} XFA_ELEMENTINFO, * XFA_LPELEMENTINFO;
typedef XFA_ELEMENTINFO const * XFA_LPCELEMENTINFO;
int32_t XFA_GetElementCount();
-XFA_LPCELEMENTINFO XFA_GetElementByName(FX_WSTR wsName);
+XFA_LPCELEMENTINFO XFA_GetElementByName(const CFX_WideStringC& wsName);
XFA_LPCELEMENTINFO XFA_GetElementByID(XFA_ELEMENT eName);
enum XFA_ATTRIBUTETYPE {
XFA_ATTRIBUTETYPE_NOTSURE,
@@ -947,7 +947,7 @@ typedef struct _XFA_ATTRIBUTEINFO {
} XFA_ATTRIBUTEINFO, * XFA_LPATTRIBUTEINFO;
typedef XFA_ATTRIBUTEINFO const * XFA_LPCATTRIBUTEINFO;
int32_t XFA_GetAttributeCount();
-XFA_LPCATTRIBUTEINFO XFA_GetAttributeByName(FX_WSTR wsName);
+XFA_LPCATTRIBUTEINFO XFA_GetAttributeByName(const CFX_WideStringC& wsName);
XFA_LPCATTRIBUTEINFO XFA_GetAttributeByID(XFA_ATTRIBUTE eName);
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);
@@ -989,7 +989,7 @@ typedef struct _XFA_ATTRIBUTEENUMINFO {
XFA_ATTRIBUTEENUM eName;
} XFA_ATTRIBUTEENUMINFO, * XFA_LPATTRIBUTEENUMINFO;
typedef XFA_ATTRIBUTEENUMINFO const * XFA_LPCATTRIBUTEENUMINFO;
-XFA_LPCATTRIBUTEENUMINFO XFA_GetAttributeEnumByName(FX_WSTR wsName);
+XFA_LPCATTRIBUTEENUMINFO XFA_GetAttributeEnumByName(const CFX_WideStringC& wsName);
XFA_LPCATTRIBUTEENUMINFO XFA_GetAttributeEnumByID(XFA_ATTRIBUTEENUM eName);
enum XFA_UNIT {
XFA_UNIT_Unknown,
@@ -1006,7 +1006,7 @@ enum XFA_UNIT {
class CXFA_Measurement
{
public:
- void Set(FX_WSTR wsMeasure);
+ void Set(const CFX_WideStringC& wsMeasure);
void Set(FX_FLOAT fValue, XFA_UNIT eUnit)
{
m_fValue = fValue;
@@ -1032,7 +1032,7 @@ public:
{
Set(-1, XFA_UNIT_Unknown);
}
- CXFA_Measurement(FX_WSTR wsMeasure)
+ CXFA_Measurement(const CFX_WideStringC& wsMeasure)
{
Set(wsMeasure);
}
@@ -1040,7 +1040,7 @@ public:
{
Set(fValue, eUnit);
}
- static XFA_UNIT GetUnit(FX_WSTR wsUnit);
+ static XFA_UNIT GetUnit(const CFX_WideStringC& wsUnit);
protected:
FX_FLOAT m_fValue;
XFA_UNIT m_eUnit;
@@ -1055,7 +1055,7 @@ typedef struct _XFA_METHODINFO {
} XFA_METHODINFO, * XFA_LPMETHODINFO;
typedef XFA_METHODINFO const * XFA_LPCMETHODINFO;
int32_t XFA_GetMethodCount();
-XFA_LPCMETHODINFO XFA_GetMethodByName(XFA_ELEMENT eElement, FX_WSTR wsMethodName);
+XFA_LPCMETHODINFO XFA_GetMethodByName(XFA_ELEMENT eElement, const CFX_WideStringC& wsMethodName);
typedef void (CXFA_Object::*XFA_ATTRIBUTE_CALLBACK) (FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
enum XFA_SCRIPT_TYPE {
XFA_SCRIPT_Basic,
@@ -1069,5 +1069,5 @@ typedef struct _XFA_SCRIPTATTRIBUTEINFO {
FX_WORD eValueType;
} XFA_SCRIPTATTRIBUTEINFO, * XFA_LPSCRIPTATTRIBUTEINFO;
typedef XFA_SCRIPTATTRIBUTEINFO const * XFA_LPCSCRIPTATTRIBUTEINFO;
-XFA_LPCSCRIPTATTRIBUTEINFO XFA_GetScriptAttributeByName(XFA_ELEMENT eElement, FX_WSTR wsAttributeName);
+XFA_LPCSCRIPTATTRIBUTEINFO XFA_GetScriptAttributeByName(XFA_ELEMENT eElement, const CFX_WideStringC& wsAttributeName);
#endif
diff --git a/xfa/include/fxfa/fxfa_objectacc.h b/xfa/include/fxfa/fxfa_objectacc.h
index 888000805f..b09e37097b 100644
--- a/xfa/include/fxfa/fxfa_objectacc.h
+++ b/xfa/include/fxfa/fxfa_objectacc.h
@@ -421,8 +421,8 @@ public:
void GetPicture(CFX_WideString &wsPicture);
CXFA_Script GetScript();
protected:
- void GetMessageText(CFX_WideString &wsMessage, FX_WSTR wsMessageType);
- void SetMessageText(CFX_WideString &wsMessage, FX_WSTR wsMessageType);
+ void GetMessageText(CFX_WideString &wsMessage, const CFX_WideStringC& wsMessageType);
+ void SetMessageText(CFX_WideString &wsMessage, const CFX_WideStringC& wsMessageType);
FX_BOOL SetTestValue(int32_t iType, CFX_WideString &wsValue, XFA_ATTRIBUTEENUM eName);
};
class CXFA_Variables : public CXFA_Data
@@ -696,8 +696,8 @@ public:
void SetCheckState(XFA_CHECKSTATE eCheckState, FX_BOOL bNotify = TRUE);
CXFA_Node* GetExclGroupNode();
CXFA_Node* GetSelectedMember();
- CXFA_Node* SetSelectedMember(FX_WSTR wsName, FX_BOOL bNotify = TRUE);
- void SetSelectedMemberByValue(FX_WSTR wsValue,
+ CXFA_Node* SetSelectedMember(const CFX_WideStringC& wsName, FX_BOOL bNotify = TRUE);
+ void SetSelectedMemberByValue(const CFX_WideStringC& wsValue,
FX_BOOL bNotify = TRUE,
FX_BOOL bScriptModify = FALSE,
FX_BOOL bSyncData = TRUE);
@@ -723,8 +723,8 @@ public:
void ClearAllSelections();
void InsertItem(const CFX_WideString &wsLabel, const CFX_WideString &wsValue,
int32_t nIndex = -1, FX_BOOL bNotify = FALSE);
- void GetItemLabel(FX_WSTR wsValue, CFX_WideString &wsLabel);
- void GetItemValue(FX_WSTR wsLabel, CFX_WideString &wsValue);
+ void GetItemLabel(const CFX_WideStringC& wsValue, CFX_WideString &wsLabel);
+ void GetItemValue(const CFX_WideStringC& wsLabel, CFX_WideString &wsValue);
FX_BOOL DeleteItem(int32_t nIndex, FX_BOOL bNotify = FALSE,
FX_BOOL bScriptModify = FALSE, FX_BOOL bSyncData = TRUE);
int32_t GetHorizontalScrollPolicy();
@@ -734,8 +734,8 @@ public:
FX_BOOL GetPictureContent(CFX_WideString &wsPicture, XFA_VALUEPICTURE ePicture);
IFX_Locale* GetLocal();
FX_BOOL GetValue(CFX_WideString &wsValue, XFA_VALUEPICTURE eValueType);
- FX_BOOL GetNormalizeDataValue(FX_WSTR wsValue, CFX_WideString &wsNormalizeValue);
- FX_BOOL GetFormatDataValue(FX_WSTR wsValue, CFX_WideString &wsFormatedValue);
+ FX_BOOL GetNormalizeDataValue(const CFX_WideStringC& wsValue, CFX_WideString &wsNormalizeValue);
+ FX_BOOL GetFormatDataValue(const CFX_WideStringC& wsValue, CFX_WideString &wsFormatedValue);
void NormalizeNumStr(const CFX_WideString& wsValue, CFX_WideString& wsOutput);
CFX_WideString GetBarcodeType();
FX_BOOL GetBarcodeAttribute_CharEncoding(int32_t& val);
@@ -764,7 +764,7 @@ public:
FX_BOOL m_bPreNull;
protected:
void SyncValue(const CFX_WideString& wsValue, FX_BOOL bNotify);
- void InsertListTextItem(CXFA_Node* pItems, FX_WSTR wsText, int32_t nIndex = -1);
+ void InsertListTextItem(CXFA_Node* pItems, const CFX_WideStringC& wsText, int32_t nIndex = -1);
void FormatNumStr(const CFX_WideString& wsValue, IFX_Locale* pLocale, CFX_WideString& wsOutput);
CXFA_Node* m_pUiChildNode;
diff --git a/xfa/include/fxfa/fxfa_widget.h b/xfa/include/fxfa/fxfa_widget.h
index 21d007d7f1..72581ae232 100644
--- a/xfa/include/fxfa/fxfa_widget.h
+++ b/xfa/include/fxfa/fxfa_widget.h
@@ -33,7 +33,7 @@ public:
void ResetData();
- void SetImageEdit(FX_WSTR wsContentType, FX_WSTR wsHref, FX_WSTR wsData);
+ void SetImageEdit(const CFX_WideStringC& wsContentType, const CFX_WideStringC& wsHref, const CFX_WideStringC& wsData);
CXFA_WidgetAcc* GetExclGroup();
CXFA_FFDocView* GetDocView();
diff --git a/xfa/include/fxjse/fxjse.h b/xfa/include/fxjse/fxjse.h
index 56187158d5..368acd18ad 100644
--- a/xfa/include/fxjse/fxjse.h
+++ b/xfa/include/fxjse/fxjse.h
@@ -50,10 +50,10 @@ public:
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);
-typedef void (*FXJSE_PropAccessor) (FXJSE_HOBJECT hObject, FX_BSTR szPropName, FXJSE_HVALUE hValue);
-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 void (*FXJSE_FuncCallback) (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+typedef void (*FXJSE_PropAccessor) (FXJSE_HOBJECT hObject, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue);
+typedef int32_t(*FXJSE_PropTypeGetter) (FXJSE_HOBJECT hObject, const CFX_ByteStringC& szPropName, FX_BOOL bQueryIn);
+typedef FX_BOOL (*FXJSE_PropDeleter) (FXJSE_HOBJECT hObject, const CFX_ByteStringC& szPropName);
typedef struct _FXJSE_FUNCTION {
const FX_CHAR* name;
FXJSE_FuncCallback callbackProc;
@@ -84,7 +84,7 @@ typedef struct _FXJSE_CLASS {
FXJSE_FuncCallback dynMethodCall;
} FXJSE_CLASS;
FXJSE_HCLASS FXJSE_DefineClass(FXJSE_HCONTEXT hContext, const FXJSE_CLASS* lpClass);
-FXJSE_HCLASS FXJSE_GetClass(FXJSE_HCONTEXT hContext, FX_BSTR szName);
+FXJSE_HCLASS FXJSE_GetClass(FXJSE_HCONTEXT hContext, const CFX_ByteStringC& szName);
FXJSE_HVALUE FXJSE_Value_Create(FXJSE_HRUNTIME hRuntime);
void FXJSE_Value_Release(FXJSE_HVALUE hValue);
FXJSE_HRUNTIME FXJSE_Value_GetRuntime(FXJSE_HVALUE hValue);
@@ -107,7 +107,7 @@ 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);
-void FXJSE_Value_SetUTF8String (FXJSE_HVALUE hValue, FX_BSTR szString);
+void FXJSE_Value_SetUTF8String (FXJSE_HVALUE hValue, const CFX_ByteStringC& 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);
@@ -115,17 +115,17 @@ void FXJSE_Value_SetObject (FXJSE_HVALUE hValue, void* lpObject, FXJSE_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);
-FX_BOOL FXJSE_Value_GetObjectProp (FXJSE_HVALUE hValue, FX_BSTR szPropName, FXJSE_HVALUE hPropValue);
-FX_BOOL FXJSE_Value_SetObjectProp (FXJSE_HVALUE hValue, FX_BSTR szPropName, FXJSE_HVALUE hPropValue);
+FX_BOOL FXJSE_Value_GetObjectProp (FXJSE_HVALUE hValue, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hPropValue);
+FX_BOOL FXJSE_Value_SetObjectProp (FXJSE_HVALUE hValue, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hPropValue);
FX_BOOL FXJSE_Value_GetObjectPropByIdx (FXJSE_HVALUE hValue, uint32_t uPropIdx, FXJSE_HVALUE hPropValue);
FX_BOOL FXJSE_Value_SetObjectPropByIdx (FXJSE_HVALUE hValue, uint32_t uPropIdx, FXJSE_HVALUE hPropValue);
-FX_BOOL FXJSE_Value_DeleteObjectProp (FXJSE_HVALUE hValue, FX_BSTR szPropName);
-FX_BOOL FXJSE_Value_ObjectHasOwnProp (FXJSE_HVALUE hValue, FX_BSTR szPropName, FX_BOOL bUseTypeGetter);
-FX_BOOL FXJSE_Value_SetObjectOwnProp (FXJSE_HVALUE hValue, FX_BSTR szPropName, FXJSE_HVALUE hPropValue);
+FX_BOOL FXJSE_Value_DeleteObjectProp (FXJSE_HVALUE hValue, const CFX_ByteStringC& szPropName);
+FX_BOOL FXJSE_Value_ObjectHasOwnProp (FXJSE_HVALUE hValue, const CFX_ByteStringC& szPropName, FX_BOOL bUseTypeGetter);
+FX_BOOL FXJSE_Value_SetObjectOwnProp (FXJSE_HVALUE hValue, const CFX_ByteStringC& 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, const FX_CHAR* szScript, FXJSE_HVALUE hRetValue, FXJSE_HVALUE hNewThisObject = NULL);
-void FXJSE_ThrowMessage(FX_BSTR utf8Name, FX_BSTR utf8Message);
+void FXJSE_ThrowMessage(const CFX_ByteStringC& utf8Name, const CFX_ByteStringC& 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);
#endif
diff --git a/xfa/src/fdp/include/fde_css.h b/xfa/src/fdp/include/fde_css.h
index c55f6c471e..96d49250b9 100644
--- a/xfa/src/fdp/include/fde_css.h
+++ b/xfa/src/fdp/include/fde_css.h
@@ -475,9 +475,9 @@ public:
static IFDE_CSSStyleSheetCache* Create();
virtual void Release() = 0;
virtual void SetMaxItems(int32_t iMaxCount = 5) = 0;
- virtual void AddStyleSheet(FX_BSTR szKey, IFDE_CSSStyleSheet *pStyleSheet) = 0;
- virtual IFDE_CSSStyleSheet* GetStyleSheet(FX_BSTR szKey) const = 0;
- virtual void RemoveStyleSheet(FX_BSTR szKey) = 0;
+ virtual void AddStyleSheet(const CFX_ByteStringC& szKey, IFDE_CSSStyleSheet *pStyleSheet) = 0;
+ virtual IFDE_CSSStyleSheet* GetStyleSheet(const CFX_ByteStringC& szKey) const = 0;
+ virtual void RemoveStyleSheet(const CFX_ByteStringC& szKey) = 0;
};
enum FDE_CSSSYNTAXSTATUS {
FDE_CSSSYNTAXSTATUS_Error,
@@ -1036,7 +1036,7 @@ public:
virtual IFDE_CSSTableStyle* GetTableStyle() const = 0;
virtual IFDE_CSSGeneratedContentStyle* GetGeneratedContentStyle() const = 0;
virtual IFDE_CSSRubyStyle* GetRubyStyle() const = 0;
- virtual FX_BOOL GetCustomStyle(FX_WSTR wsName, CFX_WideString &wsValue) const = 0;
+ virtual FX_BOOL GetCustomStyle(const CFX_WideStringC& wsName, CFX_WideString &wsValue) const = 0;
};
enum FDE_CSSSTYLESHEETGROUP {
FDE_CSSSTYLESHEETGROUP_UserAgent,
diff --git a/xfa/src/fdp/src/css/fde_csscache.cpp b/xfa/src/fdp/src/css/fde_csscache.cpp
index 3c061082e2..b1207ae29e 100644
--- a/xfa/src/fdp/src/css/fde_csscache.cpp
+++ b/xfa/src/fdp/src/css/fde_csscache.cpp
@@ -42,7 +42,7 @@ CFDE_CSSStyleSheetCache::~CFDE_CSSStyleSheetCache()
m_pFixedStore->Release();
}
}
-void CFDE_CSSStyleSheetCache::AddStyleSheet(FX_BSTR szKey, IFDE_CSSStyleSheet *pStyleSheet)
+void CFDE_CSSStyleSheetCache::AddStyleSheet(const CFX_ByteStringC& szKey, IFDE_CSSStyleSheet *pStyleSheet)
{
FXSYS_assert(pStyleSheet != NULL);
if (m_pFixedStore == NULL) {
@@ -67,7 +67,7 @@ void CFDE_CSSStyleSheetCache::AddStyleSheet(FX_BSTR szKey, IFDE_CSSStyleSheet *p
m_Stylesheets.SetAt(szKey, pItem);
}
}
-IFDE_CSSStyleSheet* CFDE_CSSStyleSheetCache::GetStyleSheet(FX_BSTR szKey) const
+IFDE_CSSStyleSheet* CFDE_CSSStyleSheetCache::GetStyleSheet(const CFX_ByteStringC& szKey) const
{
void* pValue = NULL;
if (m_Stylesheets.Lookup(szKey, pValue)) {
@@ -78,7 +78,7 @@ IFDE_CSSStyleSheet* CFDE_CSSStyleSheetCache::GetStyleSheet(FX_BSTR szKey) const
}
return NULL;
}
-void CFDE_CSSStyleSheetCache::RemoveStyleSheet(FX_BSTR szKey)
+void CFDE_CSSStyleSheetCache::RemoveStyleSheet(const CFX_ByteStringC& szKey)
{
void* pValue = NULL;
if (!m_Stylesheets.Lookup(szKey, pValue)) {
diff --git a/xfa/src/fdp/src/css/fde_csscache.h b/xfa/src/fdp/src/css/fde_csscache.h
index 82c0e4f7e0..617009b398 100644
--- a/xfa/src/fdp/src/css/fde_csscache.h
+++ b/xfa/src/fdp/src/css/fde_csscache.h
@@ -28,9 +28,9 @@ public:
m_iMaxItems = iMaxCount;
}
- virtual void AddStyleSheet(FX_BSTR szKey, IFDE_CSSStyleSheet *pStyleSheet);
- virtual IFDE_CSSStyleSheet* GetStyleSheet(FX_BSTR szKey) const;
- virtual void RemoveStyleSheet(FX_BSTR szKey);
+ virtual void AddStyleSheet(const CFX_ByteStringC& szKey, IFDE_CSSStyleSheet *pStyleSheet);
+ virtual IFDE_CSSStyleSheet* GetStyleSheet(const CFX_ByteStringC& szKey) const;
+ virtual void RemoveStyleSheet(const CFX_ByteStringC& szKey);
protected:
void RemoveLowestActivityItem();
CFX_MapByteStringToPtr m_Stylesheets;
diff --git a/xfa/src/fdp/src/css/fde_cssstyleselector.h b/xfa/src/fdp/src/css/fde_cssstyleselector.h
index 36bf3f179d..9d1d02b333 100644
--- a/xfa/src/fdp/src/css/fde_cssstyleselector.h
+++ b/xfa/src/fdp/src/css/fde_cssstyleselector.h
@@ -411,7 +411,7 @@ public:
{
return (IFDE_CSSRubyStyle * const)this;
}
- virtual FX_BOOL GetCustomStyle(FX_WSTR wsName, CFX_WideString &wsValue) const
+ virtual FX_BOOL GetCustomStyle(const CFX_WideStringC& wsName, CFX_WideString &wsValue) const
{
for (int32_t i = m_CustomProperties.GetSize() - 2; i > -1; i -= 2) {
if (wsName == m_CustomProperties[i]) {
diff --git a/xfa/src/fee/include/ifde_txtedtengine.h b/xfa/src/fee/include/ifde_txtedtengine.h
index 4dcfa69cc8..0ee175380e 100644
--- a/xfa/src/fee/include/ifde_txtedtengine.h
+++ b/xfa/src/fee/include/ifde_txtedtengine.h
@@ -147,7 +147,7 @@ public:
virtual FX_BOOL On_PageLoad(IFDE_TxtEdtEngine * pEdit, int32_t nPageIndex, int32_t nPurpose) = 0;
virtual FX_BOOL On_PageUnload(IFDE_TxtEdtEngine * pEdit, int32_t nPageIndex, int32_t nPurpose) = 0;
virtual FX_BOOL On_PageChange(IFDE_TxtEdtEngine * pEdit, int32_t nPageIndex) = 0;
- virtual void On_AddDoRecord(IFDE_TxtEdtEngine * pEdit, FX_BSTR bsDoRecord) = 0;
+ virtual void On_AddDoRecord(IFDE_TxtEdtEngine * pEdit, const CFX_ByteStringC& bsDoRecord) = 0;
virtual FX_BOOL On_ValidateField(IFDE_TxtEdtEngine * pEdit, int32_t nBlockIndex, int32_t nFieldIndex, \
const CFX_WideString &wsFieldText, int32_t nCharIndex) = 0;
virtual FX_BOOL On_ValidateBlock(IFDE_TxtEdtEngine * pEdit, int32_t nBlockIndex) = 0;
@@ -210,8 +210,8 @@ public:
virtual int32_t GetSelRange(int32_t nIndex, int32_t &nStart) = 0;
virtual void ClearSelection() = 0;
- virtual FX_BOOL Redo(FX_BSTR bsRedo) = 0;
- virtual FX_BOOL Undo(FX_BSTR bsUndo) = 0;
+ virtual FX_BOOL Redo(const CFX_ByteStringC& bsRedo) = 0;
+ virtual FX_BOOL Undo(const CFX_ByteStringC& bsUndo) = 0;
virtual int32_t StartLayout() = 0;
virtual int32_t DoLayout(IFX_Pause *pPause) = 0;
diff --git a/xfa/src/fee/src/fee/fde_txtedtengine.cpp b/xfa/src/fee/src/fee/fde_txtedtengine.cpp
index 9546a2b270..1f4bd62f28 100644
--- a/xfa/src/fee/src/fee/fde_txtedtengine.cpp
+++ b/xfa/src/fee/src/fee/fde_txtedtengine.cpp
@@ -1033,7 +1033,7 @@ void CFDE_TxtEdtEngine::ClearSelection()
m_Param.pEventSink->On_SelChanged(this);
}
}
-FX_BOOL CFDE_TxtEdtEngine::Redo(FX_BSTR bsRedo)
+FX_BOOL CFDE_TxtEdtEngine::Redo(const CFX_ByteStringC& bsRedo)
{
if (IsLocked()) {
return FALSE;
@@ -1050,7 +1050,7 @@ FX_BOOL CFDE_TxtEdtEngine::Redo(FX_BSTR bsRedo)
pDoRecord->Release();
return bOK;
}
-FX_BOOL CFDE_TxtEdtEngine::Undo(FX_BSTR bsUndo)
+FX_BOOL CFDE_TxtEdtEngine::Undo(const CFX_ByteStringC& bsUndo)
{
if (IsLocked()) {
return FALSE;
@@ -2396,7 +2396,7 @@ void CFDE_TxtEdtEngine::DeleteSelect()
return;
}
}
-IFDE_TxtEdtDoRecord * IFDE_TxtEdtDoRecord::Create(FX_BSTR bsDoRecord)
+IFDE_TxtEdtDoRecord * IFDE_TxtEdtDoRecord::Create(const CFX_ByteStringC& bsDoRecord)
{
const FX_CHAR* lpBuf = bsDoRecord.GetCStr();
int32_t nType = *((int32_t*)lpBuf);
@@ -2418,7 +2418,7 @@ IFDE_TxtEdtDoRecord * IFDE_TxtEdtDoRecord::Create(FX_BSTR bsDoRecord)
}
return NULL;
}
-CFDE_TxtEdtDoRecord_Insert::CFDE_TxtEdtDoRecord_Insert(FX_BSTR bsDoRecord)
+CFDE_TxtEdtDoRecord_Insert::CFDE_TxtEdtDoRecord_Insert(const CFX_ByteStringC& bsDoRecord)
{
Deserialize(bsDoRecord);
}
@@ -2477,7 +2477,7 @@ void CFDE_TxtEdtDoRecord_Insert::Serialize(CFX_ByteString &bsDoRecord) const
FXSYS_memcpy(lpDstBuf, lpSrcBuf, nLength);
bsDoRecord.ReleaseBuffer(nLength);
}
-void CFDE_TxtEdtDoRecord_Insert::Deserialize(FX_BSTR bsDoRecord)
+void CFDE_TxtEdtDoRecord_Insert::Deserialize(const CFX_ByteStringC& bsDoRecord)
{
CFX_ArchiveLoader ArchiveLoader((const uint8_t*)bsDoRecord.GetCStr(), bsDoRecord.GetLength());
int32_t nType = 0;
@@ -2489,7 +2489,7 @@ void CFDE_TxtEdtDoRecord_Insert::Deserialize(FX_BSTR bsDoRecord)
ArchiveLoader >> m_nCaret;
ArchiveLoader >> m_wsInsert;
}
-CFDE_TxtEdtDoRecord_DeleteRange::CFDE_TxtEdtDoRecord_DeleteRange(FX_BSTR bsDoRecord)
+CFDE_TxtEdtDoRecord_DeleteRange::CFDE_TxtEdtDoRecord_DeleteRange(const CFX_ByteStringC& bsDoRecord)
{
Deserialize(bsDoRecord);
}
@@ -2557,7 +2557,7 @@ void CFDE_TxtEdtDoRecord_DeleteRange::Serialize(CFX_ByteString &bsDoRecord) cons
FXSYS_memcpy(lpDstBuf, lpSrcBuf, nLength);
bsDoRecord.ReleaseBuffer(nLength);
}
-void CFDE_TxtEdtDoRecord_DeleteRange::Deserialize(FX_BSTR bsDoRecord)
+void CFDE_TxtEdtDoRecord_DeleteRange::Deserialize(const CFX_ByteStringC& bsDoRecord)
{
CFX_ArchiveLoader ArchiveLoader((const uint8_t*)bsDoRecord.GetCStr(), bsDoRecord.GetLength());
int32_t nType = 0;
@@ -2572,7 +2572,7 @@ void CFDE_TxtEdtDoRecord_DeleteRange::Deserialize(FX_BSTR bsDoRecord)
ArchiveLoader >> m_wsRange;
}
#ifdef FDE_USEFORMATBLOCK
-CFDE_TxtEdtDoRecord_FieldInsert::CFDE_TxtEdtDoRecord_FieldInsert(FX_BSTR bsDoRecord)
+CFDE_TxtEdtDoRecord_FieldInsert::CFDE_TxtEdtDoRecord_FieldInsert(const CFX_ByteStringC& bsDoRecord)
{
Deserialize(bsDoRecord);
}
@@ -2649,7 +2649,7 @@ void CFDE_TxtEdtDoRecord_FieldInsert::Serialize(CFX_ByteString &bsDoRecord) cons
FXSYS_memcpy(lpDstBuf, lpSrcBuf, nLength);
bsDoRecord.ReleaseBuffer(nLength);
}
-void CFDE_TxtEdtDoRecord_FieldInsert::Deserialize(FX_BSTR bsDoRecord)
+void CFDE_TxtEdtDoRecord_FieldInsert::Deserialize(const CFX_ByteStringC& bsDoRecord)
{
CFX_ArchiveLoader ArchiveLoader((const uint8_t*)bsDoRecord.GetCStr(), bsDoRecord.GetLength());
int32_t nType = 0;
@@ -2669,7 +2669,7 @@ void CFDE_TxtEdtDoRecord_FieldInsert::Deserialize(FX_BSTR bsDoRecord)
ArchiveLoader >> m_wsIns;
ArchiveLoader >> m_bSel;
}
-CFDE_TxtEdtDoRecord_FieldDelete::CFDE_TxtEdtDoRecord_FieldDelete(FX_BSTR bsDoRecord)
+CFDE_TxtEdtDoRecord_FieldDelete::CFDE_TxtEdtDoRecord_FieldDelete(const CFX_ByteStringC& bsDoRecord)
{
Deserialize(bsDoRecord);
}
@@ -2746,7 +2746,7 @@ void CFDE_TxtEdtDoRecord_FieldDelete::Serialize(CFX_ByteString &bsDoRecord) cons
FXSYS_memcpy(lpDstBuf, lpSrcBuf, nLength);
bsDoRecord.ReleaseBuffer(nLength);
}
-void CFDE_TxtEdtDoRecord_FieldDelete::Deserialize(FX_BSTR bsDoRecord)
+void CFDE_TxtEdtDoRecord_FieldDelete::Deserialize(const CFX_ByteStringC& bsDoRecord)
{
CFX_ArchiveLoader ArchiveLoader((const uint8_t*)bsDoRecord.GetCStr(), bsDoRecord.GetLength());
int32_t nType = 0;
@@ -2766,7 +2766,7 @@ void CFDE_TxtEdtDoRecord_FieldDelete::Deserialize(FX_BSTR bsDoRecord)
ArchiveLoader >> m_wsDel;
ArchiveLoader >> m_bSel;
}
-CFDE_TxtEdtDoRecord_FieldReplace::CFDE_TxtEdtDoRecord_FieldReplace(FX_BSTR bsDoRecord)
+CFDE_TxtEdtDoRecord_FieldReplace::CFDE_TxtEdtDoRecord_FieldReplace(const CFX_ByteStringC& bsDoRecord)
{
Deserialize(bsDoRecord);
}
@@ -2847,7 +2847,7 @@ void CFDE_TxtEdtDoRecord_FieldReplace::Serialize(CFX_ByteString &bsDoRecord) con
FXSYS_memcpy(lpDstBuf, lpSrcBuf, nLength);
bsDoRecord.ReleaseBuffer(nLength);
}
-void CFDE_TxtEdtDoRecord_FieldReplace::Deserialize(FX_BSTR bsDoRecord)
+void CFDE_TxtEdtDoRecord_FieldReplace::Deserialize(const CFX_ByteStringC& bsDoRecord)
{
CFX_ArchiveLoader ArchiveLoader((const uint8_t*)bsDoRecord.GetCStr(), bsDoRecord.GetLength());
int32_t nType = 0;
diff --git a/xfa/src/fee/src/fee/fde_txtedtengine.h b/xfa/src/fee/src/fee/fde_txtedtengine.h
index 9b555131f6..c482f5b52c 100644
--- a/xfa/src/fee/src/fee/fde_txtedtengine.h
+++ b/xfa/src/fee/src/fee/fde_txtedtengine.h
@@ -29,7 +29,7 @@ class CFDE_TxtEdtDoRecord_FieldReplace;
class IFDE_TxtEdtDoRecord
{
public:
- static IFDE_TxtEdtDoRecord * Create(FX_BSTR bsDoRecord);
+ static IFDE_TxtEdtDoRecord * Create(const CFX_ByteStringC& bsDoRecord);
virtual void Release() = 0;
virtual FX_BOOL Redo() = 0;
virtual FX_BOOL Undo() = 0;
@@ -105,8 +105,8 @@ public:
virtual int32_t GetSelRange(int32_t nIndex, int32_t &nStart);
virtual void ClearSelection();
- virtual FX_BOOL Redo(FX_BSTR bsRedo);
- virtual FX_BOOL Undo(FX_BSTR bsUndo);
+ virtual FX_BOOL Redo(const CFX_ByteStringC& bsRedo);
+ virtual FX_BOOL Undo(const CFX_ByteStringC& bsUndo);
virtual int32_t StartLayout();
virtual int32_t DoLayout(IFX_Pause *pPause);
@@ -200,7 +200,7 @@ private:
class CFDE_TxtEdtDoRecord_Insert : public IFDE_TxtEdtDoRecord
{
public:
- CFDE_TxtEdtDoRecord_Insert(FX_BSTR bsDoRecord);
+ CFDE_TxtEdtDoRecord_Insert(const CFX_ByteStringC& bsDoRecord);
CFDE_TxtEdtDoRecord_Insert( CFDE_TxtEdtEngine * pEngine,
int32_t nCaret,
const FX_WCHAR* lpText,
@@ -211,7 +211,7 @@ public:
virtual void Serialize(CFX_ByteString &bsDoRecord) const;
protected:
~CFDE_TxtEdtDoRecord_Insert();
- void Deserialize(FX_BSTR bsDoRecord);
+ void Deserialize(const CFX_ByteStringC& bsDoRecord);
private:
CFDE_TxtEdtEngine * m_pEngine;
int32_t m_nCaret;
@@ -220,7 +220,7 @@ private:
class CFDE_TxtEdtDoRecord_DeleteRange : public IFDE_TxtEdtDoRecord
{
public:
- CFDE_TxtEdtDoRecord_DeleteRange(FX_BSTR bsDoRecord);
+ CFDE_TxtEdtDoRecord_DeleteRange(const CFX_ByteStringC& bsDoRecord);
CFDE_TxtEdtDoRecord_DeleteRange(CFDE_TxtEdtEngine * pEngine,
int32_t nIndex,
int32_t nCaret,
@@ -232,7 +232,7 @@ public:
virtual void Serialize(CFX_ByteString &bsDoRecord) const;
protected:
~CFDE_TxtEdtDoRecord_DeleteRange();
- void Deserialize(FX_BSTR bsDoRecord);
+ void Deserialize(const CFX_ByteStringC& bsDoRecord);
private:
CFDE_TxtEdtEngine * m_pEngine;
FX_BOOL m_bSel;
@@ -244,7 +244,7 @@ private:
class CFDE_TxtEdtDoRecord_FieldInsert : public IFDE_TxtEdtDoRecord
{
public:
- CFDE_TxtEdtDoRecord_FieldInsert(FX_BSTR bsDoRecord);
+ CFDE_TxtEdtDoRecord_FieldInsert(const CFX_ByteStringC& bsDoRecord);
CFDE_TxtEdtDoRecord_FieldInsert(CFDE_TxtEdtEngine * pEngine,
int32_t nCaret,
CFDE_TxtEdtField * pField,
@@ -260,7 +260,7 @@ public:
virtual void Serialize(CFX_ByteString &bsDoRecord) const;
protected:
~CFDE_TxtEdtDoRecord_FieldInsert();
- void Deserialize(FX_BSTR bsDoRecord);
+ void Deserialize(const CFX_ByteStringC& bsDoRecord);
private:
CFDE_TxtEdtEngine * m_pEngine;
@@ -276,7 +276,7 @@ private:
class CFDE_TxtEdtDoRecord_FieldDelete : public IFDE_TxtEdtDoRecord
{
public:
- CFDE_TxtEdtDoRecord_FieldDelete(FX_BSTR bsDoRecord);
+ CFDE_TxtEdtDoRecord_FieldDelete(const CFX_ByteStringC& bsDoRecord);
CFDE_TxtEdtDoRecord_FieldDelete(CFDE_TxtEdtEngine * pEngine,
int32_t nCaret,
CFDE_TxtEdtField * pField,
@@ -292,7 +292,7 @@ public:
virtual void Serialize(CFX_ByteString &bsDoRecord) const;
protected:
~CFDE_TxtEdtDoRecord_FieldDelete();
- void Deserialize(FX_BSTR bsDoRecord);
+ void Deserialize(const CFX_ByteStringC& bsDoRecord);
private:
CFDE_TxtEdtEngine * m_pEngine;
int32_t m_nCaret;
@@ -307,7 +307,7 @@ private:
class CFDE_TxtEdtDoRecord_FieldReplace : public IFDE_TxtEdtDoRecord
{
public:
- CFDE_TxtEdtDoRecord_FieldReplace(FX_BSTR bsDoRecord);
+ CFDE_TxtEdtDoRecord_FieldReplace(const CFX_ByteStringC& bsDoRecord);
CFDE_TxtEdtDoRecord_FieldReplace( CFDE_TxtEdtEngine * pEngine,
int32_t nCaret,
int32_t nNewCaret,
@@ -324,7 +324,7 @@ public:
virtual void Serialize(CFX_ByteString &bsDoRecord) const;
protected:
~CFDE_TxtEdtDoRecord_FieldReplace();
- void Deserialize(FX_BSTR bsDoRecord);
+ void Deserialize(const CFX_ByteStringC& bsDoRecord);
private:
CFDE_TxtEdtEngine * m_pEngine;
int32_t m_nCaret;
diff --git a/xfa/src/fgas/include/fx_locale.h b/xfa/src/fgas/include/fx_locale.h
index ef6b910b00..b377f981e4 100644
--- a/xfa/src/fgas/include/fx_locale.h
+++ b/xfa/src/fgas/include/fx_locale.h
@@ -77,12 +77,12 @@ public:
virtual FX_WORD GetDefLocaleID() = 0;
virtual IFX_Locale* GetDefLocale() = 0;
virtual IFX_Locale* GetLocale(FX_WORD lcid) = 0;
- virtual IFX_Locale* GetLocaleByName(FX_WSTR wsLocaleName) = 0;
+ virtual IFX_Locale* GetLocaleByName(const CFX_WideStringC& wsLocaleName) = 0;
};
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);
+FX_BOOL FX_TimeFromCanonical(const CFX_WideStringC& wsTime, CFX_Unitime& datetime, IFX_Locale* pLocale);
class IFX_FormatString
{
public:
@@ -117,8 +117,8 @@ public:
CFX_Decimal(int32_t val);
CFX_Decimal(int64_t val);
CFX_Decimal(FX_FLOAT val, uint8_t scale = 3);
- CFX_Decimal(FX_WSTR str);
- CFX_Decimal(FX_BSTR str);
+ CFX_Decimal(const CFX_WideStringC& str);
+ CFX_Decimal(const CFX_ByteStringC& str);
operator CFX_WideString() const;
operator double() const;
FX_BOOL operator == (const CFX_Decimal& val) const;
diff --git a/xfa/src/fgas/include/fx_sax.h b/xfa/src/fgas/include/fx_sax.h
index a6122c48e5..9d959e2321 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 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* OnTagEnter(const CFX_ByteStringC& bsTagName, FX_SAXNODE eType, FX_DWORD dwStartPos) = 0;
+ virtual void OnTagAttribute(void* pTag, const CFX_ByteStringC& bsAttri, const CFX_ByteStringC& 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 OnTagData(void* pTag, FX_SAXNODE eType, const CFX_ByteStringC& 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;
+ virtual void OnTagEnd(void* pTag, const CFX_ByteStringC& bsTagName, FX_DWORD dwEndPos) = 0;
+ virtual void OnTargetData(void* pTag, FX_SAXNODE eType, const CFX_ByteStringC& bsData, FX_DWORD dwStartPos) = 0;
};
class IFX_SAXReader
{
diff --git a/xfa/src/fgas/src/localization/fx_locale.cpp b/xfa/src/fgas/src/localization/fx_locale.cpp
index 8e564354a7..1ab98a2f5f 100644
--- a/xfa/src/fgas/src/localization/fx_locale.cpp
+++ b/xfa/src/fgas/src/localization/fx_locale.cpp
@@ -51,7 +51,7 @@ const static CFX_WideStringC gs_wsTextSymbols = FX_WSTRC(L"AXO09");
const static CFX_WideStringC gs_wsTimeSymbols = FX_WSTRC(L"hHkKMSFAzZ");
const static CFX_WideStringC gs_wsDateSymbols = FX_WSTRC(L"DJMEeGgYwW");
const static CFX_WideStringC gs_wsConstChars = FX_WSTRC(L",-:/. ");
-static FX_STRSIZE FX_Local_Find(FX_WSTR wsSymbols, FX_WCHAR ch, FX_STRSIZE nStart = 0)
+static FX_STRSIZE FX_Local_Find(const CFX_WideStringC& wsSymbols, FX_WCHAR ch, FX_STRSIZE nStart = 0)
{
FX_STRSIZE nLength = wsSymbols.GetLength();
if (nLength < 1 || nStart > nLength) {
@@ -79,7 +79,7 @@ CFX_WideString CFX_Locale::GetName()
{
return CFX_WideString();
}
-static CFX_WideString FX_GetXMLContent(FX_BSTR bsSpace, CXML_Element* pxmlElement, FX_BSTR bsTag, FX_WSTR wsName)
+static CFX_WideString FX_GetXMLContent(const CFX_ByteStringC& bsSpace, CXML_Element* pxmlElement, const CFX_ByteStringC& bsTag, const CFX_WideStringC& wsName)
{
CXML_Element* pDatePattern = NULL;
int32_t nCount = pxmlElement->CountElements(bsSpace, bsTag);
@@ -729,7 +729,7 @@ CFX_WideString CFX_FormatString::GetLocaleName(const CFX_WideString& wsPattern)
}
return CFX_WideString();
}
-IFX_Locale* CFX_FormatString::GetTextFormat(const CFX_WideString &wsPattern, FX_WSTR wsCategory, CFX_WideString& wsPurgePattern)
+IFX_Locale* CFX_FormatString::GetTextFormat(const CFX_WideString &wsPattern, const CFX_WideStringC& wsCategory, CFX_WideString& wsPurgePattern)
{
IFX_Locale* pLocale = NULL;
int32_t ccf = 0;
@@ -2887,7 +2887,7 @@ static int32_t FX_GetNumTrailingLimit(const CFX_WideString& wsFormat, int iDotPo
}
return iTreading;
}
-FX_BOOL CFX_FormatString::FormatStrNum(FX_WSTR wsInputNum, const CFX_WideString& wsPattern, CFX_WideString& wsOutput)
+FX_BOOL CFX_FormatString::FormatStrNum(const CFX_WideStringC& wsInputNum, const CFX_WideString& wsPattern, CFX_WideString& wsOutput)
{
if (wsInputNum.IsEmpty() || wsPattern.IsEmpty()) {
return FALSE;
@@ -3816,7 +3816,7 @@ FX_BOOL FX_DateFromCanonical(const CFX_WideString& wsDate, CFX_Unitime& datetime
datetime = datetime + ut;
return TRUE;
}
-FX_BOOL FX_TimeFromCanonical(FX_WSTR wsTime, CFX_Unitime& datetime, IFX_Locale* pLocale)
+FX_BOOL FX_TimeFromCanonical(const CFX_WideStringC& wsTime, CFX_Unitime& datetime, IFX_Locale* pLocale)
{
if (wsTime.GetLength() == 0) {
return FALSE;
@@ -4327,7 +4327,7 @@ FX_BOOL CFX_FormatString::FormatNull(const CFX_WideString& wsPattern, CFX_WideSt
}
return TRUE;
}
-IFX_Locale* CFX_FormatString::GetPatternLocale(FX_WSTR wsLocale)
+IFX_Locale* CFX_FormatString::GetPatternLocale(const CFX_WideStringC& wsLocale)
{
if (m_bUseLCID) {
}
@@ -4623,7 +4623,7 @@ CFX_Decimal::CFX_Decimal(FX_FLOAT val, uint8_t scale )
m_uLo = (uint32_t)plo;
m_uFlags = FXMATH_DECIMAL_MAKEFLAGS(val < 0 && IsNotZero(), scale);
}
-CFX_Decimal::CFX_Decimal(FX_WSTR strObj)
+CFX_Decimal::CFX_Decimal(const CFX_WideStringC& strObj)
{
const FX_WCHAR* str = strObj.GetPtr();
const FX_WCHAR* strBound = str + strObj.GetLength();
@@ -4659,7 +4659,7 @@ cont:
}
m_uFlags = FXMATH_DECIMAL_MAKEFLAGS(negmet && IsNotZero(), scale);
}
-CFX_Decimal::CFX_Decimal(FX_BSTR strObj)
+CFX_Decimal::CFX_Decimal(const CFX_ByteStringC& strObj)
{
CFX_WideString wstrObj;
wstrObj.ConvertFrom(strObj);
diff --git a/xfa/src/fgas/src/localization/fx_localeimp.h b/xfa/src/fgas/src/localization/fx_localeimp.h
index 8dfec2e862..43d8592ae7 100644
--- a/xfa/src/fgas/src/localization/fx_localeimp.h
+++ b/xfa/src/fgas/src/localization/fx_localeimp.h
@@ -62,12 +62,12 @@ public:
virtual FX_BOOL FormatNull(const CFX_WideString& wsPattern, CFX_WideString& wsOutput);
protected:
virtual ~CFX_FormatString();
- IFX_Locale* GetTextFormat(const CFX_WideString &wsPattern, FX_WSTR wsCategory, CFX_WideString& wsPurgePattern);
+ IFX_Locale* GetTextFormat(const CFX_WideString &wsPattern, const CFX_WideStringC& wsCategory, CFX_WideString& wsPurgePattern);
IFX_Locale* GetNumericFormat(const CFX_WideString& wsPattern, int32_t& iDotIndex, FX_DWORD& dwStyle, CFX_WideString& wsPurgePattern);
- FX_BOOL FormatStrNum(FX_WSTR wsInputNum, const CFX_WideString& wsPattern, CFX_WideString& wsOutput);
+ FX_BOOL FormatStrNum(const CFX_WideStringC& wsInputNum, const CFX_WideString& wsPattern, CFX_WideString& wsOutput);
FX_BOOL FormatLCNumeric(CFX_LCNumeric& lcNum, const CFX_WideString& wsPattern, CFX_WideString& wsOutput);
FX_DATETIMETYPE GetDateTimeFormat(const CFX_WideString& wsPattern, IFX_Locale*& pLocale, CFX_WideString &wsDatePattern, CFX_WideString &wsTimePattern);
- IFX_Locale* GetPatternLocale(FX_WSTR wsLocale);
+ IFX_Locale* GetPatternLocale(const CFX_WideStringC& wsLocale);
IFX_LocaleMgr* m_pLocaleMgr;
FX_BOOL m_bUseLCID;
};
diff --git a/xfa/src/fgas/src/localization/fx_localemgr.cpp b/xfa/src/fgas/src/localization/fx_localemgr.cpp
index 0623fe1789..ebdd4b89a9 100644
--- a/xfa/src/fgas/src/localization/fx_localemgr.cpp
+++ b/xfa/src/fgas/src/localization/fx_localemgr.cpp
@@ -94,7 +94,7 @@ IFX_Locale* CFX_LocaleMgr::GetLocale(FX_WORD lcid)
}
return pLocale;
}
-IFX_Locale* CFX_LocaleMgr::GetLocaleByName(FX_WSTR wsLocaleName)
+IFX_Locale* CFX_LocaleMgr::GetLocaleByName(const CFX_WideStringC& wsLocaleName)
{
return NULL;
}
diff --git a/xfa/src/fgas/src/localization/fx_localemgr.h b/xfa/src/fgas/src/localization/fx_localemgr.h
index 5e995b2e1b..fbfdf12b0e 100644
--- a/xfa/src/fgas/src/localization/fx_localemgr.h
+++ b/xfa/src/fgas/src/localization/fx_localemgr.h
@@ -17,7 +17,7 @@ public:
virtual FX_WORD GetDefLocaleID();
virtual IFX_Locale* GetDefLocale();
virtual IFX_Locale* GetLocale(FX_WORD lcid);
- virtual IFX_Locale* GetLocaleByName(FX_WSTR wsLocaleName);
+ virtual IFX_Locale* GetLocaleByName(const CFX_WideStringC& wsLocaleName);
CFX_MapPtrToPtr m_lcid2xml;
protected:
~CFX_LocaleMgr();
diff --git a/xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp b/xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp
index 7c489d2dee..6ca86e7d4a 100644
--- a/xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp
+++ b/xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp
@@ -85,11 +85,11 @@ FWL_ERR IFWL_ComboBox::EditDoClipboard(int32_t iCmd)
{
return ((CFWL_ComboBoxImp*)m_pData)->EditDoClipboard(iCmd);
}
-FX_BOOL IFWL_ComboBox::EditRedo(FX_BSTR bsRecord)
+FX_BOOL IFWL_ComboBox::EditRedo(const CFX_ByteStringC& bsRecord)
{
return ((CFWL_ComboBoxImp*)m_pData)->EditRedo(bsRecord);
}
-FX_BOOL IFWL_ComboBox::EditUndo(FX_BSTR bsRecord)
+FX_BOOL IFWL_ComboBox::EditUndo(const CFX_ByteStringC& bsRecord)
{
return ((CFWL_ComboBoxImp*)m_pData)->EditUndo(bsRecord);
}
@@ -867,12 +867,12 @@ FWL_ERR CFWL_ComboBoxImp::EditDoClipboard(int32_t iCmd)
_FWL_RETURN_VALUE_IF_FAIL(m_pEdit, FWL_ERR_Indefinite);
return m_pEdit->DoClipboard(iCmd);
}
-FX_BOOL CFWL_ComboBoxImp::EditRedo(FX_BSTR bsRecord)
+FX_BOOL CFWL_ComboBoxImp::EditRedo(const CFX_ByteStringC& bsRecord)
{
_FWL_RETURN_VALUE_IF_FAIL(m_pEdit, FALSE);
return m_pEdit->Redo(bsRecord);
}
-FX_BOOL CFWL_ComboBoxImp::EditUndo(FX_BSTR bsRecord)
+FX_BOOL CFWL_ComboBoxImp::EditUndo(const CFX_ByteStringC& bsRecord)
{
_FWL_RETURN_VALUE_IF_FAIL(m_pEdit, FALSE);
return m_pEdit->Undo(bsRecord);
diff --git a/xfa/src/fwl/src/basewidget/fwl_editimp.cpp b/xfa/src/fwl/src/basewidget/fwl_editimp.cpp
index a8c1655ec8..b161f82960 100644
--- a/xfa/src/fwl/src/basewidget/fwl_editimp.cpp
+++ b/xfa/src/fwl/src/basewidget/fwl_editimp.cpp
@@ -137,11 +137,11 @@ FX_BOOL IFWL_Edit::Delete()
{
return ((CFWL_EditImp*)m_pData)->Delete();
}
-FX_BOOL IFWL_Edit::Redo(FX_BSTR bsRecord)
+FX_BOOL IFWL_Edit::Redo(const CFX_ByteStringC& bsRecord)
{
return ((CFWL_EditImp*)m_pData)->Redo(bsRecord);
}
-FX_BOOL IFWL_Edit::Undo(FX_BSTR bsRecord)
+FX_BOOL IFWL_Edit::Undo(const CFX_ByteStringC& bsRecord)
{
return ((CFWL_EditImp*)m_pData)->Undo(bsRecord);
}
@@ -189,7 +189,7 @@ FX_BOOL IFWL_Edit::GetSuggestWords(CFX_PointF pointf, CFX_ByteStringArray &sSugg
{
return ((CFWL_EditImp*)m_pData)->GetSuggestWords(pointf, sSuggest);
}
-FX_BOOL IFWL_Edit::ReplaceSpellCheckWord(CFX_PointF pointf, FX_BSTR bsReplace)
+FX_BOOL IFWL_Edit::ReplaceSpellCheckWord(CFX_PointF pointf, const CFX_ByteStringC& bsReplace)
{
return ((CFWL_EditImp*)m_pData)->ReplaceSpellCheckWord(pointf, bsReplace);
}
@@ -463,7 +463,7 @@ FX_BOOL CFWL_EditImp::GetSuggestWords(CFX_PointF pointf, CFX_ByteStringArray &sS
DispatchEvent(&checkWordEvent);
return suggestWordsEvent.bSuggestWords;
}
-FX_BOOL CFWL_EditImp::ReplaceSpellCheckWord(CFX_PointF pointf, FX_BSTR bsReplace)
+FX_BOOL CFWL_EditImp::ReplaceSpellCheckWord(CFX_PointF pointf, const CFX_ByteStringC& bsReplace)
{
int32_t nWordCount = 0;
int32_t nWordStart = GetWordAtPoint(pointf, nWordCount);
@@ -820,7 +820,7 @@ FX_BOOL CFWL_EditImp::Delete()
m_pEdtEngine->Delete(0);
return TRUE;
}
-FX_BOOL CFWL_EditImp::Redo(FX_BSTR bsRecord)
+FX_BOOL CFWL_EditImp::Redo(const CFX_ByteStringC& bsRecord)
{
_FWL_RETURN_VALUE_IF_FAIL(m_pEdtEngine, FALSE);
if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_NoRedoUndo) {
@@ -828,7 +828,7 @@ FX_BOOL CFWL_EditImp::Redo(FX_BSTR bsRecord)
}
return m_pEdtEngine->Redo(bsRecord);
}
-FX_BOOL CFWL_EditImp::Undo(FX_BSTR bsRecord)
+FX_BOOL CFWL_EditImp::Undo(const CFX_ByteStringC& bsRecord)
{
_FWL_RETURN_VALUE_IF_FAIL(m_pEdtEngine, FALSE);
if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_NoRedoUndo) {
@@ -989,7 +989,7 @@ FX_BOOL CFWL_EditImp::On_PageUnload(IFDE_TxtEdtEngine *pEdit, int32_t nPageIndex
pPage->UnloadPage();
return TRUE;
}
-void CFWL_EditImp::On_AddDoRecord(IFDE_TxtEdtEngine *pEdit, FX_BSTR bsDoRecord)
+void CFWL_EditImp::On_AddDoRecord(IFDE_TxtEdtEngine *pEdit, const CFX_ByteStringC& bsDoRecord)
{
AddDoRecord(bsDoRecord);
CFWL_WidgetImp *pSrcTarget = GetRootOuter();
@@ -1533,7 +1533,7 @@ FX_BOOL CFWL_EditImp::IsContentHeightOverflow()
_FWL_RETURN_VALUE_IF_FAIL(pPage, FALSE);
return pPage->GetContentsBox().height > m_rtEngine.height + 1.0f;
}
-int32_t CFWL_EditImp::AddDoRecord(FX_BSTR bsDoRecord)
+int32_t CFWL_EditImp::AddDoRecord(const CFX_ByteStringC& bsDoRecord)
{
int32_t nCount = m_RecordArr.GetSize();
if (m_iCurRecord == nCount - 1) {
diff --git a/xfa/src/fwl/src/basewidget/fwl_formproxyimp.cpp b/xfa/src/fwl/src/basewidget/fwl_formproxyimp.cpp
index 66714fcec7..6ecfeeeb0f 100644
--- a/xfa/src/fwl/src/basewidget/fwl_formproxyimp.cpp
+++ b/xfa/src/fwl/src/basewidget/fwl_formproxyimp.cpp
@@ -31,7 +31,7 @@ FX_DWORD CFWL_FormProxyImp::GetClassID() const
{
return FWL_CLASSHASH_FormProxy;
}
-FX_BOOL CFWL_FormProxyImp::IsInstance(FX_WSTR wsClass) const
+FX_BOOL CFWL_FormProxyImp::IsInstance(const CFX_WideStringC& wsClass) const
{
if (wsClass == CFX_WideStringC(FWL_CLASS_FormProxy)) {
return TRUE;
diff --git a/xfa/src/fwl/src/basewidget/fxmath_barcodeimp.cpp b/xfa/src/fwl/src/basewidget/fxmath_barcodeimp.cpp
index 7996a882f5..caa811a345 100644
--- a/xfa/src/fwl/src/basewidget/fxmath_barcodeimp.cpp
+++ b/xfa/src/fwl/src/basewidget/fxmath_barcodeimp.cpp
@@ -79,7 +79,7 @@ FX_BOOL CFX_Barcode::SetWidth(int32_t width)
{
return m_pBCEngine ? m_pBCEngine->SetWidth(width) : FALSE;
}
-FX_BOOL CFX_Barcode::CheckContentValidity(FX_WSTR contents)
+FX_BOOL CFX_Barcode::CheckContentValidity(const CFX_WideStringC& contents)
{
switch(GetType()) {
case BC_CODE39:
@@ -336,7 +336,7 @@ FX_BOOL CFX_Barcode::SetTruncated(FX_BOOL truncated)
#ifndef BCExceptionUnSupportedBarcode
#define BCExceptionUnSupportedBarcode 18
#endif
-FX_BOOL CFX_Barcode::Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e)
+FX_BOOL CFX_Barcode::Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e)
{
if(!m_pBCEngine) {
return FALSE;
diff --git a/xfa/src/fwl/src/basewidget/include/fwl_comboboximp.h b/xfa/src/fwl/src/basewidget/include/fwl_comboboximp.h
index 5046cdf47b..059e657182 100644
--- a/xfa/src/fwl/src/basewidget/include/fwl_comboboximp.h
+++ b/xfa/src/fwl/src/basewidget/include/fwl_comboboximp.h
@@ -103,8 +103,8 @@ public:
virtual int32_t GetEditLimit();
virtual FWL_ERR SetEditLimit(int32_t nLimit);
virtual FWL_ERR EditDoClipboard(int32_t iCmd);
- virtual FX_BOOL EditRedo(FX_BSTR bsRecord);
- virtual FX_BOOL EditUndo(FX_BSTR bsRecord);
+ virtual FX_BOOL EditRedo(const CFX_ByteStringC& bsRecord);
+ virtual FX_BOOL EditUndo(const CFX_ByteStringC& bsRecord);
virtual IFWL_ListBox* GetListBoxt();
virtual FX_BOOL AfterFocusShowDropList();
virtual FX_ERR OpenDropDownList(FX_BOOL bActivate);
diff --git a/xfa/src/fwl/src/basewidget/include/fwl_editimp.h b/xfa/src/fwl/src/basewidget/include/fwl_editimp.h
index e06cfa8d67..3f5f7c0218 100644
--- a/xfa/src/fwl/src/basewidget/include/fwl_editimp.h
+++ b/xfa/src/fwl/src/basewidget/include/fwl_editimp.h
@@ -55,8 +55,8 @@ public:
virtual FX_BOOL Cut(CFX_WideString &wsCut);
virtual FX_BOOL Paste(const CFX_WideString &wsPaste);
virtual FX_BOOL Delete();
- virtual FX_BOOL Redo(FX_BSTR bsRecord);
- virtual FX_BOOL Undo(FX_BSTR bsRecord);
+ virtual FX_BOOL Redo(const CFX_ByteStringC& bsRecord);
+ virtual FX_BOOL Undo(const CFX_ByteStringC& bsRecord);
virtual FX_BOOL Undo();
virtual FX_BOOL Redo();
virtual FX_BOOL CanUndo();
@@ -74,7 +74,7 @@ public:
{
return TRUE;
}
- virtual void On_AddDoRecord(IFDE_TxtEdtEngine *pEdit, FX_BSTR bsDoRecord);
+ virtual void On_AddDoRecord(IFDE_TxtEdtEngine *pEdit, const CFX_ByteStringC& bsDoRecord);
virtual FX_BOOL On_ValidateField(IFDE_TxtEdtEngine *pEdit, int32_t nBlockIndex, int32_t nFieldIndex, \
const CFX_WideString &wsFieldText, int32_t nCharIndex);
virtual FX_BOOL On_ValidateBlock(IFDE_TxtEdtEngine *pEdit, int32_t nBlockIndex);
@@ -84,7 +84,7 @@ public:
virtual FWL_ERR SetFont(const CFX_WideString &wsFont, FX_FLOAT fSize);
void SetScrollOffset(FX_FLOAT fScrollOffset);
FX_BOOL GetSuggestWords(CFX_PointF pointf, CFX_ByteStringArray &sSuggest);
- FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, FX_BSTR bsReplace);
+ FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, const CFX_ByteStringC& bsReplace);
protected:
void DrawTextBk(CFX_Graphics *pGraphics, IFWL_ThemeProvider *pTheme, const CFX_Matrix *pMatrix = NULL);
void DrawContent(CFX_Graphics *pGraphics, IFWL_ThemeProvider *pTheme, const CFX_Matrix *pMatrix = NULL);
@@ -107,7 +107,7 @@ protected:
void ClearRecord();
FX_BOOL IsShowScrollBar(FX_BOOL bVert);
FX_BOOL IsContentHeightOverflow();
- int32_t AddDoRecord(FX_BSTR bsDoRecord);
+ int32_t AddDoRecord(const CFX_ByteStringC& bsDoRecord);
void ProcessInsertError(int32_t iError);
void DrawSpellCheck(CFX_Graphics *pGraphics, const CFX_Matrix *pMatrix = NULL);
diff --git a/xfa/src/fwl/src/basewidget/include/fwl_formproxyimp.h b/xfa/src/fwl/src/basewidget/include/fwl_formproxyimp.h
index e582f8c0e6..30d2c1f21f 100644
--- a/xfa/src/fwl/src/basewidget/include/fwl_formproxyimp.h
+++ b/xfa/src/fwl/src/basewidget/include/fwl_formproxyimp.h
@@ -20,7 +20,7 @@ public:
~CFWL_FormProxyImp();
virtual FWL_ERR GetClassName(CFX_WideString &wsClass) const;
virtual FX_DWORD GetClassID() const;
- virtual FX_BOOL IsInstance(FX_WSTR wsClass) const;
+ virtual FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const;
virtual FWL_ERR Initialize();
virtual FWL_ERR Finalize();
virtual FWL_ERR Update();
diff --git a/xfa/src/fwl/src/basewidget/include/fxmath_barcodeimp.h b/xfa/src/fwl/src/basewidget/include/fxmath_barcodeimp.h
index 0c4e38dd9e..ea8be75702 100644
--- a/xfa/src/fwl/src/basewidget/include/fxmath_barcodeimp.h
+++ b/xfa/src/fwl/src/basewidget/include/fxmath_barcodeimp.h
@@ -14,7 +14,7 @@ public:
FX_BOOL Crreate(BC_TYPE type);
virtual void Release();
virtual BC_TYPE GetType();
- virtual FX_BOOL Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e);
+ virtual FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e);
virtual FX_BOOL RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matirx, int32_t &e);
virtual FX_BOOL RenderBitmap(CFX_DIBitmap *&pOutBitmap, int32_t &e);
virtual CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t height, int32_t &errorCode);
@@ -24,7 +24,7 @@ public:
virtual FX_BOOL SetModuleWidth(int32_t moduleWidth);
virtual FX_BOOL SetHeight(int32_t height);
virtual FX_BOOL SetWidth(int32_t width);
- virtual FX_BOOL CheckContentValidity(FX_WSTR contents);
+ virtual FX_BOOL CheckContentValidity(const CFX_WideStringC& contents);
virtual FX_BOOL SetPrintChecksum(FX_BOOL checksum);
virtual FX_BOOL SetDataLength(int32_t length);
virtual FX_BOOL SetCalChecksum(int32_t state);
diff --git a/xfa/src/fwl/src/core/fwl_formimp.cpp b/xfa/src/fwl/src/core/fwl_formimp.cpp
index db78afa369..36838548e4 100644
--- a/xfa/src/fwl/src/core/fwl_formimp.cpp
+++ b/xfa/src/fwl/src/core/fwl_formimp.cpp
@@ -154,7 +154,7 @@ FX_DWORD CFWL_FormImp::GetClassID() const
{
return FWL_CLASSHASH_Form;
}
-FX_BOOL CFWL_FormImp::IsInstance(FX_WSTR wsClass) const
+FX_BOOL CFWL_FormImp::IsInstance(const CFX_WideStringC& wsClass) const
{
if (wsClass == CFX_WideStringC(FWL_CLASS_Form)) {
return TRUE;
diff --git a/xfa/src/fwl/src/core/fwl_sdadapterimp.cpp b/xfa/src/fwl/src/core/fwl_sdadapterimp.cpp
index 2fdaee126e..bebad3c331 100644
--- a/xfa/src/fwl/src/core/fwl_sdadapterimp.cpp
+++ b/xfa/src/fwl/src/core/fwl_sdadapterimp.cpp
@@ -79,7 +79,7 @@ FWL_ERR CFWL_SDAdapterWidgetMgr::SetWidgetIcon(IFWL_Widget *pWidget, const CFX_
{
return FWL_ERR_Succeeded;
}
-FWL_ERR CFWL_SDAdapterWidgetMgr::SetWidgetCaption(IFWL_Widget *pWidget, FX_WSTR wsCaption)
+FWL_ERR CFWL_SDAdapterWidgetMgr::SetWidgetCaption(IFWL_Widget *pWidget, const CFX_WideStringC& wsCaption)
{
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 c09b8ee447..c6ffd27a22 100644
--- a/xfa/src/fwl/src/core/fwl_targetimp.cpp
+++ b/xfa/src/fwl/src/core/fwl_targetimp.cpp
@@ -31,7 +31,7 @@ FX_DWORD IFWL_Target::GetClassID() const
{
return ((CFWL_Target*)m_pData)->GetClassID();
}
-FX_BOOL IFWL_Target::IsInstance(FX_WSTR wsClass) const
+FX_BOOL IFWL_Target::IsInstance(const CFX_WideStringC& wsClass) const
{
return ((CFWL_Target*)m_pData)->IsInstance(wsClass);
}
@@ -79,7 +79,7 @@ FX_DWORD CFWL_Target::GetClassID() const
{
return 0;
}
-FX_BOOL CFWL_Target::IsInstance(FX_WSTR wsClass) const
+FX_BOOL CFWL_Target::IsInstance(const CFX_WideStringC& wsClass) const
{
return FALSE;
}
diff --git a/xfa/src/fwl/src/core/fwl_widgetmgrimp.cpp b/xfa/src/fwl/src/core/fwl_widgetmgrimp.cpp
index 4a89951d7d..51988dd9cd 100644
--- a/xfa/src/fwl/src/core/fwl_widgetmgrimp.cpp
+++ b/xfa/src/fwl/src/core/fwl_widgetmgrimp.cpp
@@ -422,7 +422,7 @@ FWL_ERR CFWL_WidgetMgr::SetWidgetIcon_Native(IFWL_Widget *pWidget, const CFX_DIB
{
return m_pAdapter->SetWidgetIcon(pWidget, pIcon, bBig);
}
-FWL_ERR CFWL_WidgetMgr::SetWidgetCaption_Native(IFWL_Widget *pWidget, FX_WSTR wsCaption)
+FWL_ERR CFWL_WidgetMgr::SetWidgetCaption_Native(IFWL_Widget *pWidget, const CFX_WideStringC& wsCaption)
{
return m_pAdapter->SetWidgetCaption(pWidget, wsCaption);
}
diff --git a/xfa/src/fwl/src/core/include/fwl_formimp.h b/xfa/src/fwl/src/core/include/fwl_formimp.h
index 0cf9c9d25c..f0cee13000 100644
--- a/xfa/src/fwl/src/core/include/fwl_formimp.h
+++ b/xfa/src/fwl/src/core/include/fwl_formimp.h
@@ -90,7 +90,7 @@ public:
virtual ~CFWL_FormImp();
virtual FWL_ERR GetClassName(CFX_WideString &wsClass) const;
virtual FX_DWORD GetClassID() const;
- virtual FX_BOOL IsInstance(FX_WSTR wsClass) const;
+ virtual FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const;
virtual FWL_ERR Initialize();
virtual FWL_ERR Finalize();
diff --git a/xfa/src/fwl/src/core/include/fwl_targetimp.h b/xfa/src/fwl/src/core/include/fwl_targetimp.h
index 1287a63870..3b0b7c38a6 100644
--- a/xfa/src/fwl/src/core/include/fwl_targetimp.h
+++ b/xfa/src/fwl/src/core/include/fwl_targetimp.h
@@ -15,7 +15,7 @@ public:
virtual FX_DWORD GetRefCount() const;
virtual FWL_ERR GetClassName(CFX_WideString &wsClass) const;
virtual FX_DWORD GetClassID() const;
- virtual FX_BOOL IsInstance(FX_WSTR wsClass) const;
+ virtual FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const;
virtual FWL_ERR Initialize();
virtual FWL_ERR Finalize();
protected:
diff --git a/xfa/src/fwl/src/core/include/fwl_widgetmgrimp.h b/xfa/src/fwl/src/core/include/fwl_widgetmgrimp.h
index 12b629ff06..f9b465fc52 100644
--- a/xfa/src/fwl/src/core/include/fwl_widgetmgrimp.h
+++ b/xfa/src/fwl/src/core/include/fwl_widgetmgrimp.h
@@ -77,7 +77,7 @@ public:
FWL_ERR SetWidgetRect_Native(IFWL_Widget *pWidget, const CFX_RectF &rect);
FWL_ERR SetWidgetPosition_Native(IFWL_Widget *pWidget, FX_FLOAT fx, FX_FLOAT fy);
FWL_ERR SetWidgetIcon_Native(IFWL_Widget *pWidget, const CFX_DIBitmap *pIcon, FX_BOOL bBig);
- FWL_ERR SetWidgetCaption_Native(IFWL_Widget *pWidget, FX_WSTR wsCaption);
+ FWL_ERR SetWidgetCaption_Native(IFWL_Widget *pWidget, const CFX_WideStringC& wsCaption);
FWL_ERR SetBorderRegion_Native(IFWL_Widget *pWidget, CFX_Path *pPath);
FWL_ERR ShowWidget_Native(IFWL_Widget *pWidget);
FWL_ERR HideWidget_Native(IFWL_Widget *pWidget);
diff --git a/xfa/src/fwl/src/lightwidget/checkbox.cpp b/xfa/src/fwl/src/lightwidget/checkbox.cpp
index 298aa41b4e..5079159d48 100644
--- a/xfa/src/fwl/src/lightwidget/checkbox.cpp
+++ b/xfa/src/fwl/src/lightwidget/checkbox.cpp
@@ -35,7 +35,7 @@ FWL_ERR CFWL_CheckBox::Initialize(const CFWL_WidgetProperties *pProperties )
}
return ret;
}
-FWL_ERR CFWL_CheckBox::SetCaption(FX_WSTR wsCaption)
+FWL_ERR CFWL_CheckBox::SetCaption(const CFX_WideStringC& wsCaption)
{
m_checkboxData.m_wsCaption = wsCaption;
return FWL_ERR_Succeeded;
diff --git a/xfa/src/fwl/src/lightwidget/combobox.cpp b/xfa/src/fwl/src/lightwidget/combobox.cpp
index c0806ef15b..20211caa72 100644
--- a/xfa/src/fwl/src/lightwidget/combobox.cpp
+++ b/xfa/src/fwl/src/lightwidget/combobox.cpp
@@ -35,14 +35,14 @@ FWL_ERR CFWL_ComboBox::Initialize(const CFWL_WidgetProperties *pProperties )
}
return ret;
}
-int32_t CFWL_ComboBox::AddString(FX_WSTR wsText)
+int32_t CFWL_ComboBox::AddString(const CFX_WideStringC& wsText)
{
CFWL_ComboBoxItem *pItem = FX_NEW CFWL_ComboBoxItem;
pItem->m_wsText = wsText;
pItem->m_dwStyles = 0;
return m_comboBoxData.m_arrItem.Add(pItem);
}
-int32_t CFWL_ComboBox::AddString(FX_WSTR wsText, CFX_DIBitmap *pIcon)
+int32_t CFWL_ComboBox::AddString(const CFX_WideStringC& wsText, CFX_DIBitmap *pIcon)
{
CFWL_ComboBoxItem *pItem = FX_NEW CFWL_ComboBoxItem;
pItem->m_wsText = wsText;
@@ -80,7 +80,7 @@ FWL_ERR CFWL_ComboBox::SetCurSel(int32_t iSel)
_FWL_RETURN_VALUE_IF_FAIL(m_pImp, FWL_ERR_Indefinite);
return ((IFWL_ComboBox*)m_pImp)->SetCurSel(iSel);
}
-FWL_ERR CFWL_ComboBox::SetEditText(FX_WSTR wsText)
+FWL_ERR CFWL_ComboBox::SetEditText(const CFX_WideStringC& wsText)
{
_FWL_RETURN_VALUE_IF_FAIL(m_pImp, FWL_ERR_Indefinite);
return ((IFWL_ComboBox*)m_pImp)->SetEditText(wsText);
@@ -120,12 +120,12 @@ FWL_ERR CFWL_ComboBox::EditDoClipboard(int32_t iCmd)
_FWL_RETURN_VALUE_IF_FAIL(m_pImp, FWL_ERR_Indefinite);
return ((IFWL_ComboBox*)m_pImp)->EditDoClipboard(iCmd);
}
-FX_BOOL CFWL_ComboBox::EditRedo(FX_BSTR bsRecord)
+FX_BOOL CFWL_ComboBox::EditRedo(const CFX_ByteStringC& bsRecord)
{
_FWL_RETURN_VALUE_IF_FAIL(m_pImp, FALSE);
return ((IFWL_ComboBox*)m_pImp)->EditRedo(bsRecord);
}
-FX_BOOL CFWL_ComboBox::EditUndo(FX_BSTR bsRecord)
+FX_BOOL CFWL_ComboBox::EditUndo(const CFX_ByteStringC& bsRecord)
{
_FWL_RETURN_VALUE_IF_FAIL(m_pImp, FALSE);
return ((IFWL_ComboBox*)m_pImp)->EditUndo(bsRecord);
diff --git a/xfa/src/fwl/src/lightwidget/datetimepicker.cpp b/xfa/src/fwl/src/lightwidget/datetimepicker.cpp
index 5a18efe542..ee64d09d7c 100644
--- a/xfa/src/fwl/src/lightwidget/datetimepicker.cpp
+++ b/xfa/src/fwl/src/lightwidget/datetimepicker.cpp
@@ -54,7 +54,7 @@ FWL_ERR CFWL_DateTimePicker::GetEditText(CFX_WideString &wsText)
{
return ((IFWL_DateTimePicker*)m_pImp)->GetEditText(wsText);
}
-FWL_ERR CFWL_DateTimePicker::SetEditText(FX_WSTR wsText)
+FWL_ERR CFWL_DateTimePicker::SetEditText(const CFX_WideStringC& wsText)
{
return ((IFWL_DateTimePicker*)m_pImp)->SetEditText(wsText);
}
diff --git a/xfa/src/fwl/src/lightwidget/edit.cpp b/xfa/src/fwl/src/lightwidget/edit.cpp
index 1ee1066793..310e68ba2f 100644
--- a/xfa/src/fwl/src/lightwidget/edit.cpp
+++ b/xfa/src/fwl/src/lightwidget/edit.cpp
@@ -142,12 +142,12 @@ FWL_ERR CFWL_Edit::DoClipboard(int32_t iCmd)
_FWL_RETURN_VALUE_IF_FAIL(m_pImp, FWL_ERR_Indefinite);
return ((IFWL_Edit*)m_pImp)->DoClipboard(iCmd);
}
-FX_BOOL CFWL_Edit::Redo(FX_BSTR bsRecord)
+FX_BOOL CFWL_Edit::Redo(const CFX_ByteStringC& bsRecord)
{
_FWL_RETURN_VALUE_IF_FAIL(m_pImp, FALSE);
return ((IFWL_Edit*)m_pImp)->Redo(bsRecord);
}
-FX_BOOL CFWL_Edit::Undo(FX_BSTR bsRecord)
+FX_BOOL CFWL_Edit::Undo(const CFX_ByteStringC& bsRecord)
{
_FWL_RETURN_VALUE_IF_FAIL(m_pImp, FALSE);
return ((IFWL_Edit*)m_pImp)->Undo(bsRecord);
@@ -214,7 +214,7 @@ FX_BOOL CFWL_Edit::GetSuggestWords(CFX_PointF pointf, CFX_ByteStringArray &sSugg
{
return ((IFWL_Edit*)m_pImp)->GetSuggestWords(pointf, sSuggest);
}
-FX_BOOL CFWL_Edit::ReplaceSpellCheckWord(CFX_PointF pointf, FX_BSTR bsReplace)
+FX_BOOL CFWL_Edit::ReplaceSpellCheckWord(CFX_PointF pointf, const CFX_ByteStringC& bsReplace)
{
return ((IFWL_Edit*)m_pImp)->ReplaceSpellCheckWord(pointf, bsReplace);
}
diff --git a/xfa/src/fwl/src/lightwidget/listbox.cpp b/xfa/src/fwl/src/lightwidget/listbox.cpp
index a9890bd283..c96e368ca4 100644
--- a/xfa/src/fwl/src/lightwidget/listbox.cpp
+++ b/xfa/src/fwl/src/lightwidget/listbox.cpp
@@ -40,7 +40,7 @@ FWL_ERR CFWL_ListBox::AddDIBitmap(CFX_DIBitmap *pDIB, FWL_HLISTITEM hItem)
((CFWL_ListItem*)hItem)->m_pDIB = pDIB;
return FWL_ERR_Succeeded;
}
-FWL_HLISTITEM CFWL_ListBox::AddString(FX_WSTR wsAdd, FX_BOOL bSelect)
+FWL_HLISTITEM CFWL_ListBox::AddString(const CFX_WideStringC& wsAdd, FX_BOOL bSelect)
{
CFWL_ListItem * pItem = FX_NEW CFWL_ListItem;
pItem->m_dwStates = 0;
@@ -149,7 +149,7 @@ FWL_HLISTITEM CFWL_ListBox::GetItem(int32_t nIndex)
}
return (FWL_HLISTITEM)m_ListBoxDP.m_arrItem[nIndex];
}
-FWL_ERR CFWL_ListBox::SetItemString(FWL_HLISTITEM hItem, FX_WSTR wsText)
+FWL_ERR CFWL_ListBox::SetItemString(FWL_HLISTITEM hItem, const CFX_WideStringC& wsText)
{
_FWL_RETURN_VALUE_IF_FAIL(hItem, FWL_ERR_Indefinite);
CFWL_ListItem *pItem = (CFWL_ListItem*)hItem;
diff --git a/xfa/src/fwl/src/lightwidget/pushbutton.cpp b/xfa/src/fwl/src/lightwidget/pushbutton.cpp
index 7e4cae2d18..f09c3cd2fe 100644
--- a/xfa/src/fwl/src/lightwidget/pushbutton.cpp
+++ b/xfa/src/fwl/src/lightwidget/pushbutton.cpp
@@ -40,7 +40,7 @@ FWL_ERR CFWL_PushButton::GetCaption(CFX_WideString &wsCaption)
wsCaption = m_buttonData.m_wsCaption;
return FWL_ERR_Succeeded;
}
-FWL_ERR CFWL_PushButton::SetCaption(FX_WSTR wsCaption)
+FWL_ERR CFWL_PushButton::SetCaption(const CFX_WideStringC& wsCaption)
{
m_buttonData.m_wsCaption = wsCaption;
return FWL_ERR_Succeeded;
diff --git a/xfa/src/fwl/src/lightwidget/tooltipctrl.cpp b/xfa/src/fwl/src/lightwidget/tooltipctrl.cpp
index 5fc3d5a4f3..7491e6be38 100644
--- a/xfa/src/fwl/src/lightwidget/tooltipctrl.cpp
+++ b/xfa/src/fwl/src/lightwidget/tooltipctrl.cpp
@@ -46,7 +46,7 @@ FWL_ERR CFWL_ToolTip::GetCaption(CFX_WideString &wsCaption)
wsCaption = m_tooltipData.m_wsCaption;
return FWL_ERR_Succeeded;
}
-FWL_ERR CFWL_ToolTip::SetCaption(FX_WSTR wsCaption)
+FWL_ERR CFWL_ToolTip::SetCaption(const CFX_WideStringC& wsCaption)
{
m_tooltipData.m_wsCaption = wsCaption;
return FWL_ERR_Succeeded;
diff --git a/xfa/src/fwl/src/lightwidget/widget.cpp b/xfa/src/fwl/src/lightwidget/widget.cpp
index b1cbd9ae9e..be6c728e2c 100644
--- a/xfa/src/fwl/src/lightwidget/widget.cpp
+++ b/xfa/src/fwl/src/lightwidget/widget.cpp
@@ -49,7 +49,7 @@ FX_DWORD CFWL_Widget::GetClassID() const
_FWL_RETURN_VALUE_IF_FAIL(m_pImp, 0);
return m_pImp->GetClassID();
}
-FX_BOOL CFWL_Widget::IsInstance(FX_WSTR wsClass) const
+FX_BOOL CFWL_Widget::IsInstance(const CFX_WideStringC& wsClass) const
{
_FWL_RETURN_VALUE_IF_FAIL(m_pImp, FALSE);
return m_pImp->IsInstance(wsClass);
diff --git a/xfa/src/fwl/src/theme/widgettp.cpp b/xfa/src/fwl/src/theme/widgettp.cpp
index a4c876956d..7ce08abb27 100644
--- a/xfa/src/fwl/src/theme/widgettp.cpp
+++ b/xfa/src/fwl/src/theme/widgettp.cpp
@@ -688,11 +688,11 @@ CFWL_FontData::~CFWL_FontData()
}
#endif
}
-FX_BOOL CFWL_FontData::Equal(FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage)
+FX_BOOL CFWL_FontData::Equal(const CFX_WideStringC& wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage)
{
return m_wsFamily == wsFontFamily && m_dwStyles == dwFontStyles && m_dwCodePage == wCodePage;
}
-FX_BOOL CFWL_FontData::LoadFont(FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD dwCodePage)
+FX_BOOL CFWL_FontData::LoadFont(const CFX_WideStringC& wsFontFamily, FX_DWORD dwFontStyles, FX_WORD dwCodePage)
{
m_wsFamily = wsFontFamily;
m_dwStyles = dwFontStyles;
@@ -720,7 +720,7 @@ CFWL_FontManager::~CFWL_FontManager()
}
m_arrFonts.RemoveAll();
}
-IFX_Font* CFWL_FontManager::FindFont(FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage)
+IFX_Font* CFWL_FontManager::FindFont(const CFX_WideStringC& wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage)
{
int32_t count = m_arrFonts.GetSize();
for (int32_t i = 0; i < count; i ++) {
diff --git a/xfa/src/fxbarcode/BC_BarCode.cpp b/xfa/src/fxbarcode/BC_BarCode.cpp
index d87a0ce045..745ddb9238 100644
--- a/xfa/src/fxbarcode/BC_BarCode.cpp
+++ b/xfa/src/fxbarcode/BC_BarCode.cpp
@@ -139,14 +139,14 @@ CBC_OneCode::CBC_OneCode()
CBC_OneCode::~CBC_OneCode()
{
}
-FX_BOOL CBC_OneCode::CheckContentValidity(FX_WSTR contents)
+FX_BOOL CBC_OneCode::CheckContentValidity(const CFX_WideStringC& contents)
{
if (m_pBCWriter) {
return ((CBC_OneDimWriter*)m_pBCWriter)->CheckContentValidity(contents);
}
return FALSE;
}
-CFX_WideString CBC_OneCode::FilterContents(FX_WSTR contents)
+CFX_WideString CBC_OneCode::FilterContents(const CFX_WideStringC& contents)
{
CFX_WideString tmp;
if (m_pBCWriter == NULL) {
@@ -223,7 +223,7 @@ CBC_Code39::~CBC_Code39()
m_pBCWriter = NULL;
}
}
-FX_BOOL CBC_Code39::Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e)
+FX_BOOL CBC_Code39::Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e)
{
if(contents.IsEmpty()) {
e = BCExceptionNoContents;
@@ -326,7 +326,7 @@ FX_BOOL CBC_Codabar::SetWideNarrowRatio(int32_t ratio)
}
return FALSE;
}
-FX_BOOL CBC_Codabar::Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e)
+FX_BOOL CBC_Codabar::Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e)
{
if(contents.IsEmpty()) {
e = BCExceptionNoContents;
@@ -396,7 +396,7 @@ FX_BOOL CBC_Code128::SetTextLocation(BC_TEXT_LOC location)
}
return FALSE;
}
-FX_BOOL CBC_Code128::Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e)
+FX_BOOL CBC_Code128::Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e)
{
if(contents.IsEmpty()) {
e = BCExceptionNoContents;
@@ -461,7 +461,7 @@ CBC_EAN8::~CBC_EAN8()
m_pBCWriter = NULL;
}
}
-CFX_WideString CBC_EAN8::Preprocess(FX_WSTR contents)
+CFX_WideString CBC_EAN8::Preprocess(const CFX_WideStringC& contents)
{
CFX_WideString encodeContents = ((CBC_OnedEAN8Writer*)m_pBCWriter)->FilterContents(contents);
int32_t length = encodeContents.GetLength();
@@ -478,7 +478,7 @@ CFX_WideString CBC_EAN8::Preprocess(FX_WSTR contents)
}
return encodeContents;
}
-FX_BOOL CBC_EAN8::Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e)
+FX_BOOL CBC_EAN8::Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e)
{
if(contents.IsEmpty()) {
e = BCExceptionNoContents;
@@ -539,7 +539,7 @@ CBC_EAN13::~CBC_EAN13()
m_pBCWriter = NULL;
}
}
-CFX_WideString CBC_EAN13::Preprocess(FX_WSTR contents)
+CFX_WideString CBC_EAN13::Preprocess(const CFX_WideStringC& contents)
{
CFX_WideString encodeContents = ((CBC_OnedEAN8Writer*)m_pBCWriter)->FilterContents(contents);
int32_t length = encodeContents.GetLength();
@@ -557,7 +557,7 @@ CFX_WideString CBC_EAN13::Preprocess(FX_WSTR contents)
}
return encodeContents;
}
-FX_BOOL CBC_EAN13::Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e)
+FX_BOOL CBC_EAN13::Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e)
{
if(contents.IsEmpty()) {
e = BCExceptionNoContents;
@@ -619,7 +619,7 @@ CBC_UPCA::~CBC_UPCA()
m_pBCWriter = NULL;
}
}
-CFX_WideString CBC_UPCA::Preprocess(FX_WSTR contents)
+CFX_WideString CBC_UPCA::Preprocess(const CFX_WideStringC& contents)
{
CFX_WideString encodeContents = ((CBC_OnedEAN8Writer*)m_pBCWriter)->FilterContents(contents);
int32_t length = encodeContents.GetLength();
@@ -637,7 +637,7 @@ CFX_WideString CBC_UPCA::Preprocess(FX_WSTR contents)
}
return encodeContents;
}
-FX_BOOL CBC_UPCA::Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e)
+FX_BOOL CBC_UPCA::Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e)
{
if(contents.IsEmpty()) {
e = BCExceptionNoContents;
@@ -720,7 +720,7 @@ FX_BOOL CBC_QRCode::SetErrorCorrectionLevel (int32_t level)
}
return ((CBC_TwoDimWriter*)m_pBCWriter)->SetErrorCorrectionLevel(level);
}
-FX_BOOL CBC_QRCode::Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e)
+FX_BOOL CBC_QRCode::Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e)
{
int32_t outWidth = 0;
int32_t outHeight = 0;
@@ -781,7 +781,7 @@ void CBC_PDF417I::SetTruncated(FX_BOOL truncated)
{
((CBC_PDF417Writer*)m_pBCWriter)->SetTruncated(truncated);
}
-FX_BOOL CBC_PDF417I::Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e)
+FX_BOOL CBC_PDF417I::Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e)
{
BCFORMAT format = BCFORMAT_PDF_417;
int32_t outWidth = 0;
@@ -835,7 +835,7 @@ CBC_DataMatrix::~CBC_DataMatrix()
m_pBCWriter = NULL;
}
}
-FX_BOOL CBC_DataMatrix::Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e)
+FX_BOOL CBC_DataMatrix::Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e)
{
int32_t outWidth = 0;
int32_t outHeight = 0;
diff --git a/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp b/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp
index a1554a8047..e2a0da6c95 100644
--- a/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp
@@ -214,7 +214,7 @@ void CBC_OneDimWriter::ShowBitmapChars(CFX_DIBitmap *pOutBitmap, const CFX_ByteS
geBitmap.Attach(pOutBitmap);
geBitmap.SetDIBits(ge.GetBitmap(), (int)locX, (int)locY);
}
-void CBC_OneDimWriter::ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice *device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e)
+void CBC_OneDimWriter::ShowChars(const CFX_WideStringC& contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice *device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e)
{
if (device == NULL && pOutBitmap == NULL) {
e = BCExceptionIllegalArgument;
@@ -278,7 +278,7 @@ void CBC_OneDimWriter::ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap, CFX
}
FX_Free(pCharPos);
}
-void CBC_OneDimWriter::RenderBitmapResult(CFX_DIBitmap *&pOutBitmap, FX_WSTR contents, int32_t &e)
+void CBC_OneDimWriter::RenderBitmapResult(CFX_DIBitmap *&pOutBitmap, const CFX_WideStringC& contents, int32_t &e)
{
if (m_output == NULL) {
BC_EXCEPTION_CHECK_ReturnVoid(e);
@@ -311,7 +311,7 @@ void CBC_OneDimWriter::RenderBitmapResult(CFX_DIBitmap *&pOutBitmap, FX_WSTR con
}
pOutBitmap = pStretchBitmap;
}
-void CBC_OneDimWriter::RenderDeviceResult(CFX_RenderDevice* device, const CFX_Matrix* matrix, FX_WSTR contents, int32_t &e)
+void CBC_OneDimWriter::RenderDeviceResult(CFX_RenderDevice* device, const CFX_Matrix* matrix, const CFX_WideStringC& contents, int32_t &e)
{
if (m_output == NULL) {
BC_EXCEPTION_CHECK_ReturnVoid(e);
@@ -342,7 +342,7 @@ void CBC_OneDimWriter::RenderDeviceResult(CFX_RenderDevice* device, const CFX_Ma
BC_EXCEPTION_CHECK_ReturnVoid(e);
}
}
-void CBC_OneDimWriter::RenderResult(FX_WSTR contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e)
+void CBC_OneDimWriter::RenderResult(const CFX_WideStringC& contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e)
{
if (codeLength < 1) {
BC_EXCEPTION_CHECK_ReturnVoid(e);
diff --git a/xfa/src/fxbarcode/oned/BC_OneDimWriter.h b/xfa/src/fxbarcode/oned/BC_OneDimWriter.h
index aeb19e0081..b8019fe290 100644
--- a/xfa/src/fxbarcode/oned/BC_OneDimWriter.h
+++ b/xfa/src/fxbarcode/oned/BC_OneDimWriter.h
@@ -22,18 +22,18 @@ public:
{
return NULL;
};
- virtual void RenderResult(FX_WSTR contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e);
- virtual void RenderBitmapResult(CFX_DIBitmap *&pOutBitmap, FX_WSTR contents, int32_t &e);
- virtual void RenderDeviceResult(CFX_RenderDevice* device, const CFX_Matrix* matrix, FX_WSTR contents, int32_t &e);
- virtual FX_BOOL CheckContentValidity(FX_WSTR contents)
+ virtual void RenderResult(const CFX_WideStringC& contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e);
+ virtual void RenderBitmapResult(CFX_DIBitmap *&pOutBitmap, const CFX_WideStringC& contents, int32_t &e);
+ virtual void RenderDeviceResult(CFX_RenderDevice* device, const CFX_Matrix* matrix, const CFX_WideStringC& contents, int32_t &e);
+ virtual FX_BOOL CheckContentValidity(const CFX_WideStringC& contents)
{
return TRUE;
};
- virtual CFX_WideString FilterContents(FX_WSTR contents)
+ virtual CFX_WideString FilterContents(const CFX_WideStringC& contents)
{
return CFX_WideString();
}
- virtual CFX_WideString RenderTextContents(FX_WSTR contents)
+ virtual CFX_WideString RenderTextContents(const CFX_WideStringC& contents)
{
return CFX_WideString();
}
@@ -61,7 +61,7 @@ protected:
int32_t m_multiple;
FX_FLOAT m_outputHScale;
void CalcTextInfo(const CFX_ByteString &text, FXTEXT_CHARPOS *charPos, CFX_Font *cFont, FX_FLOAT geWidth, int32_t fontSize, FX_FLOAT &charsLen);
- virtual void ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice *device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e);
+ virtual void ShowChars(const CFX_WideStringC& contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice *device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e);
virtual void ShowBitmapChars(CFX_DIBitmap *pOutBitmap, const CFX_ByteString str, FX_FLOAT geWidth, FXTEXT_CHARPOS* pCharPos, FX_FLOAT locX, FX_FLOAT locY, int32_t barWidth);
virtual void ShowDeviceChars(CFX_RenderDevice *device, const CFX_Matrix* matrix, const CFX_ByteString str, FX_FLOAT geWidth, FXTEXT_CHARPOS* pCharPos, FX_FLOAT locX, FX_FLOAT locY, int32_t barWidth);
int32_t AppendPattern(uint8_t* target, int32_t pos, const int32_t* pattern, int32_t patternLength, int32_t startColor, int32_t &e);
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.cpp b/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.cpp
index 0049a54f7c..584f7bf1d8 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.cpp
@@ -103,7 +103,7 @@ FX_BOOL CBC_OnedCodaBarWriter::FindChar(FX_WCHAR ch, FX_BOOL isContent)
return FALSE;
}
}
-FX_BOOL CBC_OnedCodaBarWriter::CheckContentValidity(FX_WSTR contents)
+FX_BOOL CBC_OnedCodaBarWriter::CheckContentValidity(const CFX_WideStringC& contents)
{
FX_WCHAR ch;
int32_t index = 0;
@@ -117,7 +117,7 @@ FX_BOOL CBC_OnedCodaBarWriter::CheckContentValidity(FX_WSTR contents)
}
return TRUE;
}
-CFX_WideString CBC_OnedCodaBarWriter::FilterContents(FX_WSTR contents)
+CFX_WideString CBC_OnedCodaBarWriter::FilterContents(const CFX_WideStringC& contents)
{
CFX_WideString filtercontents;
FX_WCHAR ch;
@@ -210,13 +210,13 @@ uint8_t* CBC_OnedCodaBarWriter::Encode(const CFX_ByteString &contents, int32_t &
outLength = position;
return result;
}
-CFX_WideString CBC_OnedCodaBarWriter::encodedContents(FX_WSTR contents)
+CFX_WideString CBC_OnedCodaBarWriter::encodedContents(const CFX_WideStringC& contents)
{
CFX_WideString strStart(m_chStart);
CFX_WideString strEnd(m_chEnd);
return strStart + contents + strEnd;
}
-void CBC_OnedCodaBarWriter::RenderResult(FX_WSTR contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e)
+void CBC_OnedCodaBarWriter::RenderResult(const CFX_WideStringC& contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e)
{
CBC_OneDimWriter::RenderResult(encodedContents(contents), code, codeLength, isDevice, e);
}
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.h b/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.h
index c5c54b849f..29912ccb8a 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.h
+++ b/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.h
@@ -17,9 +17,9 @@ public:
uint8_t* Encode(const CFX_ByteString &contents, int32_t &outLength, int32_t &e);
uint8_t *Encode(const CFX_ByteString &contents, BCFORMAT format, int32_t &outWidth, int32_t &outHeight, int32_t &e);
uint8_t *Encode(const CFX_ByteString &contents, BCFORMAT format, int32_t &outWidth, int32_t &outHeight, int32_t hints, int32_t &e);
- CFX_WideString encodedContents(FX_WSTR contents);
- FX_BOOL CheckContentValidity(FX_WSTR contents);
- CFX_WideString FilterContents(FX_WSTR contents);
+ CFX_WideString encodedContents(const CFX_WideStringC& contents);
+ FX_BOOL CheckContentValidity(const CFX_WideStringC& contents);
+ CFX_WideString FilterContents(const CFX_WideStringC& contents);
FX_BOOL SetStartChar(FX_CHAR start);
FX_BOOL SetEndChar(FX_CHAR end);
void SetDataLength(int32_t length);
@@ -27,7 +27,7 @@ public:
FX_BOOL SetWideNarrowRatio(int32_t ratio);
FX_BOOL FindChar(FX_WCHAR ch, FX_BOOL isContent);
private:
- void RenderResult(FX_WSTR contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e);
+ void RenderResult(const CFX_WideStringC& contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e);
const static FX_CHAR START_END_CHARS[];
const static FX_CHAR CONTENT_CHARS[];
FX_CHAR m_chStart;
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.cpp b/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.cpp
index 5f7b32caa4..a0447167be 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.cpp
@@ -47,7 +47,7 @@ BC_TYPE CBC_OnedCode128Writer::GetType()
{
return m_codeFormat;
}
-FX_BOOL CBC_OnedCode128Writer::CheckContentValidity(FX_WSTR contents)
+FX_BOOL CBC_OnedCode128Writer::CheckContentValidity(const CFX_WideStringC& contents)
{
FX_BOOL ret = TRUE;
int32_t position = 0;
@@ -69,7 +69,7 @@ FX_BOOL CBC_OnedCode128Writer::CheckContentValidity(FX_WSTR contents)
}
return ret;
}
-CFX_WideString CBC_OnedCode128Writer::FilterContents(FX_WSTR contents)
+CFX_WideString CBC_OnedCode128Writer::FilterContents(const CFX_WideStringC& contents)
{
CFX_WideString filterChineseChar;
FX_WCHAR ch;
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.h b/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.h
index f27e2e9f09..8a89f266b2 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.h
+++ b/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.h
@@ -19,8 +19,8 @@ public:
uint8_t * Encode(const CFX_ByteString &contents, BCFORMAT format,
int32_t &outWidth, int32_t &outHeight, int32_t &e);
uint8_t * Encode(const CFX_ByteString &contents, int32_t &outLength , int32_t &e);
- FX_BOOL CheckContentValidity(FX_WSTR contents);
- CFX_WideString FilterContents(FX_WSTR contents);
+ FX_BOOL CheckContentValidity(const CFX_WideStringC& contents);
+ CFX_WideString FilterContents(const CFX_WideStringC& contents);
FX_BOOL SetTextLocation(BC_TEXT_LOC location);
BC_TYPE GetType();
private:
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode39Writer.cpp b/xfa/src/fxbarcode/oned/BC_OnedCode39Writer.cpp
index 8d06ecdfc2..0d02d1ee86 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCode39Writer.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedCode39Writer.cpp
@@ -41,7 +41,7 @@ CBC_OnedCode39Writer::CBC_OnedCode39Writer(FX_BOOL extendedMode)
CBC_OnedCode39Writer::~CBC_OnedCode39Writer()
{
}
-FX_BOOL CBC_OnedCode39Writer::CheckContentValidity(FX_WSTR contents)
+FX_BOOL CBC_OnedCode39Writer::CheckContentValidity(const CFX_WideStringC& contents)
{
if (m_extendedMode) {
return CheckExtendedContentValidity(contents);
@@ -57,7 +57,7 @@ FX_BOOL CBC_OnedCode39Writer::CheckContentValidity(FX_WSTR contents)
}
return TRUE;
}
-FX_BOOL CBC_OnedCode39Writer::CheckExtendedContentValidity(FX_WSTR contents)
+FX_BOOL CBC_OnedCode39Writer::CheckExtendedContentValidity(const CFX_WideStringC& contents)
{
for(int32_t i = 0; i < contents.GetLength(); i++) {
FX_WCHAR ch = contents.GetAt(i);
@@ -67,7 +67,7 @@ FX_BOOL CBC_OnedCode39Writer::CheckExtendedContentValidity(FX_WSTR contents)
}
return TRUE;
}
-CFX_WideString CBC_OnedCode39Writer::FilterContents(FX_WSTR contents)
+CFX_WideString CBC_OnedCode39Writer::FilterContents(const CFX_WideStringC& contents)
{
if (m_extendedMode) {
return FilterExtendedContents(contents);
@@ -92,7 +92,7 @@ CFX_WideString CBC_OnedCode39Writer::FilterContents(FX_WSTR contents)
}
return filtercontents;
}
-CFX_WideString CBC_OnedCode39Writer::FilterExtendedContents(FX_WSTR contents)
+CFX_WideString CBC_OnedCode39Writer::FilterExtendedContents(const CFX_WideStringC& contents)
{
CFX_WideString filtercontents;
for(int32_t i = 0; i < contents.GetLength(); i++) {
@@ -149,7 +149,7 @@ CFX_WideString CBC_OnedCode39Writer::FilterExtendedContents(FX_WSTR contents)
}
return filtercontents;
}
-CFX_WideString CBC_OnedCode39Writer::RenderTextContents(FX_WSTR contents)
+CFX_WideString CBC_OnedCode39Writer::RenderTextContents(const CFX_WideStringC& contents)
{
if (m_extendedMode) {
return RenderExtendedTextContents(contents);
@@ -173,7 +173,7 @@ CFX_WideString CBC_OnedCode39Writer::RenderTextContents(FX_WSTR contents)
}
return renderContents;
}
-CFX_WideString CBC_OnedCode39Writer::RenderExtendedTextContents(FX_WSTR contents)
+CFX_WideString CBC_OnedCode39Writer::RenderExtendedTextContents(const CFX_WideStringC& contents)
{
CFX_WideString renderContents;
for(int32_t i = 0; i < contents.GetLength(); i++) {
@@ -329,7 +329,7 @@ uint8_t *CBC_OnedCode39Writer::Encode(const CFX_ByteString &contents, int32_t &o
}
return result;
}
-CFX_WideString CBC_OnedCode39Writer::encodedContents(FX_WSTR contents, int32_t &e)
+CFX_WideString CBC_OnedCode39Writer::encodedContents(const CFX_WideStringC& contents, int32_t &e)
{
CFX_WideString encodedContents = contents;
if (m_bCalcChecksum && m_bPrintChecksum) {
@@ -343,7 +343,7 @@ CFX_WideString CBC_OnedCode39Writer::encodedContents(FX_WSTR contents, int32_t &
}
return encodedContents;
}
-void CBC_OnedCode39Writer::RenderResult(FX_WSTR contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e)
+void CBC_OnedCode39Writer::RenderResult(const CFX_WideStringC& contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e)
{
CFX_WideString encodedCon = encodedContents(contents, e);
BC_EXCEPTION_CHECK_ReturnVoid(e);
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode39Writer.h b/xfa/src/fxbarcode/oned/BC_OnedCode39Writer.h
index 641d041809..679d4f6ae7 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCode39Writer.h
+++ b/xfa/src/fxbarcode/oned/BC_OnedCode39Writer.h
@@ -18,14 +18,14 @@ public:
uint8_t *Encode(const CFX_ByteString &contents, BCFORMAT format, int32_t &outWidth, int32_t &outHeight, int32_t &e);
uint8_t *Encode(const CFX_ByteString &contents, BCFORMAT format, int32_t &outWidth, int32_t &outHeight, int32_t hints, int32_t &e);
uint8_t *Encode(const CFX_ByteString &contents, int32_t &outLength, int32_t &e);
- void RenderResult(FX_WSTR contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e);
- CFX_WideString encodedContents(FX_WSTR contents, int32_t &e);
- FX_BOOL CheckContentValidity(FX_WSTR contents);
- FX_BOOL CheckExtendedContentValidity(FX_WSTR contents);
- CFX_WideString FilterContents(FX_WSTR contents);
- CFX_WideString FilterExtendedContents(FX_WSTR contents);
- CFX_WideString RenderTextContents(FX_WSTR contents);
- CFX_WideString RenderExtendedTextContents(FX_WSTR contents);
+ void RenderResult(const CFX_WideStringC& contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e);
+ CFX_WideString encodedContents(const CFX_WideStringC& contents, int32_t &e);
+ FX_BOOL CheckContentValidity(const CFX_WideStringC& contents);
+ FX_BOOL CheckExtendedContentValidity(const CFX_WideStringC& contents);
+ CFX_WideString FilterContents(const CFX_WideStringC& contents);
+ CFX_WideString FilterExtendedContents(const CFX_WideStringC& contents);
+ CFX_WideString RenderTextContents(const CFX_WideStringC& contents);
+ CFX_WideString RenderExtendedTextContents(const CFX_WideStringC& contents);
FX_BOOL SetTextLocation(BC_TEXT_LOC loction);
FX_BOOL SetWideNarrowRatio(int32_t ratio);
private:
diff --git a/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp b/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp
index 4b258a5a9f..0ecb3d06a7 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp
@@ -40,7 +40,7 @@ CBC_OnedEAN13Writer::CBC_OnedEAN13Writer()
CBC_OnedEAN13Writer::~CBC_OnedEAN13Writer()
{
}
-FX_BOOL CBC_OnedEAN13Writer::CheckContentValidity(FX_WSTR contents)
+FX_BOOL CBC_OnedEAN13Writer::CheckContentValidity(const CFX_WideStringC& contents)
{
for (int32_t i = 0; i < contents.GetLength(); i++) {
if (contents.GetAt(i) >= '0' && contents.GetAt(i) <= '9') {
@@ -51,7 +51,7 @@ FX_BOOL CBC_OnedEAN13Writer::CheckContentValidity(FX_WSTR contents)
}
return TRUE;
}
-CFX_WideString CBC_OnedEAN13Writer::FilterContents(FX_WSTR contents)
+CFX_WideString CBC_OnedEAN13Writer::FilterContents(const CFX_WideStringC& contents)
{
CFX_WideString filtercontents;
FX_WCHAR ch;
@@ -148,7 +148,7 @@ uint8_t *CBC_OnedEAN13Writer::Encode(const CFX_ByteString &contents, int32_t &ou
}
return result;
}
-void CBC_OnedEAN13Writer::ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice* device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e)
+void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice* device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e)
{
if (device == NULL && pOutBitmap == NULL) {
e = BCExceptionIllegalArgument;
@@ -288,7 +288,7 @@ void CBC_OnedEAN13Writer::ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap,
}
FX_Free(pCharPos);
}
-void CBC_OnedEAN13Writer::RenderResult(FX_WSTR contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e)
+void CBC_OnedEAN13Writer::RenderResult(const CFX_WideStringC& contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e)
{
CBC_OneDimWriter::RenderResult(contents, code, codeLength, isDevice, e);
}
diff --git a/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.h b/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.h
index df9d635a4e..357db75ead 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.h
+++ b/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.h
@@ -21,11 +21,11 @@ public:
uint8_t* Encode(const CFX_ByteString &contents, BCFORMAT format,
int32_t &outWidth, int32_t &outHeight, int32_t hints, int32_t &e);
uint8_t* Encode(const CFX_ByteString &contents, int32_t &outLength, int32_t &e);
- void RenderResult(FX_WSTR contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e);
- FX_BOOL CheckContentValidity(FX_WSTR contents);
- CFX_WideString FilterContents(FX_WSTR contents);
+ void RenderResult(const CFX_WideStringC& contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e);
+ FX_BOOL CheckContentValidity(const CFX_WideStringC& contents);
+ CFX_WideString FilterContents(const CFX_WideStringC& contents);
int32_t CalcChecksum(const CFX_ByteString &contents);
protected:
- void ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice* device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e);
+ void ShowChars(const CFX_WideStringC& contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice* device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e);
};
#endif
diff --git a/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp b/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp
index fdf791c686..4c9e13d131 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp
@@ -52,7 +52,7 @@ FX_BOOL CBC_OnedEAN8Writer::SetTextLocation(BC_TEXT_LOC location)
}
return FALSE;
}
-FX_BOOL CBC_OnedEAN8Writer::CheckContentValidity(FX_WSTR contents)
+FX_BOOL CBC_OnedEAN8Writer::CheckContentValidity(const CFX_WideStringC& contents)
{
for (int32_t i = 0; i < contents.GetLength(); i++) {
if (contents.GetAt(i) >= '0' && contents.GetAt(i) <= '9') {
@@ -63,7 +63,7 @@ FX_BOOL CBC_OnedEAN8Writer::CheckContentValidity(FX_WSTR contents)
}
return TRUE;
}
-CFX_WideString CBC_OnedEAN8Writer::FilterContents(FX_WSTR contents)
+CFX_WideString CBC_OnedEAN8Writer::FilterContents(const CFX_WideStringC& contents)
{
CFX_WideString filtercontents;
FX_WCHAR ch;
@@ -156,7 +156,7 @@ uint8_t *CBC_OnedEAN8Writer::Encode(const CFX_ByteString &contents, int32_t &out
}
return result;
}
-void CBC_OnedEAN8Writer::ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice* device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e)
+void CBC_OnedEAN8Writer::ShowChars(const CFX_WideStringC& contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice* device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e)
{
if (device == NULL && pOutBitmap == NULL) {
e = BCExceptionIllegalArgument;
@@ -255,7 +255,7 @@ void CBC_OnedEAN8Writer::ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap, C
}
FX_Free(pCharPos);
}
-void CBC_OnedEAN8Writer::RenderResult(FX_WSTR contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e)
+void CBC_OnedEAN8Writer::RenderResult(const CFX_WideStringC& contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e)
{
CBC_OneDimWriter::RenderResult(contents, code, codeLength, isDevice, e);
}
diff --git a/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.h b/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.h
index f2e5cc2cbe..9f7149fc4f 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.h
+++ b/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.h
@@ -19,14 +19,14 @@ public:
uint8_t * Encode(const CFX_ByteString &contents, BCFORMAT format, int32_t &outWidth, int32_t &outHeight , int32_t &e);
uint8_t * Encode(const CFX_ByteString &contents, BCFORMAT format, int32_t &outWidth, int32_t &outHeight, int32_t hints , int32_t &e);
uint8_t * Encode(const CFX_ByteString &contents, int32_t &outLength, int32_t &e);
- void RenderResult(FX_WSTR contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e);
- FX_BOOL CheckContentValidity(FX_WSTR contents);
- CFX_WideString FilterContents(FX_WSTR contents);
+ void RenderResult(const CFX_WideStringC& contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e);
+ FX_BOOL CheckContentValidity(const CFX_WideStringC& contents);
+ CFX_WideString FilterContents(const CFX_WideStringC& contents);
void SetDataLength(int32_t length);
FX_BOOL SetTextLocation(BC_TEXT_LOC location);
int32_t CalcChecksum(const CFX_ByteString &contents);
protected:
- void ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice* device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e);
+ void ShowChars(const CFX_WideStringC& contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice* device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e);
};
#endif
diff --git a/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.cpp b/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.cpp
index 56324a8e1a..547d87872f 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.cpp
@@ -42,7 +42,7 @@ CBC_OnedUPCAWriter::~CBC_OnedUPCAWriter()
}
m_subWriter = NULL;
}
-FX_BOOL CBC_OnedUPCAWriter::CheckContentValidity(FX_WSTR contents)
+FX_BOOL CBC_OnedUPCAWriter::CheckContentValidity(const CFX_WideStringC& contents)
{
int32_t i = 0;
for (i = 0; i < contents.GetLength(); i++) {
@@ -54,7 +54,7 @@ FX_BOOL CBC_OnedUPCAWriter::CheckContentValidity(FX_WSTR contents)
}
return TRUE;
}
-CFX_WideString CBC_OnedUPCAWriter::FilterContents(FX_WSTR contents)
+CFX_WideString CBC_OnedUPCAWriter::FilterContents(const CFX_WideStringC& contents)
{
CFX_WideString filtercontents;
FX_WCHAR ch;
@@ -105,7 +105,7 @@ uint8_t *CBC_OnedUPCAWriter::Encode(const CFX_ByteString &contents, BCFORMAT for
BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
return ret;
}
-void CBC_OnedUPCAWriter::ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice* device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e)
+void CBC_OnedUPCAWriter::ShowChars(const CFX_WideStringC& contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice* device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e)
{
if (device == NULL && pOutBitmap == NULL) {
e = BCExceptionIllegalArgument;
@@ -278,7 +278,7 @@ void CBC_OnedUPCAWriter::ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap, C
}
FX_Free(pCharPos);
}
-void CBC_OnedUPCAWriter::RenderResult(FX_WSTR contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e)
+void CBC_OnedUPCAWriter::RenderResult(const CFX_WideStringC& contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e)
{
CBC_OneDimWriter::RenderResult(contents, code, codeLength, isDevice, e);
}
diff --git a/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.h b/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.h
index ff59f9b660..7ba3b961fb 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.h
+++ b/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.h
@@ -19,13 +19,13 @@ public:
virtual void Init();
uint8_t* Encode(const CFX_ByteString &contents, BCFORMAT format, int32_t &outWidth, int32_t &outHeight, int32_t &e);
uint8_t* Encode(const CFX_ByteString &contents, BCFORMAT format, int32_t &outWidth, int32_t &outHeight, int32_t hints, int32_t &e);
- void RenderResult(FX_WSTR contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e);
- FX_BOOL CheckContentValidity(FX_WSTR contents);
- CFX_WideString FilterContents(FX_WSTR contents);
+ void RenderResult(const CFX_WideStringC& contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e);
+ FX_BOOL CheckContentValidity(const CFX_WideStringC& contents);
+ CFX_WideString FilterContents(const CFX_WideStringC& contents);
int32_t CalcChecksum(const CFX_ByteString &contents);
protected:
- void ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice* device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e);
+ void ShowChars(const CFX_WideStringC& contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice* device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e);
};
#endif
diff --git a/xfa/src/fxfa/src/app/xfa_checksum.cpp b/xfa/src/fxfa/src/app/xfa_checksum.cpp
index 0bb63ce79a..20546df0c6 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()
{
}
-void* CXFA_SAXReaderHandler::OnTagEnter(FX_BSTR bsTagName, FX_SAXNODE eType, FX_DWORD dwStartPos)
+void* CXFA_SAXReaderHandler::OnTagEnter(const CFX_ByteStringC& bsTagName, FX_SAXNODE eType, FX_DWORD dwStartPos)
{
UpdateChecksum(TRUE);
if (eType != FX_SAXNODE_Tag && eType != FX_SAXNODE_Instruction) {
@@ -31,7 +31,7 @@ void* CXFA_SAXReaderHandler::OnTagEnter(FX_BSTR bsTagName, FX_SAXNODE eType, FX_
m_SAXContext.m_bsTagName = bsTagName;
return &m_SAXContext;
}
-void CXFA_SAXReaderHandler::OnTagAttribute(void* pTag, FX_BSTR bsAttri, FX_BSTR bsValue)
+void CXFA_SAXReaderHandler::OnTagAttribute(void* pTag, const CFX_ByteStringC& bsAttri, const CFX_ByteStringC& bsValue)
{
if (pTag == NULL) {
return;
@@ -52,7 +52,7 @@ void CXFA_SAXReaderHandler::OnTagBreak(void* pTag)
textBuf << FX_BSTRC(">");
UpdateChecksum(FALSE);
}
-void CXFA_SAXReaderHandler::OnTagData(void* pTag, FX_SAXNODE eType, FX_BSTR bsData, FX_DWORD dwStartPos)
+void CXFA_SAXReaderHandler::OnTagData(void* pTag, FX_SAXNODE eType, const CFX_ByteStringC& bsData, FX_DWORD dwStartPos)
{
if (pTag == NULL) {
return;
@@ -82,7 +82,7 @@ void CXFA_SAXReaderHandler::OnTagClose(void* pTag, FX_DWORD dwEndPos)
}
UpdateChecksum(FALSE);
}
-void CXFA_SAXReaderHandler::OnTagEnd(void* pTag, FX_BSTR bsTagName, FX_DWORD dwEndPos)
+void CXFA_SAXReaderHandler::OnTagEnd(void* pTag, const CFX_ByteStringC& bsTagName, FX_DWORD dwEndPos)
{
if (pTag == NULL) {
return;
@@ -93,7 +93,7 @@ void CXFA_SAXReaderHandler::OnTagEnd(void* pTag, FX_BSTR bsTagName, FX_DWORD dwE
textBuf << FX_BSTRC(">");
UpdateChecksum(FALSE);
}
-void CXFA_SAXReaderHandler::OnTargetData(void* pTag, FX_SAXNODE eType, FX_BSTR bsData, FX_DWORD dwStartPos)
+void CXFA_SAXReaderHandler::OnTargetData(void* pTag, FX_SAXNODE eType, const CFX_ByteStringC& bsData, FX_DWORD dwStartPos)
{
if (pTag == NULL && eType != FX_SAXNODE_Comment) {
return;
@@ -195,7 +195,7 @@ void CXFA_ChecksumContext::GetChecksum(CFX_ByteString &bsChecksum)
{
bsChecksum = m_bsChecksum;
}
-void CXFA_ChecksumContext::Update(FX_BSTR bsText)
+void CXFA_ChecksumContext::Update(const CFX_ByteStringC& bsText)
{
if (m_pByteContext != NULL) {
CRYPT_SHA1Update(m_pByteContext, bsText.GetPtr(), bsText.GetLength());
diff --git a/xfa/src/fxfa/src/app/xfa_checksum.h b/xfa/src/fxfa/src/app/xfa_checksum.h
index 8b6ecb56a6..4ffe670979 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 void* OnTagEnter(FX_BSTR bsTagName, FX_SAXNODE eType, FX_DWORD dwStartPos);
- virtual void OnTagAttribute(void* pTag, FX_BSTR bsAttri, FX_BSTR bsValue);
+ virtual void* OnTagEnter(const CFX_ByteStringC& bsTagName, FX_SAXNODE eType, FX_DWORD dwStartPos);
+ virtual void OnTagAttribute(void* pTag, const CFX_ByteStringC& bsAttri, const CFX_ByteStringC& bsValue);
virtual void OnTagBreak(void* pTag);
- virtual void OnTagData(void* pTag, FX_SAXNODE eType, FX_BSTR bsData, FX_DWORD dwStartPos);
+ virtual void OnTagData(void* pTag, FX_SAXNODE eType, const CFX_ByteStringC& 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 OnTagEnd(void* pTag, const CFX_ByteStringC& bsTagName, FX_DWORD dwEndPos);
- virtual void OnTargetData(void* pTag, FX_SAXNODE eType, FX_BSTR bsData, FX_DWORD dwStartPos);
+ virtual void OnTargetData(void* pTag, FX_SAXNODE eType, const CFX_ByteStringC& bsData, FX_DWORD dwStartPos);
protected:
void UpdateChecksum(FX_BOOL bCheckSpace);
CXFA_ChecksumContext *m_pContext;
@@ -49,7 +49,7 @@ public:
virtual FX_BOOL UpdateChecksum(IFX_FileRead *pSrcFile, FX_FILESIZE offset = 0, size_t size = 0);
virtual void FinishChecksum();
virtual void GetChecksum(CFX_ByteString &bsChecksum);
- void Update(FX_BSTR bsText);
+ void Update(const CFX_ByteStringC& bsText);
protected:
IFX_SAXReader *m_pSAXReader;
uint8_t* m_pByteContext;
diff --git a/xfa/src/fxfa/src/app/xfa_ffbarcode.cpp b/xfa/src/fxfa/src/app/xfa_ffbarcode.cpp
index 39f11b5a32..3b04a270a2 100644
--- a/xfa/src/fxfa/src/app/xfa_ffbarcode.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffbarcode.cpp
@@ -12,7 +12,7 @@
#include "xfa_ffpageview.h"
#include "xfa_fftextedit.h"
#include "xfa_ffbarcode.h"
-static XFA_LPCBARCODETYPEENUMINFO XFA_GetBarcodeTypeByName(FX_WSTR wsName);
+static XFA_LPCBARCODETYPEENUMINFO XFA_GetBarcodeTypeByName(const CFX_WideStringC& wsName);
CXFA_FFBarcode::CXFA_FFBarcode(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc)
: CXFA_FFTextEdit(pPageView, pDataAcc)
{
@@ -200,7 +200,7 @@ extern const XFA_BARCODETYPEENUMINFO g_XFABarCodeTypeEnumData[] = {
{0xfb48155c, L"code3Of9", XFA_BARCODETYPE_code3Of9, BC_CODE39},
};
extern const int32_t g_iXFABarcodeTypeCount = sizeof(g_XFABarCodeTypeEnumData) / sizeof(XFA_BARCODETYPEENUMINFO);
-static XFA_LPCBARCODETYPEENUMINFO XFA_GetBarcodeTypeByName(FX_WSTR wsName)
+static XFA_LPCBARCODETYPEENUMINFO XFA_GetBarcodeTypeByName(const CFX_WideStringC& wsName)
{
int32_t iLength = wsName.GetLength();
if (iLength == 0) {
diff --git a/xfa/src/fxfa/src/app/xfa_ffchoicelist.cpp b/xfa/src/fxfa/src/app/xfa_ffchoicelist.cpp
index 47685a28a7..56215aff97 100644
--- a/xfa/src/fxfa/src/app/xfa_ffchoicelist.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffchoicelist.cpp
@@ -168,7 +168,7 @@ void CXFA_FFListBox::SetItemState(int32_t nIndex, FX_BOOL bSelected)
m_pNormalWidget->Update();
AddInvalidateRect();
}
-void CXFA_FFListBox::InsertItem(FX_WSTR wsLabel, int32_t nIndex )
+void CXFA_FFListBox::InsertItem(const CFX_WideStringC& wsLabel, int32_t nIndex )
{
CFX_WideString wsTemp(wsLabel);
((CFWL_ListBox*)m_pNormalWidget)->AddString(wsTemp);
@@ -483,7 +483,7 @@ void CXFA_FFComboBox::SetItemState(int32_t nIndex, FX_BOOL bSelected)
m_pNormalWidget->Update();
AddInvalidateRect();
}
-void CXFA_FFComboBox::InsertItem(FX_WSTR wsLabel, int32_t nIndex )
+void CXFA_FFComboBox::InsertItem(const CFX_WideStringC& wsLabel, int32_t nIndex )
{
((CFWL_ComboBox*)m_pNormalWidget)->AddString(wsLabel);
m_pNormalWidget->Update();
diff --git a/xfa/src/fxfa/src/app/xfa_ffchoicelist.h b/xfa/src/fxfa/src/app/xfa_ffchoicelist.h
index c6ed12b668..aeddedbcc9 100644
--- a/xfa/src/fxfa/src/app/xfa_ffchoicelist.h
+++ b/xfa/src/fxfa/src/app/xfa_ffchoicelist.h
@@ -21,7 +21,7 @@ protected:
public:
void OnSelectChanged(IFWL_Widget *pWidget, const CFX_Int32Array &arrSels);
void SetItemState(int32_t nIndex, FX_BOOL bSelected);
- void InsertItem(FX_WSTR wsLabel, int32_t nIndex = -1);
+ void InsertItem(const CFX_WideStringC& wsLabel, int32_t nIndex = -1);
void DeleteItem(int32_t nIndex);
virtual int32_t OnProcessMessage(CFWL_Message *pMessage);
virtual FWL_ERR OnProcessEvent(CFWL_Event *pEvent);
@@ -71,7 +71,7 @@ public:
void OnPostOpen(IFWL_Widget *pWidget);
void OnAddDoRecord(IFWL_Widget *pWidget);
void SetItemState(int32_t nIndex, FX_BOOL bSelected);
- void InsertItem(FX_WSTR wsLabel, int32_t nIndex = -1);
+ void InsertItem(const CFX_WideStringC& wsLabel, int32_t nIndex = -1);
void DeleteItem(int32_t nIndex);
virtual int32_t OnProcessMessage(CFWL_Message *pMessage);
virtual FWL_ERR OnProcessEvent(CFWL_Event *pEvent);
diff --git a/xfa/src/fxfa/src/app/xfa_ffdoc.cpp b/xfa/src/fxfa/src/app/xfa_ffdoc.cpp
index 97514c83ae..36e69dbb65 100644
--- a/xfa/src/fxfa/src/app/xfa_ffdoc.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffdoc.cpp
@@ -327,7 +327,7 @@ CPDF_Document* CXFA_FFDoc::GetPDFDoc()
return m_pPDFDoc;
}
#define _FXLIB_NEW_VERSION_
-CFX_DIBitmap* CXFA_FFDoc::GetPDFNamedImage(FX_WSTR wsName, int32_t &iImageXDpi, int32_t &iImageYDpi)
+CFX_DIBitmap* CXFA_FFDoc::GetPDFNamedImage(const CFX_WideStringC& wsName, int32_t &iImageXDpi, int32_t &iImageYDpi)
{
if (!m_pPDFDoc) {
return NULL;
@@ -399,7 +399,7 @@ CFX_DIBitmap* CXFA_FFDoc::GetPDFNamedImage(FX_WSTR wsName, int32_t &iImageXDpi,
m_mapNamedImages.SetAt((void*)(uintptr_t)dwHash, imageDIBDpi);
return (CFX_DIBitmap*)imageDIBDpi->pDibSource;
}
-IFDE_XMLElement* CXFA_FFDoc::GetPackageData(FX_WSTR wsPackage)
+IFDE_XMLElement* CXFA_FFDoc::GetPackageData(const CFX_WideStringC& wsPackage)
{
FX_DWORD packetHash = FX_HashCode_String_GetW(wsPackage.GetPtr(), wsPackage.GetLength());
CXFA_Object* pObject = m_pDocument->GetXFANode(packetHash);
@@ -410,7 +410,7 @@ IFDE_XMLElement* CXFA_FFDoc::GetPackageData(FX_WSTR wsPackage)
IFDE_XMLNode *pXMLNode = pNode->GetXMLMappingNode();
return (pXMLNode && pXMLNode->GetType() == FDE_XMLNODE_Element) ? (IFDE_XMLElement *)pXMLNode : NULL;
}
-FX_BOOL CXFA_FFDoc::SavePackage(FX_WSTR wsPackage, IFX_FileWrite* pFile, IXFA_ChecksumContext *pCSContext )
+FX_BOOL CXFA_FFDoc::SavePackage(const CFX_WideStringC& wsPackage, IFX_FileWrite* pFile, IXFA_ChecksumContext *pCSContext )
{
IXFA_PacketExport *pExport = IXFA_PacketExport::Create(m_pDocument);
if (!pExport) {
diff --git a/xfa/src/fxfa/src/app/xfa_ffdoc.h b/xfa/src/fxfa/src/app/xfa_ffdoc.h
index a8c5b80370..caea408112 100644
--- a/xfa/src/fxfa/src/app/xfa_ffdoc.h
+++ b/xfa/src/fxfa/src/app/xfa_ffdoc.h
@@ -49,9 +49,9 @@ public:
CXFA_FFDocView* GetDocView(IXFA_DocLayout* pLayout);
CXFA_FFDocView* GetDocView();
CPDF_Document* GetPDFDoc();
- CFX_DIBitmap* GetPDFNamedImage(FX_WSTR wsName, int32_t &iImageXDpi, int32_t &iImageYDpi);
- IFDE_XMLElement* GetPackageData(FX_WSTR wsPackage);
- FX_BOOL SavePackage(FX_WSTR wsPackage, IFX_FileWrite* pFile, IXFA_ChecksumContext *pCSContext = NULL);
+ CFX_DIBitmap* GetPDFNamedImage(const CFX_WideStringC& wsName, int32_t &iImageXDpi, int32_t &iImageYDpi);
+ IFDE_XMLElement* GetPackageData(const CFX_WideStringC& wsPackage);
+ FX_BOOL SavePackage(const CFX_WideStringC& wsPackage, IFX_FileWrite* pFile, IXFA_ChecksumContext *pCSContext = NULL);
FX_BOOL ImportData(IFX_FileRead* pStream, FX_BOOL bXDP = TRUE);
protected:
IXFA_DocProvider* m_pDocProvider;
diff --git a/xfa/src/fxfa/src/app/xfa_ffdochandler.cpp b/xfa/src/fxfa/src/app/xfa_ffdochandler.cpp
index ccc734ecad..79375c21d9 100644
--- a/xfa/src/fxfa/src/app/xfa_ffdochandler.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffdochandler.cpp
@@ -50,11 +50,11 @@ int32_t CXFA_FFDocHandler::CountPackages(IXFA_Doc* hDoc)
void CXFA_FFDocHandler::GetPackageName(IXFA_Doc* hDoc, int32_t iPackage, CFX_WideStringC &wsPackage)
{
}
-IFDE_XMLElement* CXFA_FFDocHandler::GetPackageData(IXFA_Doc* hDoc, FX_WSTR wsPackage)
+IFDE_XMLElement* CXFA_FFDocHandler::GetPackageData(IXFA_Doc* hDoc, const CFX_WideStringC& wsPackage)
{
return static_cast<CXFA_FFDoc*>(hDoc)->GetPackageData(wsPackage);
}
-FX_BOOL CXFA_FFDocHandler::SavePackage(IXFA_Doc* hDoc, FX_WSTR wsPackage, IFX_FileWrite* pFile, IXFA_ChecksumContext *pCSContext )
+FX_BOOL CXFA_FFDocHandler::SavePackage(IXFA_Doc* hDoc, const CFX_WideStringC& wsPackage, IFX_FileWrite* pFile, IXFA_ChecksumContext *pCSContext )
{
return static_cast<CXFA_FFDoc*>(hDoc)->SavePackage(wsPackage, pFile, pCSContext);
}
@@ -99,7 +99,7 @@ XFA_ATTRIBUTEENUM CXFA_FFDocHandler::GetRestoreState(IXFA_Doc* hDoc)
}
return pSubForm->GetEnum(XFA_ATTRIBUTE_RestoreState);
}
-FX_BOOL CXFA_FFDocHandler::RunDocScript(IXFA_Doc* hDoc, XFA_SCRIPTTYPE eScriptType, FX_WSTR wsScript, FXJSE_HVALUE hRetValue, FXJSE_HVALUE hThisObject)
+FX_BOOL CXFA_FFDocHandler::RunDocScript(IXFA_Doc* hDoc, XFA_SCRIPTTYPE eScriptType, const CFX_WideStringC& wsScript, FXJSE_HVALUE hRetValue, FXJSE_HVALUE hThisObject)
{
CXFA_Document* pXFADoc = static_cast<CXFA_FFDoc*>(hDoc)->GetXFADoc();
if (!pXFADoc) {
diff --git a/xfa/src/fxfa/src/app/xfa_ffdochandler.h b/xfa/src/fxfa/src/app/xfa_ffdochandler.h
index a421610d29..b087709bc2 100644
--- a/xfa/src/fxfa/src/app/xfa_ffdochandler.h
+++ b/xfa/src/fxfa/src/app/xfa_ffdochandler.h
@@ -22,14 +22,14 @@ public:
virtual IXFA_DocView* CreateDocView(IXFA_Doc* hDoc, FX_DWORD dwView = 0);
virtual int32_t CountPackages(IXFA_Doc* hDoc);
virtual void GetPackageName(IXFA_Doc* hDoc, int32_t iPackage, CFX_WideStringC &wsPackage);
- virtual IFDE_XMLElement* GetPackageData(IXFA_Doc* hDoc, FX_WSTR wsPackage);
- virtual FX_BOOL SavePackage(IXFA_Doc* hDoc, FX_WSTR wsPackage, IFX_FileWrite* pFile, IXFA_ChecksumContext *pCSContext = NULL);
+ virtual IFDE_XMLElement* GetPackageData(IXFA_Doc* hDoc, const CFX_WideStringC& wsPackage);
+ virtual FX_BOOL SavePackage(IXFA_Doc* hDoc, const CFX_WideStringC& wsPackage, IFX_FileWrite* pFile, IXFA_ChecksumContext *pCSContext = NULL);
virtual FX_BOOL CloseDoc(IXFA_Doc* hDoc);
virtual FX_BOOL ImportData(IXFA_Doc* hDoc, IFX_FileRead* pStream, FX_BOOL bXDP = TRUE);
virtual void SetJSERuntime(IXFA_Doc* hDoc, FXJSE_HRUNTIME hRuntime);
virtual FXJSE_HVALUE GetXFAScriptObject(IXFA_Doc* hDoc);
virtual XFA_ATTRIBUTEENUM GetRestoreState(IXFA_Doc* hDoc);
- virtual FX_BOOL RunDocScript(IXFA_Doc* hDoc, XFA_SCRIPTTYPE eScriptType, FX_WSTR wsScript, FXJSE_HVALUE hRetValue, FXJSE_HVALUE hThisObject);
+ virtual FX_BOOL RunDocScript(IXFA_Doc* hDoc, XFA_SCRIPTTYPE eScriptType, const CFX_WideStringC& wsScript, FXJSE_HVALUE hRetValue, FXJSE_HVALUE hThisObject);
protected:
};
diff --git a/xfa/src/fxfa/src/app/xfa_ffdocview.cpp b/xfa/src/fxfa/src/app/xfa_ffdocview.cpp
index 1532e28607..e67612dbf4 100644
--- a/xfa/src/fxfa/src/app/xfa_ffdocview.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffdocview.cpp
@@ -222,11 +222,11 @@ IXFA_PageView* CXFA_FFDocView::GetPageView(int32_t nIndex)
}
return (CXFA_FFPageView*)m_pXFADocLayout->GetPage(nIndex);
}
-IXFA_Widget* CXFA_FFDocView::GetWidgetByName(FX_WSTR wsName)
+IXFA_Widget* CXFA_FFDocView::GetWidgetByName(const CFX_WideStringC& wsName)
{
return GetWidgetByName(wsName, NULL);
}
-CXFA_WidgetAcc* CXFA_FFDocView::GetWidgetAccByName(FX_WSTR wsName)
+CXFA_WidgetAcc* CXFA_FFDocView::GetWidgetAccByName(const CFX_WideStringC& wsName)
{
return GetWidgetAccByName(wsName, NULL);
}
@@ -504,7 +504,7 @@ int32_t CXFA_FFDocView::ExecEventActivityByDeepFirst(CXFA_Node* pFormNode, XFA_E
iRet |= XFA_ProcessEvent(this, pWidgetAcc, &eParam);
return iRet;
}
-CXFA_FFWidget* CXFA_FFDocView::GetWidgetByName(FX_WSTR wsName, CXFA_FFWidget* pRefWidget )
+CXFA_FFWidget* CXFA_FFDocView::GetWidgetByName(const CFX_WideStringC& wsName, CXFA_FFWidget* pRefWidget )
{
CXFA_WidgetAcc* pRefAcc = pRefWidget ? pRefWidget->GetDataAcc() : NULL;
if (CXFA_WidgetAcc* pAcc = GetWidgetAccByName(wsName, pRefAcc)) {
@@ -512,7 +512,7 @@ CXFA_FFWidget* CXFA_FFDocView::GetWidgetByName(FX_WSTR wsName, CXFA_FFWidget* pR
}
return NULL;
}
-CXFA_WidgetAcc* CXFA_FFDocView::GetWidgetAccByName(FX_WSTR wsName, CXFA_WidgetAcc* pRefWidgetAcc )
+CXFA_WidgetAcc* CXFA_FFDocView::GetWidgetAccByName(const CFX_WideStringC& wsName, CXFA_WidgetAcc* pRefWidgetAcc )
{
CFX_WideString wsExpression;
FX_DWORD dwStyle = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_Parent;
diff --git a/xfa/src/fxfa/src/app/xfa_ffdocview.h b/xfa/src/fxfa/src/app/xfa_ffdocview.h
index e7493e653d..557a39f3f6 100644
--- a/xfa/src/fxfa/src/app/xfa_ffdocview.h
+++ b/xfa/src/fxfa/src/app/xfa_ffdocview.h
@@ -45,8 +45,8 @@ public:
virtual void UpdateDocView();
virtual int32_t CountPageViews();
virtual IXFA_PageView* GetPageView(int32_t nIndex);
- virtual IXFA_Widget* GetWidgetByName(FX_WSTR wsName);
- virtual CXFA_WidgetAcc* GetWidgetAccByName(FX_WSTR wsName);
+ virtual IXFA_Widget* GetWidgetByName(const CFX_WideStringC& wsName);
+ virtual CXFA_WidgetAcc* GetWidgetAccByName(const CFX_WideStringC& wsName);
virtual void ResetWidgetData(CXFA_WidgetAcc* pWidgetAcc = NULL);
virtual int32_t ProcessWidgetEvent(CXFA_EventParam* pParam, CXFA_WidgetAcc* pWidgetAcc = NULL);
virtual IXFA_WidgetHandler* GetWidgetHandler();
@@ -55,8 +55,8 @@ public:
virtual IXFA_Widget* GetFocusWidget();
virtual void KillFocus();
virtual FX_BOOL SetFocus(IXFA_Widget* hWidget);
- CXFA_FFWidget* GetWidgetByName(FX_WSTR wsName, CXFA_FFWidget* pRefWidget = NULL);
- CXFA_WidgetAcc* GetWidgetAccByName(FX_WSTR wsName, CXFA_WidgetAcc* pRefWidgetAcc = NULL);
+ CXFA_FFWidget* GetWidgetByName(const CFX_WideStringC& wsName, CXFA_FFWidget* pRefWidget = NULL);
+ CXFA_WidgetAcc* GetWidgetAccByName(const CFX_WideStringC& wsName, CXFA_WidgetAcc* pRefWidgetAcc = NULL);
IXFA_DocLayout* GetXFALayout() const;
void OnPageEvent(IXFA_LayoutPage *pSender, XFA_PAGEEVENT eEvent, int32_t iPageIndex);
void LockUpdate();
diff --git a/xfa/src/fxfa/src/app/xfa_ffnotify.cpp b/xfa/src/fxfa/src/app/xfa_ffnotify.cpp
index 3f96278e24..ebaf4b2674 100644
--- a/xfa/src/fxfa/src/app/xfa_ffnotify.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffnotify.cpp
@@ -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)(const FX_WCHAR*)pParam, (int32_t)(uintptr_t)pAdditional2);
+ ((CXFA_FFListBox*)pWidget)->InsertItem((const CFX_WideStringC&)(const FX_WCHAR*)pParam, (int32_t)(uintptr_t)pAdditional2);
} else {
- ((CXFA_FFComboBox*)pWidget)->InsertItem((FX_WSTR)(const FX_WCHAR*)pParam, (int32_t)(uintptr_t)pAdditional2);
+ ((CXFA_FFComboBox*)pWidget)->InsertItem((const CFX_WideStringC&)(const FX_WCHAR*)pParam, (int32_t)(uintptr_t)pAdditional2);
}
}
if (bStaticNotify) {
diff --git a/xfa/src/fxfa/src/app/xfa_ffpageview.cpp b/xfa/src/fxfa/src/app/xfa_ffpageview.cpp
index ccc5d07d1a..97c5b71089 100644
--- a/xfa/src/fxfa/src/app/xfa_ffpageview.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffpageview.cpp
@@ -290,7 +290,7 @@ CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::GetTraverseWidget(CXFA_FFWidge
}
return NULL;
}
-CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::FindWidgetByName(FX_WSTR wsWidgetName, CXFA_FFWidget* pRefWidget)
+CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::FindWidgetByName(const CFX_WideStringC& wsWidgetName, CXFA_FFWidget* pRefWidget)
{
return pRefWidget->GetDocView()->GetWidgetByName(wsWidgetName, pRefWidget);
}
diff --git a/xfa/src/fxfa/src/app/xfa_ffpageview.h b/xfa/src/fxfa/src/app/xfa_ffpageview.h
index b80248bf0a..d417451331 100644
--- a/xfa/src/fxfa/src/app/xfa_ffpageview.h
+++ b/xfa/src/fxfa/src/app/xfa_ffpageview.h
@@ -90,7 +90,7 @@ protected:
int32_t m_iCurWidget;
FX_BOOL m_bIgnorerelevant;
CXFA_FFWidget* GetTraverseWidget(CXFA_FFWidget* pWidget);
- CXFA_FFWidget* FindWidgetByName(FX_WSTR wsWidgetName, CXFA_FFWidget* pRefWidget);
+ CXFA_FFWidget* FindWidgetByName(const CFX_WideStringC& wsWidgetName, CXFA_FFWidget* pRefWidget);
void CreateTabOrderWidgetArray();
void CreateSpaceOrderWidgetArray(CXFA_WidgetArray& WidgetArray);
CXFA_FFWidget* GetWidget(CXFA_LayoutItem* pLayoutItem);
diff --git a/xfa/src/fxfa/src/app/xfa_fftextedit.cpp b/xfa/src/fxfa/src/app/xfa_fftextedit.cpp
index d04a561b4c..3cf94523c1 100644
--- a/xfa/src/fxfa/src/app/xfa_fftextedit.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fftextedit.cpp
@@ -346,7 +346,7 @@ FX_BOOL CXFA_FFTextEdit::GetSuggestWords(CFX_PointF pointf, CFX_ByteStringArray
FWLToClient(pointf.x, pointf.y);
return ((CFWL_Edit*)m_pNormalWidget)->GetSuggestWords(pointf, sSuggest);
}
-FX_BOOL CXFA_FFTextEdit::ReplaceSpellCheckWord(CFX_PointF pointf, FX_BSTR bsReplace)
+FX_BOOL CXFA_FFTextEdit::ReplaceSpellCheckWord(CFX_PointF pointf, const CFX_ByteStringC& bsReplace)
{
if (m_pDataAcc->GetUIType() != XFA_ELEMENT_TextEdit) {
return FALSE;
@@ -390,14 +390,14 @@ void CXFA_FFTextEdit::OnAddDoRecord(IFWL_Widget *pWidget)
{
GetDoc()->GetDocProvider()->AddDoRecord(this);
}
-FX_BOOL CXFA_FFTextEdit::CheckWord(FX_BSTR sWord)
+FX_BOOL CXFA_FFTextEdit::CheckWord(const CFX_ByteStringC& sWord)
{
if (sWord.IsEmpty() || m_pDataAcc->GetUIType() != XFA_ELEMENT_TextEdit) {
return TRUE;
}
return GetDoc()->GetDocProvider()->CheckWord(GetDoc(), sWord);
}
-FX_BOOL CXFA_FFTextEdit::GetSuggestWords(FX_BSTR sWord, CFX_ByteStringArray &sSuggest)
+FX_BOOL CXFA_FFTextEdit::GetSuggestWords(const CFX_ByteStringC& sWord, CFX_ByteStringArray &sSuggest)
{
if (m_pDataAcc->GetUIType() != XFA_ELEMENT_TextEdit) {
return FALSE;
diff --git a/xfa/src/fxfa/src/app/xfa_fftextedit.h b/xfa/src/fxfa/src/app/xfa_fftextedit.h
index ece1a4b9e3..cd2dae24a9 100644
--- a/xfa/src/fxfa/src/app/xfa_fftextedit.h
+++ b/xfa/src/fxfa/src/app/xfa_fftextedit.h
@@ -33,7 +33,7 @@ public:
virtual FX_BOOL Delete();
virtual FX_BOOL DeSelect();
FX_BOOL GetSuggestWords(CFX_PointF pointf, CFX_ByteStringArray &sSuggest);
- FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, FX_BSTR bsReplace);
+ FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, const CFX_ByteStringC& bsReplace);
protected:
FX_DWORD GetAlignment();
virtual FX_BOOL CommitData();
@@ -45,8 +45,8 @@ public:
void OnTextChanged(IFWL_Widget *pWidget, const CFX_WideString &wsChanged, const CFX_WideString &wsPrevText);
void OnTextFull(IFWL_Widget *pWidget);
void OnAddDoRecord(IFWL_Widget *pWidget);
- FX_BOOL CheckWord(FX_BSTR sWord);
- FX_BOOL GetSuggestWords(FX_BSTR sWord, CFX_ByteStringArray &sSuggest);
+ FX_BOOL CheckWord(const CFX_ByteStringC& sWord);
+ FX_BOOL GetSuggestWords(const CFX_ByteStringC& sWord, CFX_ByteStringArray &sSuggest);
virtual int32_t OnProcessMessage(CFWL_Message *pMessage);
virtual FWL_ERR OnProcessEvent(CFWL_Event *pEvent);
virtual FWL_ERR OnDrawWidget(CFX_Graphics *pGraphics, const CFX_Matrix *pMatrix = NULL);
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidget.cpp b/xfa/src/fxfa/src/app/xfa_ffwidget.cpp
index be1418169f..b0cec0b9af 100644
--- a/xfa/src/fxfa/src/app/xfa_ffwidget.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffwidget.cpp
@@ -938,7 +938,7 @@ FX_CHAR* XFA_Base64Encode(const uint8_t* buf, int32_t buf_len)
out[j] = '\0';
return out;
}
-FXCODEC_IMAGE_TYPE XFA_GetImageType(FX_WSTR wsType)
+FXCODEC_IMAGE_TYPE XFA_GetImageType(const CFX_WideStringC& wsType)
{
CFX_WideString wsContentType(wsType);
wsContentType.MakeLower();
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidget.h b/xfa/src/fxfa/src/app/xfa_ffwidget.h
index b1d33bb94b..c45def90e9 100644
--- a/xfa/src/fxfa/src/app/xfa_ffwidget.h
+++ b/xfa/src/fxfa/src/app/xfa_ffwidget.h
@@ -146,7 +146,7 @@ public:
{
return FALSE;
}
- virtual FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, FX_BSTR bsReplace)
+ virtual FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, const CFX_ByteStringC& bsReplace)
{
return FALSE;
}
@@ -193,7 +193,7 @@ CFX_GraphStateData::LineCap XFA_LineCapToFXGE(int32_t iLineCap);
void XFA_DrawImage(CFX_Graphics* pGS, const CFX_RectF &rtImage, CFX_Matrix* pMatrix, CFX_DIBitmap* pDIBitmap, int32_t iAspect, int32_t iImageXDpi, int32_t iImageYDpi, int32_t iHorzAlign = XFA_ATTRIBUTEENUM_Left, int32_t iVertAlign = XFA_ATTRIBUTEENUM_Top);
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);
+FXCODEC_IMAGE_TYPE XFA_GetImageType(const CFX_WideStringC& wsType);
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);
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp b/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp
index e12a50e8e5..405e58e14c 100644
--- a/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp
@@ -296,7 +296,7 @@ void CXFA_WidgetAcc::ResetData()
break;
}
}
-void CXFA_WidgetAcc::SetImageEdit(FX_WSTR wsContentType, FX_WSTR wsHref, FX_WSTR wsData)
+void CXFA_WidgetAcc::SetImageEdit(const CFX_WideStringC& wsContentType, const CFX_WideStringC& wsHref, const CFX_WideStringC& wsData)
{
CXFA_Image image = GetFormValue().GetImage();
if (image) {
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp b/xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp
index cdaaeccd6e..348fe3d621 100644
--- a/xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp
@@ -585,7 +585,7 @@ FX_BOOL CXFA_FFMenuHandler::GetSuggestWords(IXFA_Widget* hWidget, CFX_PointF poi
{
return static_cast<CXFA_FFWidget*>(hWidget)->GetSuggestWords(pointf, sSuggest);
}
-FX_BOOL CXFA_FFMenuHandler::ReplaceSpellCheckWord(IXFA_Widget* hWidget, CFX_PointF pointf, FX_BSTR bsReplace)
+FX_BOOL CXFA_FFMenuHandler::ReplaceSpellCheckWord(IXFA_Widget* hWidget, CFX_PointF pointf, const CFX_ByteStringC& bsReplace)
{
return static_cast<CXFA_FFWidget*>(hWidget)->ReplaceSpellCheckWord(pointf, bsReplace);
}
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidgethandler.h b/xfa/src/fxfa/src/app/xfa_ffwidgethandler.h
index bc4afce02d..4477f1f10e 100644
--- a/xfa/src/fxfa/src/app/xfa_ffwidgethandler.h
+++ b/xfa/src/fxfa/src/app/xfa_ffwidgethandler.h
@@ -99,6 +99,6 @@ public:
virtual FX_BOOL Undo(IXFA_Widget* hWidget);
virtual FX_BOOL Redo(IXFA_Widget* hWidget);
virtual FX_BOOL GetSuggestWords(IXFA_Widget* hWidget, CFX_PointF pointf, CFX_ByteStringArray &sSuggest);
- virtual FX_BOOL ReplaceSpellCheckWord(IXFA_Widget* hWidget, CFX_PointF pointf, FX_BSTR bsReplace);
+ virtual FX_BOOL ReplaceSpellCheckWord(IXFA_Widget* hWidget, CFX_PointF pointf, const CFX_ByteStringC& bsReplace);
};
#endif
diff --git a/xfa/src/fxfa/src/app/xfa_fontmgr.cpp b/xfa/src/fxfa/src/app/xfa_fontmgr.cpp
index db1742b788..88926bdaa8 100644
--- a/xfa/src/fxfa/src/app/xfa_fontmgr.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fontmgr.cpp
@@ -961,7 +961,7 @@ static const XFA_FONTINFO g_XFAFontsMap[] = {
{0xfef135f8, L"AdobeHeitiStd-Regular", L"Droid Sans Fallback", 0, 936},
};
#endif
-void XFA_LocalFontNameToEnglishName(FX_WSTR wsLocalName, CFX_WideString &wsEnglishName)
+void XFA_LocalFontNameToEnglishName(const CFX_WideStringC& wsLocalName, CFX_WideString &wsEnglishName)
{
wsEnglishName = wsLocalName;
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ || _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_ || _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || _FXM_PLATFORM_ == _FXM_PLATFORM_ANDROID_
@@ -983,7 +983,7 @@ void XFA_LocalFontNameToEnglishName(FX_WSTR wsLocalName, CFX_WideString &wsEngli
} while (iEnd >= iStart);
#endif
}
-const XFA_FONTINFO* XFA_GetFontINFOByFontName(FX_WSTR wsFontName)
+const XFA_FONTINFO* XFA_GetFontINFOByFontName(const CFX_WideStringC& wsFontName)
{
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ || _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_ || _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || _FXM_PLATFORM_ == _FXM_PLATFORM_ANDROID_
CFX_WideString wsFontNameTemp = wsFontName;
@@ -1028,7 +1028,7 @@ CXFA_DefFontMgr::~CXFA_DefFontMgr()
m_CacheFonts.RemoveAll();
}
#define _FXFA_USEGASFONTMGR_
-IFX_Font* CXFA_DefFontMgr::GetFont(IXFA_Doc* hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage )
+IFX_Font* CXFA_DefFontMgr::GetFont(IXFA_Doc* hDoc, const CFX_WideStringC& wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage )
{
CFX_WideString wsFontName = wsFontFamily;
IFX_FontMgr* pFDEFontMgr = ((CXFA_FFDoc*)hDoc)->GetApp()->GetFDEFontMgr();
@@ -1081,7 +1081,7 @@ IFX_Font* CXFA_DefFontMgr::GetFont(IXFA_Doc* hDoc, FX_WSTR wsFontFamily, FX_DWOR
}
return pFont;
}
-IFX_Font* CXFA_DefFontMgr::GetDefaultFont(IXFA_Doc* hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage)
+IFX_Font* CXFA_DefFontMgr::GetDefaultFont(IXFA_Doc* hDoc, const CFX_WideStringC& wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage)
{
IFX_FontMgr* pFDEFontMgr = ((CXFA_FFDoc*)hDoc)->GetApp()->GetFDEFontMgr();
#ifdef _FXFA_USEGASFONTMGR_
@@ -1181,7 +1181,7 @@ IFX_Font* CXFA_PDFFontMgr::FindFont(CFX_ByteString strPsName, FX_BOOL bBold, FX_
}
return NULL;
}
-IFX_Font* CXFA_PDFFontMgr::GetFont(FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, CPDF_Font** pPDFFont, FX_BOOL bStrictMatch )
+IFX_Font* CXFA_PDFFontMgr::GetFont(const CFX_WideStringC& wsFontFamily, FX_DWORD dwFontStyles, CPDF_Font** pPDFFont, FX_BOOL bStrictMatch )
{
FX_DWORD dwHashCode = FX_HashCode_String_GetW(wsFontFamily.GetPtr(), wsFontFamily.GetLength());
CFX_ByteString strKey;
@@ -1213,7 +1213,7 @@ CFX_ByteString CXFA_PDFFontMgr::PsNameToFontName(const CFX_ByteString& strPsName
}
return strPsName;
}
-FX_BOOL CXFA_PDFFontMgr::PsNameMatchDRFontName(FX_BSTR bsPsName, FX_BOOL bBold, FX_BOOL bItalic, const CFX_ByteString& bsDRFontName, FX_BOOL bStrictMatch)
+FX_BOOL CXFA_PDFFontMgr::PsNameMatchDRFontName(const CFX_ByteStringC& bsPsName, FX_BOOL bBold, FX_BOOL bItalic, const CFX_ByteString& bsDRFontName, FX_BOOL bStrictMatch)
{
CFX_ByteString bsDRName = bsDRFontName;
bsDRName.Remove('-');
@@ -1305,7 +1305,7 @@ CXFA_FontMgr::~CXFA_FontMgr()
{
DelAllMgrMap();
}
-IFX_Font* CXFA_FontMgr::GetFont(IXFA_Doc* hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles,
+IFX_Font* CXFA_FontMgr::GetFont(IXFA_Doc* hDoc, const CFX_WideStringC& wsFontFamily, FX_DWORD dwFontStyles,
FX_WORD wCodePage )
{
FX_DWORD dwHash = FX_HashCode_String_GetW(wsFontFamily.GetPtr(), wsFontFamily.GetLength(), FALSE);
diff --git a/xfa/src/fxfa/src/app/xfa_fontmgr.h b/xfa/src/fxfa/src/app/xfa_fontmgr.h
index 3a41cea913..d8f77841c5 100644
--- a/xfa/src/fxfa/src/app/xfa_fontmgr.h
+++ b/xfa/src/fxfa/src/app/xfa_fontmgr.h
@@ -18,8 +18,8 @@ class CXFA_DefFontMgr : public IXFA_FontMgr
public:
CXFA_DefFontMgr() {}
~CXFA_DefFontMgr() override;
- virtual IFX_Font* GetFont(IXFA_Doc* hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF);
- virtual IFX_Font* GetDefaultFont(IXFA_Doc* hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF);
+ virtual IFX_Font* GetFont(IXFA_Doc* hDoc, const CFX_WideStringC& wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF);
+ virtual IFX_Font* GetDefaultFont(IXFA_Doc* hDoc, const CFX_WideStringC& wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF);
protected:
CFX_PtrArray m_CacheFonts;
};
@@ -28,13 +28,13 @@ class CXFA_PDFFontMgr : public IFX_FontProvider
public:
CXFA_PDFFontMgr(CXFA_FFDoc* pDoc);
~CXFA_PDFFontMgr();
- IFX_Font* GetFont(FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, CPDF_Font** pPDFFont, FX_BOOL bStrictMatch = TRUE);
+ IFX_Font* GetFont(const CFX_WideStringC& wsFontFamily, FX_DWORD dwFontStyles, CPDF_Font** pPDFFont, FX_BOOL bStrictMatch = TRUE);
FX_BOOL GetCharWidth(IFX_Font* pFont, FX_WCHAR wUnicode, int32_t &iWidth, FX_BOOL bCharCode);
CFX_MapPtrToPtr m_FDE2PDFFont;
protected:
IFX_Font* FindFont(CFX_ByteString strFamilyName, FX_BOOL bBold, FX_BOOL bItalic, CPDF_Font** pPDFFont, FX_BOOL bStrictMatch = TRUE);
CFX_ByteString PsNameToFontName(const CFX_ByteString& strPsName, FX_BOOL bBold, FX_BOOL bItalic);
- FX_BOOL PsNameMatchDRFontName(FX_BSTR bsPsName, FX_BOOL bBold, FX_BOOL bItalic, const CFX_ByteString& bsDRFontName, FX_BOOL bStrictMatch = TRUE);
+ FX_BOOL PsNameMatchDRFontName(const CFX_ByteStringC& bsPsName, FX_BOOL bBold, FX_BOOL bItalic, const CFX_ByteString& bsDRFontName, FX_BOOL bStrictMatch = TRUE);
CXFA_FFDoc* m_pDoc;
CFX_CMapByteStringToPtr m_FontArray;
};
@@ -43,7 +43,7 @@ class CXFA_FontMgr
public:
CXFA_FontMgr();
~CXFA_FontMgr();
- IFX_Font* GetFont(IXFA_Doc* hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles,
+ IFX_Font* GetFont(IXFA_Doc* hDoc, const CFX_WideStringC& wsFontFamily, FX_DWORD dwFontStyles,
FX_WORD wCodePage = 0xFFFF);
void LoadDocFonts(IXFA_Doc* hDoc);
void ReleaseDocFonts(IXFA_Doc* hDoc);
diff --git a/xfa/src/fxfa/src/app/xfa_fwladapter.h b/xfa/src/fxfa/src/app/xfa_fwladapter.h
index 1ddfcf4113..62975ff0da 100644
--- a/xfa/src/fxfa/src/app/xfa_fwladapter.h
+++ b/xfa/src/fxfa/src/app/xfa_fwladapter.h
@@ -36,11 +36,11 @@ public:
return CXFA_Edge(NULL);
}
virtual void GetUIMargin(CFX_RectF &rtMargin) {}
- virtual FX_BOOL CheckWord(FX_BSTR sWord)
+ virtual FX_BOOL CheckWord(const CFX_ByteStringC& sWord)
{
return TRUE;
}
- virtual FX_BOOL GetSuggestWords(FX_BSTR sWord, CFX_ByteStringArray &sSuggest)
+ virtual FX_BOOL GetSuggestWords(const CFX_ByteStringC& sWord, CFX_ByteStringArray &sSuggest)
{
return FALSE;
}
diff --git a/xfa/src/fxfa/src/common/xfa_document.h b/xfa/src/fxfa/src/common/xfa_document.h
index 6ef3fd776c..20b8e1a020 100644
--- a/xfa/src/fxfa/src/common/xfa_document.h
+++ b/xfa/src/fxfa/src/common/xfa_document.h
@@ -121,7 +121,7 @@ public:
}
IXFA_Notify* GetNotify() const;
void SetRoot(CXFA_Node* pNewRoot);
- CXFA_Object* GetXFANode(FX_WSTR wsNodeName);
+ CXFA_Object* GetXFANode(const CFX_WideStringC& wsNodeName);
CXFA_Object* GetXFANode(FX_DWORD wsNodeNameHash);
void AddPurgeNode(CXFA_Node *pNode);
FX_BOOL RemovePurgeNode(CXFA_Node *pNode);
@@ -141,7 +141,7 @@ public:
virtual CXFA_Node* CreateNode(FX_DWORD dwPacket, XFA_ELEMENT eElement);
virtual CXFA_Node* CreateNode(XFA_LPCPACKETINFO pPacket, XFA_ELEMENT eElement);
void DoProtoMerge();
- CXFA_Node* GetNodeByID(CXFA_Node* pRoot, FX_WSTR wsID);
+ CXFA_Node* GetNodeByID(CXFA_Node* pRoot, const CFX_WideStringC& wsID);
void DoDataMerge();
void DoDataRemerge(FX_BOOL bDoDataMerge);
diff --git a/xfa/src/fxfa/src/common/xfa_fm2jsapi.h b/xfa/src/fxfa/src/common/xfa_fm2jsapi.h
index 511b1b7a1a..41fee6d133 100644
--- a/xfa/src/fxfa/src/common/xfa_fm2jsapi.h
+++ b/xfa/src/fxfa/src/common/xfa_fm2jsapi.h
@@ -14,7 +14,7 @@ extern "C"
typedef struct XFA_HFM2JSCONTEXT_ {
void** pData;
}* XFA_HFM2JSCONTEXT;
-int32_t XFA_FM2JS_Translate(FX_WSTR wsFormcalc, CFX_WideTextBuf& wsJavascript, CFX_WideString& wsError);
+int32_t XFA_FM2JS_Translate(const CFX_WideStringC& wsFormcalc, CFX_WideTextBuf& wsJavascript, CFX_WideString& wsError);
XFA_HFM2JSCONTEXT XFA_FM2JS_ContextCreate();
void XFA_FM2JS_ContextInitialize(XFA_HFM2JSCONTEXT hFM2JSContext, FXJSE_HRUNTIME hScriptRuntime,
FXJSE_HCONTEXT hScriptContext,
diff --git a/xfa/src/fxfa/src/common/xfa_localemgr.h b/xfa/src/fxfa/src/common/xfa_localemgr.h
index ff3ab3927f..14981ca418 100644
--- a/xfa/src/fxfa/src/common/xfa_localemgr.h
+++ b/xfa/src/fxfa/src/common/xfa_localemgr.h
@@ -33,7 +33,7 @@ public:
virtual FX_WORD GetDefLocaleID();
virtual IFX_Locale* GetDefLocale();
virtual IFX_Locale* GetLocale(FX_WORD lcid);
- virtual IFX_Locale* GetLocaleByName(FX_WSTR wsLocaleName);
+ virtual IFX_Locale* GetLocaleByName(const CFX_WideStringC& wsLocaleName);
~CXFA_LocaleMgr();
void SetDefLocale(IFX_Locale* pLocale);
CFX_WideStringC GetConfigLocaleName(CXFA_Node* pConfig);
diff --git a/xfa/src/fxfa/src/common/xfa_object.h b/xfa/src/fxfa/src/common/xfa_object.h
index 4d2c764457..69c80da73e 100644
--- a/xfa/src/fxfa/src/common/xfa_object.h
+++ b/xfa/src/fxfa/src/common/xfa_object.h
@@ -163,11 +163,11 @@ public:
CXFA_Node* GetModelNode();
void UpdateNameHash();
FX_BOOL HasAttribute(XFA_ATTRIBUTE eAttr, FX_BOOL bCanInherit = FALSE);
- FX_BOOL SetAttribute(XFA_ATTRIBUTE eAttr, FX_WSTR wsValue, FX_BOOL bNotify = FALSE);
+ FX_BOOL SetAttribute(XFA_ATTRIBUTE eAttr, const CFX_WideStringC& wsValue, FX_BOOL bNotify = FALSE);
FX_BOOL GetAttribute(XFA_ATTRIBUTE eAttr, CFX_WideString &wsValue, FX_BOOL bUseDefault = TRUE);
- FX_BOOL SetAttribute(FX_WSTR wsAttr, FX_WSTR wsValue, FX_BOOL bNotify = FALSE);
- FX_BOOL GetAttribute(FX_WSTR wsAttr, CFX_WideString &wsValue, FX_BOOL bUseDefault = TRUE);
- FX_BOOL RemoveAttribute(FX_WSTR wsAttr);
+ FX_BOOL SetAttribute(const CFX_WideStringC& wsAttr, const CFX_WideStringC& wsValue, FX_BOOL bNotify = FALSE);
+ FX_BOOL GetAttribute(const CFX_WideStringC& wsAttr, CFX_WideString &wsValue, FX_BOOL bUseDefault = TRUE);
+ FX_BOOL RemoveAttribute(const CFX_WideStringC& wsAttr);
FX_BOOL SetContent(const CFX_WideString& wsContent, const CFX_WideString& wsXMLValue, FX_BOOL bNotify = FALSE, FX_BOOL bScriptModify = FALSE, FX_BOOL bSyncData = TRUE);
FX_BOOL TryContent(CFX_WideString& wsContent, FX_BOOL bScriptModify = FALSE, FX_BOOL bProto = TRUE);
CFX_WideString GetContent();
@@ -259,11 +259,11 @@ public:
CXFA_WidgetData* GetContainerWidgetData();
FX_BOOL GetLocaleName(CFX_WideString& wsLocaleName);
XFA_ATTRIBUTEENUM GetIntact();
- CXFA_Node* GetFirstChildByName(FX_WSTR wsNodeName) const;
+ CXFA_Node* GetFirstChildByName(const CFX_WideStringC& wsNodeName) const;
CXFA_Node* GetFirstChildByName(FX_DWORD dwNodeNameHash) const;
CXFA_Node* GetFirstChildByClass(XFA_ELEMENT eNodeClass) const;
CXFA_Node* GetNextSameNameSibling(FX_DWORD dwNodeNameHash) const;
- CXFA_Node* GetNextSameNameSibling(FX_WSTR wsNodeName) const;
+ CXFA_Node* GetNextSameNameSibling(const CFX_WideStringC& wsNodeName) const;
CXFA_Node* GetNextSameClassSibling(XFA_ELEMENT eNodeClass) const;
int32_t GetNodeSameNameIndex() const;
int32_t GetNodeSameClassIndex() const;
@@ -434,13 +434,13 @@ protected:
void OnRemoved(CXFA_Node *pParent, CXFA_Node *pRemoved, FX_BOOL bNotify);
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);
+ int32_t execSingleEventByName(const CFX_WideStringC& 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(void* pKey, void* pValue);
FX_BOOL GetMapModuleValue(void* pKey, void* &pValue);
- void SetMapModuleString(void* pKey, FX_WSTR wsValue);
+ void SetMapModuleString(void* pKey, const CFX_WideStringC& 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);
@@ -510,7 +510,7 @@ public:
{
return XFA_ELEMENT_NodeList;
}
- CXFA_Node* NamedItem(FX_WSTR wsName);
+ CXFA_Node* NamedItem(const CFX_WideStringC& wsName);
virtual int32_t GetLength() = 0;
virtual FX_BOOL Append(CXFA_Node* pNode) = 0;
virtual FX_BOOL Insert(CXFA_Node* pNewNode, CXFA_Node* pBeforeNode) = 0;
diff --git a/xfa/src/fxfa/src/common/xfa_script.h b/xfa/src/fxfa/src/common/xfa_script.h
index d4c867aa31..c7f18071ac 100644
--- a/xfa/src/fxfa/src/common/xfa_script.h
+++ b/xfa/src/fxfa/src/common/xfa_script.h
@@ -84,8 +84,8 @@ public:
virtual void SetEventParam(CXFA_EventParam* pEventParam) = 0;
virtual CXFA_EventParam* GetEventParam() = 0;
- virtual FX_BOOL RunScript(XFA_SCRIPTLANGTYPE eScriptType, FX_WSTR wsScript, FXJSE_HVALUE hRetValue, CXFA_Object* pThisObject = NULL) = 0;
- virtual int32_t ResolveObjects(CXFA_Object* refNode, FX_WSTR wsExpression, XFA_RESOLVENODE_RS& resolveNodeRS, FX_DWORD dwStyles = XFA_RESOLVENODE_Children, CXFA_Node* bindNode = NULL) = 0;
+ virtual FX_BOOL RunScript(XFA_SCRIPTLANGTYPE eScriptType, const CFX_WideStringC& wsScript, FXJSE_HVALUE hRetValue, CXFA_Object* pThisObject = NULL) = 0;
+ virtual int32_t ResolveObjects(CXFA_Object* refNode, const CFX_WideStringC& wsExpression, XFA_RESOLVENODE_RS& resolveNodeRS, FX_DWORD dwStyles = XFA_RESOLVENODE_Children, CXFA_Node* bindNode = NULL) = 0;
virtual FXJSE_HVALUE GetJSValueFromMap(CXFA_Object* pObject) = 0;
virtual void CacheList(CXFA_NodeList* pList) = 0;
virtual CXFA_Object* GetThisObject() const = 0;
diff --git a/xfa/src/fxfa/src/common/xfa_utils.h b/xfa/src/fxfa/src/common/xfa_utils.h
index 191fcf2bbb..11a1c0e2d8 100644
--- a/xfa/src/fxfa/src/common/xfa_utils.h
+++ b/xfa/src/fxfa/src/common/xfa_utils.h
@@ -6,7 +6,7 @@
#ifndef _XFA_UTILS_H_
#define _XFA_UTILS_H_
-FX_BOOL XFA_FDEExtension_ResolveNamespaceQualifier(IFDE_XMLElement* pNode, FX_WSTR wsQualifier, CFX_WideString& wsNamespaceURI);
+FX_BOOL XFA_FDEExtension_ResolveNamespaceQualifier(IFDE_XMLElement* pNode, const CFX_WideStringC& wsQualifier, CFX_WideString& wsNamespaceURI);
template <class NodeType, class TraverseStrategy>
class CXFA_NodeIteratorTemplate
{
@@ -220,7 +220,7 @@ CXFA_Node* XFA_CreateUIChild(CXFA_Node* pNode, XFA_ELEMENT& eWidgetType
CXFA_LocaleValue XFA_GetLocaleValue(CXFA_WidgetData* pWidgetData);
CFX_WideString XFA_NumericLimit(const CFX_WideString &wsValue, int32_t iLead, int32_t iTread);
FX_DOUBLE XFA_WideStringToDouble(const CFX_WideString &wsStringVal);
-FX_DOUBLE XFA_ByteStringToDouble(FX_BSTR szStringVal);
+FX_DOUBLE XFA_ByteStringToDouble(const CFX_ByteStringC& szStringVal);
int32_t XFA_MapRotation(int32_t nRotation);
#ifndef XFA_PARSE_HAS_LINEIDENTIFIER
#define XFA_PARSE_HAS_LINEIDENTIFIER
diff --git a/xfa/src/fxfa/src/fm2js/xfa_expression.cpp b/xfa/src/fxfa/src/fm2js/xfa_expression.cpp
index 47e5cb440f..b01b11f723 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_expression.cpp
+++ b/xfa/src/fxfa/src/fm2js/xfa_expression.cpp
@@ -19,7 +19,7 @@ void CXFA_FMExpression::ToJavaScript(CFX_WideTextBuf& javascript)
{}
void CXFA_FMExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript)
{}
-CXFA_FMFunctionDefinition::CXFA_FMFunctionDefinition( FX_DWORD line, FX_BOOL isGlobal, FX_WSTR wsName, CFX_WideStringCArray *pArguments, CFX_PtrArray *pExpressions )
+CXFA_FMFunctionDefinition::CXFA_FMFunctionDefinition( FX_DWORD line, FX_BOOL isGlobal, const CFX_WideStringC& wsName, CFX_WideStringCArray *pArguments, CFX_PtrArray *pExpressions )
: CXFA_FMExpression(line, XFA_FM_EXPTYPE_FUNC),
m_isGlobal(isGlobal),
m_wsName(wsName),
@@ -117,7 +117,7 @@ void CXFA_FMFunctionDefinition::ToJavaScript(CFX_WideTextBuf& javascript)
}
void CXFA_FMFunctionDefinition::ToImpliedReturnJS(CFX_WideTextBuf&)
{}
-CXFA_FMVarExpression::CXFA_FMVarExpression( FX_DWORD line, FX_WSTR wsName, CXFA_FMExpression *pInit )
+CXFA_FMVarExpression::CXFA_FMVarExpression( FX_DWORD line, const CFX_WideStringC& wsName, CXFA_FMExpression *pInit )
: CXFA_FMExpression(line, XFA_FM_EXPTYPE_VAR),
m_wsName(wsName),
m_pInit(pInit)
@@ -451,7 +451,7 @@ void CXFA_FMContinueExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript)
javascript << FX_WSTRC(L" = 0;\n");
javascript << FX_WSTRC(L"continue;\n");
}
-CXFA_FMForExpression::CXFA_FMForExpression(FX_DWORD line, FX_WSTR wsVariant, CXFA_FMSimpleExpression *pAssignment, CXFA_FMSimpleExpression *pAccessor, int32_t iDirection, CXFA_FMSimpleExpression *pStep, CXFA_FMExpression *pList)
+CXFA_FMForExpression::CXFA_FMForExpression(FX_DWORD line, const CFX_WideStringC& wsVariant, CXFA_FMSimpleExpression *pAssignment, CXFA_FMSimpleExpression *pAccessor, int32_t iDirection, CXFA_FMSimpleExpression *pStep, CXFA_FMExpression *pList)
: CXFA_FMLoopExpression(line),
m_wsVariant(wsVariant),
m_pAssignment(pAssignment),
@@ -580,7 +580,7 @@ void CXFA_FMForExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript)
m_pList->ToImpliedReturnJS(javascript);
javascript << FX_WSTRC(L"}\n");
}
-CXFA_FMForeachExpression::CXFA_FMForeachExpression( FX_DWORD line, FX_WSTR wsIdentifier, CFX_PtrArray *pAccessors, CXFA_FMExpression *pList )
+CXFA_FMForeachExpression::CXFA_FMForeachExpression( FX_DWORD line, const CFX_WideStringC& wsIdentifier, CFX_PtrArray *pAccessors, CXFA_FMExpression *pList )
: CXFA_FMLoopExpression(line),
m_wsIdentifier(wsIdentifier),
m_pAccessors(pAccessors),
diff --git a/xfa/src/fxfa/src/fm2js/xfa_expression.h b/xfa/src/fxfa/src/fm2js/xfa_expression.h
index a3781fa26d..87fd99d1f8 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_expression.h
+++ b/xfa/src/fxfa/src/fm2js/xfa_expression.h
@@ -39,7 +39,7 @@ protected:
class CXFA_FMFunctionDefinition : public CXFA_FMExpression
{
public:
- CXFA_FMFunctionDefinition(FX_DWORD line, FX_BOOL isGlobal, FX_WSTR wsName, CFX_WideStringCArray *pArguments, CFX_PtrArray *pExpressions);
+ CXFA_FMFunctionDefinition(FX_DWORD line, FX_BOOL isGlobal, const CFX_WideStringC& wsName, CFX_WideStringCArray *pArguments, CFX_PtrArray *pExpressions);
virtual ~CXFA_FMFunctionDefinition();
virtual void ToJavaScript(CFX_WideTextBuf& javascript);
virtual void ToImpliedReturnJS(CFX_WideTextBuf&);
@@ -52,7 +52,7 @@ private:
class CXFA_FMVarExpression : public CXFA_FMExpression
{
public:
- CXFA_FMVarExpression(FX_DWORD line, FX_WSTR wsName, CXFA_FMExpression *pInit);
+ CXFA_FMVarExpression(FX_DWORD line, const CFX_WideStringC& wsName, CXFA_FMExpression *pInit);
virtual ~CXFA_FMVarExpression();
virtual void ToJavaScript(CFX_WideTextBuf& javascript);
virtual void ToImpliedReturnJS(CFX_WideTextBuf&);
@@ -144,7 +144,7 @@ private:
class CXFA_FMForExpression : public CXFA_FMLoopExpression
{
public:
- CXFA_FMForExpression(FX_DWORD line, FX_WSTR wsVariant, CXFA_FMSimpleExpression *pAssignment,
+ CXFA_FMForExpression(FX_DWORD line, const CFX_WideStringC& wsVariant, CXFA_FMSimpleExpression *pAssignment,
CXFA_FMSimpleExpression *pAccessor, int32_t iDirection, CXFA_FMSimpleExpression *pStep, CXFA_FMExpression *pList);
virtual ~CXFA_FMForExpression();
virtual void ToJavaScript(CFX_WideTextBuf& javascript);
@@ -160,7 +160,7 @@ private:
class CXFA_FMForeachExpression : public CXFA_FMLoopExpression
{
public:
- CXFA_FMForeachExpression(FX_DWORD line, FX_WSTR wsIdentifier, CFX_PtrArray *pAccessors, CXFA_FMExpression *pList);
+ CXFA_FMForeachExpression(FX_DWORD line, const CFX_WideStringC& wsIdentifier, CFX_PtrArray *pAccessors, CXFA_FMExpression *pList);
virtual ~CXFA_FMForeachExpression();
virtual void ToJavaScript(CFX_WideTextBuf& javascript);
virtual void ToImpliedReturnJS(CFX_WideTextBuf&);
diff --git a/xfa/src/fxfa/src/fm2js/xfa_fm2jsapi.cpp b/xfa/src/fxfa/src/fm2js/xfa_fm2jsapi.cpp
index 0ffec233dd..42035efd14 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_fm2jsapi.cpp
+++ b/xfa/src/fxfa/src/fm2js/xfa_fm2jsapi.cpp
@@ -9,7 +9,7 @@
extern "C"
{
#endif
-int32_t XFA_FM2JS_Translate(FX_WSTR wsFormcalc, CFX_WideTextBuf& wsJavascript, CFX_WideString& wsError)
+int32_t XFA_FM2JS_Translate(const CFX_WideStringC& wsFormcalc, CFX_WideTextBuf& wsJavascript, CFX_WideString& wsError)
{
if (wsFormcalc.IsEmpty()) {
wsJavascript.Clear();
diff --git a/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp b/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp
index 466aaeefbd..2ebc6a21e2 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp
+++ b/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp
@@ -524,7 +524,7 @@ static XFA_FMHtmlReserveCode reservesForEncode [] = {
{9829, L"hearts"},
{9830, L"diams"},
};
-void CXFA_FM2JSContext::Abs(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Abs(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
if(args.GetLength() == 1) {
FXJSE_HVALUE argOne = args.GetValue(0);
@@ -543,7 +543,7 @@ void CXFA_FM2JSContext::Abs(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Abs");
}
}
-void CXFA_FM2JSContext::Avg(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Avg(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -608,7 +608,7 @@ void CXFA_FM2JSContext::Avg(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
FXJSE_Value_SetDouble(args.GetReturnValue(), dSum / uCount);
}
}
-void CXFA_FM2JSContext::Ceil(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Ceil(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -624,7 +624,7 @@ void CXFA_FM2JSContext::Ceil(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arg
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Ceil");
}
}
-void CXFA_FM2JSContext::Count(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Count(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -685,7 +685,7 @@ void CXFA_FM2JSContext::Count(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
argValue = 0;
FXJSE_Value_SetInteger(args.GetReturnValue(), (int32_t)uCount);
}
-void CXFA_FM2JSContext::Floor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Floor(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -701,7 +701,7 @@ void CXFA_FM2JSContext::Floor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Floor");
}
}
-void CXFA_FM2JSContext::Max(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Max(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -801,7 +801,7 @@ void CXFA_FM2JSContext::Max(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
FXJSE_Value_SetNull(args.GetReturnValue());
}
}
-void CXFA_FM2JSContext::Min(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Min(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -901,7 +901,7 @@ void CXFA_FM2JSContext::Min(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
FXJSE_Value_SetNull(args.GetReturnValue());
}
}
-void CXFA_FM2JSContext::Mod(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Mod(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -981,7 +981,7 @@ void CXFA_FM2JSContext::Mod(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Mod");
}
}
-void CXFA_FM2JSContext::Round(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Round(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -1083,7 +1083,7 @@ void CXFA_FM2JSContext::Round(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Round");
}
}
-void CXFA_FM2JSContext::Sum(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Sum(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -1156,7 +1156,7 @@ void CXFA_FM2JSContext::Sum(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
FXJSE_Value_SetDouble(args.GetReturnValue(), dSum);
}
}
-void CXFA_FM2JSContext::Date(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Date(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
if (args.GetLength() == 0) {
struct tm *pTmStruct = 0;
@@ -1177,7 +1177,7 @@ void CXFA_FM2JSContext::Date(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arg
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Date");
}
}
-void CXFA_FM2JSContext::Date2Num(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Date2Num(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t argc = args.GetLength();
if ((argc > 0) && (argc < 4)) {
@@ -1232,7 +1232,7 @@ void CXFA_FM2JSContext::Date2Num(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Date2Num");
}
}
-void CXFA_FM2JSContext::DateFmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::DateFmt(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t argc = args.GetLength();
if (argc < 3) {
@@ -1280,7 +1280,7 @@ void CXFA_FM2JSContext::DateFmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Date2Num");
}
}
-void CXFA_FM2JSContext::IsoDate2Num(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::IsoDate2Num(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
if(args.GetLength() == 1) {
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
@@ -1298,7 +1298,7 @@ void CXFA_FM2JSContext::IsoDate2Num(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFX
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"IsoDate2Num");
}
}
-void CXFA_FM2JSContext::IsoTime2Num(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::IsoTime2Num(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
if(args.GetLength() == 1) {
@@ -1349,7 +1349,7 @@ void CXFA_FM2JSContext::IsoTime2Num(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFX
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"IsoTime2Num");
}
}
-void CXFA_FM2JSContext::LocalDateFmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::LocalDateFmt(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t argc = args.GetLength();
if (argc < 3) {
@@ -1397,7 +1397,7 @@ void CXFA_FM2JSContext::LocalDateFmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CF
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"LocalDateFmt");
}
}
-void CXFA_FM2JSContext::LocalTimeFmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::LocalTimeFmt(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t argc = args.GetLength();
if (argc < 3) {
@@ -1445,7 +1445,7 @@ void CXFA_FM2JSContext::LocalTimeFmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CF
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"LocalTimeFmt");
}
}
-void CXFA_FM2JSContext::Num2Date(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Num2Date(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t argc = args.GetLength();
if ((argc > 0) && (argc < 4)) {
@@ -1593,7 +1593,7 @@ void CXFA_FM2JSContext::Num2Date(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Num2Date");
}
}
-void CXFA_FM2JSContext::Num2GMTime(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Num2GMTime(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t argc = args.GetLength();
if ((argc > 0) && (argc < 4)) {
@@ -1650,7 +1650,7 @@ void CXFA_FM2JSContext::Num2GMTime(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJ
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Num2GMTime");
}
}
-void CXFA_FM2JSContext::Num2Time(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Num2Time(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t argc = args.GetLength();
if ((argc > 0) && (argc < 4)) {
@@ -1707,7 +1707,7 @@ void CXFA_FM2JSContext::Num2Time(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Num2Time");
}
}
-void CXFA_FM2JSContext::Time(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Time(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
if (args.GetLength() == 0) {
time_t now;
@@ -1722,7 +1722,7 @@ void CXFA_FM2JSContext::Time(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arg
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Time");
}
}
-void CXFA_FM2JSContext::Time2Num(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Time2Num(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t argc = args.GetLength();
if ((argc > 0) && (argc < 4)) {
@@ -1818,7 +1818,7 @@ void CXFA_FM2JSContext::Time2Num(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Time2Num");
}
}
-void CXFA_FM2JSContext::TimeFmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::TimeFmt(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t argc = args.GetLength();
if (argc < 3) {
@@ -2162,7 +2162,7 @@ FX_BOOL CXFA_FM2JSContext::IsIsoDateTimeFormat(const FX_CHAR* pData, int32_t iLe
iRet = TRUE;
return iRet;
}
-FX_BOOL CXFA_FM2JSContext::Local2IsoDate(FXJSE_HOBJECT hThis, FX_BSTR szDate, FX_BSTR szFormat, FX_BSTR szLocale, CFX_ByteString &strIsoDate)
+FX_BOOL CXFA_FM2JSContext::Local2IsoDate(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szDate, const CFX_ByteStringC& szFormat, const CFX_ByteStringC& szLocale, CFX_ByteString &strIsoDate)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
CXFA_Document *pDoc = pContext->GetDocument();
@@ -2194,7 +2194,7 @@ FX_BOOL CXFA_FM2JSContext::Local2IsoDate(FXJSE_HOBJECT hThis, FX_BSTR szDate, FX
strIsoDate.Format("%4d-%02d-%02d", dt.GetYear(), dt.GetMonth(), dt.GetDay());
return TRUE;
}
-FX_BOOL CXFA_FM2JSContext::Local2IsoTime(FXJSE_HOBJECT hThis, FX_BSTR szTime, FX_BSTR szFormat, FX_BSTR szLocale, CFX_ByteString &strIsoTime)
+FX_BOOL CXFA_FM2JSContext::Local2IsoTime(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szTime, const CFX_ByteStringC& szFormat, const CFX_ByteStringC& szLocale, CFX_ByteString &strIsoTime)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
CXFA_Document *pDoc = pContext->GetDocument();
@@ -2228,7 +2228,7 @@ FX_BOOL CXFA_FM2JSContext::Local2IsoTime(FXJSE_HOBJECT hThis, FX_BSTR szTime, FX
strIsoTime.Format("%02d:%02d:%02d.%03d", utime.GetHour(), utime.GetMinute(), utime.GetSecond(), utime.GetMillisecond());
return TRUE;
}
-FX_BOOL CXFA_FM2JSContext::IsoDate2Local(FXJSE_HOBJECT hThis, FX_BSTR szDate, FX_BSTR szFormat, FX_BSTR szLocale, CFX_ByteString &strLocalDate)
+FX_BOOL CXFA_FM2JSContext::IsoDate2Local(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szDate, const CFX_ByteStringC& szFormat, const CFX_ByteStringC& szLocale, CFX_ByteString &strLocalDate)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
CXFA_Document *pDoc = pContext->GetDocument();
@@ -2260,7 +2260,7 @@ FX_BOOL CXFA_FM2JSContext::IsoDate2Local(FXJSE_HOBJECT hThis, FX_BSTR szDate, FX
strLocalDate = FX_UTF8Encode(wsRet, wsRet.GetLength());
return TRUE;
}
-FX_BOOL CXFA_FM2JSContext::IsoTime2Local(FXJSE_HOBJECT hThis, FX_BSTR szTime, FX_BSTR szFormat, FX_BSTR szLocale, CFX_ByteString &strLocalTime)
+FX_BOOL CXFA_FM2JSContext::IsoTime2Local(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szTime, const CFX_ByteStringC& szFormat, const CFX_ByteStringC& szLocale, CFX_ByteString &strLocalTime)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
CXFA_Document *pDoc = pContext->GetDocument();
@@ -2294,7 +2294,7 @@ FX_BOOL CXFA_FM2JSContext::IsoTime2Local(FXJSE_HOBJECT hThis, FX_BSTR szTime, FX
strLocalTime = FX_UTF8Encode(wsRet, wsRet.GetLength());
return TRUE;
}
-FX_BOOL CXFA_FM2JSContext::GetGMTTime(FXJSE_HOBJECT hThis, FX_BSTR szTime, FX_BSTR szFormat, FX_BSTR szLocale, CFX_ByteString &strGMTTime)
+FX_BOOL CXFA_FM2JSContext::GetGMTTime(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szTime, const CFX_ByteStringC& szFormat, const CFX_ByteStringC& szLocale, CFX_ByteString &strGMTTime)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
CXFA_Document *pDoc = pContext->GetDocument();
@@ -2328,7 +2328,7 @@ FX_BOOL CXFA_FM2JSContext::GetGMTTime(FXJSE_HOBJECT hThis, FX_BSTR szTime, FX_BS
strGMTTime = FX_UTF8Encode(wsRet, wsRet.GetLength());
return TRUE;
}
-int32_t CXFA_FM2JSContext::DateString2Num(FX_BSTR szDateString)
+int32_t CXFA_FM2JSContext::DateString2Num(const CFX_ByteStringC& szDateString)
{
FX_BOOL bFlags = FALSE;
int32_t iLength = szDateString.GetLength();
@@ -2449,7 +2449,7 @@ static void XFA_FM_AlternateDateTimeSymbols(CFX_WideString &wsPattern, const CFX
}
}
#undef XFA_N
-void CXFA_FM2JSContext::GetLocalDateFormat(FXJSE_HOBJECT hThis, int32_t iStyle, FX_BSTR szLocalStr, CFX_ByteString &strFormat, FX_BOOL bStandard)
+void CXFA_FM2JSContext::GetLocalDateFormat(FXJSE_HOBJECT hThis, int32_t iStyle, const CFX_ByteStringC& szLocalStr, CFX_ByteString &strFormat, FX_BOOL bStandard)
{
FX_LOCALEDATETIMESUBCATEGORY strStyle;
switch (iStyle) {
@@ -2499,7 +2499,7 @@ void CXFA_FM2JSContext::GetLocalDateFormat(FXJSE_HOBJECT hThis, int32_t iStyle,
}
strFormat = FX_UTF8Encode(strRet, strRet.GetLength());
}
-void CXFA_FM2JSContext::GetLocalTimeFormat(FXJSE_HOBJECT hThis, int32_t iStyle, FX_BSTR szLocalStr, CFX_ByteString &strFormat, FX_BOOL bStandard)
+void CXFA_FM2JSContext::GetLocalTimeFormat(FXJSE_HOBJECT hThis, int32_t iStyle, const CFX_ByteStringC& szLocalStr, CFX_ByteString &strFormat, FX_BOOL bStandard)
{
FX_LOCALEDATETIMESUBCATEGORY strStyle;
switch (iStyle) {
@@ -2550,15 +2550,15 @@ void CXFA_FM2JSContext::GetLocalTimeFormat(FXJSE_HOBJECT hThis, int32_t iStyle,
}
strFormat = FX_UTF8Encode(strRet, strRet.GetLength());
}
-void CXFA_FM2JSContext::GetStandardDateFormat(FXJSE_HOBJECT hThis, int32_t iStyle, FX_BSTR szLocalStr, CFX_ByteString &strFormat)
+void CXFA_FM2JSContext::GetStandardDateFormat(FXJSE_HOBJECT hThis, int32_t iStyle, const CFX_ByteStringC& szLocalStr, CFX_ByteString &strFormat)
{
GetLocalDateFormat(hThis, iStyle, szLocalStr, strFormat, TRUE);
}
-void CXFA_FM2JSContext::GetStandardTimeFormat(FXJSE_HOBJECT hThis, int32_t iStyle, FX_BSTR szLocalStr, CFX_ByteString &strFormat)
+void CXFA_FM2JSContext::GetStandardTimeFormat(FXJSE_HOBJECT hThis, int32_t iStyle, const CFX_ByteStringC& szLocalStr, CFX_ByteString &strFormat)
{
GetLocalTimeFormat(hThis, iStyle, szLocalStr, strFormat, TRUE);
}
-void CXFA_FM2JSContext::Num2AllTime(FXJSE_HOBJECT hThis, int32_t iTime, FX_BSTR szFormat, FX_BSTR szLocale, FX_BOOL bGM, CFX_ByteString &strTime)
+void CXFA_FM2JSContext::Num2AllTime(FXJSE_HOBJECT hThis, int32_t iTime, const CFX_ByteStringC& szFormat, const CFX_ByteStringC& szLocale, FX_BOOL bGM, CFX_ByteString &strTime)
{
int32_t iHour = 0;
int32_t iMin = 0;
@@ -2604,7 +2604,7 @@ void CXFA_FM2JSContext::GetLocalTimeZone(int32_t &iHour, int32_t &iMin, int32_t
iMin = iLocalMin - iGMMin;
iSec = iLocalSec - iGMSec;
}
-void CXFA_FM2JSContext::Apr(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Apr(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
if(args.GetLength() == 3) {
@@ -2661,7 +2661,7 @@ void CXFA_FM2JSContext::Apr(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Apr");
}
}
-void CXFA_FM2JSContext::CTerm(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::CTerm(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
if(args.GetLength() == 3) {
@@ -2693,7 +2693,7 @@ void CXFA_FM2JSContext::CTerm(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"CTerm");
}
}
-void CXFA_FM2JSContext::FV(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::FV(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
if(args.GetLength() == 3) {
@@ -2735,7 +2735,7 @@ void CXFA_FM2JSContext::FV(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argum
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"FV");
}
}
-void CXFA_FM2JSContext::IPmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::IPmt(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
if(args.GetLength() == 5) {
@@ -2799,7 +2799,7 @@ void CXFA_FM2JSContext::IPmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arg
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"IPmt");
}
}
-void CXFA_FM2JSContext::NPV(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::NPV(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
int32_t argc = args.GetLength();
@@ -2847,7 +2847,7 @@ void CXFA_FM2JSContext::NPV(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"NPV");
}
}
-void CXFA_FM2JSContext::Pmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Pmt(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
if(args.GetLength() == 3) {
@@ -2885,7 +2885,7 @@ void CXFA_FM2JSContext::Pmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Pmt");
}
}
-void CXFA_FM2JSContext::PPmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::PPmt(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
if(args.GetLength() == 5) {
@@ -2950,7 +2950,7 @@ void CXFA_FM2JSContext::PPmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arg
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"PPmt");
}
}
-void CXFA_FM2JSContext::PV(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::PV(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
if(args.GetLength() == 3) {
@@ -2987,7 +2987,7 @@ void CXFA_FM2JSContext::PV(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argum
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"PV");
}
}
-void CXFA_FM2JSContext::Rate(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Rate(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
if(args.GetLength() == 3) {
@@ -3019,7 +3019,7 @@ void CXFA_FM2JSContext::Rate(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arg
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Rate");
}
}
-void CXFA_FM2JSContext::Term(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Term(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
if(args.GetLength() == 3) {
@@ -3051,7 +3051,7 @@ void CXFA_FM2JSContext::Term(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arg
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Term");
}
}
-void CXFA_FM2JSContext::Choose(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Choose(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -3127,7 +3127,7 @@ void CXFA_FM2JSContext::Choose(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_A
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Choose");
}
}
-void CXFA_FM2JSContext::Exists(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Exists(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
if (args.GetLength() == 1) {
FXJSE_HVALUE argOne = args.GetValue(0);
@@ -3138,7 +3138,7 @@ void CXFA_FM2JSContext::Exists(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_A
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Exists");
}
}
-void CXFA_FM2JSContext::HasValue(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::HasValue(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
if (args.GetLength() == 1) {
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
@@ -3158,7 +3158,7 @@ void CXFA_FM2JSContext::HasValue(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"HasValue");
}
}
-void CXFA_FM2JSContext::Oneof(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Oneof(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t argc = args.GetLength();
if(argc > 1) {
@@ -3185,7 +3185,7 @@ void CXFA_FM2JSContext::Oneof(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Oneof");
}
}
-void CXFA_FM2JSContext::Within(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Within(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t argc = args.GetLength();
if(argc == 3) {
@@ -3218,7 +3218,7 @@ void CXFA_FM2JSContext::Within(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_A
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Within");
}
}
-void CXFA_FM2JSContext::If(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::If(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t argc = args.GetLength();
if (args.GetLength() == 3) {
@@ -3235,7 +3235,7 @@ void CXFA_FM2JSContext::If(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argum
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"If");
}
}
-void CXFA_FM2JSContext::Eval(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Eval(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -3263,7 +3263,7 @@ void CXFA_FM2JSContext::Eval(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arg
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Eval");
}
}
-void CXFA_FM2JSContext::Ref(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Ref(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -3332,7 +3332,7 @@ void CXFA_FM2JSContext::Ref(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Ref");
}
}
-void CXFA_FM2JSContext::UnitType(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::UnitType(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
if (args.GetLength() == 1) {
FXJSE_HVALUE unitspanValue = GetSimpleHValue(hThis, args, 0);
@@ -3433,7 +3433,7 @@ void CXFA_FM2JSContext::UnitType(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"UnitType");
}
}
-void CXFA_FM2JSContext::UnitValue(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::UnitValue(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t argc = args.GetLength();
if ((argc == 1) || (argc == 2)) {
@@ -3581,7 +3581,7 @@ void CXFA_FM2JSContext::UnitValue(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJS
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"UnitValue");
}
}
-void CXFA_FM2JSContext::At(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::At(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -3608,7 +3608,7 @@ void CXFA_FM2JSContext::At(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argum
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"At");
}
}
-void CXFA_FM2JSContext::Concat(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Concat(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -3639,7 +3639,7 @@ void CXFA_FM2JSContext::Concat(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_A
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Concat");
}
}
-void CXFA_FM2JSContext::Decode(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Decode(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -3682,7 +3682,7 @@ void CXFA_FM2JSContext::Decode(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_A
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Decode");
}
}
-void CXFA_FM2JSContext::DecodeURL (FX_BSTR szURLString, CFX_ByteTextBuf &szResultString)
+void CXFA_FM2JSContext::DecodeURL (const CFX_ByteStringC& szURLString, CFX_ByteTextBuf &szResultString)
{
CFX_WideString wsURLString = CFX_WideString::FromUTF8(szURLString.GetCStr(), szURLString.GetLength());
const FX_WCHAR* pData = wsURLString;
@@ -3734,7 +3734,7 @@ void CXFA_FM2JSContext::DecodeURL (FX_BSTR szURLString, CFX_ByteTextBuf &szResu
wsResultBuf.AppendChar(0);
szResultString = FX_UTF8Encode(wsResultBuf.GetBuffer(), wsResultBuf.GetLength());
}
-void CXFA_FM2JSContext::DecodeHTML(FX_BSTR szHTMLString, CFX_ByteTextBuf &szResultString)
+void CXFA_FM2JSContext::DecodeHTML(const CFX_ByteStringC& szHTMLString, CFX_ByteTextBuf &szResultString)
{
CFX_WideString wsHTMLString = CFX_WideString::FromUTF8(szHTMLString.GetCStr(), szHTMLString.GetLength());
FX_WCHAR strString[9];
@@ -3804,7 +3804,7 @@ void CXFA_FM2JSContext::DecodeHTML(FX_BSTR szHTMLString, CFX_ByteTextBuf &szResu
wsResultBuf.AppendChar(0);
szResultString = FX_UTF8Encode(wsResultBuf.GetBuffer(), wsResultBuf.GetLength());
}
-void CXFA_FM2JSContext::DecodeXML (FX_BSTR szXMLString, CFX_ByteTextBuf &szResultString)
+void CXFA_FM2JSContext::DecodeXML (const CFX_ByteStringC& szXMLString, CFX_ByteTextBuf &szResultString)
{
CFX_WideString wsXMLString = CFX_WideString::FromUTF8(szXMLString.GetCStr(), szXMLString.GetLength());
FX_WCHAR strString[9];
@@ -3903,7 +3903,7 @@ void CXFA_FM2JSContext::DecodeXML (FX_BSTR szXMLString, CFX_ByteTextBuf &szResu
wsXMLBuf.AppendChar(0);
szResultString = FX_UTF8Encode(wsXMLBuf.GetBuffer(), wsXMLBuf.GetLength());
}
-void CXFA_FM2JSContext::Encode(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Encode(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -3946,7 +3946,7 @@ void CXFA_FM2JSContext::Encode(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_A
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Encode");
}
}
-void CXFA_FM2JSContext::EncodeURL (FX_BSTR szURLString, CFX_ByteTextBuf &szResultBuf)
+void CXFA_FM2JSContext::EncodeURL (const CFX_ByteStringC& szURLString, CFX_ByteTextBuf &szResultBuf)
{
CFX_WideString wsURLString = CFX_WideString::FromUTF8(szURLString.GetCStr(), szURLString.GetLength());
CFX_WideTextBuf wsResultBuf;
@@ -4050,7 +4050,7 @@ void CXFA_FM2JSContext::EncodeURL (FX_BSTR szURLString, CFX_ByteTextBuf &szResu
wsResultBuf.AppendChar(0);
szResultBuf = FX_UTF8Encode(wsResultBuf.GetBuffer(), wsResultBuf.GetLength());
}
-void CXFA_FM2JSContext::EncodeHTML(FX_BSTR szHTMLString, CFX_ByteTextBuf &szResultBuf)
+void CXFA_FM2JSContext::EncodeHTML(const CFX_ByteStringC& szHTMLString, CFX_ByteTextBuf &szResultBuf)
{
CFX_ByteString str = szHTMLString.GetCStr();
CFX_WideString wsHTMLString = CFX_WideString::FromUTF8(str, str.GetLength());
@@ -4102,7 +4102,7 @@ void CXFA_FM2JSContext::EncodeHTML(FX_BSTR szHTMLString, CFX_ByteTextBuf &szResu
wsResultBuf.AppendChar(0);
szResultBuf = FX_UTF8Encode(wsResultBuf.GetBuffer(), wsResultBuf.GetLength());
}
-void CXFA_FM2JSContext::EncodeXML (FX_BSTR szXMLString, CFX_ByteTextBuf &szResultBuf)
+void CXFA_FM2JSContext::EncodeXML (const CFX_ByteStringC& szXMLString, CFX_ByteTextBuf &szResultBuf)
{
CFX_WideString wsXMLString = CFX_WideString::FromUTF8(szXMLString.GetCStr(), szXMLString.GetLength());
CFX_WideTextBuf wsResultBuf;
@@ -4188,7 +4188,7 @@ void CXFA_FM2JSContext::EncodeXML (FX_BSTR szXMLString, CFX_ByteTextBuf &szResu
wsResultBuf.AppendChar(0);
szResultBuf = FX_UTF8Encode(wsResultBuf.GetBuffer(), wsResultBuf.GetLength());
}
-FX_BOOL CXFA_FM2JSContext::HTMLSTR2Code(FX_WSTR pData, uint32_t &iCode)
+FX_BOOL CXFA_FM2JSContext::HTMLSTR2Code(const CFX_WideStringC& pData, uint32_t &iCode)
{
int32_t iLength = pData.GetLength();
uint32_t uHash = FX_HashCode_String_GetW(pData.GetPtr(), iLength);
@@ -4228,7 +4228,7 @@ FX_BOOL CXFA_FM2JSContext::HTMLCode2STR(uint32_t iCode, CFX_WideString &wsHTMLRe
} while (iStart <= iEnd);
return FALSE;
}
-static FX_BOOL XFA_PATTERN_STRING_Type(FX_BSTR szPattern, FX_DWORD& patternType)
+static FX_BOOL XFA_PATTERN_STRING_Type(const CFX_ByteStringC& szPattern, FX_DWORD& patternType)
{
CFX_WideString wsPattern = CFX_WideString::FromUTF8(szPattern.GetCStr(), szPattern.GetLength());
if (FX_WSTRC(L"datetime") == wsPattern.Left(8)) {
@@ -4305,7 +4305,7 @@ static FX_BOOL XFA_PATTERN_STRING_Type(FX_BSTR szPattern, FX_DWORD& patternType)
}
return FALSE;
}
-void CXFA_FM2JSContext::Format(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Format(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
int32_t argc = args.GetLength();
@@ -4390,7 +4390,7 @@ void CXFA_FM2JSContext::Format(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_A
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Format");
}
}
-void CXFA_FM2JSContext::Left(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Left(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -4418,7 +4418,7 @@ void CXFA_FM2JSContext::Left(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arg
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Left");
}
}
-void CXFA_FM2JSContext::Len(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Len(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -4436,7 +4436,7 @@ void CXFA_FM2JSContext::Len(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Len");
}
}
-void CXFA_FM2JSContext::Lower(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Lower(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t argc = args.GetLength();
if ((argc > 0) && (argc < 3)) {
@@ -4480,7 +4480,7 @@ void CXFA_FM2JSContext::Lower(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Lower");
}
}
-void CXFA_FM2JSContext::Ltrim(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Ltrim(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -4499,7 +4499,7 @@ void CXFA_FM2JSContext::Ltrim(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Ltrim");
}
}
-void CXFA_FM2JSContext::Parse(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Parse(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
if (args.GetLength() == 2) {
@@ -4627,7 +4627,7 @@ void CXFA_FM2JSContext::Parse(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Parse");
}
}
-void CXFA_FM2JSContext::Replace(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Replace(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t argc = args.GetLength();
if ((argc == 2) || (argc == 3)) {
@@ -4692,7 +4692,7 @@ void CXFA_FM2JSContext::Replace(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Replace");
}
}
-void CXFA_FM2JSContext::Right(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Right(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -4720,7 +4720,7 @@ void CXFA_FM2JSContext::Right(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Right");
}
}
-void CXFA_FM2JSContext::Rtrim(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Rtrim(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -4739,7 +4739,7 @@ void CXFA_FM2JSContext::Rtrim(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Rtrim");
}
}
-void CXFA_FM2JSContext::Space(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Space(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -4765,7 +4765,7 @@ void CXFA_FM2JSContext::Space(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Space");
}
}
-void CXFA_FM2JSContext::Str(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Str(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t argc = args.GetLength();
if ((argc > 0) && (argc < 4)) {
@@ -4888,7 +4888,7 @@ void CXFA_FM2JSContext::Str(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Str");
}
}
-void CXFA_FM2JSContext::Stuff(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Stuff(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t argc = args.GetLength();
if ((argc == 3) || (argc == 4)) {
@@ -4949,7 +4949,7 @@ void CXFA_FM2JSContext::Stuff(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Stuff");
}
}
-void CXFA_FM2JSContext::Substr(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Substr(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t argc = args.GetLength();
if(argc == 3) {
@@ -4990,7 +4990,7 @@ void CXFA_FM2JSContext::Substr(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_A
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Substr");
}
}
-void CXFA_FM2JSContext::Uuid(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Uuid(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t argc = args.GetLength();
if((argc == 0) || (argc == 1)) {
@@ -5013,7 +5013,7 @@ void CXFA_FM2JSContext::Uuid(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arg
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Uuid");
}
}
-void CXFA_FM2JSContext::Upper(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Upper(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t argc = args.GetLength();
if ((argc > 0) && (argc < 3)) {
@@ -5057,7 +5057,7 @@ void CXFA_FM2JSContext::Upper(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Upper");
}
}
-void CXFA_FM2JSContext::WordNum(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::WordNum(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t argc = args.GetLength();
if ((argc > 0) && (argc < 4)) {
@@ -5114,7 +5114,7 @@ void CXFA_FM2JSContext::WordNum(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"WordNum");
}
}
-void CXFA_FM2JSContext::TrillionUS(FX_BSTR szData, CFX_ByteTextBuf &strBuf)
+void CXFA_FM2JSContext::TrillionUS(const CFX_ByteStringC& szData, CFX_ByteTextBuf &strBuf)
{
CFX_ByteStringC pUnits[] = { "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"};
CFX_ByteStringC pCapUnits[] = { "Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"};
@@ -5205,7 +5205,7 @@ void CXFA_FM2JSContext::TrillionUS(FX_BSTR szData, CFX_ByteTextBuf &strBuf)
iIndex += 3;
}
}
-void CXFA_FM2JSContext::WordUS(FX_BSTR szData, int32_t iStyle, CFX_ByteTextBuf &strBuf)
+void CXFA_FM2JSContext::WordUS(const CFX_ByteStringC& szData, int32_t iStyle, CFX_ByteTextBuf &strBuf)
{
const FX_CHAR* pData = szData.GetCStr();
int32_t iLength = szData.GetLength();
@@ -5305,7 +5305,7 @@ void CXFA_FM2JSContext::WordUS(FX_BSTR szData, int32_t iStyle, CFX_ByteTextBuf &
break;
}
}
-void CXFA_FM2JSContext::Get(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Get(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
int32_t argc = args.GetLength();
@@ -5337,7 +5337,7 @@ void CXFA_FM2JSContext::Get(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Get");
}
}
-void CXFA_FM2JSContext::Post(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Post(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
int32_t argc = args.GetLength();
@@ -5400,7 +5400,7 @@ void CXFA_FM2JSContext::Post(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arg
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Post");
}
}
-void CXFA_FM2JSContext::Put(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::Put(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
int32_t argc = args.GetLength();
@@ -5443,7 +5443,7 @@ void CXFA_FM2JSContext::Put(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Put");
}
}
-void CXFA_FM2JSContext::assign_value_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::assign_value_operator(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -5491,7 +5491,7 @@ void CXFA_FM2JSContext::assign_value_operator(FXJSE_HOBJECT hThis, FX_BSTR szFun
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
-void CXFA_FM2JSContext::logical_or_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::logical_or_operator(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
if (args.GetLength() == 2) {
FXJSE_HVALUE argFirst = GetSimpleHValue(hThis, args, 0);
@@ -5510,7 +5510,7 @@ void CXFA_FM2JSContext::logical_or_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncN
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
-void CXFA_FM2JSContext::logical_and_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::logical_and_operator(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
if (args.GetLength() == 2) {
FXJSE_HVALUE argFirst = GetSimpleHValue(hThis, args, 0);
@@ -5529,7 +5529,7 @@ void CXFA_FM2JSContext::logical_and_operator(FXJSE_HOBJECT hThis, FX_BSTR szFunc
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
-void CXFA_FM2JSContext::equality_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::equality_operator(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
if (args.GetLength() == 2) {
if (fm_ref_equal(hThis, args)) {
@@ -5558,7 +5558,7 @@ void CXFA_FM2JSContext::equality_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncNam
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
-void CXFA_FM2JSContext::notequality_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::notequality_operator(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
if (args.GetLength() == 2) {
if (fm_ref_equal(hThis, args)) {
@@ -5617,7 +5617,7 @@ FX_BOOL CXFA_FM2JSContext::fm_ref_equal(FXJSE_HOBJECT hThis, CFXJSE_Arguments &a
FXJSE_Value_Release(argSecond);
return bRet;
}
-void CXFA_FM2JSContext::less_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::less_operator(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
if (args.GetLength() == 2) {
FXJSE_HVALUE argFirst = GetSimpleHValue(hThis, args, 0);
@@ -5642,7 +5642,7 @@ void CXFA_FM2JSContext::less_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, C
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
-void CXFA_FM2JSContext::lessequal_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::lessequal_operator(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
if (args.GetLength() == 2) {
FXJSE_HVALUE argFirst = GetSimpleHValue(hThis, args, 0);
@@ -5667,7 +5667,7 @@ void CXFA_FM2JSContext::lessequal_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncNa
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
-void CXFA_FM2JSContext::greater_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::greater_operator(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
if (args.GetLength() == 2) {
FXJSE_HVALUE argFirst = GetSimpleHValue(hThis, args, 0);
@@ -5692,7 +5692,7 @@ void CXFA_FM2JSContext::greater_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncName
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
-void CXFA_FM2JSContext::greaterequal_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::greaterequal_operator(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
if (args.GetLength() == 2) {
FXJSE_HVALUE argFirst = GetSimpleHValue(hThis, args, 0);
@@ -5717,7 +5717,7 @@ void CXFA_FM2JSContext::greaterequal_operator(FXJSE_HOBJECT hThis, FX_BSTR szFun
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
-void CXFA_FM2JSContext::plus_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::plus_operator(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
if (args.GetLength() == 2) {
FXJSE_HVALUE argFirst = args.GetValue(0);
@@ -5736,7 +5736,7 @@ void CXFA_FM2JSContext::plus_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, C
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
-void CXFA_FM2JSContext::minus_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::minus_operator(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
if (args.GetLength() == 2) {
FXJSE_HVALUE argFirst = GetSimpleHValue(hThis, args, 0);
@@ -5755,7 +5755,7 @@ void CXFA_FM2JSContext::minus_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncName,
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
-void CXFA_FM2JSContext::multiple_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::multiple_operator(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
if (args.GetLength() == 2) {
FXJSE_HVALUE argFirst = GetSimpleHValue(hThis, args, 0);
@@ -5774,7 +5774,7 @@ void CXFA_FM2JSContext::multiple_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncNam
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
-void CXFA_FM2JSContext::divide_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::divide_operator(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
if (args.GetLength() == 2) {
@@ -5797,7 +5797,7 @@ void CXFA_FM2JSContext::divide_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncName,
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
-void CXFA_FM2JSContext::positive_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::positive_operator(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t iLength = args.GetLength();
if (iLength == 1) {
@@ -5813,7 +5813,7 @@ void CXFA_FM2JSContext::positive_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncNam
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
-void CXFA_FM2JSContext::negative_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::negative_operator(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t iLength = args.GetLength();
if (iLength == 1) {
@@ -5829,7 +5829,7 @@ void CXFA_FM2JSContext::negative_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncNam
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
-void CXFA_FM2JSContext::logical_not_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::logical_not_operator(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t iLength = args.GetLength();
if (iLength == 1) {
@@ -5846,7 +5846,7 @@ void CXFA_FM2JSContext::logical_not_operator(FXJSE_HOBJECT hThis, FX_BSTR szFunc
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
-void CXFA_FM2JSContext::dot_accessor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::dot_accessor(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -5979,7 +5979,7 @@ void CXFA_FM2JSContext::dot_accessor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CF
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
-void CXFA_FM2JSContext::dotdot_accessor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::dotdot_accessor(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -6107,7 +6107,7 @@ void CXFA_FM2JSContext::dotdot_accessor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName,
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
-void CXFA_FM2JSContext::eval_translation (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::eval_translation (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -6135,7 +6135,7 @@ void CXFA_FM2JSContext::eval_translation (FXJSE_HOBJECT hThis, FX_BSTR szFuncNam
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Eval");
}
}
-void CXFA_FM2JSContext::is_fm_object(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::is_fm_object(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t iLength = args.GetLength();
if (iLength == 1) {
@@ -6146,7 +6146,7 @@ void CXFA_FM2JSContext::is_fm_object(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CF
FXJSE_Value_SetBoolean(args.GetReturnValue(), FALSE);
}
}
-void CXFA_FM2JSContext::is_fm_array(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::is_fm_array(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
int32_t iLength = args.GetLength();
if (iLength == 1) {
@@ -6158,7 +6158,7 @@ void CXFA_FM2JSContext::is_fm_array(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFX
FXJSE_Value_SetBoolean(args.GetReturnValue(), FALSE);
}
}
-void CXFA_FM2JSContext::get_fm_value(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::get_fm_value(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -6189,7 +6189,7 @@ void CXFA_FM2JSContext::get_fm_value(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CF
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
-void CXFA_FM2JSContext::get_fm_jsobj(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::get_fm_jsobj(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -6211,7 +6211,7 @@ void CXFA_FM2JSContext::get_fm_jsobj(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CF
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
-void CXFA_FM2JSContext::fm_var_filter(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::fm_var_filter(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -6264,7 +6264,7 @@ void CXFA_FM2JSContext::fm_var_filter(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, C
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
-void CXFA_FM2JSContext::concat_fm_object(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_FM2JSContext::concat_fm_object(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
@@ -6513,7 +6513,7 @@ FX_BOOL CXFA_FM2JSContext::SetObjectDefaultValue(FXJSE_HVALUE hObjectValue, FXJS
}
return bSuccess;
}
-void CXFA_FM2JSContext::GenerateSomExpression(FX_BSTR szName, int32_t iIndexFlags, int32_t iIndexValue, FX_BOOL bIsStar, CFX_ByteString& szSomExp)
+void CXFA_FM2JSContext::GenerateSomExpression(const CFX_ByteStringC& szName, int32_t iIndexFlags, int32_t iIndexValue, FX_BOOL bIsStar, CFX_ByteString& szSomExp)
{
if(bIsStar) {
szSomExp = szName + FX_BSTRC("[*]");
@@ -6537,7 +6537,7 @@ void CXFA_FM2JSContext::GenerateSomExpression(FX_BSTR szName, int32_t iIndexFlag
szSomExp += FX_BSTRC("]");
}
}
-FX_BOOL CXFA_FM2JSContext::GetObjectByName(FXJSE_HOBJECT hThis, FXJSE_HVALUE accessorValue, FX_BSTR szAccessorName)
+FX_BOOL CXFA_FM2JSContext::GetObjectByName(FXJSE_HOBJECT hThis, FXJSE_HVALUE accessorValue, const CFX_ByteStringC& szAccessorName)
{
FX_BOOL bFlags = FALSE;
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
@@ -6555,7 +6555,7 @@ FX_BOOL CXFA_FM2JSContext::GetObjectByName(FXJSE_HOBJECT hThis, FXJSE_HVALUE acc
}
return bFlags;
}
-int32_t CXFA_FM2JSContext::ResolveObjects(FXJSE_HOBJECT hThis, FXJSE_HVALUE hRefValue, FX_BSTR bsSomExp, XFA_RESOLVENODE_RS &resoveNodeRS, FX_BOOL bdotAccessor , FX_BOOL bHasNoResolveName )
+int32_t CXFA_FM2JSContext::ResolveObjects(FXJSE_HOBJECT hThis, FXJSE_HVALUE hRefValue, const CFX_ByteStringC& bsSomExp, XFA_RESOLVENODE_RS &resoveNodeRS, FX_BOOL bdotAccessor , FX_BOOL bHasNoResolveName )
{
CFX_WideString wsSomExpression = CFX_WideString::FromUTF8(bsSomExp.GetCStr(), bsSomExp.GetLength());
int32_t iRet = -1;
@@ -6671,7 +6671,7 @@ int32_t CXFA_FM2JSContext::HValueToInteger(FXJSE_HOBJECT hThis, FXJSE_HVALUE hVa
}
return iValue;
}
-FX_DOUBLE CXFA_FM2JSContext::StringToDouble(FX_BSTR szStringVal)
+FX_DOUBLE CXFA_FM2JSContext::StringToDouble(const CFX_ByteStringC& szStringVal)
{
return XFA_ByteStringToDouble(szStringVal);
}
diff --git a/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.h b/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.h
index b947bfa740..f0ac12045b 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.h
+++ b/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.h
@@ -9,143 +9,143 @@
class CXFA_FM2JSContext
{
public:
- static void Abs (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Avg (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Ceil (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Count (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Floor (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Max (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Min (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Mod (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Round (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Sum (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Date (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Date2Num (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void DateFmt (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void IsoDate2Num (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void IsoTime2Num (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void LocalDateFmt (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void LocalTimeFmt (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Num2Date (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Num2GMTime (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Num2Time (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Time (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- 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 void Abs (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Avg (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Ceil (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Count (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Floor (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Max (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Min (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Mod (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Round (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Sum (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Date (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Date2Num (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void DateFmt (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void IsoDate2Num (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void IsoTime2Num (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void LocalDateFmt (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void LocalTimeFmt (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Num2Date (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Num2GMTime (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Num2Time (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Time (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Time2Num (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void TimeFmt (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
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);
- static FX_BOOL IsoTime2Local (FXJSE_HOBJECT hThis, FX_BSTR szTime, FX_BSTR szFormat, FX_BSTR szLocale, CFX_ByteString &strLocalTime);
- static FX_BOOL GetGMTTime (FXJSE_HOBJECT hThis, FX_BSTR szTime, FX_BSTR szFormat, FX_BSTR szLocale, CFX_ByteString &strGMTTime);
- static int32_t DateString2Num (FX_BSTR szDateString);
- static void GetLocalDateFormat (FXJSE_HOBJECT hThis, int32_t iStyle, FX_BSTR szLocalStr, CFX_ByteString &strFormat, FX_BOOL bStandard);
- static void GetLocalTimeFormat (FXJSE_HOBJECT hThis, int32_t iStyle, FX_BSTR szLocalStr, CFX_ByteString &strFormat, FX_BOOL bStandard);
- static void GetStandardDateFormat (FXJSE_HOBJECT hThis, int32_t iStyle, FX_BSTR szLocalStr, CFX_ByteString &strFormat);
- static void GetStandardTimeFormat (FXJSE_HOBJECT hThis, int32_t iStyle, FX_BSTR szLocalStr, CFX_ByteString &strFormat);
+ static FX_BOOL Local2IsoDate (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szDate, const CFX_ByteStringC& szFormat, const CFX_ByteStringC& szLocale, CFX_ByteString &strIsoDate);
+ static FX_BOOL Local2IsoTime (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szTime, const CFX_ByteStringC& szFormat, const CFX_ByteStringC& szLocale, CFX_ByteString &strIsoTime);
+ static FX_BOOL IsoDate2Local (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szDate, const CFX_ByteStringC& szFormat, const CFX_ByteStringC& szLocale, CFX_ByteString &strLocalDate);
+ static FX_BOOL IsoTime2Local (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szTime, const CFX_ByteStringC& szFormat, const CFX_ByteStringC& szLocale, CFX_ByteString &strLocalTime);
+ static FX_BOOL GetGMTTime (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szTime, const CFX_ByteStringC& szFormat, const CFX_ByteStringC& szLocale, CFX_ByteString &strGMTTime);
+ static int32_t DateString2Num (const CFX_ByteStringC& szDateString);
+ static void GetLocalDateFormat (FXJSE_HOBJECT hThis, int32_t iStyle, const CFX_ByteStringC& szLocalStr, CFX_ByteString &strFormat, FX_BOOL bStandard);
+ static void GetLocalTimeFormat (FXJSE_HOBJECT hThis, int32_t iStyle, const CFX_ByteStringC& szLocalStr, CFX_ByteString &strFormat, FX_BOOL bStandard);
+ static void GetStandardDateFormat (FXJSE_HOBJECT hThis, int32_t iStyle, const CFX_ByteStringC& szLocalStr, CFX_ByteString &strFormat);
+ static void GetStandardTimeFormat (FXJSE_HOBJECT hThis, int32_t iStyle, const CFX_ByteStringC& szLocalStr, CFX_ByteString &strFormat);
- static void Num2AllTime (FXJSE_HOBJECT hThis, int32_t iTime, FX_BSTR szFormat, FX_BSTR szLocale, FX_BOOL bGM, CFX_ByteString &strTime);
+ static void Num2AllTime (FXJSE_HOBJECT hThis, int32_t iTime, const CFX_ByteStringC& szFormat, const CFX_ByteStringC& szLocale, FX_BOOL bGM, CFX_ByteString &strTime);
static void GetLocalTimeZone (int32_t &iHour, int32_t &iMin, int32_t &iSec);
- static void Apr (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void CTerm (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void FV (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void IPmt (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void NPV (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Pmt (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void PPmt (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void PV (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Rate (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Term (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Choose (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Exists (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void HasValue (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Oneof (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Within (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void If (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Eval (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Ref (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void UnitType (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void UnitValue (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
+ static void Apr (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void CTerm (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void FV (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void IPmt (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void NPV (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Pmt (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void PPmt (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void PV (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Rate (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Term (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Choose (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Exists (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void HasValue (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Oneof (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Within (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void If (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Eval (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Ref (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void UnitType (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void UnitValue (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
- static void At (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Concat (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Decode (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void DecodeURL (FX_BSTR szURLString, CFX_ByteTextBuf &szResultBuf);
- static void DecodeHTML (FX_BSTR szHTMLString, CFX_ByteTextBuf &szResultBuf);
- static void DecodeXML (FX_BSTR szXMLString, CFX_ByteTextBuf &szResultBuf);
- static void Encode (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void EncodeURL (FX_BSTR szURLString, CFX_ByteTextBuf &szResultBuf);
- static void EncodeHTML (FX_BSTR szHTMLString, CFX_ByteTextBuf &szResultBuf);
- static void EncodeXML (FX_BSTR szXMLString, CFX_ByteTextBuf &szResultBuf);
- static FX_BOOL HTMLSTR2Code (FX_WSTR pData, uint32_t &iCode);
+ static void At (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Concat (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Decode (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void DecodeURL (const CFX_ByteStringC& szURLString, CFX_ByteTextBuf &szResultBuf);
+ static void DecodeHTML (const CFX_ByteStringC& szHTMLString, CFX_ByteTextBuf &szResultBuf);
+ static void DecodeXML (const CFX_ByteStringC& szXMLString, CFX_ByteTextBuf &szResultBuf);
+ static void Encode (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void EncodeURL (const CFX_ByteStringC& szURLString, CFX_ByteTextBuf &szResultBuf);
+ static void EncodeHTML (const CFX_ByteStringC& szHTMLString, CFX_ByteTextBuf &szResultBuf);
+ static void EncodeXML (const CFX_ByteStringC& szXMLString, CFX_ByteTextBuf &szResultBuf);
+ static FX_BOOL HTMLSTR2Code (const CFX_WideStringC& pData, uint32_t &iCode);
static FX_BOOL HTMLCode2STR (uint32_t iCode, CFX_WideString &wsHTMLReserve);
- static void Format (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Left (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Len (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Lower (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Ltrim (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Parse (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Replace (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Right (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Rtrim (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Space (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Str (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Stuff (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Substr (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Uuid (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Upper (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void WordNum (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void TrillionUS (FX_BSTR szData, CFX_ByteTextBuf &strBuf);
- static void WordUS (FX_BSTR szData, int32_t iStyle, CFX_ByteTextBuf &strBuf);
+ static void Format (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Left (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Len (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Lower (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Ltrim (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Parse (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Replace (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Right (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Rtrim (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Space (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Str (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Stuff (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Substr (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Uuid (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Upper (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void WordNum (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void TrillionUS (const CFX_ByteStringC& szData, CFX_ByteTextBuf &strBuf);
+ static void WordUS (const CFX_ByteStringC& szData, int32_t iStyle, CFX_ByteTextBuf &strBuf);
- static void Get (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Post (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void Put (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void assign_value_operator (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void logical_or_operator (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void logical_and_operator (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void equality_operator (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void notequality_operator (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
+ static void Get (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Post (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void Put (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void assign_value_operator (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void logical_or_operator (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void logical_and_operator (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void equality_operator (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void notequality_operator (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
static FX_BOOL fm_ref_equal (FXJSE_HOBJECT hThis, CFXJSE_Arguments &args);
- static void less_operator (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void lessequal_operator (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void greater_operator (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void greaterequal_operator (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void plus_operator (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void minus_operator (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void multiple_operator (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void divide_operator (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void positive_operator (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void negative_operator (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void logical_not_operator (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void dot_accessor (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void dotdot_accessor (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void eval_translation (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void is_fm_object (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void is_fm_array (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void get_fm_value (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void get_fm_jsobj (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void fm_var_filter (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static void concat_fm_object(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
+ static void less_operator (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void lessequal_operator (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void greater_operator (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void greaterequal_operator (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void plus_operator (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void minus_operator (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void multiple_operator (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void divide_operator (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void positive_operator (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void negative_operator (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void logical_not_operator (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void dot_accessor (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void dotdot_accessor (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void eval_translation (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void is_fm_object (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void is_fm_array (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void get_fm_value (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void get_fm_jsobj (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void fm_var_filter (FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static void concat_fm_object(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
static int32_t hvalue_get_array_length (FXJSE_HOBJECT hThis, FXJSE_HVALUE arg);
static FX_BOOL simpleValueCompare (FXJSE_HOBJECT hThis, FXJSE_HVALUE firstValue, FXJSE_HVALUE secondValue);
static void unfoldArgs (FXJSE_HOBJECT hThis, CFXJSE_Arguments &args, FXJSE_HVALUE *&resultValues, int32_t &iCount, int32_t iStart = 0);
static void GetObjectDefaultValue(FXJSE_HVALUE hObjectValue, FXJSE_HVALUE hDefaultValue);
static FX_BOOL SetObjectDefaultValue(FXJSE_HVALUE hObjectValue, FXJSE_HVALUE hNewValue);
- static void GenerateSomExpression(FX_BSTR szName, int32_t iIndexFlags, int32_t iIndexValue, FX_BOOL bIsStar, CFX_ByteString& szSomExp);
- static FX_BOOL GetObjectByName(FXJSE_HOBJECT hThis, FXJSE_HVALUE accessorValue, FX_BSTR szAccessorName);
- static int32_t ResolveObjects(FXJSE_HOBJECT hThis, FXJSE_HVALUE hParentValue, FX_BSTR bsSomExp, XFA_RESOLVENODE_RS &resoveNodeRS, FX_BOOL bdotAccessor = TRUE, FX_BOOL bHasNoResolveName = FALSE);
+ static void GenerateSomExpression(const CFX_ByteStringC& szName, int32_t iIndexFlags, int32_t iIndexValue, FX_BOOL bIsStar, CFX_ByteString& szSomExp);
+ static FX_BOOL GetObjectByName(FXJSE_HOBJECT hThis, FXJSE_HVALUE accessorValue, const CFX_ByteStringC& szAccessorName);
+ static int32_t ResolveObjects(FXJSE_HOBJECT hThis, FXJSE_HVALUE hParentValue, const CFX_ByteStringC& bsSomExp, XFA_RESOLVENODE_RS &resoveNodeRS, FX_BOOL bdotAccessor = TRUE, FX_BOOL bHasNoResolveName = FALSE);
static void ParseResolveResult(FXJSE_HOBJECT hThis, const XFA_RESOLVENODE_RS& resoveNodeRS, FXJSE_HVALUE hParentValue, FXJSE_HVALUE *&resultValues, int32_t &iSize, FX_BOOL &bAttribute);
static FXJSE_HVALUE GetSimpleHValue (FXJSE_HOBJECT hThis, CFXJSE_Arguments &args, uint32_t index);
static FX_BOOL HValueIsNull (FXJSE_HOBJECT hThis, FXJSE_HVALUE hValue);
static int32_t HValueToInteger (FXJSE_HOBJECT hThis, FXJSE_HVALUE hValue);
- static FX_DOUBLE StringToDouble(FX_BSTR szStringVal);
+ static FX_DOUBLE StringToDouble(const CFX_ByteStringC& szStringVal);
static FX_FLOAT HValueToFloat (FXJSE_HOBJECT hThis, FXJSE_HVALUE hValue);
static FX_DOUBLE HValueToDouble (FXJSE_HOBJECT hThis, FXJSE_HVALUE hValue);
static void HValueToUTF8String (FXJSE_HVALUE hValue, CFX_ByteString& outputValue);
diff --git a/xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp b/xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp
index 590fa3fd76..768c080123 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp
+++ b/xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp
@@ -23,7 +23,7 @@ CXFA_FMParse::~CXFA_FMParse()
m_pScript = 0;
m_pToken = 0;
}
-int32_t CXFA_FMParse::Init(FX_WSTR wsFormcalc, CXFA_FMErrorInfo *pErrorInfo)
+int32_t CXFA_FMParse::Init(const CFX_WideStringC& wsFormcalc, CXFA_FMErrorInfo *pErrorInfo)
{
m_pScript = wsFormcalc.GetPtr();
m_uLength = wsFormcalc.GetLength();
diff --git a/xfa/src/fxfa/src/fm2js/xfa_fmparse.h b/xfa/src/fxfa/src/fm2js/xfa_fmparse.h
index e610ab56ef..64bd835010 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_fmparse.h
+++ b/xfa/src/fxfa/src/fm2js/xfa_fmparse.h
@@ -11,7 +11,7 @@ class CXFA_FMParse
public:
CXFA_FMParse();
~CXFA_FMParse();
- int32_t Init(FX_WSTR wsFormcalc, CXFA_FMErrorInfo *pErrorInfo);
+ int32_t Init(const CFX_WideStringC& wsFormcalc, CXFA_FMErrorInfo *pErrorInfo);
void NextToken();
void Check(XFA_FM_TOKEN op);
void Error(FX_DWORD lineNum, XFA_FM_ERRMSG msg, ...);
diff --git a/xfa/src/fxfa/src/fm2js/xfa_lexer.cpp b/xfa/src/fxfa/src/fm2js/xfa_lexer.cpp
index 4c24f78b1d..ba6221979d 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_lexer.cpp
+++ b/xfa/src/fxfa/src/fm2js/xfa_lexer.cpp
@@ -166,7 +166,7 @@ CXFA_FMToken::CXFA_FMToken( FX_DWORD uLineNum )
CXFA_FMToken::~CXFA_FMToken()
{
}
-CXFA_FMLexer::CXFA_FMLexer(FX_WSTR wsFormCalc, CXFA_FMErrorInfo *pErrorInfo)
+CXFA_FMLexer::CXFA_FMLexer(const CFX_WideStringC& wsFormCalc, CXFA_FMErrorInfo *pErrorInfo)
{
m_pScript = wsFormCalc.GetPtr();
m_uLength = wsFormCalc.GetLength();
@@ -534,7 +534,7 @@ void CXFA_FMLexer::Comment( const FX_WCHAR* p, const FX_WCHAR* &pEnd )
}
pEnd = p;
}
-XFA_FM_TOKEN CXFA_FMLexer::IsKeyword(FX_WSTR str)
+XFA_FM_TOKEN CXFA_FMLexer::IsKeyword(const CFX_WideStringC& str)
{
int32_t iLength = str.GetLength();
uint32_t uHash = FX_HashCode_String_GetW(str.GetPtr(), iLength, TRUE);
diff --git a/xfa/src/fxfa/src/fm2js/xfa_lexer.h b/xfa/src/fxfa/src/fm2js/xfa_lexer.h
index 2850ce5f75..a3ab6253a6 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_lexer.h
+++ b/xfa/src/fxfa/src/fm2js/xfa_lexer.h
@@ -41,14 +41,14 @@ public:
class CXFA_FMLexer
{
public:
- CXFA_FMLexer(FX_WSTR wsFormcalc, CXFA_FMErrorInfo *pErrorInfo);
+ CXFA_FMLexer(const CFX_WideStringC& wsFormcalc, CXFA_FMErrorInfo *pErrorInfo);
~CXFA_FMLexer();
CXFA_FMToken* NextToken();
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);
+ XFA_FM_TOKEN IsKeyword(const CFX_WideStringC& p);
void SetCurrentLine(FX_DWORD line)
{
m_uCurrentLine = line;
diff --git a/xfa/src/fxfa/src/fm2js/xfa_program.cpp b/xfa/src/fxfa/src/fm2js/xfa_program.cpp
index 51faea0e91..06d8e10e49 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_program.cpp
+++ b/xfa/src/fxfa/src/fm2js/xfa_program.cpp
@@ -16,7 +16,7 @@ CXFA_FMProgram::~CXFA_FMProgram()
m_globalFunction = 0;
}
}
-int32_t CXFA_FMProgram::Init(FX_WSTR wsFormcalc)
+int32_t CXFA_FMProgram::Init(const CFX_WideStringC& wsFormcalc)
{
return m_parse.Init(wsFormcalc, &m_pErrorInfo);
}
diff --git a/xfa/src/fxfa/src/fm2js/xfa_program.h b/xfa/src/fxfa/src/fm2js/xfa_program.h
index a7453d4d1d..2e8149e543 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_program.h
+++ b/xfa/src/fxfa/src/fm2js/xfa_program.h
@@ -11,7 +11,7 @@ class CXFA_FMProgram
public:
CXFA_FMProgram();
~CXFA_FMProgram();
- int32_t Init(FX_WSTR wsFormcalc);
+ int32_t Init(const CFX_WideStringC& wsFormcalc);
int32_t ParseProgram();
int32_t TranslateProgram(CFX_WideTextBuf &wsJavaScript);
CXFA_FMErrorInfo& GetError()
diff --git a/xfa/src/fxfa/src/fm2js/xfa_simpleexpression.cpp b/xfa/src/fxfa/src/fm2js/xfa_simpleexpression.cpp
index d52ab7c076..cd39caaffc 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_simpleexpression.cpp
+++ b/xfa/src/fxfa/src/fm2js/xfa_simpleexpression.cpp
@@ -524,7 +524,7 @@ FX_BOOL CXFA_FMCallExpression::IsBuildInFunc(CFX_WideTextBuf& funcName)
} while (iStart <= iEnd);
return FALSE;
}
-FX_DWORD CXFA_FMCallExpression::IsSomMethodWithObjPara(FX_WSTR methodName)
+FX_DWORD CXFA_FMCallExpression::IsSomMethodWithObjPara(const CFX_WideStringC& methodName)
{
int32_t iLength = methodName.GetLength();
uint32_t uHash = FX_HashCode_String_GetW(methodName.GetPtr(), iLength);
diff --git a/xfa/src/fxfa/src/fm2js/xfa_simpleexpression.h b/xfa/src/fxfa/src/fm2js/xfa_simpleexpression.h
index bacd1d3c38..a66461d28a 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_simpleexpression.h
+++ b/xfa/src/fxfa/src/fm2js/xfa_simpleexpression.h
@@ -192,7 +192,7 @@ public:
CXFA_FMCallExpression(FX_DWORD line, CXFA_FMSimpleExpression *pExp, CFX_PtrArray *pArguments, FX_BOOL bIsSomMethod);
virtual ~CXFA_FMCallExpression();
virtual FX_BOOL IsBuildInFunc(CFX_WideTextBuf& funcName);
- virtual FX_DWORD IsSomMethodWithObjPara(FX_WSTR methodName);
+ virtual FX_DWORD IsSomMethodWithObjPara(const CFX_WideStringC& methodName);
virtual void ToJavaScript(CFX_WideTextBuf& javascript);
private:
FX_BOOL m_bIsSomMethod;
diff --git a/xfa/src/fxfa/src/parser/xfa_basic_imp.cpp b/xfa/src/fxfa/src/parser/xfa_basic_imp.cpp
index 151147b4dc..5195a362c0 100644
--- a/xfa/src/fxfa/src/parser/xfa_basic_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_basic_imp.cpp
@@ -38,7 +38,7 @@ extern const XFA_METHODINFO g_SomMethodData[];
extern const int32_t g_iSomMethodCount;
extern const XFA_SCRIPTATTRIBUTEINFO g_SomAttributeData[];
extern const int32_t g_iSomAttributeCount;
-XFA_LPCPACKETINFO XFA_GetPacketByName(FX_WSTR wsName)
+XFA_LPCPACKETINFO XFA_GetPacketByName(const CFX_WideStringC& wsName)
{
int32_t iLength = wsName.GetLength();
if (iLength == 0) {
@@ -75,7 +75,7 @@ XFA_LPCPACKETINFO XFA_GetPacketByID(FX_DWORD dwPacket)
} while (iStart <= iEnd);
return NULL;
}
-XFA_LPCATTRIBUTEENUMINFO XFA_GetAttributeEnumByName(FX_WSTR wsName)
+XFA_LPCATTRIBUTEENUMINFO XFA_GetAttributeEnumByName(const CFX_WideStringC& wsName)
{
int32_t iLength = wsName.GetLength();
if (iLength == 0) {
@@ -104,7 +104,7 @@ int32_t XFA_GetAttributeCount()
{
return g_iXFAAttributeCount;
}
-XFA_LPCATTRIBUTEINFO XFA_GetAttributeByName(FX_WSTR wsName)
+XFA_LPCATTRIBUTEINFO XFA_GetAttributeByName(const CFX_WideStringC& wsName)
{
int32_t iLength = wsName.GetLength();
if (iLength == 0) {
@@ -194,7 +194,7 @@ int32_t XFA_GetElementCount()
{
return g_iXFAElementCount;
}
-XFA_LPCELEMENTINFO XFA_GetElementByName(FX_WSTR wsName)
+XFA_LPCELEMENTINFO XFA_GetElementByName(const CFX_WideStringC& wsName)
{
int32_t iLength = wsName.GetLength();
if (iLength == 0) {
@@ -374,7 +374,7 @@ int32_t XFA_GetMethodCount()
{
return g_iSomMethodCount;
}
-XFA_LPCMETHODINFO XFA_GetMethodByName(XFA_ELEMENT eElement, FX_WSTR wsMethodName)
+XFA_LPCMETHODINFO XFA_GetMethodByName(XFA_ELEMENT eElement, const CFX_WideStringC& wsMethodName)
{
int32_t iLength = wsMethodName.GetLength();
if (iLength == 0) {
@@ -405,7 +405,7 @@ XFA_LPCMETHODINFO XFA_GetMethodByName(XFA_ELEMENT eElement, FX_WSTR wsMethodName
}
return NULL;
}
-XFA_LPCSCRIPTATTRIBUTEINFO XFA_GetScriptAttributeByName(XFA_ELEMENT eElement, FX_WSTR wsAttributeName)
+XFA_LPCSCRIPTATTRIBUTEINFO XFA_GetScriptAttributeByName(XFA_ELEMENT eElement, const CFX_WideStringC& wsAttributeName)
{
int32_t iLength = wsAttributeName.GetLength();
if (iLength == 0) {
@@ -436,7 +436,7 @@ XFA_LPCSCRIPTATTRIBUTEINFO XFA_GetScriptAttributeByName(XFA_ELEMENT eElement, FX
}
return NULL;
}
-void CXFA_Measurement::Set(FX_WSTR wsMeasure)
+void CXFA_Measurement::Set(const CFX_WideStringC& wsMeasure)
{
if (wsMeasure.IsEmpty()) {
m_fValue = 0;
@@ -534,7 +534,7 @@ FX_BOOL CXFA_Measurement::ToUnit(XFA_UNIT eUnit, FX_FLOAT &fValue) const
}
return FALSE;
}
-XFA_UNIT CXFA_Measurement::GetUnit(FX_WSTR wsUnit)
+XFA_UNIT CXFA_Measurement::GetUnit(const CFX_WideStringC& wsUnit)
{
if (wsUnit == FX_WSTRC(L"mm")) {
return XFA_UNIT_Mm;
diff --git a/xfa/src/fxfa/src/parser/xfa_document_datadescription_imp.cpp b/xfa/src/fxfa/src/parser/xfa_document_datadescription_imp.cpp
index a559d5415f..db44f53ac7 100644
--- a/xfa/src/fxfa/src/parser/xfa_document_datadescription_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_document_datadescription_imp.cpp
@@ -66,7 +66,7 @@ void XFA_DataDescription_UpdateDataRelation(CXFA_Node* pDataNode, CXFA_Node* pDa
}
}
}
-CXFA_Node* XFA_DataDescription_MaybeCreateDataNode(CXFA_Document* pDocument, CXFA_Node* pDataParent, XFA_ELEMENT eNodeType, FX_WSTR wsName)
+CXFA_Node* XFA_DataDescription_MaybeCreateDataNode(CXFA_Document* pDocument, CXFA_Node* pDataParent, XFA_ELEMENT eNodeType, const CFX_WideStringC& wsName)
{
if(!pDataParent) {
return NULL;
diff --git a/xfa/src/fxfa/src/parser/xfa_document_datadescription_imp.h b/xfa/src/fxfa/src/parser/xfa_document_datadescription_imp.h
index ede14c03aa..5ae9fcc792 100644
--- a/xfa/src/fxfa/src/parser/xfa_document_datadescription_imp.h
+++ b/xfa/src/fxfa/src/parser/xfa_document_datadescription_imp.h
@@ -7,5 +7,5 @@
#ifndef _XFA_DOCUMENT_DATADESCRIPTION_IMP_H_
#define _XFA_DOCUMENT_DATADESCRIPTION_IMP_H_
void XFA_DataDescription_UpdateDataRelation(CXFA_Node* pDataNode, CXFA_Node* pDataDescriptionNode);
-CXFA_Node* XFA_DataDescription_MaybeCreateDataNode(CXFA_Document* pDocument, CXFA_Node* pDataParent, XFA_ELEMENT eNodeType, FX_WSTR wsName);
+CXFA_Node* XFA_DataDescription_MaybeCreateDataNode(CXFA_Document* pDocument, CXFA_Node* pDataParent, XFA_ELEMENT eNodeType, const CFX_WideStringC& wsName);
#endif
diff --git a/xfa/src/fxfa/src/parser/xfa_document_imp.cpp b/xfa/src/fxfa/src/parser/xfa_document_imp.cpp
index 690ed2960e..4f60433dc5 100644
--- a/xfa/src/fxfa/src/parser/xfa_document_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_document_imp.cpp
@@ -99,7 +99,7 @@ IXFA_Notify* CXFA_Document::GetNotify() const
{
return m_pParser->GetNotify();
}
-CXFA_Object* CXFA_Document::GetXFANode(FX_WSTR wsNodeName)
+CXFA_Object* CXFA_Document::GetXFANode(const CFX_WideStringC& wsNodeName)
{
return GetXFANode(FX_HashCode_String_GetW(wsNodeName.GetPtr(), wsNodeName.GetLength()));
}
@@ -291,7 +291,7 @@ XFA_VERSION CXFA_Document::RecognizeXFAVersionNumber(CFX_WideString& wsTemplateN
m_eCurVersionMode = eVersion;
return eVersion;
}
-CXFA_Node* CXFA_Document::GetNodeByID(CXFA_Node* pRoot, FX_WSTR wsID)
+CXFA_Node* CXFA_Document::GetNodeByID(CXFA_Node* pRoot, const CFX_WideStringC& wsID)
{
if(!pRoot || wsID.IsEmpty()) {
return NULL;
diff --git a/xfa/src/fxfa/src/parser/xfa_document_serialize.cpp b/xfa/src/fxfa/src/parser/xfa_document_serialize.cpp
index c8412873d2..69c835ff95 100644
--- a/xfa/src/fxfa/src/parser/xfa_document_serialize.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_document_serialize.cpp
@@ -98,7 +98,7 @@ CFX_WideString XFA_ExportEncodeAttribute(const CFX_WideString& str)
}
return textBuf.GetWideString();
}
-CFX_WideString XFA_ExportEncodeContent(FX_WSTR str)
+CFX_WideString XFA_ExportEncodeContent(const CFX_WideStringC& str)
{
CFX_WideTextBuf textBuf;
int32_t iLen = str.GetLength();
@@ -129,7 +129,7 @@ CFX_WideString XFA_ExportEncodeContent(FX_WSTR str)
}
return textBuf.GetWideString();
}
-static void XFA_SaveAttribute(CXFA_Node* pNode, XFA_ATTRIBUTE eName, FX_WSTR wsName, FX_BOOL bProto, CFX_WideString &wsOutput)
+static void XFA_SaveAttribute(CXFA_Node* pNode, XFA_ATTRIBUTE eName, const CFX_WideStringC& wsName, FX_BOOL bProto, CFX_WideString &wsOutput)
{
CFX_WideString wsValue;
if ((!bProto && !pNode->HasAttribute((XFA_ATTRIBUTE)eName, bProto)) || !pNode->GetAttribute((XFA_ATTRIBUTE)eName, wsValue, FALSE)) {
diff --git a/xfa/src/fxfa/src/parser/xfa_locale.cpp b/xfa/src/fxfa/src/parser/xfa_locale.cpp
index 56a55cd4c3..08b88c1fb1 100644
--- a/xfa/src/fxfa/src/parser/xfa_locale.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_locale.cpp
@@ -114,7 +114,7 @@ void CXFA_XMLLocale::GetEraName(CFX_WideString& wsEraName, FX_BOOL bAD ) const
{
wsEraName = GetCalendarSymbol(FX_BSTRC("era"), bAD ? 1 : 0, FALSE);
}
-CFX_WideString CXFA_XMLLocale::GetCalendarSymbol(FX_BSTR symbol, int index, FX_BOOL bAbbr) const
+CFX_WideString CXFA_XMLLocale::GetCalendarSymbol(const CFX_ByteStringC& symbol, int index, FX_BOOL bAbbr) const
{
CFX_ByteString pstrSymbolNames = symbol + "Names";
CFX_WideString wsSymbolName = L"";
@@ -206,7 +206,7 @@ void CXFA_XMLLocale::GetNumPattern(FX_LOCALENUMSUBCATEGORY eType, CFX_WideString
break;
}
}
-void CXFA_XMLLocale::GetPattern(CXML_Element* pElement, FX_BSTR bsTag, FX_WSTR wsName, CFX_WideString& wsPattern) const
+void CXFA_XMLLocale::GetPattern(CXML_Element* pElement, const CFX_ByteStringC& bsTag, const CFX_WideStringC& wsName, CFX_WideString& wsPattern) const
{
int32_t iCount = pElement->CountElements(FX_BSTRC(""), bsTag);
for (int32_t i = 0; i < iCount; i++) {
@@ -337,7 +337,7 @@ void CXFA_NodeLocale::GetNumPattern(FX_LOCALENUMSUBCATEGORY eType, CFX_WideStrin
break;
}
}
-CXFA_Node* CXFA_NodeLocale::GetNodeByName(CXFA_Node *pParent, FX_WSTR wsName) const
+CXFA_Node* CXFA_NodeLocale::GetNodeByName(CXFA_Node *pParent, const CFX_WideStringC& wsName) const
{
CXFA_Node *pChild = pParent ? pParent->GetNodeItem(XFA_NODEITEM_FirstChild) : NULL;
while (pChild) {
@@ -351,7 +351,7 @@ CXFA_Node* CXFA_NodeLocale::GetNodeByName(CXFA_Node *pParent, FX_WSTR wsName) co
}
return NULL;
}
-CFX_WideString CXFA_NodeLocale::GetSymbol(XFA_ELEMENT eElement, FX_WSTR symbol_type) const
+CFX_WideString CXFA_NodeLocale::GetSymbol(XFA_ELEMENT eElement, const CFX_WideStringC& symbol_type) const
{
CXFA_Node *pSymbols = m_pLocale ? m_pLocale->GetChild(0, eElement) : NULL;
CXFA_Node *pSymbol = GetNodeByName(pSymbols, symbol_type);
diff --git a/xfa/src/fxfa/src/parser/xfa_locale.h b/xfa/src/fxfa/src/parser/xfa_locale.h
index 2df6201c56..329ebc2fdc 100644
--- a/xfa/src/fxfa/src/parser/xfa_locale.h
+++ b/xfa/src/fxfa/src/parser/xfa_locale.h
@@ -27,8 +27,8 @@ public:
protected:
~CXFA_XMLLocale();
- void GetPattern(CXML_Element* pElement, FX_BSTR bsTag, FX_WSTR wsName, CFX_WideString& wsPattern) const;
- CFX_WideString GetCalendarSymbol(FX_BSTR symbol, int index, FX_BOOL bAbbr) const;
+ void GetPattern(CXML_Element* pElement, const CFX_ByteStringC& bsTag, const CFX_WideStringC& wsName, CFX_WideString& wsPattern) const;
+ CFX_WideString GetCalendarSymbol(const CFX_ByteStringC& symbol, int index, FX_BOOL bAbbr) const;
private:
CXML_Element* m_pLocaleData;
};
@@ -52,8 +52,8 @@ public:
virtual void GetNumPattern(FX_LOCALENUMSUBCATEGORY eType, CFX_WideString& wsPattern) const;
protected:
~CXFA_NodeLocale();
- CXFA_Node* GetNodeByName(CXFA_Node *pParent, FX_WSTR wsName) const;
- CFX_WideString GetSymbol(XFA_ELEMENT eElement, FX_WSTR symbol_type) const;
+ CXFA_Node* GetNodeByName(CXFA_Node *pParent, const CFX_WideStringC& wsName) const;
+ CFX_WideString GetSymbol(XFA_ELEMENT eElement, const CFX_WideStringC& symbol_type) const;
CFX_WideString GetCalendarSymbol(XFA_ELEMENT eElement, int index, FX_BOOL bAbbr) const;
CXFA_Node* m_pLocale;
diff --git a/xfa/src/fxfa/src/parser/xfa_localemgr.cpp b/xfa/src/fxfa/src/parser/xfa_localemgr.cpp
index 69b34993b9..ae5eab9d9c 100644
--- a/xfa/src/fxfa/src/parser/xfa_localemgr.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_localemgr.cpp
@@ -838,7 +838,7 @@ IFX_Locale* CXFA_LocaleMgr::GetLocale(FX_WORD lcid)
}
return pLocal;
}
-IFX_Locale* CXFA_LocaleMgr::GetLocaleByName(FX_WSTR wsLocaleName)
+IFX_Locale* CXFA_LocaleMgr::GetLocaleByName(const CFX_WideStringC& wsLocaleName)
{
int32_t iCount = m_LocaleArray.GetSize();
int32_t i = 0;
diff --git a/xfa/src/fxfa/src/parser/xfa_object_imp.cpp b/xfa/src/fxfa/src/parser/xfa_object_imp.cpp
index c1d09fdbdc..c6db2235ba 100644
--- a/xfa/src/fxfa/src/parser/xfa_object_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_object_imp.cpp
@@ -1677,7 +1677,7 @@ static const XFA_ExecEventParaInfo gs_eventParaInfos[] = {
{0xfc82d695, L"postSave", XFA_EVENT_PostSave, 0},
{0xfd54fbb7, L"postSign", XFA_EVENT_PostSign, 6},
};
-const XFA_ExecEventParaInfo* GetEventParaInfoByName(FX_WSTR wsEventName)
+const XFA_ExecEventParaInfo* GetEventParaInfoByName(const CFX_WideStringC& wsEventName)
{
int32_t iLength = wsEventName.GetLength();
uint32_t uHash = FX_HashCode_String_GetW(wsEventName.GetPtr(), iLength);
@@ -3504,7 +3504,7 @@ enum XFA_KEYTYPE {
XFA_KEYTYPE_Custom,
XFA_KEYTYPE_Element,
};
-void* XFA_GetMapKey_Custom(FX_WSTR wsKey)
+void* XFA_GetMapKey_Custom(const CFX_WideStringC& wsKey)
{
FX_DWORD dwKey = FX_HashCode_String_GetW(wsKey.GetPtr(), wsKey.GetLength());
return (void*)(uintptr_t)((dwKey << 1) | XFA_KEYTYPE_Custom);
@@ -3526,7 +3526,7 @@ FX_BOOL CXFA_Node::HasAttribute(XFA_ATTRIBUTE eAttr, FX_BOOL bCanInherit )
}
return HasMapModuleKey(pKey, bCanInherit);
}
-FX_BOOL CXFA_Node::SetAttribute(XFA_ATTRIBUTE eAttr, FX_WSTR wsValue, FX_BOOL bNotify )
+FX_BOOL CXFA_Node::SetAttribute(XFA_ATTRIBUTE eAttr, const CFX_WideStringC& wsValue, FX_BOOL bNotify )
{
XFA_LPCATTRIBUTEINFO pAttr = XFA_GetAttributeByID(eAttr);
if (pAttr == NULL) {
@@ -3618,7 +3618,7 @@ FX_BOOL CXFA_Node::GetAttribute(XFA_ATTRIBUTE eAttr, CFX_WideString &wsValue, FX
}
return FALSE;
}
-FX_BOOL CXFA_Node::SetAttribute(FX_WSTR wsAttr, FX_WSTR wsValue, FX_BOOL bNotify)
+FX_BOOL CXFA_Node::SetAttribute(const CFX_WideStringC& wsAttr, const CFX_WideStringC& wsValue, FX_BOOL bNotify)
{
XFA_LPCATTRIBUTEINFO pAttributeInfo = XFA_GetAttributeByName(wsValue);
if (pAttributeInfo) {
@@ -3628,7 +3628,7 @@ FX_BOOL CXFA_Node::SetAttribute(FX_WSTR wsAttr, FX_WSTR wsValue, FX_BOOL bNotify
SetMapModuleString(pKey, wsValue);
return TRUE;
}
-FX_BOOL CXFA_Node::GetAttribute(FX_WSTR wsAttr, CFX_WideString &wsValue, FX_BOOL bUseDefault)
+FX_BOOL CXFA_Node::GetAttribute(const CFX_WideStringC& wsAttr, CFX_WideString &wsValue, FX_BOOL bUseDefault)
{
XFA_LPCATTRIBUTEINFO pAttributeInfo = XFA_GetAttributeByName(wsAttr);
if (pAttributeInfo) {
@@ -3641,7 +3641,7 @@ FX_BOOL CXFA_Node::GetAttribute(FX_WSTR wsAttr, CFX_WideString &wsValue, FX_BOOL
}
return TRUE;
}
-FX_BOOL CXFA_Node::RemoveAttribute(FX_WSTR wsAttr)
+FX_BOOL CXFA_Node::RemoveAttribute(const CFX_WideStringC& wsAttr)
{
void* pKey = XFA_GetMapKey_Custom(wsAttr);
RemoveMapModuleKey(pKey);
@@ -4464,7 +4464,7 @@ FX_BOOL CXFA_Node::RemoveChild(CXFA_Node *pNode, FX_BOOL bNotify)
}
return TRUE;
}
-CXFA_Node* CXFA_Node::GetFirstChildByName(FX_WSTR wsName) const
+CXFA_Node* CXFA_Node::GetFirstChildByName(const CFX_WideStringC& wsName) const
{
return GetFirstChildByName(wsName.IsEmpty() ? 0 : FX_HashCode_String_GetW(wsName.GetPtr(), wsName.GetLength()));
}
@@ -4495,7 +4495,7 @@ CXFA_Node* CXFA_Node::GetNextSameNameSibling(FX_DWORD dwNameHash) const
}
return NULL;
}
-CXFA_Node* CXFA_Node::GetNextSameNameSibling(FX_WSTR wsNodeName) const
+CXFA_Node* CXFA_Node::GetNextSameNameSibling(const CFX_WideStringC& wsNodeName) const
{
return GetNextSameNameSibling(wsNodeName.IsEmpty() ? 0 : FX_HashCode_String_GetW(wsNodeName.GetPtr(), wsNodeName.GetLength()));
}
@@ -4622,7 +4622,7 @@ void CXFA_Node::OnChanged(XFA_ATTRIBUTE eAttr, void* pNewValue, FX_BOOL bNotify,
Script_Attribute_SendAttributeChangeMessage((void*)(uintptr_t)eAttr, pNewValue, bScriptModify);
}
}
-int32_t CXFA_Node::execSingleEventByName(FX_WSTR wsEventName, XFA_ELEMENT eElementType)
+int32_t CXFA_Node::execSingleEventByName(const CFX_WideStringC& wsEventName, XFA_ELEMENT eElementType)
{
int32_t iRet = XFA_EVENTERROR_NotExist;
const XFA_ExecEventParaInfo* eventParaInfo = GetEventParaInfoByName(wsEventName);
@@ -4723,7 +4723,7 @@ FX_BOOL CXFA_Node::GetMapModuleValue(void* pKey, void* &pValue)
}
return FALSE;
}
-void CXFA_Node::SetMapModuleString(void* pKey, FX_WSTR wsValue)
+void CXFA_Node::SetMapModuleString(void* pKey, const CFX_WideStringC& wsValue)
{
SetMapModuleBuffer(pKey, (void*)wsValue.GetPtr(), wsValue.GetLength() * sizeof(FX_WCHAR));
}
@@ -4946,7 +4946,7 @@ CXFA_NodeList::CXFA_NodeList(CXFA_Document* pDocument)
{
m_pDocument->GetScriptContext()->CacheList(this);
}
-CXFA_Node* CXFA_NodeList::NamedItem(FX_WSTR wsName)
+CXFA_Node* CXFA_NodeList::NamedItem(const CFX_WideStringC& wsName)
{
int32_t iCount = GetLength();
FX_DWORD dwHashCode = FX_HashCode_String_GetW(wsName.GetPtr(), wsName.GetLength());
diff --git a/xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp b/xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp
index b00b29700f..55f47685d3 100644
--- a/xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp
@@ -16,7 +16,7 @@
#include "../common/xfa_localemgr.h"
#include "../common/xfa_fm2jsapi.h"
#include "xfa_debug_parser.h"
-static FX_ARGB XFA_WStringToColor(FX_WSTR wsValue)
+static FX_ARGB XFA_WStringToColor(const CFX_WideStringC& wsValue)
{
uint8_t r = 0, g = 0, b = 0;
if (wsValue.GetLength() == 0) {
@@ -1226,7 +1226,7 @@ int32_t CXFA_Validate::GetScriptTest()
{
return m_pNode->GetEnum(XFA_ATTRIBUTE_ScriptTest);
}
-void CXFA_Validate::GetMessageText(CFX_WideString &wsMessage, FX_WSTR wsMessageType)
+void CXFA_Validate::GetMessageText(CFX_WideString &wsMessage, const CFX_WideStringC& wsMessageType)
{
if (CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_Message, FALSE)) {
CXFA_Node *pItemNode = pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
@@ -1259,7 +1259,7 @@ void CXFA_Validate::GetNullMessageText(CFX_WideString &wsMessage)
{
GetMessageText(wsMessage, FX_WSTRC(L"nullTest"));
}
-void CXFA_Validate::SetMessageText(CFX_WideString &wsMessage, FX_WSTR wsMessageType)
+void CXFA_Validate::SetMessageText(CFX_WideString &wsMessage, const CFX_WideStringC& wsMessageType)
{
if (CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_Message, TRUE)) {
CXFA_Node *pItemNode = pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
@@ -2241,7 +2241,7 @@ CXFA_Node* CXFA_WidgetData::GetSelectedMember()
}
return pSelectedMember;
}
-CXFA_Node* CXFA_WidgetData::SetSelectedMember(FX_WSTR wsName, FX_BOOL bNotify)
+CXFA_Node* CXFA_WidgetData::SetSelectedMember(const CFX_WideStringC& wsName, FX_BOOL bNotify)
{
CXFA_Node *pSelectedMember = NULL;
FX_DWORD nameHash = FX_HashCode_String_GetW(wsName.GetPtr(), wsName.GetLength());
@@ -2255,7 +2255,7 @@ CXFA_Node* CXFA_WidgetData::SetSelectedMember(FX_WSTR wsName, FX_BOOL bNotify)
}
return pSelectedMember;
}
-void CXFA_WidgetData::SetSelectedMemberByValue(FX_WSTR wsValue, FX_BOOL bNotify, FX_BOOL bScriptModify, FX_BOOL bSyncData)
+void CXFA_WidgetData::SetSelectedMemberByValue(const CFX_WideStringC& wsValue, FX_BOOL bNotify, FX_BOOL bScriptModify, FX_BOOL bSyncData)
{
CFX_WideString wsExclGroup;
for (CXFA_Node *pNode = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild); pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
@@ -2691,7 +2691,7 @@ void CXFA_WidgetData::InsertItem(const CFX_WideString &wsLabel, const CFX_WideSt
}
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)
+void CXFA_WidgetData::GetItemLabel(const CFX_WideStringC& wsValue, CFX_WideString &wsLabel)
{
int32_t iCount = 0;
CXFA_NodeArray listitems;
@@ -2735,7 +2735,7 @@ void CXFA_WidgetData::GetItemLabel(FX_WSTR wsValue, CFX_WideString &wsLabel)
}
}
}
-void CXFA_WidgetData::GetItemValue(FX_WSTR wsLabel, CFX_WideString &wsValue)
+void CXFA_WidgetData::GetItemValue(const CFX_WideStringC& wsLabel, CFX_WideString &wsValue)
{
int32_t iCount = 0;
CXFA_NodeArray listitems;
@@ -3516,7 +3516,7 @@ FX_BOOL CXFA_WidgetData::GetValue(CFX_WideString &wsValue, XFA_VALUEPICTURE eVal
}
return TRUE;
}
-FX_BOOL CXFA_WidgetData::GetNormalizeDataValue(FX_WSTR wsValue, CFX_WideString &wsNormalizeValue)
+FX_BOOL CXFA_WidgetData::GetNormalizeDataValue(const CFX_WideStringC& wsValue, CFX_WideString &wsNormalizeValue)
{
wsNormalizeValue = wsValue;
if (wsValue.IsEmpty()) {
@@ -3538,7 +3538,7 @@ FX_BOOL CXFA_WidgetData::GetNormalizeDataValue(FX_WSTR wsValue, CFX_WideString &
}
return FALSE;
}
-FX_BOOL CXFA_WidgetData::GetFormatDataValue(FX_WSTR wsValue, CFX_WideString &wsFormatedValue)
+FX_BOOL CXFA_WidgetData::GetFormatDataValue(const CFX_WideStringC& wsValue, CFX_WideString &wsFormatedValue)
{
wsFormatedValue = wsValue;
if (wsValue.IsEmpty()) {
@@ -3690,7 +3690,7 @@ void CXFA_WidgetData::SyncValue(const CFX_WideString& wsValue, FX_BOOL bNotify)
}
m_pNode->SetContent(wsValue, wsFormatValue, bNotify);
}
-void CXFA_WidgetData::InsertListTextItem(CXFA_Node* pItems, FX_WSTR wsText, int32_t nIndex )
+void CXFA_WidgetData::InsertListTextItem(CXFA_Node* pItems, const CFX_WideStringC& wsText, int32_t nIndex )
{
CXFA_Node* pText = pItems->CreateSamePacketNode(XFA_ELEMENT_Text);
pItems->InsertChild(nIndex, pText);
diff --git a/xfa/src/fxfa/src/parser/xfa_parser_imp.cpp b/xfa/src/fxfa/src/parser/xfa_parser_imp.cpp
index 71ceebf764..82e6739c1e 100644
--- a/xfa/src/fxfa/src/parser/xfa_parser_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_parser_imp.cpp
@@ -195,7 +195,7 @@ void CXFA_SimpleParser::ConstructXFANode(CXFA_Node* pXFANode, IFDE_XMLNode* pXML
}
}
}
-FX_BOOL XFA_FDEExtension_ResolveNamespaceQualifier(IFDE_XMLElement* pNode, FX_WSTR wsQualifier, CFX_WideString& wsNamespaceURI)
+FX_BOOL XFA_FDEExtension_ResolveNamespaceQualifier(IFDE_XMLElement* pNode, const CFX_WideStringC& wsQualifier, CFX_WideString& wsNamespaceURI)
{
if(!pNode) {
return FALSE;
@@ -229,7 +229,7 @@ static inline void XFA_FDEExtension_GetElementTagNamespaceURI(IFDE_XMLElement* p
wsNamespaceURI.Empty();
}
}
-static FX_BOOL XFA_FDEExtension_MatchNodeName(IFDE_XMLNode* pNode, FX_WSTR wsLocalTagName, FX_WSTR wsNamespaceURIPrefix, FX_DWORD eMatchFlags = XFA_XDPPACKET_FLAGS_NOMATCH)
+static FX_BOOL XFA_FDEExtension_MatchNodeName(IFDE_XMLNode* pNode, const CFX_WideStringC& wsLocalTagName, const CFX_WideStringC& wsNamespaceURIPrefix, FX_DWORD eMatchFlags = XFA_XDPPACKET_FLAGS_NOMATCH)
{
if(!pNode || pNode->GetType() != FDE_XMLNODE_Element) {
return FALSE;
@@ -249,7 +249,7 @@ static FX_BOOL XFA_FDEExtension_MatchNodeName(IFDE_XMLNode* pNode, FX_WSTR wsLoc
}
return wsNodeStr == wsNamespaceURIPrefix;
}
-static FX_BOOL XFA_FDEExtension_GetAttributeLocalName(FX_WSTR wsAttributeName, CFX_WideString& wsLocalAttrName)
+static FX_BOOL XFA_FDEExtension_GetAttributeLocalName(const CFX_WideStringC& wsAttributeName, CFX_WideString& wsLocalAttrName)
{
CFX_WideString wsAttrName(wsAttributeName);
FX_STRSIZE iFind = wsAttrName.Find(L':', 0);
@@ -261,7 +261,7 @@ static FX_BOOL XFA_FDEExtension_GetAttributeLocalName(FX_WSTR wsAttributeName, C
return TRUE;
}
}
-static FX_BOOL XFA_FDEExtension_ResolveAttribute(IFDE_XMLElement *pElement, FX_WSTR wsAttributeName, CFX_WideString& wsLocalAttrName, CFX_WideString& wsNamespaceURI)
+static FX_BOOL XFA_FDEExtension_ResolveAttribute(IFDE_XMLElement *pElement, const CFX_WideStringC& wsAttributeName, CFX_WideString& wsLocalAttrName, CFX_WideString& wsNamespaceURI)
{
CFX_WideString wsAttrName(wsAttributeName);
CFX_WideString wsNSPrefix;
@@ -277,7 +277,7 @@ static FX_BOOL XFA_FDEExtension_ResolveAttribute(IFDE_XMLElement *pElement, FX_W
}
return TRUE;
}
-static FX_BOOL XFA_FDEExtension_FindAttributeWithNS(IFDE_XMLElement *pElement, FX_WSTR wsLocalAttributeName, FX_WSTR wsNamespaceURIPrefix, CFX_WideString& wsValue, FX_BOOL bMatchNSAsPrefix = FALSE)
+static FX_BOOL XFA_FDEExtension_FindAttributeWithNS(IFDE_XMLElement *pElement, const CFX_WideStringC& wsLocalAttributeName, const CFX_WideStringC& wsNamespaceURIPrefix, CFX_WideString& wsValue, FX_BOOL bMatchNSAsPrefix = FALSE)
{
if(!pElement) {
return FALSE;
diff --git a/xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp b/xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp
index ffbdd6c8ba..697c75d4b1 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp
@@ -362,7 +362,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_DocumentInBatch(CFXJSE_Argu
FXJSE_Value_SetInteger(hValue, iCur);
}
}
-static int32_t XFA_FilterName(FX_WSTR wsExpression, int32_t nStart, CFX_WideString &wsFilter)
+static int32_t XFA_FilterName(const CFX_WideStringC& wsExpression, int32_t nStart, CFX_WideString &wsFilter)
{
FXSYS_assert(nStart > -1);
int32_t iLength = wsExpression.GetLength();
diff --git a/xfa/src/fxfa/src/parser/xfa_script_imp.cpp b/xfa/src/fxfa/src/parser/xfa_script_imp.cpp
index 4dc48f75c7..8e79b75521 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_script_imp.cpp
@@ -81,7 +81,7 @@ void CXFA_ScriptContext::Release()
{
delete this;
}
-FX_BOOL CXFA_ScriptContext::RunScript(XFA_SCRIPTLANGTYPE eScriptType, FX_WSTR wsScript, FXJSE_HVALUE hRetValue, CXFA_Object* pThisObject )
+FX_BOOL CXFA_ScriptContext::RunScript(XFA_SCRIPTLANGTYPE eScriptType, const CFX_WideStringC& wsScript, FXJSE_HVALUE hRetValue, CXFA_Object* pThisObject )
{
CFX_ByteString btScript;
XFA_SCRIPTLANGTYPE eSaveType = m_eScriptType;
@@ -132,7 +132,7 @@ FX_BOOL CXFA_ScriptContext::RunScript(XFA_SCRIPTLANGTYPE eScriptType, FX_WSTR ws
m_eScriptType = eSaveType;
return bRet;
}
-void CXFA_ScriptContext::GlobalPropertySetter(FXJSE_HOBJECT hObject, FX_BSTR szPropName, FXJSE_HVALUE hValue)
+void CXFA_ScriptContext::GlobalPropertySetter(FXJSE_HOBJECT hObject, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue)
{
CXFA_Object* lpOrginalNode = (CXFA_Object*)FXJSE_Value_ToObject(hObject, NULL);
CXFA_Document* pDoc = lpOrginalNode->GetDocument();
@@ -159,7 +159,7 @@ void CXFA_ScriptContext::GlobalPropertySetter(FXJSE_HOBJECT hObject, FX_BSTR szP
}
pNotify->GetDocProvider()->SetGlobalProperty(pNotify->GetHDOC(), szPropName, hValue);
}
-FX_BOOL CXFA_ScriptContext::QueryNodeByFlag(CXFA_Node* refNode, FX_WSTR propname, FXJSE_HVALUE hValue, FX_DWORD dwFlag, FX_BOOL bSetting)
+FX_BOOL CXFA_ScriptContext::QueryNodeByFlag(CXFA_Node* refNode, const CFX_WideStringC& propname, FXJSE_HVALUE hValue, FX_DWORD dwFlag, FX_BOOL bSetting)
{
XFA_RESOLVENODE_RS resolveRs;
int32_t iRet = ResolveObjects(refNode, propname, resolveRs, dwFlag);
@@ -178,7 +178,7 @@ FX_BOOL CXFA_ScriptContext::QueryNodeByFlag(CXFA_Node* refNode, FX_WSTR propname
}
return bResult;
}
-void CXFA_ScriptContext::GlobalPropertyGetter(FXJSE_HOBJECT hObject, FX_BSTR szPropName, FXJSE_HVALUE hValue)
+void CXFA_ScriptContext::GlobalPropertyGetter(FXJSE_HOBJECT hObject, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue)
{
CXFA_Object* pOrginalObject = (CXFA_Object*)FXJSE_Value_ToObject(hObject, NULL);
CXFA_Document* pDoc = pOrginalObject->GetDocument();
@@ -224,7 +224,7 @@ void CXFA_ScriptContext::GlobalPropertyGetter(FXJSE_HOBJECT hObject, FX_BSTR szP
}
pNotify->GetDocProvider()->GetGlobalProperty(pNotify->GetHDOC(), szPropName, hValue);
}
-void CXFA_ScriptContext::NormalPropertyGetter(FXJSE_HOBJECT hObject, FX_BSTR szPropName, FXJSE_HVALUE hValue)
+void CXFA_ScriptContext::NormalPropertyGetter(FXJSE_HOBJECT hObject, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue)
{
CXFA_Object* pOrginalObject = (CXFA_Object*)FXJSE_Value_ToObject(hObject, NULL);
if(pOrginalObject == NULL) {
@@ -259,7 +259,7 @@ void CXFA_ScriptContext::NormalPropertyGetter(FXJSE_HOBJECT hObject, FX_BSTR szP
FXJSE_Value_SetUndefined(hValue);
}
}
-void CXFA_ScriptContext::NormalPropertySetter(FXJSE_HOBJECT hObject, FX_BSTR szPropName, FXJSE_HVALUE hValue)
+void CXFA_ScriptContext::NormalPropertySetter(FXJSE_HOBJECT hObject, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue)
{
CXFA_Object* pOrginalObject = (CXFA_Object*)FXJSE_Value_ToObject(hObject, NULL);
if(pOrginalObject == NULL) {
@@ -299,7 +299,7 @@ void CXFA_ScriptContext::NormalPropertySetter(FXJSE_HOBJECT hObject, FX_BSTR szP
}
}
}
-int32_t CXFA_ScriptContext::NormalPropTypeGetter(FXJSE_HOBJECT hObject, FX_BSTR szPropName, FX_BOOL bQueryIn)
+int32_t CXFA_ScriptContext::NormalPropTypeGetter(FXJSE_HOBJECT hObject, const CFX_ByteStringC& szPropName, FX_BOOL bQueryIn)
{
CXFA_Object* pObject = (CXFA_Object*)FXJSE_Value_ToObject(hObject, NULL);
if(pObject == NULL) {
@@ -317,7 +317,7 @@ int32_t CXFA_ScriptContext::NormalPropTypeGetter(FXJSE_HOBJECT hObject, FX_BSTR
}
return FXJSE_ClassPropType_Property;
}
-int32_t CXFA_ScriptContext::GlobalPropTypeGetter(FXJSE_HOBJECT hObject, FX_BSTR szPropName, FX_BOOL bQueryIn)
+int32_t CXFA_ScriptContext::GlobalPropTypeGetter(FXJSE_HOBJECT hObject, const CFX_ByteStringC& szPropName, FX_BOOL bQueryIn)
{
CXFA_Object* pObject = (CXFA_Object*)FXJSE_Value_ToObject(hObject, NULL);
if(pObject == NULL) {
@@ -332,7 +332,7 @@ int32_t CXFA_ScriptContext::GlobalPropTypeGetter(FXJSE_HOBJECT hObject, FX_BSTR
}
return FXJSE_ClassPropType_Property;
}
-void CXFA_ScriptContext::NormalMethodCall(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
+void CXFA_ScriptContext::NormalMethodCall(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args)
{
CXFA_Object* pObject = (CXFA_Object*)FXJSE_Value_ToObject(hThis, NULL);
if(pObject == NULL) {
@@ -436,7 +436,7 @@ FX_BOOL CXFA_ScriptContext::RunVariablesScript(CXFA_Node* pScriptNode)
}
return TRUE;
}
-FX_BOOL CXFA_ScriptContext::QueryVariableHValue(CXFA_Node* pScriptNode, FX_BSTR szPropName, FXJSE_HVALUE hValue, FX_BOOL bGetter)
+FX_BOOL CXFA_ScriptContext::QueryVariableHValue(CXFA_Node* pScriptNode, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue, FX_BOOL bGetter)
{
if(pScriptNode->GetClassID() != XFA_ELEMENT_Script) {
return FALSE;
@@ -470,7 +470,7 @@ FX_BOOL CXFA_ScriptContext::QueryVariableHValue(CXFA_Node* pScriptNode, FX_BSTR
}
return bRes;
}
-FX_BOOL CXFA_ScriptContext::QueryBuiltinHValue(FX_BSTR szPropName, FXJSE_HVALUE hValue)
+FX_BOOL CXFA_ScriptContext::QueryBuiltinHValue(const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue)
{
void* pBuiltin = NULL;
if ((m_dwBuiltInInFlags & XFA_JSBUILTIN_HasCount) && m_JSBuiltInObjects.Lookup(szPropName, pBuiltin)) {
@@ -524,7 +524,7 @@ void CXFA_ScriptContext::AddJSBuiltinObject(XFA_LPCJSBUILTININFO pBuitinObject)
}
m_JSBuiltInObjects.SetAt(pBuitinObject->pName, (void*)pBuitinObject);
}
-int32_t CXFA_ScriptContext::ResolveObjects(CXFA_Object* refNode, FX_WSTR wsExpression, XFA_RESOLVENODE_RS& resolveNodeRS, FX_DWORD dwStyles, CXFA_Node* bindNode)
+int32_t CXFA_ScriptContext::ResolveObjects(CXFA_Object* refNode, const CFX_WideStringC& wsExpression, XFA_RESOLVENODE_RS& resolveNodeRS, FX_DWORD dwStyles, CXFA_Node* bindNode)
{
if (wsExpression.IsEmpty()) {
return 0;
diff --git a/xfa/src/fxfa/src/parser/xfa_script_imp.h b/xfa/src/fxfa/src/parser/xfa_script_imp.h
index fc43583e8d..d0bcee3669 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_imp.h
+++ b/xfa/src/fxfa/src/parser/xfa_script_imp.h
@@ -25,9 +25,9 @@ public:
{
return m_pEventParam;
}
- virtual FX_BOOL RunScript(XFA_SCRIPTLANGTYPE eScriptType, FX_WSTR wsScript, FXJSE_HVALUE hRetValue, CXFA_Object* pThisObject = NULL);
+ virtual FX_BOOL RunScript(XFA_SCRIPTLANGTYPE eScriptType, const CFX_WideStringC& wsScript, FXJSE_HVALUE hRetValue, CXFA_Object* pThisObject = NULL);
- virtual int32_t ResolveObjects(CXFA_Object* refNode, FX_WSTR wsExpression, XFA_RESOLVENODE_RS& resolveNodeRS, FX_DWORD dwStyles = XFA_RESOLVENODE_Children, CXFA_Node* bindNode = NULL);
+ virtual int32_t ResolveObjects(CXFA_Object* refNode, const CFX_WideStringC& wsExpression, XFA_RESOLVENODE_RS& resolveNodeRS, FX_DWORD dwStyles = XFA_RESOLVENODE_Children, CXFA_Node* bindNode = NULL);
virtual FXJSE_HVALUE GetJSValueFromMap(CXFA_Object* pObject);
virtual void CacheList(CXFA_NodeList* pList)
{
@@ -60,16 +60,16 @@ public:
{
return m_eRunAtType != XFA_ATTRIBUTEENUM_Server;
}
- FX_BOOL QueryNodeByFlag(CXFA_Node* refNode, FX_WSTR propname, FXJSE_HVALUE hValue, FX_DWORD dwFlag, FX_BOOL bSetting);
- FX_BOOL QueryVariableHValue(CXFA_Node* pScriptNode, FX_BSTR szPropName, FXJSE_HVALUE hValue, FX_BOOL bGetter);
- FX_BOOL QueryBuiltinHValue(FX_BSTR szPropName, FXJSE_HVALUE hValue);
- static void GlobalPropertyGetter(FXJSE_HOBJECT hObject, FX_BSTR szPropName, FXJSE_HVALUE hValue);
- static void GlobalPropertySetter(FXJSE_HOBJECT hObject, FX_BSTR szPropName, FXJSE_HVALUE hValue);
- static void NormalPropertyGetter(FXJSE_HOBJECT hObject, FX_BSTR szPropName, FXJSE_HVALUE hValue);
- static void NormalPropertySetter(FXJSE_HOBJECT hObject, FX_BSTR szPropName, FXJSE_HVALUE hValue);
- static void NormalMethodCall(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static int32_t NormalPropTypeGetter(FXJSE_HOBJECT hObject, FX_BSTR szPropName, FX_BOOL bQueryIn);
- static int32_t GlobalPropTypeGetter(FXJSE_HOBJECT hObject, FX_BSTR szPropName, FX_BOOL bQueryIn);
+ FX_BOOL QueryNodeByFlag(CXFA_Node* refNode, const CFX_WideStringC& propname, FXJSE_HVALUE hValue, FX_DWORD dwFlag, FX_BOOL bSetting);
+ FX_BOOL QueryVariableHValue(CXFA_Node* pScriptNode, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue, FX_BOOL bGetter);
+ FX_BOOL QueryBuiltinHValue(const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue);
+ static void GlobalPropertyGetter(FXJSE_HOBJECT hObject, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue);
+ static void GlobalPropertySetter(FXJSE_HOBJECT hObject, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue);
+ static void NormalPropertyGetter(FXJSE_HOBJECT hObject, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue);
+ static void NormalPropertySetter(FXJSE_HOBJECT hObject, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue);
+ static void NormalMethodCall(FXJSE_HOBJECT hThis, const CFX_ByteStringC& szFuncName, CFXJSE_Arguments &args);
+ static int32_t NormalPropTypeGetter(FXJSE_HOBJECT hObject, const CFX_ByteStringC& szPropName, FX_BOOL bQueryIn);
+ static int32_t GlobalPropTypeGetter(FXJSE_HOBJECT hObject, const CFX_ByteStringC& szPropName, FX_BOOL bQueryIn);
FX_BOOL RunVariablesScript(CXFA_Node* pScriptNode);
CXFA_Object* GetVariablesThis(CXFA_Object* pObject, FX_BOOL bScriptNode = FALSE);
void ReleaseVariablesMap();
diff --git a/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp b/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp
index 841176ed69..854e4ba6b9 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp
@@ -187,7 +187,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_NumberSign(CXFA_ResolveNodesData
}
return rnd.m_Nodes.GetSize();
}
-int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_ForAttributeRs(CXFA_Object* curNode, CXFA_ResolveNodesData &rnd, FX_WSTR strAttr)
+int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_ForAttributeRs(CXFA_Object* curNode, CXFA_ResolveNodesData &rnd, const CFX_WideStringC& strAttr)
{
XFA_LPCSCRIPTATTRIBUTEINFO lpScriptAttribute = XFA_GetScriptAttributeByName(curNode->GetClassID(), strAttr);
if(lpScriptAttribute) {
@@ -496,7 +496,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_PopStack(CFX_Int32Array &stack)
}
return nType;
}
-int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_GetFilter(FX_WSTR wsExpression, int32_t nStart, CXFA_ResolveNodesData &rnd)
+int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_GetFilter(const CFX_WideStringC& wsExpression, int32_t nStart, CXFA_ResolveNodesData &rnd)
{
FXSYS_assert(nStart > -1);
int32_t iLength = wsExpression.GetLength();
diff --git a/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.h b/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.h
index 39153ecfcc..fc13aa9fae 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.h
+++ b/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.h
@@ -51,10 +51,10 @@ public:
int32_t XFA_ResolveNodes_NumberSign(CXFA_ResolveNodesData &rnd);
int32_t XFA_ResolveNodes_Asterisk(CXFA_ResolveNodesData &rnd);
int32_t XFA_ResolveNodes_Normal(CXFA_ResolveNodesData &rnd);
- int32_t XFA_ResolveNodes_ForAttributeRs(CXFA_Object* curNode, CXFA_ResolveNodesData &rnd, FX_WSTR strAttr);
+ int32_t XFA_ResolveNodes_ForAttributeRs(CXFA_Object* curNode, CXFA_ResolveNodesData &rnd, const CFX_WideStringC& strAttr);
void XFA_ResolveNode_ConditionArray(int32_t iCurIndex, CFX_WideString wsCondition, int32_t iFoundCount, CXFA_ResolveNodesData &rnd);
void XFA_ResolveNode_DoPredicateFilter(int32_t iCurIndex, CFX_WideString wsCondition, int32_t iFoundCount, CXFA_ResolveNodesData &rnd);
- int32_t XFA_ResolveNodes_GetFilter(FX_WSTR wsExpression, int32_t nStart, CXFA_ResolveNodesData &rnd);
+ int32_t XFA_ResolveNodes_GetFilter(const CFX_WideStringC& wsExpression, int32_t nStart, CXFA_ResolveNodesData &rnd);
void XFA_ResolveNode_FilterCondition(CXFA_ResolveNodesData &rnd, CFX_WideString wsCondition);
int32_t XFA_ResolveNodes_PopStack(CFX_Int32Array &stack);
void XFA_ResolveNodes_SetStylesForChild(FX_DWORD dwParentStyles, CXFA_ResolveNodesData &rnd);
diff --git a/xfa/src/fxfa/src/parser/xfa_utils_imp.cpp b/xfa/src/fxfa/src/parser/xfa_utils_imp.cpp
index f35602b4be..06cb6d9bd8 100644
--- a/xfa/src/fxfa/src/parser/xfa_utils_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_utils_imp.cpp
@@ -376,7 +376,7 @@ FX_DOUBLE XFA_WideStringToDouble(const CFX_WideString &wsStringVal)
return dValue;
}
-FX_DOUBLE XFA_ByteStringToDouble(FX_BSTR szStringVal)
+FX_DOUBLE XFA_ByteStringToDouble(const CFX_ByteStringC& szStringVal)
{
CFX_WideString wsValue = CFX_WideString::FromUTF8(szStringVal.GetCStr(), szStringVal.GetLength());
return XFA_WideStringToDouble(wsValue);
diff --git a/xfa/src/fxjse/src/class.cpp b/xfa/src/fxjse/src/class.cpp
index 42db877fc9..bc02e8b0ff 100644
--- a/xfa/src/fxjse/src/class.cpp
+++ b/xfa/src/fxjse/src/class.cpp
@@ -34,7 +34,7 @@ FXJSE_HCLASS FXJSE_DefineClass(FXJSE_HCONTEXT hContext, const FXJSE_CLASS* lpCla
ASSERT(lpContext);
return reinterpret_cast<FXJSE_HCLASS>(CFXJSE_Class::Create(lpContext, lpClass, FALSE));
}
-FXJSE_HCLASS FXJSE_GetClass(FXJSE_HCONTEXT hContext, FX_BSTR szName)
+FXJSE_HCLASS FXJSE_GetClass(FXJSE_HCONTEXT hContext, const CFX_ByteStringC& szName)
{
return reinterpret_cast<FXJSE_HCLASS>(CFXJSE_Class::GetClassFromContext(reinterpret_cast<CFXJSE_Context*>(hContext), szName));
}
@@ -256,7 +256,7 @@ CFXJSE_Class* CFXJSE_Class::Create(CFXJSE_Context* lpContext, const FXJSE_CLASS*
lpContext->m_rgClasses.Add(pClass);
return pClass;
}
-CFXJSE_Class* CFXJSE_Class::GetClassFromContext(CFXJSE_Context* pContext, FX_BSTR szName)
+CFXJSE_Class* CFXJSE_Class::GetClassFromContext(CFXJSE_Context* pContext, const CFX_ByteStringC& szName)
{
for(int count = pContext->m_rgClasses.GetSize(), i = 0; i < count; i++) {
CFXJSE_Class* pClass = pContext->m_rgClasses[i];
diff --git a/xfa/src/fxjse/src/class.h b/xfa/src/fxjse/src/class.h
index f8cdc34022..309978e423 100644
--- a/xfa/src/fxjse/src/class.h
+++ b/xfa/src/fxjse/src/class.h
@@ -23,7 +23,7 @@ public:
}
public:
static CFXJSE_Class* Create(CFXJSE_Context* pContext, const FXJSE_CLASS* lpClassDefintion, FX_BOOL bIsJSGlobal = FALSE);
- static CFXJSE_Class* GetClassFromContext(CFXJSE_Context* pContext, FX_BSTR szName);
+ static CFXJSE_Class* GetClassFromContext(CFXJSE_Context* pContext, const CFX_ByteStringC& szName);
static void SetUpDynPropHandler(CFXJSE_Context* pContext, CFXJSE_Value* pValue, const FXJSE_CLASS* lpClassDefinition);
static void SetUpNamedPropHandler(v8::Isolate* pIsolate, v8::Local<v8::ObjectTemplate>& hObjectTemplate, const FXJSE_CLASS* lpClassDefinition);
protected:
diff --git a/xfa/src/fxjse/src/dynprop.cpp b/xfa/src/fxjse/src/dynprop.cpp
index 7c78f6f90a..840bd5f9a2 100644
--- a/xfa/src/fxjse/src/dynprop.cpp
+++ b/xfa/src/fxjse/src/dynprop.cpp
@@ -29,7 +29,7 @@ static void FXJSE_DynPropGetterAdapter_MethodCallback (const v8::FunctionCallbac
delete lpThisValue;
lpThisValue = NULL;
}
-static void FXJSE_DynPropGetterAdapter (const FXJSE_CLASS* lpClass, FXJSE_HOBJECT hObject, FX_BSTR szPropName, FXJSE_HVALUE hValue)
+static void FXJSE_DynPropGetterAdapter (const FXJSE_CLASS* lpClass, FXJSE_HOBJECT hObject, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue)
{
ASSERT(lpClass);
int32_t nPropType = lpClass->dynPropTypeGetter == NULL ? FXJSE_ClassPropType_Property : lpClass->dynPropTypeGetter(hObject, szPropName, FALSE);
@@ -51,7 +51,7 @@ static void FXJSE_DynPropGetterAdapter (const FXJSE_CLASS* lpClass, FXJSE_HO
}
}
}
-static void FXJSE_DynPropSetterAdapter (const FXJSE_CLASS* lpClass, FXJSE_HOBJECT hObject, FX_BSTR szPropName, FXJSE_HVALUE hValue)
+static void FXJSE_DynPropSetterAdapter (const FXJSE_CLASS* lpClass, FXJSE_HOBJECT hObject, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue)
{
ASSERT(lpClass);
int32_t nPropType = lpClass->dynPropTypeGetter == NULL ? FXJSE_ClassPropType_Property : lpClass->dynPropTypeGetter(hObject, szPropName, FALSE);
@@ -61,13 +61,13 @@ static void FXJSE_DynPropSetterAdapter (const FXJSE_CLASS* lpClass, FXJSE_HO
}
}
}
-static FX_BOOL FXJSE_DynPropQueryAdapter (const FXJSE_CLASS* lpClass, FXJSE_HOBJECT hObject, FX_BSTR szPropName)
+static FX_BOOL FXJSE_DynPropQueryAdapter (const FXJSE_CLASS* lpClass, FXJSE_HOBJECT hObject, const CFX_ByteStringC& szPropName)
{
ASSERT(lpClass);
int32_t nPropType = lpClass->dynPropTypeGetter == NULL ? FXJSE_ClassPropType_Property : lpClass->dynPropTypeGetter(hObject, szPropName, TRUE);
return nPropType != FXJSE_ClassPropType_None;
}
-static FX_BOOL FXJSE_DynPropDeleterAdapter (const FXJSE_CLASS* lpClass, FXJSE_HOBJECT hObject, FX_BSTR szPropName)
+static FX_BOOL FXJSE_DynPropDeleterAdapter (const FXJSE_CLASS* lpClass, FXJSE_HOBJECT hObject, const CFX_ByteStringC& szPropName)
{
ASSERT(lpClass);
int32_t nPropType = lpClass->dynPropTypeGetter == NULL ? FXJSE_ClassPropType_Property : lpClass->dynPropTypeGetter(hObject, szPropName, FALSE);
diff --git a/xfa/src/fxjse/src/value.cpp b/xfa/src/fxjse/src/value.cpp
index 8b5b5feb92..27674ffc4c 100644
--- a/xfa/src/fxjse/src/value.cpp
+++ b/xfa/src/fxjse/src/value.cpp
@@ -115,7 +115,7 @@ void FXJSE_Value_SetBoolean (FXJSE_HVALUE hValue, FX_BOOL bBoolean)
ASSERT(lpValue);
return lpValue->SetBoolean(bBoolean);
}
-void FXJSE_Value_SetUTF8String (FXJSE_HVALUE hValue, FX_BSTR szString)
+void FXJSE_Value_SetUTF8String (FXJSE_HVALUE hValue, const CFX_ByteStringC& szString)
{
CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hValue);
ASSERT(lpValue);
@@ -167,14 +167,14 @@ void FXJSE_Value_Set (FXJSE_HVALUE hValue, FXJSE_HVALUE hOriginalValue)
ASSERT(lpValue && lpOriginalValue);
return lpValue->Assign(lpOriginalValue);
}
-FX_BOOL FXJSE_Value_GetObjectProp (FXJSE_HVALUE hValue, FX_BSTR szPropName, FXJSE_HVALUE hPropValue)
+FX_BOOL FXJSE_Value_GetObjectProp (FXJSE_HVALUE hValue, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hPropValue)
{
CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hValue);
CFXJSE_Value* lpPropValue = reinterpret_cast<CFXJSE_Value*>(hPropValue);
ASSERT(lpValue && lpPropValue);
return lpValue->GetObjectProperty(szPropName, lpPropValue);
}
-FX_BOOL FXJSE_Value_SetObjectProp (FXJSE_HVALUE hValue, FX_BSTR szPropName, FXJSE_HVALUE hPropValue)
+FX_BOOL FXJSE_Value_SetObjectProp (FXJSE_HVALUE hValue, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hPropValue)
{
CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hValue);
CFXJSE_Value* lpPropValue = reinterpret_cast<CFXJSE_Value*>(hPropValue);
@@ -195,19 +195,19 @@ FX_BOOL FXJSE_Value_SetObjectPropByIdx (FXJSE_HVALUE hValue, uint32_t uPropIdx,
ASSERT(lpValue && lpPropValue);
return lpValue->SetObjectProperty(uPropIdx, lpPropValue);
}
-FX_BOOL FXJSE_Value_DeleteObjectProp (FXJSE_HVALUE hValue, FX_BSTR szPropName)
+FX_BOOL FXJSE_Value_DeleteObjectProp (FXJSE_HVALUE hValue, const CFX_ByteStringC& szPropName)
{
CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hValue);
ASSERT(lpValue);
return lpValue->DeleteObjectProperty(szPropName);
}
-FX_BOOL FXJSE_Value_ObjectHasOwnProp (FXJSE_HVALUE hValue, FX_BSTR szPropName, FX_BOOL bUseTypeGetter)
+FX_BOOL FXJSE_Value_ObjectHasOwnProp (FXJSE_HVALUE hValue, const CFX_ByteStringC& szPropName, FX_BOOL bUseTypeGetter)
{
CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hValue);
ASSERT(lpValue);
return lpValue->HasObjectOwnProperty(szPropName, bUseTypeGetter);
}
-FX_BOOL FXJSE_Value_SetObjectOwnProp (FXJSE_HVALUE hValue, FX_BSTR szPropName, FXJSE_HVALUE hPropValue)
+FX_BOOL FXJSE_Value_SetObjectOwnProp (FXJSE_HVALUE hValue, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hPropValue)
{
CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hValue);
CFXJSE_Value* lpPropValue = reinterpret_cast<CFXJSE_Value*>(hPropValue);
@@ -249,7 +249,7 @@ FXJSE_HRUNTIME FXJSE_Value_GetRuntime(FXJSE_HVALUE hValue)
ASSERT(lpValue);
return reinterpret_cast<FXJSE_HRUNTIME>(lpValue->GetIsolate());
}
-void FXJSE_ThrowMessage(FX_BSTR utf8Name, FX_BSTR utf8Message)
+void FXJSE_ThrowMessage(const CFX_ByteStringC& utf8Name, const CFX_ByteStringC& utf8Message)
{
v8::Isolate* pIsolate = v8::Isolate::GetCurrent();
ASSERT(pIsolate);
@@ -358,7 +358,7 @@ void CFXJSE_Value::SetDate(FXJSE_DOUBLE dDouble)
v8::Local<v8::Value> hDate = v8::Date::New(m_pIsolate, dDouble);
m_hValue.Reset(m_pIsolate, hDate);
}
-FX_BOOL CFXJSE_Value::SetObjectProperty(FX_BSTR szPropName, CFXJSE_Value* lpPropValue)
+FX_BOOL CFXJSE_Value::SetObjectProperty(const CFX_ByteStringC& szPropName, CFXJSE_Value* lpPropValue)
{
CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
v8::Local<v8::Value> hObject = v8::Local<v8::Value>::New(m_pIsolate, m_hValue);
@@ -368,7 +368,7 @@ FX_BOOL CFXJSE_Value::SetObjectProperty(FX_BSTR szPropName, CFXJSE_Value* lpProp
v8::Local<v8::Value> hPropValue = v8::Local<v8::Value>::New(m_pIsolate, lpPropValue->DirectGetValue());
return (FX_BOOL)hObject.As<v8::Object>()->Set(v8::String::NewFromUtf8(m_pIsolate, szPropName.GetCStr(), v8::String::kNormalString, szPropName.GetLength()), hPropValue);
}
-FX_BOOL CFXJSE_Value::GetObjectProperty(FX_BSTR szPropName, CFXJSE_Value* lpPropValue)
+FX_BOOL CFXJSE_Value::GetObjectProperty(const CFX_ByteStringC& szPropName, CFXJSE_Value* lpPropValue)
{
CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
v8::Local<v8::Value> hObject = v8::Local<v8::Value>::New(m_pIsolate, m_hValue);
@@ -400,7 +400,7 @@ FX_BOOL CFXJSE_Value::GetObjectProperty(uint32_t uPropIdx, CFXJSE_Value* lpPropV
lpPropValue->ForceSetValue(hPropValue);
return TRUE;
}
-FX_BOOL CFXJSE_Value::DeleteObjectProperty(FX_BSTR szPropName)
+FX_BOOL CFXJSE_Value::DeleteObjectProperty(const CFX_ByteStringC& szPropName)
{
CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
v8::Local<v8::Value> hObject = v8::Local<v8::Value>::New(m_pIsolate, m_hValue);
@@ -410,7 +410,7 @@ FX_BOOL CFXJSE_Value::DeleteObjectProperty(FX_BSTR szPropName)
hObject.As<v8::Object>()->Delete(v8::String::NewFromUtf8(m_pIsolate, szPropName.GetCStr(), v8::String::kNormalString, szPropName.GetLength()));
return TRUE;
}
-FX_BOOL CFXJSE_Value::HasObjectOwnProperty(FX_BSTR szPropName, FX_BOOL bUseTypeGetter)
+FX_BOOL CFXJSE_Value::HasObjectOwnProperty(const CFX_ByteStringC& szPropName, FX_BOOL bUseTypeGetter)
{
CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
v8::Local<v8::Value> hObject = v8::Local<v8::Value>::New(m_pIsolate, m_hValue);
@@ -420,7 +420,7 @@ FX_BOOL CFXJSE_Value::HasObjectOwnProperty(FX_BSTR szPropName, FX_BOOL bUseTyp
v8::Local<v8::String> hKey = v8::String::NewFromUtf8(m_pIsolate, szPropName.GetCStr(), v8::String::kNormalString, szPropName.GetLength());
return hObject.As<v8::Object>()->HasRealNamedProperty(hKey) || (bUseTypeGetter && hObject.As<v8::Object>()->HasOwnProperty(hKey));
}
-FX_BOOL CFXJSE_Value::SetObjectOwnProperty(FX_BSTR szPropName, CFXJSE_Value* lpPropValue)
+FX_BOOL CFXJSE_Value::SetObjectOwnProperty(const CFX_ByteStringC& szPropName, CFXJSE_Value* lpPropValue)
{
CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
v8::Local<v8::Value> hObject = v8::Local<v8::Value>::New(m_pIsolate, m_hValue);
diff --git a/xfa/src/fxjse/src/value.h b/xfa/src/fxjse/src/value.h
index db8a4faa95..0cebbdfec9 100644
--- a/xfa/src/fxjse/src/value.h
+++ b/xfa/src/fxjse/src/value.h
@@ -176,7 +176,7 @@ public:
v8::Local<v8::Value> hValue = v8::Number::New(m_pIsolate, dDouble);
m_hValue.Reset(m_pIsolate, hValue);
}
- V8_INLINE void SetString(FX_BSTR szString)
+ V8_INLINE void SetString(const CFX_ByteStringC& szString)
{
CFXJSE_ScopeUtil_IsolateHandle scope(m_pIsolate);
v8::Local<v8::Value> hValue = v8::String::NewFromUtf8(m_pIsolate,
@@ -195,13 +195,13 @@ public:
void SetArray(uint32_t uValueCount, CFXJSE_Value** rgValues);
void SetDate(FXJSE_DOUBLE dDouble);
public:
- FX_BOOL GetObjectProperty(FX_BSTR szPropName, CFXJSE_Value* lpPropValue);
- FX_BOOL SetObjectProperty(FX_BSTR szPropName, CFXJSE_Value* lpPropValue);
+ FX_BOOL GetObjectProperty(const CFX_ByteStringC& szPropName, CFXJSE_Value* lpPropValue);
+ FX_BOOL SetObjectProperty(const CFX_ByteStringC& szPropName, CFXJSE_Value* lpPropValue);
FX_BOOL GetObjectProperty(uint32_t uPropIdx, CFXJSE_Value* lpPropValue);
FX_BOOL SetObjectProperty(uint32_t uPropIdx, CFXJSE_Value* lpPropValue);
- FX_BOOL DeleteObjectProperty(FX_BSTR szPropName);
- FX_BOOL HasObjectOwnProperty(FX_BSTR szPropName, FX_BOOL bUseTypeGetter);
- FX_BOOL SetObjectOwnProperty(FX_BSTR szPropName, CFXJSE_Value* lpPropValue);
+ FX_BOOL DeleteObjectProperty(const CFX_ByteStringC& szPropName);
+ FX_BOOL HasObjectOwnProperty(const CFX_ByteStringC& szPropName, FX_BOOL bUseTypeGetter);
+ FX_BOOL SetObjectOwnProperty(const CFX_ByteStringC& szPropName, CFXJSE_Value* lpPropValue);
FX_BOOL SetFunctionBind(CFXJSE_Value* lpOldFunction, CFXJSE_Value* lpNewThis);
FX_BOOL Call(CFXJSE_Value* lpReceiver, CFXJSE_Value* lpRetValue, uint32_t nArgCount, FXJSE_HVALUE* lpArgs);
public: