summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-05-13 17:21:31 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-13 17:21:31 -0700
commitafe94306e3c542f0d499e7f7706ee5dec4028d8a (patch)
tree5012c9356cf1af259c74da3008dc7fcad439db2a /xfa/fxfa
parent01e624fb699af3a8ee2f81620d59d366dac18f29 (diff)
downloadpdfium-afe94306e3c542f0d499e7f7706ee5dec4028d8a.tar.xz
Make CFX_WideString(const CFX_WideString&) explicit.
BUG= Review-Url: https://codereview.chromium.org/1979723003
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/app/xfa_ffwidgetacc.cpp14
-rw-r--r--xfa/fxfa/app/xfa_ffwidgethandler.cpp6
-rw-r--r--xfa/fxfa/app/xfa_fontmgr.cpp7
-rw-r--r--xfa/fxfa/app/xfa_textlayout.cpp2
-rw-r--r--xfa/fxfa/fm2js/xfa_expression.cpp4
-rw-r--r--xfa/fxfa/fm2js/xfa_fm2jscontext.cpp33
-rw-r--r--xfa/fxfa/fm2js/xfa_fmparse.cpp40
-rw-r--r--xfa/fxfa/fm2js/xfa_simpleexpression.cpp4
-rw-r--r--xfa/fxfa/include/fxfa.h4
-rw-r--r--xfa/fxfa/include/fxfa_widget.h8
-rw-r--r--xfa/fxfa/parser/cxfa_validate.cpp16
-rw-r--r--xfa/fxfa/parser/cxfa_validate.h4
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.cpp26
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.h2
-rw-r--r--xfa/fxfa/parser/xfa_document_datadescription_imp.cpp5
-rw-r--r--xfa/fxfa/parser/xfa_document_datadescription_imp.h2
-rw-r--r--xfa/fxfa/parser/xfa_document_datamerger_imp.cpp38
-rw-r--r--xfa/fxfa/parser/xfa_document_serialize.cpp12
-rw-r--r--xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp2
-rw-r--r--xfa/fxfa/parser/xfa_locale.cpp3
-rw-r--r--xfa/fxfa/parser/xfa_localemgr.cpp4
-rw-r--r--xfa/fxfa/parser/xfa_localemgr.h12
-rw-r--r--xfa/fxfa/parser/xfa_object_imp.cpp34
-rw-r--r--xfa/fxfa/parser/xfa_parser_imp.cpp16
-rw-r--r--xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp2
-rw-r--r--xfa/fxfa/parser/xfa_script_imp.cpp2
-rw-r--r--xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp2
-rw-r--r--xfa/fxfa/parser/xfa_script_nodehelper.cpp3
28 files changed, 149 insertions, 158 deletions
diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
index fd3757ace5..11081fd5d7 100644
--- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
@@ -210,8 +210,7 @@ void CXFA_WidgetAcc::ResetData() {
image.GetContentType(wsContentType);
image.GetHref(wsHref);
}
- SetImageEdit(wsContentType.AsStringC(), wsHref.AsStringC(),
- wsValue.AsStringC());
+ SetImageEdit(wsContentType, wsHref, wsValue);
} break;
case XFA_ELEMENT_ExclGroup: {
CXFA_Node* pNextChild = m_pNode->GetNodeItem(
@@ -252,12 +251,12 @@ void CXFA_WidgetAcc::ResetData() {
break;
}
}
-void CXFA_WidgetAcc::SetImageEdit(const CFX_WideStringC& wsContentType,
- const CFX_WideStringC& wsHref,
- const CFX_WideStringC& wsData) {
+void CXFA_WidgetAcc::SetImageEdit(const CFX_WideString& wsContentType,
+ const CFX_WideString& wsHref,
+ const CFX_WideString& wsData) {
CXFA_Image image = GetFormValue().GetImage();
if (image) {
- image.SetContentType(wsContentType);
+ image.SetContentType(CFX_WideString(wsContentType));
image.SetHref(wsHref);
}
CFX_WideString wsFormatValue(wsData);
@@ -275,8 +274,7 @@ void CXFA_WidgetAcc::SetImageEdit(const CFX_WideStringC& wsContentType,
} else {
CFDE_XMLNode* pXMLNode = pBind->GetXMLMappingNode();
ASSERT(pXMLNode && pXMLNode->GetType() == FDE_XMLNODE_Element);
- static_cast<CFDE_XMLElement*>(pXMLNode)
- ->SetString(FX_WSTRC(L"href"), wsHref);
+ static_cast<CFDE_XMLElement*>(pXMLNode)->SetString(L"href", wsHref);
}
}
diff --git a/xfa/fxfa/app/xfa_ffwidgethandler.cpp b/xfa/fxfa/app/xfa_ffwidgethandler.cpp
index 314b22731a..13cee333a5 100644
--- a/xfa/fxfa/app/xfa_ffwidgethandler.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgethandler.cpp
@@ -328,7 +328,7 @@ CXFA_Node* CXFA_FFWidgetHandler::CreatePushButton(CXFA_Node* pParent,
CXFA_Node* pCaption = CreateCopyNode(XFA_ELEMENT_Caption, pField);
CXFA_Node* pValue = CreateCopyNode(XFA_ELEMENT_Value, pCaption);
CXFA_Node* pText = CreateCopyNode(XFA_ELEMENT_Text, pValue);
- pText->SetContent(FX_WSTRC(L"Button"), FX_WSTRC(L"Button"), FALSE);
+ pText->SetContent(L"Button", L"Button", FALSE);
CXFA_Node* pPara = CreateCopyNode(XFA_ELEMENT_Para, pCaption);
pPara->SetEnum(XFA_ATTRIBUTE_VAlign, XFA_ATTRIBUTEENUM_Middle, FALSE);
@@ -343,7 +343,7 @@ CXFA_Node* CXFA_FFWidgetHandler::CreatePushButton(CXFA_Node* pParent,
CXFA_Node* pFill = CreateCopyNode(XFA_ELEMENT_Fill, pBorder);
CXFA_Node* pColor = CreateCopyNode(XFA_ELEMENT_Color, pFill);
- pColor->SetCData(XFA_ATTRIBUTE_Value, FX_WSTRC(L"212, 208, 200"), FALSE);
+ pColor->SetCData(XFA_ATTRIBUTE_Value, L"212, 208, 200", FALSE);
CXFA_Node* pBind = CreateCopyNode(XFA_ELEMENT_Bind, pField);
pBind->SetEnum(XFA_ATTRIBUTE_Match, XFA_ATTRIBUTEENUM_None);
@@ -515,7 +515,7 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateTemplateNode(XFA_ELEMENT eElement,
CXFA_Node* CXFA_FFWidgetHandler::CreateFontNode(CXFA_Node* pParent) const {
CXFA_Node* pFont = CreateCopyNode(XFA_ELEMENT_Font, pParent);
- pFont->SetCData(XFA_ATTRIBUTE_Typeface, FX_WSTRC(L"Myriad Pro"), FALSE);
+ pFont->SetCData(XFA_ATTRIBUTE_Typeface, L"Myriad Pro", FALSE);
return pFont;
}
diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp
index 608c9073c3..bf8c1a7326 100644
--- a/xfa/fxfa/app/xfa_fontmgr.cpp
+++ b/xfa/fxfa/app/xfa_fontmgr.cpp
@@ -1713,7 +1713,7 @@ void XFA_LocalFontNameToEnglishName(const CFX_WideStringC& wsLocalName,
}
const XFA_FONTINFO* XFA_GetFontINFOByFontName(
const CFX_WideStringC& wsFontName) {
- CFX_WideString wsFontNameTemp = wsFontName;
+ CFX_WideString wsFontNameTemp(wsFontName);
wsFontNameTemp.Remove(L' ');
uint32_t dwCurFontNameHash =
FX_HashCode_GetW(wsFontNameTemp.AsStringC(), true);
@@ -1745,7 +1745,7 @@ IFX_Font* CXFA_DefFontMgr::GetFont(CXFA_FFDoc* hDoc,
const CFX_WideStringC& wsFontFamily,
uint32_t dwFontStyles,
uint16_t wCodePage) {
- CFX_WideString wsFontName = wsFontFamily;
+ CFX_WideString wsFontName(wsFontFamily);
IFX_FontMgr* pFDEFontMgr = hDoc->GetApp()->GetFDEFontMgr();
IFX_Font* pFont =
pFDEFontMgr->LoadFont(wsFontName.c_str(), dwFontStyles, wCodePage);
@@ -1882,7 +1882,8 @@ IFX_Font* CXFA_PDFFontMgr::GetFont(const CFX_WideStringC& wsFontFamily,
auto it = m_FontMap.find(strKey);
if (it != m_FontMap.end())
return it->second;
- CFX_ByteString bsPsName = CFX_ByteString::FromUnicode(wsFontFamily);
+ CFX_ByteString bsPsName =
+ CFX_ByteString::FromUnicode(CFX_WideString(wsFontFamily));
FX_BOOL bBold = (dwFontStyles & FX_FONTSTYLE_Bold) == FX_FONTSTYLE_Bold;
FX_BOOL bItalic = (dwFontStyles & FX_FONTSTYLE_Italic) == FX_FONTSTYLE_Italic;
CFX_ByteString strFontName = PsNameToFontName(bsPsName, bBold, bItalic);
diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp
index 1f34b45670..884ec149f2 100644
--- a/xfa/fxfa/app/xfa_textlayout.cpp
+++ b/xfa/fxfa/app/xfa_textlayout.cpp
@@ -283,7 +283,7 @@ void CXFA_TextParser::ParseTagInfo(CFDE_XMLNode* pXMLNode,
CFX_WideString wsValue;
pXMLElement->GetString(FX_WSTRC(L"style").c_str(), wsValue);
if (!wsValue.IsEmpty()) {
- tagProvider.SetAttribute(FX_WSTRC(L"style"), wsValue);
+ tagProvider.SetAttribute(L"style", wsValue);
}
} else if (pXMLNode->GetType() == FDE_XMLNODE_Text) {
tagProvider.m_bTagAviliable = TRUE;
diff --git a/xfa/fxfa/fm2js/xfa_expression.cpp b/xfa/fxfa/fm2js/xfa_expression.cpp
index cecffb9112..72020c3f0c 100644
--- a/xfa/fxfa/fm2js/xfa_expression.cpp
+++ b/xfa/fxfa/fm2js/xfa_expression.cpp
@@ -122,7 +122,7 @@ CXFA_FMVarExpression::CXFA_FMVarExpression(uint32_t line,
void CXFA_FMVarExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << FX_WSTRC(L"var ");
- CFX_WideString tempName = m_wsName;
+ CFX_WideString tempName(m_wsName);
if (m_wsName.GetAt(0) == L'!') {
tempName = EXCLAMATION_IN_IDENTIFIER + m_wsName.Mid(1);
}
@@ -143,7 +143,7 @@ void CXFA_FMVarExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
void CXFA_FMVarExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
javascript << FX_WSTRC(L"var ");
- CFX_WideString tempName = m_wsName;
+ CFX_WideString tempName(m_wsName);
if (m_wsName.GetAt(0) == L'!') {
tempName = EXCLAMATION_IN_IDENTIFIER + m_wsName.Mid(1);
}
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
index 852ea1bd6a..484191f1be 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
@@ -1583,7 +1583,7 @@ void CXFA_FM2JSContext::Time2Num(FXJSE_HOBJECT hThis,
pLocale = widgetData.GetLocal();
} else {
pLocale = pMgr->GetLocaleByName(
- CFX_WideString::FromUTF8(localString.AsStringC()).AsStringC());
+ CFX_WideString::FromUTF8(localString.AsStringC()));
}
CFX_WideString wsFormat;
if (formatString.IsEmpty()) {
@@ -2029,8 +2029,7 @@ FX_BOOL CXFA_FM2JSContext::Local2IsoDate(FXJSE_HOBJECT hThis,
CXFA_WidgetData widgetData(pThisNode);
pLocale = widgetData.GetLocal();
} else {
- pLocale =
- pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocale).AsStringC());
+ pLocale = pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocale));
}
if (!pLocale) {
return FALSE;
@@ -2066,8 +2065,7 @@ FX_BOOL CXFA_FM2JSContext::Local2IsoTime(FXJSE_HOBJECT hThis,
CXFA_WidgetData widgetData(pThisNode);
pLocale = widgetData.GetLocal();
} else {
- pLocale =
- pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocale).AsStringC());
+ pLocale = pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocale));
}
if (!pLocale) {
return FALSE;
@@ -2106,8 +2104,7 @@ FX_BOOL CXFA_FM2JSContext::IsoDate2Local(FXJSE_HOBJECT hThis,
CXFA_WidgetData widgetData(pThisNode);
pLocale = widgetData.GetLocal();
} else {
- pLocale =
- pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocale).AsStringC());
+ pLocale = pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocale));
}
if (!pLocale) {
return FALSE;
@@ -2145,8 +2142,7 @@ FX_BOOL CXFA_FM2JSContext::IsoTime2Local(FXJSE_HOBJECT hThis,
CXFA_WidgetData widgetData(pThisNode);
pLocale = widgetData.GetLocal();
} else {
- pLocale =
- pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocale).AsStringC());
+ pLocale = pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocale));
}
if (!pLocale) {
return FALSE;
@@ -2186,8 +2182,7 @@ FX_BOOL CXFA_FM2JSContext::GetGMTTime(FXJSE_HOBJECT hThis,
CXFA_WidgetData widgetData(pThisNode);
pLocale = widgetData.GetLocal();
} else {
- pLocale =
- pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocale).AsStringC());
+ pLocale = pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocale));
}
if (!pLocale) {
return FALSE;
@@ -2368,8 +2363,7 @@ void CXFA_FM2JSContext::GetLocalDateFormat(FXJSE_HOBJECT hThis,
CXFA_WidgetData widgetData(pThisNode);
pLocale = widgetData.GetLocal();
} else {
- pLocale =
- pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocalStr).AsStringC());
+ pLocale = pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocalStr));
}
if (!pLocale) {
return;
@@ -2423,8 +2417,7 @@ void CXFA_FM2JSContext::GetLocalTimeFormat(FXJSE_HOBJECT hThis,
CXFA_WidgetData widgetData(pThisNode);
pLocale = widgetData.GetLocal();
} else {
- pLocale =
- pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocalStr).AsStringC());
+ pLocale = pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocalStr));
}
if (!pLocale) {
return;
@@ -4388,10 +4381,10 @@ void CXFA_FM2JSContext::Format(FXJSE_HOBJECT hThis,
switch (patternType) {
case XFA_VT_DATETIME: {
FX_STRSIZE iTChar = wsPattern.Find(L'T');
- CFX_WideString wsDatePattern = FX_WSTRC(L"date{");
+ CFX_WideString wsDatePattern(L"date{");
wsDatePattern += wsPattern.Left(iTChar);
wsDatePattern += FX_WSTRC(L"} ");
- CFX_WideString wsTimePattern = FX_WSTRC(L"time{");
+ CFX_WideString wsTimePattern(L"time{");
wsTimePattern += wsPattern.Mid(iTChar + 1);
wsTimePattern += FX_WSTRC(L"}");
wsPattern = wsDatePattern + wsTimePattern;
@@ -4614,10 +4607,10 @@ void CXFA_FM2JSContext::Parse(FXJSE_HOBJECT hThis,
switch (patternType) {
case XFA_VT_DATETIME: {
FX_STRSIZE iTChar = wsPattern.Find(L'T');
- CFX_WideString wsDatePattern = FX_WSTRC(L"date{");
+ CFX_WideString wsDatePattern(L"date{");
wsDatePattern += wsPattern.Left(iTChar);
wsDatePattern += FX_WSTRC(L"} ");
- CFX_WideString wsTimePattern = FX_WSTRC(L"time{");
+ CFX_WideString wsTimePattern(L"time{");
wsTimePattern += wsPattern.Mid(iTChar + 1);
wsTimePattern += FX_WSTRC(L"}");
wsPattern = wsDatePattern + wsTimePattern;
@@ -6377,7 +6370,7 @@ void CXFA_FM2JSContext::eval_translation(FXJSE_HOBJECT hThis,
CFX_WideString wsError;
XFA_FM2JS_Translate(scriptString.AsStringC(), wsJavaScriptBuf, wsError);
if (wsError.IsEmpty()) {
- CFX_WideString javaScript = wsJavaScriptBuf.AsStringC();
+ CFX_WideString javaScript = wsJavaScriptBuf.MakeString();
FXJSE_Value_SetUTF8String(
args.GetReturnValue(),
FX_UTF8Encode(javaScript.c_str(), javaScript.GetLength())
diff --git a/xfa/fxfa/fm2js/xfa_fmparse.cpp b/xfa/fxfa/fm2js/xfa_fmparse.cpp
index 0a9fa81bad..efbf224a40 100644
--- a/xfa/fxfa/fm2js/xfa_fmparse.cpp
+++ b/xfa/fxfa/fm2js/xfa_fmparse.cpp
@@ -29,7 +29,7 @@ void CXFA_FMParse::NextToken() {
void CXFA_FMParse::Check(XFA_FM_TOKEN op) {
if (m_pToken->m_type != op) {
- CFX_WideString ws_TempString = m_pToken->m_wstring;
+ CFX_WideString ws_TempString(m_pToken->m_wstring);
Error(m_pToken->m_uLinenum, kFMErrExpectedToken, XFA_FM_KeywordToString(op),
ws_TempString.c_str());
}
@@ -82,7 +82,7 @@ CXFA_FMExpression* CXFA_FMParse::ParseFunction() {
uint32_t line = m_pToken->m_uLinenum;
NextToken();
if (m_pToken->m_type != TOKidentifier) {
- CFX_WideString ws_TempString = m_pToken->m_wstring;
+ CFX_WideString ws_TempString(m_pToken->m_wstring);
Error(m_pToken->m_uLinenum, kFMErrExpectedIdentifier,
ws_TempString.c_str());
} else {
@@ -111,7 +111,7 @@ CXFA_FMExpression* CXFA_FMParse::ParseFunction() {
break;
}
} else {
- CFX_WideString ws_TempString = m_pToken->m_wstring;
+ CFX_WideString ws_TempString(m_pToken->m_wstring);
Error(m_pToken->m_uLinenum, kFMErrExpectedIdentifier,
ws_TempString.c_str());
NextToken();
@@ -181,7 +181,7 @@ CXFA_FMExpression* CXFA_FMParse::ParseExpression() {
NextToken();
break;
default:
- CFX_WideString ws_TempString = m_pToken->m_wstring;
+ CFX_WideString ws_TempString(m_pToken->m_wstring);
Error(m_pToken->m_uLinenum, kFMErrUnexpectedExpression,
ws_TempString.c_str());
NextToken();
@@ -196,7 +196,7 @@ CXFA_FMExpression* CXFA_FMParse::ParseVarExpression() {
uint32_t line = m_pToken->m_uLinenum;
NextToken();
if (m_pToken->m_type != TOKidentifier) {
- CFX_WideString ws_TempString = m_pToken->m_wstring;
+ CFX_WideString ws_TempString(m_pToken->m_wstring);
Error(m_pToken->m_uLinenum, kFMErrExpectedIdentifier,
ws_TempString.c_str());
} else {
@@ -532,7 +532,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParsePrimaryExpression() {
e.reset(ParseParenExpression());
break;
default:
- CFX_WideString ws_TempString = m_pToken->m_wstring;
+ CFX_WideString ws_TempString(m_pToken->m_wstring);
Error(m_pToken->m_uLinenum, kFMErrUnexpectedExpression,
ws_TempString.c_str());
NextToken();
@@ -567,7 +567,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParsePostExpression(
}
}
if (m_pToken->m_type != TOKrparen) {
- CFX_WideString ws_TempString = m_pToken->m_wstring;
+ CFX_WideString ws_TempString(m_pToken->m_wstring);
Error(m_pToken->m_uLinenum, kFMErrExpectedToken,
XFA_FM_KeywordToString(TOKrparen), ws_TempString.c_str());
}
@@ -620,7 +620,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParsePostExpression(
}
}
if (m_pToken->m_type != TOKrparen) {
- CFX_WideString ws_TempString = m_pToken->m_wstring;
+ CFX_WideString ws_TempString(m_pToken->m_wstring);
Error(m_pToken->m_uLinenum, kFMErrExpectedToken,
XFA_FM_KeywordToString(TOKrparen), ws_TempString.c_str());
}
@@ -666,7 +666,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParsePostExpression(
continue;
}
} else {
- CFX_WideString ws_TempString = m_pToken->m_wstring;
+ CFX_WideString ws_TempString(m_pToken->m_wstring);
Error(m_pToken->m_uLinenum, kFMErrExpectedIdentifier,
ws_TempString.c_str());
return e;
@@ -694,7 +694,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParsePostExpression(
continue;
}
} else {
- CFX_WideString ws_TempString = m_pToken->m_wstring;
+ CFX_WideString ws_TempString(m_pToken->m_wstring);
Error(m_pToken->m_uLinenum, kFMErrExpectedIdentifier,
ws_TempString.c_str());
return e;
@@ -722,7 +722,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParsePostExpression(
continue;
}
} else {
- CFX_WideString ws_TempString = m_pToken->m_wstring;
+ CFX_WideString ws_TempString(m_pToken->m_wstring);
Error(m_pToken->m_uLinenum, kFMErrExpectedIdentifier,
ws_TempString.c_str());
return e;
@@ -753,7 +753,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParseIndexExpression() {
new CXFA_FMIndexExpression(line, accessorIndex, s.release(), TRUE));
NextToken();
if (m_pToken->m_type != TOKrbracket) {
- CFX_WideString ws_TempString = m_pToken->m_wstring;
+ CFX_WideString ws_TempString(m_pToken->m_wstring);
Error(m_pToken->m_uLinenum, kFMErrExpectedToken,
XFA_FM_KeywordToString(TOKrparen), ws_TempString.c_str());
pExp.reset();
@@ -769,7 +769,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParseIndexExpression() {
}
s.reset(ParseSimpleExpression());
if (m_pToken->m_type != TOKrbracket) {
- CFX_WideString ws_TempString = m_pToken->m_wstring;
+ CFX_WideString ws_TempString(m_pToken->m_wstring);
Error(m_pToken->m_uLinenum, kFMErrExpectedToken,
XFA_FM_KeywordToString(TOKrparen), ws_TempString.c_str());
} else {
@@ -891,7 +891,7 @@ CXFA_FMExpression* CXFA_FMParse::ParseIfExpression() {
Check(TOKendif);
break;
default:
- CFX_WideString ws_TempString = m_pToken->m_wstring;
+ CFX_WideString ws_TempString(m_pToken->m_wstring);
Error(m_pToken->m_uLinenum, kFMErrExpectedEndIf, ws_TempString.c_str());
NextToken();
break;
@@ -927,7 +927,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParseSubassignmentInForExpression() {
e.reset(ParseSimpleExpression());
break;
default:
- CFX_WideString ws_TempString = m_pToken->m_wstring;
+ CFX_WideString ws_TempString(m_pToken->m_wstring);
Error(m_pToken->m_uLinenum, kFMErrUnexpectedExpression,
ws_TempString.c_str());
NextToken();
@@ -941,7 +941,7 @@ CXFA_FMExpression* CXFA_FMParse::ParseForExpression() {
uint32_t line = m_pToken->m_uLinenum;
NextToken();
if (m_pToken->m_type != TOKidentifier) {
- CFX_WideString ws_TempString = m_pToken->m_wstring;
+ CFX_WideString ws_TempString(m_pToken->m_wstring);
Error(m_pToken->m_uLinenum, kFMErrExpectedToken,
XFA_FM_KeywordToString(m_pToken->m_type), ws_TempString.c_str());
}
@@ -952,7 +952,7 @@ CXFA_FMExpression* CXFA_FMParse::ParseForExpression() {
NextToken();
pAssignment.reset(ParseSimpleExpression());
} else {
- CFX_WideString ws_TempString = m_pToken->m_wstring;
+ CFX_WideString ws_TempString(m_pToken->m_wstring);
Error(m_pToken->m_uLinenum, kFMErrExpectedToken,
XFA_FM_KeywordToString(m_pToken->m_type), ws_TempString.c_str());
}
@@ -962,7 +962,7 @@ CXFA_FMExpression* CXFA_FMParse::ParseForExpression() {
} else if (m_pToken->m_type == TOKdownto) {
iDirection = -1;
} else {
- CFX_WideString ws_TempString = m_pToken->m_wstring;
+ CFX_WideString ws_TempString(m_pToken->m_wstring);
Error(m_pToken->m_uLinenum, kFMErrExpectedToken, L"upto or downto",
ws_TempString.c_str());
}
@@ -993,7 +993,7 @@ CXFA_FMExpression* CXFA_FMParse::ParseForeachExpression() {
uint32_t line = m_pToken->m_uLinenum;
NextToken();
if (m_pToken->m_type != TOKidentifier) {
- CFX_WideString ws_TempString = m_pToken->m_wstring;
+ CFX_WideString ws_TempString(m_pToken->m_wstring);
Error(m_pToken->m_uLinenum, kFMErrExpectedToken,
XFA_FM_KeywordToString(m_pToken->m_type), ws_TempString.c_str());
}
@@ -1002,7 +1002,7 @@ CXFA_FMExpression* CXFA_FMParse::ParseForeachExpression() {
Check(TOKin);
Check(TOKlparen);
if (m_pToken->m_type == TOKrparen) {
- CFX_WideString ws_TempString = m_pToken->m_wstring;
+ CFX_WideString ws_TempString(m_pToken->m_wstring);
Error(m_pToken->m_uLinenum, kFMErrUnexpectedExpression,
ws_TempString.c_str());
NextToken();
diff --git a/xfa/fxfa/fm2js/xfa_simpleexpression.cpp b/xfa/fxfa/fm2js/xfa_simpleexpression.cpp
index aad8f7bed0..e77623de3a 100644
--- a/xfa/fxfa/fm2js/xfa_simpleexpression.cpp
+++ b/xfa/fxfa/fm2js/xfa_simpleexpression.cpp
@@ -146,7 +146,7 @@ CXFA_FMStringExpression::CXFA_FMStringExpression(uint32_t line,
: CXFA_FMSimpleExpression(line, TOKstring), m_wsString(wsString) {}
void CXFA_FMStringExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
- CFX_WideString tempStr = m_wsString;
+ CFX_WideString tempStr(m_wsString);
if (tempStr.GetLength() > 2) {
javascript.AppendChar(L'\"');
FX_WCHAR oneChar;
@@ -178,7 +178,7 @@ CXFA_FMIdentifierExpressionn::CXFA_FMIdentifierExpressionn(
m_wsIdentifier(wsIdentifier) {}
void CXFA_FMIdentifierExpressionn::ToJavaScript(CFX_WideTextBuf& javascript) {
- CFX_WideString tempStr = m_wsIdentifier;
+ CFX_WideString tempStr(m_wsIdentifier);
if (tempStr == FX_WSTRC(L"$")) {
tempStr = FX_WSTRC(L"this");
} else if (tempStr == FX_WSTRC(L"!")) {
diff --git a/xfa/fxfa/include/fxfa.h b/xfa/fxfa/include/fxfa.h
index 672ca302fd..a7d1a282ba 100644
--- a/xfa/fxfa/include/fxfa.h
+++ b/xfa/fxfa/include/fxfa.h
@@ -414,7 +414,7 @@ class IXFA_DocProvider {
virtual FX_BOOL IsCalculationsEnabled(CXFA_FFDoc* hDoc) = 0;
virtual void SetCalculationsEnabled(CXFA_FFDoc* hDoc, FX_BOOL bEnabled) = 0;
virtual void GetTitle(CXFA_FFDoc* hDoc, CFX_WideString& wsTitle) = 0;
- virtual void SetTitle(CXFA_FFDoc* hDoc, const CFX_WideStringC& wsTitle) = 0;
+ virtual void SetTitle(CXFA_FFDoc* hDoc, const CFX_WideString& wsTitle) = 0;
virtual void ExportData(CXFA_FFDoc* hDoc,
const CFX_WideStringC& wsFilePath,
FX_BOOL bXDP = TRUE) = 0;
@@ -546,7 +546,7 @@ class IXFA_WidgetIterator {
virtual FX_BOOL SetCurrentWidget(CXFA_FFWidget* hWidget) = 0;
protected:
- ~IXFA_WidgetIterator() {}
+ virtual ~IXFA_WidgetIterator() {}
};
#endif // XFA_FXFA_INCLUDE_FXFA_H_
diff --git a/xfa/fxfa/include/fxfa_widget.h b/xfa/fxfa/include/fxfa_widget.h
index acd800dcd4..3745a38ec0 100644
--- a/xfa/fxfa/include/fxfa_widget.h
+++ b/xfa/fxfa/include/fxfa_widget.h
@@ -35,13 +35,11 @@ class CXFA_WidgetAcc : public CXFA_WidgetData {
FX_BOOL GetName(CFX_WideString& wsName, int32_t iNameType = 0);
FX_BOOL ProcessValueChanged();
-
- public:
void ResetData();
- void SetImageEdit(const CFX_WideStringC& wsContentType,
- const CFX_WideStringC& wsHref,
- const CFX_WideStringC& wsData);
+ void SetImageEdit(const CFX_WideString& wsContentType,
+ const CFX_WideString& wsHref,
+ const CFX_WideString& wsData);
CXFA_WidgetAcc* GetExclGroup();
CXFA_FFDocView* GetDocView();
diff --git a/xfa/fxfa/parser/cxfa_validate.cpp b/xfa/fxfa/parser/cxfa_validate.cpp
index db0ffb4fa6..17140fbbc3 100644
--- a/xfa/fxfa/parser/cxfa_validate.cpp
+++ b/xfa/fxfa/parser/cxfa_validate.cpp
@@ -40,7 +40,7 @@ int32_t CXFA_Validate::GetScriptTest() {
}
void CXFA_Validate::GetMessageText(CFX_WideString& wsMessage,
- const CFX_WideStringC& wsMessageType) {
+ const CFX_WideString& wsMessageType) {
CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_Message, FALSE);
if (!pNode)
return;
@@ -61,23 +61,23 @@ void CXFA_Validate::GetMessageText(CFX_WideString& wsMessage,
}
void CXFA_Validate::SetFormatMessageText(CFX_WideString wsMessage) {
- SetMessageText(wsMessage, FX_WSTRC(L"formatTest"));
+ SetMessageText(wsMessage, L"formatTest");
}
void CXFA_Validate::GetFormatMessageText(CFX_WideString& wsMessage) {
- GetMessageText(wsMessage, FX_WSTRC(L"formatTest"));
+ GetMessageText(wsMessage, L"formatTest");
}
void CXFA_Validate::SetNullMessageText(CFX_WideString wsMessage) {
- SetMessageText(wsMessage, FX_WSTRC(L"nullTest"));
+ SetMessageText(wsMessage, L"nullTest");
}
void CXFA_Validate::GetNullMessageText(CFX_WideString& wsMessage) {
- GetMessageText(wsMessage, FX_WSTRC(L"nullTest"));
+ GetMessageText(wsMessage, L"nullTest");
}
void CXFA_Validate::SetMessageText(CFX_WideString& wsMessage,
- const CFX_WideStringC& wsMessageType) {
+ const CFX_WideString& wsMessageType) {
CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_Message, TRUE);
if (!pNode)
return;
@@ -102,11 +102,11 @@ void CXFA_Validate::SetMessageText(CFX_WideString& wsMessage,
}
void CXFA_Validate::GetScriptMessageText(CFX_WideString& wsMessage) {
- GetMessageText(wsMessage, FX_WSTRC(L"scriptTest"));
+ GetMessageText(wsMessage, L"scriptTest");
}
void CXFA_Validate::SetScriptMessageText(CFX_WideString wsMessage) {
- SetMessageText(wsMessage, FX_WSTRC(L"scriptTest"));
+ SetMessageText(wsMessage, L"scriptTest");
}
void CXFA_Validate::GetPicture(CFX_WideString& wsPicture) {
diff --git a/xfa/fxfa/parser/cxfa_validate.h b/xfa/fxfa/parser/cxfa_validate.h
index aab5de3466..bdd7be98b2 100644
--- a/xfa/fxfa/parser/cxfa_validate.h
+++ b/xfa/fxfa/parser/cxfa_validate.h
@@ -33,9 +33,9 @@ class CXFA_Validate : public CXFA_Data {
protected:
void GetMessageText(CFX_WideString& wsMessage,
- const CFX_WideStringC& wsMessageType);
+ const CFX_WideString& wsMessageType);
void SetMessageText(CFX_WideString& wsMessage,
- const CFX_WideStringC& wsMessageType);
+ const CFX_WideString& wsMessageType);
FX_BOOL SetTestValue(int32_t iType,
CFX_WideString& wsValue,
XFA_ATTRIBUTEENUM eName);
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp
index 7ca020fe6f..6ef88cdc74 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.cpp
+++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp
@@ -888,19 +888,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.AsStringC(), nIndex);
+ InsertListTextItem(pItems, wsLabel, nIndex);
CXFA_Node* pSaveItems = m_pNode->CreateSamePacketNode(XFA_ELEMENT_Items);
m_pNode->InsertChild(-1, pSaveItems);
pSaveItems->SetBoolean(XFA_ATTRIBUTE_Save, TRUE);
- InsertListTextItem(pSaveItems, wsNewValue.AsStringC(), nIndex);
+ InsertListTextItem(pSaveItems, wsNewValue, 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.AsStringC(), nIndex);
+ InsertListTextItem(pNode, wsNewValue, nIndex);
else
- InsertListTextItem(pNode, wsLabel.AsStringC(), nIndex);
+ InsertListTextItem(pNode, wsLabel, nIndex);
}
} else {
CXFA_Node* pNode = listitems[0];
@@ -916,12 +916,12 @@ void CXFA_WidgetData::InsertItem(const CFX_WideString& wsLabel,
while (pListNode) {
CFX_WideString wsOldValue;
pListNode->TryContent(wsOldValue);
- InsertListTextItem(pSaveItems, wsOldValue.AsStringC(), i);
+ InsertListTextItem(pSaveItems, wsOldValue, i);
i++;
pListNode = pListNode->GetNodeItem(XFA_NODEITEM_NextSibling);
}
- InsertListTextItem(pNode, wsLabel.AsStringC(), nIndex);
- InsertListTextItem(pSaveItems, wsNewValue.AsStringC(), nIndex);
+ InsertListTextItem(pNode, wsLabel, nIndex);
+ InsertListTextItem(pSaveItems, wsNewValue, nIndex);
}
if (!bNotify)
return;
@@ -1074,7 +1074,8 @@ int32_t CXFA_WidgetData::GetNumberOfCells() {
CFX_WideString CXFA_WidgetData::GetBarcodeType() {
CXFA_Node* pUIChild = GetUIChild();
- return pUIChild ? pUIChild->GetCData(XFA_ATTRIBUTE_Type) : NULL;
+ return pUIChild ? CFX_WideString(pUIChild->GetCData(XFA_ATTRIBUTE_Type))
+ : nullptr;
}
FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_CharEncoding(int32_t& val) {
@@ -1084,7 +1085,8 @@ FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_CharEncoding(int32_t& val) {
if (wsCharEncoding.CompareNoCase(L"UTF-16")) {
val = CHAR_ENCODING_UNICODE;
return TRUE;
- } else if (wsCharEncoding.CompareNoCase(L"UTF-8")) {
+ }
+ if (wsCharEncoding.CompareNoCase(L"UTF-8")) {
val = CHAR_ENCODING_UTF8;
return TRUE;
}
@@ -1475,8 +1477,8 @@ IFX_Locale* CXFA_WidgetData::GetLocal() {
if (wsLocaleName == FX_WSTRC(L"ambient")) {
pLocale = m_pNode->GetDocument()->GetLocalMgr()->GetDefLocale();
} else {
- pLocale = m_pNode->GetDocument()->GetLocalMgr()->GetLocaleByName(
- wsLocaleName.AsStringC());
+ pLocale =
+ m_pNode->GetDocument()->GetLocalMgr()->GetLocaleByName(wsLocaleName);
}
}
return pLocale;
@@ -1739,7 +1741,7 @@ void CXFA_WidgetData::SyncValue(const CFX_WideString& wsValue,
}
void CXFA_WidgetData::InsertListTextItem(CXFA_Node* pItems,
- const CFX_WideStringC& wsText,
+ const CFX_WideString& wsText,
int32_t nIndex) {
CXFA_Node* pText = pItems->CreateSamePacketNode(XFA_ELEMENT_Text);
pItems->InsertChild(nIndex, pText);
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.h b/xfa/fxfa/parser/cxfa_widgetdata.h
index 3cdc7cc8e4..c0d06e353c 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.h
+++ b/xfa/fxfa/parser/cxfa_widgetdata.h
@@ -168,7 +168,7 @@ class CXFA_WidgetData : public CXFA_Data {
protected:
void SyncValue(const CFX_WideString& wsValue, FX_BOOL bNotify);
void InsertListTextItem(CXFA_Node* pItems,
- const CFX_WideStringC& wsText,
+ const CFX_WideString& wsText,
int32_t nIndex = -1);
void FormatNumStr(const CFX_WideString& wsValue,
IFX_Locale* pLocale,
diff --git a/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp b/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp
index c988902b63..31cf4119ad 100644
--- a/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp
@@ -69,7 +69,7 @@ CXFA_Node* XFA_DataDescription_MaybeCreateDataNode(
CXFA_Document* pDocument,
CXFA_Node* pDataParent,
XFA_ELEMENT eNodeType,
- const CFX_WideStringC& wsName) {
+ const CFX_WideString& wsName) {
if (!pDataParent) {
return NULL;
}
@@ -98,7 +98,8 @@ CXFA_Node* XFA_DataDescription_MaybeCreateDataNode(
continue;
}
}
- CXFA_Node* pDDNode = pDDGroupNode->GetFirstChildByName(wsName);
+ CXFA_Node* pDDNode =
+ pDDGroupNode->GetFirstChildByName(wsName.AsStringC());
if (!pDDNode) {
continue;
}
diff --git a/xfa/fxfa/parser/xfa_document_datadescription_imp.h b/xfa/fxfa/parser/xfa_document_datadescription_imp.h
index f7c626dfb7..47bc358972 100644
--- a/xfa/fxfa/parser/xfa_document_datadescription_imp.h
+++ b/xfa/fxfa/parser/xfa_document_datadescription_imp.h
@@ -13,6 +13,6 @@ CXFA_Node* XFA_DataDescription_MaybeCreateDataNode(
CXFA_Document* pDocument,
CXFA_Node* pDataParent,
XFA_ELEMENT eNodeType,
- const CFX_WideStringC& wsName);
+ const CFX_WideString& wsName);
#endif // XFA_FXFA_PARSER_XFA_DOCUMENT_DATADESCRIPTION_IMP_H_
diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
index ccb69df1a1..41a0acd70b 100644
--- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
@@ -135,7 +135,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode,
pDataNode->SetAttributeValue(wsValue, wsFormatedValue);
pDataNode->SetCData(XFA_ATTRIBUTE_ContentType, wsContentType);
if (!wsHref.IsEmpty()) {
- pXMLDataElement->SetString(FX_WSTRC(L"href"), wsHref);
+ pXMLDataElement->SetString(L"href", wsHref);
}
} break;
case XFA_ELEMENT_ChoiceList:
@@ -148,7 +148,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode,
CXFA_Node* pValue = NULL;
for (int32_t i = 0; i < iSize; i++) {
pValue = pDataNode->CreateSamePacketNode(XFA_ELEMENT_DataValue);
- pValue->SetCData(XFA_ATTRIBUTE_Name, FX_WSTRC(L"value"));
+ pValue->SetCData(XFA_ATTRIBUTE_Name, L"value");
pValue->CreateXMLMappingNode();
pDataNode->InsertChild(pValue);
pValue->SetCData(XFA_ATTRIBUTE_Value, wsSelTextArray[i]);
@@ -156,8 +156,8 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode,
} else {
CFDE_XMLNode* pXMLNode = pDataNode->GetXMLMappingNode();
ASSERT(pXMLNode->GetType() == FDE_XMLNODE_Element);
- static_cast<CFDE_XMLElement*>(pXMLNode)
- ->SetString(FX_WSTRC(L"xfa:dataNode"), FX_WSTRC(L"dataGroup"));
+ static_cast<CFDE_XMLElement*>(pXMLNode)->SetString(L"xfa:dataNode",
+ L"dataGroup");
}
} else if (!wsValue.IsEmpty()) {
pWidgetData->GetFormatDataValue(wsValue, wsFormatedValue);
@@ -297,8 +297,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode,
}
CXFA_ExData exData = defValue.GetExData();
ASSERT(exData);
- exData.SetContentType((iCounts == 1) ? FX_WSTRC(L"text/plain")
- : FX_WSTRC(L"text/xml"));
+ exData.SetContentType(iCounts == 1 ? L"text/plain" : L"text/xml");
}
XFA_DataMerge_FormValueNode_SetChildContent(
defValue.GetNode(), wsNormailizeValue, XFA_ELEMENT_ExData);
@@ -1130,7 +1129,7 @@ static void XFA_DataMerge_UpdateBindingRelations(CXFA_Document* pDocument,
: XFA_ELEMENT_DataValue;
pDataNode = XFA_DataDescription_MaybeCreateDataNode(
pDocument, pDataScope, eDataNodeType,
- pFormNode->GetCData(XFA_ATTRIBUTE_Name));
+ CFX_WideString(pFormNode->GetCData(XFA_ATTRIBUTE_Name)));
if (pDataNode) {
XFA_DataMerge_CreateDataBinding(pFormNode, pDataNode, FALSE);
}
@@ -1163,7 +1162,7 @@ static void XFA_DataMerge_UpdateBindingRelations(CXFA_Document* pDocument,
ToNode(pDocument->GetXFAObject(XFA_HASHCODE_Record));
pDataNode = XFA_DataDescription_MaybeCreateDataNode(
pDocument, pRecordNode, eDataNodeType,
- pFormNode->GetCData(XFA_ATTRIBUTE_Name));
+ CFX_WideString(pFormNode->GetCData(XFA_ATTRIBUTE_Name)));
if (pDataNode) {
XFA_DataMerge_CreateDataBinding(pFormNode, pDataNode, FALSE);
XFA_DataMerge_RegisterGlobalBinding(
@@ -1260,14 +1259,11 @@ CXFA_Node* CXFA_Document::GetNotBindNode(CXFA_ObjArray& arrayNodes) {
void CXFA_Document::DoDataMerge() {
CXFA_Node* pDatasetsRoot = ToNode(GetXFAObject(XFA_HASHCODE_Datasets));
if (!pDatasetsRoot) {
- CFDE_XMLElement* pDatasetsXMLNode =
- new CFDE_XMLElement(FX_WSTRC(L"xfa:datasets"));
-
- pDatasetsXMLNode->SetString(
- FX_WSTRC(L"xmlns:xfa"),
- FX_WSTRC(L"http://www.xfa.org/schema/xfa-data/1.0/"));
+ CFDE_XMLElement* pDatasetsXMLNode = new CFDE_XMLElement(L"xfa:datasets");
+ pDatasetsXMLNode->SetString(L"xmlns:xfa",
+ L"http://www.xfa.org/schema/xfa-data/1.0/");
pDatasetsRoot = CreateNode(XFA_XDPPACKET_Datasets, XFA_ELEMENT_DataModel);
- pDatasetsRoot->SetCData(XFA_ATTRIBUTE_Name, FX_WSTRC(L"datasets"));
+ pDatasetsRoot->SetCData(XFA_ATTRIBUTE_Name, L"datasets");
m_pRootNode->GetXMLMappingNode()->InsertChildNode(pDatasetsXMLNode);
m_pRootNode->InsertChild(pDatasetsRoot);
pDatasetsRoot->SetXMLMappingNode(pDatasetsXMLNode);
@@ -1304,11 +1300,9 @@ void CXFA_Document::DoDataMerge() {
}
}
if (!pDataRoot) {
- CFDE_XMLElement* pDataRootXMLNode =
- new CFDE_XMLElement(FX_WSTRC(L"xfa:data"));
-
+ CFDE_XMLElement* pDataRootXMLNode = new CFDE_XMLElement(L"xfa:data");
pDataRoot = CreateNode(XFA_XDPPACKET_Datasets, XFA_ELEMENT_DataGroup);
- pDataRoot->SetCData(XFA_ATTRIBUTE_Name, FX_WSTRC(L"data"));
+ pDataRoot->SetCData(XFA_ATTRIBUTE_Name, L"data");
pDataRoot->SetXMLMappingNode(pDataRootXMLNode);
pDatasetsRoot->InsertChild(pDataRoot);
}
@@ -1335,7 +1329,7 @@ void CXFA_Document::DoDataMerge() {
bEmptyForm = TRUE;
pFormRoot = CreateNode(XFA_XDPPACKET_Form, XFA_ELEMENT_Form);
ASSERT(pFormRoot);
- pFormRoot->SetCData(XFA_ATTRIBUTE_Name, FX_WSTRC(L"form"));
+ pFormRoot->SetCData(XFA_ATTRIBUTE_Name, L"form");
m_pRootNode->InsertChild(pFormRoot, NULL);
} else {
CXFA_NodeIteratorTemplate<CXFA_Node, CXFA_TraverseStrategy_XFANode>
@@ -1350,8 +1344,8 @@ void CXFA_Document::DoDataMerge() {
ASSERT(pSubformSetNode);
if (!pDataTopLevel) {
CFX_WideStringC wsFormName = pSubformSetNode->GetCData(XFA_ATTRIBUTE_Name);
- CFX_WideString wsDataTopLevelName =
- wsFormName.IsEmpty() ? FX_WSTRC(L"form") : wsFormName;
+ CFX_WideString wsDataTopLevelName(wsFormName.IsEmpty() ? L"form"
+ : wsFormName);
CFDE_XMLElement* pDataTopLevelXMLNode =
new CFDE_XMLElement(wsDataTopLevelName);
diff --git a/xfa/fxfa/parser/xfa_document_serialize.cpp b/xfa/fxfa/parser/xfa_document_serialize.cpp
index fce951420d..ef85d0e266 100644
--- a/xfa/fxfa/parser/xfa_document_serialize.cpp
+++ b/xfa/fxfa/parser/xfa_document_serialize.cpp
@@ -93,7 +93,7 @@ CFX_WideString XFA_ExportEncodeAttribute(const CFX_WideString& str) {
textBuf.AppendChar(str[i]);
}
}
- return textBuf.AsStringC();
+ return textBuf.MakeString();
}
CFX_WideString XFA_ExportEncodeContent(const CFX_WideStringC& str) {
CFX_WideTextBuf textBuf;
@@ -123,7 +123,7 @@ CFX_WideString XFA_ExportEncodeContent(const CFX_WideStringC& str) {
textBuf.AppendChar(str.GetAt(i));
}
}
- return textBuf.AsStringC();
+ return textBuf.MakeString();
}
static void XFA_SaveAttribute(CXFA_Node* pNode,
XFA_ATTRIBUTE eName,
@@ -547,8 +547,8 @@ FX_BOOL CXFA_DataExporter::Export(IFX_Stream* pStream,
return FALSE;
}
XFA_DataExporter_DealWithDataGroupNode(pExportNode);
- pElement->SetString(FX_WSTRC(L"xmlns:xfa"),
- FX_WSTRC(L"http://www.xfa.org/schema/xfa-data/1.0/"));
+ pElement->SetString(L"xmlns:xfa",
+ L"http://www.xfa.org/schema/xfa-data/1.0/");
pXMLDoc->SaveXMLNode(pStream, pElement);
pElement->RemoveAttribute(L"xmlns:xfa");
}
@@ -576,8 +576,8 @@ void XFA_DataExporter_DealWithDataGroupNode(CXFA_Node* pDataNode) {
} else {
CFDE_XMLNode* pXMLNode = pDataNode->GetXMLMappingNode();
ASSERT(pXMLNode->GetType() == FDE_XMLNODE_Element);
- static_cast<CFDE_XMLElement*>(pXMLNode)
- ->SetString(FX_WSTRC(L"xfa:dataNode"), FX_WSTRC(L"dataGroup"));
+ static_cast<CFDE_XMLElement*>(pXMLNode)->SetString(L"xfa:dataNode",
+ L"dataGroup");
}
}
}
diff --git a/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp b/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp
index 75bcbbecae..08ce54f844 100644
--- a/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp
+++ b/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp
@@ -274,7 +274,7 @@ static CXFA_Node* XFA_ResolveBreakTarget(CXFA_Node* pPageSetRoot,
if (wsTargetExpr.IsEmpty()) {
return NULL;
}
- CFX_WideString wsTargetAll = wsTargetExpr;
+ CFX_WideString wsTargetAll(wsTargetExpr);
wsTargetAll.TrimLeft();
wsTargetAll.TrimRight();
int32_t iSpliteIndex = 0;
diff --git a/xfa/fxfa/parser/xfa_locale.cpp b/xfa/fxfa/parser/xfa_locale.cpp
index ff0371bc88..7883856b67 100644
--- a/xfa/fxfa/parser/xfa_locale.cpp
+++ b/xfa/fxfa/parser/xfa_locale.cpp
@@ -226,7 +226,8 @@ void CXFA_NodeLocale::Release() {
delete this;
}
CFX_WideString CXFA_NodeLocale::GetName() {
- return m_pLocale ? m_pLocale->GetCData(XFA_ATTRIBUTE_Name) : NULL;
+ return CFX_WideString(m_pLocale ? m_pLocale->GetCData(XFA_ATTRIBUTE_Name)
+ : nullptr);
}
void CXFA_NodeLocale::GetNumbericSymbol(FX_LOCALENUMSYMBOL eType,
CFX_WideString& wsNumSymbol) const {
diff --git a/xfa/fxfa/parser/xfa_localemgr.cpp b/xfa/fxfa/parser/xfa_localemgr.cpp
index 519c4819bd..0982537b15 100644
--- a/xfa/fxfa/parser/xfa_localemgr.cpp
+++ b/xfa/fxfa/parser/xfa_localemgr.cpp
@@ -1131,7 +1131,7 @@ CXFA_LocaleMgr::CXFA_LocaleMgr(CXFA_Node* pLocaleSet, CFX_WideString wsDeflcid)
pNodeLocale = pNodeLocale->GetNodeItem(XFA_NODEITEM_NextSibling);
}
}
- m_pDefLocale = GetLocaleByName(wsDeflcid.AsStringC());
+ m_pDefLocale = GetLocaleByName(wsDeflcid);
}
CXFA_LocaleMgr::~CXFA_LocaleMgr() {
for (int32_t i = 0; i < m_LocaleArray.GetSize(); i++)
@@ -1217,7 +1217,7 @@ IFX_Locale* CXFA_LocaleMgr::GetLocale(uint16_t lcid) {
return pLocal;
}
IFX_Locale* CXFA_LocaleMgr::GetLocaleByName(
- const CFX_WideStringC& wsLocaleName) {
+ const CFX_WideString& wsLocaleName) {
int32_t iCount = m_LocaleArray.GetSize();
int32_t i = 0;
for (i = 0; i < iCount; i++) {
diff --git a/xfa/fxfa/parser/xfa_localemgr.h b/xfa/fxfa/parser/xfa_localemgr.h
index c82c47c7f3..a3a1d4c2b9 100644
--- a/xfa/fxfa/parser/xfa_localemgr.h
+++ b/xfa/fxfa/parser/xfa_localemgr.h
@@ -33,11 +33,13 @@ class IFX_Locale;
class CXFA_LocaleMgr : public IFX_LocaleMgr {
public:
CXFA_LocaleMgr(CXFA_Node* pLocaleSet, CFX_WideString wsDeflcid);
- virtual void Release();
- virtual uint16_t GetDefLocaleID();
- virtual IFX_Locale* GetDefLocale();
- virtual IFX_Locale* GetLocale(uint16_t lcid);
- virtual IFX_Locale* GetLocaleByName(const CFX_WideStringC& wsLocaleName);
+
+ void Release() override;
+ uint16_t GetDefLocaleID() override;
+ IFX_Locale* GetDefLocale() override;
+ IFX_Locale* GetLocale(uint16_t lcid) override;
+ IFX_Locale* GetLocaleByName(const CFX_WideString& wsLocaleName) override;
+
~CXFA_LocaleMgr();
void SetDefLocale(IFX_Locale* pLocale);
CFX_WideStringC GetConfigLocaleName(CXFA_Node* pConfig);
diff --git a/xfa/fxfa/parser/xfa_object_imp.cpp b/xfa/fxfa/parser/xfa_object_imp.cpp
index e3631c60f2..0fbde1f160 100644
--- a/xfa/fxfa/parser/xfa_object_imp.cpp
+++ b/xfa/fxfa/parser/xfa_object_imp.cpp
@@ -140,7 +140,7 @@ CXFA_Node* CXFA_Node::Clone(FX_BOOL bRecursive) {
CFDE_XMLElement* pCloneXMLElement = new CFDE_XMLElement(wsName);
CFX_WideStringC wsValue = GetCData(XFA_ATTRIBUTE_Value);
if (!wsValue.IsEmpty()) {
- pCloneXMLElement->SetTextData(wsValue);
+ pCloneXMLElement->SetTextData(CFX_WideString(wsValue));
}
pCloneXML = pCloneXMLElement;
pCloneXMLElement = NULL;
@@ -981,7 +981,8 @@ void CXFA_Node::Script_NodeClass_LoadXML(CFXJSE_Arguments* pArguments) {
CXFA_Node* pFakeRoot = Clone(FALSE);
CFX_WideStringC wsContentType = GetCData(XFA_ATTRIBUTE_ContentType);
if (!wsContentType.IsEmpty()) {
- pFakeRoot->SetCData(XFA_ATTRIBUTE_ContentType, wsContentType);
+ pFakeRoot->SetCData(XFA_ATTRIBUTE_ContentType,
+ CFX_WideString(wsContentType));
}
CFDE_XMLNode* pFakeXMLRoot = pFakeRoot->GetXMLMappingNode();
if (!pFakeXMLRoot) {
@@ -991,7 +992,7 @@ void CXFA_Node::Script_NodeClass_LoadXML(CFXJSE_Arguments* pArguments) {
if (!pFakeXMLRoot) {
CFX_WideStringC wsClassName;
GetClassName(wsClassName);
- pFakeXMLRoot = new CFDE_XMLElement(wsClassName);
+ pFakeXMLRoot = new CFDE_XMLElement(CFX_WideString(wsClassName));
}
if (bIgnoreRoot) {
CFDE_XMLNode* pXMLChild = pXMLNode->GetNodeItem(CFDE_XMLNode::FirstChild);
@@ -1724,7 +1725,7 @@ void CXFA_Node::Script_Boolean_Value(FXJSE_HVALUE hValue,
FXJSE_Value_ToUTF8String(hValue, newValue);
}
int32_t iValue = FXSYS_atoi(newValue.c_str());
- CFX_WideString wsNewValue = (iValue == 0) ? FX_WSTRC(L"0") : FX_WSTRC(L"1");
+ CFX_WideString wsNewValue(iValue == 0 ? L"0" : L"1");
CFX_WideString wsFormatValue(wsNewValue);
CXFA_WidgetData* pContainerWidgetData = GetContainerWidgetData();
if (pContainerWidgetData) {
@@ -3263,9 +3264,9 @@ int32_t CXFA_Node::InstanceManager_SetInstances(int32_t iDesired) {
}
if (iDesired < iCount) {
CFX_WideStringC wsInstManagerName = GetCData(XFA_ATTRIBUTE_Name);
- CFX_WideString wsInstanceName = wsInstManagerName.IsEmpty()
- ? wsInstManagerName
- : wsInstManagerName.Mid(1);
+ CFX_WideString wsInstanceName =
+ CFX_WideString(wsInstManagerName.IsEmpty() ? wsInstManagerName
+ : wsInstManagerName.Mid(1));
uint32_t dInstanceNameHash =
FX_HashCode_GetW(wsInstanceName.AsStringC(), false);
CXFA_Node* pPrevSibling =
@@ -3737,7 +3738,7 @@ FX_BOOL CXFA_Node::SetAttribute(XFA_ATTRIBUTE eAttr,
bNotify);
} break;
case XFA_ATTRIBUTETYPE_Cdata:
- return SetCData(pAttr->eName, wsValue, bNotify);
+ return SetCData(pAttr->eName, CFX_WideString(wsValue), bNotify);
case XFA_ATTRIBUTETYPE_Boolean:
return SetBoolean(pAttr->eName, wsValue != FX_WSTRC(L"0"), bNotify);
case XFA_ATTRIBUTETYPE_Integer:
@@ -3938,7 +3939,8 @@ FX_BOOL CXFA_Node::SetCData(XFA_ATTRIBUTE eAttr,
case FDE_XMLNODE_Element:
if (IsAttributeInXML()) {
static_cast<CFDE_XMLElement*>(m_pXMLNode)
- ->SetString(GetCData(XFA_ATTRIBUTE_QualifiedName), wsValue);
+ ->SetString(CFX_WideString(GetCData(XFA_ATTRIBUTE_QualifiedName)),
+ wsValue);
} else {
FX_BOOL bDeleteChildren = TRUE;
if (GetPacketID() == XFA_XDPPACKET_Datasets) {
@@ -3995,7 +3997,8 @@ FX_BOOL CXFA_Node::SetAttributeValue(const CFX_WideString& wsValue,
case FDE_XMLNODE_Element:
if (IsAttributeInXML()) {
static_cast<CFDE_XMLElement*>(m_pXMLNode)
- ->SetString(GetCData(XFA_ATTRIBUTE_QualifiedName), wsXMLValue);
+ ->SetString(CFX_WideString(GetCData(XFA_ATTRIBUTE_QualifiedName)),
+ wsXMLValue);
} else {
FX_BOOL bDeleteChildren = TRUE;
if (GetPacketID() == XFA_XDPPACKET_Datasets) {
@@ -4114,8 +4117,7 @@ FX_BOOL CXFA_Node::SetValue(XFA_ATTRIBUTE eAttr,
break;
case XFA_ATTRIBUTETYPE_Boolean:
static_cast<CFDE_XMLElement*>(m_pXMLNode)
- ->SetString(pInfo->pName,
- pValue ? FX_WSTRC(L"1") : FX_WSTRC(L"0"));
+ ->SetString(pInfo->pName, pValue ? L"1" : L"0");
break;
case XFA_ATTRIBUTETYPE_Integer:
static_cast<CFDE_XMLElement*>(m_pXMLNode)
@@ -4172,7 +4174,7 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent,
CXFA_Node* pValue = GetProperty(0, XFA_ELEMENT_Value);
CXFA_Node* pChildValue = pValue->GetNodeItem(XFA_NODEITEM_FirstChild);
ASSERT(pChildValue);
- pChildValue->SetCData(XFA_ATTRIBUTE_ContentType, FX_WSTRC(L"text/xml"));
+ pChildValue->SetCData(XFA_ATTRIBUTE_ContentType, L"text/xml");
pChildValue->SetScriptContent(wsContent, wsContent, bNotify,
bScriptModify, FALSE);
CXFA_Node* pBind = GetBindData();
@@ -4212,7 +4214,7 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent,
while (iAddNodes-- > 0) {
pValueNodes =
pBind->CreateSamePacketNode(XFA_ELEMENT_DataValue);
- pValueNodes->SetCData(XFA_ATTRIBUTE_Name, FX_WSTRC(L"value"));
+ pValueNodes->SetCData(XFA_ATTRIBUTE_Name, L"value");
pValueNodes->CreateXMLMappingNode();
pBind->InsertChild(pValueNodes);
}
@@ -4699,7 +4701,7 @@ FX_BOOL CXFA_Node::RemoveChild(CXFA_Node* pNode, bool bNotify) {
CFDE_XMLElement* pNewXMLElement = new CFDE_XMLElement(wsName);
CFX_WideStringC wsValue = GetCData(XFA_ATTRIBUTE_Value);
if (!wsValue.IsEmpty()) {
- pNewXMLElement->SetTextData(wsValue);
+ pNewXMLElement->SetTextData(CFX_WideString(wsValue));
}
pNode->m_pXMLNode = pNewXMLElement;
pNode->SetEnum(XFA_ATTRIBUTE_Contains, XFA_ATTRIBUTEENUM_Unknown);
@@ -4936,7 +4938,7 @@ void CXFA_Node::UpdateNameHash() {
}
CFDE_XMLNode* CXFA_Node::CreateXMLMappingNode() {
if (!m_pXMLNode) {
- CFX_WideStringC wsTag = GetCData(XFA_ATTRIBUTE_Name);
+ CFX_WideString wsTag(GetCData(XFA_ATTRIBUTE_Name));
m_pXMLNode = new CFDE_XMLElement(wsTag);
SetFlag(XFA_NODEFLAG_OwnXMLNode, false);
}
diff --git a/xfa/fxfa/parser/xfa_parser_imp.cpp b/xfa/fxfa/parser/xfa_parser_imp.cpp
index 23a8dbc925..01ea1d6fae 100644
--- a/xfa/fxfa/parser/xfa_parser_imp.cpp
+++ b/xfa/fxfa/parser/xfa_parser_imp.cpp
@@ -377,7 +377,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_XDP(
return nullptr;
}
m_pRootNode = pXFARootNode;
- pXFARootNode->SetCData(XFA_ATTRIBUTE_Name, FX_WSTRC(L"xfa"));
+ pXFARootNode->SetCData(XFA_ATTRIBUTE_Name, L"xfa");
{
CFDE_XMLElement* pElement = static_cast<CFDE_XMLElement*>(pXMLDocumentNode);
int32_t iAttributeCount = pElement->CountAttributes();
@@ -662,7 +662,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_Data(
->RemoveAttribute(L"xmlns:xfa");
pDataXMLNode = pXMLDocumentNode;
} else {
- CFDE_XMLElement* pDataElement = new CFDE_XMLElement(FX_WSTRC(L"xfa:data"));
+ CFDE_XMLElement* pDataElement = new CFDE_XMLElement(L"xfa:data");
CFDE_XMLNode* pParentXMLNode =
pXMLDocumentNode->GetNodeItem(CFDE_XMLNode::Parent);
if (pParentXMLNode) {
@@ -1147,7 +1147,7 @@ void CXFA_SimpleParser::ParseDataGroup(CXFA_Node* pXFANode,
pXFAMetaData->SetFlag(XFA_NODEFLAG_Initialized, false);
}
if (!bNeedValue) {
- CFX_WideString wsNilName = FX_WSTRC(L"xsi:nil");
+ CFX_WideString wsNilName(L"xsi:nil");
pXMLElement->RemoveAttribute(wsNilName.c_str());
}
}
@@ -1247,14 +1247,14 @@ void CXFA_SimpleParser::ParseDataValue(CXFA_Node* pXFANode,
} else {
bMarkAsCompound = TRUE;
if (pXMLCurValueNode) {
- CFX_WideStringC wsCurValue = wsCurValueTextBuf.AsStringC();
+ CFX_WideString wsCurValue = wsCurValueTextBuf.MakeString();
if (!wsCurValue.IsEmpty()) {
CXFA_Node* pXFAChild =
m_pFactory->CreateNode(ePacketID, XFA_ELEMENT_DataValue);
if (!pXFAChild)
return;
- pXFAChild->SetCData(XFA_ATTRIBUTE_Name, FX_WSTRC(L""));
+ pXFAChild->SetCData(XFA_ATTRIBUTE_Name, L"");
pXFAChild->SetCData(XFA_ATTRIBUTE_Value, wsCurValue);
pXFANode->InsertChild(pXFAChild);
pXFAChild->SetXMLMappingNode(pXMLCurValueNode);
@@ -1281,7 +1281,7 @@ void CXFA_SimpleParser::ParseDataValue(CXFA_Node* pXFANode,
}
}
if (pXMLCurValueNode) {
- CFX_WideStringC wsCurValue = wsCurValueTextBuf.AsStringC();
+ CFX_WideString wsCurValue = wsCurValueTextBuf.MakeString();
if (!wsCurValue.IsEmpty()) {
if (bMarkAsCompound) {
CXFA_Node* pXFAChild =
@@ -1289,7 +1289,7 @@ void CXFA_SimpleParser::ParseDataValue(CXFA_Node* pXFANode,
if (!pXFAChild)
return;
- pXFAChild->SetCData(XFA_ATTRIBUTE_Name, FX_WSTRC(L""));
+ pXFAChild->SetCData(XFA_ATTRIBUTE_Name, L"");
pXFAChild->SetCData(XFA_ATTRIBUTE_Value, wsCurValue);
pXFANode->InsertChild(pXFAChild);
pXFAChild->SetXMLMappingNode(pXMLCurValueNode);
@@ -1300,7 +1300,7 @@ void CXFA_SimpleParser::ParseDataValue(CXFA_Node* pXFANode,
}
pXMLCurValueNode = nullptr;
}
- CFX_WideStringC wsNodeValue = wsValueTextBuf.AsStringC();
+ CFX_WideString wsNodeValue = wsValueTextBuf.MakeString();
pXFANode->SetCData(XFA_ATTRIBUTE_Value, wsNodeValue);
}
diff --git a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
index c771000ebd..e6de66d803 100644
--- a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
+++ b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
@@ -163,7 +163,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Title(
CFX_ByteString bsValue;
FXJSE_Value_ToUTF8String(hValue, bsValue);
pNotify->GetDocProvider()->SetTitle(
- hDoc, CFX_WideString::FromUTF8(bsValue.AsStringC()).AsStringC());
+ hDoc, CFX_WideString::FromUTF8(bsValue.AsStringC()));
return;
}
CFX_WideString wsTitle;
diff --git a/xfa/fxfa/parser/xfa_script_imp.cpp b/xfa/fxfa/parser/xfa_script_imp.cpp
index 1cd5689045..893c5b79ea 100644
--- a/xfa/fxfa/parser/xfa_script_imp.cpp
+++ b/xfa/fxfa/parser/xfa_script_imp.cpp
@@ -291,7 +291,7 @@ void CXFA_ScriptContext::NormalPropertySetter(FXJSE_HOBJECT hObject,
pPropOrChild = pNode->GetFirstChildByName(wsPropName.AsStringC());
}
if (pPropOrChild) {
- CFX_WideString wsDefaultName = FX_WSTRC(L"{default}");
+ CFX_WideString wsDefaultName(L"{default}");
const XFA_SCRIPTATTRIBUTEINFO* lpAttributeInfo =
XFA_GetScriptAttributeByName(pPropOrChild->GetClassID(),
wsDefaultName.AsStringC());
diff --git a/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp
index e46b7060a1..e48d3d5ffa 100644
--- a/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp
+++ b/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp
@@ -65,7 +65,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_HWXY(
return;
}
CXFA_Node* pNode = NULL;
- CFX_WideString wsUnit = FX_WSTRC(L"pt");
+ CFX_WideString wsUnit(L"pt");
int32_t iIndex = 0;
if (iLength >= 1) {
pNode = static_cast<CXFA_Node*>(pArguments->GetObject(0));
diff --git a/xfa/fxfa/parser/xfa_script_nodehelper.cpp b/xfa/fxfa/parser/xfa_script_nodehelper.cpp
index 96ecc5a125..93bf40e324 100644
--- a/xfa/fxfa/parser/xfa_script_nodehelper.cpp
+++ b/xfa/fxfa/parser/xfa_script_nodehelper.cpp
@@ -308,9 +308,8 @@ FX_BOOL CXFA_NodeHelper::XFA_NodeIsTransparent(CXFA_Node* refNode) {
FX_BOOL CXFA_NodeHelper::XFA_CreateNode_ForCondition(
CFX_WideString& wsCondition) {
int32_t iLen = wsCondition.GetLength();
- CFX_WideString wsIndex = FX_WSTRC(L"0");
+ CFX_WideString wsIndex(L"0");
FX_BOOL bAll = FALSE;
-
if (iLen == 0) {
m_iCreateFlag = XFA_RESOLVENODE_RSTYPE_CreateNodeOne;
return FALSE;