summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp4
-rw-r--r--core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp31
-rw-r--r--core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp2
-rw-r--r--core/fpdfapi/fpdf_font/fpdf_font.cpp12
-rw-r--r--core/fpdfapi/fpdf_font/fpdf_font_cid.cpp2
-rw-r--r--core/fpdfapi/fpdf_page/cpdf_allstates.cpp2
-rw-r--r--core/fpdfapi/fpdf_page/fpdf_page_doc.cpp2
-rw-r--r--core/fpdfapi/fpdf_page/fpdf_page_parser.cpp23
-rw-r--r--core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp2
-rw-r--r--core/fpdfapi/fpdf_parser/cpdf_name.cpp2
-rw-r--r--core/fpdfapi/fpdf_parser/cpdf_number.cpp2
-rw-r--r--core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp2
-rw-r--r--core/fpdfapi/fpdf_parser/cpdf_parser.cpp4
-rw-r--r--core/fpdfapi/fpdf_parser/cpdf_standard_security_handler.cpp5
-rw-r--r--core/fpdfapi/fpdf_parser/cpdf_string.cpp2
-rw-r--r--core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp4
-rw-r--r--core/fpdfdoc/cpvt_color.cpp2
-rw-r--r--core/fpdfdoc/cpvt_fontmap.cpp4
-rw-r--r--core/fpdfdoc/cpvt_generateap.cpp17
-rw-r--r--core/fpdfdoc/doc_action.cpp4
-rw-r--r--core/fpdfdoc/doc_annot.cpp4
-rw-r--r--core/fpdfdoc/doc_basic.cpp29
-rw-r--r--core/fpdfdoc/doc_bookmark.cpp4
-rw-r--r--core/fpdfdoc/doc_form.cpp6
-rw-r--r--core/fpdfdoc/doc_formcontrol.cpp20
-rw-r--r--core/fpdfdoc/doc_formfield.cpp4
-rw-r--r--core/fpdfdoc/doc_link.cpp2
-rw-r--r--core/fpdfdoc/doc_ocg.cpp10
-rw-r--r--core/fpdfdoc/doc_tagged.cpp8
-rw-r--r--core/fpdfdoc/doc_utils.cpp28
-rw-r--r--core/fxcrt/fx_basic_bstring.cpp2
-rw-r--r--core/fxcrt/fx_basic_buffer.cpp2
-rw-r--r--core/fxcrt/fx_xml_parser.cpp13
-rw-r--r--core/fxcrt/fxcrt_posix.cpp2
-rw-r--r--core/fxcrt/include/fx_basic.h2
-rw-r--r--core/fxcrt/include/fx_string.h32
-rw-r--r--core/fxge/ge/fx_ge_ps.cpp2
-rw-r--r--core/fxge/ge/fx_ge_text.cpp2
-rw-r--r--core/fxge/win32/fx_win32_device.cpp2
-rw-r--r--fpdfsdk/formfiller/cba_fontmap.cpp18
-rw-r--r--fpdfsdk/fpdf_ext.cpp2
-rw-r--r--fpdfsdk/fpdf_flatten.cpp8
-rw-r--r--fpdfsdk/fpdfppo.cpp8
-rw-r--r--fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp6
-rw-r--r--fpdfsdk/fsdk_baseannot.cpp10
-rw-r--r--fpdfsdk/fsdk_baseform.cpp19
-rw-r--r--fpdfsdk/fsdk_mgr.cpp4
-rw-r--r--fpdfsdk/fxedit/fxet_pageobjs.cpp8
-rw-r--r--fpdfsdk/javascript/Document.cpp2
-rw-r--r--fpdfsdk/javascript/PublicMethods.cpp20
-rw-r--r--fpdfsdk/pdfwindow/PWL_Edit.cpp28
-rw-r--r--fpdfsdk/pdfwindow/PWL_Icon.cpp2
-rw-r--r--fpdfsdk/pdfwindow/PWL_Label.cpp8
-rw-r--r--fpdfsdk/pdfwindow/PWL_ListBox.cpp10
-rw-r--r--fpdfsdk/pdfwindow/PWL_ScrollBar.cpp2
-rw-r--r--fpdfsdk/pdfwindow/PWL_Signature.cpp2
-rw-r--r--testing/libfuzzer/pdf_fm2js_fuzzer.cc2
-rw-r--r--xfa/fee/fde_txtedtengine.cpp6
-rw-r--r--xfa/fgas/font/fgas_gefont.cpp5
-rw-r--r--xfa/fgas/font/fgas_stdfontmgr.cpp3
-rw-r--r--xfa/fgas/localization/fgas_locale.cpp51
-rw-r--r--xfa/fwl/basewidget/fwl_barcodeimp.cpp2
-rw-r--r--xfa/fwl/basewidget/fwl_editimp.cpp6
-rw-r--r--xfa/fwl/core/fwl_formimp.cpp2
-rw-r--r--xfa/fxbarcode/BC_UtilCodingConvert.cpp6
-rw-r--r--xfa/fxbarcode/cbc_codabar.cpp13
-rw-r--r--xfa/fxbarcode/cbc_code128.cpp11
-rw-r--r--xfa/fxbarcode/cbc_code39.cpp13
-rw-r--r--xfa/fxbarcode/cbc_datamatrix.cpp2
-rw-r--r--xfa/fxbarcode/cbc_ean13.cpp9
-rw-r--r--xfa/fxbarcode/cbc_ean8.cpp9
-rw-r--r--xfa/fxbarcode/cbc_pdf417i.cpp2
-rw-r--r--xfa/fxbarcode/cbc_qrcode.cpp2
-rw-r--r--xfa/fxbarcode/cbc_upca.cpp9
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCodaBarReader.cpp2
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCodaBarWriter.cpp4
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCode39Writer.cpp2
-rw-r--r--xfa/fxfa/app/xfa_checksum.cpp2
-rw-r--r--xfa/fxfa/app/xfa_ffbarcode.cpp2
-rw-r--r--xfa/fxfa/app/xfa_ffchoicelist.cpp10
-rw-r--r--xfa/fxfa/app/xfa_ffdocview.cpp4
-rw-r--r--xfa/fxfa/app/xfa_fffield.cpp9
-rw-r--r--xfa/fxfa/app/xfa_ffimageedit.cpp8
-rw-r--r--xfa/fxfa/app/xfa_ffpageview.cpp2
-rw-r--r--xfa/fxfa/app/xfa_fftextedit.cpp12
-rw-r--r--xfa/fxfa/app/xfa_ffwidget.cpp2
-rw-r--r--xfa/fxfa/app/xfa_ffwidgetacc.cpp48
-rw-r--r--xfa/fxfa/app/xfa_fontmgr.cpp11
-rw-r--r--xfa/fxfa/app/xfa_textlayout.cpp2
-rw-r--r--xfa/fxfa/app/xfa_textlayout.h2
-rw-r--r--xfa/fxfa/fm2js/xfa_fm2jscontext.cpp354
-rw-r--r--xfa/fxfa/parser/cxfa_image.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_validate.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.cpp26
-rw-r--r--xfa/fxfa/parser/xfa_document_datamerger_imp.cpp19
-rw-r--r--xfa/fxfa/parser/xfa_document_serialize.cpp2
-rw-r--r--xfa/fxfa/parser/xfa_layout_itemlayout.cpp2
-rw-r--r--xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp4
-rw-r--r--xfa/fxfa/parser/xfa_locale.cpp16
-rw-r--r--xfa/fxfa/parser/xfa_localemgr.cpp4
-rw-r--r--xfa/fxfa/parser/xfa_localevalue.cpp4
-rw-r--r--xfa/fxfa/parser/xfa_object_imp.cpp220
-rw-r--r--xfa/fxfa/parser/xfa_parser_imp.cpp26
-rw-r--r--xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp4
-rw-r--r--xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp76
-rw-r--r--xfa/fxfa/parser/xfa_script_imp.cpp32
-rw-r--r--xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp6
-rw-r--r--xfa/fxfa/parser/xfa_script_nodehelper.cpp5
-rw-r--r--xfa/fxfa/parser/xfa_script_resolveprocessor.cpp14
-rw-r--r--xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp9
110 files changed, 739 insertions, 822 deletions
diff --git a/core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp b/core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp
index af79fd31c1..a484edd6b9 100644
--- a/core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp
+++ b/core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp
@@ -74,12 +74,12 @@ CFX_ByteString CPDF_PageContentGenerator::RealizeResource(
int idnum = 1;
while (1) {
name.Format("FX%c%d", szType[0], idnum);
- if (!pResList->KeyExist(name.AsByteStringC())) {
+ if (!pResList->KeyExist(name.AsStringC())) {
break;
}
idnum++;
}
- pResList->AddReference(name.AsByteStringC(), m_pDocument,
+ pResList->AddReference(name.AsStringC(), m_pDocument,
pResourceObj->GetObjNum());
return name;
}
diff --git a/core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp b/core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
index 323602b0e1..c0d2ab0dd3 100644
--- a/core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
+++ b/core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
@@ -54,7 +54,7 @@ int32_t PDF_CreatorAppendObject(const CPDF_Object* pObj,
if (pFile->AppendString(" ") < 0) {
return -1;
}
- if ((len = pFile->AppendString(pObj->GetString().AsByteStringC())) < 0) {
+ if ((len = pFile->AppendString(pObj->GetString().AsStringC())) < 0) {
return -1;
}
offset += len + 1;
@@ -62,8 +62,8 @@ int32_t PDF_CreatorAppendObject(const CPDF_Object* pObj,
case CPDF_Object::STRING: {
CFX_ByteString str = pObj->GetString();
FX_BOOL bHex = pObj->AsString()->IsHex();
- if ((len = pFile->AppendString(
- PDF_EncodeString(str, bHex).AsByteStringC())) < 0) {
+ if ((len = pFile->AppendString(PDF_EncodeString(str, bHex).AsStringC())) <
+ 0) {
return -1;
}
offset += len;
@@ -74,8 +74,7 @@ int32_t PDF_CreatorAppendObject(const CPDF_Object* pObj,
return -1;
}
CFX_ByteString str = pObj->GetString();
- if ((len = pFile->AppendString(PDF_NameEncode(str).AsByteStringC())) <
- 0) {
+ if ((len = pFile->AppendString(PDF_NameEncode(str).AsStringC())) < 0) {
return -1;
}
offset += len + 1;
@@ -134,8 +133,7 @@ int32_t PDF_CreatorAppendObject(const CPDF_Object* pObj,
if (pFile->AppendString("/") < 0) {
return -1;
}
- if ((len = pFile->AppendString(PDF_NameEncode(key).AsByteStringC())) <
- 0) {
+ if ((len = pFile->AppendString(PDF_NameEncode(key).AsStringC())) < 0) {
return -1;
}
offset += len + 1;
@@ -214,8 +212,7 @@ int32_t PDF_CreatorWriteTrailer(CPDF_Document* pDocument,
if (pFile->AppendString(("/")) < 0) {
return -1;
}
- if ((len = pFile->AppendString(PDF_NameEncode(key).AsByteStringC())) <
- 0) {
+ if ((len = pFile->AppendString(PDF_NameEncode(key).AsStringC())) < 0) {
return -1;
}
offset += len + 1;
@@ -1118,7 +1115,7 @@ int32_t CPDF_Creator::WriteDirectObj(uint32_t objnum,
if (m_File.AppendString(" ") < 0) {
return -1;
}
- if ((len = m_File.AppendString(pObj->GetString().AsByteStringC())) < 0) {
+ if ((len = m_File.AppendString(pObj->GetString().AsStringC())) < 0) {
return -1;
}
m_Offset += len + 1;
@@ -1128,7 +1125,7 @@ int32_t CPDF_Creator::WriteDirectObj(uint32_t objnum,
FX_BOOL bHex = pObj->AsString()->IsHex();
if (!m_pCryptoHandler || !bEncrypt) {
CFX_ByteString content = PDF_EncodeString(str, bHex);
- if ((len = m_File.AppendString(content.AsByteStringC())) < 0) {
+ if ((len = m_File.AppendString(content.AsStringC())) < 0) {
return -1;
}
m_Offset += len;
@@ -1140,7 +1137,7 @@ int32_t CPDF_Creator::WriteDirectObj(uint32_t objnum,
CFX_ByteString content = PDF_EncodeString(
CFX_ByteString((const FX_CHAR*)encryptor.m_pData, encryptor.m_dwSize),
bHex);
- if ((len = m_File.AppendString(content.AsByteStringC())) < 0) {
+ if ((len = m_File.AppendString(content.AsStringC())) < 0) {
return -1;
}
m_Offset += len;
@@ -1180,8 +1177,7 @@ int32_t CPDF_Creator::WriteDirectObj(uint32_t objnum,
return -1;
}
CFX_ByteString str = pObj->GetString();
- if ((len = m_File.AppendString(PDF_NameEncode(str).AsByteStringC())) <
- 0) {
+ if ((len = m_File.AppendString(PDF_NameEncode(str).AsStringC())) < 0) {
return -1;
}
m_Offset += len + 1;
@@ -1245,8 +1241,7 @@ int32_t CPDF_Creator::WriteDirectObj(uint32_t objnum,
if (m_File.AppendString("/") < 0) {
return -1;
}
- if ((len = m_File.AppendString(PDF_NameEncode(key).AsByteStringC())) <
- 0) {
+ if ((len = m_File.AppendString(PDF_NameEncode(key).AsStringC())) < 0) {
return -1;
}
m_Offset += len + 1;
@@ -1648,7 +1643,7 @@ int32_t CPDF_Creator::WriteDoc_Stage3(IFX_Pause* pPause) {
str = m_ObjectOffset.GetPtrAt(1)
? "xref\r\n"
: "xref\r\n0 1\r\n0000000000 65535 f\r\n";
- if (m_File.AppendString(str.AsByteStringC()) < 0) {
+ if (m_File.AppendString(str.AsStringC()) < 0) {
return -1;
}
m_Pos = (void*)(uintptr_t)1;
@@ -1777,7 +1772,7 @@ int32_t CPDF_Creator::WriteDoc_Stage4(IFX_Pause* pPause) {
if (m_File.AppendString(("/")) < 0) {
return -1;
}
- if (m_File.AppendString(PDF_NameEncode(key).AsByteStringC()) < 0) {
+ if (m_File.AppendString(PDF_NameEncode(key).AsStringC()) < 0) {
return -1;
}
if (pValue->GetObjNum()) {
diff --git a/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
index d70c04c690..04ab9ea863 100644
--- a/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
+++ b/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
@@ -1124,7 +1124,7 @@ CPDF_Font* CPDF_Document::AddStandardFont(const FX_CHAR* font,
CFX_ByteString name(font);
if (PDF_GetStandardFontName(&name) < 0)
return nullptr;
- return GetPageData()->GetStandardFont(name.AsByteStringC(), pEncoding);
+ return GetPageData()->GetStandardFont(name.AsStringC(), pEncoding);
}
void CPDF_Document::DeletePage(int iPage) {
diff --git a/core/fpdfapi/fpdf_font/fpdf_font.cpp b/core/fpdfapi/fpdf_font/fpdf_font.cpp
index a3adecc764..c405072502 100644
--- a/core/fpdfapi/fpdf_font/fpdf_font.cpp
+++ b/core/fpdfapi/fpdf_font/fpdf_font.cpp
@@ -233,9 +233,9 @@ void CPDF_ToUnicodeMap::Load(CPDF_Stream* pStream) {
break;
}
high = parser.GetWord();
- uint32_t lowcode = StringToCode(low.AsByteStringC());
- uint32_t highcode = (lowcode & 0xffffff00) |
- (StringToCode(high.AsByteStringC()) & 0xff);
+ uint32_t lowcode = StringToCode(low.AsStringC());
+ uint32_t highcode =
+ (lowcode & 0xffffff00) | (StringToCode(high.AsStringC()) & 0xff);
if (highcode == (uint32_t)-1) {
break;
}
@@ -243,7 +243,7 @@ void CPDF_ToUnicodeMap::Load(CPDF_Stream* pStream) {
if (start == "[") {
for (uint32_t code = lowcode; code <= highcode; code++) {
CFX_ByteString dest = parser.GetWord();
- CFX_WideString destcode = StringToWideString(dest.AsByteStringC());
+ CFX_WideString destcode = StringToWideString(dest.AsStringC());
int len = destcode.GetLength();
if (len == 0) {
continue;
@@ -258,11 +258,11 @@ void CPDF_ToUnicodeMap::Load(CPDF_Stream* pStream) {
}
parser.GetWord();
} else {
- CFX_WideString destcode = StringToWideString(start.AsByteStringC());
+ CFX_WideString destcode = StringToWideString(start.AsStringC());
int len = destcode.GetLength();
uint32_t value = 0;
if (len == 1) {
- value = StringToCode(start.AsByteStringC());
+ value = StringToCode(start.AsStringC());
for (uint32_t code = lowcode; code <= highcode; code++) {
m_Map[code] = value++;
}
diff --git a/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp b/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp
index 78c72a7fef..da6b8de35b 100644
--- a/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp
+++ b/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp
@@ -440,7 +440,7 @@ void CPDF_CMapParser::ParseWord(const CFX_ByteStringC& word) {
}
if (m_CodeSeq % 2) {
CMap_CodeRange range;
- if (CMap_GetCodeRange(range, m_LastWord.AsByteStringC(), word)) {
+ if (CMap_GetCodeRange(range, m_LastWord.AsStringC(), word)) {
m_CodeRanges.Add(range);
}
}
diff --git a/core/fpdfapi/fpdf_page/cpdf_allstates.cpp b/core/fpdfapi/fpdf_page/cpdf_allstates.cpp
index d81a488d20..f2d637f888 100644
--- a/core/fpdfapi/fpdf_page/cpdf_allstates.cpp
+++ b/core/fpdfapi/fpdf_page/cpdf_allstates.cpp
@@ -115,7 +115,7 @@ void CPDF_AllStates::ProcessExtGS(CPDF_Dictionary* pGS,
CFX_ByteString mode =
pArray ? pArray->GetStringAt(0) : pObject->GetString();
- pGeneralState->SetBlendMode(mode.AsByteStringC());
+ pGeneralState->SetBlendMode(mode.AsStringC());
if (pGeneralState->m_BlendType > FXDIB_BLEND_MULTIPLY) {
pParser->GetPageObjectHolder()->SetBackgroundAlphaNeeded(TRUE);
}
diff --git a/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp b/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp
index 758ce940d2..2dfccb26d7 100644
--- a/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp
+++ b/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp
@@ -331,7 +331,7 @@ CPDF_ColorSpace* CPDF_DocPageData::GetColorSpace(
if (!pCS && pResources) {
CPDF_Dictionary* pList = pResources->GetDictBy("ColorSpace");
if (pList) {
- pCSObj = pList->GetDirectObjectBy(name.AsByteStringC());
+ pCSObj = pList->GetDirectObjectBy(name.AsStringC());
return GetColorSpace(pCSObj, nullptr);
}
}
diff --git a/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index 4f304a3b3b..21edc9e0cd 100644
--- a/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
+++ b/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
@@ -566,9 +566,9 @@ void CPDF_StreamContentParser::Handle_BeginImage() {
if (!key.IsEmpty()) {
uint32_t dwObjNum = pObj ? pObj->GetObjNum() : 0;
if (dwObjNum)
- pDict->SetAtReference(key.AsByteStringC(), m_pDocument, dwObjNum);
+ pDict->SetAtReference(key.AsStringC(), m_pDocument, dwObjNum);
else
- pDict->SetAt(key.AsByteStringC(), pObj.release());
+ pDict->SetAt(key.AsStringC(), pObj.release());
}
}
PDF_ReplaceAbbr(pDict);
@@ -721,8 +721,7 @@ void CPDF_StreamContentParser::Handle_ExecuteXObject() {
pList = m_pPageResources->GetDictBy("XObject");
if (!pList)
return;
- CPDF_Reference* pRes =
- ToReference(pList->GetObjectBy(name.AsByteStringC()));
+ CPDF_Reference* pRes = ToReference(pList->GetObjectBy(name.AsStringC()));
if (!pRes)
return;
@@ -1258,7 +1257,7 @@ CPDF_Object* CPDF_StreamContentParser::FindResourceObj(
if (!pList) {
return NULL;
}
- CPDF_Object* pRes = pList->GetDirectObjectBy(name.AsByteStringC());
+ CPDF_Object* pRes = pList->GetDirectObjectBy(name.AsStringC());
return pRes;
}
CPDF_Dictionary* pList = m_pResources->GetDictBy(type);
@@ -1270,10 +1269,10 @@ CPDF_Object* CPDF_StreamContentParser::FindResourceObj(
if (!pList) {
return NULL;
}
- CPDF_Object* pRes = pList->GetDirectObjectBy(name.AsByteStringC());
+ CPDF_Object* pRes = pList->GetDirectObjectBy(name.AsStringC());
return pRes;
}
- CPDF_Object* pRes = pList->GetDirectObjectBy(name.AsByteStringC());
+ CPDF_Object* pRes = pList->GetDirectObjectBy(name.AsStringC());
return pRes;
}
@@ -1766,7 +1765,7 @@ void PDF_ReplaceAbbr(CPDF_Object* pObj) {
CPDF_Object* value = it.second;
CFX_ByteStringC fullname =
PDF_FindFullName(PDF_InlineKeyAbbr, FX_ArraySize(PDF_InlineKeyAbbr),
- key.AsByteStringC());
+ key.AsStringC());
if (!fullname.IsEmpty()) {
AbbrReplacementOp op;
op.is_replace_key = true;
@@ -1780,7 +1779,7 @@ void PDF_ReplaceAbbr(CPDF_Object* pObj) {
CFX_ByteString name = value->GetString();
fullname = PDF_FindFullName(PDF_InlineValueAbbr,
FX_ArraySize(PDF_InlineValueAbbr),
- name.AsByteStringC());
+ name.AsStringC());
if (!fullname.IsEmpty()) {
AbbrReplacementOp op;
op.is_replace_key = false;
@@ -1794,9 +1793,9 @@ void PDF_ReplaceAbbr(CPDF_Object* pObj) {
}
for (const auto& op : replacements) {
if (op.is_replace_key)
- pDict->ReplaceKey(op.key.AsByteStringC(), op.replacement);
+ pDict->ReplaceKey(op.key.AsStringC(), op.replacement);
else
- pDict->SetAtName(op.key.AsByteStringC(), op.replacement);
+ pDict->SetAtName(op.key.AsStringC(), op.replacement);
}
break;
}
@@ -1808,7 +1807,7 @@ void PDF_ReplaceAbbr(CPDF_Object* pObj) {
CFX_ByteString name = pElement->GetString();
CFX_ByteStringC fullname = PDF_FindFullName(
PDF_InlineValueAbbr, FX_ArraySize(PDF_InlineValueAbbr),
- name.AsByteStringC());
+ name.AsStringC());
if (!fullname.IsEmpty()) {
pArray->SetAt(i, new CPDF_Name(fullname));
}
diff --git a/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp b/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
index 058ac338b2..5ec25d9fde 100644
--- a/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
+++ b/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
@@ -427,7 +427,7 @@ CPDF_Object* CPDF_StreamParser::ReadNextObject(FX_BOOL bAllowNestedArray,
return nullptr;
}
if (!key.IsEmpty()) {
- pDict->SetAt(key.AsByteStringC(), pObj);
+ pDict->SetAt(key.AsStringC(), pObj);
} else {
pObj->Release();
}
diff --git a/core/fpdfapi/fpdf_parser/cpdf_name.cpp b/core/fpdfapi/fpdf_parser/cpdf_name.cpp
index a7adf1b3d6..d641374547 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_name.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_name.cpp
@@ -29,7 +29,7 @@ CFX_ByteString CPDF_Name::GetString() const {
}
CFX_ByteStringC CPDF_Name::GetConstString() const {
- return m_Name.AsByteStringC();
+ return m_Name.AsStringC();
}
void CPDF_Name::SetString(const CFX_ByteString& str) {
diff --git a/core/fpdfapi/fpdf_parser/cpdf_number.cpp b/core/fpdfapi/fpdf_parser/cpdf_number.cpp
index dbc17d5dd6..a6bace57c9 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_number.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_number.cpp
@@ -47,7 +47,7 @@ const CPDF_Number* CPDF_Number::AsNumber() const {
}
void CPDF_Number::SetString(const CFX_ByteString& str) {
- FX_atonum(str.AsByteStringC(), m_bInteger, &m_Integer);
+ FX_atonum(str.AsStringC(), m_bInteger, &m_Integer);
}
CFX_ByteString CPDF_Number::GetString() const {
diff --git a/core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp b/core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp
index 17fd891d1b..362991f723 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp
@@ -135,7 +135,7 @@ class PDFObjectsTest : public testing::Test {
return false;
for (CPDF_Dictionary::const_iterator it = dict1->begin();
it != dict1->end(); ++it) {
- if (!Equal(it->second, dict2->GetObjectBy(it->first.AsByteStringC())))
+ if (!Equal(it->second, dict2->GetObjectBy(it->first.AsStringC())))
return false;
}
return true;
diff --git a/core/fpdfapi/fpdf_parser/cpdf_parser.cpp b/core/fpdfapi/fpdf_parser/cpdf_parser.cpp
index 15af1ca5c7..4ba43678b8 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_parser.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_parser.cpp
@@ -822,10 +822,10 @@ FX_BOOL CPDF_Parser::RebuildCrossRef() {
uint32_t dwObjNum =
pElement ? pElement->GetObjNum() : 0;
if (dwObjNum) {
- m_pTrailer->SetAtReference(key.AsByteStringC(),
+ m_pTrailer->SetAtReference(key.AsStringC(),
m_pDocument, dwObjNum);
} else {
- m_pTrailer->SetAt(key.AsByteStringC(),
+ m_pTrailer->SetAt(key.AsStringC(),
pElement->Clone());
}
}
diff --git a/core/fpdfapi/fpdf_parser/cpdf_standard_security_handler.cpp b/core/fpdfapi/fpdf_parser/cpdf_standard_security_handler.cpp
index 9846c40d8f..b7ed0315bb 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_standard_security_handler.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_standard_security_handler.cpp
@@ -173,7 +173,7 @@ FX_BOOL CPDF_StandardSecurityHandler::LoadDict(CPDF_Dictionary* pEncryptDict) {
if (stmf_name != strf_name) {
return FALSE;
}
- if (!_LoadCryptInfo(pEncryptDict, strf_name.AsByteStringC(), m_Cipher,
+ if (!_LoadCryptInfo(pEncryptDict, strf_name.AsStringC(), m_Cipher,
m_KeyLen)) {
return FALSE;
}
@@ -196,8 +196,7 @@ FX_BOOL CPDF_StandardSecurityHandler::LoadDict(CPDF_Dictionary* pEncryptDict,
return FALSE;
}
}
- if (!_LoadCryptInfo(pEncryptDict, strf_name.AsByteStringC(), cipher,
- key_len)) {
+ if (!_LoadCryptInfo(pEncryptDict, strf_name.AsStringC(), cipher, key_len)) {
return FALSE;
}
m_Cipher = cipher;
diff --git a/core/fpdfapi/fpdf_parser/cpdf_string.cpp b/core/fpdfapi/fpdf_parser/cpdf_string.cpp
index 3f04d125a2..52f6a5a836 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_string.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_string.cpp
@@ -32,7 +32,7 @@ CFX_ByteString CPDF_String::GetString() const {
}
CFX_ByteStringC CPDF_String::GetConstString() const {
- return m_String.AsByteStringC();
+ return m_String.AsStringC();
}
void CPDF_String::SetString(const CFX_ByteString& str) {
diff --git a/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp b/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp
index 3deecf54ff..0190c6e692 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp
@@ -399,7 +399,7 @@ CPDF_Object* CPDF_SyntaxParser::GetObject(CPDF_IndirectObjectHolder* pObjList,
}
}
m_Pos = SavedPos;
- return new CPDF_Number(word.AsByteStringC());
+ return new CPDF_Number(word.AsStringC());
}
if (word == "true" || word == "false")
@@ -521,7 +521,7 @@ CPDF_Object* CPDF_SyntaxParser::GetObjectByStrict(
return new CPDF_Reference(pObjList, FXSYS_atoui(word));
}
m_Pos = SavedPos;
- return new CPDF_Number(word.AsByteStringC());
+ return new CPDF_Number(word.AsStringC());
}
if (word == "true" || word == "false")
diff --git a/core/fpdfdoc/cpvt_color.cpp b/core/fpdfdoc/cpvt_color.cpp
index 7ddb9df0d0..72b8140b7b 100644
--- a/core/fpdfdoc/cpvt_color.cpp
+++ b/core/fpdfdoc/cpvt_color.cpp
@@ -10,7 +10,7 @@
// Static.
CPVT_Color CPVT_Color::ParseColor(const CFX_ByteString& str) {
- CPDF_SimpleParser syntax(str.AsByteStringC());
+ CPDF_SimpleParser syntax(str.AsStringC());
if (syntax.FindTagParamFromStart("g", 1))
return CPVT_Color(CPVT_Color::kGray, FX_atof(syntax.GetWord()));
diff --git a/core/fpdfdoc/cpvt_fontmap.cpp b/core/fpdfdoc/cpvt_fontmap.cpp
index eb8869df2b..a0919ed084 100644
--- a/core/fpdfdoc/cpvt_fontmap.cpp
+++ b/core/fpdfdoc/cpvt_fontmap.cpp
@@ -38,8 +38,8 @@ void CPVT_FontMap::GetAnnotSysPDFFont(CPDF_Document* pDoc,
return;
if (CPDF_Dictionary* pFontList = pResDict->GetDictBy("Font")) {
- if (!pFontList->KeyExist(sSysFontAlias.AsByteStringC()))
- pFontList->SetAtReference(sSysFontAlias.AsByteStringC(), pDoc,
+ if (!pFontList->KeyExist(sSysFontAlias.AsStringC()))
+ pFontList->SetAtReference(sSysFontAlias.AsStringC(), pDoc,
pPDFFont->GetFontDict());
}
pSysFont = pPDFFont;
diff --git a/core/fpdfdoc/cpvt_generateap.cpp b/core/fpdfdoc/cpvt_generateap.cpp
index ee99becaee..19b171a896 100644
--- a/core/fpdfdoc/cpvt_generateap.cpp
+++ b/core/fpdfdoc/cpvt_generateap.cpp
@@ -36,7 +36,7 @@ FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc,
if (DA.IsEmpty())
return FALSE;
- CPDF_SimpleParser syntax(DA.AsByteStringC());
+ CPDF_SimpleParser syntax(DA.AsStringC());
syntax.FindTagParamFromStart("Tf", 2);
CFX_ByteString sFontName = syntax.GetWord();
sFontName = PDF_NameDecode(sFontName);
@@ -54,12 +54,12 @@ FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc,
}
CPDF_Dictionary* pDRFontDict = pDRDict ? pDRDict->GetDictBy("Font") : nullptr;
if (pDRFontDict) {
- pFontDict = pDRFontDict->GetDictBy(sFontName.Mid(1).AsByteStringC());
+ pFontDict = pDRFontDict->GetDictBy(sFontName.Mid(1).AsStringC());
if (!pFontDict && !bUseFormRes) {
pDRDict = pFormDict->GetDictBy("DR");
pDRFontDict = pDRDict->GetDictBy("Font");
if (pDRFontDict)
- pFontDict = pDRFontDict->GetDictBy(sFontName.Mid(1).AsByteStringC());
+ pFontDict = pDRFontDict->GetDictBy(sFontName.Mid(1).AsStringC());
}
}
if (!pDRFontDict)
@@ -72,8 +72,7 @@ FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc,
pFontDict->SetAtName("BaseFont", "Helvetica");
pFontDict->SetAtName("Encoding", "WinAnsiEncoding");
pDoc->AddIndirectObject(pFontDict);
- pDRFontDict->SetAtReference(sFontName.Mid(1).AsByteStringC(), pDoc,
- pFontDict);
+ pDRFontDict->SetAtReference(sFontName.Mid(1).AsStringC(), pDoc, pFontDict);
}
CPDF_Font* pDefFont = pDoc->LoadFont(pFontDict);
if (!pDefFont)
@@ -190,8 +189,8 @@ FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc,
pStreamResFontList = new CPDF_Dictionary;
pStreamResList->SetAt("Font", pStreamResFontList);
}
- if (!pStreamResFontList->KeyExist(sFontName.AsByteStringC()))
- pStreamResFontList->SetAtReference(sFontName.AsByteStringC(), pDoc,
+ if (!pStreamResFontList->KeyExist(sFontName.AsStringC()))
+ pStreamResFontList->SetAtReference(sFontName.AsStringC(), pDoc,
pFontDict);
} else {
pStreamDict->SetAt("Resources", pFormDict->GetDictBy("DR")->Clone());
@@ -437,8 +436,8 @@ FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc,
pStreamResFontList = new CPDF_Dictionary;
pStreamResList->SetAt("Font", pStreamResFontList);
}
- if (!pStreamResFontList->KeyExist(sFontName.AsByteStringC()))
- pStreamResFontList->SetAtReference(sFontName.AsByteStringC(), pDoc,
+ if (!pStreamResFontList->KeyExist(sFontName.AsStringC()))
+ pStreamResFontList->SetAtReference(sFontName.AsStringC(), pDoc,
pFontDict);
} else {
pStreamDict->SetAt("Resources", pFormDict->GetDictBy("DR")->Clone());
diff --git a/core/fpdfdoc/doc_action.cpp b/core/fpdfdoc/doc_action.cpp
index 075849482c..3036d61ab0 100644
--- a/core/fpdfdoc/doc_action.cpp
+++ b/core/fpdfdoc/doc_action.cpp
@@ -39,7 +39,7 @@ CPDF_Dest CPDF_Action::GetDest(CPDF_Document* pDoc) const {
if (pDest->IsString() || pDest->IsName()) {
CPDF_NameTree name_tree(pDoc, "Dests");
return CPDF_Dest(
- name_tree.LookupNamedDest(pDoc, pDest->GetString().AsByteStringC()));
+ name_tree.LookupNamedDest(pDoc, pDest->GetString().AsStringC()));
}
if (CPDF_Array* pArray = pDest->AsArray())
return CPDF_Dest(pArray);
@@ -74,7 +74,7 @@ CFX_WideString CPDF_Action::GetFilePath() const {
CPDF_Dictionary* pWinDict = m_pDict->GetDictBy("Win");
if (pWinDict) {
return CFX_WideString::FromLocal(
- pWinDict->GetStringBy("F").AsByteStringC());
+ pWinDict->GetStringBy("F").AsStringC());
}
}
return path;
diff --git a/core/fpdfdoc/doc_annot.cpp b/core/fpdfdoc/doc_annot.cpp
index d1942eccd0..1db37ccdb3 100644
--- a/core/fpdfdoc/doc_annot.cpp
+++ b/core/fpdfdoc/doc_annot.cpp
@@ -181,12 +181,12 @@ CPDF_Stream* FPDFDOC_GetAnnotAP(CPDF_Dictionary* pAnnotDict,
CPDF_Dictionary* pDict = pAnnotDict->GetDictBy("Parent");
value = pDict ? pDict->GetStringBy("V") : CFX_ByteString();
}
- if (value.IsEmpty() || !pDict->KeyExist(value.AsByteStringC()))
+ if (value.IsEmpty() || !pDict->KeyExist(value.AsStringC()))
as = "Off";
else
as = value;
}
- return pDict->GetStreamBy(as.AsByteStringC());
+ return pDict->GetStreamBy(as.AsStringC());
}
return nullptr;
}
diff --git a/core/fpdfdoc/doc_basic.cpp b/core/fpdfdoc/doc_basic.cpp
index 308bf04287..bdb3f8cb0a 100644
--- a/core/fpdfdoc/doc_basic.cpp
+++ b/core/fpdfdoc/doc_basic.cpp
@@ -90,13 +90,13 @@ static CPDF_Object* SearchNameNode(CPDF_Dictionary* pNode,
if (pLimits) {
CFX_ByteString csLeft = pLimits->GetStringAt(0);
CFX_ByteString csRight = pLimits->GetStringAt(1);
- if (csLeft.Compare(csRight.AsByteStringC()) > 0) {
+ if (csLeft.Compare(csRight.AsStringC()) > 0) {
CFX_ByteString csTmp = csRight;
csRight = csLeft;
csLeft = csTmp;
}
- if (csName.Compare(csLeft.AsByteStringC()) < 0 ||
- csName.Compare(csRight.AsByteStringC()) > 0) {
+ if (csName.Compare(csLeft.AsStringC()) < 0 ||
+ csName.Compare(csRight.AsStringC()) > 0) {
return NULL;
}
}
@@ -105,7 +105,7 @@ static CPDF_Object* SearchNameNode(CPDF_Dictionary* pNode,
uint32_t dwCount = pNames->GetCount() / 2;
for (uint32_t i = 0; i < dwCount; i++) {
CFX_ByteString csValue = pNames->GetStringAt(i * 2);
- int32_t iCompare = csValue.Compare(csName.AsByteStringC());
+ int32_t iCompare = csValue.Compare(csName.AsStringC());
if (iCompare <= 0) {
if (ppFind) {
*ppFind = pNames;
@@ -321,25 +321,24 @@ bool CPDF_FileSpec::GetFileName(CFX_WideString* csFileName) const {
return true;
if (csFileName->IsEmpty()) {
if (pDict->KeyExist("DOS")) {
- *csFileName = CFX_WideString::FromLocal(
- pDict->GetStringBy("DOS").AsByteStringC());
+ *csFileName =
+ CFX_WideString::FromLocal(pDict->GetStringBy("DOS").AsStringC());
} else if (pDict->KeyExist("Mac")) {
- *csFileName = CFX_WideString::FromLocal(
- pDict->GetStringBy("Mac").AsByteStringC());
+ *csFileName =
+ CFX_WideString::FromLocal(pDict->GetStringBy("Mac").AsStringC());
} else if (pDict->KeyExist("Unix")) {
- *csFileName = CFX_WideString::FromLocal(
- pDict->GetStringBy("Unix").AsByteStringC());
+ *csFileName =
+ CFX_WideString::FromLocal(pDict->GetStringBy("Unix").AsStringC());
} else {
return false;
}
}
} else if (m_pObj->IsString()) {
- *csFileName =
- CFX_WideString::FromLocal(m_pObj->GetString().AsByteStringC());
+ *csFileName = CFX_WideString::FromLocal(m_pObj->GetString().AsStringC());
} else {
return false;
}
- *csFileName = DecodeFileName(csFileName->AsWideStringC());
+ *csFileName = DecodeFileName(csFileName->AsStringC());
return true;
}
@@ -505,7 +504,7 @@ int32_t CPDF_PageLabel::GetPageByLabel(const CFX_ByteStringC& bsLabel) const {
CFX_ByteString bsOrig = bsLabel;
for (int i = 0; i < nPages; i++) {
bsLbl = PDF_EncodeText(GetLabel(i));
- if (!bsLbl.Compare(bsOrig.AsByteStringC())) {
+ if (!bsLbl.Compare(bsOrig.AsStringC())) {
return i;
}
}
@@ -517,5 +516,5 @@ int32_t CPDF_PageLabel::GetPageByLabel(const CFX_ByteStringC& bsLabel) const {
return -1;
}
int32_t CPDF_PageLabel::GetPageByLabel(const CFX_WideStringC& wsLabel) const {
- return GetPageByLabel(PDF_EncodeText(wsLabel.c_str()).AsByteStringC());
+ return GetPageByLabel(PDF_EncodeText(wsLabel.c_str()).AsStringC());
}
diff --git a/core/fpdfdoc/doc_bookmark.cpp b/core/fpdfdoc/doc_bookmark.cpp
index 18e6174621..aee9fb7b14 100644
--- a/core/fpdfdoc/doc_bookmark.cpp
+++ b/core/fpdfdoc/doc_bookmark.cpp
@@ -80,8 +80,8 @@ CPDF_Dest CPDF_Bookmark::GetDest(CPDF_Document* pDocument) const {
return CPDF_Dest();
if (pDest->IsString() || pDest->IsName()) {
CPDF_NameTree name_tree(pDocument, "Dests");
- return CPDF_Dest(name_tree.LookupNamedDest(
- pDocument, pDest->GetString().AsByteStringC()));
+ return CPDF_Dest(
+ name_tree.LookupNamedDest(pDocument, pDest->GetString().AsStringC()));
}
if (CPDF_Array* pArray = pDest->AsArray())
return CPDF_Dest(pArray);
diff --git a/core/fpdfdoc/doc_form.cpp b/core/fpdfdoc/doc_form.cpp
index 384bcaa435..e1f5f30856 100644
--- a/core/fpdfdoc/doc_form.cpp
+++ b/core/fpdfdoc/doc_form.cpp
@@ -35,13 +35,13 @@ CFX_WideString FPDFDOC_FDF_GetFieldValue(const CPDF_Dictionary& pFieldDict,
const CFX_ByteString csBValue = pFieldDict.GetStringBy("V");
for (const auto& encoding : g_fieldEncoding) {
if (bsEncoding == encoding.m_name)
- return CFX_WideString::FromCodePage(csBValue.AsByteStringC(),
+ return CFX_WideString::FromCodePage(csBValue.AsStringC(),
encoding.m_codePage);
}
CFX_ByteString csTemp = csBValue.Left(2);
if (csTemp == "\xFF\xFE" || csTemp == "\xFE\xFF")
return PDF_DecodeText(csBValue);
- return CFX_WideString::FromLocal(csBValue.AsByteStringC());
+ return CFX_WideString::FromLocal(csBValue.AsStringC());
}
} // namespace
@@ -345,7 +345,7 @@ CFX_ByteString CPDF_InterForm::GenerateNewResourceName(
CFX_ByteString bsNum;
while (TRUE) {
CFX_ByteString csKey = csTmp + bsNum;
- if (!pDict->KeyExist(csKey.AsByteStringC())) {
+ if (!pDict->KeyExist(csKey.AsStringC())) {
return csKey;
}
if (m < iCount) {
diff --git a/core/fpdfdoc/doc_formcontrol.cpp b/core/fpdfdoc/doc_formcontrol.cpp
index 6435cfd76c..1fef183d80 100644
--- a/core/fpdfdoc/doc_formcontrol.cpp
+++ b/core/fpdfdoc/doc_formcontrol.cpp
@@ -78,7 +78,7 @@ void CPDF_FormControl::SetOnStateName(const CFX_ByteString& csOn) {
continue;
}
if (csKey2 != "Off") {
- pSubDict->ReplaceKey(csKey2.AsByteStringC(), csValue.AsByteStringC());
+ pSubDict->ReplaceKey(csKey2.AsStringC(), csValue.AsStringC());
break;
}
}
@@ -202,7 +202,7 @@ CPDF_ApSettings CPDF_FormControl::GetMK() const {
}
bool CPDF_FormControl::HasMKEntry(CFX_ByteString csEntry) const {
- return GetMK().HasMKEntry(csEntry.AsByteStringC());
+ return GetMK().HasMKEntry(csEntry.AsStringC());
}
int CPDF_FormControl::GetRotation() {
@@ -210,24 +210,24 @@ int CPDF_FormControl::GetRotation() {
}
FX_ARGB CPDF_FormControl::GetColor(int& iColorType, CFX_ByteString csEntry) {
- return GetMK().GetColor(iColorType, csEntry.AsByteStringC());
+ return GetMK().GetColor(iColorType, csEntry.AsStringC());
}
FX_FLOAT CPDF_FormControl::GetOriginalColor(int index, CFX_ByteString csEntry) {
- return GetMK().GetOriginalColor(index, csEntry.AsByteStringC());
+ return GetMK().GetOriginalColor(index, csEntry.AsStringC());
}
void CPDF_FormControl::GetOriginalColor(int& iColorType,
FX_FLOAT fc[4],
CFX_ByteString csEntry) {
- GetMK().GetOriginalColor(iColorType, fc, csEntry.AsByteStringC());
+ GetMK().GetOriginalColor(iColorType, fc, csEntry.AsStringC());
}
CFX_WideString CPDF_FormControl::GetCaption(CFX_ByteString csEntry) {
- return GetMK().GetCaption(csEntry.AsByteStringC());
+ return GetMK().GetCaption(csEntry.AsStringC());
}
CPDF_Stream* CPDF_FormControl::GetIcon(CFX_ByteString csEntry) {
- return GetMK().GetIcon(csEntry.AsByteStringC());
+ return GetMK().GetIcon(csEntry.AsStringC());
}
CPDF_IconFit CPDF_FormControl::GetIconFit() {
@@ -286,8 +286,7 @@ CPDF_Font* CPDF_FormControl::GetDefaultControlFont() {
if (CPDF_Dictionary* pDict = ToDictionary(pObj)) {
CPDF_Dictionary* pFonts = pDict->GetDictBy("Font");
if (pFonts) {
- CPDF_Dictionary* pElement =
- pFonts->GetDictBy(csFontNameTag.AsByteStringC());
+ CPDF_Dictionary* pElement = pFonts->GetDictBy(csFontNameTag.AsStringC());
if (pElement) {
CPDF_Font* pFont = m_pField->m_pForm->m_pDocument->LoadFont(pElement);
if (pFont) {
@@ -304,8 +303,7 @@ CPDF_Font* CPDF_FormControl::GetDefaultControlFont() {
if (CPDF_Dictionary* pDict = ToDictionary(pObj)) {
CPDF_Dictionary* pFonts = pDict->GetDictBy("Font");
if (pFonts) {
- CPDF_Dictionary* pElement =
- pFonts->GetDictBy(csFontNameTag.AsByteStringC());
+ CPDF_Dictionary* pElement = pFonts->GetDictBy(csFontNameTag.AsStringC());
if (pElement) {
CPDF_Font* pFont = m_pField->m_pForm->m_pDocument->LoadFont(pElement);
if (pFont) {
diff --git a/core/fpdfdoc/doc_formfield.cpp b/core/fpdfdoc/doc_formfield.cpp
index 1adc92ae4f..103465a8e5 100644
--- a/core/fpdfdoc/doc_formfield.cpp
+++ b/core/fpdfdoc/doc_formfield.cpp
@@ -1054,7 +1054,7 @@ void CPDF_FormField::LoadDA() {
if (DA.IsEmpty()) {
return;
}
- CPDF_SimpleParser syntax(DA.AsByteStringC());
+ CPDF_SimpleParser syntax(DA.AsStringC());
syntax.FindTagParamFromStart("Tf", 2);
CFX_ByteString font_name = syntax.GetWord();
CPDF_Dictionary* pFontDict = NULL;
@@ -1062,7 +1062,7 @@ void CPDF_FormField::LoadDA() {
m_pForm->m_pFormDict->GetDictBy("DR")->GetDictBy("Font"))
pFontDict = m_pForm->m_pFormDict->GetDictBy("DR")
->GetDictBy("Font")
- ->GetDictBy(font_name.AsByteStringC());
+ ->GetDictBy(font_name.AsStringC());
if (!pFontDict) {
return;
diff --git a/core/fpdfdoc/doc_link.cpp b/core/fpdfdoc/doc_link.cpp
index 8f8d0d158c..07cc9f26ff 100644
--- a/core/fpdfdoc/doc_link.cpp
+++ b/core/fpdfdoc/doc_link.cpp
@@ -82,7 +82,7 @@ CPDF_Dest CPDF_Link::GetDest(CPDF_Document* pDoc) {
if (pDest->IsString() || pDest->IsName()) {
CPDF_NameTree name_tree(pDoc, "Dests");
return CPDF_Dest(
- name_tree.LookupNamedDest(pDoc, pDest->GetString().AsByteStringC()));
+ name_tree.LookupNamedDest(pDoc, pDest->GetString().AsStringC()));
}
if (CPDF_Array* pArray = pDest->AsArray())
return CPDF_Dest(pArray);
diff --git a/core/fpdfdoc/doc_ocg.cpp b/core/fpdfdoc/doc_ocg.cpp
index 02b6eb115e..9b57509e56 100644
--- a/core/fpdfdoc/doc_ocg.cpp
+++ b/core/fpdfdoc/doc_ocg.cpp
@@ -142,7 +142,7 @@ FX_BOOL CPDF_OCContext::LoadOCGStateFromConfig(const CFX_ByteStringC& csConfig,
if (!pState) {
continue;
}
- bState = pState->GetStringBy(csFind.AsByteStringC()) != "OFF";
+ bState = pState->GetStringBy(csFind.AsStringC()) != "OFF";
}
}
return bState;
@@ -154,11 +154,11 @@ FX_BOOL CPDF_OCContext::LoadOCGState(const CPDF_Dictionary* pOCGDict) const {
CFX_ByteString csState = FPDFDOC_OCG_GetUsageTypeString(m_eUsageType);
CPDF_Dictionary* pUsage = pOCGDict->GetDictBy("Usage");
if (pUsage) {
- CPDF_Dictionary* pState = pUsage->GetDictBy(csState.AsByteStringC());
+ CPDF_Dictionary* pState = pUsage->GetDictBy(csState.AsStringC());
if (pState) {
CFX_ByteString csFind = csState + "State";
- if (pState->KeyExist(csFind.AsByteStringC())) {
- return pState->GetStringBy(csFind.AsByteStringC()) != "OFF";
+ if (pState->KeyExist(csFind.AsStringC())) {
+ return pState->GetStringBy(csFind.AsStringC()) != "OFF";
}
}
if (csState != "View") {
@@ -169,7 +169,7 @@ FX_BOOL CPDF_OCContext::LoadOCGState(const CPDF_Dictionary* pOCGDict) const {
}
}
FX_BOOL bDefValid = FALSE;
- return LoadOCGStateFromConfig(csState.AsByteStringC(), pOCGDict, bDefValid);
+ return LoadOCGStateFromConfig(csState.AsStringC(), pOCGDict, bDefValid);
}
FX_BOOL CPDF_OCContext::GetOCGVisible(const CPDF_Dictionary* pOCGDict) {
diff --git a/core/fpdfdoc/doc_tagged.cpp b/core/fpdfdoc/doc_tagged.cpp
index 94c143d51c..a86514059c 100644
--- a/core/fpdfdoc/doc_tagged.cpp
+++ b/core/fpdfdoc/doc_tagged.cpp
@@ -205,8 +205,7 @@ CPDF_StructElementImpl::CPDF_StructElementImpl(CPDF_StructTreeImpl* pTree,
m_pDict = pDict;
m_Type = pDict->GetStringBy("S");
if (pTree->m_pRoleMap) {
- CFX_ByteString mapped =
- pTree->m_pRoleMap->GetStringBy(m_Type.AsByteStringC());
+ CFX_ByteString mapped = pTree->m_pRoleMap->GetStringBy(m_Type.AsStringC());
if (!mapped.IsEmpty()) {
m_Type = mapped;
}
@@ -375,15 +374,14 @@ CPDF_Object* CPDF_StructElementImpl::GetAttr(const CFX_ByteStringC& owner,
for (uint32_t i = 0; i < pArray->GetCount(); i++) {
CFX_ByteString class_name = pArray->GetStringAt(i);
CPDF_Dictionary* pClassDict =
- pClassMap->GetDictBy(class_name.AsByteStringC());
+ pClassMap->GetDictBy(class_name.AsStringC());
if (pClassDict && pClassDict->GetStringBy("O") == owner)
return pClassDict->GetDirectObjectBy(name);
}
return nullptr;
}
CFX_ByteString class_name = pC->GetString();
- CPDF_Dictionary* pClassDict =
- pClassMap->GetDictBy(class_name.AsByteStringC());
+ CPDF_Dictionary* pClassDict = pClassMap->GetDictBy(class_name.AsStringC());
if (pClassDict && pClassDict->GetStringBy("O") == owner)
return pClassDict->GetDirectObjectBy(name);
return nullptr;
diff --git a/core/fpdfdoc/doc_utils.cpp b/core/fpdfdoc/doc_utils.cpp
index 7e7fa8110f..7c66b879cb 100644
--- a/core/fpdfdoc/doc_utils.cpp
+++ b/core/fpdfdoc/doc_utils.cpp
@@ -82,7 +82,7 @@ FX_BOOL CPDF_DefaultAppearance::HasFont() {
if (m_csDA.IsEmpty()) {
return FALSE;
}
- CPDF_SimpleParser syntax(m_csDA.AsByteStringC());
+ CPDF_SimpleParser syntax(m_csDA.AsStringC());
return syntax.FindTagParamFromStart("Tf", 2);
}
CFX_ByteString CPDF_DefaultAppearance::GetFontString() {
@@ -90,7 +90,7 @@ CFX_ByteString CPDF_DefaultAppearance::GetFontString() {
if (m_csDA.IsEmpty()) {
return csFont;
}
- CPDF_SimpleParser syntax(m_csDA.AsByteStringC());
+ CPDF_SimpleParser syntax(m_csDA.AsStringC());
if (syntax.FindTagParamFromStart("Tf", 2)) {
csFont += (CFX_ByteString)syntax.GetWord();
csFont += " ";
@@ -107,7 +107,7 @@ void CPDF_DefaultAppearance::GetFont(CFX_ByteString& csFontNameTag,
if (m_csDA.IsEmpty()) {
return;
}
- CPDF_SimpleParser syntax(m_csDA.AsByteStringC());
+ CPDF_SimpleParser syntax(m_csDA.AsStringC());
if (syntax.FindTagParamFromStart("Tf", 2)) {
csFontNameTag = CFX_ByteString(syntax.GetWord());
csFontNameTag.Delete(0, 1);
@@ -119,7 +119,7 @@ FX_BOOL CPDF_DefaultAppearance::HasColor(FX_BOOL bStrokingOperation) {
if (m_csDA.IsEmpty()) {
return FALSE;
}
- CPDF_SimpleParser syntax(m_csDA.AsByteStringC());
+ CPDF_SimpleParser syntax(m_csDA.AsStringC());
if (syntax.FindTagParamFromStart(bStrokingOperation ? "G" : "g", 1)) {
return TRUE;
}
@@ -134,7 +134,7 @@ CFX_ByteString CPDF_DefaultAppearance::GetColorString(
if (m_csDA.IsEmpty()) {
return csColor;
}
- CPDF_SimpleParser syntax(m_csDA.AsByteStringC());
+ CPDF_SimpleParser syntax(m_csDA.AsStringC());
if (syntax.FindTagParamFromStart(bStrokingOperation ? "G" : "g", 1)) {
csColor += (CFX_ByteString)syntax.GetWord();
csColor += " ";
@@ -174,7 +174,7 @@ void CPDF_DefaultAppearance::GetColor(int& iColorType,
if (m_csDA.IsEmpty()) {
return;
}
- CPDF_SimpleParser syntax(m_csDA.AsByteStringC());
+ CPDF_SimpleParser syntax(m_csDA.AsStringC());
if (syntax.FindTagParamFromStart(bStrokingOperation ? "G" : "g", 1)) {
iColorType = COLORTYPE_GRAY;
fc[0] = FX_atof(syntax.GetWord());
@@ -203,7 +203,7 @@ void CPDF_DefaultAppearance::GetColor(FX_ARGB& color,
if (m_csDA.IsEmpty()) {
return;
}
- CPDF_SimpleParser syntax(m_csDA.AsByteStringC());
+ CPDF_SimpleParser syntax(m_csDA.AsStringC());
if (syntax.FindTagParamFromStart(bStrokingOperation ? "G" : "g", 1)) {
iColorType = COLORTYPE_GRAY;
FX_FLOAT g = FX_atof(syntax.GetWord()) * 255 + 0.5f;
@@ -235,7 +235,7 @@ FX_BOOL CPDF_DefaultAppearance::HasTextMatrix() {
if (m_csDA.IsEmpty()) {
return FALSE;
}
- CPDF_SimpleParser syntax(m_csDA.AsByteStringC());
+ CPDF_SimpleParser syntax(m_csDA.AsStringC());
return syntax.FindTagParamFromStart("Tm", 6);
}
CFX_ByteString CPDF_DefaultAppearance::GetTextMatrixString() {
@@ -243,7 +243,7 @@ CFX_ByteString CPDF_DefaultAppearance::GetTextMatrixString() {
if (m_csDA.IsEmpty()) {
return csTM;
}
- CPDF_SimpleParser syntax(m_csDA.AsByteStringC());
+ CPDF_SimpleParser syntax(m_csDA.AsStringC());
if (syntax.FindTagParamFromStart("Tm", 6)) {
for (int i = 0; i < 6; i++) {
csTM += (CFX_ByteString)syntax.GetWord();
@@ -258,7 +258,7 @@ CFX_Matrix CPDF_DefaultAppearance::GetTextMatrix() {
if (m_csDA.IsEmpty()) {
return tm;
}
- CPDF_SimpleParser syntax(m_csDA.AsByteStringC());
+ CPDF_SimpleParser syntax(m_csDA.AsStringC());
if (syntax.FindTagParamFromStart("Tm", 6)) {
FX_FLOAT f[6];
for (int i = 0; i < 6; i++) {
@@ -387,7 +387,7 @@ CPDF_Font* GetInterFormFont(CPDF_Dictionary* pFormDict,
if (!pFonts) {
return NULL;
}
- CPDF_Dictionary* pElement = pFonts->GetDictBy(csAlias.AsByteStringC());
+ CPDF_Dictionary* pElement = pFonts->GetDictBy(csAlias.AsStringC());
if (!pElement) {
return NULL;
}
@@ -606,7 +606,7 @@ void AddInterFormFont(CPDF_Dictionary*& pFormDict,
csNameTag.Remove(' ');
csNameTag =
CPDF_InterForm::GenerateNewResourceName(pDR, "Font", 4, csNameTag);
- pFonts->SetAtReference(csNameTag.AsByteStringC(), pDocument,
+ pFonts->SetAtReference(csNameTag.AsStringC(), pDocument,
pFont->GetFontDict());
}
CPDF_Font* AddNativeInterFormFont(CPDF_Dictionary*& pFormDict,
@@ -651,7 +651,7 @@ void RemoveInterFormFont(CPDF_Dictionary* pFormDict, const CPDF_Font* pFont) {
}
CPDF_Dictionary* pDR = pFormDict->GetDictBy("DR");
CPDF_Dictionary* pFonts = pDR->GetDictBy("Font");
- pFonts->RemoveAt(csTag.AsByteStringC());
+ pFonts->RemoveAt(csTag.AsStringC());
}
void RemoveInterFormFont(CPDF_Dictionary* pFormDict, CFX_ByteString csNameTag) {
if (!pFormDict || csNameTag.IsEmpty()) {
@@ -665,7 +665,7 @@ void RemoveInterFormFont(CPDF_Dictionary* pFormDict, CFX_ByteString csNameTag) {
if (!pFonts) {
return;
}
- pFonts->RemoveAt(csNameTag.AsByteStringC());
+ pFonts->RemoveAt(csNameTag.AsStringC());
}
CPDF_Font* GetDefaultInterFormFont(CPDF_Dictionary* pFormDict,
diff --git a/core/fxcrt/fx_basic_bstring.cpp b/core/fxcrt/fx_basic_bstring.cpp
index 34abe1e067..5b9c683c53 100644
--- a/core/fxcrt/fx_basic_bstring.cpp
+++ b/core/fxcrt/fx_basic_bstring.cpp
@@ -810,7 +810,7 @@ CFX_ByteString CFX_ByteString::FromUnicode(const FX_WCHAR* str,
// static
CFX_ByteString CFX_ByteString::FromUnicode(const CFX_WideString& str) {
- return CFX_CharMap::GetByteString(0, str.AsWideStringC());
+ return CFX_CharMap::GetByteString(0, str.AsStringC());
}
int CFX_ByteString::Compare(const CFX_ByteStringC& str) const {
diff --git a/core/fxcrt/fx_basic_buffer.cpp b/core/fxcrt/fx_basic_buffer.cpp
index 8553474914..7f85c95d3f 100644
--- a/core/fxcrt/fx_basic_buffer.cpp
+++ b/core/fxcrt/fx_basic_buffer.cpp
@@ -248,7 +248,7 @@ CFX_ArchiveSaver& CFX_ArchiveSaver::operator<<(const FX_WCHAR* wstr) {
}
CFX_ArchiveSaver& CFX_ArchiveSaver::operator<<(const CFX_WideString& wstr) {
CFX_ByteString encoded = wstr.UTF16LE_Encode();
- return operator<<(encoded.AsByteStringC());
+ return operator<<(encoded.AsStringC());
}
void CFX_ArchiveSaver::Write(const void* pData, FX_STRSIZE dwSize) {
if (m_pStream) {
diff --git a/core/fxcrt/fx_xml_parser.cpp b/core/fxcrt/fx_xml_parser.cpp
index d59a6b9780..b4df4d0532 100644
--- a/core/fxcrt/fx_xml_parser.cpp
+++ b/core/fxcrt/fx_xml_parser.cpp
@@ -371,7 +371,7 @@ CXML_Element* CXML_Parser::ParseElement(CXML_Element* pParent,
}
CXML_Element* pElement = new CXML_Element;
pElement->m_pParent = pParent;
- pElement->SetTag(tag_space.AsByteStringC(), tag_name.AsByteStringC());
+ pElement->SetTag(tag_space.AsStringC(), tag_name.AsStringC());
do {
CFX_ByteString attr_space, attr_name;
while (m_dwIndex < m_dwBufferSize) {
@@ -397,9 +397,8 @@ CXML_Element* CXML_Parser::ParseElement(CXML_Element* pParent,
}
CFX_WideString attr_value;
GetAttrValue(attr_value);
- pElement->m_AttrMap.SetAt(attr_space.AsByteStringC(),
- attr_name.AsByteStringC(),
- attr_value.AsWideStringC());
+ pElement->m_AttrMap.SetAt(attr_space.AsStringC(), attr_name.AsStringC(),
+ attr_value.AsStringC());
}
m_nOffset = m_nBufferOffset + (FX_FILESIZE)m_dwIndex;
if (m_dwIndex < m_dwBufferSize || IsEOF()) {
@@ -462,7 +461,7 @@ CXML_Element* CXML_Parser::ParseElement(CXML_Element* pParent,
if (!bCDATA && !m_bSaveSpaceChars) {
dataStr.TrimRight(L" \t\r\n");
}
- InsertContentSegment(bCDATA, dataStr.AsWideStringC(), pElement);
+ InsertContentSegment(bCDATA, dataStr.AsStringC(), pElement);
content.Clear();
decoder.Clear();
bCDATA = FALSE;
@@ -506,7 +505,7 @@ CXML_Element* CXML_Parser::ParseElement(CXML_Element* pParent,
if (!m_bSaveSpaceChars) {
dataStr.TrimRight(L" \t\r\n");
}
- InsertContentSegment(bCDATA, dataStr.AsWideStringC(), pElement);
+ InsertContentSegment(bCDATA, dataStr.AsStringC(), pElement);
content.Clear();
decoder.Clear();
bCDATA = FALSE;
@@ -602,7 +601,7 @@ CFX_ByteString CXML_Element::GetNamespace(FX_BOOL bQualified) const {
if (bQualified) {
return m_QSpaceName;
}
- return GetNamespaceURI(m_QSpaceName.AsByteStringC());
+ return GetNamespaceURI(m_QSpaceName.AsStringC());
}
CFX_ByteString CXML_Element::GetNamespaceURI(
const CFX_ByteStringC& qName) const {
diff --git a/core/fxcrt/fxcrt_posix.cpp b/core/fxcrt/fxcrt_posix.cpp
index a18bb69c55..9237acef6b 100644
--- a/core/fxcrt/fxcrt_posix.cpp
+++ b/core/fxcrt/fxcrt_posix.cpp
@@ -45,7 +45,7 @@ FX_BOOL CFXCRT_FileAccess_Posix::Open(const CFX_ByteStringC& fileName,
}
FX_BOOL CFXCRT_FileAccess_Posix::Open(const CFX_WideStringC& fileName,
uint32_t dwMode) {
- return Open(FX_UTF8Encode(fileName).AsByteStringC(), dwMode);
+ return Open(FX_UTF8Encode(fileName).AsStringC(), dwMode);
}
void CFXCRT_FileAccess_Posix::Close() {
if (m_nFD < 0) {
diff --git a/core/fxcrt/include/fx_basic.h b/core/fxcrt/include/fx_basic.h
index 1cb5174351..1b64a5924f 100644
--- a/core/fxcrt/include/fx_basic.h
+++ b/core/fxcrt/include/fx_basic.h
@@ -67,7 +67,7 @@ class CFX_ByteTextBuf : public CFX_BinaryBuf {
return *this << CFX_ByteStringC(pStr);
}
CFX_ByteTextBuf& operator<<(const CFX_ByteString& str) {
- return *this << str.AsByteStringC();
+ return *this << str.AsStringC();
}
CFX_ByteTextBuf& operator<<(const CFX_ByteStringC& lpsz);
CFX_ByteTextBuf& operator<<(const CFX_ByteTextBuf& buf);
diff --git a/core/fxcrt/include/fx_string.h b/core/fxcrt/include/fx_string.h
index 6e2954fcbb..5e3cb45fba 100644
--- a/core/fxcrt/include/fx_string.h
+++ b/core/fxcrt/include/fx_string.h
@@ -188,7 +188,7 @@ class CFX_ByteString {
// Explicit conversion to CFX_ByteStringC.
// Note: |this| must outlive the use of the result.
- CFX_ByteStringC AsByteStringC() const {
+ CFX_ByteStringC AsStringC() const {
return CFX_ByteStringC(raw_str(), GetLength());
}
@@ -332,29 +332,29 @@ inline CFX_ByteString operator+(FX_CHAR ch, const CFX_ByteStringC& str2) {
}
inline CFX_ByteString operator+(const CFX_ByteString& str1,
const CFX_ByteString& str2) {
- return CFX_ByteString(str1.AsByteStringC(), str2.AsByteStringC());
+ return CFX_ByteString(str1.AsStringC(), str2.AsStringC());
}
inline CFX_ByteString operator+(const CFX_ByteString& str1, FX_CHAR ch) {
- return CFX_ByteString(str1.AsByteStringC(), CFX_ByteStringC(ch));
+ return CFX_ByteString(str1.AsStringC(), CFX_ByteStringC(ch));
}
inline CFX_ByteString operator+(FX_CHAR ch, const CFX_ByteString& str2) {
- return CFX_ByteString(ch, str2.AsByteStringC());
+ return CFX_ByteString(ch, str2.AsStringC());
}
inline CFX_ByteString operator+(const CFX_ByteString& str1,
const FX_CHAR* str2) {
- return CFX_ByteString(str1.AsByteStringC(), str2);
+ return CFX_ByteString(str1.AsStringC(), str2);
}
inline CFX_ByteString operator+(const FX_CHAR* str1,
const CFX_ByteString& str2) {
- return CFX_ByteString(str1, str2.AsByteStringC());
+ return CFX_ByteString(str1, str2.AsStringC());
}
inline CFX_ByteString operator+(const CFX_ByteString& str1,
const CFX_ByteStringC& str2) {
- return CFX_ByteString(str1.AsByteStringC(), str2);
+ return CFX_ByteString(str1.AsStringC(), str2);
}
inline CFX_ByteString operator+(const CFX_ByteStringC& str1,
const CFX_ByteString& str2) {
- return CFX_ByteString(str1, str2.AsByteStringC());
+ return CFX_ByteString(str1, str2.AsStringC());
}
class CFX_WideStringC {
@@ -512,7 +512,7 @@ class CFX_WideString {
// Explicit conversion to CFX_WideStringC.
// Note: |this| must outlive the use of the result.
- CFX_WideStringC AsWideStringC() const {
+ CFX_WideStringC AsStringC() const {
return CFX_WideStringC(c_str(), GetLength());
}
@@ -641,29 +641,29 @@ inline CFX_WideString operator+(FX_WCHAR ch, const CFX_WideStringC& str2) {
}
inline CFX_WideString operator+(const CFX_WideString& str1,
const CFX_WideString& str2) {
- return CFX_WideString(str1.AsWideStringC(), str2.AsWideStringC());
+ return CFX_WideString(str1.AsStringC(), str2.AsStringC());
}
inline CFX_WideString operator+(const CFX_WideString& str1, FX_WCHAR ch) {
- return CFX_WideString(str1.AsWideStringC(), CFX_WideStringC(ch));
+ return CFX_WideString(str1.AsStringC(), CFX_WideStringC(ch));
}
inline CFX_WideString operator+(FX_WCHAR ch, const CFX_WideString& str2) {
- return CFX_WideString(ch, str2.AsWideStringC());
+ return CFX_WideString(ch, str2.AsStringC());
}
inline CFX_WideString operator+(const CFX_WideString& str1,
const FX_WCHAR* str2) {
- return CFX_WideString(str1.AsWideStringC(), str2);
+ return CFX_WideString(str1.AsStringC(), str2);
}
inline CFX_WideString operator+(const FX_WCHAR* str1,
const CFX_WideString& str2) {
- return CFX_WideString(str1, str2.AsWideStringC());
+ return CFX_WideString(str1, str2.AsStringC());
}
inline CFX_WideString operator+(const CFX_WideString& str1,
const CFX_WideStringC& str2) {
- return CFX_WideString(str1.AsWideStringC(), str2);
+ return CFX_WideString(str1.AsStringC(), str2);
}
inline CFX_WideString operator+(const CFX_WideStringC& str1,
const CFX_WideString& str2) {
- return CFX_WideString(str1, str2.AsWideStringC());
+ return CFX_WideString(str1, str2.AsStringC());
}
inline bool operator==(const wchar_t* lhs, const CFX_WideString& rhs) {
return rhs == lhs;
diff --git a/core/fxge/ge/fx_ge_ps.cpp b/core/fxge/ge/fx_ge_ps.cpp
index b4e9ed918a..241a184ed1 100644
--- a/core/fxge/ge/fx_ge_ps.cpp
+++ b/core/fxge/ge/fx_ge_ps.cpp
@@ -680,7 +680,7 @@ FX_BOOL CFX_PSRenderer::DrawText(int nChars,
buf << pCharPos[i].m_OriginX << " " << pCharPos[i].m_OriginY << " m";
CFX_ByteString hex;
hex.Format("<%02X>", ps_glyphindex);
- buf << hex.AsByteStringC() << "Tj\n";
+ buf << hex.AsStringC() << "Tj\n";
}
buf << "Q\n";
m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize());
diff --git a/core/fxge/ge/fx_ge_text.cpp b/core/fxge/ge/fx_ge_text.cpp
index 125547e5a7..44ab9f7ab5 100644
--- a/core/fxge/ge/fx_ge_text.cpp
+++ b/core/fxge/ge/fx_ge_text.cpp
@@ -193,7 +193,7 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars,
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
if ((text_flags & FXFONT_CIDFONT) ||
(pFont->GetPsName().Find(
- CFX_WideString::FromLocal("+ZJHL").AsWideStringC()) != -1) ||
+ CFX_WideString::FromLocal("+ZJHL").AsStringC()) != -1) ||
(pFont->GetPsName() == CFX_WideString::FromLocal("CNAAJI+cmex10"))) {
should_call_draw_device_text = false;
}
diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp
index 7b8a4faa55..60ae57c767 100644
--- a/core/fxge/win32/fx_win32_device.cpp
+++ b/core/fxge/win32/fx_win32_device.cpp
@@ -454,7 +454,7 @@ IFX_SystemFontInfo* IFX_SystemFontInfo::CreateDefault(const char** pUnused) {
if (path_len > 0 && path_len < MAX_PATH) {
CFX_ByteString fonts_path(windows_path);
fonts_path += "\\Fonts";
- pInfoFallback->AddPath(fonts_path.AsByteStringC());
+ pInfoFallback->AddPath(fonts_path.AsStringC());
}
return pInfoFallback;
}
diff --git a/fpdfsdk/formfiller/cba_fontmap.cpp b/fpdfsdk/formfiller/cba_fontmap.cpp
index 1ecf7d4de4..d12c7fe975 100644
--- a/fpdfsdk/formfiller/cba_fontmap.cpp
+++ b/fpdfsdk/formfiller/cba_fontmap.cpp
@@ -159,15 +159,15 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont,
}
// to avoid checkbox and radiobutton
- CPDF_Object* pObject = pAPDict->GetObjectBy(m_sAPType.AsByteStringC());
+ CPDF_Object* pObject = pAPDict->GetObjectBy(m_sAPType.AsStringC());
if (ToDictionary(pObject))
return;
- CPDF_Stream* pStream = pAPDict->GetStreamBy(m_sAPType.AsByteStringC());
+ CPDF_Stream* pStream = pAPDict->GetStreamBy(m_sAPType.AsStringC());
if (!pStream) {
pStream = new CPDF_Stream(NULL, 0, NULL);
int32_t objnum = m_pDocument->AddIndirectObject(pStream);
- pAPDict->SetAtReference(m_sAPType.AsByteStringC(), m_pDocument, objnum);
+ pAPDict->SetAtReference(m_sAPType.AsStringC(), m_pDocument, objnum);
}
CPDF_Dictionary* pStreamDict = pStream->GetDict();
@@ -191,8 +191,8 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont,
int32_t objnum = m_pDocument->AddIndirectObject(pStreamResFontList);
pStreamResList->SetAtReference("Font", m_pDocument, objnum);
}
- if (!pStreamResFontList->KeyExist(sAlias.AsByteStringC()))
- pStreamResFontList->SetAtReference(sAlias.AsByteStringC(), m_pDocument,
+ if (!pStreamResFontList->KeyExist(sAlias.AsStringC()))
+ pStreamResFontList->SetAtReference(sAlias.AsStringC(), m_pDocument,
pFont->GetFontDict());
}
}
@@ -221,14 +221,14 @@ CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(CFX_ByteString& sAlias) {
CPDF_Dictionary* pFontDict = NULL;
if (!sDA.IsEmpty()) {
- CPDF_SimpleParser syntax(sDA.AsByteStringC());
+ CPDF_SimpleParser syntax(sDA.AsStringC());
syntax.FindTagParamFromStart("Tf", 2);
CFX_ByteString sFontName = syntax.GetWord();
sAlias = PDF_NameDecode(sFontName).Mid(1);
if (CPDF_Dictionary* pDRDict = m_pAnnotDict->GetDictBy("DR"))
if (CPDF_Dictionary* pDRFontDict = pDRDict->GetDictBy("Font"))
- pFontDict = pDRFontDict->GetDictBy(sAlias.AsByteStringC());
+ pFontDict = pDRFontDict->GetDictBy(sAlias.AsStringC());
if (!pFontDict)
if (CPDF_Dictionary* pAPDict = m_pAnnotDict->GetDictBy("AP"))
@@ -237,14 +237,14 @@ CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(CFX_ByteString& sAlias) {
pNormalDict->GetDictBy("Resources"))
if (CPDF_Dictionary* pResFontDict =
pNormalResDict->GetDictBy("Font"))
- pFontDict = pResFontDict->GetDictBy(sAlias.AsByteStringC());
+ pFontDict = pResFontDict->GetDictBy(sAlias.AsStringC());
if (bWidget) {
if (!pFontDict) {
if (pAcroFormDict) {
if (CPDF_Dictionary* pDRDict = pAcroFormDict->GetDictBy("DR"))
if (CPDF_Dictionary* pDRFontDict = pDRDict->GetDictBy("Font"))
- pFontDict = pDRFontDict->GetDictBy(sAlias.AsByteStringC());
+ pFontDict = pDRFontDict->GetDictBy(sAlias.AsStringC());
}
}
}
diff --git a/fpdfsdk/fpdf_ext.cpp b/fpdfsdk/fpdf_ext.cpp
index 1f4a1c5590..3ac1262fc1 100644
--- a/fpdfsdk/fpdf_ext.cpp
+++ b/fpdfsdk/fpdf_ext.cpp
@@ -105,7 +105,7 @@ FX_BOOL CheckSharedForm(const CXML_Element* pElement, CFX_ByteString cbName) {
if (space == "xmlns" && name == "adhocwf" &&
value == L"http://ns.adobe.com/AcrobatAdhocWorkflow/1.0/") {
CXML_Element* pVersion =
- pElement->GetElement("adhocwf", cbName.AsByteStringC());
+ pElement->GetElement("adhocwf", cbName.AsStringC());
if (!pVersion)
continue;
CFX_WideString wsContent = pVersion->GetContent(0);
diff --git a/fpdfsdk/fpdf_flatten.cpp b/fpdfsdk/fpdf_flatten.cpp
index bbd5ad3dd3..99f97d7ca2 100644
--- a/fpdfsdk/fpdf_flatten.cpp
+++ b/fpdfsdk/fpdf_flatten.cpp
@@ -395,7 +395,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
char sExtend[5] = {};
FXSYS_itoa(iKey, sExtend, 10);
key = CFX_ByteString("FFT") + CFX_ByteString(sExtend);
- if (!pPageXObject->KeyExist(key.AsByteStringC()))
+ if (!pPageXObject->KeyExist(key.AsStringC()))
break;
}
}
@@ -405,7 +405,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
CPDF_Dictionary* pNewXORes = NULL;
if (!key.IsEmpty()) {
- pPageXObject->SetAtReference(key.AsByteStringC(), pDocument, dwObjNum);
+ pPageXObject->SetAtReference(key.AsStringC(), pDocument, dwObjNum);
CPDF_Dictionary* pNewOXbjectDic = pNewXObject->GetDict();
pNewXORes = new CPDF_Dictionary;
pNewOXbjectDic->SetAt("Resources", pNewXORes);
@@ -437,7 +437,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
continue;
if (!sAnnotState.IsEmpty()) {
- pAPStream = pAPDic->GetStreamBy(sAnnotState.AsByteStringC());
+ pAPStream = pAPDic->GetStreamBy(sAnnotState.AsStringC());
} else {
auto it = pAPDic->begin();
if (it != pAPDic->end()) {
@@ -486,7 +486,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
CFX_ByteString sFormName;
sFormName.Format("F%d", i);
uint32_t dwObjNum = pDocument->AddIndirectObject(pObj);
- pXObject->SetAtReference(sFormName.AsByteStringC(), pDocument, dwObjNum);
+ pXObject->SetAtReference(sFormName.AsStringC(), pDocument, dwObjNum);
CPDF_StreamAcc acc;
acc.LoadAllData(pNewXObject);
diff --git a/fpdfsdk/fpdfppo.cpp b/fpdfsdk/fpdfppo.cpp
index 21d8c7d9ae..1dbd10c1f7 100644
--- a/fpdfsdk/fpdfppo.cpp
+++ b/fpdfsdk/fpdfppo.cpp
@@ -110,9 +110,9 @@ FX_BOOL CPDF_PageOrganizer::ExportPage(CPDF_Document* pSrcPDFDoc,
const CFX_ByteString& cbSrcKeyStr = it.first;
CPDF_Object* pObj = it.second;
if (cbSrcKeyStr.Compare(("Type")) && cbSrcKeyStr.Compare(("Parent"))) {
- if (pCurPageDict->KeyExist(cbSrcKeyStr.AsByteStringC()))
- pCurPageDict->RemoveAt(cbSrcKeyStr.AsByteStringC());
- pCurPageDict->SetAt(cbSrcKeyStr.AsByteStringC(), pObj->Clone());
+ if (pCurPageDict->KeyExist(cbSrcKeyStr.AsStringC()))
+ pCurPageDict->RemoveAt(cbSrcKeyStr.AsStringC());
+ pCurPageDict->SetAt(cbSrcKeyStr.AsStringC(), pObj->Clone());
}
}
@@ -229,7 +229,7 @@ FX_BOOL CPDF_PageOrganizer::UpdateReference(CPDF_Object* pObj,
}
if (pNextObj) {
if (!UpdateReference(pNextObj, pDoc, pObjNumberMap))
- pDict->RemoveAt(key.AsByteStringC());
+ pDict->RemoveAt(key.AsStringC());
} else {
return FALSE;
}
diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
index cbf737138e..aa1a1a82c7 100644
--- a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
+++ b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
@@ -957,7 +957,7 @@ FX_BOOL CPDFXFA_Document::_ExportSubmitFile(FPDF_FILEHANDLER* pFileHandler,
ws.FromLocal("data");
CFX_ByteString content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n";
fileStream.WriteBlock((const FX_CHAR*)content, 0, content.GetLength());
- m_pXFADoc->SavePackage(ws.AsWideStringC(), &fileStream);
+ m_pXFADoc->SavePackage(ws.AsStringC(), &fileStream);
} else if (fileType == FXFA_SAVEAS_XDP) {
if (flag == 0)
flag = FXFA_CONFIG | FXFA_TEMPLATE | FXFA_LOCALESET | FXFA_DATASETS |
@@ -1018,11 +1018,11 @@ FX_BOOL CPDFXFA_Document::_ExportSubmitFile(FPDF_FILEHANDLER* pFileHandler,
if (pPrePDFObj->GetString() == "form") {
CFX_WideString ws;
ws.FromLocal("form");
- m_pXFADoc->SavePackage(ws.AsWideStringC(), &fileStream);
+ m_pXFADoc->SavePackage(ws.AsStringC(), &fileStream);
} else if (pPrePDFObj->GetString() == "datasets") {
CFX_WideString ws;
ws.FromLocal("datasets");
- m_pXFADoc->SavePackage(ws.AsWideStringC(), &fileStream);
+ m_pXFADoc->SavePackage(ws.AsStringC(), &fileStream);
} else {
// PDF,creator.
}
diff --git a/fpdfsdk/fsdk_baseannot.cpp b/fpdfsdk/fsdk_baseannot.cpp
index b3363bfbc7..68d99e8ae5 100644
--- a/fpdfsdk/fsdk_baseannot.cpp
+++ b/fpdfsdk/fsdk_baseannot.cpp
@@ -831,22 +831,22 @@ void CPDFSDK_BAAnnot::WriteAppearance(const CFX_ByteString& sAPType,
if (sAPState.IsEmpty()) {
pParentDict = pAPDict;
- pStream = pAPDict->GetStreamBy(sAPType.AsByteStringC());
+ pStream = pAPDict->GetStreamBy(sAPType.AsStringC());
} else {
- CPDF_Dictionary* pAPTypeDict = pAPDict->GetDictBy(sAPType.AsByteStringC());
+ CPDF_Dictionary* pAPTypeDict = pAPDict->GetDictBy(sAPType.AsStringC());
if (!pAPTypeDict) {
pAPTypeDict = new CPDF_Dictionary;
- pAPDict->SetAt(sAPType.AsByteStringC(), pAPTypeDict);
+ pAPDict->SetAt(sAPType.AsStringC(), pAPTypeDict);
}
pParentDict = pAPTypeDict;
- pStream = pAPTypeDict->GetStreamBy(sAPState.AsByteStringC());
+ pStream = pAPTypeDict->GetStreamBy(sAPState.AsStringC());
}
if (!pStream) {
pStream = new CPDF_Stream(nullptr, 0, nullptr);
CPDF_Document* pDoc = m_pPageView->GetPDFDocument();
int32_t objnum = pDoc->AddIndirectObject(pStream);
- pParentDict->SetAtReference(sAPType.AsByteStringC(), pDoc, objnum);
+ pParentDict->SetAtReference(sAPType.AsStringC(), pDoc, objnum);
}
CPDF_Dictionary* pStreamDict = pStream->GetDict();
diff --git a/fpdfsdk/fsdk_baseform.cpp b/fpdfsdk/fsdk_baseform.cpp
index 859b022754..bfeba0e6dd 100644
--- a/fpdfsdk/fsdk_baseform.cpp
+++ b/fpdfsdk/fsdk_baseform.cpp
@@ -64,7 +64,7 @@ CXFA_FFWidget* CPDFSDK_Widget::GetMixXFAWidget() const {
}
if (!sName.IsEmpty())
- m_hMixXFAWidget = pDocView->GetWidgetByName(sName.AsWideStringC());
+ m_hMixXFAWidget = pDocView->GetWidgetByName(sName.AsStringC());
}
}
return m_hMixXFAWidget;
@@ -80,7 +80,7 @@ CXFA_FFWidget* CPDFSDK_Widget::GetGroupMixXFAWidget() {
if (CXFA_FFDocView* pDocView = pDoc->GetXFADocView()) {
CFX_WideString sName = GetName();
if (!sName.IsEmpty())
- return pDocView->GetWidgetByName(sName.AsWideStringC());
+ return pDocView->GetWidgetByName(sName.AsStringC());
}
}
@@ -461,7 +461,7 @@ FX_BOOL CPDFSDK_Widget::IsWidgetAppearanceValid(
case FIELDTYPE_CHECKBOX:
case FIELDTYPE_RADIOBUTTON:
if (CPDF_Dictionary* pSubDict = psub->AsDictionary()) {
- return !!pSubDict->GetStreamBy(GetAppState().AsByteStringC());
+ return !!pSubDict->GetStreamBy(GetAppState().AsStringC());
}
return FALSE;
}
@@ -1808,7 +1808,7 @@ void CPDFSDK_Widget::AddImageToAppearance(const CFX_ByteString& sAPType,
ASSERT(pDoc);
CPDF_Dictionary* pAPDict = m_pAnnot->GetAnnotDict()->GetDictBy("AP");
- CPDF_Stream* pStream = pAPDict->GetStreamBy(sAPType.AsByteStringC());
+ CPDF_Stream* pStream = pAPDict->GetStreamBy(sAPType.AsStringC());
CPDF_Dictionary* pStreamDict = pStream->GetDict();
CFX_ByteString sImageAlias = "IMG";
@@ -1826,14 +1826,14 @@ void CPDFSDK_Widget::AddImageToAppearance(const CFX_ByteString& sAPType,
if (pStreamResList) {
CPDF_Dictionary* pXObject = new CPDF_Dictionary;
- pXObject->SetAtReference(sImageAlias.AsByteStringC(), pDoc, pImage);
+ pXObject->SetAtReference(sImageAlias.AsStringC(), pDoc, pImage);
pStreamResList->SetAt("XObject", pXObject);
}
}
void CPDFSDK_Widget::RemoveAppearance(const CFX_ByteString& sAPType) {
if (CPDF_Dictionary* pAPDict = m_pAnnot->GetAnnotDict()->GetDictBy("AP")) {
- pAPDict->RemoveAt(sAPType.AsByteStringC());
+ pAPDict->RemoveAt(sAPType.AsStringC());
}
}
@@ -2448,7 +2448,7 @@ FX_BOOL CPDFSDK_InterForm::ExportFieldsToFDFTextBuf(
bool bIncludeOrExclude,
CFX_ByteTextBuf& textBuf) {
std::unique_ptr<CFDF_Document> pFDF(m_pInterForm->ExportToFDF(
- m_pDocument->GetPath().AsWideStringC(), fields, bIncludeOrExclude));
+ m_pDocument->GetPath().AsStringC(), fields, bIncludeOrExclude));
return pFDF ? pFDF->WriteBuf(textBuf) : FALSE;
}
@@ -2486,8 +2486,7 @@ FX_BOOL CPDFSDK_InterForm::SubmitForm(const CFX_WideString& sDestination,
CPDFDoc_Environment* pEnv = m_pDocument->GetEnv();
CFX_WideString wsPDFFilePath = m_pDocument->GetPath();
- CFDF_Document* pFDFDoc =
- m_pInterForm->ExportToFDF(wsPDFFilePath.AsWideStringC());
+ CFDF_Document* pFDFDoc = m_pInterForm->ExportToFDF(wsPDFFilePath.AsStringC());
if (!pFDFDoc)
return FALSE;
@@ -2517,7 +2516,7 @@ FX_BOOL CPDFSDK_InterForm::SubmitForm(const CFX_WideString& sDestination,
FX_BOOL CPDFSDK_InterForm::ExportFormToFDFTextBuf(CFX_ByteTextBuf& textBuf) {
CFDF_Document* pFDF =
- m_pInterForm->ExportToFDF(m_pDocument->GetPath().AsWideStringC());
+ m_pInterForm->ExportToFDF(m_pDocument->GetPath().AsStringC());
if (!pFDF)
return FALSE;
diff --git a/fpdfsdk/fsdk_mgr.cpp b/fpdfsdk/fsdk_mgr.cpp
index e6ad18d232..3412516f65 100644
--- a/fpdfsdk/fsdk_mgr.cpp
+++ b/fpdfsdk/fsdk_mgr.cpp
@@ -186,7 +186,7 @@ FX_BOOL CFX_SystemHandler::FindNativeTrueTypeFont(
pFontMapper->LoadInstalledFonts();
for (const auto& font : pFontMapper->m_InstalledTTFonts) {
- if (font.Compare(sFontFaceName.AsByteStringC()))
+ if (font.Compare(sFontFaceName.AsStringC()))
return TRUE;
}
@@ -476,7 +476,7 @@ void CPDFSDK_Document::ProcJavascriptFun() {
CPDF_Action jsAction = docJS.GetJSAction(i, csJSName);
if (m_pEnv->GetActionHander())
m_pEnv->GetActionHander()->DoAction_JavaScript(
- jsAction, CFX_WideString::FromLocal(csJSName.AsByteStringC()), this);
+ jsAction, CFX_WideString::FromLocal(csJSName.AsStringC()), this);
}
}
diff --git a/fpdfsdk/fxedit/fxet_pageobjs.cpp b/fpdfsdk/fxedit/fxet_pageobjs.cpp
index cbe6fabcb6..a09b92f4d4 100644
--- a/fpdfsdk/fxedit/fxet_pageobjs.cpp
+++ b/fpdfsdk/fxedit/fxet_pageobjs.cpp
@@ -249,7 +249,7 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice,
sTextBuf << GetPDFWordString(pFontMap, word.nFontIndex, word.Word,
SubWord)
- .AsByteStringC();
+ .AsStringC();
} else {
DrawTextString(
pDevice, CFX_FloatPoint(word.ptWord.x + ptOffset.x,
@@ -363,7 +363,7 @@ void IFX_Edit::DrawRichEdit(CFX_RenderDevice* pDevice,
sTextBuf << GetPDFWordString(pFontMap, word.WordProps.nFontIndex,
word.Word, 0)
- .AsByteStringC();
+ .AsStringC();
if (word.WordProps.nWordStyle & PVTWORD_STYLE_UNDERLINE) {
CFX_PathData pathUnderline;
@@ -507,7 +507,7 @@ void IFX_Edit::GeneratePageObjects(
}
sTextBuf << GetPDFWordString(pFontMap, word.nFontIndex, word.Word, 0)
- .AsByteStringC();
+ .AsStringC();
oldplace = place;
}
}
@@ -580,7 +580,7 @@ void IFX_Edit::GenerateRichPageObjects(
sTextBuf << GetPDFWordString(pFontMap, word.WordProps.nFontIndex,
word.Word, 0)
- .AsByteStringC();
+ .AsStringC();
if (word.WordProps.nWordStyle & PVTWORD_STYLE_UNDERLINE) {
CFX_FloatRect rcUnderline = GetUnderLineRect(word);
diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp
index 75cd2ec251..4c361b197e 100644
--- a/fpdfsdk/javascript/Document.cpp
+++ b/fpdfsdk/javascript/Document.cpp
@@ -784,7 +784,7 @@ FX_BOOL Document::info(IJS_Context* cc,
for (const auto& it : *pDictionary) {
const CFX_ByteString& bsKey = it.first;
CPDF_Object* pValueObj = it.second;
- CFX_WideString wsKey = CFX_WideString::FromUTF8(bsKey.AsByteStringC());
+ CFX_WideString wsKey = CFX_WideString::FromUTF8(bsKey.AsStringC());
if (pValueObj->IsString() || pValueObj->IsName()) {
FXJS_PutObjectString(isolate, pObj, wsKey.c_str(),
pValueObj->GetUnicodeText().c_str());
diff --git a/fpdfsdk/javascript/PublicMethods.cpp b/fpdfsdk/javascript/PublicMethods.cpp
index d5b961d61d..eb0bd1b306 100644
--- a/fpdfsdk/javascript/PublicMethods.cpp
+++ b/fpdfsdk/javascript/PublicMethods.cpp
@@ -837,7 +837,7 @@ FX_BOOL CJS_PublicMethods::AFNumber_Format(IJS_Context* cc,
}
// for processing currency string
- Value = CFX_WideString::FromLocal(strValue.AsByteStringC());
+ Value = CFX_WideString::FromLocal(strValue.AsStringC());
std::wstring strValue2 = Value.c_str();
if (bCurrencyPrepend)
@@ -1120,7 +1120,7 @@ FX_BOOL CJS_PublicMethods::AFPercent_Format(
if (iNegative)
strValue = "-" + strValue;
strValue += "%";
- Value = CFX_WideString::FromLocal(strValue.AsByteStringC());
+ Value = CFX_WideString::FromLocal(strValue.AsStringC());
#endif
return TRUE;
}
@@ -1219,11 +1219,11 @@ double CJS_PublicMethods::MakeInterDate(CFX_WideString strValue) {
else if (sTemp.Compare(L"Dec") == 0)
nMonth = 12;
- int nDay = FX_atof(wsArray[2].AsWideStringC());
- int nHour = FX_atof(wsArray[3].AsWideStringC());
- int nMin = FX_atof(wsArray[4].AsWideStringC());
- int nSec = FX_atof(wsArray[5].AsWideStringC());
- int nYear = FX_atof(wsArray[7].AsWideStringC());
+ int nDay = FX_atof(wsArray[2].AsStringC());
+ int nHour = FX_atof(wsArray[3].AsStringC());
+ int nMin = FX_atof(wsArray[4].AsStringC());
+ int nSec = FX_atof(wsArray[5].AsStringC());
+ int nYear = FX_atof(wsArray[7].AsStringC());
double dRet = JS_MakeDate(JS_MakeDay(nYear, nMonth - 1, nDay),
JS_MakeTime(nHour, nMin, nSec, 0));
if (JS_PortIsNan(dRet))
@@ -1726,7 +1726,7 @@ FX_BOOL CJS_PublicMethods::AFSimple_Calculate(
CFX_WideString trimmed = pFormField->GetValue();
trimmed.TrimRight();
trimmed.TrimLeft();
- dTemp = FX_atof(trimmed.AsWideStringC());
+ dTemp = FX_atof(trimmed.AsStringC());
} break;
case FIELDTYPE_PUSHBUTTON: {
dTemp = 0.0;
@@ -1740,7 +1740,7 @@ FX_BOOL CJS_PublicMethods::AFSimple_Calculate(
CFX_WideString trimmed = pFormCtrl->GetExportValue();
trimmed.TrimRight();
trimmed.TrimLeft();
- dTemp = FX_atof(trimmed.AsWideStringC());
+ dTemp = FX_atof(trimmed.AsStringC());
break;
}
}
@@ -1751,7 +1751,7 @@ FX_BOOL CJS_PublicMethods::AFSimple_Calculate(
CFX_WideString trimmed = pFormField->GetValue();
trimmed.TrimRight();
trimmed.TrimLeft();
- dTemp = FX_atof(trimmed.AsWideStringC());
+ dTemp = FX_atof(trimmed.AsStringC());
}
} break;
default:
diff --git a/fpdfsdk/pdfwindow/PWL_Edit.cpp b/fpdfsdk/pdfwindow/PWL_Edit.cpp
index e836594378..f75aa53a54 100644
--- a/fpdfsdk/pdfwindow/PWL_Edit.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Edit.cpp
@@ -260,7 +260,7 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
case PBS_SOLID: {
sLine << "q\n" << GetBorderWidth() << " w\n"
<< CPWL_Utils::GetColorAppStream(GetBorderColor(), FALSE)
- .AsByteStringC()
+ .AsStringC()
<< " 2 J 0 j\n";
for (int32_t i = 1; i < nCharArray; i++) {
@@ -277,7 +277,7 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
case PBS_DASH: {
sLine << "q\n" << GetBorderWidth() << " w\n"
<< CPWL_Utils::GetColorAppStream(GetBorderColor(), FALSE)
- .AsByteStringC()
+ .AsStringC()
<< " 2 J 0 j\n"
<< "[" << GetBorderDash().nDash << " " << GetBorderDash().nGap
<< "] " << GetBorderDash().nPhase << " d\n";
@@ -315,9 +315,8 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
CPWL_Utils::GetEditSelAppStream(m_pEdit, ptOffset, &wrTemp);
if (sEditSel.GetLength() > 0)
- sText << CPWL_Utils::GetColorAppStream(PWL_DEFAULT_SELBACKCOLOR)
- .AsByteStringC()
- << sEditSel.AsByteStringC();
+ sText << CPWL_Utils::GetColorAppStream(PWL_DEFAULT_SELBACKCOLOR).AsStringC()
+ << sEditSel.AsStringC();
wrTemp = CPWL_Utils::OverlapWordRange(wrVisible, wrSelBefore);
CFX_ByteString sEditBefore = CPWL_Utils::GetEditAppStream(
@@ -325,9 +324,8 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
m_pEdit->GetPasswordChar());
if (sEditBefore.GetLength() > 0)
- sText << "BT\n"
- << CPWL_Utils::GetColorAppStream(GetTextColor()).AsByteStringC()
- << sEditBefore.AsByteStringC() << "ET\n";
+ sText << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC()
+ << sEditBefore.AsStringC() << "ET\n";
wrTemp = CPWL_Utils::OverlapWordRange(wrVisible, wrSelect);
CFX_ByteString sEditMid = CPWL_Utils::GetEditAppStream(
@@ -337,8 +335,8 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
if (sEditMid.GetLength() > 0)
sText << "BT\n"
<< CPWL_Utils::GetColorAppStream(CPWL_Color(COLORTYPE_GRAY, 1))
- .AsByteStringC()
- << sEditMid.AsByteStringC() << "ET\n";
+ .AsStringC()
+ << sEditMid.AsStringC() << "ET\n";
wrTemp = CPWL_Utils::OverlapWordRange(wrVisible, wrSelAfter);
CFX_ByteString sEditAfter = CPWL_Utils::GetEditAppStream(
@@ -346,9 +344,8 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
m_pEdit->GetPasswordChar());
if (sEditAfter.GetLength() > 0)
- sText << "BT\n"
- << CPWL_Utils::GetColorAppStream(GetTextColor()).AsByteStringC()
- << sEditAfter.AsByteStringC() << "ET\n";
+ sText << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC()
+ << sEditAfter.AsStringC() << "ET\n";
if (sText.GetLength() > 0) {
CFX_FloatRect rcClient = GetClientRect();
@@ -707,9 +704,8 @@ CFX_ByteString CPWL_Edit::GetTextAppearanceStream(
CFX_ByteString sEdit = CPWL_Utils::GetEditAppStream(m_pEdit, ptOffset);
if (sEdit.GetLength() > 0) {
- sRet << "BT\n"
- << CPWL_Utils::GetColorAppStream(GetTextColor()).AsByteStringC()
- << sEdit.AsByteStringC() << "ET\n";
+ sRet << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC()
+ << sEdit.AsStringC() << "ET\n";
}
return sRet.GetByteString();
diff --git a/fpdfsdk/pdfwindow/PWL_Icon.cpp b/fpdfsdk/pdfwindow/PWL_Icon.cpp
index 69f9e599da..bae5dc8a56 100644
--- a/fpdfsdk/pdfwindow/PWL_Icon.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Icon.cpp
@@ -42,7 +42,7 @@ CFX_ByteString CPWL_Image::GetImageAppStream() {
sAppStream << mt.GetA() << " " << mt.GetB() << " " << mt.GetC() << " "
<< mt.GetD() << " " << mt.GetE() << " " << mt.GetF() << " cm\n";
- sAppStream << "0 g 0 G 1 w /" << sAlias.AsByteStringC() << " Do\n"
+ sAppStream << "0 g 0 G 1 w /" << sAlias.AsStringC() << " Do\n"
<< "Q\n";
}
diff --git a/fpdfsdk/pdfwindow/PWL_Label.cpp b/fpdfsdk/pdfwindow/PWL_Label.cpp
index 5560b59eb1..9a1dce61d8 100644
--- a/fpdfsdk/pdfwindow/PWL_Label.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Label.cpp
@@ -119,8 +119,7 @@ CFX_FloatRect CPWL_Label::GetContentRect() const {
void CPWL_Label::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
CPWL_Wnd::GetThisAppearanceStream(sAppStream);
- sAppStream << GetTextAppearanceStream(CFX_FloatPoint(0.0f, 0.0f))
- .AsByteStringC();
+ sAppStream << GetTextAppearanceStream(CFX_FloatPoint(0.0f, 0.0f)).AsStringC();
}
CFX_ByteString CPWL_Label::GetTextAppearanceStream(
@@ -129,9 +128,8 @@ CFX_ByteString CPWL_Label::GetTextAppearanceStream(
CFX_ByteString sEdit = CPWL_Utils::GetEditAppStream(m_pEdit, ptOffset);
if (sEdit.GetLength() > 0) {
- sRet << "BT\n"
- << CPWL_Utils::GetColorAppStream(GetTextColor()).AsByteStringC()
- << sEdit.AsByteStringC() << "ET\n";
+ sRet << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC()
+ << sEdit.AsStringC() << "ET\n";
}
return sRet.GetByteString();
diff --git a/fpdfsdk/pdfwindow/PWL_ListBox.cpp b/fpdfsdk/pdfwindow/PWL_ListBox.cpp
index ccccc77dcd..d32e7c937c 100644
--- a/fpdfsdk/pdfwindow/PWL_ListBox.cpp
+++ b/fpdfsdk/pdfwindow/PWL_ListBox.cpp
@@ -120,14 +120,14 @@ void CPWL_ListBox::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
if (m_pList->IsItemSelected(i)) {
sListItems << CPWL_Utils::GetRectFillAppStream(rcItem,
PWL_DEFAULT_SELBACKCOLOR)
- .AsByteStringC();
+ .AsStringC();
CFX_ByteString sItem =
CPWL_Utils::GetEditAppStream(m_pList->GetItemEdit(i), ptOffset);
if (sItem.GetLength() > 0) {
sListItems << "BT\n"
<< CPWL_Utils::GetColorAppStream(PWL_DEFAULT_SELTEXTCOLOR)
- .AsByteStringC()
- << sItem.AsByteStringC() << "ET\n";
+ .AsStringC()
+ << sItem.AsStringC() << "ET\n";
}
} else {
CFX_ByteString sItem =
@@ -135,8 +135,8 @@ void CPWL_ListBox::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
if (sItem.GetLength() > 0) {
sListItems << "BT\n"
<< CPWL_Utils::GetColorAppStream(GetTextColor())
- .AsByteStringC()
- << sItem.AsByteStringC() << "ET\n";
+ .AsStringC()
+ << sItem.AsStringC() << "ET\n";
}
}
}
diff --git a/fpdfsdk/pdfwindow/PWL_ScrollBar.cpp b/fpdfsdk/pdfwindow/PWL_ScrollBar.cpp
index 2dfa6cfe6a..385ff44f4a 100644
--- a/fpdfsdk/pdfwindow/PWL_ScrollBar.cpp
+++ b/fpdfsdk/pdfwindow/PWL_ScrollBar.cpp
@@ -671,7 +671,7 @@ void CPWL_ScrollBar::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
sButton << "q\n";
sButton << "0 w\n"
<< CPWL_Utils::GetColorAppStream(GetBackgroundColor(), TRUE)
- .AsByteStringC();
+ .AsStringC();
sButton << rectWnd.left << " " << rectWnd.bottom << " "
<< rectWnd.right - rectWnd.left << " "
<< rectWnd.top - rectWnd.bottom << " re b Q\n";
diff --git a/fpdfsdk/pdfwindow/PWL_Signature.cpp b/fpdfsdk/pdfwindow/PWL_Signature.cpp
index 6dd2ea1b30..c737998f26 100644
--- a/fpdfsdk/pdfwindow/PWL_Signature.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Signature.cpp
@@ -42,7 +42,7 @@ void CPWL_Signature_Image::DrawThisAppearance(CFX_RenderDevice* pDevice,
void CPWL_Signature_Image::GetThisAppearanceStream(
CFX_ByteTextBuf& sAppStream) {
- sAppStream << CPWL_Image::GetImageAppStream().AsByteStringC();
+ sAppStream << CPWL_Image::GetImageAppStream().AsStringC();
}
void CPWL_Signature_Image::GetScale(FX_FLOAT& fHScale, FX_FLOAT& fVScale) {
diff --git a/testing/libfuzzer/pdf_fm2js_fuzzer.cc b/testing/libfuzzer/pdf_fm2js_fuzzer.cc
index c3e51cf28e..c1f2de0962 100644
--- a/testing/libfuzzer/pdf_fm2js_fuzzer.cc
+++ b/testing/libfuzzer/pdf_fm2js_fuzzer.cc
@@ -16,7 +16,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
CFX_WideString input = CFX_WideString::FromUTF8(
CFX_ByteStringC(data, static_cast<FX_STRSIZE>(size)));
CXFA_FMProgram program;
- if (program.Init(input.AsWideStringC()) || program.ParseProgram())
+ if (program.Init(input.AsStringC()) || program.ParseProgram())
return 0;
CFX_WideTextBuf js;
diff --git a/xfa/fee/fde_txtedtengine.cpp b/xfa/fee/fde_txtedtengine.cpp
index 5cdb55cfaf..ee07790b75 100644
--- a/xfa/fee/fde_txtedtengine.cpp
+++ b/xfa/fee/fde_txtedtengine.cpp
@@ -391,7 +391,7 @@ int32_t CFDE_TxtEdtEngine::Insert(int32_t nStart,
new CFDE_TxtEdtDoRecord_Insert(this, m_nCaret, lpBuffer, nLength);
CFX_ByteString bsDoRecord;
pRecord->Serialize(bsDoRecord);
- m_Param.pEventSink->On_AddDoRecord(this, bsDoRecord.AsByteStringC());
+ m_Param.pEventSink->On_AddDoRecord(this, bsDoRecord.AsStringC());
pRecord->Release();
}
GetText(m_ChangeInfo.wsPrevText, 0);
@@ -454,7 +454,7 @@ int32_t CFDE_TxtEdtEngine::Delete(int32_t nStart, FX_BOOL bBackspace) {
new CFDE_TxtEdtDoRecord_DeleteRange(this, nStart, m_nCaret, wsRange);
CFX_ByteString bsDoRecord;
pRecord->Serialize(bsDoRecord);
- m_Param.pEventSink->On_AddDoRecord(this, bsDoRecord.AsByteStringC());
+ m_Param.pEventSink->On_AddDoRecord(this, bsDoRecord.AsStringC());
pRecord->Release();
}
m_ChangeInfo.nChangeType = FDE_TXTEDT_TEXTCHANGE_TYPE_Delete;
@@ -944,7 +944,7 @@ void CFDE_TxtEdtEngine::DeleteRange_DoRecord(int32_t nStart,
this, nStart, m_nCaret, wsRange, bSel);
CFX_ByteString bsDoRecord;
pRecord->Serialize(bsDoRecord);
- m_Param.pEventSink->On_AddDoRecord(this, bsDoRecord.AsByteStringC());
+ m_Param.pEventSink->On_AddDoRecord(this, bsDoRecord.AsStringC());
pRecord->Release();
}
m_ChangeInfo.nChangeType = FDE_TXTEDT_TEXTCHANGE_TYPE_Delete;
diff --git a/xfa/fgas/font/fgas_gefont.cpp b/xfa/fgas/font/fgas_gefont.cpp
index 8652c742fc..0ef80a3075 100644
--- a/xfa/fgas/font/fgas_gefont.cpp
+++ b/xfa/fgas/font/fgas_gefont.cpp
@@ -347,11 +347,10 @@ uint8_t CFX_GEFont::GetCharSet() const {
void CFX_GEFont::GetFamilyName(CFX_WideString& wsFamily) const {
if (!m_pFont->GetSubstFont() ||
m_pFont->GetSubstFont()->m_Family.GetLength() == 0) {
- wsFamily =
- CFX_WideString::FromLocal(m_pFont->GetFamilyName().AsByteStringC());
+ wsFamily = CFX_WideString::FromLocal(m_pFont->GetFamilyName().AsStringC());
} else {
wsFamily = CFX_WideString::FromLocal(
- m_pFont->GetSubstFont()->m_Family.AsByteStringC());
+ m_pFont->GetSubstFont()->m_Family.AsStringC());
}
}
void CFX_GEFont::GetPsName(CFX_WideString& wsName) const {
diff --git a/xfa/fgas/font/fgas_stdfontmgr.cpp b/xfa/fgas/font/fgas_stdfontmgr.cpp
index 2b403e8ee8..37c9e78c3c 100644
--- a/xfa/fgas/font/fgas_stdfontmgr.cpp
+++ b/xfa/fgas/font/fgas_stdfontmgr.cpp
@@ -561,8 +561,7 @@ FX_POSITION CFX_FontSourceEnum_File::GetStartPosition(void* pUserData) {
}
IFX_FileAccess* CFX_FontSourceEnum_File::GetNext(FX_POSITION& pos,
void* pUserData) {
- IFX_FileAccess* pAccess =
- FX_CreateDefaultFileAccess(m_wsNext.AsWideStringC());
+ IFX_FileAccess* pAccess = FX_CreateDefaultFileAccess(m_wsNext.AsStringC());
m_wsNext = GetNextFile().UTF8Decode();
pos = 0 != m_wsNext.GetLength() ? pAccess : NULL;
return (IFX_FileAccess*)pAccess;
diff --git a/xfa/fgas/localization/fgas_locale.cpp b/xfa/fgas/localization/fgas_locale.cpp
index f91bc1b78f..5f7074fc1c 100644
--- a/xfa/fgas/localization/fgas_locale.cpp
+++ b/xfa/fgas/localization/fgas_locale.cpp
@@ -111,12 +111,12 @@ void CFX_Locale::GetNumbericSymbol(FX_LOCALENUMSYMBOL eType,
CFX_ByteString bsSpace;
CFX_WideString wsName = gs_LocalNumberSymbols[eType];
CXML_Element* pNumberSymbols =
- m_pElement->GetElement(bsSpace.AsByteStringC(), "numberSymbols");
+ m_pElement->GetElement(bsSpace.AsStringC(), "numberSymbols");
if (!pNumberSymbols) {
return;
}
- wsNumSymbol = FX_GetXMLContent(bsSpace.AsByteStringC(), pNumberSymbols,
- "numberSymbol", wsName.AsWideStringC());
+ wsNumSymbol = FX_GetXMLContent(bsSpace.AsStringC(), pNumberSymbols,
+ "numberSymbol", wsName.AsStringC());
}
void CFX_Locale::GetDateTimeSymbols(CFX_WideString& wsDtSymbol) const {
if (!m_pElement) {
@@ -124,7 +124,7 @@ void CFX_Locale::GetDateTimeSymbols(CFX_WideString& wsDtSymbol) const {
}
CFX_ByteString bsSpace;
CXML_Element* pNumberSymbols =
- m_pElement->GetElement(bsSpace.AsByteStringC(), "dateTimeSymbols");
+ m_pElement->GetElement(bsSpace.AsStringC(), "dateTimeSymbols");
if (!pNumberSymbols) {
return;
}
@@ -138,22 +138,22 @@ static void FX_GetCalendarSymbol(CXML_Element* pXmlElement,
CFX_ByteString bsSpace;
CFX_ByteString pstrSymbolNames = symbol_type + "Names";
CXML_Element* pChild =
- pXmlElement->GetElement(bsSpace.AsByteStringC(), "calendarSymbols");
+ pXmlElement->GetElement(bsSpace.AsStringC(), "calendarSymbols");
if (!pChild) {
return;
}
- CXML_Element* pSymbolNames = pChild->GetElement(
- bsSpace.AsByteStringC(), pstrSymbolNames.AsByteStringC());
+ CXML_Element* pSymbolNames =
+ pChild->GetElement(bsSpace.AsStringC(), pstrSymbolNames.AsStringC());
if (!pSymbolNames) {
return;
}
if (pSymbolNames->GetAttrInteger("abbr") != bAbbr) {
- pSymbolNames = pChild->GetElement(bsSpace.AsByteStringC(),
- pstrSymbolNames.AsByteStringC(), 1);
+ pSymbolNames =
+ pChild->GetElement(bsSpace.AsStringC(), pstrSymbolNames.AsStringC(), 1);
}
if (pSymbolNames && pSymbolNames->GetAttrInteger("abbr") == bAbbr) {
CXML_Element* pSymbolName = pSymbolNames->GetElement(
- bsSpace.AsByteStringC(), symbol_type.AsByteStringC(), index);
+ bsSpace.AsStringC(), symbol_type.AsStringC(), index);
if (pSymbolName) {
wsName = pSymbolName->GetContent(0);
}
@@ -232,13 +232,13 @@ static void FX_GetPattern(CXML_Element* pXmlElement,
CFX_WideString& wsPattern) {
CFX_ByteString bsSpace;
CXML_Element* pDatePatterns = pXmlElement->GetElement(
- bsSpace.AsByteStringC(), (bsCategory + "s").AsByteStringC());
+ bsSpace.AsStringC(), (bsCategory + "s").AsStringC());
if (!pDatePatterns) {
return;
}
- wsPattern = FX_GetXMLContent(bsSpace.AsByteStringC(), pDatePatterns,
- bsCategory.AsByteStringC(),
- wsSubCategory.AsWideStringC());
+ wsPattern =
+ FX_GetXMLContent(bsSpace.AsStringC(), pDatePatterns,
+ bsCategory.AsStringC(), wsSubCategory.AsStringC());
}
static void FX_GetDateTimePattern(CXML_Element* pXmlElement,
const CFX_ByteString& bsCategory,
@@ -693,7 +693,7 @@ IFX_Locale* CFX_FormatString::GetTextFormat(const CFX_WideString& wsPattern,
while (ccf < iLenf && pStr[ccf] != ')') {
wsLCID += pStr[ccf++];
}
- pLocale = GetPatternLocale(wsLCID.AsWideStringC());
+ pLocale = GetPatternLocale(wsLCID.AsStringC());
} else if (pStr[ccf] == '{') {
bBrackOpen = TRUE;
break;
@@ -752,7 +752,7 @@ IFX_Locale* CFX_FormatString::GetNumericFormat(const CFX_WideString& wsPattern,
while (ccf < iLenf && pStr[ccf] != ')') {
wsLCID += pStr[ccf++];
}
- pLocale = GetPatternLocale(wsLCID.AsWideStringC());
+ pLocale = GetPatternLocale(wsLCID.AsStringC());
} else if (pStr[ccf] == '{') {
bBrackOpen = TRUE;
break;
@@ -2157,7 +2157,7 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum,
}
}
if (iExponent || bHavePercentSymbol) {
- CFX_Decimal decimal = CFX_Decimal(wsValue.AsWideStringC());
+ CFX_Decimal decimal = CFX_Decimal(wsValue.AsStringC());
if (iExponent) {
decimal = decimal * CFX_Decimal(FXSYS_pow(10, (FX_FLOAT)iExponent));
}
@@ -2229,7 +2229,7 @@ FX_DATETIMETYPE CFX_FormatString::GetDateTimeFormat(
while (ccf < iLenf && pStr[ccf] != ')') {
wsLCID += pStr[ccf++];
}
- pLocale = GetPatternLocale(wsLCID.AsWideStringC());
+ pLocale = GetPatternLocale(wsLCID.AsStringC());
} else if (pStr[ccf] == '{') {
bBraceOpen = TRUE;
break;
@@ -2927,7 +2927,7 @@ FX_BOOL CFX_FormatString::FormatStrNum(const CFX_WideStringC& wsInputNum,
if (wsSrcNum.IsEmpty() || wsSrcNum[0] == '.') {
wsSrcNum.Insert(0, '0');
}
- CFX_Decimal decimal = CFX_Decimal(wsSrcNum.AsWideStringC());
+ CFX_Decimal decimal = CFX_Decimal(wsSrcNum.AsStringC());
if (dwNumStyle & FX_NUMSTYLE_Percent) {
decimal = decimal * CFX_Decimal(100);
wsSrcNum = decimal;
@@ -3755,7 +3755,7 @@ FX_BOOL CFX_FormatString::FormatNum(const CFX_WideString& wsSrcNum,
if (wsSrcNum.IsEmpty() || wsPattern.IsEmpty()) {
return FALSE;
}
- return FormatStrNum(wsSrcNum.AsWideStringC(), wsPattern, wsOutput);
+ return FormatStrNum(wsSrcNum.AsStringC(), wsPattern, wsOutput);
}
FX_BOOL CFX_FormatString::FormatNum(FX_FLOAT fNum,
const CFX_WideString& wsPattern,
@@ -4257,13 +4257,13 @@ FX_BOOL CFX_FormatString::FormatDateTime(const CFX_WideString& wsSrcDateTime,
if (eCategory == FX_DATETIMETYPE_Date) {
FX_DateFromCanonical(wsSrcDateTime, dt);
} else if (eCategory == FX_DATETIMETYPE_Time) {
- FX_TimeFromCanonical(wsSrcDateTime.AsWideStringC(), dt, pLocale);
+ FX_TimeFromCanonical(wsSrcDateTime.AsStringC(), dt, pLocale);
}
} else {
FX_DateFromCanonical(wsSrcDateTime.Left(iT), dt);
FX_TimeFromCanonical(
- wsSrcDateTime.Right(wsSrcDateTime.GetLength() - iT - 1).AsWideStringC(),
- dt, pLocale);
+ wsSrcDateTime.Right(wsSrcDateTime.GetLength() - iT - 1).AsStringC(), dt,
+ pLocale);
}
return FX_FormatDateTime(dt, wsDatePattern, wsTimePattern,
eCategory != FX_DATETIMETYPE_TimeDate, pLocale,
@@ -4301,8 +4301,7 @@ FX_BOOL CFX_FormatString::FormatDateTime(const CFX_WideString& wsSrcDateTime,
return FX_FormatDateTime(dt, wsDatePattern, wsTimePattern, TRUE, pLocale,
wsOutput);
} else if (eCategory == FX_DATETIMETYPE_Time &&
- FX_TimeFromCanonical(wsSrcDateTime.AsWideStringC(), dt,
- pLocale)) {
+ FX_TimeFromCanonical(wsSrcDateTime.AsStringC(), dt, pLocale)) {
return FX_FormatDateTime(dt, wsDatePattern, wsTimePattern, TRUE, pLocale,
wsOutput);
}
@@ -4739,7 +4738,7 @@ CFX_Decimal::CFX_Decimal(const CFX_WideStringC& strObj) {
}
CFX_Decimal::CFX_Decimal(const CFX_ByteStringC& strObj) {
- *this = CFX_Decimal(CFX_WideString::FromLocal(strObj).AsWideStringC());
+ *this = CFX_Decimal(CFX_WideString::FromLocal(strObj).AsStringC());
}
CFX_Decimal::operator CFX_WideString() const {
diff --git a/xfa/fwl/basewidget/fwl_barcodeimp.cpp b/xfa/fwl/basewidget/fwl_barcodeimp.cpp
index 610233e84e..0ab2e1ed74 100644
--- a/xfa/fwl/basewidget/fwl_barcodeimp.cpp
+++ b/xfa/fwl/basewidget/fwl_barcodeimp.cpp
@@ -170,7 +170,7 @@ void CFWL_BarcodeImp::GenerateBarcodeImageCache() {
m_pBarcodeEngine->SetTruncated(pData->GetTruncated());
}
int32_t errorCode = 0;
- m_dwStatus = m_pBarcodeEngine->Encode(wsText.AsWideStringC(), TRUE, errorCode)
+ m_dwStatus = m_pBarcodeEngine->Encode(wsText.AsStringC(), TRUE, errorCode)
? XFA_BCS_EncodeSuccess
: 0;
}
diff --git a/xfa/fwl/basewidget/fwl_editimp.cpp b/xfa/fwl/basewidget/fwl_editimp.cpp
index b05bc2ae9d..95cf273ec2 100644
--- a/xfa/fwl/basewidget/fwl_editimp.cpp
+++ b/xfa/fwl/basewidget/fwl_editimp.cpp
@@ -423,7 +423,7 @@ FX_BOOL CFWL_EditImp::ReplaceSpellCheckWord(CFX_PointF pointf,
pBuffer[i] = bsReplace[i];
}
wsDest.ReleaseBuffer(nDestLen);
- Replace(nWordStart, nWordCount, wsDest.AsWideStringC());
+ Replace(nWordStart, nWordCount, wsDest.AsStringC());
return TRUE;
}
void CFWL_EditImp::DrawSpellCheck(CFX_Graphics* pGraphics,
@@ -734,14 +734,14 @@ FX_BOOL CFWL_EditImp::Undo() {
return FALSE;
}
CFX_ByteString bsRecord = m_RecordArr[m_iCurRecord--];
- return Undo(bsRecord.AsByteStringC());
+ return Undo(bsRecord.AsStringC());
}
FX_BOOL CFWL_EditImp::Redo() {
if (!CanRedo()) {
return FALSE;
}
CFX_ByteString bsRecord = m_RecordArr[++m_iCurRecord];
- return Redo(bsRecord.AsByteStringC());
+ return Redo(bsRecord.AsStringC());
}
FX_BOOL CFWL_EditImp::CanUndo() {
return m_iCurRecord >= 0;
diff --git a/xfa/fwl/core/fwl_formimp.cpp b/xfa/fwl/core/fwl_formimp.cpp
index 5a5cc5e59b..14f3b33c46 100644
--- a/xfa/fwl/core/fwl_formimp.cpp
+++ b/xfa/fwl/core/fwl_formimp.cpp
@@ -822,7 +822,7 @@ void CFWL_FormImp::UpdateCaption() {
return;
CFX_WideString text;
pData->GetCaption(m_pInterface, text);
- pWidgetMgr->SetWidgetCaption_Native(m_pInterface, text.AsWideStringC());
+ pWidgetMgr->SetWidgetCaption_Native(m_pInterface, text.AsStringC());
}
void CFWL_FormImp::DoWidthLimit(FX_FLOAT& fLeft,
FX_FLOAT& fWidth,
diff --git a/xfa/fxbarcode/BC_UtilCodingConvert.cpp b/xfa/fxbarcode/BC_UtilCodingConvert.cpp
index 118e45e95d..73475751f6 100644
--- a/xfa/fxbarcode/BC_UtilCodingConvert.cpp
+++ b/xfa/fxbarcode/BC_UtilCodingConvert.cpp
@@ -17,13 +17,13 @@ void CBC_UtilCodingConvert::UnicodeToLocale(const CFX_WideString& src,
void CBC_UtilCodingConvert::LocaleToUtf8(const CFX_ByteString& src,
CFX_ByteString& dst) {
- CFX_WideString unicode = CFX_WideString::FromLocal(src.AsByteStringC());
+ CFX_WideString unicode = CFX_WideString::FromLocal(src.AsStringC());
dst = unicode.UTF8Encode();
}
void CBC_UtilCodingConvert::LocaleToUtf8(const CFX_ByteString& src,
CFX_ByteArray& dst) {
- CFX_WideString unicode = CFX_WideString::FromLocal(src.AsByteStringC());
+ CFX_WideString unicode = CFX_WideString::FromLocal(src.AsStringC());
CFX_ByteString utf8 = unicode.UTF8Encode();
for (int32_t i = 0; i < utf8.GetLength(); i++) {
dst.Add(utf8[i]);
@@ -36,7 +36,7 @@ void CBC_UtilCodingConvert::Utf8ToLocale(const CFX_ByteArray& src,
for (int32_t i = 0; i < src.GetSize(); i++) {
utf8 += src[i];
}
- CFX_WideString unicode = CFX_WideString::FromUTF8(utf8.AsByteStringC());
+ CFX_WideString unicode = CFX_WideString::FromUTF8(utf8.AsStringC());
dst = CFX_ByteString::FromUnicode(unicode);
}
diff --git a/xfa/fxbarcode/cbc_codabar.cpp b/xfa/fxbarcode/cbc_codabar.cpp
index ae2b1f2ba2..fad026ddb7 100644
--- a/xfa/fxbarcode/cbc_codabar.cpp
+++ b/xfa/fxbarcode/cbc_codabar.cpp
@@ -77,8 +77,7 @@ FX_BOOL CBC_Codabar::Encode(const CFX_WideStringC& contents,
->Encode(byteString, format, outWidth, outHeight, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderResult(filtercontents.AsWideStringC(), data, outWidth, isDevice,
- e);
+ ->RenderResult(filtercontents.AsStringC(), data, outWidth, isDevice, e);
FX_Free(data);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
@@ -89,9 +88,9 @@ FX_BOOL CBC_Codabar::RenderDevice(CFX_RenderDevice* device,
int32_t& e) {
CFX_WideString renderCon =
((CBC_OnedCodaBarWriter*)m_pBCWriter)
- ->encodedContents(m_renderContents.AsWideStringC());
+ ->encodedContents(m_renderContents.AsStringC());
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderDeviceResult(device, matirx, renderCon.AsWideStringC(), e);
+ ->RenderDeviceResult(device, matirx, renderCon.AsStringC(), e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
}
@@ -99,9 +98,9 @@ FX_BOOL CBC_Codabar::RenderDevice(CFX_RenderDevice* device,
FX_BOOL CBC_Codabar::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
CFX_WideString renderCon =
((CBC_OnedCodaBarWriter*)m_pBCWriter)
- ->encodedContents(m_renderContents.AsWideStringC());
+ ->encodedContents(m_renderContents.AsStringC());
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderBitmapResult(pOutBitmap, renderCon.AsWideStringC(), e);
+ ->RenderBitmapResult(pOutBitmap, renderCon.AsStringC(), e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
}
@@ -120,5 +119,5 @@ CFX_WideString CBC_Codabar::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString str = m_pBCReader->Decode(&bitmap, 0, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
- return CFX_WideString::FromUTF8(str.AsByteStringC());
+ return CFX_WideString::FromUTF8(str.AsStringC());
}
diff --git a/xfa/fxbarcode/cbc_code128.cpp b/xfa/fxbarcode/cbc_code128.cpp
index 93417b4e16..98490f2e60 100644
--- a/xfa/fxbarcode/cbc_code128.cpp
+++ b/xfa/fxbarcode/cbc_code128.cpp
@@ -59,15 +59,14 @@ FX_BOOL CBC_Code128::Encode(const CFX_WideStringC& contents,
content += '0';
}
CFX_WideString encodeContents = ((CBC_OnedCode128Writer*)m_pBCWriter)
- ->FilterContents(content.AsWideStringC());
+ ->FilterContents(content.AsStringC());
m_renderContents = encodeContents;
CFX_ByteString byteString = encodeContents.UTF8Encode();
uint8_t* data = static_cast<CBC_OnedCode128Writer*>(m_pBCWriter)
->Encode(byteString, format, outWidth, outHeight, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderResult(encodeContents.AsWideStringC(), data, outWidth, isDevice,
- e);
+ ->RenderResult(encodeContents.AsStringC(), data, outWidth, isDevice, e);
FX_Free(data);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
@@ -77,14 +76,14 @@ FX_BOOL CBC_Code128::RenderDevice(CFX_RenderDevice* device,
const CFX_Matrix* matirx,
int32_t& e) {
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderDeviceResult(device, matirx, m_renderContents.AsWideStringC(), e);
+ ->RenderDeviceResult(device, matirx, m_renderContents.AsStringC(), e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
}
FX_BOOL CBC_Code128::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderBitmapResult(pOutBitmap, m_renderContents.AsWideStringC(), e);
+ ->RenderBitmapResult(pOutBitmap, m_renderContents.AsStringC(), e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
}
@@ -103,5 +102,5 @@ CFX_WideString CBC_Code128::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString str = m_pBCReader->Decode(&bitmap, 0, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
- return CFX_WideString::FromUTF8(str.AsByteStringC());
+ return CFX_WideString::FromUTF8(str.AsStringC());
}
diff --git a/xfa/fxbarcode/cbc_code39.cpp b/xfa/fxbarcode/cbc_code39.cpp
index 69549406e3..627ea4d173 100644
--- a/xfa/fxbarcode/cbc_code39.cpp
+++ b/xfa/fxbarcode/cbc_code39.cpp
@@ -68,8 +68,7 @@ FX_BOOL CBC_Code39::Encode(const CFX_WideStringC& contents,
->Encode(byteString, format, outWidth, outHeight, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderResult(renderContents.AsWideStringC(), data, outWidth, isDevice,
- e);
+ ->RenderResult(renderContents.AsStringC(), data, outWidth, isDevice, e);
FX_Free(data);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
@@ -80,9 +79,9 @@ FX_BOOL CBC_Code39::RenderDevice(CFX_RenderDevice* device,
int32_t& e) {
CFX_WideString renderCon =
((CBC_OnedCode39Writer*)m_pBCWriter)
- ->encodedContents(m_renderContents.AsWideStringC(), e);
+ ->encodedContents(m_renderContents.AsStringC(), e);
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderDeviceResult(device, matirx, renderCon.AsWideStringC(), e);
+ ->RenderDeviceResult(device, matirx, renderCon.AsStringC(), e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
}
@@ -90,9 +89,9 @@ FX_BOOL CBC_Code39::RenderDevice(CFX_RenderDevice* device,
FX_BOOL CBC_Code39::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
CFX_WideString renderCon =
((CBC_OnedCode39Writer*)m_pBCWriter)
- ->encodedContents(m_renderContents.AsWideStringC(), e);
+ ->encodedContents(m_renderContents.AsStringC(), e);
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderBitmapResult(pOutBitmap, renderCon.AsWideStringC(), e);
+ ->RenderBitmapResult(pOutBitmap, renderCon.AsStringC(), e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
}
@@ -111,7 +110,7 @@ CFX_WideString CBC_Code39::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString str = m_pBCReader->Decode(&bitmap, 0, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
- return CFX_WideString::FromUTF8(str.AsByteStringC());
+ return CFX_WideString::FromUTF8(str.AsStringC());
}
FX_BOOL CBC_Code39::SetTextLocation(BC_TEXT_LOC location) {
diff --git a/xfa/fxbarcode/cbc_datamatrix.cpp b/xfa/fxbarcode/cbc_datamatrix.cpp
index 6eb2e34af4..c23aa33fc3 100644
--- a/xfa/fxbarcode/cbc_datamatrix.cpp
+++ b/xfa/fxbarcode/cbc_datamatrix.cpp
@@ -79,5 +79,5 @@ CFX_WideString CBC_DataMatrix::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString retStr = m_pBCReader->Decode(&bitmap, 0, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
- return CFX_WideString::FromUTF8(retStr.AsByteStringC());
+ return CFX_WideString::FromUTF8(retStr.AsStringC());
}
diff --git a/xfa/fxbarcode/cbc_ean13.cpp b/xfa/fxbarcode/cbc_ean13.cpp
index bb578b286e..c51e262128 100644
--- a/xfa/fxbarcode/cbc_ean13.cpp
+++ b/xfa/fxbarcode/cbc_ean13.cpp
@@ -74,8 +74,7 @@ FX_BOOL CBC_EAN13::Encode(const CFX_WideStringC& contents,
->Encode(byteString, format, outWidth, outHeight, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderResult(encodeContents.AsWideStringC(), data, outWidth, isDevice,
- e);
+ ->RenderResult(encodeContents.AsStringC(), data, outWidth, isDevice, e);
FX_Free(data);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
@@ -85,14 +84,14 @@ FX_BOOL CBC_EAN13::RenderDevice(CFX_RenderDevice* device,
const CFX_Matrix* matirx,
int32_t& e) {
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderDeviceResult(device, matirx, m_renderContents.AsWideStringC(), e);
+ ->RenderDeviceResult(device, matirx, m_renderContents.AsStringC(), e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
}
FX_BOOL CBC_EAN13::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderBitmapResult(pOutBitmap, m_renderContents.AsWideStringC(), e);
+ ->RenderBitmapResult(pOutBitmap, m_renderContents.AsStringC(), e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
}
@@ -111,5 +110,5 @@ CFX_WideString CBC_EAN13::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString str = m_pBCReader->Decode(&bitmap, 0, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
- return CFX_WideString::FromUTF8(str.AsByteStringC());
+ return CFX_WideString::FromUTF8(str.AsStringC());
}
diff --git a/xfa/fxbarcode/cbc_ean8.cpp b/xfa/fxbarcode/cbc_ean8.cpp
index 3316963ea0..1128b8469c 100644
--- a/xfa/fxbarcode/cbc_ean8.cpp
+++ b/xfa/fxbarcode/cbc_ean8.cpp
@@ -73,8 +73,7 @@ FX_BOOL CBC_EAN8::Encode(const CFX_WideStringC& contents,
->Encode(byteString, format, outWidth, outHeight, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderResult(encodeContents.AsWideStringC(), data, outWidth, isDevice,
- e);
+ ->RenderResult(encodeContents.AsStringC(), data, outWidth, isDevice, e);
FX_Free(data);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
@@ -84,14 +83,14 @@ FX_BOOL CBC_EAN8::RenderDevice(CFX_RenderDevice* device,
const CFX_Matrix* matirx,
int32_t& e) {
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderDeviceResult(device, matirx, m_renderContents.AsWideStringC(), e);
+ ->RenderDeviceResult(device, matirx, m_renderContents.AsStringC(), e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
}
FX_BOOL CBC_EAN8::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderBitmapResult(pOutBitmap, m_renderContents.AsWideStringC(), e);
+ ->RenderBitmapResult(pOutBitmap, m_renderContents.AsStringC(), e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
}
@@ -110,5 +109,5 @@ CFX_WideString CBC_EAN8::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString str = m_pBCReader->Decode(&bitmap, 0, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
- return CFX_WideString::FromUTF8(str.AsByteStringC());
+ return CFX_WideString::FromUTF8(str.AsStringC());
}
diff --git a/xfa/fxbarcode/cbc_pdf417i.cpp b/xfa/fxbarcode/cbc_pdf417i.cpp
index 1f9f1ff257..7cb8275bc4 100644
--- a/xfa/fxbarcode/cbc_pdf417i.cpp
+++ b/xfa/fxbarcode/cbc_pdf417i.cpp
@@ -87,5 +87,5 @@ CFX_WideString CBC_PDF417I::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString bytestring = m_pBCReader->Decode(&bitmap, 0, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
- return CFX_WideString::FromUTF8(bytestring.AsByteStringC());
+ return CFX_WideString::FromUTF8(bytestring.AsStringC());
}
diff --git a/xfa/fxbarcode/cbc_qrcode.cpp b/xfa/fxbarcode/cbc_qrcode.cpp
index f0261d79b6..41c252e180 100644
--- a/xfa/fxbarcode/cbc_qrcode.cpp
+++ b/xfa/fxbarcode/cbc_qrcode.cpp
@@ -97,5 +97,5 @@ CFX_WideString CBC_QRCode::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString retStr = m_pBCReader->Decode(&bitmap, 0, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
- return CFX_WideString::FromUTF8(retStr.AsByteStringC());
+ return CFX_WideString::FromUTF8(retStr.AsStringC());
}
diff --git a/xfa/fxbarcode/cbc_upca.cpp b/xfa/fxbarcode/cbc_upca.cpp
index a770bb4e20..38d481946e 100644
--- a/xfa/fxbarcode/cbc_upca.cpp
+++ b/xfa/fxbarcode/cbc_upca.cpp
@@ -76,8 +76,7 @@ FX_BOOL CBC_UPCA::Encode(const CFX_WideStringC& contents,
->Encode(byteString, format, outWidth, outHeight, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderResult(encodeContents.AsWideStringC(), data, outWidth, isDevice,
- e);
+ ->RenderResult(encodeContents.AsStringC(), data, outWidth, isDevice, e);
FX_Free(data);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
@@ -87,14 +86,14 @@ FX_BOOL CBC_UPCA::RenderDevice(CFX_RenderDevice* device,
const CFX_Matrix* matirx,
int32_t& e) {
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderDeviceResult(device, matirx, m_renderContents.AsWideStringC(), e);
+ ->RenderDeviceResult(device, matirx, m_renderContents.AsStringC(), e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
}
FX_BOOL CBC_UPCA::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderBitmapResult(pOutBitmap, m_renderContents.AsWideStringC(), e);
+ ->RenderBitmapResult(pOutBitmap, m_renderContents.AsStringC(), e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
}
@@ -113,5 +112,5 @@ CFX_WideString CBC_UPCA::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString str = m_pBCReader->Decode(&bitmap, 0, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
- return CFX_WideString::FromUTF8(str.AsByteStringC());
+ return CFX_WideString::FromUTF8(str.AsStringC());
}
diff --git a/xfa/fxbarcode/oned/BC_OnedCodaBarReader.cpp b/xfa/fxbarcode/oned/BC_OnedCodaBarReader.cpp
index f767ffa169..f3c39f2491 100644
--- a/xfa/fxbarcode/oned/BC_OnedCodaBarReader.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedCodaBarReader.cpp
@@ -107,7 +107,7 @@ CFX_ByteString CBC_OnedCodaBarReader::DecodeRow(int32_t rowNumber,
}
if (result.GetLength() < 5) {
int32_t index =
- temp.Find(result.Mid(1, result.GetLength() - 1).AsByteStringC());
+ temp.Find(result.Mid(1, result.GetLength() - 1).AsStringC());
if (index == len - (result.GetLength() - 1)) {
e = BCExceptionNotFound;
return "";
diff --git a/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.cpp b/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.cpp
index 3fbeb1c318..2d9c2e5ad8 100644
--- a/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.cpp
@@ -226,6 +226,6 @@ void CBC_OnedCodaBarWriter::RenderResult(const CFX_WideStringC& contents,
int32_t codeLength,
FX_BOOL isDevice,
int32_t& e) {
- CBC_OneDimWriter::RenderResult(encodedContents(contents).AsWideStringC(),
- code, codeLength, isDevice, e);
+ CBC_OneDimWriter::RenderResult(encodedContents(contents).AsStringC(), code,
+ codeLength, isDevice, e);
}
diff --git a/xfa/fxbarcode/oned/BC_OnedCode39Writer.cpp b/xfa/fxbarcode/oned/BC_OnedCode39Writer.cpp
index 0a69f04a4f..cdbc59ce5b 100644
--- a/xfa/fxbarcode/oned/BC_OnedCode39Writer.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedCode39Writer.cpp
@@ -360,6 +360,6 @@ void CBC_OnedCode39Writer::RenderResult(const CFX_WideStringC& contents,
int32_t& e) {
CFX_WideString encodedCon = encodedContents(contents, e);
BC_EXCEPTION_CHECK_ReturnVoid(e);
- CBC_OneDimWriter::RenderResult(encodedCon.AsWideStringC(), code, codeLength,
+ CBC_OneDimWriter::RenderResult(encodedCon.AsStringC(), code, codeLength,
isDevice, e);
}
diff --git a/xfa/fxfa/app/xfa_checksum.cpp b/xfa/fxfa/app/xfa_checksum.cpp
index 39bdb64e47..69cb8350a3 100644
--- a/xfa/fxfa/app/xfa_checksum.cpp
+++ b/xfa/fxfa/app/xfa_checksum.cpp
@@ -73,7 +73,7 @@ void CXFA_SAXReaderHandler::OnTagClose(void* pTag, uint32_t dwEndPos) {
if (pSAXContext->m_eNode == FX_SAXNODE_Instruction) {
textBuf << "?>";
} else if (pSAXContext->m_eNode == FX_SAXNODE_Tag) {
- textBuf << "></" << pSAXContext->m_bsTagName.AsByteStringC() << ">";
+ textBuf << "></" << pSAXContext->m_bsTagName.AsStringC() << ">";
}
UpdateChecksum(FALSE);
}
diff --git a/xfa/fxfa/app/xfa_ffbarcode.cpp b/xfa/fxfa/app/xfa_ffbarcode.cpp
index 5987627f7f..567882d546 100644
--- a/xfa/fxfa/app/xfa_ffbarcode.cpp
+++ b/xfa/fxfa/app/xfa_ffbarcode.cpp
@@ -167,7 +167,7 @@ void CXFA_FFBarcode::UpdateWidgetProperty() {
CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget;
CFX_WideString wsType = GetDataAcc()->GetBarcodeType();
XFA_LPCBARCODETYPEENUMINFO pBarcodeTypeInfo =
- XFA_GetBarcodeTypeByName(wsType.AsWideStringC());
+ XFA_GetBarcodeTypeByName(wsType.AsStringC());
pBarCodeWidget->SetType(pBarcodeTypeInfo->eBCType);
CXFA_WidgetAcc* pAcc = GetDataAcc();
int32_t intVal;
diff --git a/xfa/fxfa/app/xfa_ffchoicelist.cpp b/xfa/fxfa/app/xfa_ffchoicelist.cpp
index 41564c6b04..fe7943cfb1 100644
--- a/xfa/fxfa/app/xfa_ffchoicelist.cpp
+++ b/xfa/fxfa/app/xfa_ffchoicelist.cpp
@@ -44,7 +44,7 @@ FX_BOOL CXFA_FFListBox::LoadWidget() {
m_pDataAcc->GetChoiceListItems(wsLabelArray, FALSE);
int32_t iItems = wsLabelArray.GetSize();
for (int32_t i = 0; i < iItems; i++) {
- pListBox->AddString(wsLabelArray[i].AsWideStringC());
+ pListBox->AddString(wsLabelArray[i].AsStringC());
}
uint32_t dwExtendedStyle = FWL_STYLEEXT_LTB_ShowScrollBarFocus;
if (m_pDataAcc->GetChoiceListOpen() == XFA_ATTRIBUTEENUM_MultiSelect) {
@@ -166,7 +166,7 @@ void CXFA_FFListBox::SetItemState(int32_t nIndex, FX_BOOL bSelected) {
void CXFA_FFListBox::InsertItem(const CFX_WideStringC& wsLabel,
int32_t nIndex) {
CFX_WideString wsTemp(wsLabel);
- ((CFWL_ListBox*)m_pNormalWidget)->AddString(wsTemp.AsWideStringC());
+ ((CFWL_ListBox*)m_pNormalWidget)->AddString(wsTemp.AsStringC());
m_pNormalWidget->Update();
AddInvalidateRect();
}
@@ -240,7 +240,7 @@ FX_BOOL CXFA_FFComboBox::LoadWidget() {
m_pDataAcc->GetChoiceListItems(wsLabelArray, FALSE);
int32_t iItems = wsLabelArray.GetSize();
for (int32_t i = 0; i < iItems; i++) {
- pComboBox->AddString(wsLabelArray[i].AsWideStringC());
+ pComboBox->AddString(wsLabelArray[i].AsStringC());
}
CFX_Int32Array iSelArray;
m_pDataAcc->GetSelectedItems(iSelArray);
@@ -250,7 +250,7 @@ FX_BOOL CXFA_FFComboBox::LoadWidget() {
} else {
CFX_WideString wsText;
m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Raw);
- pComboBox->SetEditText(wsText.AsWideStringC());
+ pComboBox->SetEditText(wsText.AsStringC());
}
UpdateWidgetProperty();
m_pNormalWidget->UnlockUpdate();
@@ -382,7 +382,7 @@ FX_BOOL CXFA_FFComboBox::UpdateFWLData() {
CFX_WideString wsText;
((CFWL_ComboBox*)m_pNormalWidget)->SetCurSel(-1);
m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Raw);
- ((CFWL_ComboBox*)m_pNormalWidget)->SetEditText(wsText.AsWideStringC());
+ ((CFWL_ComboBox*)m_pNormalWidget)->SetEditText(wsText.AsStringC());
}
m_pNormalWidget->Update();
return TRUE;
diff --git a/xfa/fxfa/app/xfa_ffdocview.cpp b/xfa/fxfa/app/xfa_ffdocview.cpp
index b9b3b9a4a8..79bba442ad 100644
--- a/xfa/fxfa/app/xfa_ffdocview.cpp
+++ b/xfa/fxfa/app/xfa_ffdocview.cpp
@@ -163,7 +163,7 @@ void CXFA_FFDocView::ShowNullTestMsg() {
}
CFX_WideString wsTitle;
pAppProvider->LoadString(XFA_IDS_AppName, wsTitle);
- pAppProvider->MsgBox(wsMsg.AsWideStringC(), wsTitle.AsWideStringC(),
+ pAppProvider->MsgBox(wsMsg.AsStringC(), wsTitle.AsStringC(),
XFA_MBICON_Status, XFA_MB_OK);
}
m_arrNullTestMsg.RemoveAll();
@@ -518,7 +518,7 @@ CXFA_WidgetAcc* CXFA_FFDocView::GetWidgetAccByName(
}
XFA_RESOLVENODE_RS resoveNodeRS;
int32_t iRet = pScriptContext->ResolveObjects(
- refNode, wsExpression.AsWideStringC(), resoveNodeRS, dwStyle);
+ refNode, wsExpression.AsStringC(), resoveNodeRS, dwStyle);
if (iRet < 1) {
return NULL;
}
diff --git a/xfa/fxfa/app/xfa_fffield.cpp b/xfa/fxfa/app/xfa_fffield.cpp
index dc1cebbf66..e91dd96b95 100644
--- a/xfa/fxfa/app/xfa_fffield.cpp
+++ b/xfa/fxfa/app/xfa_fffield.cpp
@@ -731,9 +731,8 @@ int32_t CXFA_FFField::CalculateWidgetAcc(CXFA_WidgetAcc* pAcc) {
wsMessage += wsWarning;
CFX_WideString wsTitle;
pAppProvider->LoadString(XFA_IDS_CalcOverride, wsTitle);
- pAppProvider->MsgBox(wsMessage.AsWideStringC(),
- wsTitle.AsWideStringC(), XFA_MBICON_Warning,
- XFA_MB_OK);
+ pAppProvider->MsgBox(wsMessage.AsStringC(), wsTitle.AsStringC(),
+ XFA_MBICON_Warning, XFA_MB_OK);
}
}
return 0;
@@ -764,8 +763,8 @@ int32_t CXFA_FFField::CalculateWidgetAcc(CXFA_WidgetAcc* pAcc) {
wsMessage += wsWarning;
CFX_WideString wsTitle;
pAppProvider->LoadString(XFA_IDS_CalcOverride, wsTitle);
- if (pAppProvider->MsgBox(wsMessage.AsWideStringC(),
- wsTitle.AsWideStringC(), XFA_MBICON_Warning,
+ if (pAppProvider->MsgBox(wsMessage.AsStringC(), wsTitle.AsStringC(),
+ XFA_MBICON_Warning,
XFA_MB_YesNo) == XFA_IDYes) {
pAcc->GetNode()->SetFlag(XFA_NODEFLAG_UserInteractive, TRUE, FALSE);
return 1;
diff --git a/xfa/fxfa/app/xfa_ffimageedit.cpp b/xfa/fxfa/app/xfa_ffimageedit.cpp
index 343293d64c..344dfcddd9 100644
--- a/xfa/fxfa/app/xfa_ffimageedit.cpp
+++ b/xfa/fxfa/app/xfa_ffimageedit.cpp
@@ -108,8 +108,8 @@ FX_BOOL CXFA_FFImageEdit::OnLButtonDown(uint32_t dwFlags,
CFX_WideString wsFilter;
pAppProvider->LoadString(XFA_IDS_ImageFilter, wsFilter);
CFX_WideStringArray wsPathArray;
- pAppProvider->ShowFileDialog(wsTitle.AsWideStringC(),
- wsFilter.AsWideStringC(), wsPathArray);
+ pAppProvider->ShowFileDialog(wsTitle.AsStringC(), wsFilter.AsStringC(),
+ wsPathArray);
int32_t iSize = wsPathArray.GetSize();
if (iSize < 1) {
return TRUE;
@@ -148,8 +148,8 @@ FX_BOOL CXFA_FFImageEdit::OnLButtonDown(uint32_t dwFlags,
m_pDataAcc->SetImageEditImage(NULL);
pFileRead->Release();
}
- m_pDataAcc->SetImageEdit(wsContentType.AsWideStringC(), CFX_WideStringC(),
- wsImage.AsWideStringC());
+ m_pDataAcc->SetImageEdit(wsContentType.AsStringC(), CFX_WideStringC(),
+ wsImage.AsStringC());
m_pDataAcc->LoadImageEditImage();
AddInvalidateRect();
m_pDocView->SetChangeMark();
diff --git a/xfa/fxfa/app/xfa_ffpageview.cpp b/xfa/fxfa/app/xfa_ffpageview.cpp
index 54e315f466..62474b3e38 100644
--- a/xfa/fxfa/app/xfa_ffpageview.cpp
+++ b/xfa/fxfa/app/xfa_ffpageview.cpp
@@ -270,7 +270,7 @@ CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::GetTraverseWidget(
if (pTraverse) {
CFX_WideString wsTraverseWidgetName;
if (pTraverse->GetAttribute(XFA_ATTRIBUTE_Ref, wsTraverseWidgetName)) {
- return FindWidgetByName(wsTraverseWidgetName.AsWideStringC(), pWidget);
+ return FindWidgetByName(wsTraverseWidgetName.AsStringC(), pWidget);
}
}
}
diff --git a/xfa/fxfa/app/xfa_fftextedit.cpp b/xfa/fxfa/app/xfa_fftextedit.cpp
index 69d445e2ab..982ee00896 100644
--- a/xfa/fxfa/app/xfa_fftextedit.cpp
+++ b/xfa/fxfa/app/xfa_fftextedit.cpp
@@ -201,7 +201,7 @@ void CXFA_FFTextEdit::ValidateNumberField(const CFX_WideString& wsText) {
pAcc->GetNode()->GetSOMExpression(wsSomField);
wsMessage.Format(wsError, (const FX_WCHAR*)wsText,
(const FX_WCHAR*)wsSomField);
- pAppProvider->MsgBox(wsMessage.AsWideStringC(), wsTitle.AsWideStringC(),
+ pAppProvider->MsgBox(wsMessage.AsStringC(), wsTitle.AsStringC(),
XFA_MBICON_Error, XFA_MB_OK);
}
}
@@ -421,12 +421,12 @@ FWL_ERR CXFA_FFTextEdit::OnProcessEvent(CFWL_Event* pEvent) {
case FWL_EVTHASH_EDT_CheckWord: {
CFX_WideString wstr(L"FWL_EVENT_DTP_SelectChanged");
CFWL_EvtEdtCheckWord* event = (CFWL_EvtEdtCheckWord*)pEvent;
- event->bCheckWord = CheckWord(event->bsWord.AsByteStringC());
+ event->bCheckWord = CheckWord(event->bsWord.AsStringC());
break;
}
case FWL_EVTHASH_EDT_GetSuggestWords: {
CFWL_EvtEdtGetSuggestWords* event = (CFWL_EvtEdtGetSuggestWords*)pEvent;
- event->bSuggestWords = GetSuggestWords(event->bsWord.AsByteStringC(),
+ event->bSuggestWords = GetSuggestWords(event->bsWord.AsStringC(),
event->bsArraySuggestWords);
break;
}
@@ -594,7 +594,7 @@ FX_BOOL CXFA_FFDateTimeEdit::LoadWidget() {
m_pNormalWidget->LockUpdate();
CFX_WideString wsText;
m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Display);
- pWidget->SetEditText(wsText.AsWideStringC());
+ pWidget->SetEditText(wsText.AsStringC());
if (CXFA_Value value = m_pDataAcc->GetFormValue()) {
switch (value.GetChildValueClassID()) {
case XFA_ELEMENT_Date: {
@@ -694,7 +694,7 @@ FX_BOOL CXFA_FFDateTimeEdit::UpdateFWLData() {
}
CFX_WideString wsText;
m_pDataAcc->GetValue(wsText, eType);
- ((CFWL_DateTimePicker*)m_pNormalWidget)->SetEditText(wsText.AsWideStringC());
+ ((CFWL_DateTimePicker*)m_pNormalWidget)->SetEditText(wsText.AsStringC());
if (IsFocused() && !wsText.IsEmpty()) {
CXFA_LocaleValue lcValue = XFA_GetLocaleValue(m_pDataAcc);
CFX_Unitime date = lcValue.GetDate();
@@ -777,7 +777,7 @@ void CXFA_FFDateTimeEdit::OnSelectChanged(IFWL_Widget* pWidget,
date.FormatPatterns(wsDate, wsPicture, m_pDataAcc->GetLocal(),
XFA_VALUEPICTURE_Edit);
CFWL_DateTimePicker* pDateTime = (CFWL_DateTimePicker*)m_pNormalWidget;
- pDateTime->SetEditText(wsDate.AsWideStringC());
+ pDateTime->SetEditText(wsDate.AsStringC());
pDateTime->Update();
GetDoc()->GetDocProvider()->SetFocusWidget(GetDoc(), NULL);
CXFA_EventParam eParam;
diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp
index c484b9afa8..0192c8b46c 100644
--- a/xfa/fxfa/app/xfa_ffwidget.cpp
+++ b/xfa/fxfa/app/xfa_ffwidget.cpp
@@ -1004,7 +1004,7 @@ CFX_DIBitmap* XFA_LoadImageData(CXFA_FFDoc* pDoc,
if (wsURL.Left(7) != FX_WSTRC(L"http://") &&
wsURL.Left(6) != FX_WSTRC(L"ftp://")) {
CFX_DIBitmap* pBitmap =
- pDoc->GetPDFNamedImage(wsURL.AsWideStringC(), iImageXDpi, iImageYDpi);
+ pDoc->GetPDFNamedImage(wsURL.AsStringC(), iImageXDpi, iImageYDpi);
if (pBitmap) {
bNameImage = TRUE;
return pBitmap;
diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
index 073fbfe8aa..4e7da92370 100644
--- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
@@ -229,8 +229,8 @@ void CXFA_WidgetAcc::ResetData() {
image.GetContentType(wsContentType);
image.GetHref(wsHref);
}
- SetImageEdit(wsContentType.AsWideStringC(), wsHref.AsWideStringC(),
- wsValue.AsWideStringC());
+ SetImageEdit(wsContentType.AsStringC(), wsHref.AsStringC(),
+ wsValue.AsStringC());
} break;
case XFA_ELEMENT_ExclGroup: {
CXFA_Node* pNextChild = m_pNode->GetNodeItem(
@@ -412,13 +412,12 @@ void CXFA_WidgetAcc::ProcessScriptTestValidate(CXFA_Validate validate,
GetValidateMessage(pAppProvider, wsScriptMsg, FALSE, bVersionFlag);
}
if (bVersionFlag) {
- pAppProvider->MsgBox(wsScriptMsg.AsWideStringC(),
- wsTitle.AsWideStringC(), XFA_MBICON_Warning,
- XFA_MB_OK);
+ pAppProvider->MsgBox(wsScriptMsg.AsStringC(), wsTitle.AsStringC(),
+ XFA_MBICON_Warning, XFA_MB_OK);
return;
}
- if (pAppProvider->MsgBox(wsScriptMsg.AsWideStringC(),
- wsTitle.AsWideStringC(), XFA_MBICON_Warning,
+ if (pAppProvider->MsgBox(wsScriptMsg.AsStringC(), wsTitle.AsStringC(),
+ XFA_MBICON_Warning,
XFA_MB_YesNo) == XFA_IDYes) {
GetNode()->SetFlag(XFA_NODEFLAG_UserInteractive, TRUE, FALSE);
}
@@ -426,9 +425,8 @@ void CXFA_WidgetAcc::ProcessScriptTestValidate(CXFA_Validate validate,
if (wsScriptMsg.IsEmpty()) {
GetValidateMessage(pAppProvider, wsScriptMsg, TRUE, bVersionFlag);
}
- pAppProvider->MsgBox(wsScriptMsg.AsWideStringC(),
- wsTitle.AsWideStringC(), XFA_MBICON_Error,
- XFA_MB_OK);
+ pAppProvider->MsgBox(wsScriptMsg.AsStringC(), wsTitle.AsStringC(),
+ XFA_MBICON_Error, XFA_MB_OK);
}
}
}
@@ -461,9 +459,8 @@ int32_t CXFA_WidgetAcc::ProcessFormatTestValidate(CXFA_Validate validate,
if (wsFormatMsg.IsEmpty()) {
GetValidateMessage(pAppProvider, wsFormatMsg, TRUE, bVersionFlag);
}
- pAppProvider->MsgBox(wsFormatMsg.AsWideStringC(),
- wsTitle.AsWideStringC(), XFA_MBICON_Error,
- XFA_MB_OK);
+ pAppProvider->MsgBox(wsFormatMsg.AsStringC(), wsTitle.AsStringC(),
+ XFA_MBICON_Error, XFA_MB_OK);
return XFA_EVENTERROR_Success;
}
if (GetNode()->HasFlag(XFA_NODEFLAG_UserInteractive)) {
@@ -473,14 +470,12 @@ int32_t CXFA_WidgetAcc::ProcessFormatTestValidate(CXFA_Validate validate,
GetValidateMessage(pAppProvider, wsFormatMsg, FALSE, bVersionFlag);
}
if (bVersionFlag) {
- pAppProvider->MsgBox(wsFormatMsg.AsWideStringC(),
- wsTitle.AsWideStringC(), XFA_MBICON_Warning,
- XFA_MB_OK);
+ pAppProvider->MsgBox(wsFormatMsg.AsStringC(), wsTitle.AsStringC(),
+ XFA_MBICON_Warning, XFA_MB_OK);
return XFA_EVENTERROR_Success;
}
- if (pAppProvider->MsgBox(wsFormatMsg.AsWideStringC(),
- wsTitle.AsWideStringC(), XFA_MBICON_Warning,
- XFA_MB_YesNo) == XFA_IDYes) {
+ if (pAppProvider->MsgBox(wsFormatMsg.AsStringC(), wsTitle.AsStringC(),
+ XFA_MBICON_Warning, XFA_MB_YesNo) == XFA_IDYes) {
GetNode()->SetFlag(XFA_NODEFLAG_UserInteractive, TRUE, FALSE);
}
return XFA_EVENTERROR_Success;
@@ -535,7 +530,7 @@ int32_t CXFA_WidgetAcc::ProcessNullTestValidate(CXFA_Validate validate,
pAppProvider->LoadString(XFA_IDS_ValidateNullError, wsError);
wsNullMsg.Format(wsError, (const FX_WCHAR*)wsCaptionName);
}
- pAppProvider->MsgBox(wsNullMsg.AsWideStringC(), wsTitle.AsWideStringC(),
+ pAppProvider->MsgBox(wsNullMsg.AsStringC(), wsTitle.AsStringC(),
XFA_MBICON_Status, XFA_MB_OK);
return XFA_EVENTERROR_Error;
}
@@ -550,9 +545,8 @@ int32_t CXFA_WidgetAcc::ProcessNullTestValidate(CXFA_Validate validate,
wsNullMsg.Format(wsWarning, (const FX_WCHAR*)wsCaptionName,
(const FX_WCHAR*)wsCaptionName);
}
- if (pAppProvider->MsgBox(wsNullMsg.AsWideStringC(),
- wsTitle.AsWideStringC(), XFA_MBICON_Warning,
- XFA_MB_YesNo) == XFA_IDYes) {
+ if (pAppProvider->MsgBox(wsNullMsg.AsStringC(), wsTitle.AsStringC(),
+ XFA_MBICON_Warning, XFA_MB_YesNo) == XFA_IDYes) {
GetNode()->SetFlag(XFA_NODEFLAG_UserInteractive, TRUE, FALSE);
}
return XFA_EVENTERROR_Error;
@@ -684,7 +678,7 @@ int32_t CXFA_WidgetAcc::ExecuteScript(CXFA_Script script,
++m_nRecursionDepth;
FX_BOOL bRet =
pContext->RunScript((XFA_SCRIPTLANGTYPE)eScriptType,
- wsExpression.AsWideStringC(), hRetValue, m_pNode);
+ wsExpression.AsStringC(), hRetValue, m_pNode);
--m_nRecursionDepth;
int32_t iRet = XFA_EVENTERROR_Error;
if (bRet) {
@@ -696,7 +690,7 @@ int32_t CXFA_WidgetAcc::ExecuteScript(CXFA_Script script,
CFX_ByteString bsString;
FXJSE_Value_ToUTF8String(hRetValue, bsString);
pEventParam->m_wsResult =
- CFX_WideString::FromUTF8(bsString.AsByteStringC());
+ CFX_WideString::FromUTF8(bsString.AsStringC());
}
iRet = XFA_EVENTERROR_Success;
} else {
@@ -1712,12 +1706,12 @@ FX_BOOL CXFA_TextProvider::GetEmbbedObj(FX_BOOL bURI,
CXFA_Node* pIDNode = NULL;
CXFA_WidgetAcc* pEmbAcc = NULL;
if (pParent) {
- pIDNode = pDocument->GetNodeByID(pParent, wsAttr.AsWideStringC());
+ pIDNode = pDocument->GetNodeByID(pParent, wsAttr.AsStringC());
}
if (!pIDNode) {
pIDNode = pDocument->GetNodeByID(
ToNode(pDocument->GetXFAObject(XFA_HASHCODE_Form)),
- wsAttr.AsWideStringC());
+ wsAttr.AsStringC());
}
if (pIDNode) {
pEmbAcc = (CXFA_WidgetAcc*)pIDNode->GetWidgetData();
diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp
index c2de4115cb..542fec57a3 100644
--- a/xfa/fxfa/app/xfa_fontmgr.cpp
+++ b/xfa/fxfa/app/xfa_fontmgr.cpp
@@ -1766,7 +1766,7 @@ IFX_Font* CXFA_DefFontMgr::GetFont(CXFA_FFDoc* hDoc,
IFX_Font* pFont = pFDEFontMgr->LoadFont(wsFontName, dwFontStyles, wCodePage);
if (!pFont) {
const XFA_FONTINFO* pCurFont =
- XFA_GetFontINFOByFontName(wsFontName.AsWideStringC());
+ XFA_GetFontINFOByFontName(wsFontName.AsStringC());
if (pCurFont && pCurFont->pReplaceFont) {
uint32_t dwStyle = 0;
if (dwFontStyles & FX_FONTSTYLE_Bold) {
@@ -1862,7 +1862,7 @@ IFX_Font* CXFA_PDFFontMgr::FindFont(CFX_ByteString strPsName,
for (const auto& it : *pFontSetDict) {
const CFX_ByteString& key = it.first;
CPDF_Object* pObj = it.second;
- if (!PsNameMatchDRFontName(strPsName.AsByteStringC(), bBold, bItalic, key,
+ if (!PsNameMatchDRFontName(strPsName.AsStringC(), bBold, bItalic, key,
bStrictMatch)) {
continue;
}
@@ -2030,8 +2030,7 @@ IFX_Font* CXFA_FontMgr::GetFont(CXFA_FFDoc* hDoc,
CPDF_Font* pPDFFont = NULL;
IFX_Font* pFont = NULL;
if (pMgr) {
- pFont =
- pMgr->GetFont(wsEnglishName.AsWideStringC(), dwFontStyles, &pPDFFont);
+ pFont = pMgr->GetFont(wsEnglishName.AsStringC(), dwFontStyles, &pPDFFont);
if (pFont)
return pFont;
}
@@ -2040,8 +2039,8 @@ IFX_Font* CXFA_FontMgr::GetFont(CXFA_FFDoc* hDoc,
}
if (!pFont && pMgr) {
pPDFFont = NULL;
- pFont = pMgr->GetFont(wsEnglishName.AsWideStringC(), dwFontStyles,
- &pPDFFont, FALSE);
+ pFont = pMgr->GetFont(wsEnglishName.AsStringC(), dwFontStyles, &pPDFFont,
+ FALSE);
if (pFont)
return pFont;
}
diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp
index 7db66fdf88..55220e2f5a 100644
--- a/xfa/fxfa/app/xfa_textlayout.cpp
+++ b/xfa/fxfa/app/xfa_textlayout.cpp
@@ -326,7 +326,7 @@ int32_t CXFA_TextParser::GetVAlgin(CXFA_TextProvider* pTextProvider) const {
FX_FLOAT CXFA_TextParser::GetTabInterval(IFDE_CSSComputedStyle* pStyle) const {
CFX_WideString wsValue;
if (pStyle && pStyle->GetCustomStyle(FX_WSTRC(L"tab-interval"), wsValue))
- return CXFA_Measurement(wsValue.AsWideStringC()).ToUnit(XFA_UNIT_Pt);
+ return CXFA_Measurement(wsValue.AsStringC()).ToUnit(XFA_UNIT_Pt);
return 36;
}
diff --git a/xfa/fxfa/app/xfa_textlayout.h b/xfa/fxfa/app/xfa_textlayout.h
index 65e0c038c0..5d3ce16a49 100644
--- a/xfa/fxfa/app/xfa_textlayout.h
+++ b/xfa/fxfa/app/xfa_textlayout.h
@@ -27,7 +27,7 @@ class CXFA_CSSTagProvider : public IFDE_CSSTagProvider {
virtual ~CXFA_CSSTagProvider();
// Note: |this| must outlive the use of GetTagName()'s result.
- virtual CFX_WideStringC GetTagName() { return m_wsTagName.AsWideStringC(); }
+ virtual CFX_WideStringC GetTagName() { return m_wsTagName.AsStringC(); }
virtual FX_POSITION GetFirstAttribute() {
return m_Attributes.GetStartPosition();
}
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
index 9646756f6e..e687ee53b8 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
@@ -315,8 +315,8 @@ void CXFA_FM2JSContext::Avg(FXJSE_HOBJECT hThis,
FXJSE_HVALUE newPropertyValue = FXJSE_Value_Create(hruntime);
for (int32_t j = 2; j < iLength; j++) {
FXJSE_Value_GetObjectPropByIdx(argValue, j, jsObjectValue);
- FXJSE_Value_GetObjectProp(
- jsObjectValue, propertyStr.AsByteStringC(), newPropertyValue);
+ FXJSE_Value_GetObjectProp(jsObjectValue, propertyStr.AsStringC(),
+ newPropertyValue);
if (!FXJSE_Value_IsNull(newPropertyValue)) {
dSum += HValueToDouble(hThis, newPropertyValue);
uCount++;
@@ -398,8 +398,8 @@ void CXFA_FM2JSContext::Count(FXJSE_HOBJECT hThis,
FXJSE_Value_ToUTF8String(propertyValue, propertyStr);
for (int32_t i = 2; i < iLength; i++) {
FXJSE_Value_GetObjectPropByIdx(argValue, i, jsObjectValue);
- FXJSE_Value_GetObjectProp(
- jsObjectValue, propertyStr.AsByteStringC(), newPropertyValue);
+ FXJSE_Value_GetObjectProp(jsObjectValue, propertyStr.AsStringC(),
+ newPropertyValue);
uCount += (FXJSE_Value_IsNull(newPropertyValue) ? 0 : 1);
}
}
@@ -490,8 +490,8 @@ void CXFA_FM2JSContext::Max(FXJSE_HOBJECT hThis,
FXJSE_Value_ToUTF8String(propertyValue, propertyStr);
for (int32_t i = 2; i < iLength; i++) {
FXJSE_Value_GetObjectPropByIdx(argValue, i, jsObjectValue);
- FXJSE_Value_GetObjectProp(
- jsObjectValue, propertyStr.AsByteStringC(), newPropertyValue);
+ FXJSE_Value_GetObjectProp(jsObjectValue, propertyStr.AsStringC(),
+ newPropertyValue);
if (!FXJSE_Value_IsNull(newPropertyValue)) {
uCount++;
if (uCount == 1) {
@@ -593,8 +593,8 @@ void CXFA_FM2JSContext::Min(FXJSE_HOBJECT hThis,
FXJSE_Value_ToUTF8String(propertyValue, propertyStr);
for (int32_t i = 2; i < iLength; i++) {
FXJSE_Value_GetObjectPropByIdx(argValue, i, jsObjectValue);
- FXJSE_Value_GetObjectProp(
- jsObjectValue, propertyStr.AsByteStringC(), newPropertyValue);
+ FXJSE_Value_GetObjectProp(jsObjectValue, propertyStr.AsStringC(),
+ newPropertyValue);
if (!FXJSE_Value_IsNull(newPropertyValue)) {
uCount++;
if (uCount == 1) {
@@ -679,8 +679,8 @@ void CXFA_FM2JSContext::Mod(FXJSE_HOBJECT hThis,
CFX_ByteString propertyStr;
FXJSE_Value_ToUTF8String(propertyValue, propertyStr);
FXJSE_HVALUE newPropertyValue = FXJSE_Value_Create(hruntime);
- FXJSE_Value_GetObjectProp(
- jsObjectValue, propertyStr.AsByteStringC(), newPropertyValue);
+ FXJSE_Value_GetObjectProp(jsObjectValue, propertyStr.AsStringC(),
+ newPropertyValue);
dDividend = HValueToDouble(hThis, newPropertyValue);
FXJSE_Value_Release(newPropertyValue);
}
@@ -708,8 +708,8 @@ void CXFA_FM2JSContext::Mod(FXJSE_HOBJECT hThis,
CFX_ByteString propertyStr;
FXJSE_Value_ToUTF8String(propertyValue, propertyStr);
FXJSE_HVALUE newPropertyValue = FXJSE_Value_Create(hruntime);
- FXJSE_Value_GetObjectProp(
- jsObjectValue, propertyStr.AsByteStringC(), newPropertyValue);
+ FXJSE_Value_GetObjectProp(jsObjectValue, propertyStr.AsStringC(),
+ newPropertyValue);
dDividor = HValueToDouble(hThis, newPropertyValue);
FXJSE_Value_Release(newPropertyValue);
}
@@ -761,7 +761,7 @@ void CXFA_FM2JSContext::Round(FXJSE_HOBJECT hThis,
CFX_ByteString propertyStr;
FXJSE_Value_ToUTF8String(propertyValue, propertyStr);
FXJSE_HVALUE newPropertyValue = FXJSE_Value_Create(hruntime);
- FXJSE_Value_GetObjectProp(jsObjectValue, propertyStr.AsByteStringC(),
+ FXJSE_Value_GetObjectProp(jsObjectValue, propertyStr.AsStringC(),
newPropertyValue);
dValue = HValueToDouble(hThis, newPropertyValue);
FXJSE_Value_Release(newPropertyValue);
@@ -774,7 +774,7 @@ void CXFA_FM2JSContext::Round(FXJSE_HOBJECT hThis,
CFX_Decimal decimalValue((FX_FLOAT)dValue, uPrecision);
CFX_WideString wsValue = decimalValue;
FXJSE_Value_SetUTF8String(args.GetReturnValue(),
- wsValue.UTF8Encode().AsByteStringC());
+ wsValue.UTF8Encode().AsStringC());
}
FXJSE_Value_Release(argOne);
} else if (argc == 2) {
@@ -795,7 +795,7 @@ void CXFA_FM2JSContext::Round(FXJSE_HOBJECT hThis,
CFX_ByteString propertyStr;
FXJSE_Value_ToUTF8String(propertyValue, propertyStr);
FXJSE_HVALUE newPropertyValue = FXJSE_Value_Create(hruntime);
- FXJSE_Value_GetObjectProp(jsObjectValue, propertyStr.AsByteStringC(),
+ FXJSE_Value_GetObjectProp(jsObjectValue, propertyStr.AsStringC(),
newPropertyValue);
dValue = HValueToDouble(hThis, newPropertyValue);
FXJSE_Value_Release(newPropertyValue);
@@ -817,7 +817,7 @@ void CXFA_FM2JSContext::Round(FXJSE_HOBJECT hThis,
CFX_ByteString propertyStr;
FXJSE_Value_ToUTF8String(propertyValue, propertyStr);
FXJSE_HVALUE newPropertyValue = FXJSE_Value_Create(hruntime);
- FXJSE_Value_GetObjectProp(jsObjectValue, propertyStr.AsByteStringC(),
+ FXJSE_Value_GetObjectProp(jsObjectValue, propertyStr.AsStringC(),
newPropertyValue);
dPrecision = HValueToDouble(hThis, newPropertyValue);
FXJSE_Value_Release(newPropertyValue);
@@ -837,7 +837,7 @@ void CXFA_FM2JSContext::Round(FXJSE_HOBJECT hThis,
CFX_Decimal decimalValue((FX_FLOAT)dValue, uPrecision);
CFX_WideString wsValue = decimalValue;
FXJSE_Value_SetUTF8String(args.GetReturnValue(),
- wsValue.UTF8Encode().AsByteStringC());
+ wsValue.UTF8Encode().AsStringC());
}
FXJSE_Value_Release(argOne);
FXJSE_Value_Release(argTwo);
@@ -886,8 +886,8 @@ void CXFA_FM2JSContext::Sum(FXJSE_HOBJECT hThis,
FXJSE_Value_ToUTF8String(propertyValue, propertyStr);
for (int32_t j = 2; j < iLength; j++) {
FXJSE_Value_GetObjectPropByIdx(argValue, j, jsObjectValue);
- FXJSE_Value_GetObjectProp(
- jsObjectValue, propertyStr.AsByteStringC(), newPropertyValue);
+ FXJSE_Value_GetObjectProp(jsObjectValue, propertyStr.AsStringC(),
+ newPropertyValue);
if (!FXJSE_Value_IsNull(newPropertyValue)) {
dSum += HValueToDouble(hThis, newPropertyValue);
uCount++;
@@ -937,7 +937,7 @@ void CXFA_FM2JSContext::Date(FXJSE_HOBJECT hThis,
bufferMon.Format("%02d", pTmStruct->tm_mon + 1);
bufferDay.Format("%02d", pTmStruct->tm_mday);
CFX_ByteString bufferCurrent = bufferYear + bufferMon + bufferDay;
- int32_t dDays = DateString2Num(bufferCurrent.AsByteStringC());
+ int32_t dDays = DateString2Num(bufferCurrent.AsStringC());
FXJSE_Value_SetInteger(args.GetReturnValue(), dDays);
} else {
CXFA_FM2JSContext* pContext =
@@ -981,12 +981,12 @@ void CXFA_FM2JSContext::Date2Num(FXJSE_HOBJECT hThis,
}
if (!bFlags) {
CFX_ByteString szIsoDateString;
- FX_BOOL bRet = Local2IsoDate(
- hThis, dateString.AsByteStringC(), formatString.AsByteStringC(),
- localString.AsByteStringC(), szIsoDateString);
+ FX_BOOL bRet =
+ Local2IsoDate(hThis, dateString.AsStringC(), formatString.AsStringC(),
+ localString.AsStringC(), szIsoDateString);
if (bRet) {
FXJSE_Value_SetInteger(args.GetReturnValue(),
- DateString2Num(szIsoDateString.AsByteStringC()));
+ DateString2Num(szIsoDateString.AsStringC()));
} else {
FXJSE_Value_SetInteger(args.GetReturnValue(), 0);
}
@@ -1037,12 +1037,11 @@ void CXFA_FM2JSContext::DateFmt(FXJSE_HOBJECT hThis,
}
if (!bFlags) {
CFX_ByteString formatStr;
- GetStandardDateFormat(hThis, iStyle, szLocal.AsByteStringC(), formatStr);
+ GetStandardDateFormat(hThis, iStyle, szLocal.AsStringC(), formatStr);
if (formatStr.IsEmpty()) {
formatStr = "";
}
- FXJSE_Value_SetUTF8String(args.GetReturnValue(),
- formatStr.AsByteStringC());
+ FXJSE_Value_SetUTF8String(args.GetReturnValue(), formatStr.AsStringC());
} else {
FXJSE_Value_SetNull(args.GetReturnValue());
}
@@ -1069,7 +1068,7 @@ void CXFA_FM2JSContext::IsoDate2Num(FXJSE_HOBJECT hThis,
} else {
CFX_ByteString szArgString;
HValueToUTF8String(argOne, szArgString);
- int32_t dDays = DateString2Num(szArgString.AsByteStringC());
+ int32_t dDays = DateString2Num(szArgString.AsStringC());
FXJSE_Value_SetInteger(args.GetReturnValue(), (int32_t)dDays);
}
FXJSE_Value_Release(argOne);
@@ -1102,7 +1101,7 @@ void CXFA_FM2JSContext::IsoTime2Num(FXJSE_HOBJECT hThis,
return;
}
CXFA_LocaleValue timeValue(
- XFA_VT_TIME, CFX_WideString::FromUTF8(szArgString.AsByteStringC()),
+ XFA_VT_TIME, CFX_WideString::FromUTF8(szArgString.AsStringC()),
(CXFA_LocaleMgr*)pMgr);
if (timeValue.IsValid()) {
CFX_Unitime uniTime = timeValue.GetTime();
@@ -1167,13 +1166,11 @@ void CXFA_FM2JSContext::LocalDateFmt(FXJSE_HOBJECT hThis,
}
if (!bFlags) {
CFX_ByteString formatStr;
- GetLocalDateFormat(hThis, iStyle, szLocal.AsByteStringC(), formatStr,
- FALSE);
+ GetLocalDateFormat(hThis, iStyle, szLocal.AsStringC(), formatStr, FALSE);
if (formatStr.IsEmpty()) {
formatStr = "";
}
- FXJSE_Value_SetUTF8String(args.GetReturnValue(),
- formatStr.AsByteStringC());
+ FXJSE_Value_SetUTF8String(args.GetReturnValue(), formatStr.AsStringC());
} else {
FXJSE_Value_SetNull(args.GetReturnValue());
}
@@ -1220,13 +1217,11 @@ void CXFA_FM2JSContext::LocalTimeFmt(FXJSE_HOBJECT hThis,
}
if (!bFlags) {
CFX_ByteString formatStr;
- GetLocalTimeFormat(hThis, iStyle, szLocal.AsByteStringC(), formatStr,
- FALSE);
+ GetLocalTimeFormat(hThis, iStyle, szLocal.AsStringC(), formatStr, FALSE);
if (formatStr.IsEmpty()) {
formatStr = "";
}
- FXJSE_Value_SetUTF8String(args.GetReturnValue(),
- formatStr.AsByteStringC());
+ FXJSE_Value_SetUTF8String(args.GetReturnValue(), formatStr.AsStringC());
} else {
FXJSE_Value_SetNull(args.GetReturnValue());
}
@@ -1373,14 +1368,14 @@ void CXFA_FM2JSContext::Num2Date(FXJSE_HOBJECT hThis,
CFX_ByteString szIsoDateString;
szIsoDateString.Format("%d%02d%02d", iYear + i, iMonth, iDay);
CFX_ByteString szLocalDateString;
- IsoDate2Local(hThis, szIsoDateString.AsByteStringC(),
- formatString.AsByteStringC(), localString.AsByteStringC(),
+ IsoDate2Local(hThis, szIsoDateString.AsStringC(),
+ formatString.AsStringC(), localString.AsStringC(),
szLocalDateString);
if (szLocalDateString.IsEmpty()) {
szLocalDateString = "";
}
FXJSE_Value_SetUTF8String(args.GetReturnValue(),
- szLocalDateString.AsByteStringC());
+ szLocalDateString.AsStringC());
} else {
FXJSE_Value_SetNull(args.GetReturnValue());
}
@@ -1436,13 +1431,13 @@ void CXFA_FM2JSContext::Num2GMTime(FXJSE_HOBJECT hThis,
}
if (!bFlags) {
CFX_ByteString szGMTTimeString;
- Num2AllTime(hThis, iTime, formatString.AsByteStringC(),
- localString.AsByteStringC(), TRUE, szGMTTimeString);
+ Num2AllTime(hThis, iTime, formatString.AsStringC(),
+ localString.AsStringC(), TRUE, szGMTTimeString);
if (szGMTTimeString.IsEmpty()) {
szGMTTimeString = "";
}
FXJSE_Value_SetUTF8String(args.GetReturnValue(),
- szGMTTimeString.AsByteStringC());
+ szGMTTimeString.AsStringC());
} else {
FXJSE_Value_SetNull(args.GetReturnValue());
}
@@ -1498,13 +1493,13 @@ void CXFA_FM2JSContext::Num2Time(FXJSE_HOBJECT hThis,
}
if (!bFlags) {
CFX_ByteString szLocalTimeString;
- Num2AllTime(hThis, (int32_t)fTime, formatString.AsByteStringC(),
- localString.AsByteStringC(), FALSE, szLocalTimeString);
+ Num2AllTime(hThis, (int32_t)fTime, formatString.AsStringC(),
+ localString.AsStringC(), FALSE, szLocalTimeString);
if (szLocalTimeString.IsEmpty()) {
szLocalTimeString = "";
}
FXJSE_Value_SetUTF8String(args.GetReturnValue(),
- szLocalTimeString.AsByteStringC());
+ szLocalTimeString.AsStringC());
} else {
FXJSE_Value_SetNull(args.GetReturnValue());
}
@@ -1588,19 +1583,18 @@ void CXFA_FM2JSContext::Time2Num(FXJSE_HOBJECT hThis,
pLocale = widgetData.GetLocal();
} else {
pLocale = pMgr->GetLocaleByName(
- CFX_WideString::FromUTF8(localString.AsByteStringC())
- .AsWideStringC());
+ CFX_WideString::FromUTF8(localString.AsStringC()).AsStringC());
}
CFX_WideString wsFormat;
if (formatString.IsEmpty()) {
pLocale->GetTimePattern(FX_LOCALEDATETIMESUBCATEGORY_Default, wsFormat);
} else {
- wsFormat = CFX_WideString::FromUTF8(formatString.AsByteStringC());
+ wsFormat = CFX_WideString::FromUTF8(formatString.AsStringC());
}
wsFormat = FX_WSTRC(L"time{") + wsFormat;
wsFormat += FX_WSTRC(L"}");
CXFA_LocaleValue timeValue(
- XFA_VT_TIME, CFX_WideString::FromUTF8(timeString.AsByteStringC()),
+ XFA_VT_TIME, CFX_WideString::FromUTF8(timeString.AsStringC()),
wsFormat, pLocale, (CXFA_LocaleMgr*)pMgr);
if (timeValue.IsValid()) {
CFX_Unitime uniTime = timeValue.GetTime();
@@ -1676,12 +1670,11 @@ void CXFA_FM2JSContext::TimeFmt(FXJSE_HOBJECT hThis,
}
if (!bFlags) {
CFX_ByteString formatStr;
- GetStandardTimeFormat(hThis, iStyle, szLocal.AsByteStringC(), formatStr);
+ GetStandardTimeFormat(hThis, iStyle, szLocal.AsStringC(), formatStr);
if (formatStr.IsEmpty()) {
formatStr = "";
}
- FXJSE_Value_SetUTF8String(args.GetReturnValue(),
- formatStr.AsByteStringC());
+ FXJSE_Value_SetUTF8String(args.GetReturnValue(), formatStr.AsStringC());
} else {
FXJSE_Value_SetNull(args.GetReturnValue());
}
@@ -2036,8 +2029,8 @@ FX_BOOL CXFA_FM2JSContext::Local2IsoDate(FXJSE_HOBJECT hThis,
CXFA_WidgetData widgetData(pThisNode);
pLocale = widgetData.GetLocal();
} else {
- pLocale = pMgr->GetLocaleByName(
- CFX_WideString::FromUTF8(szLocale).AsWideStringC());
+ pLocale =
+ pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocale).AsStringC());
}
if (!pLocale) {
return FALSE;
@@ -2073,8 +2066,8 @@ FX_BOOL CXFA_FM2JSContext::Local2IsoTime(FXJSE_HOBJECT hThis,
CXFA_WidgetData widgetData(pThisNode);
pLocale = widgetData.GetLocal();
} else {
- pLocale = pMgr->GetLocaleByName(
- CFX_WideString::FromUTF8(szLocale).AsWideStringC());
+ pLocale =
+ pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocale).AsStringC());
}
if (!pLocale) {
return FALSE;
@@ -2113,8 +2106,8 @@ FX_BOOL CXFA_FM2JSContext::IsoDate2Local(FXJSE_HOBJECT hThis,
CXFA_WidgetData widgetData(pThisNode);
pLocale = widgetData.GetLocal();
} else {
- pLocale = pMgr->GetLocaleByName(
- CFX_WideString::FromUTF8(szLocale).AsWideStringC());
+ pLocale =
+ pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocale).AsStringC());
}
if (!pLocale) {
return FALSE;
@@ -2152,8 +2145,8 @@ FX_BOOL CXFA_FM2JSContext::IsoTime2Local(FXJSE_HOBJECT hThis,
CXFA_WidgetData widgetData(pThisNode);
pLocale = widgetData.GetLocal();
} else {
- pLocale = pMgr->GetLocaleByName(
- CFX_WideString::FromUTF8(szLocale).AsWideStringC());
+ pLocale =
+ pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocale).AsStringC());
}
if (!pLocale) {
return FALSE;
@@ -2193,8 +2186,8 @@ FX_BOOL CXFA_FM2JSContext::GetGMTTime(FXJSE_HOBJECT hThis,
CXFA_WidgetData widgetData(pThisNode);
pLocale = widgetData.GetLocal();
} else {
- pLocale = pMgr->GetLocaleByName(
- CFX_WideString::FromUTF8(szLocale).AsWideStringC());
+ pLocale =
+ pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocale).AsStringC());
}
if (!pLocale) {
return FALSE;
@@ -2375,8 +2368,8 @@ void CXFA_FM2JSContext::GetLocalDateFormat(FXJSE_HOBJECT hThis,
CXFA_WidgetData widgetData(pThisNode);
pLocale = widgetData.GetLocal();
} else {
- pLocale = pMgr->GetLocaleByName(
- CFX_WideString::FromUTF8(szLocalStr).AsWideStringC());
+ pLocale =
+ pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocalStr).AsStringC());
}
if (!pLocale) {
return;
@@ -2430,8 +2423,8 @@ void CXFA_FM2JSContext::GetLocalTimeFormat(FXJSE_HOBJECT hThis,
CXFA_WidgetData widgetData(pThisNode);
pLocale = widgetData.GetLocal();
} else {
- pLocale = pMgr->GetLocaleByName(
- CFX_WideString::FromUTF8(szLocalStr).AsWideStringC());
+ pLocale =
+ pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocalStr).AsStringC());
}
if (!pLocale) {
return;
@@ -2482,10 +2475,10 @@ void CXFA_FM2JSContext::Num2AllTime(FXJSE_HOBJECT hThis,
CFX_ByteString strIsoTime;
strIsoTime.Format("%02d:%02d:%02d", iHour, iMin, iSec);
if (bGM) {
- iRet = GetGMTTime(hThis, strIsoTime.AsByteStringC(), szFormat, szLocale,
- strTime);
+ iRet =
+ GetGMTTime(hThis, strIsoTime.AsStringC(), szFormat, szLocale, strTime);
} else {
- iRet = IsoTime2Local(hThis, strIsoTime.AsByteStringC(), szFormat, szLocale,
+ iRet = IsoTime2Local(hThis, strIsoTime.AsStringC(), szFormat, szLocale,
strTime);
}
if (!iRet) {
@@ -3070,13 +3063,13 @@ void CXFA_FM2JSContext::Choose(FXJSE_HOBJECT hThis,
} else {
CFX_ByteString propStr;
FXJSE_Value_ToUTF8String(propertyValue, propStr);
- FXJSE_Value_GetObjectProp(jsobjectValue, propStr.AsByteStringC(),
+ FXJSE_Value_GetObjectProp(jsobjectValue, propStr.AsStringC(),
newProperty);
}
CFX_ByteString bsChoosed;
HValueToUTF8String(newProperty, bsChoosed);
FXJSE_Value_SetUTF8String(args.GetReturnValue(),
- bsChoosed.AsByteStringC());
+ bsChoosed.AsStringC());
FXJSE_Value_Release(newProperty);
FXJSE_Value_Release(jsobjectValue);
FXJSE_Value_Release(propertyValue);
@@ -3088,7 +3081,7 @@ void CXFA_FM2JSContext::Choose(FXJSE_HOBJECT hThis,
CFX_ByteString bsChoosed;
HValueToUTF8String(argIndexValue, bsChoosed);
FXJSE_Value_SetUTF8String(args.GetReturnValue(),
- bsChoosed.AsByteStringC());
+ bsChoosed.AsStringC());
bFound = TRUE;
}
}
@@ -3200,8 +3193,8 @@ void CXFA_FM2JSContext::Within(FXJSE_HOBJECT hThis,
HValueToUTF8String(argHeight, heightString);
FXJSE_Value_SetInteger(
args.GetReturnValue(),
- ((oneString.Compare(lowString.AsByteStringC()) >= 0) &&
- (oneString.Compare(heightString.AsByteStringC()) <= 0)));
+ ((oneString.Compare(lowString.AsStringC()) >= 0) &&
+ (oneString.Compare(heightString.AsStringC()) <= 0)));
}
FXJSE_Value_Release(argLow);
FXJSE_Value_Release(argHeight);
@@ -3251,8 +3244,7 @@ void CXFA_FM2JSContext::Eval(FXJSE_HOBJECT hThis,
CFX_WideString javaScript;
CFX_WideString wsError;
XFA_FM2JS_Translate(
- CFX_WideString::FromUTF8(utf8ScriptString.AsByteStringC())
- .AsWideStringC(),
+ CFX_WideString::FromUTF8(utf8ScriptString.AsStringC()).AsStringC(),
wsJavaScriptBuf, wsError);
FXJSE_HCONTEXT hContext = FXJSE_Context_Create(hruntime);
FXJSE_HVALUE returnValue = FXJSE_Value_Create(hruntime);
@@ -3374,7 +3366,7 @@ void CXFA_FM2JSContext::UnitType(FXJSE_HOBJECT hThis,
};
unitspanString.MakeLower();
CFX_WideString wsTypeString =
- CFX_WideString::FromUTF8(unitspanString.AsByteStringC());
+ CFX_WideString::FromUTF8(unitspanString.AsStringC());
const FX_WCHAR* pData = wsTypeString;
int32_t u = 0;
int32_t uLen = wsTypeString.GetLength();
@@ -3640,7 +3632,7 @@ void CXFA_FM2JSContext::At(FXJSE_HOBJECT hThis,
} else {
CFX_ByteString stringOne;
HValueToUTF8String(argOne, stringOne);
- FX_STRSIZE iPosition = stringOne.Find(stringTwo.AsByteStringC());
+ FX_STRSIZE iPosition = stringOne.Find(stringTwo.AsStringC());
FXJSE_Value_SetInteger(args.GetReturnValue(), iPosition + 1);
}
}
@@ -3678,7 +3670,7 @@ void CXFA_FM2JSContext::Concat(FXJSE_HOBJECT hThis,
FXJSE_Value_SetNull(args.GetReturnValue());
} else {
FXJSE_Value_SetUTF8String(args.GetReturnValue(),
- resultString.AsByteStringC());
+ resultString.AsStringC());
}
} else {
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
@@ -3699,7 +3691,7 @@ void CXFA_FM2JSContext::Decode(FXJSE_HOBJECT hThis,
CFX_ByteString toDecodeString;
HValueToUTF8String(argOne, toDecodeString);
CFX_ByteTextBuf resultBuf;
- DecodeURL(toDecodeString.AsByteStringC(), resultBuf);
+ DecodeURL(toDecodeString.AsStringC(), resultBuf);
FXJSE_Value_SetUTF8String(args.GetReturnValue(),
resultBuf.GetByteString());
}
@@ -3716,11 +3708,11 @@ void CXFA_FM2JSContext::Decode(FXJSE_HOBJECT hThis,
HValueToUTF8String(argTwo, identifyString);
CFX_ByteTextBuf resultBuf;
if (identifyString.EqualNoCase("html")) {
- DecodeHTML(toDecodeString.AsByteStringC(), resultBuf);
+ DecodeHTML(toDecodeString.AsStringC(), resultBuf);
} else if (identifyString.EqualNoCase("xml")) {
- DecodeXML(toDecodeString.AsByteStringC(), resultBuf);
+ DecodeXML(toDecodeString.AsStringC(), resultBuf);
} else {
- DecodeURL(toDecodeString.AsByteStringC(), resultBuf);
+ DecodeURL(toDecodeString.AsStringC(), resultBuf);
}
FXJSE_Value_SetUTF8String(args.GetReturnValue(),
resultBuf.GetByteString());
@@ -3785,7 +3777,7 @@ void CXFA_FM2JSContext::DecodeURL(const CFX_ByteStringC& szURLString,
szResultString.Clear();
szResultString << FX_UTF8Encode(wsResultBuf.GetBuffer(),
wsResultBuf.GetLength())
- .AsByteStringC();
+ .AsStringC();
}
void CXFA_FM2JSContext::DecodeHTML(const CFX_ByteStringC& szHTMLString,
CFX_ByteTextBuf& szResultString) {
@@ -3859,7 +3851,7 @@ void CXFA_FM2JSContext::DecodeHTML(const CFX_ByteStringC& szHTMLString,
szResultString.Clear();
szResultString << FX_UTF8Encode(wsResultBuf.GetBuffer(),
wsResultBuf.GetLength())
- .AsByteStringC();
+ .AsStringC();
}
void CXFA_FM2JSContext::DecodeXML(const CFX_ByteStringC& szXMLString,
CFX_ByteTextBuf& szResultString) {
@@ -3956,7 +3948,7 @@ void CXFA_FM2JSContext::DecodeXML(const CFX_ByteStringC& szXMLString,
wsXMLBuf.AppendChar(0);
szResultString.Clear();
szResultString << FX_UTF8Encode(wsXMLBuf.GetBuffer(), wsXMLBuf.GetLength())
- .AsByteStringC();
+ .AsStringC();
}
void CXFA_FM2JSContext::Encode(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
@@ -3972,7 +3964,7 @@ void CXFA_FM2JSContext::Encode(FXJSE_HOBJECT hThis,
CFX_ByteString toEncodeString;
HValueToUTF8String(argOne, toEncodeString);
CFX_ByteTextBuf resultBuf;
- EncodeURL(toEncodeString.AsByteStringC(), resultBuf);
+ EncodeURL(toEncodeString.AsStringC(), resultBuf);
FXJSE_Value_SetUTF8String(args.GetReturnValue(),
resultBuf.GetByteString());
}
@@ -3989,11 +3981,11 @@ void CXFA_FM2JSContext::Encode(FXJSE_HOBJECT hThis,
HValueToUTF8String(argTwo, identifyString);
CFX_ByteTextBuf resultBuf;
if (identifyString.EqualNoCase("html")) {
- EncodeHTML(toEncodeString.AsByteStringC(), resultBuf);
+ EncodeHTML(toEncodeString.AsStringC(), resultBuf);
} else if (identifyString.EqualNoCase("xml")) {
- EncodeXML(toEncodeString.AsByteStringC(), resultBuf);
+ EncodeXML(toEncodeString.AsStringC(), resultBuf);
} else {
- EncodeURL(toEncodeString.AsByteStringC(), resultBuf);
+ EncodeURL(toEncodeString.AsStringC(), resultBuf);
}
FXJSE_Value_SetUTF8String(args.GetReturnValue(),
resultBuf.GetByteString());
@@ -4110,12 +4102,12 @@ void CXFA_FM2JSContext::EncodeURL(const CFX_ByteStringC& szURLString,
wsResultBuf.AppendChar(0);
szResultBuf.Clear();
szResultBuf << FX_UTF8Encode(wsResultBuf.GetBuffer(), wsResultBuf.GetLength())
- .AsByteStringC();
+ .AsStringC();
}
void CXFA_FM2JSContext::EncodeHTML(const CFX_ByteStringC& szHTMLString,
CFX_ByteTextBuf& szResultBuf) {
CFX_ByteString str = szHTMLString.c_str();
- CFX_WideString wsHTMLString = CFX_WideString::FromUTF8(str.AsByteStringC());
+ CFX_WideString wsHTMLString = CFX_WideString::FromUTF8(str.AsStringC());
const FX_WCHAR* strCode = L"0123456789abcdef";
FX_WCHAR strEncode[9];
strEncode[0] = '&';
@@ -4164,7 +4156,7 @@ void CXFA_FM2JSContext::EncodeHTML(const CFX_ByteStringC& szHTMLString,
wsResultBuf.AppendChar(0);
szResultBuf.Clear();
szResultBuf << FX_UTF8Encode(wsResultBuf.GetBuffer(), wsResultBuf.GetLength())
- .AsByteStringC();
+ .AsStringC();
}
void CXFA_FM2JSContext::EncodeXML(const CFX_ByteStringC& szXMLString,
CFX_ByteTextBuf& szResultBuf) {
@@ -4245,7 +4237,7 @@ void CXFA_FM2JSContext::EncodeXML(const CFX_ByteStringC& szXMLString,
wsResultBuf.AppendChar(0);
szResultBuf.Clear();
szResultBuf << FX_UTF8Encode(wsResultBuf.GetBuffer(), wsResultBuf.GetLength())
- .AsByteStringC();
+ .AsStringC();
}
FX_BOOL CXFA_FM2JSContext::HTMLSTR2Code(const CFX_WideStringC& pData,
uint32_t& iCode) {
@@ -4394,10 +4386,9 @@ void CXFA_FM2JSContext::Format(FXJSE_HOBJECT hThis,
IFX_Locale* pLocale = widgetData.GetLocal();
uint32_t patternType;
FX_BOOL bCompelte =
- XFA_PATTERN_STRING_Type(szPattern.AsByteStringC(), patternType);
- CFX_WideString wsPattern =
- CFX_WideString::FromUTF8(szPattern.AsByteStringC());
- CFX_WideString wsValue = CFX_WideString::FromUTF8(szValue.AsByteStringC());
+ XFA_PATTERN_STRING_Type(szPattern.AsStringC(), patternType);
+ CFX_WideString wsPattern = CFX_WideString::FromUTF8(szPattern.AsStringC());
+ CFX_WideString wsValue = CFX_WideString::FromUTF8(szValue.AsStringC());
if (!bCompelte) {
switch (patternType) {
case XFA_VT_DATETIME: {
@@ -4451,7 +4442,7 @@ void CXFA_FM2JSContext::Format(FXJSE_HOBJECT hThis,
XFA_VALUEPICTURE_Display)) {
FXJSE_Value_SetUTF8String(
args.GetReturnValue(),
- FX_UTF8Encode(wsRet, wsRet.GetLength()).AsByteStringC());
+ FX_UTF8Encode(wsRet, wsRet.GetLength()).AsStringC());
} else {
FXJSE_Value_SetUTF8String(args.GetReturnValue(), "");
}
@@ -4484,7 +4475,7 @@ void CXFA_FM2JSContext::Left(FXJSE_HOBJECT hThis,
count = 0;
}
FXJSE_Value_SetUTF8String(args.GetReturnValue(),
- sourceString.Left(count).AsByteStringC());
+ sourceString.Left(count).AsStringC());
}
FXJSE_Value_Release(argOne);
FXJSE_Value_Release(argTwo);
@@ -4530,7 +4521,7 @@ void CXFA_FM2JSContext::Lower(FXJSE_HOBJECT hThis,
HValueToUTF8String(argOne, argString);
CFX_WideTextBuf lowStringBuf;
CFX_WideString wsArgString =
- CFX_WideString::FromUTF8(argString.AsByteStringC());
+ CFX_WideString::FromUTF8(argString.AsStringC());
const FX_WCHAR* pData = wsArgString;
int32_t iLen = argString.GetLength();
int32_t i = 0;
@@ -4551,7 +4542,7 @@ void CXFA_FM2JSContext::Lower(FXJSE_HOBJECT hThis,
FXJSE_Value_SetUTF8String(
args.GetReturnValue(),
FX_UTF8Encode(lowStringBuf.GetBuffer(), lowStringBuf.GetLength())
- .AsByteStringC());
+ .AsStringC());
if (argc == 2) {
FXJSE_Value_Release(localeValue);
}
@@ -4578,7 +4569,7 @@ void CXFA_FM2JSContext::Ltrim(FXJSE_HOBJECT hThis,
HValueToUTF8String(argOne, sourceString);
sourceString.TrimLeft();
FXJSE_Value_SetUTF8String(args.GetReturnValue(),
- sourceString.AsByteStringC());
+ sourceString.AsStringC());
}
FXJSE_Value_Release(argOne);
} else {
@@ -4609,11 +4600,10 @@ void CXFA_FM2JSContext::Parse(FXJSE_HOBJECT hThis,
IFX_Locale* pLocale = widgetData.GetLocal();
uint32_t patternType;
FX_BOOL bCompletePattern =
- XFA_PATTERN_STRING_Type(szPattern.AsByteStringC(), patternType);
+ XFA_PATTERN_STRING_Type(szPattern.AsStringC(), patternType);
CFX_WideString wsPattern =
- CFX_WideString::FromUTF8(szPattern.AsByteStringC());
- CFX_WideString wsValue =
- CFX_WideString::FromUTF8(szValue.AsByteStringC());
+ CFX_WideString::FromUTF8(szPattern.AsStringC());
+ CFX_WideString wsValue = CFX_WideString::FromUTF8(szValue.AsStringC());
CFX_ByteString szParsedValue;
if (bCompletePattern) {
CXFA_LocaleValue localeValue(patternType, wsValue, wsPattern, pLocale,
@@ -4621,7 +4611,7 @@ void CXFA_FM2JSContext::Parse(FXJSE_HOBJECT hThis,
if (localeValue.IsValid()) {
szParsedValue = FX_UTF8Encode(localeValue.GetValue());
FXJSE_Value_SetUTF8String(args.GetReturnValue(),
- szParsedValue.AsByteStringC());
+ szParsedValue.AsStringC());
} else {
FXJSE_Value_SetUTF8String(args.GetReturnValue(), "");
}
@@ -4641,7 +4631,7 @@ void CXFA_FM2JSContext::Parse(FXJSE_HOBJECT hThis,
if (localeValue.IsValid()) {
szParsedValue = FX_UTF8Encode(localeValue.GetValue());
FXJSE_Value_SetUTF8String(args.GetReturnValue(),
- szParsedValue.AsByteStringC());
+ szParsedValue.AsStringC());
} else {
FXJSE_Value_SetUTF8String(args.GetReturnValue(), "");
}
@@ -4654,7 +4644,7 @@ void CXFA_FM2JSContext::Parse(FXJSE_HOBJECT hThis,
if (localeValue.IsValid()) {
szParsedValue = FX_UTF8Encode(localeValue.GetValue());
FXJSE_Value_SetUTF8String(args.GetReturnValue(),
- szParsedValue.AsByteStringC());
+ szParsedValue.AsStringC());
} else {
FXJSE_Value_SetUTF8String(args.GetReturnValue(), "");
}
@@ -4667,7 +4657,7 @@ void CXFA_FM2JSContext::Parse(FXJSE_HOBJECT hThis,
if (localeValue.IsValid()) {
szParsedValue = FX_UTF8Encode(localeValue.GetValue());
FXJSE_Value_SetUTF8String(args.GetReturnValue(),
- szParsedValue.AsByteStringC());
+ szParsedValue.AsStringC());
} else {
FXJSE_Value_SetUTF8String(args.GetReturnValue(), "");
}
@@ -4680,7 +4670,7 @@ void CXFA_FM2JSContext::Parse(FXJSE_HOBJECT hThis,
if (localeValue.IsValid()) {
szParsedValue = FX_UTF8Encode(localeValue.GetValue());
FXJSE_Value_SetUTF8String(args.GetReturnValue(),
- szParsedValue.AsByteStringC());
+ szParsedValue.AsStringC());
} else {
FXJSE_Value_SetUTF8String(args.GetReturnValue(), "");
}
@@ -4714,7 +4704,7 @@ void CXFA_FM2JSContext::Parse(FXJSE_HOBJECT hThis,
if (localeValue.IsValid()) {
szParsedValue = FX_UTF8Encode(localeValue.GetValue());
FXJSE_Value_SetUTF8String(args.GetReturnValue(),
- szParsedValue.AsByteStringC());
+ szParsedValue.AsStringC());
} else {
FXJSE_Value_SetUTF8String(args.GetReturnValue(), "");
}
@@ -4771,7 +4761,7 @@ void CXFA_FM2JSContext::Replace(FXJSE_HOBJECT hThis,
}
}
if (iFindIndex == iFindLen) {
- resultString << threeString.AsByteStringC();
+ resultString << threeString.AsStringC();
u += iFindLen - 1;
iFindIndex = 0;
} else {
@@ -4818,7 +4808,7 @@ void CXFA_FM2JSContext::Right(FXJSE_HOBJECT hThis,
count = 0;
}
FXJSE_Value_SetUTF8String(args.GetReturnValue(),
- sourceString.Right(count).AsByteStringC());
+ sourceString.Right(count).AsStringC());
}
FXJSE_Value_Release(argOne);
FXJSE_Value_Release(argTwo);
@@ -4841,7 +4831,7 @@ void CXFA_FM2JSContext::Rtrim(FXJSE_HOBJECT hThis,
HValueToUTF8String(argOne, sourceString);
sourceString.TrimRight();
FXJSE_Value_SetUTF8String(args.GetReturnValue(),
- sourceString.AsByteStringC());
+ sourceString.AsStringC());
}
FXJSE_Value_Release(argOne);
} else {
@@ -5046,7 +5036,7 @@ void CXFA_FM2JSContext::Stuff(FXJSE_HOBJECT hThis,
resultString.AppendChar(sourceString.GetAt(i));
++i;
}
- resultString << insertString.AsByteStringC();
+ resultString << insertString.AsStringC();
i = iStart + iDelete;
while (i < iLength) {
resultString.AppendChar(sourceString.GetAt(i));
@@ -5100,9 +5090,8 @@ void CXFA_FM2JSContext::Substr(FXJSE_HOBJECT hThis,
iCount = 0;
}
iStart -= 1;
- FXJSE_Value_SetUTF8String(
- args.GetReturnValue(),
- szSourceStr.Mid(iStart, iCount).AsByteStringC());
+ FXJSE_Value_SetUTF8String(args.GetReturnValue(),
+ szSourceStr.Mid(iStart, iCount).AsStringC());
}
}
FXJSE_Value_Release(stringValue);
@@ -5130,7 +5119,7 @@ void CXFA_FM2JSContext::Uuid(FXJSE_HOBJECT hThis,
FX_GUID_CreateV4(&guid);
CFX_ByteString bsUId;
FX_GUID_ToString(&guid, bsUId, iNum);
- FXJSE_Value_SetUTF8String(args.GetReturnValue(), bsUId.AsByteStringC());
+ FXJSE_Value_SetUTF8String(args.GetReturnValue(), bsUId.AsStringC());
if (argc == 1) {
FXJSE_Value_Release(argOne);
}
@@ -5158,7 +5147,7 @@ void CXFA_FM2JSContext::Upper(FXJSE_HOBJECT hThis,
HValueToUTF8String(argOne, argString);
CFX_WideTextBuf upperStringBuf;
CFX_WideString wsArgString =
- CFX_WideString::FromUTF8(argString.AsByteStringC());
+ CFX_WideString::FromUTF8(argString.AsStringC());
const FX_WCHAR* pData = wsArgString;
int32_t iLen = wsArgString.GetLength();
int32_t i = 0;
@@ -5179,7 +5168,7 @@ void CXFA_FM2JSContext::Upper(FXJSE_HOBJECT hThis,
FXJSE_Value_SetUTF8String(
args.GetReturnValue(),
FX_UTF8Encode(upperStringBuf.GetBuffer(), upperStringBuf.GetLength())
- .AsByteStringC());
+ .AsStringC());
if (argc == 2) {
FXJSE_Value_Release(localeValue);
}
@@ -5232,7 +5221,7 @@ void CXFA_FM2JSContext::WordNum(FXJSE_HOBJECT hThis,
CFX_ByteTextBuf resultBuf;
CFX_ByteString numberString;
numberString.Format("%.2f", fNumber);
- WordUS(numberString.AsByteStringC(), iIdentifier, resultBuf);
+ WordUS(numberString.AsStringC(), iIdentifier, resultBuf);
FXJSE_Value_SetUTF8String(args.GetReturnValue(),
resultBuf.GetByteString());
}
@@ -5468,7 +5457,7 @@ void CXFA_FM2JSContext::Get(FXJSE_HOBJECT hThis,
CFX_ByteString urlString;
HValueToUTF8String(argOne, urlString);
IFX_FileRead* pFile = pAppProvider->DownloadURL(
- CFX_WideString::FromUTF8(urlString.AsByteStringC()).AsWideStringC());
+ CFX_WideString::FromUTF8(urlString.AsStringC()).AsStringC());
if (pFile) {
int32_t size = pFile->GetSize();
uint8_t* pData = FX_Alloc(uint8_t, size);
@@ -5528,11 +5517,11 @@ void CXFA_FM2JSContext::Post(FXJSE_HOBJECT hThis,
}
CFX_WideString decodedResponse;
FX_BOOL bFlags = pAppProvider->PostRequestURL(
- CFX_WideString::FromUTF8(bsURL.AsByteStringC()).AsWideStringC(),
- CFX_WideString::FromUTF8(bsData.AsByteStringC()).AsWideStringC(),
- CFX_WideString::FromUTF8(bsContentType.AsByteStringC()).AsWideStringC(),
- CFX_WideString::FromUTF8(bsEncode.AsByteStringC()).AsWideStringC(),
- CFX_WideString::FromUTF8(bsHeader.AsByteStringC()).AsWideStringC(),
+ CFX_WideString::FromUTF8(bsURL.AsStringC()).AsStringC(),
+ CFX_WideString::FromUTF8(bsData.AsStringC()).AsStringC(),
+ CFX_WideString::FromUTF8(bsContentType.AsStringC()).AsStringC(),
+ CFX_WideString::FromUTF8(bsEncode.AsStringC()).AsStringC(),
+ CFX_WideString::FromUTF8(bsHeader.AsStringC()).AsStringC(),
decodedResponse);
FXJSE_Value_Release(argOne);
FXJSE_Value_Release(argTwo);
@@ -5549,7 +5538,7 @@ void CXFA_FM2JSContext::Post(FXJSE_HOBJECT hThis,
FXJSE_Value_SetUTF8String(
args.GetReturnValue(),
FX_UTF8Encode(decodedResponse, decodedResponse.GetLength())
- .AsByteStringC());
+ .AsStringC());
} else {
pContext->ThrowScriptErrorMessage(XFA_IDS_SERVER_DENY);
}
@@ -5589,9 +5578,9 @@ void CXFA_FM2JSContext::Put(FXJSE_HOBJECT hThis,
HValueToUTF8String(argThree, bsEncode);
}
FX_BOOL bFlags = pAppProvider->PutRequestURL(
- CFX_WideString::FromUTF8(bsURL.AsByteStringC()).AsWideStringC(),
- CFX_WideString::FromUTF8(bsData.AsByteStringC()).AsWideStringC(),
- CFX_WideString::FromUTF8(bsEncode.AsByteStringC()).AsWideStringC());
+ CFX_WideString::FromUTF8(bsURL.AsStringC()).AsStringC(),
+ CFX_WideString::FromUTF8(bsData.AsStringC()).AsStringC(),
+ CFX_WideString::FromUTF8(bsEncode.AsStringC()).AsStringC());
FXJSE_Value_Release(argOne);
FXJSE_Value_Release(argTwo);
if (argc > 2) {
@@ -5639,7 +5628,7 @@ void CXFA_FM2JSContext::assign_value_operator(FXJSE_HOBJECT hThis,
FXJSE_Value_ToUTF8String(propertyValue, propertyStr);
for (int32_t i = 2; i < iLeftLength; i++) {
FXJSE_Value_GetObjectPropByIdx(lValue, i, jsObjectValue);
- FXJSE_Value_SetObjectProp(jsObjectValue, propertyStr.AsByteStringC(),
+ FXJSE_Value_SetObjectProp(jsObjectValue, propertyStr.AsStringC(),
rValue);
}
}
@@ -5825,7 +5814,7 @@ void CXFA_FM2JSContext::less_operator(FXJSE_HOBJECT hThis,
FXJSE_Value_ToUTF8String(argSecond, secondOutput);
FXJSE_Value_SetInteger(
args.GetReturnValue(),
- firstOutput.Compare(secondOutput.AsByteStringC()) == -1);
+ firstOutput.Compare(secondOutput.AsStringC()) == -1);
} else {
FX_DOUBLE first = HValueToDouble(hThis, argFirst);
FX_DOUBLE second = HValueToDouble(hThis, argSecond);
@@ -5858,7 +5847,7 @@ void CXFA_FM2JSContext::lessequal_operator(FXJSE_HOBJECT hThis,
FXJSE_Value_ToUTF8String(argSecond, secondOutput);
FXJSE_Value_SetInteger(
args.GetReturnValue(),
- firstOutput.Compare(secondOutput.AsByteStringC()) != 1);
+ firstOutput.Compare(secondOutput.AsStringC()) != 1);
} else {
FX_DOUBLE first = HValueToDouble(hThis, argFirst);
FX_DOUBLE second = HValueToDouble(hThis, argSecond);
@@ -5888,7 +5877,7 @@ void CXFA_FM2JSContext::greater_operator(FXJSE_HOBJECT hThis,
FXJSE_Value_ToUTF8String(argSecond, secondOutput);
FXJSE_Value_SetInteger(
args.GetReturnValue(),
- firstOutput.Compare(secondOutput.AsByteStringC()) == 1);
+ firstOutput.Compare(secondOutput.AsStringC()) == 1);
} else {
FX_DOUBLE first = HValueToDouble(hThis, argFirst);
FX_DOUBLE second = HValueToDouble(hThis, argSecond);
@@ -5921,7 +5910,7 @@ void CXFA_FM2JSContext::greaterequal_operator(FXJSE_HOBJECT hThis,
FXJSE_Value_ToUTF8String(argSecond, secondOutput);
FXJSE_Value_SetInteger(
args.GetReturnValue(),
- firstOutput.Compare(secondOutput.AsByteStringC()) != -1);
+ firstOutput.Compare(secondOutput.AsStringC()) != -1);
} else {
FX_DOUBLE first = HValueToDouble(hThis, argFirst);
FX_DOUBLE second = HValueToDouble(hThis, argSecond);
@@ -6101,8 +6090,8 @@ void CXFA_FM2JSContext::dot_accessor(FXJSE_HOBJECT hThis,
iIndexValue = HValueToInteger(hThis, argIndex);
}
CFX_ByteString szSomExp;
- GenerateSomExpression(szName.AsByteStringC(), iIndexFlags, iIndexValue,
- bIsStar, szSomExp);
+ GenerateSomExpression(szName.AsStringC(), iIndexFlags, iIndexValue, bIsStar,
+ szSomExp);
if (FXJSE_Value_IsArray(argAccessor)) {
FXJSE_HVALUE hLengthValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectProp(argAccessor, "length", hLengthValue);
@@ -6119,9 +6108,8 @@ void CXFA_FM2JSContext::dot_accessor(FXJSE_HOBJECT hThis,
for (int32_t i = 2; i < iLength; i++) {
FXJSE_Value_GetObjectPropByIdx(argAccessor, i, hJSObjValue);
XFA_RESOLVENODE_RS resoveNodeRS;
- int32_t iRet =
- ResolveObjects(hThis, hJSObjValue, szSomExp.AsByteStringC(),
- resoveNodeRS, TRUE, szName.IsEmpty());
+ int32_t iRet = ResolveObjects(hThis, hJSObjValue, szSomExp.AsStringC(),
+ resoveNodeRS, TRUE, szName.IsEmpty());
if (iRet > 0) {
ParseResolveResult(hThis, resoveNodeRS, hJSObjValue,
hResolveValues[i - 2], iSizes[i - 2], bAttribute);
@@ -6136,7 +6124,7 @@ void CXFA_FM2JSContext::dot_accessor(FXJSE_HOBJECT hThis,
}
FXJSE_Value_SetInteger(rgValues[0], 1);
if (bAttribute) {
- FXJSE_Value_SetUTF8String(rgValues[1], szName.AsByteStringC());
+ FXJSE_Value_SetUTF8String(rgValues[1], szName.AsStringC());
} else {
FXJSE_Value_SetNull(rgValues[1]);
}
@@ -6154,9 +6142,9 @@ void CXFA_FM2JSContext::dot_accessor(FXJSE_HOBJECT hThis,
FX_Free(rgValues);
} else {
CFX_WideString wsPropertyName =
- CFX_WideString::FromUTF8(szName.AsByteStringC());
+ CFX_WideString::FromUTF8(szName.AsStringC());
CFX_WideString wsSomExpression =
- CFX_WideString::FromUTF8(szSomExp.AsByteStringC());
+ CFX_WideString::FromUTF8(szSomExp.AsStringC());
pContext->ThrowScriptErrorMessage(XFA_IDS_ACCESS_PROPERTY_IN_NOT_OBJECT,
(const FX_WCHAR*)wsPropertyName,
(const FX_WCHAR*)wsSomExpression);
@@ -6176,14 +6164,14 @@ void CXFA_FM2JSContext::dot_accessor(FXJSE_HOBJECT hThis,
int32_t iRet = 0;
if (FXJSE_Value_IsObject(argAccessor) ||
(FXJSE_Value_IsNull(argAccessor) && bsAccessorName.IsEmpty())) {
- iRet = ResolveObjects(hThis, argAccessor, szSomExp.AsByteStringC(),
+ iRet = ResolveObjects(hThis, argAccessor, szSomExp.AsStringC(),
resoveNodeRS, TRUE, szName.IsEmpty());
} else if (!FXJSE_Value_IsObject(argAccessor) &&
!bsAccessorName.IsEmpty()) {
FX_BOOL bGetObject =
- GetObjectByName(hThis, argAccessor, bsAccessorName.AsByteStringC());
+ GetObjectByName(hThis, argAccessor, bsAccessorName.AsStringC());
if (bGetObject) {
- iRet = ResolveObjects(hThis, argAccessor, szSomExp.AsByteStringC(),
+ iRet = ResolveObjects(hThis, argAccessor, szSomExp.AsStringC(),
resoveNodeRS, TRUE, szName.IsEmpty());
}
}
@@ -6199,7 +6187,7 @@ void CXFA_FM2JSContext::dot_accessor(FXJSE_HOBJECT hThis,
}
FXJSE_Value_SetInteger(rgValues[0], 1);
if (bAttribute) {
- FXJSE_Value_SetUTF8String(rgValues[1], szName.AsByteStringC());
+ FXJSE_Value_SetUTF8String(rgValues[1], szName.AsStringC());
} else {
FXJSE_Value_SetNull(rgValues[1]);
}
@@ -6217,9 +6205,9 @@ void CXFA_FM2JSContext::dot_accessor(FXJSE_HOBJECT hThis,
FX_Free(hResolveValues);
} else {
CFX_WideString wsPropertyName =
- CFX_WideString::FromUTF8(szName.AsByteStringC());
+ CFX_WideString::FromUTF8(szName.AsStringC());
CFX_WideString wsSomExpression =
- CFX_WideString::FromUTF8(szSomExp.AsByteStringC());
+ CFX_WideString::FromUTF8(szSomExp.AsStringC());
pContext->ThrowScriptErrorMessage(XFA_IDS_ACCESS_PROPERTY_IN_NOT_OBJECT,
(const FX_WCHAR*)wsPropertyName,
(const FX_WCHAR*)wsSomExpression);
@@ -6254,8 +6242,8 @@ void CXFA_FM2JSContext::dotdot_accessor(FXJSE_HOBJECT hThis,
iIndexValue = HValueToInteger(hThis, argIndex);
}
CFX_ByteString szSomExp;
- GenerateSomExpression(szName.AsByteStringC(), iIndexFlags, iIndexValue,
- bIsStar, szSomExp);
+ GenerateSomExpression(szName.AsStringC(), iIndexFlags, iIndexValue, bIsStar,
+ szSomExp);
if (FXJSE_Value_IsArray(argAccessor)) {
FXJSE_HVALUE hLengthValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectProp(argAccessor, "length", hLengthValue);
@@ -6268,8 +6256,8 @@ void CXFA_FM2JSContext::dotdot_accessor(FXJSE_HOBJECT hThis,
for (int32_t i = 2; i < iLength; i++) {
FXJSE_Value_GetObjectPropByIdx(argAccessor, i, hJSObjValue);
XFA_RESOLVENODE_RS resoveNodeRS;
- int32_t iRet = ResolveObjects(
- hThis, hJSObjValue, szSomExp.AsByteStringC(), resoveNodeRS, FALSE);
+ int32_t iRet = ResolveObjects(hThis, hJSObjValue, szSomExp.AsStringC(),
+ resoveNodeRS, FALSE);
if (iRet > 0) {
ParseResolveResult(hThis, resoveNodeRS, hJSObjValue,
hResolveValues[i - 2], iSizes[i - 2], bAttribute);
@@ -6284,7 +6272,7 @@ void CXFA_FM2JSContext::dotdot_accessor(FXJSE_HOBJECT hThis,
}
FXJSE_Value_SetInteger(rgValues[0], 1);
if (bAttribute) {
- FXJSE_Value_SetUTF8String(rgValues[1], szName.AsByteStringC());
+ FXJSE_Value_SetUTF8String(rgValues[1], szName.AsStringC());
} else {
FXJSE_Value_SetNull(rgValues[1]);
}
@@ -6302,9 +6290,9 @@ void CXFA_FM2JSContext::dotdot_accessor(FXJSE_HOBJECT hThis,
FX_Free(rgValues);
} else {
CFX_WideString wsPropertyName =
- CFX_WideString::FromUTF8(szName.AsByteStringC());
+ CFX_WideString::FromUTF8(szName.AsStringC());
CFX_WideString wsSomExpression =
- CFX_WideString::FromUTF8(szSomExp.AsByteStringC());
+ CFX_WideString::FromUTF8(szSomExp.AsStringC());
pContext->ThrowScriptErrorMessage(XFA_IDS_ACCESS_PROPERTY_IN_NOT_OBJECT,
(const FX_WCHAR*)wsPropertyName,
(const FX_WCHAR*)wsSomExpression);
@@ -6323,14 +6311,14 @@ void CXFA_FM2JSContext::dotdot_accessor(FXJSE_HOBJECT hThis,
int32_t iRet = 0;
if (FXJSE_Value_IsObject(argAccessor) ||
(FXJSE_Value_IsNull(argAccessor) && bsAccessorName.IsEmpty())) {
- iRet = ResolveObjects(hThis, argAccessor, szSomExp.AsByteStringC(),
+ iRet = ResolveObjects(hThis, argAccessor, szSomExp.AsStringC(),
resoveNodeRS, FALSE);
} else if (!FXJSE_Value_IsObject(argAccessor) &&
!bsAccessorName.IsEmpty()) {
FX_BOOL bGetObject =
- GetObjectByName(hThis, argAccessor, bsAccessorName.AsByteStringC());
+ GetObjectByName(hThis, argAccessor, bsAccessorName.AsStringC());
if (bGetObject) {
- iRet = ResolveObjects(hThis, argAccessor, szSomExp.AsByteStringC(),
+ iRet = ResolveObjects(hThis, argAccessor, szSomExp.AsStringC(),
resoveNodeRS, FALSE);
}
}
@@ -6346,7 +6334,7 @@ void CXFA_FM2JSContext::dotdot_accessor(FXJSE_HOBJECT hThis,
}
FXJSE_Value_SetInteger(rgValues[0], 1);
if (bAttribute) {
- FXJSE_Value_SetUTF8String(rgValues[1], szName.AsByteStringC());
+ FXJSE_Value_SetUTF8String(rgValues[1], szName.AsStringC());
} else {
FXJSE_Value_SetNull(rgValues[1]);
}
@@ -6364,9 +6352,9 @@ void CXFA_FM2JSContext::dotdot_accessor(FXJSE_HOBJECT hThis,
FX_Free(hResolveValues);
} else {
CFX_WideString wsPropertyName =
- CFX_WideString::FromUTF8(szName.AsByteStringC());
+ CFX_WideString::FromUTF8(szName.AsStringC());
CFX_WideString wsSomExpression =
- CFX_WideString::FromUTF8(szSomExp.AsByteStringC());
+ CFX_WideString::FromUTF8(szSomExp.AsStringC());
pContext->ThrowScriptErrorMessage(XFA_IDS_ACCESS_PROPERTY_IN_NOT_OBJECT,
(const FX_WCHAR*)wsPropertyName,
(const FX_WCHAR*)wsSomExpression);
@@ -6394,16 +6382,15 @@ void CXFA_FM2JSContext::eval_translation(FXJSE_HOBJECT hThis,
pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
} else {
CFX_WideString scriptString =
- CFX_WideString::FromUTF8(argString.AsByteStringC());
+ CFX_WideString::FromUTF8(argString.AsStringC());
CFX_WideTextBuf wsJavaScriptBuf;
CFX_WideString wsError;
- XFA_FM2JS_Translate(scriptString.AsWideStringC(), wsJavaScriptBuf,
- wsError);
+ XFA_FM2JS_Translate(scriptString.AsStringC(), wsJavaScriptBuf, wsError);
if (wsError.IsEmpty()) {
CFX_WideString javaScript = wsJavaScriptBuf.GetWideString();
FXJSE_Value_SetUTF8String(
args.GetReturnValue(),
- FX_UTF8Encode(javaScript, javaScript.GetLength()).AsByteStringC());
+ FX_UTF8Encode(javaScript, javaScript.GetLength()).AsStringC());
} else {
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
@@ -6458,7 +6445,7 @@ void CXFA_FM2JSContext::get_fm_value(FXJSE_HOBJECT hThis,
} else {
CFX_ByteString propertyStr;
FXJSE_Value_ToUTF8String(propertyValue, propertyStr);
- FXJSE_Value_GetObjectProp(jsobjectValue, propertyStr.AsByteStringC(),
+ FXJSE_Value_GetObjectProp(jsobjectValue, propertyStr.AsStringC(),
args.GetReturnValue());
}
FXJSE_Value_Release(propertyValue);
@@ -6627,7 +6614,7 @@ FXJSE_HVALUE CXFA_FM2JSContext::GetSimpleHValue(FXJSE_HOBJECT hThis,
} else {
CFX_ByteString propertyStr;
FXJSE_Value_ToUTF8String(propertyValue, propertyStr);
- FXJSE_Value_GetObjectProp(jsobjectValue, propertyStr.AsByteStringC(),
+ FXJSE_Value_GetObjectProp(jsobjectValue, propertyStr.AsStringC(),
simpleValue);
}
FXJSE_Value_Release(propertyValue);
@@ -6671,7 +6658,7 @@ FX_BOOL CXFA_FM2JSContext::HValueIsNull(FXJSE_HOBJECT hThis, FXJSE_HVALUE arg) {
CFX_ByteString propertyStr;
FXJSE_Value_ToUTF8String(propertyValue, propertyStr);
FXJSE_HVALUE newPropertyValue = FXJSE_Value_Create(hruntime);
- FXJSE_Value_GetObjectProp(jsObjectValue, propertyStr.AsByteStringC(),
+ FXJSE_Value_GetObjectProp(jsObjectValue, propertyStr.AsStringC(),
newPropertyValue);
if (FXJSE_Value_IsNull(newPropertyValue)) {
isNull = TRUE;
@@ -6778,8 +6765,7 @@ void CXFA_FM2JSContext::unfoldArgs(FXJSE_HOBJECT hThis,
FXJSE_Value_ToUTF8String(propertyValue, propertyString);
for (int32_t j = 2; j < iLength; j++) {
FXJSE_Value_GetObjectPropByIdx(argsValue[i], j, jsObjectValue);
- FXJSE_Value_GetObjectProp(jsObjectValue,
- propertyString.AsByteStringC(),
+ FXJSE_Value_GetObjectProp(jsObjectValue, propertyString.AsStringC(),
resultValues[index]);
index++;
}
@@ -6866,7 +6852,7 @@ FX_BOOL CXFA_FM2JSContext::GetObjectByName(
XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_Parent;
int32_t iRet = pScriptContext->ResolveObjects(
pScriptContext->GetThisObject(),
- CFX_WideString::FromUTF8(szAccessorName).AsWideStringC(), resoveNodeRS,
+ CFX_WideString::FromUTF8(szAccessorName).AsStringC(), resoveNodeRS,
dwFlags);
if (iRet >= 1 && resoveNodeRS.dwFlags == XFA_RESOVENODE_RSTYPE_Nodes) {
FXJSE_Value_Set(accessorValue, pScriptContext->GetJSValueFromMap(
@@ -6922,7 +6908,7 @@ int32_t CXFA_FM2JSContext::ResolveObjects(FXJSE_HOBJECT hThis,
pNode = (CXFA_Object*)FXJSE_Value_ToObject(hRefValue, NULL);
dFlags = XFA_RESOLVENODE_AnyChild;
}
- iRet = pScriptContext->ResolveObjects(pNode, wsSomExpression.AsWideStringC(),
+ iRet = pScriptContext->ResolveObjects(pNode, wsSomExpression.AsStringC(),
resoveNodeRS, dFlags);
return iRet;
}
@@ -6987,7 +6973,7 @@ int32_t CXFA_FM2JSContext::HValueToInteger(FXJSE_HOBJECT hThis,
} else {
CFX_ByteString propertyStr;
FXJSE_Value_ToUTF8String(propertyValue, propertyStr);
- FXJSE_Value_GetObjectProp(jsobjectValue, propertyStr.AsByteStringC(),
+ FXJSE_Value_GetObjectProp(jsobjectValue, propertyStr.AsStringC(),
newProperty);
}
iValue = HValueToInteger(hThis, newProperty);
@@ -7031,7 +7017,7 @@ FX_FLOAT CXFA_FM2JSContext::HValueToFloat(FXJSE_HOBJECT hThis,
} else {
CFX_ByteString propertyStr;
FXJSE_Value_ToUTF8String(propertyValue, propertyStr);
- FXJSE_Value_GetObjectProp(jsobjectValue, propertyStr.AsByteStringC(),
+ FXJSE_Value_GetObjectProp(jsobjectValue, propertyStr.AsStringC(),
newProperty);
}
fRet = HValueToFloat(hThis, newProperty);
@@ -7046,7 +7032,7 @@ FX_FLOAT CXFA_FM2JSContext::HValueToFloat(FXJSE_HOBJECT hThis,
} else if (FXJSE_Value_IsUTF8String(arg)) {
CFX_ByteString bsOutput;
FXJSE_Value_ToUTF8String(arg, bsOutput);
- fRet = (FX_FLOAT)StringToDouble(bsOutput.AsByteStringC());
+ fRet = (FX_FLOAT)StringToDouble(bsOutput.AsStringC());
} else if (FXJSE_Value_IsUndefined(arg)) {
fRet = 0;
} else {
@@ -7071,7 +7057,7 @@ FX_DOUBLE CXFA_FM2JSContext::HValueToDouble(FXJSE_HOBJECT hThis,
} else {
CFX_ByteString propertyStr;
FXJSE_Value_ToUTF8String(propertyValue, propertyStr);
- FXJSE_Value_GetObjectProp(jsobjectValue, propertyStr.AsByteStringC(),
+ FXJSE_Value_GetObjectProp(jsobjectValue, propertyStr.AsStringC(),
newProperty);
}
dRet = HValueToDouble(hThis, newProperty);
@@ -7086,7 +7072,7 @@ FX_DOUBLE CXFA_FM2JSContext::HValueToDouble(FXJSE_HOBJECT hThis,
} else if (FXJSE_Value_IsUTF8String(arg)) {
CFX_ByteString bsOutput;
FXJSE_Value_ToUTF8String(arg, bsOutput);
- dRet = StringToDouble(bsOutput.AsByteStringC());
+ dRet = StringToDouble(bsOutput.AsStringC());
} else if (FXJSE_Value_IsUndefined(arg)) {
dRet = 0;
} else {
@@ -7247,5 +7233,5 @@ void CXFA_FM2JSContext::ThrowScriptErrorMessage(int32_t iStringID, ...) {
wsMessage.FormatV((const FX_WCHAR*)wsFormat, arg_ptr);
va_end(arg_ptr);
FXJSE_ThrowMessage(
- "", FX_UTF8Encode(wsMessage, wsMessage.GetLength()).AsByteStringC());
+ "", FX_UTF8Encode(wsMessage, wsMessage.GetLength()).AsStringC());
}
diff --git a/xfa/fxfa/parser/cxfa_image.cpp b/xfa/fxfa/parser/cxfa_image.cpp
index c54a580b80..bcc7466dce 100644
--- a/xfa/fxfa/parser/cxfa_image.cpp
+++ b/xfa/fxfa/parser/cxfa_image.cpp
@@ -42,7 +42,7 @@ FX_BOOL CXFA_Image::SetContentType(const CFX_WideString& wsContentType) {
FX_BOOL CXFA_Image::SetHref(const CFX_WideString& wsHref) {
if (m_bDefValue)
return m_pNode->SetCData(XFA_ATTRIBUTE_Href, wsHref);
- return m_pNode->SetAttribute(XFA_ATTRIBUTE_Href, wsHref.AsWideStringC());
+ return m_pNode->SetAttribute(XFA_ATTRIBUTE_Href, wsHref.AsStringC());
}
FX_BOOL CXFA_Image::SetTransferEncoding(int32_t iTransferEncoding) {
diff --git a/xfa/fxfa/parser/cxfa_validate.cpp b/xfa/fxfa/parser/cxfa_validate.cpp
index d226cbf52a..db0ffb4fa6 100644
--- a/xfa/fxfa/parser/cxfa_validate.cpp
+++ b/xfa/fxfa/parser/cxfa_validate.cpp
@@ -18,7 +18,7 @@ FX_BOOL CXFA_Validate::SetTestValue(int32_t iType,
CFX_WideString& wsValue,
XFA_ATTRIBUTEENUM eName) {
const XFA_ATTRIBUTEENUMINFO* pInfo =
- XFA_GetAttributeEnumByName(wsValue.AsWideStringC());
+ XFA_GetAttributeEnumByName(wsValue.AsStringC());
if (pInfo)
eName = pInfo->eName;
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp
index 91bb348b91..0a6b5062bc 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.cpp
+++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp
@@ -820,7 +820,7 @@ void CXFA_WidgetData::SetItemState(int32_t nIndex,
if (iSel < 0) {
CFX_WideString wsSaveText = wsSaveTextArray[nIndex];
CFX_WideString wsFormatText(wsSaveText);
- GetFormatDataValue(wsSaveText.AsWideStringC(), wsFormatText);
+ GetFormatDataValue(wsSaveText.AsStringC(), wsFormatText);
m_pNode->SetContent(wsSaveText, wsFormatText, bNotify, bScriptModify,
bSyncData);
}
@@ -850,7 +850,7 @@ void CXFA_WidgetData::SetSelectedItems(CFX_Int32Array& iSelArray,
}
CFX_WideString wsFormat(wsValue);
if (GetChoiceListOpen() != XFA_ATTRIBUTEENUM_MultiSelect)
- GetFormatDataValue(wsValue.AsWideStringC(), wsFormat);
+ GetFormatDataValue(wsValue.AsStringC(), wsFormat);
m_pNode->SetContent(wsValue, wsFormat, bNotify, bScriptModify, bSyncData);
}
@@ -889,19 +889,19 @@ void CXFA_WidgetData::InsertItem(const CFX_WideString& wsLabel,
if (iCount < 1) {
CXFA_Node* pItems = m_pNode->CreateSamePacketNode(XFA_ELEMENT_Items);
m_pNode->InsertChild(-1, pItems);
- InsertListTextItem(pItems, wsLabel.AsWideStringC(), nIndex);
+ InsertListTextItem(pItems, wsLabel.AsStringC(), nIndex);
CXFA_Node* pSaveItems = m_pNode->CreateSamePacketNode(XFA_ELEMENT_Items);
m_pNode->InsertChild(-1, pSaveItems);
pSaveItems->SetBoolean(XFA_ATTRIBUTE_Save, TRUE);
- InsertListTextItem(pSaveItems, wsNewValue.AsWideStringC(), nIndex);
+ InsertListTextItem(pSaveItems, wsNewValue.AsStringC(), nIndex);
} else if (iCount > 1) {
for (int32_t i = 0; i < 2; i++) {
CXFA_Node* pNode = listitems[i];
FX_BOOL bHasSave = pNode->GetBoolean(XFA_ATTRIBUTE_Save);
if (bHasSave)
- InsertListTextItem(pNode, wsNewValue.AsWideStringC(), nIndex);
+ InsertListTextItem(pNode, wsNewValue.AsStringC(), nIndex);
else
- InsertListTextItem(pNode, wsLabel.AsWideStringC(), nIndex);
+ InsertListTextItem(pNode, wsLabel.AsStringC(), nIndex);
}
} else {
CXFA_Node* pNode = listitems[0];
@@ -917,12 +917,12 @@ void CXFA_WidgetData::InsertItem(const CFX_WideString& wsLabel,
while (pListNode) {
CFX_WideString wsOldValue;
pListNode->TryContent(wsOldValue);
- InsertListTextItem(pSaveItems, wsOldValue.AsWideStringC(), i);
+ InsertListTextItem(pSaveItems, wsOldValue.AsStringC(), i);
i++;
pListNode = pListNode->GetNodeItem(XFA_NODEITEM_NextSibling);
}
- InsertListTextItem(pNode, wsLabel.AsWideStringC(), nIndex);
- InsertListTextItem(pSaveItems, wsNewValue.AsWideStringC(), nIndex);
+ InsertListTextItem(pNode, wsLabel.AsStringC(), nIndex);
+ InsertListTextItem(pSaveItems, wsNewValue.AsStringC(), nIndex);
}
if (!bNotify)
return;
@@ -1481,7 +1481,7 @@ IFX_Locale* CXFA_WidgetData::GetLocal() {
pLocale = m_pNode->GetDocument()->GetLocalMgr()->GetDefLocale();
} else {
pLocale = m_pNode->GetDocument()->GetLocalMgr()->GetLocaleByName(
- wsLocaleName.AsWideStringC());
+ wsLocaleName.AsStringC());
}
}
return pLocale;
@@ -1492,7 +1492,7 @@ FX_BOOL CXFA_WidgetData::GetValue(CFX_WideString& wsValue,
wsValue = m_pNode->GetContent();
if (eValueType == XFA_VALUEPICTURE_Display)
- GetItemLabel(wsValue.AsWideStringC(), wsValue);
+ GetItemLabel(wsValue.AsStringC(), wsValue);
CFX_WideString wsPicture;
GetPictureContent(wsPicture, eValueType);
@@ -1738,7 +1738,7 @@ void CXFA_WidgetData::SyncValue(const CFX_WideString& wsValue,
CFX_WideString wsFormatValue(wsValue);
CXFA_WidgetData* pContainerWidgetData = m_pNode->GetContainerWidgetData();
if (pContainerWidgetData)
- pContainerWidgetData->GetFormatDataValue(wsValue.AsWideStringC(),
+ pContainerWidgetData->GetFormatDataValue(wsValue.AsStringC(),
wsFormatValue);
m_pNode->SetContent(wsValue, wsFormatValue, bNotify);
@@ -1780,7 +1780,7 @@ CFX_WideString CXFA_WidgetData::NumericLimit(const CFX_WideString& wsValue,
iTread_++;
if (iTread_ > iTread) {
if (iTread != -1) {
- CFX_Decimal wsDeci = CFX_Decimal(wsValue.AsWideStringC());
+ CFX_Decimal wsDeci = CFX_Decimal(wsValue.AsStringC());
wsDeci.SetScale(iTread);
wsRet = wsDeci;
}
diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
index f812d03032..ea924165d1 100644
--- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
@@ -132,8 +132,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode,
CFDE_XMLElement* pXMLDataElement =
static_cast<CFDE_XMLElement*>(pDataNode->GetXMLMappingNode());
FXSYS_assert(pXMLDataElement);
- pWidgetData->GetFormatDataValue(wsValue.AsWideStringC(),
- wsFormatedValue);
+ pWidgetData->GetFormatDataValue(wsValue.AsStringC(), wsFormatedValue);
pDataNode->SetAttributeValue(wsValue, wsFormatedValue);
pDataNode->SetCData(XFA_ATTRIBUTE_ContentType, wsContentType);
if (!wsHref.IsEmpty()) {
@@ -162,8 +161,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode,
->SetString(FX_WSTRC(L"xfa:dataNode"), FX_WSTRC(L"dataGroup"));
}
} else if (!wsValue.IsEmpty()) {
- pWidgetData->GetFormatDataValue(wsValue.AsWideStringC(),
- wsFormatedValue);
+ pWidgetData->GetFormatDataValue(wsValue.AsStringC(), wsFormatedValue);
pDataNode->SetAttributeValue(wsValue, wsFormatedValue);
}
break;
@@ -172,8 +170,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode,
if (wsValue.IsEmpty()) {
break;
}
- pWidgetData->GetFormatDataValue(wsValue.AsWideStringC(),
- wsFormatedValue);
+ pWidgetData->GetFormatDataValue(wsValue.AsStringC(), wsFormatedValue);
pDataNode->SetAttributeValue(wsValue, wsFormatedValue);
break;
case XFA_ELEMENT_ExclGroup: {
@@ -243,8 +240,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode,
CFX_WideString wsOutput;
pWidgetData->NormalizeNumStr(wsValue, wsOutput);
wsValue = wsOutput;
- pWidgetData->GetFormatDataValue(wsValue.AsWideStringC(),
- wsFormatedValue);
+ pWidgetData->GetFormatDataValue(wsValue.AsStringC(), wsFormatedValue);
pDataNode->SetAttributeValue(wsValue, wsFormatedValue);
CXFA_Node* pValue = pFormNode->GetProperty(0, XFA_ELEMENT_Value);
XFA_DataMerge_FormValueNode_SetChildContent(pValue, wsValue,
@@ -255,8 +251,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode,
if (wsValue.IsEmpty()) {
break;
}
- pWidgetData->GetFormatDataValue(wsValue.AsWideStringC(),
- wsFormatedValue);
+ pWidgetData->GetFormatDataValue(wsValue.AsStringC(), wsFormatedValue);
pDataNode->SetAttributeValue(wsValue, wsFormatedValue);
break;
}
@@ -264,7 +259,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode,
CFX_WideString wsXMLValue;
pDataNode->TryContent(wsXMLValue);
CFX_WideString wsNormailizeValue;
- pWidgetData->GetNormalizeDataValue(wsXMLValue.AsWideStringC(),
+ pWidgetData->GetNormalizeDataValue(wsXMLValue.AsStringC(),
wsNormailizeValue);
pDataNode->SetAttributeValue(wsNormailizeValue, wsXMLValue);
switch (eUIType) {
@@ -319,7 +314,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode,
defValue.GetNode(), wsNormailizeValue, XFA_ELEMENT_Text);
break;
case XFA_ELEMENT_ExclGroup: {
- pWidgetData->SetSelectedMemberByValue(wsNormailizeValue.AsWideStringC(),
+ pWidgetData->SetSelectedMemberByValue(wsNormailizeValue.AsStringC(),
bNotify, FALSE, FALSE);
} break;
case XFA_ELEMENT_DateTimeEdit:
diff --git a/xfa/fxfa/parser/xfa_document_serialize.cpp b/xfa/fxfa/parser/xfa_document_serialize.cpp
index f08215aa4c..feaebdd7b7 100644
--- a/xfa/fxfa/parser/xfa_document_serialize.cpp
+++ b/xfa/fxfa/parser/xfa_document_serialize.cpp
@@ -297,7 +297,7 @@ static void XFA_DataExporter_RegenerateFormFile_Changed(
buf << FX_WSTRC(L" xmlns=\"\"\n>");
for (int32_t i = 0; i < wsSelTextArray.GetSize(); i++) {
buf << FX_WSTRC(L"<value\n>");
- buf << XFA_ExportEncodeContent(wsSelTextArray[i].AsWideStringC());
+ buf << XFA_ExportEncodeContent(wsSelTextArray[i].AsStringC());
buf << FX_WSTRC(L"</value\n>");
}
buf << FX_WSTRC(L"</");
diff --git a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
index d680128dde..6553dc07cc 100644
--- a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
+++ b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
@@ -1389,7 +1389,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode) {
wsWidth = widths[i];
wsWidth.TrimLeft(L' ');
if (!wsWidth.IsEmpty()) {
- CXFA_Measurement measure(wsWidth.AsWideStringC());
+ CXFA_Measurement measure(wsWidth.AsStringC());
m_rgSpecifiedColumnWidths.Add(measure.ToUnit(XFA_UNIT_Pt));
}
}
diff --git a/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp b/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp
index b12f4ce55d..78492c2702 100644
--- a/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp
+++ b/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp
@@ -297,7 +297,7 @@ static CXFA_Node* XFA_ResolveBreakTarget(CXFA_Node* pPageSetRoot,
if (wsTargetExpr.GetAt(0) == '#') {
CXFA_Node* pNode = pDocument->GetNodeByID(
ToNode(pDocument->GetXFAObject(XFA_HASHCODE_Template)),
- wsTargetExpr.Mid(1).AsWideStringC());
+ wsTargetExpr.Mid(1).AsStringC());
if (pNode) {
return pNode;
}
@@ -309,7 +309,7 @@ static CXFA_Node* XFA_ResolveBreakTarget(CXFA_Node* pPageSetRoot,
}
XFA_RESOLVENODE_RS rs;
int32_t iCount = pDocument->GetScriptContext()->ResolveObjects(
- pPageSetRoot, wsProcessedTarget.AsWideStringC(), rs,
+ pPageSetRoot, wsProcessedTarget.AsStringC(), rs,
XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties |
XFA_RESOLVENODE_Attributes | XFA_RESOLVENODE_Siblings |
XFA_RESOLVENODE_Parent);
diff --git a/xfa/fxfa/parser/xfa_locale.cpp b/xfa/fxfa/parser/xfa_locale.cpp
index c77dc2637d..b974939f41 100644
--- a/xfa/fxfa/parser/xfa_locale.cpp
+++ b/xfa/fxfa/parser/xfa_locale.cpp
@@ -72,14 +72,13 @@ void CXFA_XMLLocale::GetNumbericSymbol(FX_LOCALENUMSYMBOL eType,
default:
return;
}
- CXML_Element* pElement =
- m_pLocaleData->GetElement("", bsSymbols.AsByteStringC());
+ CXML_Element* pElement = m_pLocaleData->GetElement("", bsSymbols.AsStringC());
if (!pElement) {
return;
}
GetPattern(pElement, CFX_ByteStringC((const FX_CHAR*)bsSymbols,
bsSymbols.GetLength() - 1),
- wsName.AsWideStringC(), wsNumSymbol);
+ wsName.AsStringC(), wsNumSymbol);
}
void CXFA_XMLLocale::GetDateTimeSymbols(CFX_WideString& wsDtSymbol) const {
if (!m_pLocaleData) {
@@ -87,7 +86,7 @@ void CXFA_XMLLocale::GetDateTimeSymbols(CFX_WideString& wsDtSymbol) const {
}
CFX_ByteString bsSpace;
CXML_Element* pNumberSymbols =
- m_pLocaleData->GetElement(bsSpace.AsByteStringC(), "dateTimeSymbols");
+ m_pLocaleData->GetElement(bsSpace.AsStringC(), "dateTimeSymbols");
if (!pNumberSymbols) {
return;
}
@@ -122,11 +121,10 @@ CFX_WideString CXFA_XMLLocale::GetCalendarSymbol(const CFX_ByteStringC& symbol,
CXML_Element* pChild = m_pLocaleData->GetElement("", "calendarSymbols");
if (pChild) {
CXML_Element* pSymbolNames =
- pChild->GetElement("", pstrSymbolNames.AsByteStringC());
+ pChild->GetElement("", pstrSymbolNames.AsStringC());
if (pSymbolNames) {
if (pSymbolNames->GetAttrInteger("abbr") != bAbbr) {
- pSymbolNames =
- pChild->GetElement("", pstrSymbolNames.AsByteStringC(), 1);
+ pSymbolNames = pChild->GetElement("", pstrSymbolNames.AsStringC(), 1);
}
if (pSymbolNames && pSymbolNames->GetAttrInteger("abbr") == bAbbr) {
CXML_Element* pSymbolName =
@@ -162,7 +160,7 @@ void CXFA_XMLLocale::GetDatePattern(FX_LOCALEDATETIMESUBCATEGORY eType,
wsName = L"long";
break;
}
- GetPattern(pElement, "datePattern", wsName.AsWideStringC(), wsPattern);
+ GetPattern(pElement, "datePattern", wsName.AsStringC(), wsPattern);
}
void CXFA_XMLLocale::GetTimePattern(FX_LOCALEDATETIMESUBCATEGORY eType,
CFX_WideString& wsPattern) const {
@@ -186,7 +184,7 @@ void CXFA_XMLLocale::GetTimePattern(FX_LOCALEDATETIMESUBCATEGORY eType,
wsName = L"long";
break;
}
- GetPattern(pElement, "timePattern", wsName.AsWideStringC(), wsPattern);
+ GetPattern(pElement, "timePattern", wsName.AsStringC(), wsPattern);
}
void CXFA_XMLLocale::GetNumPattern(FX_LOCALENUMSUBCATEGORY eType,
CFX_WideString& wsPattern) const {
diff --git a/xfa/fxfa/parser/xfa_localemgr.cpp b/xfa/fxfa/parser/xfa_localemgr.cpp
index 828fcd8caa..f2b3f1f000 100644
--- a/xfa/fxfa/parser/xfa_localemgr.cpp
+++ b/xfa/fxfa/parser/xfa_localemgr.cpp
@@ -1132,7 +1132,7 @@ CXFA_LocaleMgr::CXFA_LocaleMgr(CXFA_Node* pLocaleSet, CFX_WideString wsDeflcid)
pNodeLocale = pNodeLocale->GetNodeItem(XFA_NODEITEM_NextSibling);
}
}
- m_pDefLocale = GetLocaleByName(wsDeflcid.AsWideStringC());
+ m_pDefLocale = GetLocaleByName(wsDeflcid.AsStringC());
}
CXFA_LocaleMgr::~CXFA_LocaleMgr() {
int32_t iCount = m_LocaleArray.GetSize();
@@ -1266,7 +1266,7 @@ CFX_WideStringC CXFA_LocaleMgr::GetConfigLocaleName(CXFA_Node* pConfig) {
}
m_dwLocaleFlags |= 0x01;
}
- return m_wsConfigLocale.AsWideStringC();
+ return m_wsConfigLocale.AsStringC();
}
static CXFA_TimeZoneProvider* g_pProvider = NULL;
diff --git a/xfa/fxfa/parser/xfa_localevalue.cpp b/xfa/fxfa/parser/xfa_localevalue.cpp
index 99738c60ae..9bca7b71b9 100644
--- a/xfa/fxfa/parser/xfa_localevalue.cpp
+++ b/xfa/fxfa/parser/xfa_localevalue.cpp
@@ -369,7 +369,7 @@ CFX_Unitime CXFA_LocaleValue::GetTime() const {
if (m_bValid && m_dwType == XFA_VT_TIME) {
CFX_Unitime dt(0);
FXSYS_assert(m_pLocaleMgr);
- FX_TimeFromCanonical(m_wsValue.AsWideStringC(), dt,
+ FX_TimeFromCanonical(m_wsValue.AsStringC(), dt,
m_pLocaleMgr->GetDefLocale());
return dt;
}
@@ -382,7 +382,7 @@ CFX_Unitime CXFA_LocaleValue::GetDateTime() const {
FX_DateFromCanonical(m_wsValue.Left(index), dt);
FXSYS_assert(m_pLocaleMgr);
FX_TimeFromCanonical(
- m_wsValue.Right(m_wsValue.GetLength() - index - 1).AsWideStringC(), dt,
+ m_wsValue.Right(m_wsValue.GetLength() - index - 1).AsStringC(), dt,
m_pLocaleMgr->GetDefLocale());
return dt;
}
diff --git a/xfa/fxfa/parser/xfa_object_imp.cpp b/xfa/fxfa/parser/xfa_object_imp.cpp
index c0db8111d4..8b8db882ea 100644
--- a/xfa/fxfa/parser/xfa_object_imp.cpp
+++ b/xfa/fxfa/parser/xfa_object_imp.cpp
@@ -57,8 +57,8 @@ void CXFA_Object::Script_ObjectClass_ClassName(FXJSE_HVALUE hValue,
CFX_WideStringC className;
GetClassName(className);
FXJSE_Value_SetUTF8String(
- hValue, FX_UTF8Encode(className.c_str(), className.GetLength())
- .AsByteStringC());
+ hValue,
+ FX_UTF8Encode(className.c_str(), className.GetLength()).AsStringC());
} else {
ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
}
@@ -74,7 +74,7 @@ void CXFA_Object::ThrowScriptErrorMessage(int32_t iStringID, ...) {
wsMessage.FormatV((const FX_WCHAR*)wsFormat, arg_ptr);
va_end(arg_ptr);
FXJSE_ThrowMessage(
- "", FX_UTF8Encode(wsMessage, wsMessage.GetLength()).AsByteStringC());
+ "", FX_UTF8Encode(wsMessage, wsMessage.GetLength()).AsStringC());
}
static void XFA_DeleteWideString(void* pData) {
@@ -634,7 +634,7 @@ void CXFA_Node::Script_TreeClass_ResolveNode(CFXJSE_Arguments* pArguments) {
return;
}
CFX_WideString wsExpression =
- CFX_WideString::FromUTF8(pArguments->GetUTF8String(0).AsByteStringC());
+ CFX_WideString::FromUTF8(pArguments->GetUTF8String(0).AsStringC());
CXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext();
if (!pScriptContext) {
return;
@@ -648,7 +648,7 @@ void CXFA_Node::Script_TreeClass_ResolveNode(CFXJSE_Arguments* pArguments) {
XFA_RESOLVENODE_Siblings;
XFA_RESOLVENODE_RS resoveNodeRS;
int32_t iRet = pScriptContext->ResolveObjects(
- refNode, wsExpression.AsWideStringC(), resoveNodeRS, dwFlag);
+ refNode, wsExpression.AsStringC(), resoveNodeRS, dwFlag);
if (iRet < 1) {
return FXJSE_Value_SetNull(pArguments->GetReturnValue());
}
@@ -679,7 +679,7 @@ void CXFA_Node::Script_TreeClass_ResolveNodes(CFXJSE_Arguments* pArguments) {
return;
}
CFX_WideString wsExpression =
- CFX_WideString::FromUTF8(pArguments->GetUTF8String(0).AsByteStringC());
+ CFX_WideString::FromUTF8(pArguments->GetUTF8String(0).AsStringC());
FXJSE_HVALUE hValue = pArguments->GetReturnValue();
if (!hValue) {
return;
@@ -705,7 +705,7 @@ void CXFA_Node::Script_Som_ResolveNodeList(FXJSE_HVALUE hValue,
if (refNode == NULL) {
refNode = this;
}
- pScriptContext->ResolveObjects(refNode, wsExpression.AsWideStringC(),
+ pScriptContext->ResolveObjects(refNode, wsExpression.AsStringC(),
resoveNodeRS, dwFlag);
CXFA_ArrayNodeList* pNodeList = new CXFA_ArrayNodeList(m_pDocument);
if (resoveNodeRS.dwFlags == XFA_RESOVENODE_RSTYPE_Nodes) {
@@ -753,7 +753,7 @@ void CXFA_Node::Script_TreeClass_Nodes(FXJSE_HVALUE hValue,
CFX_WideString wsMessage;
pAppProvider->LoadString(XFA_IDS_Unable_TO_SET, wsMessage);
FXJSE_ThrowMessage(
- "", FX_UTF8Encode(wsMessage, wsMessage.GetLength()).AsByteStringC());
+ "", FX_UTF8Encode(wsMessage, wsMessage.GetLength()).AsStringC());
} else {
CXFA_AttachNodeList* pNodeList = new CXFA_AttachNodeList(m_pDocument, this);
FXJSE_Value_SetObject(hValue, (CXFA_Object*)pNodeList,
@@ -815,7 +815,7 @@ void CXFA_Node::Script_TreeClass_SomExpression(FXJSE_HVALUE hValue,
CFX_WideString wsSOMExpression;
GetSOMExpression(wsSOMExpression);
FXJSE_Value_SetUTF8String(hValue,
- FX_UTF8Encode(wsSOMExpression).AsByteStringC());
+ FX_UTF8Encode(wsSOMExpression).AsStringC());
}
}
void CXFA_Node::Script_NodeClass_ApplyXSL(CFXJSE_Arguments* pArguments) {
@@ -825,7 +825,7 @@ void CXFA_Node::Script_NodeClass_ApplyXSL(CFXJSE_Arguments* pArguments) {
return;
}
CFX_WideString wsExpression =
- CFX_WideString::FromUTF8(pArguments->GetUTF8String(0).AsByteStringC());
+ CFX_WideString::FromUTF8(pArguments->GetUTF8String(0).AsStringC());
// TODO(tsepez): actually do something here?
}
void CXFA_Node::Script_NodeClass_AssignNode(CFXJSE_Arguments* pArguments) {
@@ -839,11 +839,11 @@ void CXFA_Node::Script_NodeClass_AssignNode(CFXJSE_Arguments* pArguments) {
int32_t iAction = 0;
if (iLength >= 1) {
CFX_ByteString bsExpression = pArguments->GetUTF8String(0);
- wsExpression = CFX_WideString::FromUTF8(bsExpression.AsByteStringC());
+ wsExpression = CFX_WideString::FromUTF8(bsExpression.AsStringC());
}
if (iLength >= 2) {
CFX_ByteString bsValue = pArguments->GetUTF8String(1);
- wsValue = CFX_WideString::FromUTF8(bsValue.AsByteStringC());
+ wsValue = CFX_WideString::FromUTF8(bsValue.AsStringC());
}
if (iLength >= 3) {
iAction = pArguments->GetInt32(2);
@@ -870,12 +870,12 @@ void CXFA_Node::Script_NodeClass_GetAttribute(CFXJSE_Arguments* pArguments) {
return;
}
CFX_WideString wsExpression =
- CFX_WideString::FromUTF8(pArguments->GetUTF8String(0).AsByteStringC());
+ CFX_WideString::FromUTF8(pArguments->GetUTF8String(0).AsStringC());
CFX_WideString wsValue;
- GetAttribute(wsExpression.AsWideStringC(), wsValue);
+ GetAttribute(wsExpression.AsStringC(), wsValue);
FXJSE_HVALUE hValue = pArguments->GetReturnValue();
if (hValue) {
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue).AsStringC());
}
}
void CXFA_Node::Script_NodeClass_GetElement(CFXJSE_Arguments* pArguments) {
@@ -888,13 +888,13 @@ void CXFA_Node::Script_NodeClass_GetElement(CFXJSE_Arguments* pArguments) {
int32_t iValue = 0;
if (iLength >= 1) {
CFX_ByteString bsExpression = pArguments->GetUTF8String(0);
- wsExpression = CFX_WideString::FromUTF8(bsExpression.AsByteStringC());
+ wsExpression = CFX_WideString::FromUTF8(bsExpression.AsStringC());
}
if (iLength >= 2) {
iValue = pArguments->GetInt32(1);
}
const XFA_ELEMENTINFO* pElementInfo =
- XFA_GetElementByName(wsExpression.AsWideStringC());
+ XFA_GetElementByName(wsExpression.AsStringC());
CXFA_Node* pNode = GetProperty(iValue, pElementInfo->eName);
FXJSE_Value_Set(pArguments->GetReturnValue(),
m_pDocument->GetScriptContext()->GetJSValueFromMap(pNode));
@@ -912,7 +912,7 @@ void CXFA_Node::Script_NodeClass_IsPropertySpecified(
int32_t iIndex = 0;
if (iLength >= 1) {
CFX_ByteString bsExpression = pArguments->GetUTF8String(0);
- wsExpression = CFX_WideString::FromUTF8(bsExpression.AsByteStringC());
+ wsExpression = CFX_WideString::FromUTF8(bsExpression.AsStringC());
}
if (iLength >= 2) {
bParent = pArguments->GetInt32(1) == 0 ? FALSE : TRUE;
@@ -922,14 +922,14 @@ void CXFA_Node::Script_NodeClass_IsPropertySpecified(
}
FX_BOOL bHas = FALSE;
const XFA_ATTRIBUTEINFO* pAttributeInfo =
- XFA_GetAttributeByName(wsExpression.AsWideStringC());
+ XFA_GetAttributeByName(wsExpression.AsStringC());
CFX_WideString wsValue;
if (pAttributeInfo) {
bHas = HasAttribute(pAttributeInfo->eName);
}
if (!bHas) {
const XFA_ELEMENTINFO* pElementInfo =
- XFA_GetElementByName(wsExpression.AsWideStringC());
+ XFA_GetElementByName(wsExpression.AsStringC());
bHas = (GetProperty(iIndex, pElementInfo->eName) != NULL);
}
FXJSE_HVALUE hValue = pArguments->GetReturnValue();
@@ -948,7 +948,7 @@ void CXFA_Node::Script_NodeClass_LoadXML(CFXJSE_Arguments* pArguments) {
FX_BOOL bOverwrite = 0;
if (iLength >= 1) {
CFX_ByteString bsExpression = pArguments->GetUTF8String(0);
- wsExpression = CFX_WideString::FromUTF8(bsExpression.AsByteStringC());
+ wsExpression = CFX_WideString::FromUTF8(bsExpression.AsStringC());
if (wsExpression.IsEmpty()) {
return;
}
@@ -1145,11 +1145,10 @@ void CXFA_Node::Script_NodeClass_SetAttribute(CFXJSE_Arguments* pArguments) {
return;
}
CFX_WideString wsAttributeValue =
- CFX_WideString::FromUTF8(pArguments->GetUTF8String(0).AsByteStringC());
+ CFX_WideString::FromUTF8(pArguments->GetUTF8String(0).AsStringC());
CFX_WideString wsAttribute =
- CFX_WideString::FromUTF8(pArguments->GetUTF8String(1).AsByteStringC());
- SetAttribute(wsAttribute.AsWideStringC(), wsAttributeValue.AsWideStringC(),
- TRUE);
+ CFX_WideString::FromUTF8(pArguments->GetUTF8String(1).AsStringC());
+ SetAttribute(wsAttribute.AsStringC(), wsAttributeValue.AsStringC(), TRUE);
}
void CXFA_Node::Script_NodeClass_SetElement(CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
@@ -1164,7 +1163,7 @@ void CXFA_Node::Script_NodeClass_SetElement(CFXJSE_Arguments* pArguments) {
}
if (iLength >= 2) {
CFX_ByteString bsName = pArguments->GetUTF8String(1);
- wsName = CFX_WideString::FromUTF8(bsName.AsByteStringC());
+ wsName = CFX_WideString::FromUTF8(bsName.AsStringC());
}
}
void CXFA_Node::Script_NodeClass_Ns(FXJSE_HVALUE hValue,
@@ -1175,8 +1174,7 @@ void CXFA_Node::Script_NodeClass_Ns(FXJSE_HVALUE hValue,
} else {
CFX_WideString wsNameSpace;
TryNamespace(wsNameSpace);
- FXJSE_Value_SetUTF8String(hValue,
- FX_UTF8Encode(wsNameSpace).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsNameSpace).AsStringC());
}
}
void CXFA_Node::Script_NodeClass_Model(FXJSE_HVALUE hValue,
@@ -1248,7 +1246,7 @@ void CXFA_Node::Script_ModelClass_IsCompatibleNS(CFXJSE_Arguments* pArguments) {
CFX_WideString wsNameSpace;
if (iLength >= 1) {
CFX_ByteString bsNameSpace = pArguments->GetUTF8String(0);
- wsNameSpace = CFX_WideString::FromUTF8(bsNameSpace.AsByteStringC());
+ wsNameSpace = CFX_WideString::FromUTF8(bsNameSpace.AsStringC());
}
CFX_WideString wsNodeNameSpace;
TryNamespace(wsNodeNameSpace);
@@ -1471,8 +1469,8 @@ void CXFA_Node::Script_Attribute_String(FXJSE_HVALUE hValue,
if (bSetting) {
CFX_ByteString szValue;
FXJSE_Value_ToUTF8String(hValue, szValue);
- CFX_WideString wsValue = CFX_WideString::FromUTF8(szValue.AsByteStringC());
- SetAttribute(eAttribute, wsValue.AsWideStringC(), TRUE);
+ CFX_WideString wsValue = CFX_WideString::FromUTF8(szValue.AsStringC());
+ SetAttribute(eAttribute, wsValue.AsStringC(), TRUE);
if (eAttribute == XFA_ATTRIBUTE_Use && GetClassID() == XFA_ELEMENT_Desc) {
CFX_WideString wsUseVal = wsValue, wsID, wsSOM;
CXFA_Node* pTemplateNode =
@@ -1497,12 +1495,12 @@ void CXFA_Node::Script_Attribute_String(FXJSE_HVALUE hValue,
XFA_RESOLVENODE_Siblings;
XFA_RESOLVENODE_RS resoveNodeRS;
int32_t iRet = m_pDocument->GetScriptContext()->ResolveObjects(
- pProtoRoot, wsSOM.AsWideStringC(), resoveNodeRS, dwFlag);
+ pProtoRoot, wsSOM.AsStringC(), resoveNodeRS, dwFlag);
if (iRet > 0 && resoveNodeRS.nodes[0]->IsNode()) {
pProtoNode = resoveNodeRS.nodes[0]->AsNode();
}
} else if (!wsID.IsEmpty()) {
- pProtoNode = m_pDocument->GetNodeByID(pProtoRoot, wsID.AsWideStringC());
+ pProtoNode = m_pDocument->GetNodeByID(pProtoRoot, wsID.AsStringC());
}
if (pProtoNode) {
CXFA_Node* pHeadChild = GetNodeItem(XFA_NODEITEM_FirstChild);
@@ -1529,7 +1527,7 @@ void CXFA_Node::Script_Attribute_String(FXJSE_HVALUE hValue,
CFX_WideString wsValue;
GetAttribute(eAttribute, wsValue);
FXJSE_Value_SetUTF8String(
- hValue, FX_UTF8Encode(wsValue, wsValue.GetLength()).AsByteStringC());
+ hValue, FX_UTF8Encode(wsValue, wsValue.GetLength()).AsStringC());
}
}
void CXFA_Node::Script_Attribute_StringRead(FXJSE_HVALUE hValue,
@@ -1539,7 +1537,7 @@ void CXFA_Node::Script_Attribute_StringRead(FXJSE_HVALUE hValue,
CFX_WideString wsValue;
GetAttribute(eAttribute, wsValue);
FXJSE_Value_SetUTF8String(
- hValue, FX_UTF8Encode(wsValue, wsValue.GetLength()).AsByteStringC());
+ hValue, FX_UTF8Encode(wsValue, wsValue.GetLength()).AsStringC());
} else {
ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
}
@@ -1587,15 +1585,15 @@ void CXFA_Node::Script_Som_Message(FXJSE_HVALUE hValue,
switch (iMessageType) {
case XFA_SOM_ValidationMessage:
validate.SetScriptMessageText(
- CFX_WideString::FromUTF8(bsMessage.AsByteStringC()));
+ CFX_WideString::FromUTF8(bsMessage.AsStringC()));
break;
case XFA_SOM_FormatMessage:
validate.SetFormatMessageText(
- CFX_WideString::FromUTF8(bsMessage.AsByteStringC()));
+ CFX_WideString::FromUTF8(bsMessage.AsStringC()));
break;
case XFA_SOM_MandatoryMessage:
validate.SetNullMessageText(
- CFX_WideString::FromUTF8(bsMessage.AsByteStringC()));
+ CFX_WideString::FromUTF8(bsMessage.AsStringC()));
break;
default:
break;
@@ -1622,7 +1620,7 @@ void CXFA_Node::Script_Som_Message(FXJSE_HVALUE hValue,
default:
break;
}
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsMessage).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsMessage).AsStringC());
}
}
void CXFA_Node::Script_Som_ValidationMessage(FXJSE_HVALUE hValue,
@@ -1663,8 +1661,7 @@ void CXFA_Node::Script_Som_DefaultValue(FXJSE_HVALUE hValue,
if (!(FXJSE_Value_IsNull(hValue) || FXJSE_Value_IsUndefined(hValue))) {
FXJSE_Value_ToUTF8String(hValue, newValue);
}
- CFX_WideString wsNewValue =
- CFX_WideString::FromUTF8(newValue.AsByteStringC());
+ CFX_WideString wsNewValue = CFX_WideString::FromUTF8(newValue.AsStringC());
CFX_WideString wsFormatValue(wsNewValue);
CXFA_WidgetData* pContainerWidgetData = NULL;
if (GetPacketID() == XFA_XDPPACKET_Datasets) {
@@ -1690,7 +1687,7 @@ void CXFA_Node::Script_Som_DefaultValue(FXJSE_HVALUE hValue,
pContainerWidgetData = GetContainerWidgetData();
}
if (pContainerWidgetData) {
- pContainerWidgetData->GetFormatDataValue(wsNewValue.AsWideStringC(),
+ pContainerWidgetData->GetFormatDataValue(wsNewValue.AsStringC(),
wsFormatValue);
}
SetScriptContent(wsNewValue, wsFormatValue, TRUE, TRUE);
@@ -1702,11 +1699,11 @@ void CXFA_Node::Script_Som_DefaultValue(FXJSE_HVALUE hValue,
} else if (classID == XFA_ELEMENT_Integer) {
FXJSE_Value_SetInteger(hValue, FXSYS_wtoi(content));
} else if (classID == XFA_ELEMENT_Float || classID == XFA_ELEMENT_Decimal) {
- CFX_Decimal decimal(content.AsWideStringC());
+ CFX_Decimal decimal(content.AsStringC());
FXJSE_Value_SetFloat(hValue, (FX_FLOAT)(double)decimal);
} else {
FXJSE_Value_SetUTF8String(
- hValue, FX_UTF8Encode(content, content.GetLength()).AsByteStringC());
+ hValue, FX_UTF8Encode(content, content.GetLength()).AsStringC());
}
}
}
@@ -1722,7 +1719,7 @@ void CXFA_Node::Script_Som_DefaultValue_Read(FXJSE_HVALUE hValue,
FXJSE_Value_SetNull(hValue);
} else {
FXJSE_Value_SetUTF8String(
- hValue, FX_UTF8Encode(content, content.GetLength()).AsByteStringC());
+ hValue, FX_UTF8Encode(content, content.GetLength()).AsStringC());
}
}
void CXFA_Node::Script_Boolean_Value(FXJSE_HVALUE hValue,
@@ -1738,7 +1735,7 @@ void CXFA_Node::Script_Boolean_Value(FXJSE_HVALUE hValue,
CFX_WideString wsFormatValue(wsNewValue);
CXFA_WidgetData* pContainerWidgetData = GetContainerWidgetData();
if (pContainerWidgetData) {
- pContainerWidgetData->GetFormatDataValue(wsNewValue.AsWideStringC(),
+ pContainerWidgetData->GetFormatDataValue(wsNewValue.AsStringC(),
wsFormatValue);
}
SetScriptContent(wsNewValue, wsFormatValue, TRUE, TRUE);
@@ -1849,7 +1846,7 @@ void CXFA_Node::Script_Som_BorderColor(FXJSE_HVALUE hValue,
if (bSetting) {
CFX_ByteString bsValue;
FXJSE_Value_ToUTF8String(hValue, bsValue);
- strColor = CFX_WideString::FromUTF8(bsValue.AsByteStringC());
+ strColor = CFX_WideString::FromUTF8(bsValue.AsStringC());
int32_t r = 0, g = 0, b = 0;
XFA_STRING_TO_RGB(strColor, r, g, b);
FX_ARGB rgb = ArgbEncode(100, r, g, b);
@@ -1863,7 +1860,7 @@ void CXFA_Node::Script_Som_BorderColor(FXJSE_HVALUE hValue,
int32_t a, r, g, b;
ArgbDecode(color, a, r, g, b);
strColor.Format(L"%d,%d,%d", r, g, b);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(strColor).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(strColor).AsStringC());
}
}
void CXFA_Node::Script_Som_BorderWidth(FXJSE_HVALUE hValue,
@@ -1879,18 +1876,17 @@ void CXFA_Node::Script_Som_BorderWidth(FXJSE_HVALUE hValue,
if (bSetting) {
CFX_ByteString bsValue;
FXJSE_Value_ToUTF8String(hValue, bsValue);
- wsThickness = CFX_WideString::FromUTF8(bsValue.AsByteStringC());
+ wsThickness = CFX_WideString::FromUTF8(bsValue.AsStringC());
for (int32_t i = 0; i < iSize; ++i) {
CXFA_Edge edge = border.GetEdge(i);
- CXFA_Measurement thickness(wsThickness.AsWideStringC());
+ CXFA_Measurement thickness(wsThickness.AsStringC());
edge.SetMSThickness(thickness);
}
} else {
CXFA_Edge edge = border.GetEdge(0);
CXFA_Measurement thickness = edge.GetMSThickness();
thickness.ToString(wsThickness);
- FXJSE_Value_SetUTF8String(hValue,
- FX_UTF8Encode(wsThickness).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsThickness).AsStringC());
}
}
void CXFA_Node::Script_Som_FillColor(FXJSE_HVALUE hValue,
@@ -1910,7 +1906,7 @@ void CXFA_Node::Script_Som_FillColor(FXJSE_HVALUE hValue,
if (bSetting) {
CFX_ByteString bsValue;
FXJSE_Value_ToUTF8String(hValue, bsValue);
- wsColor = CFX_WideString::FromUTF8(bsValue.AsByteStringC());
+ wsColor = CFX_WideString::FromUTF8(bsValue.AsStringC());
int32_t r, g, b;
XFA_STRING_TO_RGB(wsColor, r, g, b);
FX_ARGB color = ArgbEncode(0xff, r, g, b);
@@ -1920,7 +1916,7 @@ void CXFA_Node::Script_Som_FillColor(FXJSE_HVALUE hValue,
int32_t a, r, g, b;
ArgbDecode(color, a, r, g, b);
wsColor.Format(L"%d,%d,%d", r, g, b);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsColor).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsColor).AsStringC());
}
}
void CXFA_Node::Script_Som_DataNode(FXJSE_HVALUE hValue,
@@ -1951,7 +1947,7 @@ void CXFA_Node::Script_Draw_DefaultValue(FXJSE_HVALUE hValue,
CFX_ByteString newValue;
FXJSE_Value_ToUTF8String(hValue, newValue);
CFX_WideString wsNewValue =
- CFX_WideString::FromUTF8(newValue.AsByteStringC());
+ CFX_WideString::FromUTF8(newValue.AsStringC());
CFX_WideString wsFormatValue(wsNewValue);
SetScriptContent(wsNewValue, wsFormatValue, TRUE, TRUE);
} else if (uiType != XFA_ELEMENT_Image) {
@@ -1963,7 +1959,7 @@ void CXFA_Node::Script_Draw_DefaultValue(FXJSE_HVALUE hValue,
FXJSE_Value_SetNull(hValue);
} else {
FXJSE_Value_SetUTF8String(
- hValue, FX_UTF8Encode(content, content.GetLength()).AsByteStringC());
+ hValue, FX_UTF8Encode(content, content.GetLength()).AsStringC());
}
}
}
@@ -1986,8 +1982,7 @@ void CXFA_Node::Script_Field_DefaultValue(FXJSE_HVALUE hValue,
if (!(FXJSE_Value_IsNull(hValue) || FXJSE_Value_IsUndefined(hValue))) {
FXJSE_Value_ToUTF8String(hValue, newValue);
}
- CFX_WideString wsNewText =
- CFX_WideString::FromUTF8(newValue.AsByteStringC());
+ CFX_WideString wsNewText = CFX_WideString::FromUTF8(newValue.AsStringC());
CXFA_Node* pUIChild = pWidgetData->GetUIChild();
if (pUIChild->GetClassID() == XFA_ELEMENT_NumericEdit) {
int32_t iLeadDigits = 0;
@@ -2000,7 +1995,7 @@ void CXFA_Node::Script_Field_DefaultValue(FXJSE_HVALUE hValue,
CXFA_WidgetData* pContainerWidgetData = GetContainerWidgetData();
CFX_WideString wsFormatText(wsNewText);
if (pContainerWidgetData) {
- pContainerWidgetData->GetFormatDataValue(wsNewText.AsWideStringC(),
+ pContainerWidgetData->GetFormatDataValue(wsNewText.AsStringC(),
wsFormatText);
}
SetScriptContent(wsNewText, wsFormatText, TRUE, TRUE);
@@ -2017,10 +2012,9 @@ void CXFA_Node::Script_Field_DefaultValue(FXJSE_HVALUE hValue,
if (eUI == XFA_ELEMENT_NumericEdit &&
(pNode->GetInteger(XFA_ATTRIBUTE_FracDigits) == -1)) {
FXJSE_Value_SetUTF8String(
- hValue,
- FX_UTF8Encode(content, content.GetLength()).AsByteStringC());
+ hValue, FX_UTF8Encode(content, content.GetLength()).AsStringC());
} else {
- CFX_Decimal decimal(content.AsWideStringC());
+ CFX_Decimal decimal(content.AsStringC());
FXJSE_Value_SetFloat(hValue, (FX_FLOAT)(double)decimal);
}
} else if (pNode && pNode->GetClassID() == XFA_ELEMENT_Integer) {
@@ -2028,12 +2022,11 @@ void CXFA_Node::Script_Field_DefaultValue(FXJSE_HVALUE hValue,
} else if (pNode && pNode->GetClassID() == XFA_ELEMENT_Boolean) {
FXJSE_Value_SetBoolean(hValue, FXSYS_wtoi(content) == 0 ? FALSE : TRUE);
} else if (pNode && pNode->GetClassID() == XFA_ELEMENT_Float) {
- CFX_Decimal decimal(content.AsWideStringC());
+ CFX_Decimal decimal(content.AsStringC());
FXJSE_Value_SetFloat(hValue, (FX_FLOAT)(double)decimal);
} else {
FXJSE_Value_SetUTF8String(
- hValue,
- FX_UTF8Encode(content, content.GetLength()).AsByteStringC());
+ hValue, FX_UTF8Encode(content, content.GetLength()).AsStringC());
}
}
}
@@ -2049,11 +2042,11 @@ void CXFA_Node::Script_Field_EditValue(FXJSE_HVALUE hValue,
if (bSetting) {
CFX_ByteString bsValue;
FXJSE_Value_ToUTF8String(hValue, bsValue);
- wsValue = CFX_WideString::FromUTF8(bsValue.AsByteStringC());
+ wsValue = CFX_WideString::FromUTF8(bsValue.AsStringC());
pWidgetData->SetValue(wsValue, XFA_VALUEPICTURE_Edit);
} else {
pWidgetData->GetValue(wsValue, XFA_VALUEPICTURE_Edit);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue).AsStringC());
}
}
void CXFA_Node::Script_Som_FontColor(FXJSE_HVALUE hValue,
@@ -2072,7 +2065,7 @@ void CXFA_Node::Script_Som_FontColor(FXJSE_HVALUE hValue,
if (bSetting) {
CFX_ByteString bsValue;
FXJSE_Value_ToUTF8String(hValue, bsValue);
- wsColor = CFX_WideString::FromUTF8(bsValue.AsByteStringC());
+ wsColor = CFX_WideString::FromUTF8(bsValue.AsStringC());
int32_t r, g, b;
XFA_STRING_TO_RGB(wsColor, r, g, b);
FX_ARGB color = ArgbEncode(0xff, r, g, b);
@@ -2082,7 +2075,7 @@ void CXFA_Node::Script_Som_FontColor(FXJSE_HVALUE hValue,
int32_t a, r, g, b;
ArgbDecode(color, a, r, g, b);
wsColor.Format(L"%d,%d,%d", r, g, b);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsColor).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsColor).AsStringC());
}
}
void CXFA_Node::Script_Field_FormatMessage(FXJSE_HVALUE hValue,
@@ -2101,11 +2094,11 @@ void CXFA_Node::Script_Field_FormattedValue(FXJSE_HVALUE hValue,
if (bSetting) {
CFX_ByteString bsValue;
FXJSE_Value_ToUTF8String(hValue, bsValue);
- wsValue = CFX_WideString::FromUTF8(bsValue.AsByteStringC());
+ wsValue = CFX_WideString::FromUTF8(bsValue.AsStringC());
pWidgetData->SetValue(wsValue, XFA_VALUEPICTURE_Display);
} else {
pWidgetData->GetValue(wsValue, XFA_VALUEPICTURE_Display);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue).AsStringC());
}
}
void CXFA_Node::Script_Som_Mandatory(FXJSE_HVALUE hValue,
@@ -2120,7 +2113,7 @@ void CXFA_Node::Script_Som_Mandatory(FXJSE_HVALUE hValue,
if (bSetting) {
CFX_ByteString bsValue;
FXJSE_Value_ToUTF8String(hValue, bsValue);
- wsValue = CFX_WideString::FromUTF8(bsValue.AsByteStringC());
+ wsValue = CFX_WideString::FromUTF8(bsValue.AsStringC());
validate.SetNullTest(wsValue);
} else {
int32_t iValue = validate.GetNullTest();
@@ -2129,7 +2122,7 @@ void CXFA_Node::Script_Som_Mandatory(FXJSE_HVALUE hValue,
if (pInfo) {
wsValue = pInfo->pName;
}
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue).AsStringC());
}
}
void CXFA_Node::Script_Som_MandatoryMessage(FXJSE_HVALUE hValue,
@@ -2176,7 +2169,7 @@ void CXFA_Node::Script_Field_ExecEvent(CFXJSE_Arguments* pArguments) {
if (argc == 1) {
CFX_ByteString eventString = pArguments->GetUTF8String(0);
int32_t iRet = execSingleEventByName(
- CFX_WideString::FromUTF8(eventString.AsByteStringC()).AsWideStringC(),
+ CFX_WideString::FromUTF8(eventString.AsStringC()).AsStringC(),
XFA_ELEMENT_Field);
if (eventString == "validate") {
FXJSE_Value_SetBoolean(pArguments->GetReturnValue(),
@@ -2237,7 +2230,7 @@ void CXFA_Node::Script_Field_GetSaveItem(CFXJSE_Arguments* pArguments) {
if (bHasItem) {
FXJSE_Value_SetUTF8String(
pArguments->GetReturnValue(),
- FX_UTF8Encode(wsValue, wsValue.GetLength()).AsByteStringC());
+ FX_UTF8Encode(wsValue, wsValue.GetLength()).AsStringC());
} else {
FXJSE_Value_SetNull(pArguments->GetReturnValue());
}
@@ -2253,13 +2246,12 @@ void CXFA_Node::Script_Field_BoundItem(CFXJSE_Arguments* pArguments) {
return;
}
CFX_ByteString bsValue = pArguments->GetUTF8String(0);
- CFX_WideString wsValue = CFX_WideString::FromUTF8(bsValue.AsByteStringC());
+ CFX_WideString wsValue = CFX_WideString::FromUTF8(bsValue.AsStringC());
CFX_WideString wsBoundValue;
- pWidgetData->GetItemValue(wsValue.AsWideStringC(), wsBoundValue);
+ pWidgetData->GetItemValue(wsValue.AsStringC(), wsBoundValue);
FXJSE_HVALUE hValue = pArguments->GetReturnValue();
if (hValue) {
- FXJSE_Value_SetUTF8String(hValue,
- FX_UTF8Encode(wsBoundValue).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsBoundValue).AsStringC());
}
}
void CXFA_Node::Script_Field_GetItemState(CFXJSE_Arguments* pArguments) {
@@ -2316,7 +2308,7 @@ void CXFA_Node::Script_Field_GetDisplayItem(CFXJSE_Arguments* pArguments) {
if (bHasItem) {
FXJSE_Value_SetUTF8String(
pArguments->GetReturnValue(),
- FX_UTF8Encode(wsValue, wsValue.GetLength()).AsByteStringC());
+ FX_UTF8Encode(wsValue, wsValue.GetLength()).AsStringC());
} else {
FXJSE_Value_SetNull(pArguments->GetReturnValue());
}
@@ -2355,11 +2347,11 @@ void CXFA_Node::Script_Field_AddItem(CFXJSE_Arguments* pArguments) {
CFX_WideString wsValue;
if (iLength >= 1) {
CFX_ByteString bsLabel = pArguments->GetUTF8String(0);
- wsLabel = CFX_WideString::FromUTF8(bsLabel.AsByteStringC());
+ wsLabel = CFX_WideString::FromUTF8(bsLabel.AsStringC());
}
if (iLength >= 2) {
CFX_ByteString bsValue = pArguments->GetUTF8String(1);
- wsValue = CFX_WideString::FromUTF8(bsValue.AsByteStringC());
+ wsValue = CFX_WideString::FromUTF8(bsValue.AsStringC());
}
pWidgetData->InsertItem(wsLabel, wsValue, -1, TRUE);
}
@@ -2399,15 +2391,14 @@ void CXFA_Node::Script_ExclGroup_DefaultAndRawValue(FXJSE_HVALUE hValue,
CFX_ByteString bsValue;
FXJSE_Value_ToUTF8String(hValue, bsValue);
pWidgetData->SetSelectedMemberByValue(
- CFX_WideString::FromUTF8(bsValue.AsByteStringC()).AsWideStringC(), TRUE,
- TRUE);
+ CFX_WideString::FromUTF8(bsValue.AsStringC()).AsStringC(), TRUE, TRUE);
} else {
CFX_WideString wsValue = GetScriptContent(TRUE);
XFA_VERSION curVersion = GetDocument()->GetCurVersionMode();
if (wsValue.IsEmpty() && curVersion >= XFA_VERSION_300) {
FXJSE_Value_SetNull(hValue);
} else {
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue).AsStringC());
}
}
}
@@ -2419,7 +2410,7 @@ void CXFA_Node::Script_ExclGroup_ExecEvent(CFXJSE_Arguments* pArguments) {
if (argc == 1) {
CFX_ByteString eventString = pArguments->GetUTF8String(0);
execSingleEventByName(
- CFX_WideString::FromUTF8(eventString.AsByteStringC()).AsWideStringC(),
+ CFX_WideString::FromUTF8(eventString.AsStringC()).AsStringC(),
XFA_ELEMENT_ExclGroup);
} else {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execEvent");
@@ -2439,7 +2430,7 @@ void CXFA_Node::Script_ExclGroup_SelectedMember(CFXJSE_Arguments* pArguments) {
CFX_ByteString szName;
szName = pArguments->GetUTF8String(0);
pReturnNode = pWidgetData->SetSelectedMember(
- CFX_WideString::FromUTF8(szName.AsByteStringC()).AsWideStringC());
+ CFX_WideString::FromUTF8(szName.AsStringC()).AsStringC());
}
if (pReturnNode) {
FXJSE_Value_Set(
@@ -2600,14 +2591,13 @@ void CXFA_Node::Script_Subform_Locale(FXJSE_HVALUE hValue,
CFX_ByteString bsLocaleName;
FXJSE_Value_ToUTF8String(hValue, bsLocaleName);
SetCData(XFA_ATTRIBUTE_Locale,
- CFX_WideString::FromUTF8(bsLocaleName.AsByteStringC()), TRUE,
- TRUE);
+ CFX_WideString::FromUTF8(bsLocaleName.AsStringC()), TRUE, TRUE);
} else {
CFX_WideString wsLocaleName;
GetLocaleName(wsLocaleName);
FXJSE_Value_SetUTF8String(
hValue,
- FX_UTF8Encode(wsLocaleName, wsLocaleName.GetLength()).AsByteStringC());
+ FX_UTF8Encode(wsLocaleName, wsLocaleName.GetLength()).AsStringC());
}
}
void CXFA_Node::Script_Subform_ExecEvent(CFXJSE_Arguments* pArguments) {
@@ -2615,7 +2605,7 @@ void CXFA_Node::Script_Subform_ExecEvent(CFXJSE_Arguments* pArguments) {
if (argc == 1) {
CFX_ByteString eventString = pArguments->GetUTF8String(0);
execSingleEventByName(
- CFX_WideString::FromUTF8(eventString.AsByteStringC()).AsWideStringC(),
+ CFX_WideString::FromUTF8(eventString.AsStringC()).AsStringC(),
XFA_ELEMENT_Subform);
} else {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execEvent");
@@ -2721,17 +2711,17 @@ void CXFA_Node::Script_Template_CreateNode(CFXJSE_Arguments* pArguments) {
CFX_WideString strName;
CFX_WideString strNameSpace;
CFX_ByteString bsTagName = pArguments->GetUTF8String(0);
- strTagName = CFX_WideString::FromUTF8(bsTagName.AsByteStringC());
+ strTagName = CFX_WideString::FromUTF8(bsTagName.AsStringC());
if (argc > 1) {
CFX_ByteString bsName = pArguments->GetUTF8String(1);
- strName = CFX_WideString::FromUTF8(bsName.AsByteStringC());
+ strName = CFX_WideString::FromUTF8(bsName.AsStringC());
if (argc == 3) {
CFX_ByteString bsNameSpace = pArguments->GetUTF8String(2);
- strNameSpace = CFX_WideString::FromUTF8(bsNameSpace.AsByteStringC());
+ strNameSpace = CFX_WideString::FromUTF8(bsNameSpace.AsStringC());
}
}
const XFA_ELEMENTINFO* pElement =
- XFA_GetElementByName(strTagName.AsWideStringC());
+ XFA_GetElementByName(strTagName.AsStringC());
CXFA_Node* pNewNode = CreateSamePacketNode(pElement->eName);
if (!pNewNode) {
FXJSE_Value_SetNull(pArguments->GetReturnValue());
@@ -2739,8 +2729,7 @@ void CXFA_Node::Script_Template_CreateNode(CFXJSE_Arguments* pArguments) {
if (!strName.IsEmpty()) {
if (XFA_GetAttributeOfElement(pElement->eName, XFA_ATTRIBUTE_Name,
XFA_XDPPACKET_UNKNOWN)) {
- pNewNode->SetAttribute(XFA_ATTRIBUTE_Name, strName.AsWideStringC(),
- TRUE);
+ pNewNode->SetAttribute(XFA_ATTRIBUTE_Name, strName.AsStringC(), TRUE);
if (pNewNode->GetPacketID() == XFA_XDPPACKET_Datasets) {
pNewNode->CreateXMLMappingNode();
}
@@ -3497,15 +3486,13 @@ void CXFA_Node::Script_Form_Checksum(FXJSE_HVALUE hValue,
if (bSetting) {
CFX_ByteString bsChecksum;
FXJSE_Value_ToUTF8String(hValue, bsChecksum);
- SetAttribute(
- XFA_ATTRIBUTE_Checksum,
- CFX_WideString::FromUTF8(bsChecksum.AsByteStringC()).AsWideStringC());
+ SetAttribute(XFA_ATTRIBUTE_Checksum,
+ CFX_WideString::FromUTF8(bsChecksum.AsStringC()).AsStringC());
} else {
CFX_WideString wsChecksum;
GetAttribute(XFA_ATTRIBUTE_Checksum, wsChecksum, FALSE);
FXJSE_Value_SetUTF8String(
- hValue,
- FX_UTF8Encode(wsChecksum, wsChecksum.GetLength()).AsByteStringC());
+ hValue, FX_UTF8Encode(wsChecksum, wsChecksum.GetLength()).AsStringC());
}
}
void CXFA_Node::Script_Packet_GetAttribute(CFXJSE_Arguments* pArguments) {
@@ -3516,13 +3503,13 @@ void CXFA_Node::Script_Packet_GetAttribute(CFXJSE_Arguments* pArguments) {
CFDE_XMLNode* pXMLNode = GetXMLMappingNode();
if (pXMLNode && pXMLNode->GetType() == FDE_XMLNODE_Element) {
static_cast<CFDE_XMLElement*>(pXMLNode)
- ->GetString(CFX_WideString::FromUTF8(bsAttributeName.AsByteStringC()),
+ ->GetString(CFX_WideString::FromUTF8(bsAttributeName.AsStringC()),
wsAttributeValue);
}
FXJSE_Value_SetUTF8String(
pArguments->GetReturnValue(),
FX_UTF8Encode(wsAttributeValue, wsAttributeValue.GetLength())
- .AsByteStringC());
+ .AsStringC());
} else {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"getAttribute");
@@ -3536,8 +3523,8 @@ void CXFA_Node::Script_Packet_SetAttribute(CFXJSE_Arguments* pArguments) {
CFDE_XMLNode* pXMLNode = GetXMLMappingNode();
if (pXMLNode && pXMLNode->GetType() == FDE_XMLNODE_Element) {
static_cast<CFDE_XMLElement*>(pXMLNode)
- ->SetString(CFX_WideString::FromUTF8(bsName.AsByteStringC()),
- CFX_WideString::FromUTF8(bsValue.AsByteStringC()));
+ ->SetString(CFX_WideString::FromUTF8(bsName.AsStringC()),
+ CFX_WideString::FromUTF8(bsValue.AsStringC()));
}
FXJSE_Value_SetNull(pArguments->GetReturnValue());
} else {
@@ -3549,7 +3536,7 @@ void CXFA_Node::Script_Packet_RemoveAttribute(CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if (argc == 1) {
CFX_ByteString bsName = pArguments->GetUTF8String(0);
- CFX_WideString wsName = CFX_WideString::FromUTF8(bsName.AsByteStringC());
+ CFX_WideString wsName = CFX_WideString::FromUTF8(bsName.AsStringC());
CFDE_XMLNode* pXMLNode = GetXMLMappingNode();
if (pXMLNode && pXMLNode->GetType() == FDE_XMLNODE_Element) {
CFDE_XMLElement* pXMLElement = static_cast<CFDE_XMLElement*>(pXMLNode);
@@ -3573,7 +3560,7 @@ void CXFA_Node::Script_Packet_Content(FXJSE_HVALUE hValue,
if (pXMLNode && pXMLNode->GetType() == FDE_XMLNODE_Element) {
CFDE_XMLElement* pXMLElement = static_cast<CFDE_XMLElement*>(pXMLNode);
pXMLElement->SetTextData(
- CFX_WideString::FromUTF8(bsNewContent.AsByteStringC()));
+ CFX_WideString::FromUTF8(bsNewContent.AsStringC()));
}
} else {
CFX_WideString wsTextData;
@@ -3583,8 +3570,7 @@ void CXFA_Node::Script_Packet_Content(FXJSE_HVALUE hValue,
pXMLElement->GetTextData(wsTextData);
}
FXJSE_Value_SetUTF8String(
- hValue,
- FX_UTF8Encode(wsTextData, wsTextData.GetLength()).AsByteStringC());
+ hValue, FX_UTF8Encode(wsTextData, wsTextData.GetLength()).AsStringC());
}
}
void CXFA_Node::Script_Source_Next(CFXJSE_Arguments* pArguments) {
@@ -3736,8 +3722,7 @@ void CXFA_Node::Script_Script_Stateless(FXJSE_HVALUE hValue,
ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
return;
}
- FXJSE_Value_SetUTF8String(hValue,
- FX_UTF8Encode(FX_WSTRC(L"0")).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(FX_WSTRC(L"0")).AsStringC());
}
void CXFA_Node::Script_Encrypt_Format(FXJSE_HVALUE hValue,
FX_BOOL bSetting,
@@ -3957,7 +3942,7 @@ FX_BOOL CXFA_Node::SetCData(XFA_ATTRIBUTE eAttr,
CFX_WideString* pClone = new CFX_WideString(wsValue);
SetUserData(pKey, pClone, &deleteWideStringCallBack);
} else {
- SetMapModuleString(pKey, wsValue.AsWideStringC());
+ SetMapModuleString(pKey, wsValue.AsStringC());
if (eAttr == XFA_ATTRIBUTE_Name)
UpdateNameHash();
}
@@ -4314,8 +4299,7 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent,
GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, FALSE);
if (wsContentType == FX_WSTRC(L"text/html")) {
wsContentType = FX_WSTRC(L"");
- SetAttribute(XFA_ATTRIBUTE_ContentType,
- wsContentType.AsWideStringC());
+ SetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType.AsStringC());
}
}
CXFA_Node* pContentRawDataNode = GetNodeItem(XFA_NODEITEM_FirstChild);
@@ -5227,7 +5211,7 @@ void CXFA_Node::MoveBufferMapData(CXFA_Node* pDstModule, void* pKey) {
CFX_WideString wsFormatValue(wsValue);
CXFA_WidgetData* pWidgetData = pDstModule->GetContainerWidgetData();
if (pWidgetData) {
- pWidgetData->GetFormatDataValue(wsValue.AsWideStringC(), wsFormatValue);
+ pWidgetData->GetFormatDataValue(wsValue.AsStringC(), wsFormatValue);
}
pDstModule->SetScriptContent(wsValue, wsFormatValue, TRUE, TRUE);
}
@@ -5326,8 +5310,8 @@ void CXFA_NodeList::Script_TreelistClass_NamedItem(
int32_t argc = pArguments->GetLength();
if (argc == 1) {
CFX_ByteString szName = pArguments->GetUTF8String(0);
- CXFA_Node* pNode = NamedItem(
- CFX_WideString::FromUTF8(szName.AsByteStringC()).AsWideStringC());
+ CXFA_Node* pNode =
+ NamedItem(CFX_WideString::FromUTF8(szName.AsStringC()).AsStringC());
if (!pNode) {
return;
}
diff --git a/xfa/fxfa/parser/xfa_parser_imp.cpp b/xfa/fxfa/parser/xfa_parser_imp.cpp
index 7b8e73410e..5cd28e79df 100644
--- a/xfa/fxfa/parser/xfa_parser_imp.cpp
+++ b/xfa/fxfa/parser/xfa_parser_imp.cpp
@@ -226,7 +226,7 @@ static inline void XFA_FDEExtension_GetElementTagNamespaceURI(
CFX_WideString wsNodeStr;
pElement->GetNamespacePrefix(wsNodeStr);
if (!XFA_FDEExtension_ResolveNamespaceQualifier(
- pElement, wsNodeStr.AsWideStringC(), wsNamespaceURI)) {
+ pElement, wsNodeStr.AsStringC(), wsNamespaceURI)) {
wsNamespaceURI.Empty();
}
}
@@ -284,7 +284,7 @@ static FX_BOOL XFA_FDEExtension_ResolveAttribute(
return FALSE;
}
if (!XFA_FDEExtension_ResolveNamespaceQualifier(
- pElement, wsNSPrefix.AsWideStringC(), wsNamespaceURI)) {
+ pElement, wsNSPrefix.AsStringC(), wsNamespaceURI)) {
wsNamespaceURI.Empty();
return FALSE;
}
@@ -319,7 +319,7 @@ static FX_BOOL XFA_FDEExtension_FindAttributeWithNS(
wsNSPrefix = wsAttrName.Left(iFind);
}
if (!XFA_FDEExtension_ResolveNamespaceQualifier(
- pElement, wsNSPrefix.AsWideStringC(), wsAttrNS)) {
+ pElement, wsNSPrefix.AsStringC(), wsAttrNS)) {
continue;
}
if (bMatchNSAsPrefix) {
@@ -434,7 +434,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_XDP(
CFX_WideString wsPacketName;
pElement->GetLocalTagName(wsPacketName);
const XFA_PACKETINFO* pPacketInfo =
- XFA_GetPacketByName(wsPacketName.AsWideStringC());
+ XFA_GetPacketByName(wsPacketName.AsStringC());
if (pPacketInfo && pPacketInfo->pURI) {
if (!XFA_FDEExtension_MatchNodeName(pElement, pPacketInfo->pName,
pPacketInfo->pURI,
@@ -586,7 +586,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_TemplateForm(
}
pNode->SetCData(XFA_ATTRIBUTE_Name,
XFA_GetPacketByIndex(XFA_PACKET_Form)->pName);
- pNode->SetAttribute(XFA_ATTRIBUTE_Checksum, wsChecksum.AsWideStringC());
+ pNode->SetAttribute(XFA_ATTRIBUTE_Checksum, wsChecksum.AsStringC());
CXFA_Node* pTemplateRoot =
m_pRootNode->GetFirstChildByClass(XFA_ELEMENT_Template);
CXFA_Node* pTemplateChosen =
@@ -823,7 +823,7 @@ CXFA_Node* CXFA_SimpleParser::NormalLoader(CXFA_Node* pXFANode,
CFX_WideString wsTagName;
pXMLElement->GetLocalTagName(wsTagName);
const XFA_ELEMENTINFO* pElemInfo =
- XFA_GetElementByName(wsTagName.AsWideStringC());
+ XFA_GetElementByName(wsTagName.AsStringC());
if (!pElemInfo) {
continue;
}
@@ -843,8 +843,7 @@ CXFA_Node* CXFA_SimpleParser::NormalLoader(CXFA_Node* pXFANode,
return NULL;
}
if (ePacketID == XFA_XDPPACKET_Config) {
- pXFAChild->SetAttribute(XFA_ATTRIBUTE_Name,
- wsTagName.AsWideStringC());
+ pXFAChild->SetAttribute(XFA_ATTRIBUTE_Name, wsTagName.AsStringC());
}
FX_BOOL IsNeedValue = TRUE;
for (int32_t i = 0, count = pXMLElement->CountAttributes(); i < count;
@@ -854,13 +853,13 @@ CXFA_Node* CXFA_SimpleParser::NormalLoader(CXFA_Node* pXFANode,
CFX_WideString wsAttrValue;
pXMLElement->GetAttribute(i, wsAttrQualifiedName, wsAttrValue);
XFA_FDEExtension_GetAttributeLocalName(
- wsAttrQualifiedName.AsWideStringC(), wsAttrName);
+ wsAttrQualifiedName.AsStringC(), wsAttrName);
if (wsAttrName == FX_WSTRC(L"nil") &&
wsAttrValue == FX_WSTRC(L"true")) {
IsNeedValue = FALSE;
}
const XFA_ATTRIBUTEINFO* lpAttrInfo =
- XFA_GetAttributeByName(wsAttrName.AsWideStringC());
+ XFA_GetAttributeByName(wsAttrName.AsStringC());
if (!lpAttrInfo) {
continue;
}
@@ -868,8 +867,7 @@ CXFA_Node* CXFA_SimpleParser::NormalLoader(CXFA_Node* pXFANode,
lpAttrInfo->eName != XFA_ATTRIBUTE_Save) {
continue;
}
- pXFAChild->SetAttribute(lpAttrInfo->eName,
- wsAttrValue.AsWideStringC());
+ pXFAChild->SetAttribute(lpAttrInfo->eName, wsAttrValue.AsStringC());
}
pXFANode->InsertChild(pXFAChild);
if (pElemInfo->eName == XFA_ELEMENT_Validate ||
@@ -1112,8 +1110,8 @@ void CXFA_SimpleParser::ParseDataGroup(CXFA_Node* pXFANode,
CFX_WideString wsAttrNamespaceURI;
pXMLElement->GetAttribute(i, wsAttrQualifiedName, wsAttrValue);
if (!XFA_FDEExtension_ResolveAttribute(
- pXMLElement, wsAttrQualifiedName.AsWideStringC(),
- wsAttrName, wsAttrNamespaceURI)) {
+ pXMLElement, wsAttrQualifiedName.AsStringC(), wsAttrName,
+ wsAttrNamespaceURI)) {
continue;
}
if (wsAttrName == FX_WSTRC(L"nil") &&
diff --git a/xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp
index 5d48e3eaf7..64f6b93cb9 100644
--- a/xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp
+++ b/xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp
@@ -32,9 +32,9 @@ void Script_EventPseudoModel_StringProperty(FXJSE_HVALUE hValue,
if (bSetting) {
CFX_ByteString bsValue;
FXJSE_Value_ToUTF8String(hValue, bsValue);
- wsValue = CFX_WideString::FromUTF8(bsValue.AsByteStringC());
+ wsValue = CFX_WideString::FromUTF8(bsValue.AsStringC());
} else {
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue).AsStringC());
}
}
void Script_EventPseudoModel_InterProperty(FXJSE_HVALUE hValue,
diff --git a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
index 48edc73777..647962a2ab 100644
--- a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
+++ b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
@@ -32,7 +32,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_LoadString(
uint32_t dwFlag) {
CFX_WideString wsValue;
pNotify->GetAppProvider()->LoadString(dwFlag, wsValue);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue).AsStringC());
}
void CScript_HostPseudoModel::Script_HostPseudoModel_AppType(
FXJSE_HVALUE hValue,
@@ -48,7 +48,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_AppType(
}
CFX_WideString wsAppType;
pNotify->GetAppProvider()->GetAppType(wsAppType);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsAppType).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsAppType).AsStringC());
}
void CScript_HostPseudoModel::Script_HostPseudoModel_FoxitAppType(
FXJSE_HVALUE hValue,
@@ -64,7 +64,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_FoxitAppType(
}
CFX_WideString wsAppType;
pNotify->GetAppProvider()->GetFoxitAppType(wsAppType);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsAppType).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsAppType).AsStringC());
}
void CScript_HostPseudoModel::Script_HostPseudoModel_CalculationsEnabled(
FXJSE_HVALUE hValue,
@@ -114,7 +114,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Language(
}
CFX_WideString wsLanguage;
pNotify->GetAppProvider()->GetLanguage(wsLanguage);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsLanguage).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsLanguage).AsStringC());
}
void CScript_HostPseudoModel::Script_HostPseudoModel_NumPages(
FXJSE_HVALUE hValue,
@@ -146,7 +146,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Platform(
}
CFX_WideString wsPlatform;
pNotify->GetAppProvider()->GetPlatform(wsPlatform);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsPlatform).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsPlatform).AsStringC());
}
void CScript_HostPseudoModel::Script_HostPseudoModel_Title(
FXJSE_HVALUE hValue,
@@ -164,13 +164,12 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Title(
CFX_ByteString bsValue;
FXJSE_Value_ToUTF8String(hValue, bsValue);
pNotify->GetDocProvider()->SetTitle(
- hDoc,
- CFX_WideString::FromUTF8(bsValue.AsByteStringC()).AsWideStringC());
+ hDoc, CFX_WideString::FromUTF8(bsValue.AsStringC()).AsStringC());
return;
}
CFX_WideString wsTitle;
pNotify->GetDocProvider()->GetTitle(hDoc, wsTitle);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsTitle).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsTitle).AsStringC());
}
void CScript_HostPseudoModel::Script_HostPseudoModel_ValidationsEnabled(
FXJSE_HVALUE hValue,
@@ -206,7 +205,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Variation(
}
CFX_WideString wsVariation;
pNotify->GetAppProvider()->GetVariation(wsVariation);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsVariation).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsVariation).AsStringC());
}
void CScript_HostPseudoModel::Script_HostPseudoModel_Version(
FXJSE_HVALUE hValue,
@@ -222,7 +221,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Version(
}
CFX_WideString wsVersion;
pNotify->GetAppProvider()->GetVersion(wsVersion);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsVersion).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsVersion).AsStringC());
}
void CScript_HostPseudoModel::Script_HostPseudoModel_FoxitVersion(
FXJSE_HVALUE hValue,
@@ -238,7 +237,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_FoxitVersion(
}
CFX_WideString wsVersion;
pNotify->GetAppProvider()->GetFoxitVersion(wsVersion);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsVersion).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsVersion).AsStringC());
}
void CScript_HostPseudoModel::Script_HostPseudoModel_Name(
FXJSE_HVALUE hValue,
@@ -254,7 +253,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Name(
}
CFX_WideString wsAppName;
pNotify->GetAppProvider()->GetAppName(wsAppName);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsAppName).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsAppName).AsStringC());
}
void CScript_HostPseudoModel::Script_HostPseudoModel_FoxitName(
FXJSE_HVALUE hValue,
@@ -270,8 +269,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_FoxitName(
}
CFX_WideString wsFoxitAppName;
pNotify->GetAppProvider()->GetFoxitAppName(wsFoxitAppName);
- FXJSE_Value_SetUTF8String(hValue,
- FX_UTF8Encode(wsFoxitAppName).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsFoxitAppName).AsStringC());
}
void CScript_HostPseudoModel::Script_HostPseudoModel_GotoURL(
CFXJSE_Arguments* pArguments) {
@@ -291,9 +289,9 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_GotoURL(
CFX_WideString wsURL;
if (iLength >= 1) {
CFX_ByteString bsURL = pArguments->GetUTF8String(0);
- wsURL = CFX_WideString::FromUTF8(bsURL.AsByteStringC());
+ wsURL = CFX_WideString::FromUTF8(bsURL.AsStringC());
}
- pNotify->GetDocProvider()->GotoURL(hDoc, wsURL.AsWideStringC());
+ pNotify->GetDocProvider()->GotoURL(hDoc, wsURL.AsStringC());
}
void CScript_HostPseudoModel::Script_HostPseudoModel_OpenList(
CFXJSE_Arguments* pArguments) {
@@ -318,7 +316,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_OpenList(
CFX_ByteString bsString;
FXJSE_Value_ToUTF8String(hValue, bsString);
CFX_WideString wsExpression =
- CFX_WideString::FromUTF8(bsString.AsByteStringC());
+ CFX_WideString::FromUTF8(bsString.AsStringC());
CXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext();
if (!pScriptContext) {
FXJSE_Value_Release(hValue);
@@ -333,7 +331,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_OpenList(
XFA_RESOLVENODE_Siblings;
XFA_RESOLVENODE_RS resoveNodeRS;
int32_t iRet = pScriptContext->ResolveObjects(
- pObject, wsExpression.AsWideStringC(), resoveNodeRS, dwFlag);
+ pObject, wsExpression.AsStringC(), resoveNodeRS, dwFlag);
if (iRet < 1 || !resoveNodeRS.nodes[0]->IsNode()) {
FXJSE_Value_Release(hValue);
return;
@@ -371,26 +369,26 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Response(
FX_BOOL bMark = FALSE;
if (iLength >= 1) {
CFX_ByteString bsQuestion = pArguments->GetUTF8String(0);
- wsQuestion = CFX_WideString::FromUTF8(bsQuestion.AsByteStringC());
+ wsQuestion = CFX_WideString::FromUTF8(bsQuestion.AsStringC());
}
if (iLength >= 2) {
CFX_ByteString bsTitle = pArguments->GetUTF8String(1);
- wsTitle = CFX_WideString::FromUTF8(bsTitle.AsByteStringC());
+ wsTitle = CFX_WideString::FromUTF8(bsTitle.AsStringC());
}
if (iLength >= 3) {
CFX_ByteString bsDefaultAnswer = pArguments->GetUTF8String(2);
- wsDefaultAnswer = CFX_WideString::FromUTF8(bsDefaultAnswer.AsByteStringC());
+ wsDefaultAnswer = CFX_WideString::FromUTF8(bsDefaultAnswer.AsStringC());
}
if (iLength >= 4) {
bMark = pArguments->GetInt32(3) == 0 ? FALSE : TRUE;
}
CFX_WideString wsAnswer;
- pNotify->GetAppProvider()->Response(wsAnswer, wsQuestion.AsWideStringC(),
- wsTitle.AsWideStringC(),
- wsDefaultAnswer.AsWideStringC(), bMark);
+ pNotify->GetAppProvider()->Response(wsAnswer, wsQuestion.AsStringC(),
+ wsTitle.AsStringC(),
+ wsDefaultAnswer.AsStringC(), bMark);
FXJSE_HVALUE hValue = pArguments->GetReturnValue();
if (hValue) {
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsAnswer).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsAnswer).AsStringC());
}
}
void CScript_HostPseudoModel::Script_HostPseudoModel_DocumentInBatch(
@@ -443,7 +441,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ResetData(
CFX_WideString wsExpression;
if (iLength >= 1) {
CFX_ByteString bsExpression = pArguments->GetUTF8String(0);
- wsExpression = CFX_WideString::FromUTF8(bsExpression.AsByteStringC());
+ wsExpression = CFX_WideString::FromUTF8(bsExpression.AsStringC());
}
if (wsExpression.IsEmpty()) {
pNotify->ResetData();
@@ -454,7 +452,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ResetData(
CXFA_Node* pNode = NULL;
int32_t iExpLength = wsExpression.GetLength();
while (iStart < iExpLength) {
- iStart = XFA_FilterName(wsExpression.AsWideStringC(), iStart, wsName);
+ iStart = XFA_FilterName(wsExpression.AsStringC(), iStart, wsName);
CXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext();
if (!pScriptContext) {
return;
@@ -466,8 +464,8 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ResetData(
uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Parent |
XFA_RESOLVENODE_Siblings;
XFA_RESOLVENODE_RS resoveNodeRS;
- int32_t iRet = pScriptContext->ResolveObjects(
- pObject, wsName.AsWideStringC(), resoveNodeRS, dwFlag);
+ int32_t iRet = pScriptContext->ResolveObjects(pObject, wsName.AsStringC(),
+ resoveNodeRS, dwFlag);
if (iRet < 1 || !resoveNodeRS.nodes[0]->IsNode()) {
continue;
}
@@ -521,7 +519,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_SetFocus(
CFX_ByteString bsString;
FXJSE_Value_ToUTF8String(hValue, bsString);
CFX_WideString wsExpression =
- CFX_WideString::FromUTF8(bsString.AsByteStringC());
+ CFX_WideString::FromUTF8(bsString.AsStringC());
CXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext();
if (!pScriptContext) {
FXJSE_Value_Release(hValue);
@@ -536,7 +534,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_SetFocus(
XFA_RESOLVENODE_Siblings;
XFA_RESOLVENODE_RS resoveNodeRS;
int32_t iRet = pScriptContext->ResolveObjects(
- pObject, wsExpression.AsWideStringC(), resoveNodeRS, dwFlag);
+ pObject, wsExpression.AsStringC(), resoveNodeRS, dwFlag);
if (iRet < 1 || !resoveNodeRS.nodes[0]->IsNode()) {
FXJSE_Value_Release(hValue);
return;
@@ -601,8 +599,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_MessageBox(
}
}
int32_t iValue = pNotify->GetAppProvider()->MsgBox(
- wsMessage.AsWideStringC(), bsTitle.AsWideStringC(), dwMessageType,
- dwButtonType);
+ wsMessage.AsStringC(), bsTitle.AsStringC(), dwMessageType, dwButtonType);
FXJSE_HVALUE hValue = pArguments->GetReturnValue();
if (hValue) {
FXJSE_Value_SetInteger(hValue, iValue);
@@ -631,7 +628,7 @@ FX_BOOL CScript_HostPseudoModel::Script_HostPseudoModel_ValidateArgsForMsg(
} else {
CFX_ByteString byMessage;
FXJSE_Value_ToUTF8String(hValueArg, byMessage);
- wsValue = CFX_WideString::FromUTF8(byMessage.AsByteStringC());
+ wsValue = CFX_WideString::FromUTF8(byMessage.AsStringC());
}
FXJSE_Value_Release(hValueArg);
return TRUE;
@@ -731,10 +728,10 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ImportData(
CFX_WideString wsFilePath;
if (iLength > 0) {
CFX_ByteString bsFilePath = pArguments->GetUTF8String(0);
- wsFilePath = CFX_WideString::FromUTF8(bsFilePath.AsByteStringC());
+ wsFilePath = CFX_WideString::FromUTF8(bsFilePath.AsStringC());
}
CXFA_FFDoc* hDoc = pNotify->GetHDOC();
- pNotify->GetDocProvider()->ImportData(hDoc, wsFilePath.AsWideStringC());
+ pNotify->GetDocProvider()->ImportData(hDoc, wsFilePath.AsStringC());
}
void CScript_HostPseudoModel::Script_HostPseudoModel_ExportData(
CFXJSE_Arguments* pArguments) {
@@ -752,12 +749,12 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ExportData(
FX_BOOL bXDP = TRUE;
if (iLength >= 1) {
CFX_ByteString bsFilePath = pArguments->GetUTF8String(0);
- wsFilePath = CFX_WideString::FromUTF8(bsFilePath.AsByteStringC());
+ wsFilePath = CFX_WideString::FromUTF8(bsFilePath.AsStringC());
}
if (iLength >= 2) {
bXDP = pArguments->GetInt32(1) == 0 ? FALSE : TRUE;
}
- pNotify->GetDocProvider()->ExportData(hDoc, wsFilePath.AsWideStringC(), bXDP);
+ pNotify->GetDocProvider()->ExportData(hDoc, wsFilePath.AsStringC(), bXDP);
}
void CScript_HostPseudoModel::Script_HostPseudoModel_PageUp(
CFXJSE_Arguments* pArguments) {
@@ -803,7 +800,6 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_CurrentDateTime(
CFX_WideString wsDataTime = pNotify->GetCurrentDateTime();
FXJSE_HVALUE hValue = pArguments->GetReturnValue();
if (hValue) {
- FXJSE_Value_SetUTF8String(hValue,
- FX_UTF8Encode(wsDataTime).AsByteStringC());
+ FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsDataTime).AsStringC());
}
}
diff --git a/xfa/fxfa/parser/xfa_script_imp.cpp b/xfa/fxfa/parser/xfa_script_imp.cpp
index e0536fc136..71fec27814 100644
--- a/xfa/fxfa/parser/xfa_script_imp.cpp
+++ b/xfa/fxfa/parser/xfa_script_imp.cpp
@@ -123,8 +123,8 @@ void CXFA_ScriptContext::GlobalPropertySetter(FXJSE_HOBJECT hObject,
if (lpOrginalNode->GetObjectType() == XFA_OBJECTTYPE_VariablesThis) {
pRefNode = ToNode(lpCurNode);
}
- if (lpScriptContext->QueryNodeByFlag(pRefNode, wsPropName.AsWideStringC(),
- hValue, dwFlag, TRUE)) {
+ if (lpScriptContext->QueryNodeByFlag(pRefNode, wsPropName.AsStringC(), hValue,
+ dwFlag, TRUE)) {
return;
}
if (lpOrginalNode->GetObjectType() == XFA_OBJECTTYPE_VariablesThis) {
@@ -196,13 +196,13 @@ void CXFA_ScriptContext::GlobalPropertyGetter(FXJSE_HOBJECT hObject,
if (pOrginalObject->GetObjectType() == XFA_OBJECTTYPE_VariablesThis) {
pRefNode = ToNode(lpCurNode);
}
- if (lpScriptContext->QueryNodeByFlag(pRefNode, wsPropName.AsWideStringC(),
- hValue, dwFlag, FALSE)) {
+ if (lpScriptContext->QueryNodeByFlag(pRefNode, wsPropName.AsStringC(), hValue,
+ dwFlag, FALSE)) {
return;
}
dwFlag = XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings;
- if (lpScriptContext->QueryNodeByFlag(pRefNode, wsPropName.AsWideStringC(),
- hValue, dwFlag, FALSE)) {
+ if (lpScriptContext->QueryNodeByFlag(pRefNode, wsPropName.AsStringC(), hValue,
+ dwFlag, FALSE)) {
return;
}
CXFA_Object* pScriptObject =
@@ -241,7 +241,7 @@ void CXFA_ScriptContext::NormalPropertyGetter(FXJSE_HOBJECT hObject,
uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties |
XFA_RESOLVENODE_Attributes;
FX_BOOL bRet = lpScriptContext->QueryNodeByFlag(
- ToNode(pObject), wsPropName.AsWideStringC(), hValue, dwFlag, FALSE);
+ ToNode(pObject), wsPropName.AsStringC(), hValue, dwFlag, FALSE);
if (bRet) {
return;
}
@@ -250,7 +250,7 @@ void CXFA_ScriptContext::NormalPropertyGetter(FXJSE_HOBJECT hObject,
!lpScriptContext->IsStrictScopeInJavaScript())) {
dwFlag = XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings;
bRet = lpScriptContext->QueryNodeByFlag(
- ToNode(pObject), wsPropName.AsWideStringC(), hValue, dwFlag, FALSE);
+ ToNode(pObject), wsPropName.AsStringC(), hValue, dwFlag, FALSE);
}
if (bRet) {
return;
@@ -278,7 +278,7 @@ void CXFA_ScriptContext::NormalPropertySetter(FXJSE_HOBJECT hObject,
CXFA_Object* pObject = lpScriptContext->GetVariablesThis(pOrginalObject);
CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName);
const XFA_SCRIPTATTRIBUTEINFO* lpAttributeInfo = XFA_GetScriptAttributeByName(
- pObject->GetClassID(), wsPropName.AsWideStringC());
+ pObject->GetClassID(), wsPropName.AsStringC());
if (lpAttributeInfo) {
(pObject->*(lpAttributeInfo->lpfnCallback))(
hValue, TRUE, (XFA_ATTRIBUTE)lpAttributeInfo->eAttribute);
@@ -290,17 +290,17 @@ void CXFA_ScriptContext::NormalPropertySetter(FXJSE_HOBJECT hObject,
CXFA_Node* pNode = ToNode(pObject);
CXFA_Node* pPropOrChild = NULL;
const XFA_ELEMENTINFO* lpElementInfo =
- XFA_GetElementByName(wsPropName.AsWideStringC());
+ XFA_GetElementByName(wsPropName.AsStringC());
if (lpElementInfo) {
pPropOrChild = pNode->GetProperty(0, lpElementInfo->eName);
} else {
- pPropOrChild = pNode->GetFirstChildByName(wsPropName.AsWideStringC());
+ pPropOrChild = pNode->GetFirstChildByName(wsPropName.AsStringC());
}
if (pPropOrChild) {
CFX_WideString wsDefaultName = FX_WSTRC(L"{default}");
const XFA_SCRIPTATTRIBUTEINFO* lpAttributeInfo =
XFA_GetScriptAttributeByName(pPropOrChild->GetClassID(),
- wsDefaultName.AsWideStringC());
+ wsDefaultName.AsStringC());
if (lpAttributeInfo) {
(pPropOrChild->*(lpAttributeInfo->lpfnCallback))(
hValue, TRUE, (XFA_ATTRIBUTE)lpAttributeInfo->eAttribute);
@@ -329,11 +329,11 @@ int32_t CXFA_ScriptContext::NormalPropTypeGetter(
pObject = lpScriptContext->GetVariablesThis(pObject);
XFA_ELEMENT objElement = pObject->GetClassID();
CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName);
- if (XFA_GetMethodByName(objElement, wsPropName.AsWideStringC())) {
+ if (XFA_GetMethodByName(objElement, wsPropName.AsStringC())) {
return FXJSE_ClassPropType_Method;
}
if (bQueryIn &&
- !XFA_GetScriptAttributeByName(objElement, wsPropName.AsWideStringC())) {
+ !XFA_GetScriptAttributeByName(objElement, wsPropName.AsStringC())) {
return FXJSE_ClassPropType_None;
}
return FXJSE_ClassPropType_Property;
@@ -351,7 +351,7 @@ int32_t CXFA_ScriptContext::GlobalPropTypeGetter(
pObject = lpScriptContext->GetVariablesThis(pObject);
XFA_ELEMENT objElement = pObject->GetClassID();
CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName);
- if (XFA_GetMethodByName(objElement, wsPropName.AsWideStringC())) {
+ if (XFA_GetMethodByName(objElement, wsPropName.AsStringC())) {
return FXJSE_ClassPropType_Method;
}
return FXJSE_ClassPropType_Property;
@@ -368,7 +368,7 @@ void CXFA_ScriptContext::NormalMethodCall(FXJSE_HOBJECT hThis,
pObject = lpScriptContext->GetVariablesThis(pObject);
CFX_WideString wsFunName = CFX_WideString::FromUTF8(szFuncName);
const XFA_METHODINFO* lpMethodInfo =
- XFA_GetMethodByName(pObject->GetClassID(), wsFunName.AsWideStringC());
+ XFA_GetMethodByName(pObject->GetClassID(), wsFunName.AsStringC());
if (NULL == lpMethodInfo) {
return;
}
diff --git a/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp
index da19b381bb..ab7f6923d4 100644
--- a/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp
+++ b/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp
@@ -74,7 +74,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_HWXY(
if (iLength >= 2) {
CFX_ByteString bsUnit = pArguments->GetUTF8String(1);
if (!bsUnit.IsEmpty()) {
- wsUnit = CFX_WideString::FromUTF8(bsUnit.AsByteStringC());
+ wsUnit = CFX_WideString::FromUTF8(bsUnit.AsStringC());
}
}
if (iLength >= 3) {
@@ -117,7 +117,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_HWXY(
measure.Set(rtRect.top, XFA_UNIT_Pt);
break;
}
- XFA_UNIT unit = measure.GetUnit(wsUnit.AsWideStringC());
+ XFA_UNIT unit = measure.GetUnit(wsUnit.AsStringC());
FX_FLOAT fValue = measure.ToUnit(unit);
fValue = FXSYS_round(fValue * 1000) / 1000.0f;
if (hValue) {
@@ -367,7 +367,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_PageContent(
}
if (iLength >= 2) {
CFX_ByteString bsType = pArguments->GetUTF8String(1);
- wsType = CFX_WideString::FromUTF8(bsType.AsByteStringC());
+ wsType = CFX_WideString::FromUTF8(bsType.AsStringC());
}
if (iLength >= 3) {
bOnPageArea = pArguments->GetInt32(2) == 0 ? FALSE : TRUE;
diff --git a/xfa/fxfa/parser/xfa_script_nodehelper.cpp b/xfa/fxfa/parser/xfa_script_nodehelper.cpp
index 9e8ff5191c..619ba65fff 100644
--- a/xfa/fxfa/parser/xfa_script_nodehelper.cpp
+++ b/xfa/fxfa/parser/xfa_script_nodehelper.cpp
@@ -368,8 +368,7 @@ FX_BOOL CXFA_NodeHelper::XFA_ResolveNodes_CreateNode(
XFA_CreateNode_ForCondition(wsCondition);
}
if (bIsClassName) {
- const XFA_ELEMENTINFO* lpElement =
- XFA_GetElementByName(wsName.AsWideStringC());
+ const XFA_ELEMENTINFO* lpElement = XFA_GetElementByName(wsName.AsStringC());
if (lpElement == NULL) {
return FALSE;
}
@@ -392,7 +391,7 @@ FX_BOOL CXFA_NodeHelper::XFA_ResolveNodes_CreateNode(
for (int32_t iIndex = 0; iIndex < m_iCreateCount; iIndex++) {
CXFA_Node* pNewNode = m_pCreateParent->CreateSamePacketNode(eClassType);
if (pNewNode) {
- pNewNode->SetAttribute(XFA_ATTRIBUTE_Name, wsName.AsWideStringC());
+ pNewNode->SetAttribute(XFA_ATTRIBUTE_Name, wsName.AsStringC());
pNewNode->CreateXMLMappingNode();
m_pCreateParent->InsertChild(pNewNode);
if (iIndex == m_iCreateCount - 1) {
diff --git a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
index f86a65e712..6ebec5da9c 100644
--- a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
+++ b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
@@ -36,7 +36,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes(CXFA_ResolveNodesData& rnd) {
if (!rnd.m_CurNode->IsNode()) {
if (rnd.m_dwStyles & XFA_RESOLVENODE_Attributes) {
return XFA_ResolveNodes_ForAttributeRs(rnd.m_CurNode, rnd,
- rnd.m_wsName.AsWideStringC());
+ rnd.m_wsName.AsStringC());
}
return 0;
}
@@ -71,7 +71,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes(CXFA_ResolveNodesData& rnd) {
rnd.m_Nodes.Add(rnd.m_CurNode);
} else if ((rnd.m_dwStyles & XFA_RESOLVENODE_Attributes) &&
XFA_ResolveNodes_ForAttributeRs(rnd.m_CurNode, rnd,
- rnd.m_wsName.AsWideStringC())) {
+ rnd.m_wsName.AsStringC())) {
return 1;
}
if (rnd.m_Nodes.GetSize() > 0) {
@@ -169,7 +169,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_NumberSign(
CFX_WideString wsName = rnd.m_wsName.Right(rnd.m_wsName.GetLength() - 1);
CFX_WideString wsCondition = rnd.m_wsCondition;
CXFA_Node* curNode = ToNode(rnd.m_CurNode);
- if (XFA_ResolveNodes_ForAttributeRs(curNode, rnd, wsName.AsWideStringC())) {
+ if (XFA_ResolveNodes_ForAttributeRs(curNode, rnd, wsName.AsStringC())) {
return 1;
}
CXFA_ResolveNodesData rndFind;
@@ -332,7 +332,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Normal(
}
}
if (dwStyles & XFA_RESOLVENODE_Attributes) {
- if (XFA_ResolveNodes_ForAttributeRs(curNode, rnd, wsName.AsWideStringC())) {
+ if (XFA_ResolveNodes_ForAttributeRs(curNode, rnd, wsName.AsStringC())) {
return 1;
}
}
@@ -367,7 +367,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Normal(
}
} else {
const XFA_ELEMENTINFO* pElement =
- XFA_GetElementByName(wsName.AsWideStringC());
+ XFA_GetElementByName(wsName.AsStringC());
if (pElement) {
pProp = curNode->AsNode()->GetProperty(
0, pElement->eName, pElement->eName != XFA_ELEMENT_PageSet);
@@ -713,8 +713,8 @@ void CXFA_ResolveProcessor::XFA_ResolveNode_DoPredicateFilter(
CXFA_Object* node = findNodes[i];
FX_BOOL bRet = FALSE;
FXJSE_HVALUE pRetValue = FXJSE_Value_Create(rnd.m_pSC->GetRuntime());
- bRet = pContext->RunScript(eLangType, wsExpression.AsWideStringC(),
- pRetValue, node);
+ bRet = pContext->RunScript(eLangType, wsExpression.AsStringC(), pRetValue,
+ node);
if (!bRet || !FXJSE_Value_ToBoolean(pRetValue)) {
findNodes.RemoveAt(i);
}
diff --git a/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp b/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp
index c5858e3e66..4f2f2eeca6 100644
--- a/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp
+++ b/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp
@@ -68,15 +68,14 @@ void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Sign(
}
if (iLength >= 2) {
CFX_ByteString bsExpression = pArguments->GetUTF8String(1);
- wsExpression = CFX_WideString::FromUTF8(bsExpression.AsByteStringC());
+ wsExpression = CFX_WideString::FromUTF8(bsExpression.AsStringC());
}
if (iLength >= 3) {
CFX_ByteString bsXMLIdent = pArguments->GetUTF8String(2);
- wsXMLIdent = CFX_WideString::FromUTF8(bsXMLIdent.AsByteStringC());
+ wsXMLIdent = CFX_WideString::FromUTF8(bsXMLIdent.AsStringC());
}
- FX_BOOL bSign = pNotify->GetDocProvider()->Sign(hDoc, pNodeList,
- wsExpression.AsWideStringC(),
- wsXMLIdent.AsWideStringC());
+ FX_BOOL bSign = pNotify->GetDocProvider()->Sign(
+ hDoc, pNodeList, wsExpression.AsStringC(), wsXMLIdent.AsStringC());
FXJSE_HVALUE hValue = pArguments->GetReturnValue();
if (hValue) {
FXJSE_Value_SetBoolean(hValue, bSign);