summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
authordan sinclair <dsinclair@chromium.org>2017-02-02 14:05:30 -0800
committerChromium commit bot <commit-bot@chromium.org>2017-02-02 22:43:09 +0000
commit65c7c234d026101f69754f97f40e73eb29a3ef16 (patch)
tree166644acf64477c792b01f46de965ba07f64eea3 /xfa/fxfa
parent44b297bb2c948ee4fb1e67301f31e4e7f70e48d7 (diff)
downloadpdfium-65c7c234d026101f69754f97f40e73eb29a3ef16.tar.xz
Remove FX_WSTRC usagechromium/3003chromium/3002
Not needed with modern compilers, removed. Change-Id: Ia8977262b5791bd4445f02be8456641d1a7e18f3 Reviewed-on: https://pdfium-review.googlesource.com/2431 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/app/cxfa_textlayout.cpp17
-rw-r--r--xfa/fxfa/app/xfa_ffdoc.cpp6
-rw-r--r--xfa/fxfa/app/xfa_ffdocview.cpp10
-rw-r--r--xfa/fxfa/app/xfa_ffwidget.cpp18
-rw-r--r--xfa/fxfa/app/xfa_ffwidgetacc.cpp15
-rw-r--r--xfa/fxfa/fm2js/xfa_expression.cpp282
-rw-r--r--xfa/fxfa/fm2js/xfa_fm2jscontext.cpp38
-rw-r--r--xfa/fxfa/fm2js/xfa_fmparse.cpp2
-rw-r--r--xfa/fxfa/fm2js/xfa_simpleexpression.cpp240
-rw-r--r--xfa/fxfa/fm2js/xfa_simpleexpression.h5
-rw-r--r--xfa/fxfa/parser/cscript_hostpseudomodel.cpp2
-rw-r--r--xfa/fxfa/parser/cscript_layoutpseudomodel.cpp12
-rw-r--r--xfa/fxfa/parser/cxfa_dataexporter.cpp68
-rw-r--r--xfa/fxfa/parser/cxfa_document.cpp8
-rw-r--r--xfa/fxfa/parser/cxfa_image.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_layoutpagemgr.cpp7
-rw-r--r--xfa/fxfa/parser/cxfa_measurement.cpp16
-rw-r--r--xfa/fxfa/parser/cxfa_node.cpp30
-rw-r--r--xfa/fxfa/parser/cxfa_nodehelper.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_resolveprocessor.cpp6
-rw-r--r--xfa/fxfa/parser/cxfa_script.cpp4
-rw-r--r--xfa/fxfa/parser/cxfa_scriptcontext.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_simple_parser.cpp74
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.cpp15
-rw-r--r--xfa/fxfa/parser/cxfa_xml_parser.cpp7
-rw-r--r--xfa/fxfa/parser/xfa_document_datamerger_imp.cpp19
-rw-r--r--xfa/fxfa/parser/xfa_locale.cpp47
-rw-r--r--xfa/fxfa/parser/xfa_localevalue.cpp9
28 files changed, 465 insertions, 498 deletions
diff --git a/xfa/fxfa/app/cxfa_textlayout.cpp b/xfa/fxfa/app/cxfa_textlayout.cpp
index 86f49eda89..0fbe8e0fe3 100644
--- a/xfa/fxfa/app/cxfa_textlayout.cpp
+++ b/xfa/fxfa/app/cxfa_textlayout.cpp
@@ -80,7 +80,7 @@ CFDE_XMLNode* CXFA_TextLayout::GetXMLContainerNode() {
CFDE_XMLElement* pXMLElement = static_cast<CFDE_XMLElement*>(pXMLChild);
CFX_WideString wsTag;
pXMLElement->GetLocalTagName(wsTag);
- if (wsTag == FX_WSTRC(L"body") || wsTag == FX_WSTRC(L"html")) {
+ if (wsTag == L"body" || wsTag == L"html") {
pXMLContainer = pXMLChild;
break;
}
@@ -732,7 +732,7 @@ bool CXFA_TextLayout::LoadRichText(
pElement = static_cast<CFDE_XMLElement*>(pXMLNode);
pElement->GetLocalTagName(wsName);
}
- if (wsName == FX_WSTRC(L"ol")) {
+ if (wsName == L"ol") {
bIsOl = true;
bCurOl = true;
}
@@ -750,9 +750,8 @@ bool CXFA_TextLayout::LoadRichText(
if ((eDisplay == FDE_CSSDisplay::Block ||
eDisplay == FDE_CSSDisplay::ListItem) &&
pStyle &&
- (wsName.IsEmpty() ||
- (wsName != FX_WSTRC(L"body") && wsName != FX_WSTRC(L"html") &&
- wsName != FX_WSTRC(L"ol") && wsName != FX_WSTRC(L"ul")))) {
+ (wsName.IsEmpty() || (wsName != L"body" && wsName != L"html" &&
+ wsName != L"ol" && wsName != L"ul"))) {
const FDE_CSSRect* pRect = pStyle->GetMarginWidth();
if (pRect) {
fLinePos += pRect->top.GetValue();
@@ -760,7 +759,7 @@ bool CXFA_TextLayout::LoadRichText(
}
}
- if (wsName == FX_WSTRC(L"a")) {
+ if (wsName == L"a") {
CFX_WideString wsLinkContent;
ASSERT(pElement);
pElement->GetString(L"href", wsLinkContent);
@@ -778,14 +777,14 @@ bool CXFA_TextLayout::LoadRichText(
CFX_WideString wsText;
if (bContentNode && iTabCount == 0) {
static_cast<CFDE_XMLText*>(pXMLNode)->GetText(wsText);
- } else if (wsName == FX_WSTRC(L"br")) {
+ } else if (wsName == L"br") {
wsText = L'\n';
- } else if (wsName == FX_WSTRC(L"li")) {
+ } else if (wsName == L"li") {
bCurLi = true;
if (bIsOl)
wsText.Format(L"%d. ", iLiCount);
else
- wsText = 0x00B7 + FX_WSTRC(L" ");
+ wsText = 0x00B7 + CFX_WideStringC(L" ", 1);
} else if (!bContentNode) {
if (iTabCount > 0) {
while (iTabCount-- > 0)
diff --git a/xfa/fxfa/app/xfa_ffdoc.cpp b/xfa/fxfa/app/xfa_ffdoc.cpp
index c34213c17e..911bdf8400 100644
--- a/xfa/fxfa/app/xfa_ffdoc.cpp
+++ b/xfa/fxfa/app/xfa_ffdoc.cpp
@@ -183,7 +183,7 @@ bool XFA_GetPDFContentsFromPDFXML(CFDE_XMLNode* pPDFElement,
CFX_WideString wsTagName;
CFDE_XMLElement* pXMLElement = static_cast<CFDE_XMLElement*>(pXMLNode);
pXMLElement->GetTagName(wsTagName);
- if (wsTagName == FX_WSTRC(L"document")) {
+ if (wsTagName == L"document") {
pDocumentElement = pXMLElement;
break;
}
@@ -200,7 +200,7 @@ bool XFA_GetPDFContentsFromPDFXML(CFDE_XMLNode* pPDFElement,
CFX_WideString wsTagName;
CFDE_XMLElement* pXMLElement = static_cast<CFDE_XMLElement*>(pXMLNode);
pXMLElement->GetTagName(wsTagName);
- if (wsTagName == FX_WSTRC(L"chunk")) {
+ if (wsTagName == L"chunk") {
pChunkElement = pXMLElement;
break;
}
@@ -265,7 +265,7 @@ void CXFA_FFDoc::StopLoad() {
return;
}
CFX_WideString wsType;
- if (pDynamicRender->TryContent(wsType) && wsType == FX_WSTRC(L"required")) {
+ if (pDynamicRender->TryContent(wsType) && wsType == L"required") {
m_dwDocType = XFA_DOCTYPE_Dynamic;
}
}
diff --git a/xfa/fxfa/app/xfa_ffdocview.cpp b/xfa/fxfa/app/xfa_ffdocview.cpp
index 0aedeed231..847ae07d87 100644
--- a/xfa/fxfa/app/xfa_ffdocview.cpp
+++ b/xfa/fxfa/app/xfa_ffdocview.cpp
@@ -155,7 +155,7 @@ void CXFA_FFDocView::ShowNullTestMsg() {
iCount -= iRemain;
CFX_WideString wsMsg;
for (int32_t i = 0; i < iCount; i++) {
- wsMsg += m_arrNullTestMsg[i] + FX_WSTRC(L"\n");
+ wsMsg += m_arrNullTestMsg[i] + L"\n";
}
if (iRemain > 0) {
CFX_WideString wsTemp;
@@ -163,7 +163,7 @@ void CXFA_FFDocView::ShowNullTestMsg() {
L"Message limit exceeded. Remaining %d "
L"validation errors not reported.",
iRemain);
- wsMsg += FX_WSTRC(L"\n") + wsTemp;
+ wsMsg += L"\n" + wsTemp;
}
pAppProvider->MsgBox(wsMsg, pAppProvider->GetAppTitle(), XFA_MBICON_Status,
XFA_MB_OK);
@@ -755,10 +755,8 @@ void CXFA_FFDocView::RunBindItems() {
binditems.GetValueRef(wsValueRef);
binditems.GetLabelRef(wsLabelRef);
const bool bUseValue = wsLabelRef.IsEmpty() || wsLabelRef == wsValueRef;
- const bool bLabelUseContent =
- wsLabelRef.IsEmpty() || wsLabelRef == FX_WSTRC(L"$");
- const bool bValueUseContent =
- wsValueRef.IsEmpty() || wsValueRef == FX_WSTRC(L"$");
+ const bool bLabelUseContent = wsLabelRef.IsEmpty() || wsLabelRef == L"$";
+ const bool bValueUseContent = wsValueRef.IsEmpty() || wsValueRef == L"$";
CFX_WideString wsValue;
CFX_WideString wsLabel;
uint32_t uValueHash = FX_HashCode_GetW(wsValueRef, false);
diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp
index 4cd6b44a66..c87fa4ef9f 100644
--- a/xfa/fxfa/app/xfa_ffwidget.cpp
+++ b/xfa/fxfa/app/xfa_ffwidget.cpp
@@ -1020,21 +1020,16 @@ FX_CHAR* XFA_Base64Encode(const uint8_t* buf, int32_t buf_len) {
FXCODEC_IMAGE_TYPE XFA_GetImageType(const CFX_WideString& wsType) {
CFX_WideString wsContentType(wsType);
wsContentType.MakeLower();
- if (wsContentType == FX_WSTRC(L"image/jpg")) {
+ if (wsContentType == L"image/jpg")
return FXCODEC_IMAGE_JPG;
- }
- if (wsContentType == FX_WSTRC(L"image/png")) {
+ if (wsContentType == L"image/png")
return FXCODEC_IMAGE_PNG;
- }
- if (wsContentType == FX_WSTRC(L"image/gif")) {
+ if (wsContentType == L"image/gif")
return FXCODEC_IMAGE_GIF;
- }
- if (wsContentType == FX_WSTRC(L"image/bmp")) {
+ if (wsContentType == L"image/bmp")
return FXCODEC_IMAGE_BMP;
- }
- if (wsContentType == FX_WSTRC(L"image/tif")) {
+ if (wsContentType == L"image/tif")
return FXCODEC_IMAGE_TIF;
- }
return FXCODEC_IMAGE_UNKNOWN;
}
CFX_DIBitmap* XFA_LoadImageData(CXFA_FFDoc* pDoc,
@@ -1073,8 +1068,7 @@ CFX_DIBitmap* XFA_LoadImageData(CXFA_FFDoc* pDoc,
}
} else {
CFX_WideString wsURL = wsHref;
- if (wsURL.Left(7) != FX_WSTRC(L"http://") &&
- wsURL.Left(6) != FX_WSTRC(L"ftp://")) {
+ if (wsURL.Left(7) != L"http://" && wsURL.Left(6) != L"ftp://") {
CFX_DIBitmap* pBitmap =
pDoc->GetPDFNamedImage(wsURL.AsStringC(), iImageXDpi, iImageYDpi);
if (pBitmap) {
diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
index 5fe591c02a..97adff30ac 100644
--- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
@@ -183,7 +183,7 @@ bool CXFA_WidgetAcc::GetName(CFX_WideString& wsName, int32_t iNameType) {
}
m_pNode->GetSOMExpression(wsName);
if (iNameType == 2 && wsName.GetLength() >= 15) {
- CFX_WideStringC wsPre = FX_WSTRC(L"xfa[0].form[0].");
+ CFX_WideStringC wsPre = L"xfa[0].form[0].";
if (wsPre == CFX_WideStringC(wsName.c_str(), wsPre.GetLength())) {
wsName.Delete(0, wsPre.GetLength());
}
@@ -1497,7 +1497,7 @@ CXFA_WidgetLayoutData* CXFA_WidgetAcc::GetWidgetLayoutData() {
}
CFX_RetainPtr<CFGAS_GEFont> CXFA_WidgetAcc::GetFDEFont() {
- CFX_WideStringC wsFontName = FX_WSTRC(L"Courier");
+ CFX_WideStringC wsFontName = L"Courier";
uint32_t dwFontStyle = 0;
if (CXFA_Font font = GetFont()) {
if (font.IsBold())
@@ -1541,7 +1541,7 @@ CXFA_Node* CXFA_TextProvider::GetTextNode(bool& bRichText) {
CFX_WideString wsContentType;
m_pTextNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType,
false);
- if (wsContentType == FX_WSTRC(L"text/html")) {
+ if (wsContentType == L"text/html") {
bRichText = true;
}
}
@@ -1557,7 +1557,7 @@ CXFA_Node* CXFA_TextProvider::GetTextNode(bool& bRichText) {
if (pChildNode && pChildNode->GetElementType() == XFA_Element::ExData) {
CFX_WideString wsContentType;
pChildNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, false);
- if (wsContentType == FX_WSTRC(L"text/html")) {
+ if (wsContentType == L"text/html") {
bRichText = true;
}
}
@@ -1592,7 +1592,7 @@ CXFA_Node* CXFA_TextProvider::GetTextNode(bool& bRichText) {
if (pChildNode && pChildNode->GetElementType() == XFA_Element::ExData) {
CFX_WideString wsContentType;
pChildNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, false);
- if (wsContentType == FX_WSTRC(L"text/html")) {
+ if (wsContentType == L"text/html") {
bRichText = true;
}
}
@@ -1607,11 +1607,10 @@ CXFA_Node* CXFA_TextProvider::GetTextNode(bool& bRichText) {
while (pNode) {
CFX_WideStringC wsName;
pNode->TryCData(XFA_ATTRIBUTE_Name, wsName);
- if (m_eType == XFA_TEXTPROVIDERTYPE_Rollover &&
- wsName == FX_WSTRC(L"rollover")) {
+ if (m_eType == XFA_TEXTPROVIDERTYPE_Rollover && wsName == L"rollover") {
return pNode;
}
- if (m_eType == XFA_TEXTPROVIDERTYPE_Down && wsName == FX_WSTRC(L"down")) {
+ if (m_eType == XFA_TEXTPROVIDERTYPE_Down && wsName == L"down") {
return pNode;
}
pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling);
diff --git a/xfa/fxfa/fm2js/xfa_expression.cpp b/xfa/fxfa/fm2js/xfa_expression.cpp
index a4d1195933..32db6d24df 100644
--- a/xfa/fxfa/fm2js/xfa_expression.cpp
+++ b/xfa/fxfa/fm2js/xfa_expression.cpp
@@ -46,24 +46,24 @@ CXFA_FMFunctionDefinition::~CXFA_FMFunctionDefinition() {}
void CXFA_FMFunctionDefinition::ToJavaScript(CFX_WideTextBuf& javascript) {
if (m_isGlobal && m_pExpressions.empty()) {
- javascript << FX_WSTRC(L"// comments only");
+ javascript << L"// comments only";
return;
}
if (m_isGlobal) {
- javascript << FX_WSTRC(L"(\n");
+ javascript << L"(\n";
}
- javascript << FX_WSTRC(L"function ");
+ javascript << L"function ";
if (m_wsName.GetAt(0) == L'!') {
CFX_WideString tempName = EXCLAMATION_IN_IDENTIFIER + m_wsName.Mid(1);
javascript << tempName;
} else {
javascript << m_wsName;
}
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
bool bNeedComma = false;
for (const auto& identifier : m_pArguments) {
if (bNeedComma)
- javascript << FX_WSTRC(L", ");
+ javascript << L", ";
if (identifier.GetAt(0) == L'!') {
CFX_WideString tempIdentifier =
EXCLAMATION_IN_IDENTIFIER + identifier.Mid(1);
@@ -73,28 +73,28 @@ void CXFA_FMFunctionDefinition::ToJavaScript(CFX_WideTextBuf& javascript) {
}
bNeedComma = true;
}
- javascript << FX_WSTRC(L")\n{\n");
- javascript << FX_WSTRC(L"var ");
+ javascript << L")\n{\n";
+ javascript << L"var ";
javascript << RUNTIMEFUNCTIONRETURNVALUE;
- javascript << FX_WSTRC(L" = null;\n");
+ javascript << L" = null;\n";
for (const auto& expr : m_pExpressions) {
if (expr == m_pExpressions.back())
expr->ToImpliedReturnJS(javascript);
else
expr->ToJavaScript(javascript);
}
- javascript << FX_WSTRC(L"return ");
+ javascript << L"return ";
if (m_isGlobal) {
javascript << XFA_FM_EXPTypeToString(GETFMVALUE);
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
javascript << RUNTIMEFUNCTIONRETURNVALUE;
- javascript << FX_WSTRC(L")");
+ javascript << L")";
} else {
javascript << RUNTIMEFUNCTIONRETURNVALUE;
}
- javascript << FX_WSTRC(L";\n}\n");
+ javascript << L";\n}\n";
if (m_isGlobal) {
- javascript << FX_WSTRC(L").call(this);\n");
+ javascript << L").call(this);\n";
}
}
@@ -111,49 +111,49 @@ CXFA_FMVarExpression::CXFA_FMVarExpression(
CXFA_FMVarExpression::~CXFA_FMVarExpression() {}
void CXFA_FMVarExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
- javascript << FX_WSTRC(L"var ");
+ javascript << L"var ";
CFX_WideString tempName(m_wsName);
if (m_wsName.GetAt(0) == L'!') {
tempName = EXCLAMATION_IN_IDENTIFIER + m_wsName.Mid(1);
}
javascript << tempName;
- javascript << FX_WSTRC(L" = ");
+ javascript << L" = ";
if (m_pInit) {
m_pInit->ToJavaScript(javascript);
javascript << tempName;
- javascript << FX_WSTRC(L" = ");
+ javascript << L" = ";
javascript << XFA_FM_EXPTypeToString(VARFILTER);
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
javascript << tempName;
- javascript << FX_WSTRC(L");\n");
+ javascript << L");\n";
} else {
- javascript << FX_WSTRC(L"\"\";\n");
+ javascript << L"\"\";\n";
}
}
void CXFA_FMVarExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
- javascript << FX_WSTRC(L"var ");
+ javascript << L"var ";
CFX_WideString tempName(m_wsName);
if (m_wsName.GetAt(0) == L'!') {
tempName = EXCLAMATION_IN_IDENTIFIER + m_wsName.Mid(1);
}
javascript << tempName;
- javascript << FX_WSTRC(L" = ");
+ javascript << L" = ";
if (m_pInit) {
m_pInit->ToJavaScript(javascript);
javascript << tempName;
- javascript << FX_WSTRC(L" = ");
+ javascript << L" = ";
javascript << XFA_FM_EXPTypeToString(VARFILTER);
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
javascript << tempName;
- javascript << FX_WSTRC(L");\n");
+ javascript << L");\n";
} else {
- javascript << FX_WSTRC(L"\"\";\n");
+ javascript << L"\"\";\n";
}
javascript << RUNTIMEFUNCTIONRETURNVALUE;
- javascript << FX_WSTRC(L" = ");
+ javascript << L" = ";
javascript << tempName;
- javascript << FX_WSTRC(L";\n");
+ javascript << L";\n";
}
CXFA_FMExpExpression::CXFA_FMExpExpression(
@@ -169,7 +169,7 @@ void CXFA_FMExpExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
m_pExpression->ToJavaScript(javascript);
} else {
m_pExpression->ToJavaScript(javascript);
- javascript << FX_WSTRC(L";\n");
+ javascript << L";\n";
}
}
@@ -183,16 +183,16 @@ void CXFA_FMExpExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
m_pExpression->GetOperatorToken() == TOKdotdot ||
m_pExpression->GetOperatorToken() == TOKdot) {
javascript << RUNTIMEFUNCTIONRETURNVALUE;
- javascript << FX_WSTRC(L" = ");
+ javascript << L" = ";
javascript << XFA_FM_EXPTypeToString(GETFMVALUE);
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pExpression->ToJavaScript(javascript);
- javascript << FX_WSTRC(L");\n");
+ javascript << L");\n";
} else {
javascript << RUNTIMEFUNCTIONRETURNVALUE;
- javascript << FX_WSTRC(L" = ");
+ javascript << L" = ";
m_pExpression->ToJavaScript(javascript);
- javascript << FX_WSTRC(L";\n");
+ javascript << L";\n";
}
}
}
@@ -206,21 +206,21 @@ CXFA_FMBlockExpression::CXFA_FMBlockExpression(
CXFA_FMBlockExpression::~CXFA_FMBlockExpression() {}
void CXFA_FMBlockExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
- javascript << FX_WSTRC(L"{\n");
+ javascript << L"{\n";
for (const auto& expr : m_ExpressionList)
expr->ToJavaScript(javascript);
- javascript << FX_WSTRC(L"}\n");
+ javascript << L"}\n";
}
void CXFA_FMBlockExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
- javascript << FX_WSTRC(L"{\n");
+ javascript << L"{\n";
for (const auto& expr : m_ExpressionList) {
if (expr == m_ExpressionList.back())
expr->ToImpliedReturnJS(javascript);
else
expr->ToJavaScript(javascript);
}
- javascript << FX_WSTRC(L"}\n");
+ javascript << L"}\n";
}
CXFA_FMDoExpression::CXFA_FMDoExpression(
@@ -251,25 +251,25 @@ CXFA_FMIfExpression::CXFA_FMIfExpression(
CXFA_FMIfExpression::~CXFA_FMIfExpression() {}
void CXFA_FMIfExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
- javascript << FX_WSTRC(L"if (");
+ javascript << L"if (";
if (m_pExpression) {
javascript << XFA_FM_EXPTypeToString(GETFMVALUE);
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pExpression->ToJavaScript(javascript);
- javascript << FX_WSTRC(L")");
+ javascript << L")";
}
- javascript << FX_WSTRC(L")\n");
+ javascript << L")\n";
if (m_pIfExpression) {
m_pIfExpression->ToJavaScript(javascript);
}
if (m_pElseExpression) {
if (m_pElseExpression->GetExpType() == XFA_FM_EXPTYPE_IF) {
- javascript << FX_WSTRC(L"else\n");
- javascript << FX_WSTRC(L"{\n");
+ javascript << L"else\n";
+ javascript << L"{\n";
m_pElseExpression->ToJavaScript(javascript);
- javascript << FX_WSTRC(L"}\n");
+ javascript << L"}\n";
} else {
- javascript << FX_WSTRC(L"else\n");
+ javascript << L"else\n";
m_pElseExpression->ToJavaScript(javascript);
}
}
@@ -277,26 +277,26 @@ void CXFA_FMIfExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
void CXFA_FMIfExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
javascript << RUNTIMEFUNCTIONRETURNVALUE;
- javascript << FX_WSTRC(L" = 0;\n");
- javascript << FX_WSTRC(L"if (");
+ javascript << L" = 0;\n";
+ javascript << L"if (";
if (m_pExpression) {
javascript << XFA_FM_EXPTypeToString(GETFMVALUE);
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pExpression->ToJavaScript(javascript);
- javascript << FX_WSTRC(L")");
+ javascript << L")";
}
- javascript << FX_WSTRC(L")\n");
+ javascript << L")\n";
if (m_pIfExpression) {
m_pIfExpression->ToImpliedReturnJS(javascript);
}
if (m_pElseExpression) {
if (m_pElseExpression->GetExpType() == XFA_FM_EXPTYPE_IF) {
- javascript << FX_WSTRC(L"else\n");
- javascript << FX_WSTRC(L"{\n");
+ javascript << L"else\n";
+ javascript << L"{\n";
m_pElseExpression->ToImpliedReturnJS(javascript);
- javascript << FX_WSTRC(L"}\n");
+ javascript << L"}\n";
} else {
- javascript << FX_WSTRC(L"else\n");
+ javascript << L"else\n";
m_pElseExpression->ToImpliedReturnJS(javascript);
}
}
@@ -319,18 +319,18 @@ CXFA_FMWhileExpression::CXFA_FMWhileExpression(
CXFA_FMWhileExpression::~CXFA_FMWhileExpression() {}
void CXFA_FMWhileExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
- javascript << FX_WSTRC(L"while (");
+ javascript << L"while (";
m_pCondition->ToJavaScript(javascript);
- javascript << FX_WSTRC(L")\n");
+ javascript << L")\n";
m_pExpression->ToJavaScript(javascript);
}
void CXFA_FMWhileExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
javascript << RUNTIMEFUNCTIONRETURNVALUE;
- javascript << FX_WSTRC(L" = 0;\n");
- javascript << FX_WSTRC(L"while (");
+ javascript << L" = 0;\n";
+ javascript << L"while (";
m_pCondition->ToJavaScript(javascript);
- javascript << FX_WSTRC(L")\n");
+ javascript << L")\n";
m_pExpression->ToImpliedReturnJS(javascript);
}
@@ -341,14 +341,14 @@ CXFA_FMBreakExpression::~CXFA_FMBreakExpression() {}
void CXFA_FMBreakExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << RUNTIMEFUNCTIONRETURNVALUE;
- javascript << FX_WSTRC(L" = 0;\n");
- javascript << FX_WSTRC(L"break;\n");
+ javascript << L" = 0;\n";
+ javascript << L"break;\n";
}
void CXFA_FMBreakExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
javascript << RUNTIMEFUNCTIONRETURNVALUE;
- javascript << FX_WSTRC(L" = 0;\n");
- javascript << FX_WSTRC(L"break;\n");
+ javascript << L" = 0;\n";
+ javascript << L"break;\n";
}
CXFA_FMContinueExpression::CXFA_FMContinueExpression(uint32_t line)
@@ -358,14 +358,14 @@ CXFA_FMContinueExpression::~CXFA_FMContinueExpression() {}
void CXFA_FMContinueExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << RUNTIMEFUNCTIONRETURNVALUE;
- javascript << FX_WSTRC(L" = 0;\n");
- javascript << FX_WSTRC(L"continue;\n");
+ javascript << L" = 0;\n";
+ javascript << L"continue;\n";
}
void CXFA_FMContinueExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
javascript << RUNTIMEFUNCTIONRETURNVALUE;
- javascript << FX_WSTRC(L" = 0;\n");
- javascript << FX_WSTRC(L"continue;\n");
+ javascript << L" = 0;\n";
+ javascript << L"continue;\n";
}
CXFA_FMForExpression::CXFA_FMForExpression(
@@ -387,7 +387,7 @@ CXFA_FMForExpression::CXFA_FMForExpression(
CXFA_FMForExpression::~CXFA_FMForExpression() {}
void CXFA_FMForExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
- javascript << FX_WSTRC(L"{\nvar ");
+ javascript << L"{\nvar ";
CFX_WideString tempVariant;
if (m_wsVariant.GetAt(0) == L'!') {
tempVariant = EXCLAMATION_IN_IDENTIFIER + m_wsVariant.Mid(1);
@@ -396,49 +396,49 @@ void CXFA_FMForExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
tempVariant = m_wsVariant;
javascript << m_wsVariant;
}
- javascript << FX_WSTRC(L" = null;\n");
- javascript << FX_WSTRC(L"for (");
+ javascript << L" = null;\n";
+ javascript << L"for (";
javascript << tempVariant;
- javascript << FX_WSTRC(L" = ");
+ javascript << L" = ";
javascript << XFA_FM_EXPTypeToString(GETFMVALUE);
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pAssignment->ToJavaScript(javascript);
- javascript << FX_WSTRC(L"); ");
+ javascript << L"); ";
javascript << tempVariant;
if (m_iDirection == 1) {
- javascript << FX_WSTRC(L" <= ");
+ javascript << L" <= ";
javascript << XFA_FM_EXPTypeToString(GETFMVALUE);
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pAccessor->ToJavaScript(javascript);
- javascript << FX_WSTRC(L"); ");
+ javascript << L"); ";
javascript << tempVariant;
- javascript << FX_WSTRC(L" += ");
+ javascript << L" += ";
} else {
- javascript << FX_WSTRC(L" >= ");
+ javascript << L" >= ";
javascript << XFA_FM_EXPTypeToString(GETFMVALUE);
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pAccessor->ToJavaScript(javascript);
- javascript << FX_WSTRC(L"); ");
+ javascript << L"); ";
javascript << tempVariant;
- javascript << FX_WSTRC(L" -= ");
+ javascript << L" -= ";
}
if (m_pStep) {
javascript << XFA_FM_EXPTypeToString(GETFMVALUE);
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pStep->ToJavaScript(javascript);
- javascript << FX_WSTRC(L")");
+ javascript << L")";
} else {
- javascript << FX_WSTRC(L"1");
+ javascript << L"1";
}
- javascript << FX_WSTRC(L")\n");
+ javascript << L")\n";
m_pList->ToJavaScript(javascript);
- javascript << FX_WSTRC(L"}\n");
+ javascript << L"}\n";
}
void CXFA_FMForExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
javascript << RUNTIMEFUNCTIONRETURNVALUE;
- javascript << FX_WSTRC(L" = 0;\n");
- javascript << FX_WSTRC(L"{\nvar ");
+ javascript << L" = 0;\n";
+ javascript << L"{\nvar ";
CFX_WideString tempVariant;
if (m_wsVariant.GetAt(0) == L'!') {
tempVariant = EXCLAMATION_IN_IDENTIFIER + m_wsVariant.Mid(1);
@@ -447,43 +447,43 @@ void CXFA_FMForExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
tempVariant = m_wsVariant;
javascript << m_wsVariant;
}
- javascript << FX_WSTRC(L" = null;\n");
- javascript << FX_WSTRC(L"for (");
+ javascript << L" = null;\n";
+ javascript << L"for (";
javascript << tempVariant;
- javascript << FX_WSTRC(L" = ");
+ javascript << L" = ";
javascript << XFA_FM_EXPTypeToString(GETFMVALUE);
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pAssignment->ToJavaScript(javascript);
- javascript << FX_WSTRC(L"); ");
+ javascript << L"); ";
javascript << tempVariant;
if (m_iDirection == 1) {
- javascript << FX_WSTRC(L" <= ");
+ javascript << L" <= ";
javascript << XFA_FM_EXPTypeToString(GETFMVALUE);
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pAccessor->ToJavaScript(javascript);
- javascript << FX_WSTRC(L"); ");
+ javascript << L"); ";
javascript << tempVariant;
- javascript << FX_WSTRC(L" += ");
+ javascript << L" += ";
} else {
- javascript << FX_WSTRC(L" >= ");
+ javascript << L" >= ";
javascript << XFA_FM_EXPTypeToString(GETFMVALUE);
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pAccessor->ToJavaScript(javascript);
- javascript << FX_WSTRC(L"); ");
+ javascript << L"); ";
javascript << tempVariant;
- javascript << FX_WSTRC(L" -= ");
+ javascript << L" -= ";
}
if (m_pStep) {
javascript << XFA_FM_EXPTypeToString(GETFMVALUE);
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pStep->ToJavaScript(javascript);
- javascript << FX_WSTRC(L")");
+ javascript << L")";
} else {
- javascript << FX_WSTRC(L"1");
+ javascript << L"1";
}
- javascript << FX_WSTRC(L")\n");
+ javascript << L")\n";
m_pList->ToImpliedReturnJS(javascript);
- javascript << FX_WSTRC(L"}\n");
+ javascript << L"}\n";
}
CXFA_FMForeachExpression::CXFA_FMForeachExpression(
@@ -499,8 +499,8 @@ CXFA_FMForeachExpression::CXFA_FMForeachExpression(
CXFA_FMForeachExpression::~CXFA_FMForeachExpression() {}
void CXFA_FMForeachExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
- javascript << FX_WSTRC(L"{\n");
- javascript << FX_WSTRC(L"var ");
+ javascript << L"{\n";
+ javascript << L"var ";
if (m_wsIdentifier.GetAt(0) == L'!') {
CFX_WideString tempIdentifier =
EXCLAMATION_IN_IDENTIFIER + m_wsIdentifier.Mid(1);
@@ -508,27 +508,27 @@ void CXFA_FMForeachExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
} else {
javascript << m_wsIdentifier;
}
- javascript << FX_WSTRC(L" = null;\n");
- javascript << FX_WSTRC(L"var ");
+ javascript << L" = null;\n";
+ javascript << L"var ";
javascript << RUNTIMEBLOCKTEMPARRAY;
- javascript << FX_WSTRC(L" = ");
+ javascript << L" = ";
javascript << XFA_FM_EXPTypeToString(CONCATFMOBJECT);
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
for (const auto& expr : m_pAccessors) {
expr->ToJavaScript(javascript);
if (expr != m_pAccessors.back())
javascript << L", ";
}
- javascript << FX_WSTRC(L");\n");
- javascript << FX_WSTRC(L"var ");
+ javascript << L");\n";
+ javascript << L"var ";
javascript << RUNTIMEBLOCKTEMPARRAYINDEX;
- javascript << FX_WSTRC(L" = 0;\n");
- javascript << FX_WSTRC(L"while(");
+ javascript << (L" = 0;\n");
+ javascript << L"while(";
javascript << RUNTIMEBLOCKTEMPARRAYINDEX;
- javascript << FX_WSTRC(L" < ");
+ javascript << L" < ";
javascript << RUNTIMEBLOCKTEMPARRAY;
- javascript << FX_WSTRC(L".length)\n{\n");
+ javascript << L".length)\n{\n";
if (m_wsIdentifier.GetAt(0) == L'!') {
CFX_WideString tempIdentifier =
EXCLAMATION_IN_IDENTIFIER + m_wsIdentifier.Mid(1);
@@ -536,21 +536,21 @@ void CXFA_FMForeachExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
} else {
javascript << m_wsIdentifier;
}
- javascript << FX_WSTRC(L" = ");
+ javascript << L" = ";
javascript << RUNTIMEBLOCKTEMPARRAY;
- javascript << FX_WSTRC(L"[");
+ javascript << L"[";
javascript << RUNTIMEBLOCKTEMPARRAYINDEX;
- javascript << FX_WSTRC(L"++];\n");
+ javascript << L"++];\n";
m_pList->ToJavaScript(javascript);
- javascript << FX_WSTRC(L"}\n");
- javascript << FX_WSTRC(L"}\n");
+ javascript << L"}\n";
+ javascript << L"}\n";
}
void CXFA_FMForeachExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
javascript << RUNTIMEFUNCTIONRETURNVALUE;
- javascript << FX_WSTRC(L" = 0;\n");
- javascript << FX_WSTRC(L"{\n");
- javascript << FX_WSTRC(L"var ");
+ javascript << L" = 0;\n";
+ javascript << L"{\n";
+ javascript << L"var ";
if (m_wsIdentifier.GetAt(0) == L'!') {
CFX_WideString tempIdentifier =
EXCLAMATION_IN_IDENTIFIER + m_wsIdentifier.Mid(1);
@@ -558,26 +558,26 @@ void CXFA_FMForeachExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
} else {
javascript << m_wsIdentifier;
}
- javascript << FX_WSTRC(L" = null;\n");
- javascript << FX_WSTRC(L"var ");
+ javascript << L" = null;\n";
+ javascript << L"var ";
javascript << RUNTIMEBLOCKTEMPARRAY;
- javascript << FX_WSTRC(L" = ");
+ javascript << L" = ";
javascript << XFA_FM_EXPTypeToString(CONCATFMOBJECT);
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
for (const auto& expr : m_pAccessors) {
expr->ToJavaScript(javascript);
if (expr != m_pAccessors.back())
javascript << L", ";
}
- javascript << FX_WSTRC(L");\n");
- javascript << FX_WSTRC(L"var ");
+ javascript << L");\n";
+ javascript << L"var ";
javascript << RUNTIMEBLOCKTEMPARRAYINDEX;
- javascript << FX_WSTRC(L" = 0;\n");
- javascript << FX_WSTRC(L"while(");
+ javascript << L" = 0;\n";
+ javascript << L"while(";
javascript << RUNTIMEBLOCKTEMPARRAYINDEX;
- javascript << FX_WSTRC(L" < ");
+ javascript << L" < ";
javascript << RUNTIMEBLOCKTEMPARRAY;
- javascript << FX_WSTRC(L".length)\n{\n");
+ javascript << L".length)\n{\n";
if (m_wsIdentifier.GetAt(0) == L'!') {
CFX_WideString tempIdentifier =
EXCLAMATION_IN_IDENTIFIER + m_wsIdentifier.Mid(1);
@@ -585,12 +585,12 @@ void CXFA_FMForeachExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
} else {
javascript << m_wsIdentifier;
}
- javascript << FX_WSTRC(L" = ");
+ javascript << L" = ";
javascript << RUNTIMEBLOCKTEMPARRAY;
- javascript << FX_WSTRC(L"[");
+ javascript << L"[";
javascript << RUNTIMEBLOCKTEMPARRAYINDEX;
- javascript << FX_WSTRC(L"++];\n");
+ javascript << L"++];\n";
m_pList->ToImpliedReturnJS(javascript);
- javascript << FX_WSTRC(L"}\n");
- javascript << FX_WSTRC(L"}\n");
+ javascript << L"}\n";
+ javascript << L"}\n";
}
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
index b307687f9e..ba65beffc4 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
@@ -409,30 +409,30 @@ void AlternateDateTimeSymbols(CFX_WideString& wsPattern,
bool PatternStringType(const CFX_ByteStringC& szPattern,
uint32_t& patternType) {
CFX_WideString wsPattern = CFX_WideString::FromUTF8(szPattern);
- if (FX_WSTRC(L"datetime") == wsPattern.Left(8)) {
+ if (L"datetime" == wsPattern.Left(8)) {
patternType = XFA_VT_DATETIME;
return true;
}
- if (FX_WSTRC(L"date") == wsPattern.Left(4)) {
+ if (L"date" == wsPattern.Left(4)) {
patternType = wsPattern.Find(L"time") > 0 ? XFA_VT_DATETIME : XFA_VT_DATE;
return true;
}
- if (FX_WSTRC(L"time") == wsPattern.Left(4)) {
+ if (L"time" == wsPattern.Left(4)) {
patternType = XFA_VT_TIME;
return true;
}
- if (FX_WSTRC(L"text") == wsPattern.Left(4)) {
+ if (L"text" == wsPattern.Left(4)) {
patternType = XFA_VT_TEXT;
return true;
}
- if (FX_WSTRC(L"num") == wsPattern.Left(3)) {
- if (FX_WSTRC(L"integer") == wsPattern.Mid(4, 7)) {
+ if (L"num" == wsPattern.Left(3)) {
+ if (L"integer" == wsPattern.Mid(4, 7)) {
patternType = XFA_VT_INTEGER;
- } else if (FX_WSTRC(L"decimal") == wsPattern.Mid(4, 7)) {
+ } else if (L"decimal" == wsPattern.Mid(4, 7)) {
patternType = XFA_VT_DECIMAL;
- } else if (FX_WSTRC(L"currency") == wsPattern.Mid(4, 8)) {
+ } else if (L"currency" == wsPattern.Mid(4, 8)) {
patternType = XFA_VT_FLOAT;
- } else if (FX_WSTRC(L"percent") == wsPattern.Mid(4, 7)) {
+ } else if (L"percent" == wsPattern.Mid(4, 7)) {
patternType = XFA_VT_FLOAT;
} else {
patternType = XFA_VT_FLOAT;
@@ -3685,7 +3685,7 @@ void CXFA_FM2JSContext::EncodeURL(const CFX_ByteStringC& szURLString,
int32_t iIndex = ch / 16;
strEncode[1] = strCode[iIndex];
strEncode[2] = strCode[ch - iIndex * 16];
- wsResultBuf << FX_WSTRC(strEncode);
+ wsResultBuf << strEncode;
break;
}
++i;
@@ -3700,7 +3700,7 @@ void CXFA_FM2JSContext::EncodeURL(const CFX_ByteStringC& szURLString,
int32_t iIndex = ch / 16;
strEncode[1] = strCode[iIndex];
strEncode[2] = strCode[ch - iIndex * 16];
- wsResultBuf << FX_WSTRC(strEncode);
+ wsResultBuf << strEncode;
break;
}
++i;
@@ -3724,7 +3724,7 @@ void CXFA_FM2JSContext::EncodeURL(const CFX_ByteStringC& szURLString,
int32_t iIndex = ch / 16;
strEncode[1] = strCode[iIndex];
strEncode[2] = strCode[ch - iIndex * 16];
- wsResultBuf << FX_WSTRC(strEncode);
+ wsResultBuf << strEncode;
} else if (ch >= 0x20 && ch <= 0x7e) {
wsResultBuf.AppendChar(ch);
} else {
@@ -3750,12 +3750,12 @@ void CXFA_FM2JSContext::EncodeURL(const CFX_ByteStringC& szURLString,
strEncode[2] = strTmp.GetAt(iLen - 2);
iIndex = iLen - 3;
}
- wsResultBuf << FX_WSTRC(strEncode);
+ wsResultBuf << strEncode;
while (iIndex > 0) {
strEncode[1] = strTmp.GetAt(iIndex);
strEncode[2] = strTmp.GetAt(iIndex - 1);
iIndex -= 2;
- wsResultBuf << FX_WSTRC(strEncode);
+ wsResultBuf << strEncode;
}
}
}
@@ -3799,7 +3799,7 @@ void CXFA_FM2JSContext::EncodeHTML(const CFX_ByteStringC& szHTMLString,
strEncode[4] = strCode[ch - iIndex * 16];
strEncode[5] = ';';
strEncode[6] = 0;
- wsResultBuf << FX_WSTRC(strEncode);
+ wsResultBuf << strEncode;
} else {
int32_t iBigByte = ch / 256;
int32_t iLittleByte = ch % 256;
@@ -3807,7 +3807,7 @@ void CXFA_FM2JSContext::EncodeHTML(const CFX_ByteStringC& szHTMLString,
strEncode[4] = strCode[iBigByte % 16];
strEncode[5] = strCode[iLittleByte / 16];
strEncode[6] = strCode[iLittleByte % 16];
- wsResultBuf << FX_WSTRC(strEncode);
+ wsResultBuf << strEncode;
}
++i;
}
@@ -3870,7 +3870,7 @@ void CXFA_FM2JSContext::EncodeXML(const CFX_ByteStringC& szXMLString,
strEncode[4] = strCode[ch - iIndex * 16];
strEncode[5] = ';';
strEncode[6] = 0;
- wsResultBuf << FX_WSTRC(strEncode);
+ wsResultBuf << strEncode;
} else {
int32_t iBigByte = ch / 256;
int32_t iLittleByte = ch % 256;
@@ -3878,7 +3878,7 @@ void CXFA_FM2JSContext::EncodeXML(const CFX_ByteStringC& szXMLString,
strEncode[4] = strCode[iBigByte % 16];
strEncode[5] = strCode[iLittleByte / 16];
strEncode[6] = strCode[iLittleByte % 16];
- wsResultBuf << FX_WSTRC(strEncode);
+ wsResultBuf << strEncode;
}
break;
}
@@ -6149,7 +6149,7 @@ int32_t CXFA_FM2JSContext::ResolveObjects(CFXJSE_Value* pThis,
if (CXFA_Node* pXFANode = pNode->AsNode())
pXFANode->GetAttribute(XFA_ATTRIBUTE_Name, wsName, false);
if (wsName.IsEmpty())
- wsName = FX_WSTRC(L"#") + pNode->GetClassName();
+ wsName = L"#" + pNode->GetClassName();
wsSomExpression = wsName + wsSomExpression;
dFlags = XFA_RESOLVENODE_Siblings;
diff --git a/xfa/fxfa/fm2js/xfa_fmparse.cpp b/xfa/fxfa/fm2js/xfa_fmparse.cpp
index 2dfdfdb4d2..52161e8c0a 100644
--- a/xfa/fxfa/fm2js/xfa_fmparse.cpp
+++ b/xfa/fxfa/fm2js/xfa_fmparse.cpp
@@ -847,7 +847,7 @@ std::unique_ptr<CXFA_FMExpression> CXFA_FMParse::ParseIfExpression() {
m_lexer->SetCurrentLine(line);
m_pToken = new CXFA_FMToken(line);
m_pToken->m_type = TOKidentifier;
- m_pToken->m_wstring = FX_WSTRC(L"if");
+ m_pToken->m_wstring = L"if";
m_lexer->SetToken(m_pToken);
m_lexer->RestorePos(pStartPos);
return ParseExpExpression();
diff --git a/xfa/fxfa/fm2js/xfa_simpleexpression.cpp b/xfa/fxfa/fm2js/xfa_simpleexpression.cpp
index 342fe9f06c..686ddaa17d 100644
--- a/xfa/fxfa/fm2js/xfa_simpleexpression.cpp
+++ b/xfa/fxfa/fm2js/xfa_simpleexpression.cpp
@@ -132,7 +132,7 @@ CXFA_FMNullExpression::CXFA_FMNullExpression(uint32_t line)
: CXFA_FMSimpleExpression(line, TOKnull) {}
void CXFA_FMNullExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
- javascript << FX_WSTRC(L"null");
+ javascript << L"null";
}
CXFA_FMNumberExpression::CXFA_FMNumberExpression(uint32_t line,
@@ -161,12 +161,12 @@ void CXFA_FMStringExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
switch (oneChar) {
case L'\"': {
i++;
- javascript << FX_WSTRC(L"\\\"");
+ javascript << L"\\\"";
} break;
case 0x0d:
break;
case 0x0a: {
- javascript << FX_WSTRC(L"\\n");
+ javascript << L"\\n";
} break;
default: { javascript.AppendChar(oneChar); } break;
}
@@ -187,22 +187,22 @@ CXFA_FMIdentifierExpression::~CXFA_FMIdentifierExpression() {}
void CXFA_FMIdentifierExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
CFX_WideString tempStr(m_wsIdentifier);
- if (tempStr == FX_WSTRC(L"$")) {
- tempStr = FX_WSTRC(L"this");
- } else if (tempStr == FX_WSTRC(L"!")) {
- tempStr = FX_WSTRC(L"xfa.datasets");
- } else if (tempStr == FX_WSTRC(L"$data")) {
- tempStr = FX_WSTRC(L"xfa.datasets.data");
- } else if (tempStr == FX_WSTRC(L"$event")) {
- tempStr = FX_WSTRC(L"xfa.event");
- } else if (tempStr == FX_WSTRC(L"$form")) {
- tempStr = FX_WSTRC(L"xfa.form");
- } else if (tempStr == FX_WSTRC(L"$host")) {
- tempStr = FX_WSTRC(L"xfa.host");
- } else if (tempStr == FX_WSTRC(L"$layout")) {
- tempStr = FX_WSTRC(L"xfa.layout");
- } else if (tempStr == FX_WSTRC(L"$template")) {
- tempStr = FX_WSTRC(L"xfa.template");
+ if (tempStr == L"$") {
+ tempStr = L"this";
+ } else if (tempStr == L"!") {
+ tempStr = L"xfa.datasets";
+ } else if (tempStr == L"$data") {
+ tempStr = L"xfa.datasets.data";
+ } else if (tempStr == L"$event") {
+ tempStr = L"xfa.event";
+ } else if (tempStr == L"$form") {
+ tempStr = L"xfa.form";
+ } else if (tempStr == L"$host") {
+ tempStr = L"xfa.host";
+ } else if (tempStr == L"$layout") {
+ tempStr = L"xfa.layout";
+ } else if (tempStr == L"$template") {
+ tempStr = L"xfa.template";
} else if (tempStr[0] == L'!') {
tempStr = EXCLAMATION_IN_IDENTIFIER + tempStr.Mid(1);
}
@@ -240,62 +240,62 @@ CXFA_FMAssignExpression::CXFA_FMAssignExpression(
: CXFA_FMBinExpression(line, op, std::move(pExp1), std::move(pExp2)) {}
void CXFA_FMAssignExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
- javascript << FX_WSTRC(L"if (");
+ javascript << L"if (";
javascript << gs_lpStrExpFuncName[ISFMOBJECT];
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pExp1->ToJavaScript(javascript);
- javascript << FX_WSTRC(L"))\n{\n");
+ javascript << L"))\n{\n";
javascript << gs_lpStrExpFuncName[ASSIGN];
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pExp1->ToJavaScript(javascript);
- javascript << FX_WSTRC(L", ");
+ javascript << L", ";
m_pExp2->ToJavaScript(javascript);
- javascript << FX_WSTRC(L");\n}\n");
+ javascript << L");\n}\n";
CFX_WideTextBuf tempExp1;
m_pExp1->ToJavaScript(tempExp1);
if (m_pExp1->GetOperatorToken() == TOKidentifier &&
- tempExp1.AsStringC() != FX_WSTRC(L"this")) {
- javascript << FX_WSTRC(L"else\n{\n");
+ tempExp1.AsStringC() != L"this") {
+ javascript << L"else\n{\n";
javascript << tempExp1;
- javascript << FX_WSTRC(L" = ");
+ javascript << L" = ";
javascript << gs_lpStrExpFuncName[ASSIGN];
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pExp1->ToJavaScript(javascript);
- javascript << FX_WSTRC(L", ");
+ javascript << L", ";
m_pExp2->ToJavaScript(javascript);
- javascript << FX_WSTRC(L");\n}\n");
+ javascript << L");\n}\n";
}
}
void CXFA_FMAssignExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
- javascript << FX_WSTRC(L"if (");
+ javascript << L"if (";
javascript << gs_lpStrExpFuncName[ISFMOBJECT];
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pExp1->ToJavaScript(javascript);
- javascript << FX_WSTRC(L"))\n{\n");
+ javascript << L"))\n{\n";
javascript << RUNTIMEFUNCTIONRETURNVALUE;
- javascript << FX_WSTRC(L" = ");
+ javascript << L" = ";
javascript << gs_lpStrExpFuncName[ASSIGN];
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pExp1->ToJavaScript(javascript);
- javascript << FX_WSTRC(L", ");
+ javascript << L", ";
m_pExp2->ToJavaScript(javascript);
- javascript << FX_WSTRC(L");\n}\n");
+ javascript << L");\n}\n";
CFX_WideTextBuf tempExp1;
m_pExp1->ToJavaScript(tempExp1);
if (m_pExp1->GetOperatorToken() == TOKidentifier &&
- tempExp1.AsStringC() != FX_WSTRC(L"this")) {
- javascript << FX_WSTRC(L"else\n{\n");
+ tempExp1.AsStringC() != L"this") {
+ javascript << L"else\n{\n";
javascript << RUNTIMEFUNCTIONRETURNVALUE;
- javascript << FX_WSTRC(L" = ");
+ javascript << L" = ";
javascript << tempExp1;
- javascript << FX_WSTRC(L" = ");
+ javascript << L" = ";
javascript << gs_lpStrExpFuncName[ASSIGN];
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pExp1->ToJavaScript(javascript);
- javascript << FX_WSTRC(L", ");
+ javascript << L", ";
m_pExp2->ToJavaScript(javascript);
- javascript << FX_WSTRC(L");\n}\n");
+ javascript << L");\n}\n";
}
}
@@ -308,11 +308,11 @@ CXFA_FMLogicalOrExpression::CXFA_FMLogicalOrExpression(
void CXFA_FMLogicalOrExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << gs_lpStrExpFuncName[LOGICALOR];
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pExp1->ToJavaScript(javascript);
- javascript << FX_WSTRC(L", ");
+ javascript << L", ";
m_pExp2->ToJavaScript(javascript);
- javascript << FX_WSTRC(L")");
+ javascript << L")";
}
CXFA_FMLogicalAndExpression::CXFA_FMLogicalAndExpression(
@@ -324,11 +324,11 @@ CXFA_FMLogicalAndExpression::CXFA_FMLogicalAndExpression(
void CXFA_FMLogicalAndExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << gs_lpStrExpFuncName[LOGICALAND];
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pExp1->ToJavaScript(javascript);
- javascript << FX_WSTRC(L", ");
+ javascript << L", ";
m_pExp2->ToJavaScript(javascript);
- javascript << FX_WSTRC(L")");
+ javascript << L")";
}
CXFA_FMEqualityExpression::CXFA_FMEqualityExpression(
@@ -352,11 +352,11 @@ void CXFA_FMEqualityExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
ASSERT(false);
break;
}
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pExp1->ToJavaScript(javascript);
- javascript << FX_WSTRC(L", ");
+ javascript << L", ";
m_pExp2->ToJavaScript(javascript);
- javascript << FX_WSTRC(L")");
+ javascript << L")";
}
CXFA_FMRelationalExpression::CXFA_FMRelationalExpression(
@@ -388,11 +388,11 @@ void CXFA_FMRelationalExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
ASSERT(false);
break;
}
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pExp1->ToJavaScript(javascript);
- javascript << FX_WSTRC(L", ");
+ javascript << L", ";
m_pExp2->ToJavaScript(javascript);
- javascript << FX_WSTRC(L")");
+ javascript << L")";
}
CXFA_FMAdditiveExpression::CXFA_FMAdditiveExpression(
@@ -414,11 +414,11 @@ void CXFA_FMAdditiveExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
ASSERT(false);
break;
}
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pExp1->ToJavaScript(javascript);
- javascript << FX_WSTRC(L", ");
+ javascript << L", ";
m_pExp2->ToJavaScript(javascript);
- javascript << FX_WSTRC(L")");
+ javascript << L")";
}
CXFA_FMMultiplicativeExpression::CXFA_FMMultiplicativeExpression(
@@ -441,11 +441,11 @@ void CXFA_FMMultiplicativeExpression::ToJavaScript(
ASSERT(false);
break;
}
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pExp1->ToJavaScript(javascript);
- javascript << FX_WSTRC(L", ");
+ javascript << L", ";
m_pExp2->ToJavaScript(javascript);
- javascript << FX_WSTRC(L")");
+ javascript << L")";
}
CXFA_FMPosExpression::CXFA_FMPosExpression(
@@ -455,9 +455,9 @@ CXFA_FMPosExpression::CXFA_FMPosExpression(
void CXFA_FMPosExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << gs_lpStrExpFuncName[POSITIVE];
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pExp->ToJavaScript(javascript);
- javascript << FX_WSTRC(L")");
+ javascript << L")";
}
CXFA_FMNegExpression::CXFA_FMNegExpression(
@@ -467,9 +467,9 @@ CXFA_FMNegExpression::CXFA_FMNegExpression(
void CXFA_FMNegExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << gs_lpStrExpFuncName[NEGATIVE];
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pExp->ToJavaScript(javascript);
- javascript << FX_WSTRC(L")");
+ javascript << L")";
}
CXFA_FMNotExpression::CXFA_FMNotExpression(
@@ -479,9 +479,9 @@ CXFA_FMNotExpression::CXFA_FMNotExpression(
void CXFA_FMNotExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << gs_lpStrExpFuncName[NOT];
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pExp->ToJavaScript(javascript);
- javascript << FX_WSTRC(L")");
+ javascript << L")";
}
CXFA_FMCallExpression::CXFA_FMCallExpression(
@@ -574,12 +574,12 @@ void CXFA_FMCallExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
bool isEvalFunc = false;
bool isExistsFunc = false;
if (IsBuildInFunc(&funcName)) {
- if (funcName.AsStringC() == FX_WSTRC(L"Eval")) {
+ if (funcName.AsStringC() == L"Eval") {
isEvalFunc = true;
- javascript << FX_WSTRC(L"eval.call(this, ");
+ javascript << L"eval.call(this, ";
javascript << gs_lpStrExpFuncName[CALL];
- javascript << FX_WSTRC(L"Translate");
- } else if (funcName.AsStringC() == FX_WSTRC(L"Exists")) {
+ javascript << L"Translate";
+ } else if (funcName.AsStringC() == L"Exists") {
isExistsFunc = true;
javascript << gs_lpStrExpFuncName[CALL];
javascript << funcName;
@@ -590,19 +590,19 @@ void CXFA_FMCallExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
} else {
javascript << funcName;
}
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
if (isExistsFunc) {
- javascript << FX_WSTRC(L"\n(\nfunction ()\n{\ntry\n{\n");
+ javascript << L"\n(\nfunction ()\n{\ntry\n{\n";
if (!m_Arguments.empty()) {
const auto& expr = m_Arguments[0];
- javascript << FX_WSTRC(L"return ");
+ javascript << L"return ";
expr->ToJavaScript(javascript);
- javascript << FX_WSTRC(L";\n}\n");
+ javascript << L";\n}\n";
} else {
- javascript << FX_WSTRC(L"return 0;\n}\n");
+ javascript << L"return 0;\n}\n";
}
- javascript << FX_WSTRC(
- L"catch(accessExceptions)\n{\nreturn 0;\n}\n}\n).call(this)\n");
+ javascript
+ << L"catch(accessExceptions)\n{\nreturn 0;\n}\n}\n).call(this)\n";
} else {
for (const auto& expr : m_Arguments) {
expr->ToJavaScript(javascript);
@@ -633,33 +633,33 @@ CXFA_FMDotAccessorExpression::~CXFA_FMDotAccessorExpression() {}
void CXFA_FMDotAccessorExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << gs_lpStrExpFuncName[DOT];
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
if (m_pExp1) {
m_pExp1->ToJavaScript(javascript);
} else {
- javascript << FX_WSTRC(L"null");
+ javascript << L"null";
}
- javascript << FX_WSTRC(L", ");
- javascript << FX_WSTRC(L"\"");
+ javascript << L", ";
+ javascript << L"\"";
if (m_pExp1 && m_pExp1->GetOperatorToken() == TOKidentifier) {
m_pExp1->ToJavaScript(javascript);
}
- javascript << FX_WSTRC(L"\", ");
+ javascript << L"\", ";
if (m_op == TOKdotscream) {
- javascript << FX_WSTRC(L"\"#");
+ javascript << L"\"#";
javascript << m_wsIdentifier;
- javascript << FX_WSTRC(L"\", ");
+ javascript << L"\", ";
} else if (m_op == TOKdotstar) {
- javascript << FX_WSTRC(L"\"*\", ");
+ javascript << L"\"*\", ";
} else if (m_op == TOKcall) {
- javascript << FX_WSTRC(L"\"\", ");
+ javascript << L"\"\", ";
} else {
- javascript << FX_WSTRC(L"\"");
+ javascript << L"\"";
javascript << m_wsIdentifier;
- javascript << FX_WSTRC(L"\", ");
+ javascript << L"\", ";
}
m_pExp2->ToJavaScript(javascript);
- javascript << FX_WSTRC(L")");
+ javascript << L")";
}
CXFA_FMIndexExpression::CXFA_FMIndexExpression(
@@ -674,26 +674,26 @@ CXFA_FMIndexExpression::CXFA_FMIndexExpression(
void CXFA_FMIndexExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
switch (m_accessorIndex) {
case ACCESSOR_NO_INDEX:
- javascript << FX_WSTRC(L"0");
+ javascript << L"0";
break;
case ACCESSOR_NO_RELATIVEINDEX:
- javascript << FX_WSTRC(L"1");
+ javascript << L"1";
break;
case ACCESSOR_POSITIVE_INDEX:
- javascript << FX_WSTRC(L"2");
+ javascript << L"2";
break;
case ACCESSOR_NEGATIVE_INDEX:
- javascript << FX_WSTRC(L"3");
+ javascript << L"3";
break;
default:
- javascript << FX_WSTRC(L"0");
+ javascript << L"0";
}
if (!m_bIsStarIndex) {
- javascript << FX_WSTRC(L", ");
+ javascript << L", ";
if (m_pExp) {
m_pExp->ToJavaScript(javascript);
} else {
- javascript << FX_WSTRC(L"0");
+ javascript << L"0";
}
}
}
@@ -715,19 +715,19 @@ CXFA_FMDotDotAccessorExpression::~CXFA_FMDotDotAccessorExpression() {}
void CXFA_FMDotDotAccessorExpression::ToJavaScript(
CFX_WideTextBuf& javascript) {
javascript << gs_lpStrExpFuncName[DOTDOT];
- javascript << FX_WSTRC(L"(");
+ javascript << L"(";
m_pExp1->ToJavaScript(javascript);
- javascript << FX_WSTRC(L", ");
- javascript << FX_WSTRC(L"\"");
+ javascript << L", ";
+ javascript << L"\"";
if (m_pExp1 && m_pExp1->GetOperatorToken() == TOKidentifier) {
m_pExp1->ToJavaScript(javascript);
}
- javascript << FX_WSTRC(L"\", ");
- javascript << FX_WSTRC(L"\"");
+ javascript << L"\", ";
+ javascript << L"\"";
javascript << m_wsIdentifier;
- javascript << FX_WSTRC(L"\", ");
+ javascript << L"\", ";
m_pExp2->ToJavaScript(javascript);
- javascript << FX_WSTRC(L")");
+ javascript << L")";
}
CXFA_FMMethodCallExpression::CXFA_FMMethodCallExpression(
@@ -740,22 +740,22 @@ CXFA_FMMethodCallExpression::CXFA_FMMethodCallExpression(
std::move(pCallExp)) {}
void CXFA_FMMethodCallExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
- javascript << FX_WSTRC(L"(\nfunction ()\n{\n");
- javascript << FX_WSTRC(L"var method_return_value = null;\n");
- javascript << FX_WSTRC(L"var accessor_object = ");
+ javascript << L"(\nfunction ()\n{\n";
+ javascript << L"var method_return_value = null;\n";
+ javascript << L"var accessor_object = ";
m_pExp1->ToJavaScript(javascript);
- javascript << FX_WSTRC(L";\n");
- javascript << FX_WSTRC(L"if (");
+ javascript << L";\n";
+ javascript << L"if (";
javascript << gs_lpStrExpFuncName[ISFMARRAY];
- javascript << FX_WSTRC(L"(accessor_object))\n{\n");
- javascript << FX_WSTRC(
- L"for(var index = accessor_object.length - 1; index > 1; index--)\n{\n");
- javascript << FX_WSTRC(L"method_return_value = accessor_object[index].");
+ javascript << L"(accessor_object))\n{\n";
+ javascript << L"for(var index = accessor_object.length - 1; index > 1; "
+ L"index--)\n{\n";
+ javascript << L"method_return_value = accessor_object[index].";
m_pExp2->ToJavaScript(javascript);
- javascript << FX_WSTRC(L";\n}\n}\n");
- javascript << FX_WSTRC(L"else\n{\nmethod_return_value = accessor_object.");
+ javascript << L";\n}\n}\n";
+ javascript << L"else\n{\nmethod_return_value = accessor_object.";
m_pExp2->ToJavaScript(javascript);
- javascript << FX_WSTRC(L";\n}\n");
- javascript << FX_WSTRC(L"return method_return_value;\n");
- javascript << FX_WSTRC(L"}\n).call(this)");
+ javascript << L";\n}\n";
+ javascript << L"return method_return_value;\n";
+ javascript << L"}\n).call(this)";
}
diff --git a/xfa/fxfa/fm2js/xfa_simpleexpression.h b/xfa/fxfa/fm2js/xfa_simpleexpression.h
index 28c37edfb1..af1d02eea5 100644
--- a/xfa/fxfa/fm2js/xfa_simpleexpression.h
+++ b/xfa/fxfa/fm2js/xfa_simpleexpression.h
@@ -14,9 +14,8 @@
#include "xfa/fxfa/fm2js/xfa_lexer.h"
#define RUNTIMEFUNCTIONRETURNVALUE \
- (FX_WSTRC(L"foxit_xfa_formcalc_runtime_func_return_value"))
-#define EXCLAMATION_IN_IDENTIFIER \
- (FX_WSTRC(L"foxit_xfa_formcalc__exclamation__"))
+ (L"foxit_xfa_formcalc_runtime_func_return_value")
+#define EXCLAMATION_IN_IDENTIFIER (L"foxit_xfa_formcalc__exclamation__")
enum XFA_FM_SimpleExpressionType {
ASSIGN,
diff --git a/xfa/fxfa/parser/cscript_hostpseudomodel.cpp b/xfa/fxfa/parser/cscript_hostpseudomodel.cpp
index 97f16f01e7..eb8177ebf6 100644
--- a/xfa/fxfa/parser/cscript_hostpseudomodel.cpp
+++ b/xfa/fxfa/parser/cscript_hostpseudomodel.cpp
@@ -519,7 +519,7 @@ bool CScript_HostPseudoModel::ValidateArgsForMsg(CFXJSE_Arguments* pArguments,
return false;
}
if (pValueArg->IsNull()) {
- wsValue = FX_WSTRC(L"");
+ wsValue = L"";
} else {
wsValue = pValueArg->ToWideString();
}
diff --git a/xfa/fxfa/parser/cscript_layoutpseudomodel.cpp b/xfa/fxfa/parser/cscript_layoutpseudomodel.cpp
index a1d1ca5785..7c0b93a671 100644
--- a/xfa/fxfa/parser/cscript_layoutpseudomodel.cpp
+++ b/xfa/fxfa/parser/cscript_layoutpseudomodel.cpp
@@ -217,13 +217,13 @@ void CScript_LayoutPseudoModel::GetObjArray(CXFA_LayoutProcessor* pDocLayout,
if (!pLayoutPage) {
return;
}
- if (wsType == FX_WSTRC(L"pageArea")) {
+ if (wsType == L"pageArea") {
if (CXFA_Node* pMasterPage = pLayoutPage->m_pFormNode) {
retArray.Add(pMasterPage);
}
return;
}
- if (wsType == FX_WSTRC(L"contentArea")) {
+ if (wsType == L"contentArea") {
for (CXFA_LayoutItem* pItem = pLayoutPage->m_pFirstChild; pItem;
pItem = pItem->m_pNextSibling) {
if (pItem->m_pFormNode->GetElementType() == XFA_Element::ContentArea) {
@@ -288,13 +288,13 @@ void CScript_LayoutPseudoModel::GetObjArray(CXFA_LayoutProcessor* pDocLayout,
return;
}
XFA_Element eType = XFA_Element::Unknown;
- if (wsType == FX_WSTRC(L"field")) {
+ if (wsType == L"field") {
eType = XFA_Element::Field;
- } else if (wsType == FX_WSTRC(L"draw")) {
+ } else if (wsType == L"draw") {
eType = XFA_Element::Draw;
- } else if (wsType == FX_WSTRC(L"subform")) {
+ } else if (wsType == L"subform") {
eType = XFA_Element::Subform;
- } else if (wsType == FX_WSTRC(L"area")) {
+ } else if (wsType == L"area") {
eType = XFA_Element::Area;
}
if (eType != XFA_Element::Unknown) {
diff --git a/xfa/fxfa/parser/cxfa_dataexporter.cpp b/xfa/fxfa/parser/cxfa_dataexporter.cpp
index 72d1fa76ba..fe9947527d 100644
--- a/xfa/fxfa/parser/cxfa_dataexporter.cpp
+++ b/xfa/fxfa/parser/cxfa_dataexporter.cpp
@@ -24,19 +24,19 @@ CFX_WideString ExportEncodeAttribute(const CFX_WideString& str) {
for (int32_t i = 0; i < iLen; i++) {
switch (str[i]) {
case '&':
- textBuf << FX_WSTRC(L"&amp;");
+ textBuf << L"&amp;";
break;
case '<':
- textBuf << FX_WSTRC(L"&lt;");
+ textBuf << L"&lt;";
break;
case '>':
- textBuf << FX_WSTRC(L"&gt;");
+ textBuf << L"&gt;";
break;
case '\'':
- textBuf << FX_WSTRC(L"&apos;");
+ textBuf << L"&apos;";
break;
case '\"':
- textBuf << FX_WSTRC(L"&quot;");
+ textBuf << L"&quot;";
break;
default:
textBuf.AppendChar(str[i]);
@@ -54,20 +54,20 @@ CFX_WideString ExportEncodeContent(const CFX_WideStringC& str) {
continue;
if (ch == '&') {
- textBuf << FX_WSTRC(L"&amp;");
+ textBuf << L"&amp;";
} else if (ch == '<') {
- textBuf << FX_WSTRC(L"&lt;");
+ textBuf << L"&lt;";
} else if (ch == '>') {
- textBuf << FX_WSTRC(L"&gt;");
+ textBuf << L"&gt;";
} else if (ch == '\'') {
- textBuf << FX_WSTRC(L"&apos;");
+ textBuf << L"&apos;";
} else if (ch == '\"') {
- textBuf << FX_WSTRC(L"&quot;");
+ textBuf << L"&quot;";
} else if (ch == ' ') {
if (i && str.GetAt(i - 1) != ' ') {
textBuf.AppendChar(' ');
} else {
- textBuf << FX_WSTRC(L"&#x20;");
+ textBuf << L"&#x20;";
}
} else {
textBuf.AppendChar(str.GetAt(i));
@@ -87,11 +87,11 @@ void SaveAttribute(CXFA_Node* pNode,
return;
}
wsValue = ExportEncodeAttribute(wsValue);
- wsOutput += FX_WSTRC(L" ");
+ wsOutput += L" ";
wsOutput += wsName;
- wsOutput += FX_WSTRC(L"=\"");
+ wsOutput += L"=\"";
wsOutput += wsValue;
- wsOutput += FX_WSTRC(L"\"");
+ wsOutput += L"\"";
}
bool AttributeSaveInDataModel(CXFA_Node* pNode, XFA_ATTRIBUTE eAttribute) {
@@ -190,7 +190,7 @@ void RegenerateFormFile_Changed(CXFA_Node* pNode,
CFX_WideString wsContentType;
pNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, false);
if (pRawValueNode->GetElementType() == XFA_Element::SharpxHTML &&
- wsContentType == FX_WSTRC(L"text/html")) {
+ wsContentType == L"text/html") {
CFDE_XMLNode* pExDataXML = pNode->GetXMLMappingNode();
if (!pExDataXML)
break;
@@ -214,7 +214,7 @@ void RegenerateFormFile_Changed(CXFA_Node* pNode,
wsChildren += CFX_WideString::FromUTF8(
CFX_ByteStringC(pMemStream->GetBuffer(), pMemStream->GetSize()));
} else if (pRawValueNode->GetElementType() == XFA_Element::Sharpxml &&
- wsContentType == FX_WSTRC(L"text/xml")) {
+ wsContentType == L"text/xml") {
CFX_WideString wsRawValue;
pRawValueNode->GetAttribute(XFA_ATTRIBUTE_Value, wsRawValue, false);
if (wsRawValue.IsEmpty())
@@ -240,20 +240,20 @@ void RegenerateFormFile_Changed(CXFA_Node* pNode,
CFX_WideString bodyTagName;
bodyTagName = pGrandparentNode->GetCData(XFA_ATTRIBUTE_Name);
if (bodyTagName.IsEmpty())
- bodyTagName = FX_WSTRC(L"ListBox1");
+ bodyTagName = L"ListBox1";
- buf << FX_WSTRC(L"<");
+ buf << L"<";
buf << bodyTagName;
- buf << FX_WSTRC(L" xmlns=\"\"\n>");
+ buf << L" xmlns=\"\"\n>";
for (int32_t i = 0; i < pdfium::CollectionSize<int32_t>(wsSelTextArray);
i++) {
- buf << FX_WSTRC(L"<value\n>");
+ buf << L"<value\n>";
buf << ExportEncodeContent(wsSelTextArray[i].AsStringC());
- buf << FX_WSTRC(L"</value\n>");
+ buf << L"</value\n>";
}
- buf << FX_WSTRC(L"</");
+ buf << L"</";
buf << bodyTagName;
- buf << FX_WSTRC(L"\n>");
+ buf << L"\n>";
wsChildren += buf.AsStringC();
buf.Clear();
} else {
@@ -305,19 +305,19 @@ void RegenerateFormFile_Changed(CXFA_Node* pNode,
pNode->HasAttribute(XFA_ATTRIBUTE_Name)) {
CFX_WideStringC wsElement = pNode->GetClassName();
CFX_WideString wsName;
- SaveAttribute(pNode, XFA_ATTRIBUTE_Name, FX_WSTRC(L"name"), true, wsName);
- buf << FX_WSTRC(L"<");
+ SaveAttribute(pNode, XFA_ATTRIBUTE_Name, L"name", true, wsName);
+ buf << L"<";
buf << wsElement;
buf << wsName;
buf << wsAttrs;
if (wsChildren.IsEmpty()) {
- buf << FX_WSTRC(L"\n/>");
+ buf << L"\n/>";
} else {
- buf << FX_WSTRC(L"\n>");
+ buf << L"\n>";
buf << wsChildren;
- buf << FX_WSTRC(L"</");
+ buf << L"</";
buf << wsElement;
- buf << FX_WSTRC(L"\n>");
+ buf << L"\n>";
}
}
}
@@ -340,7 +340,7 @@ void RegenerateFormFile_Container(CXFA_Node* pNode,
pStream->WriteString(L"<", 1);
pStream->WriteString(wsElement.c_str(), wsElement.GetLength());
CFX_WideString wsOutput;
- SaveAttribute(pNode, XFA_ATTRIBUTE_Name, FX_WSTRC(L"name"), true, wsOutput);
+ SaveAttribute(pNode, XFA_ATTRIBUTE_Name, L"name", true, wsOutput);
CFX_WideString wsAttrs;
int32_t iAttrs = 0;
const uint8_t* pAttrs =
@@ -399,10 +399,10 @@ void XFA_DataExporter_RegenerateFormFile(
RecognizeXFAVersionNumber(
ToNode(pNode->GetDocument()->GetXFAObject(XFA_HASHCODE_Template)),
wsVersionNumber);
- if (wsVersionNumber.IsEmpty()) {
- wsVersionNumber = FX_WSTRC(L"2.8");
- }
- wsVersionNumber += FX_WSTRC(L"/\"\n>");
+ if (wsVersionNumber.IsEmpty())
+ wsVersionNumber = L"2.8";
+
+ wsVersionNumber += L"/\"\n>";
pStream->WriteString(wsVersionNumber.c_str(), wsVersionNumber.GetLength());
CXFA_Node* pChildNode = pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
while (pChildNode) {
diff --git a/xfa/fxfa/parser/cxfa_document.cpp b/xfa/fxfa/parser/cxfa_document.cpp
index 374fb98c52..8ff3c2b06a 100644
--- a/xfa/fxfa/parser/cxfa_document.cpp
+++ b/xfa/fxfa/parser/cxfa_document.cpp
@@ -272,8 +272,7 @@ bool CXFA_Document::IsInteractive() {
CXFA_Node* pFormFiller = pPDF->GetChild(0, XFA_Element::Interactive);
if (pFormFiller) {
m_dwDocFlags |= XFA_DOCFLAG_HasInteractive;
- if (pFormFiller->TryContent(wsInteractive) &&
- wsInteractive == FX_WSTRC(L"1")) {
+ if (pFormFiller->TryContent(wsInteractive) && wsInteractive == L"1") {
m_dwDocFlags |= XFA_DOCFLAG_Interactive;
return true;
}
@@ -381,8 +380,7 @@ void CXFA_Document::DoProtoMerge() {
wsURI = CFX_WideStringC(wsUseVal.c_str(), uSharpPos);
FX_STRSIZE uLen = wsUseVal.GetLength();
if (uLen >= uSharpPos + 5 &&
- CFX_WideStringC(wsUseVal.c_str() + uSharpPos, 5) ==
- FX_WSTRC(L"#som(") &&
+ CFX_WideStringC(wsUseVal.c_str() + uSharpPos, 5) == L"#som(" &&
wsUseVal[uLen - 1] == ')') {
wsSOM = CFX_WideStringC(wsUseVal.c_str() + uSharpPos + 5,
uLen - 1 - uSharpPos - 5);
@@ -399,7 +397,7 @@ void CXFA_Document::DoProtoMerge() {
wsSOM = CFX_WideStringC(wsUseVal.c_str(), wsUseVal.GetLength());
}
- if (!wsURI.IsEmpty() && wsURI != FX_WSTRC(L"."))
+ if (!wsURI.IsEmpty() && wsURI != L".")
continue;
CXFA_Node* pProtoNode = nullptr;
diff --git a/xfa/fxfa/parser/cxfa_image.cpp b/xfa/fxfa/parser/cxfa_image.cpp
index 8061018470..8cf7fc1e23 100644
--- a/xfa/fxfa/parser/cxfa_image.cpp
+++ b/xfa/fxfa/parser/cxfa_image.cpp
@@ -22,7 +22,7 @@ bool CXFA_Image::GetContentType(CFX_WideString& wsContentType) {
bool CXFA_Image::GetHref(CFX_WideString& wsHref) {
if (m_bDefValue)
return m_pNode->TryCData(XFA_ATTRIBUTE_Href, wsHref);
- return m_pNode->GetAttribute(FX_WSTRC(L"href"), wsHref);
+ return m_pNode->GetAttribute(L"href", wsHref);
}
int32_t CXFA_Image::GetTransferEncoding() {
diff --git a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
index 0a057f543f..080b06b953 100644
--- a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
+++ b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
@@ -63,9 +63,9 @@ uint32_t GetRelevant(CXFA_Node* pFormItem, uint32_t dwParentRelvant) {
uint32_t dwRelevant = XFA_WidgetStatus_Viewable | XFA_WidgetStatus_Printable;
CFX_WideStringC wsRelevant;
if (pFormItem->TryCData(XFA_ATTRIBUTE_Relevant, wsRelevant)) {
- if (wsRelevant == FX_WSTRC(L"+print") || wsRelevant == FX_WSTRC(L"print"))
+ if (wsRelevant == L"+print" || wsRelevant == L"print")
dwRelevant &= ~XFA_WidgetStatus_Viewable;
- else if (wsRelevant == FX_WSTRC(L"-print"))
+ else if (wsRelevant == L"-print")
dwRelevant &= ~XFA_WidgetStatus_Printable;
}
@@ -163,8 +163,7 @@ CXFA_Node* ResolveBreakTarget(CXFA_Node* pPageSetRoot,
return pNode;
} else if (bNewExprStyle) {
CFX_WideString wsProcessedTarget = wsExpr;
- if (wsExpr.Left(4) == FX_WSTRC(L"som(") &&
- wsExpr.Right(1) == FX_WSTRC(L")")) {
+ if (wsExpr.Left(4) == L"som(" && wsExpr.Right(1) == L")") {
wsProcessedTarget = wsExpr.Mid(4, wsExpr.GetLength() - 5);
}
XFA_RESOLVENODE_RS rs;
diff --git a/xfa/fxfa/parser/cxfa_measurement.cpp b/xfa/fxfa/parser/cxfa_measurement.cpp
index b1843a8b49..ebf7b7bff7 100644
--- a/xfa/fxfa/parser/cxfa_measurement.cpp
+++ b/xfa/fxfa/parser/cxfa_measurement.cpp
@@ -119,21 +119,21 @@ bool CXFA_Measurement::ToUnit(XFA_UNIT eUnit, FX_FLOAT& fValue) const {
}
XFA_UNIT CXFA_Measurement::GetUnit(const CFX_WideStringC& wsUnit) {
- if (wsUnit == FX_WSTRC(L"mm"))
+ if (wsUnit == L"mm")
return XFA_UNIT_Mm;
- if (wsUnit == FX_WSTRC(L"pt"))
+ if (wsUnit == L"pt")
return XFA_UNIT_Pt;
- if (wsUnit == FX_WSTRC(L"in"))
+ if (wsUnit == L"in")
return XFA_UNIT_In;
- if (wsUnit == FX_WSTRC(L"cm"))
+ if (wsUnit == L"cm")
return XFA_UNIT_Cm;
- if (wsUnit == FX_WSTRC(L"pc"))
+ if (wsUnit == L"pc")
return XFA_UNIT_Pc;
- if (wsUnit == FX_WSTRC(L"mp"))
+ if (wsUnit == L"mp")
return XFA_UNIT_Mp;
- if (wsUnit == FX_WSTRC(L"em"))
+ if (wsUnit == L"em")
return XFA_UNIT_Em;
- if (wsUnit == FX_WSTRC(L"%"))
+ if (wsUnit == L"%")
return XFA_UNIT_Percent;
return XFA_UNIT_Unknown;
}
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index 5411443e6a..0fc114be10 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -1097,7 +1097,7 @@ void CXFA_Node::Script_TreeClass_All(CFXJSE_Value* pValue,
uint32_t dwFlag = XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_ALL;
CFX_WideString wsName;
GetAttribute(XFA_ATTRIBUTE_Name, wsName);
- CFX_WideString wsExpression = wsName + FX_WSTRC(L"[*]");
+ CFX_WideString wsExpression = wsName + L"[*]";
Script_Som_ResolveNodeList(pValue, wsExpression, dwFlag);
}
@@ -1126,8 +1126,7 @@ void CXFA_Node::Script_TreeClass_ClassAll(CFXJSE_Value* pValue,
}
uint32_t dwFlag = XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_ALL;
- CFX_WideString wsExpression =
- FX_WSTRC(L"#") + GetClassName() + FX_WSTRC(L"[*]");
+ CFX_WideString wsExpression = L"#" + GetClassName() + L"[*]";
Script_Som_ResolveNodeList(pValue, wsExpression, dwFlag);
}
@@ -2080,7 +2079,7 @@ void CXFA_Node::Script_Boolean_Value(CFXJSE_Value* pValue,
SetScriptContent(wsNewValue, wsFormatValue, true, true);
} else {
CFX_WideString wsValue = GetScriptContent(true);
- pValue->SetBoolean(wsValue == FX_WSTRC(L"1"));
+ pValue->SetBoolean(wsValue == L"1");
}
}
@@ -3616,7 +3615,7 @@ void CXFA_Node::Script_Script_Stateless(CFXJSE_Value* pValue,
ThrowInvalidPropertyException();
return;
}
- pValue->SetString(FX_UTF8Encode(FX_WSTRC(L"0")).AsStringC());
+ pValue->SetString(FX_UTF8Encode(CFX_WideStringC(L"0", 1)).AsStringC());
}
void CXFA_Node::Script_Encrypt_Format(CFXJSE_Value* pValue,
@@ -3652,7 +3651,7 @@ bool CXFA_Node::SetAttribute(XFA_ATTRIBUTE eAttr,
case XFA_ATTRIBUTETYPE_Cdata:
return SetCData(pAttr->eName, CFX_WideString(wsValue), bNotify);
case XFA_ATTRIBUTETYPE_Boolean:
- return SetBoolean(pAttr->eName, wsValue != FX_WSTRC(L"0"), bNotify);
+ return SetBoolean(pAttr->eName, wsValue != L"0", bNotify);
case XFA_ATTRIBUTETYPE_Integer:
return SetInteger(pAttr->eName,
FXSYS_round(FXSYS_wcstof(wsValue.c_str(),
@@ -3701,7 +3700,7 @@ bool CXFA_Node::GetAttribute(XFA_ATTRIBUTE eAttr,
if (!TryBoolean(pAttr->eName, bValue, bUseDefault)) {
return false;
}
- wsValue = bValue ? FX_WSTRC(L"1") : FX_WSTRC(L"0");
+ wsValue = bValue ? L"1" : L"0";
return true;
} break;
case XFA_ATTRIBUTETYPE_Integer: {
@@ -3892,7 +3891,7 @@ bool CXFA_Node::SetCData(XFA_ATTRIBUTE eAttr,
ASSERT(m_pXMLNode->GetType() == FDE_XMLNODE_Element);
CFX_WideString wsAttrName = pInfo->pName;
if (pInfo->eName == XFA_ATTRIBUTE_ContentType) {
- wsAttrName = FX_WSTRC(L"xfa:") + wsAttrName;
+ wsAttrName = L"xfa:" + wsAttrName;
}
static_cast<CFDE_XMLElement*>(m_pXMLNode)->SetString(wsAttrName, wsValue);
}
@@ -4198,16 +4197,16 @@ bool CXFA_Node::SetScriptContent(const CFX_WideString& wsContent,
CFX_WideString wsContentType;
if (GetElementType() == XFA_Element::ExData) {
GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, false);
- if (wsContentType == FX_WSTRC(L"text/html")) {
- wsContentType = FX_WSTRC(L"");
+ if (wsContentType == L"text/html") {
+ wsContentType = L"";
SetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType.AsStringC());
}
}
CXFA_Node* pContentRawDataNode = GetNodeItem(XFA_NODEITEM_FirstChild);
if (!pContentRawDataNode) {
pContentRawDataNode = CreateSamePacketNode(
- (wsContentType == FX_WSTRC(L"text/xml")) ? XFA_Element::Sharpxml
- : XFA_Element::Sharptext);
+ (wsContentType == L"text/xml") ? XFA_Element::Sharpxml
+ : XFA_Element::Sharptext);
InsertChild(pContentRawDataNode);
}
return pContentRawDataNode->SetScriptContent(
@@ -4291,8 +4290,7 @@ bool CXFA_Node::TryContent(CFX_WideString& wsContent,
}
CXFA_Node* pChildValue = pValue->GetNodeItem(XFA_NODEITEM_FirstChild);
if (pChildValue && XFA_FieldIsMultiListBox(this)) {
- pChildValue->SetAttribute(XFA_ATTRIBUTE_ContentType,
- FX_WSTRC(L"text/xml"));
+ pChildValue->SetAttribute(XFA_ATTRIBUTE_ContentType, L"text/xml");
}
return pChildValue
? pChildValue->TryContent(wsContent, bScriptModify, bProto)
@@ -4306,9 +4304,9 @@ bool CXFA_Node::TryContent(CFX_WideString& wsContent,
if (GetElementType() == XFA_Element::ExData) {
CFX_WideString wsContentType;
GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, false);
- if (wsContentType == FX_WSTRC(L"text/html")) {
+ if (wsContentType == L"text/html") {
element = XFA_Element::SharpxHTML;
- } else if (wsContentType == FX_WSTRC(L"text/xml")) {
+ } else if (wsContentType == L"text/xml") {
element = XFA_Element::Sharpxml;
}
}
diff --git a/xfa/fxfa/parser/cxfa_nodehelper.cpp b/xfa/fxfa/parser/cxfa_nodehelper.cpp
index 18a9594da1..2290892318 100644
--- a/xfa/fxfa/parser/cxfa_nodehelper.cpp
+++ b/xfa/fxfa/parser/cxfa_nodehelper.cpp
@@ -330,7 +330,7 @@ bool CXFA_NodeHelper::CreateNode_ForCondition(CFX_WideString& wsCondition) {
}
}
if (bAll) {
- wsIndex = FX_WSTRC(L"1");
+ wsIndex = L"1";
m_iCreateFlag = XFA_RESOLVENODE_RSTYPE_CreateNodeAll;
} else {
m_iCreateFlag = XFA_RESOLVENODE_RSTYPE_CreateNodeOne;
diff --git a/xfa/fxfa/parser/cxfa_resolveprocessor.cpp b/xfa/fxfa/parser/cxfa_resolveprocessor.cpp
index 9bd34726c5..3ef4e976ca 100644
--- a/xfa/fxfa/parser/cxfa_resolveprocessor.cpp
+++ b/xfa/fxfa/parser/cxfa_resolveprocessor.cpp
@@ -681,11 +681,9 @@ void CXFA_ResolveProcessor::DoPredicateFilter(int32_t iCurIndex,
ASSERT(iFoundCount == findNodes.GetSize());
CFX_WideString wsExpression;
XFA_SCRIPTLANGTYPE eLangType = XFA_SCRIPTLANGTYPE_Unkown;
- if (wsCondition.Left(2) == FX_WSTRC(L".[") &&
- wsCondition.Right(1) == FX_WSTRC(L"]")) {
+ if (wsCondition.Left(2) == L".[" && wsCondition.Right(1) == L"]") {
eLangType = XFA_SCRIPTLANGTYPE_Formcalc;
- } else if (wsCondition.Left(2) == FX_WSTRC(L".(") &&
- wsCondition.Right(1) == FX_WSTRC(L")")) {
+ } else if (wsCondition.Left(2) == L".(" && wsCondition.Right(1) == L")") {
eLangType = XFA_SCRIPTLANGTYPE_Javascript;
} else {
return;
diff --git a/xfa/fxfa/parser/cxfa_script.cpp b/xfa/fxfa/parser/cxfa_script.cpp
index 42911e0f12..16f65f99f4 100644
--- a/xfa/fxfa/parser/cxfa_script.cpp
+++ b/xfa/fxfa/parser/cxfa_script.cpp
@@ -13,9 +13,9 @@ CXFA_Script::CXFA_Script(CXFA_Node* pNode) : CXFA_Data(pNode) {}
XFA_SCRIPTTYPE CXFA_Script::GetContentType() {
CFX_WideStringC cData;
if (m_pNode->TryCData(XFA_ATTRIBUTE_ContentType, cData, false)) {
- if (cData == FX_WSTRC(L"application/x-javascript"))
+ if (cData == L"application/x-javascript")
return XFA_SCRIPTTYPE_Javascript;
- if (cData == FX_WSTRC(L"application/x-formcalc"))
+ if (cData == L"application/x-formcalc")
return XFA_SCRIPTTYPE_Formcalc;
return XFA_SCRIPTTYPE_Unkown;
}
diff --git a/xfa/fxfa/parser/cxfa_scriptcontext.cpp b/xfa/fxfa/parser/cxfa_scriptcontext.cpp
index 44ae9a4e5a..a54ef99af5 100644
--- a/xfa/fxfa/parser/cxfa_scriptcontext.cpp
+++ b/xfa/fxfa/parser/cxfa_scriptcontext.cpp
@@ -293,7 +293,7 @@ void CXFA_ScriptContext::NormalPropertyGetter(CFXJSE_Value* pOriginalValue,
CXFA_ScriptContext* lpScriptContext =
pOriginalObject->GetDocument()->GetScriptContext();
CXFA_Object* pObject = lpScriptContext->GetVariablesThis(pOriginalObject);
- if (wsPropName == FX_WSTRC(L"xfa")) {
+ if (wsPropName == L"xfa") {
CFXJSE_Value* pValue = lpScriptContext->GetJSValueFromMap(
lpScriptContext->GetDocument()->GetRoot());
pReturnValue->Assign(pValue);
diff --git a/xfa/fxfa/parser/cxfa_simple_parser.cpp b/xfa/fxfa/parser/cxfa_simple_parser.cpp
index 2417afaf1e..4a6956de19 100644
--- a/xfa/fxfa/parser/cxfa_simple_parser.cpp
+++ b/xfa/fxfa/parser/cxfa_simple_parser.cpp
@@ -102,8 +102,8 @@ bool ResolveAttribute(CFDE_XMLElement* pElement,
wsNSPrefix = wsAttrName.Left(wsAttributeName.GetLength() -
wsLocalAttrName.GetLength() - 1);
}
- if (wsLocalAttrName == FX_WSTRC(L"xmlns") ||
- wsNSPrefix == FX_WSTRC(L"xmlns") || wsNSPrefix == FX_WSTRC(L"xml")) {
+ if (wsLocalAttrName == L"xmlns" || wsNSPrefix == L"xmlns" ||
+ wsNSPrefix == L"xml") {
return false;
}
if (!XFA_FDEExtension_ResolveNamespaceQualifier(
@@ -202,7 +202,7 @@ void ConvertXMLToPlainText(CFDE_XMLElement* pRootXMLNode,
case FDE_XMLNODE_Element: {
CFX_WideString wsTextData;
static_cast<CFDE_XMLElement*>(pXMLChild)->GetTextData(wsTextData);
- wsTextData += FX_WSTRC(L"\n");
+ wsTextData += L"\n";
wsOutput += wsTextData;
break;
}
@@ -257,7 +257,7 @@ bool XFA_RecognizeRichText(CFDE_XMLElement* pRichTextXMLNode) {
if (pRichTextXMLNode) {
CFX_WideString wsNamespaceURI;
GetElementTagNamespaceURI(pRichTextXMLNode, wsNamespaceURI);
- if (wsNamespaceURI == FX_WSTRC(L"http://www.w3.org/1999/xhtml"))
+ if (wsNamespaceURI == L"http://www.w3.org/1999/xhtml")
return true;
}
return false;
@@ -415,10 +415,10 @@ bool XFA_FDEExtension_ResolveNamespaceQualifier(
CFX_WideString wsNSAttribute;
bool bRet = false;
if (wsQualifier.IsEmpty()) {
- wsNSAttribute = FX_WSTRC(L"xmlns");
+ wsNSAttribute = L"xmlns";
bRet = true;
} else {
- wsNSAttribute = FX_WSTRC(L"xmlns:") + wsQualifier;
+ wsNSAttribute = L"xmlns:" + wsQualifier;
}
for (; pNode != pFakeRoot; pNode = static_cast<CFDE_XMLElement*>(
pNode->GetNodeItem(CFDE_XMLNode::Parent))) {
@@ -482,9 +482,9 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_XDP(
for (int32_t i = 0; i < iAttributeCount; i++) {
CFX_WideString wsAttriName, wsAttriValue;
pElement->GetAttribute(i, wsAttriName, wsAttriValue);
- if (wsAttriName == FX_WSTRC(L"uuid"))
+ if (wsAttriName == L"uuid")
pXFARootNode->SetCData(XFA_ATTRIBUTE_Uuid, wsAttriValue);
- else if (wsAttriName == FX_WSTRC(L"timeStamp"))
+ else if (wsAttriName == L"timeStamp")
pXFARootNode->SetCData(XFA_ATTRIBUTE_TimeStamp, wsAttriValue);
}
}
@@ -720,7 +720,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_Data(
}
CFDE_XMLNode* pDataXMLNode = nullptr;
- if (MatchNodeName(pXMLDocumentNode, FX_WSTRC(L"data"),
+ if (MatchNodeName(pXMLDocumentNode, L"data",
XFA_GetPacketByIndex(XFA_PACKET_Datasets)->pURI,
XFA_GetPacketByIndex(XFA_PACKET_Datasets)->eFlags)) {
static_cast<CFDE_XMLElement*>(pXMLDocumentNode)
@@ -910,8 +910,7 @@ CXFA_Node* CXFA_SimpleParser::NormalLoader(CXFA_Node* pXFANode,
CFX_WideString wsAttrValue;
pXMLElement->GetAttribute(i, wsAttrQualifiedName, wsAttrValue);
GetAttributeLocalName(wsAttrQualifiedName.AsStringC(), wsAttrName);
- if (wsAttrName == FX_WSTRC(L"nil") &&
- wsAttrValue == FX_WSTRC(L"true")) {
+ if (wsAttrName == L"nil" && wsAttrValue == L"true") {
IsNeedValue = false;
}
const XFA_ATTRIBUTEINFO* lpAttrInfo =
@@ -965,9 +964,9 @@ void CXFA_SimpleParser::ParseContentNode(CXFA_Node* pXFANode,
if (pXFANode->GetElementType() == XFA_Element::ExData) {
CFX_WideStringC wsContentType =
pXFANode->GetCData(XFA_ATTRIBUTE_ContentType);
- if (wsContentType == FX_WSTRC(L"text/html"))
+ if (wsContentType == L"text/html")
element = XFA_Element::SharpxHTML;
- else if (wsContentType == FX_WSTRC(L"text/xml"))
+ else if (wsContentType == L"text/xml")
element = XFA_Element::Sharpxml;
}
if (element == XFA_Element::SharpxHTML)
@@ -1030,12 +1029,9 @@ void CXFA_SimpleParser::ParseDataGroup(CXFA_Node* pXFANode,
{
CFX_WideString wsNamespaceURI;
GetElementTagNamespaceURI(pXMLElement, wsNamespaceURI);
- if (wsNamespaceURI ==
- FX_WSTRC(L"http://www.xfa.com/schema/xfa-package/") ||
- wsNamespaceURI ==
- FX_WSTRC(L"http://www.xfa.org/schema/xfa-package/") ||
- wsNamespaceURI ==
- FX_WSTRC(L"http://www.w3.org/2001/XMLSchema-instance")) {
+ if (wsNamespaceURI == L"http://www.xfa.com/schema/xfa-package/" ||
+ wsNamespaceURI == L"http://www.xfa.org/schema/xfa-package/" ||
+ wsNamespaceURI == L"http://www.w3.org/2001/XMLSchema-instance") {
continue;
}
}
@@ -1043,22 +1039,20 @@ void CXFA_SimpleParser::ParseDataGroup(CXFA_Node* pXFANode,
XFA_Element eNodeType = XFA_Element::DataModel;
if (eNodeType == XFA_Element::DataModel) {
CFX_WideString wsDataNodeAttr;
- if (FindAttributeWithNS(
- pXMLElement, FX_WSTRC(L"dataNode"),
- FX_WSTRC(L"http://www.xfa.org/schema/xfa-data/1.0/"),
- wsDataNodeAttr)) {
- if (wsDataNodeAttr == FX_WSTRC(L"dataGroup"))
+ if (FindAttributeWithNS(pXMLElement, L"dataNode",
+ L"http://www.xfa.org/schema/xfa-data/1.0/",
+ wsDataNodeAttr)) {
+ if (wsDataNodeAttr == L"dataGroup")
eNodeType = XFA_Element::DataGroup;
- else if (wsDataNodeAttr == FX_WSTRC(L"dataValue"))
+ else if (wsDataNodeAttr == L"dataValue")
eNodeType = XFA_Element::DataValue;
}
}
CFX_WideString wsContentType;
if (eNodeType == XFA_Element::DataModel) {
- if (FindAttributeWithNS(
- pXMLElement, FX_WSTRC(L"contentType"),
- FX_WSTRC(L"http://www.xfa.org/schema/xfa-data/1.0/"),
- wsContentType)) {
+ if (FindAttributeWithNS(pXMLElement, L"contentType",
+ L"http://www.xfa.org/schema/xfa-data/1.0/",
+ wsContentType)) {
if (!wsContentType.IsEmpty())
eNodeType = XFA_Element::DataValue;
}
@@ -1099,14 +1093,14 @@ void CXFA_SimpleParser::ParseDataGroup(CXFA_Node* pXFANode,
wsName, wsNS)) {
continue;
}
- if (wsName == FX_WSTRC(L"nil") && wsValue == FX_WSTRC(L"true")) {
+ if (wsName == L"nil" && wsValue == L"true") {
bNeedValue = false;
continue;
}
- if (wsNS == FX_WSTRC(L"http://www.xfa.com/schema/xfa-package/") ||
- wsNS == FX_WSTRC(L"http://www.xfa.org/schema/xfa-package/") ||
- wsNS == FX_WSTRC(L"http://www.w3.org/2001/XMLSchema-instance") ||
- wsNS == FX_WSTRC(L"http://www.xfa.org/schema/xfa-data/1.0/")) {
+ if (wsNS == L"http://www.xfa.com/schema/xfa-package/" ||
+ wsNS == L"http://www.xfa.org/schema/xfa-package/" ||
+ wsNS == L"http://www.w3.org/2001/XMLSchema-instance" ||
+ wsNS == L"http://www.xfa.org/schema/xfa-data/1.0/") {
continue;
}
CXFA_Node* pXFAMetaData = m_pFactory->CreateNode(
@@ -1285,23 +1279,21 @@ void CXFA_SimpleParser::ParseInstruction(CXFA_Node* pXFANode,
CFX_WideString wsTargetName;
pXMLInstruction->GetTargetName(wsTargetName);
- if (wsTargetName == FX_WSTRC(L"originalXFAVersion")) {
+ if (wsTargetName == L"originalXFAVersion") {
CFX_WideString wsData;
if (pXMLInstruction->GetData(0, wsData) &&
(pXFANode->GetDocument()->RecognizeXFAVersionNumber(wsData) !=
XFA_VERSION_UNKNOWN)) {
wsData.clear();
if (pXMLInstruction->GetData(1, wsData) &&
- wsData == FX_WSTRC(L"v2.7-scripting:1")) {
+ wsData == L"v2.7-scripting:1") {
pXFANode->GetDocument()->SetFlag(XFA_DOCFLAG_Scripting, true);
}
}
- } else if (wsTargetName == FX_WSTRC(L"acrobat")) {
+ } else if (wsTargetName == L"acrobat") {
CFX_WideString wsData;
- if (pXMLInstruction->GetData(0, wsData) &&
- wsData == FX_WSTRC(L"JavaScript")) {
- if (pXMLInstruction->GetData(1, wsData) &&
- wsData == FX_WSTRC(L"strictScoping")) {
+ if (pXMLInstruction->GetData(0, wsData) && wsData == L"JavaScript") {
+ if (pXMLInstruction->GetData(1, wsData) && wsData == L"strictScoping") {
pXFANode->GetDocument()->SetFlag(XFA_DOCFLAG_StrictScoping, true);
}
}
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp
index e77fa55d50..6dc3fa6561 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.cpp
+++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp
@@ -462,7 +462,7 @@ bool CXFA_WidgetData::GetButtonRollover(CFX_WideString& wsRollover,
while (pText) {
CFX_WideStringC wsName;
pText->TryCData(XFA_ATTRIBUTE_Name, wsName);
- if (wsName == FX_WSTRC(L"rollover")) {
+ if (wsName == L"rollover") {
pText->TryContent(wsRollover);
bRichText = pText->GetElementType() == XFA_Element::ExData;
return !wsRollover.IsEmpty();
@@ -479,7 +479,7 @@ bool CXFA_WidgetData::GetButtonDown(CFX_WideString& wsDown, bool& bRichText) {
while (pText) {
CFX_WideStringC wsName;
pText->TryCData(XFA_ATTRIBUTE_Name, wsName);
- if (wsName == FX_WSTRC(L"down")) {
+ if (wsName == L"down") {
pText->TryContent(wsDown);
bRichText = pText->GetElementType() == XFA_Element::ExData;
return !wsDown.IsEmpty();
@@ -1010,9 +1010,8 @@ void CXFA_WidgetData::SetSelectedItems(CFX_ArrayTemplate<int32_t>& iSelArray,
GetChoiceListItems(wsSaveTextArray, true);
CFX_WideString wsItemValue;
for (int32_t i = 0; i < iSize; i++) {
- wsItemValue = (iSize == 1)
- ? wsSaveTextArray[iSelArray[i]]
- : wsSaveTextArray[iSelArray[i]] + FX_WSTRC(L"\n");
+ wsItemValue = (iSize == 1) ? wsSaveTextArray[iSelArray[i]]
+ : wsSaveTextArray[iSelArray[i]] + L"\n";
wsValue += wsItemValue;
}
}
@@ -1522,7 +1521,7 @@ bool CXFA_WidgetData::SetValue(const CFX_WideString& wsValue,
}
} else {
if (eType == XFA_Element::NumericEdit) {
- if (wsNewText != FX_WSTRC(L"0")) {
+ if (wsNewText != L"0") {
int32_t iLeadDigits = 0;
int32_t iFracDigits = 0;
GetLeadDigits(iLeadDigits);
@@ -1572,7 +1571,7 @@ bool CXFA_WidgetData::GetPictureContent(CFX_WideString& wsPicture,
wsDataPicture);
pLocale->GetTimePattern(FX_LOCALEDATETIMESUBCATEGORY_Medium,
wsTimePicture);
- wsPicture = wsDataPicture + FX_WSTRC(L"T") + wsTimePicture;
+ wsPicture = wsDataPicture + L"T" + wsTimePicture;
break;
case XFA_VT_DECIMAL:
case XFA_VT_FLOAT:
@@ -1640,7 +1639,7 @@ IFX_Locale* CXFA_WidgetData::GetLocal() {
CFX_WideString wsLocaleName;
if (!m_pNode->GetLocaleName(wsLocaleName))
return nullptr;
- if (wsLocaleName == FX_WSTRC(L"ambient"))
+ if (wsLocaleName == L"ambient")
return m_pNode->GetDocument()->GetLocalMgr()->GetDefLocale();
return m_pNode->GetDocument()->GetLocalMgr()->GetLocaleByName(wsLocaleName);
}
diff --git a/xfa/fxfa/parser/cxfa_xml_parser.cpp b/xfa/fxfa/parser/cxfa_xml_parser.cpp
index 95920d9773..b202022516 100644
--- a/xfa/fxfa/parser/cxfa_xml_parser.cpp
+++ b/xfa/fxfa/parser/cxfa_xml_parser.cpp
@@ -85,8 +85,7 @@ int32_t CXFA_XMLParser::DoParser(IFX_Pause* pPause) {
break;
case FDE_XmlSyntaxResult::TargetName:
m_pParser->GetTargetName(m_ws1);
- if (m_ws1 == FX_WSTRC(L"originalXFAVersion") ||
- m_ws1 == FX_WSTRC(L"acrobat")) {
+ if (m_ws1 == L"originalXFAVersion" || m_ws1 == L"acrobat") {
m_pChild = new CFDE_XMLInstruction(m_ws1);
m_pParent->InsertChildNode(m_pChild);
} else {
@@ -104,12 +103,12 @@ int32_t CXFA_XMLParser::DoParser(IFX_Pause* pPause) {
if (m_dwCheckStatus != 0x03 && m_NodeStack.GetSize() == 3) {
CFX_WideString wsTag;
static_cast<CFDE_XMLElement*>(m_pChild)->GetLocalTagName(wsTag);
- if (wsTag == FX_WSTRC(L"template")) {
+ if (wsTag == L"template") {
m_dwCheckStatus |= 0x01;
m_dwCurrentCheckStatus = 0x01;
m_nStart[0] = m_pParser->GetCurrentBinaryPos() -
(m_pParser->GetCurrentPos() - m_nElementStart);
- } else if (wsTag == FX_WSTRC(L"datasets")) {
+ } else if (wsTag == L"datasets") {
m_dwCheckStatus |= 0x02;
m_dwCurrentCheckStatus = 0x02;
m_nStart[1] = m_pParser->GetCurrentBinaryPos() -
diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
index f1b60884ee..03ab81e39f 100644
--- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
@@ -89,9 +89,9 @@ bool FormValueNode_SetChildContent(CXFA_Node* pValueNode,
CFX_WideString wsContentType;
pChildNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType,
false);
- if (wsContentType == FX_WSTRC(L"text/html"))
+ if (wsContentType == L"text/html")
element = XFA_Element::SharpxHTML;
- else if (wsContentType == FX_WSTRC(L"text/xml"))
+ else if (wsContentType == L"text/xml")
element = XFA_Element::Sharpxml;
}
pContentRawDataNode = pChildNode->CreateSamePacketNode(element);
@@ -305,7 +305,7 @@ void CreateDataBinding(CXFA_Node* pFormNode,
CFX_WideString wsItem;
for (int32_t i = 0; i < iCounts; i++) {
items[i]->TryContent(wsItem);
- wsItem = (iCounts == 1) ? wsItem : wsItem + FX_WSTRC(L"\n");
+ wsItem = (iCounts == 1) ? wsItem : wsItem + L"\n";
wsNormalizeValue += wsItem;
}
CXFA_ExData exData = defValue.GetExData();
@@ -456,7 +456,7 @@ CXFA_Node* FindDataRefDataNode(CXFA_Document* pDocument,
bool bForceBind,
bool bUpLevel) {
uint32_t dFlags = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_BindNew;
- if (bUpLevel || wsRef != FX_WSTRC(L"name"))
+ if (bUpLevel || wsRef != L"name")
dFlags |= (XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings);
XFA_RESOLVENODE_RS rs;
@@ -494,7 +494,7 @@ CXFA_Node* CloneOrMergeInstanceManager(CXFA_Document* pDocument,
CXFA_Node* pTemplateNode,
CXFA_NodeArray& subforms) {
CFX_WideStringC wsSubformName = pTemplateNode->GetCData(XFA_ATTRIBUTE_Name);
- CFX_WideString wsInstMgrNodeName = FX_WSTRC(L"_") + wsSubformName;
+ CFX_WideString wsInstMgrNodeName = L"_" + wsSubformName;
uint32_t dwInstNameHash =
FX_HashCode_GetW(wsInstMgrNodeName.AsStringC(), false);
CXFA_Node* pExistingNode = XFA_DataMerge_FindFormDOMInstance(
@@ -530,8 +530,7 @@ CXFA_Node* CloneOrMergeInstanceManager(CXFA_Document* pDocument,
CXFA_Node* pNewNode =
pDocument->CreateNode(XFA_XDPPACKET_Form, XFA_Element::InstanceManager);
- wsInstMgrNodeName =
- FX_WSTRC(L"_") + pTemplateNode->GetCData(XFA_ATTRIBUTE_Name);
+ wsInstMgrNodeName = L"_" + pTemplateNode->GetCData(XFA_ATTRIBUTE_Name);
pNewNode->SetCData(XFA_ATTRIBUTE_Name, wsInstMgrNodeName);
pFormParent->InsertChild(pNewNode, nullptr);
pNewNode->SetTemplateNode(pTemplateNode);
@@ -1040,7 +1039,7 @@ CXFA_Node* MaybeCreateDataNode(CXFA_Document* pDocument,
CFX_WideString wsNamespace;
if (!pDDGroupNode->TryNamespace(wsNamespace) ||
- wsNamespace != FX_WSTRC(L"http://ns.adobe.com/data-description/")) {
+ wsNamespace != L"http://ns.adobe.com/data-description/") {
continue;
}
}
@@ -1214,7 +1213,7 @@ void UpdateDataRelation(CXFA_Node* pDataNode, CXFA_Node* pDataDescriptionNode) {
CFX_WideString wsNamespace;
if (!pDDGroupNode->TryNamespace(wsNamespace) ||
- wsNamespace != FX_WSTRC(L"http://ns.adobe.com/data-description/")) {
+ wsNamespace != L"http://ns.adobe.com/data-description/") {
continue;
}
}
@@ -1390,7 +1389,7 @@ void CXFA_Document::DoDataMerge() {
if (!pDDRoot && pChildNode->GetNameHash() == XFA_HASHCODE_DataDescription) {
if (!pChildNode->TryNamespace(wsNamespaceURI))
continue;
- if (wsNamespaceURI == FX_WSTRC(L"http://ns.adobe.com/data-description/"))
+ if (wsNamespaceURI == L"http://ns.adobe.com/data-description/")
pDDRoot = pChildNode;
} else if (!pDataRoot && pChildNode->GetNameHash() == XFA_HASHCODE_Data) {
if (!pChildNode->TryNamespace(wsNamespaceURI))
diff --git a/xfa/fxfa/parser/xfa_locale.cpp b/xfa/fxfa/parser/xfa_locale.cpp
index 5b18bcf64b..d835eb2bc7 100644
--- a/xfa/fxfa/parser/xfa_locale.cpp
+++ b/xfa/fxfa/parser/xfa_locale.cpp
@@ -35,31 +35,31 @@ void CXFA_XMLLocale::GetNumbericSymbol(FX_LOCALENUMSYMBOL eType,
switch (eType) {
case FX_LOCALENUMSYMBOL_Decimal:
bsSymbols = "numberSymbols";
- wsName = FX_WSTRC(L"decimal");
+ wsName = L"decimal";
break;
case FX_LOCALENUMSYMBOL_Grouping:
bsSymbols = "numberSymbols";
- wsName = FX_WSTRC(L"grouping");
+ wsName = L"grouping";
break;
case FX_LOCALENUMSYMBOL_Percent:
bsSymbols = "numberSymbols";
- wsName = FX_WSTRC(L"percent");
+ wsName = L"percent";
break;
case FX_LOCALENUMSYMBOL_Minus:
bsSymbols = "numberSymbols";
- wsName = FX_WSTRC(L"minus");
+ wsName = L"minus";
break;
case FX_LOCALENUMSYMBOL_Zero:
bsSymbols = "numberSymbols";
- wsName = FX_WSTRC(L"zero");
+ wsName = L"zero";
break;
case FX_LOCALENUMSYMBOL_CurrencySymbol:
bsSymbols = "currencySymbols";
- wsName = FX_WSTRC(L"symbol");
+ wsName = L"symbol";
break;
case FX_LOCALENUMSYMBOL_CurrencyName:
bsSymbols = "currencySymbols";
- wsName = FX_WSTRC(L"isoname");
+ wsName = L"isoname";
break;
default:
return;
@@ -238,28 +238,25 @@ void CXFA_NodeLocale::GetNumbericSymbol(FX_LOCALENUMSYMBOL eType,
CFX_WideString& wsNumSymbol) const {
switch (eType) {
case FX_LOCALENUMSYMBOL_Decimal:
- wsNumSymbol = GetSymbol(XFA_Element::NumberSymbols, FX_WSTRC(L"decimal"));
+ wsNumSymbol = GetSymbol(XFA_Element::NumberSymbols, L"decimal");
break;
case FX_LOCALENUMSYMBOL_Grouping:
- wsNumSymbol =
- GetSymbol(XFA_Element::NumberSymbols, FX_WSTRC(L"grouping"));
+ wsNumSymbol = GetSymbol(XFA_Element::NumberSymbols, L"grouping");
break;
case FX_LOCALENUMSYMBOL_Percent:
- wsNumSymbol = GetSymbol(XFA_Element::NumberSymbols, FX_WSTRC(L"percent"));
+ wsNumSymbol = GetSymbol(XFA_Element::NumberSymbols, L"percent");
break;
case FX_LOCALENUMSYMBOL_Minus:
- wsNumSymbol = GetSymbol(XFA_Element::NumberSymbols, FX_WSTRC(L"minus"));
+ wsNumSymbol = GetSymbol(XFA_Element::NumberSymbols, L"minus");
break;
case FX_LOCALENUMSYMBOL_Zero:
- wsNumSymbol = GetSymbol(XFA_Element::NumberSymbols, FX_WSTRC(L"zero"));
+ wsNumSymbol = GetSymbol(XFA_Element::NumberSymbols, L"zero");
break;
case FX_LOCALENUMSYMBOL_CurrencySymbol:
- wsNumSymbol =
- GetSymbol(XFA_Element::CurrencySymbols, FX_WSTRC(L"symbol"));
+ wsNumSymbol = GetSymbol(XFA_Element::CurrencySymbols, L"symbol");
break;
case FX_LOCALENUMSYMBOL_CurrencyName:
- wsNumSymbol =
- GetSymbol(XFA_Element::CurrencySymbols, FX_WSTRC(L"isoname"));
+ wsNumSymbol = GetSymbol(XFA_Element::CurrencySymbols, L"isoname");
break;
}
}
@@ -302,17 +299,17 @@ void CXFA_NodeLocale::GetDatePattern(FX_LOCALEDATETIMESUBCATEGORY eType,
CFX_WideString& wsPattern) const {
switch (eType) {
case FX_LOCALEDATETIMESUBCATEGORY_Short:
- wsPattern = GetSymbol(XFA_Element::DatePatterns, FX_WSTRC(L"short"));
+ wsPattern = GetSymbol(XFA_Element::DatePatterns, L"short");
break;
case FX_LOCALEDATETIMESUBCATEGORY_Medium:
case FX_LOCALEDATETIMESUBCATEGORY_Default:
- wsPattern = GetSymbol(XFA_Element::DatePatterns, FX_WSTRC(L"med"));
+ wsPattern = GetSymbol(XFA_Element::DatePatterns, L"med");
break;
case FX_LOCALEDATETIMESUBCATEGORY_Full:
- wsPattern = GetSymbol(XFA_Element::DatePatterns, FX_WSTRC(L"full"));
+ wsPattern = GetSymbol(XFA_Element::DatePatterns, L"full");
break;
case FX_LOCALEDATETIMESUBCATEGORY_Long:
- wsPattern = GetSymbol(XFA_Element::DatePatterns, FX_WSTRC(L"long"));
+ wsPattern = GetSymbol(XFA_Element::DatePatterns, L"long");
break;
}
}
@@ -321,17 +318,17 @@ void CXFA_NodeLocale::GetTimePattern(FX_LOCALEDATETIMESUBCATEGORY eType,
CFX_WideString& wsPattern) const {
switch (eType) {
case FX_LOCALEDATETIMESUBCATEGORY_Short:
- wsPattern = GetSymbol(XFA_Element::TimePatterns, FX_WSTRC(L"short"));
+ wsPattern = GetSymbol(XFA_Element::TimePatterns, L"short");
break;
case FX_LOCALEDATETIMESUBCATEGORY_Medium:
case FX_LOCALEDATETIMESUBCATEGORY_Default:
- wsPattern = GetSymbol(XFA_Element::TimePatterns, FX_WSTRC(L"med"));
+ wsPattern = GetSymbol(XFA_Element::TimePatterns, L"med");
break;
case FX_LOCALEDATETIMESUBCATEGORY_Full:
- wsPattern = GetSymbol(XFA_Element::TimePatterns, FX_WSTRC(L"full"));
+ wsPattern = GetSymbol(XFA_Element::TimePatterns, L"full");
break;
case FX_LOCALEDATETIMESUBCATEGORY_Long:
- wsPattern = GetSymbol(XFA_Element::TimePatterns, FX_WSTRC(L"long"));
+ wsPattern = GetSymbol(XFA_Element::TimePatterns, L"long");
break;
}
}
diff --git a/xfa/fxfa/parser/xfa_localevalue.cpp b/xfa/fxfa/parser/xfa_localevalue.cpp
index 87961358e8..7e92535c3d 100644
--- a/xfa/fxfa/parser/xfa_localevalue.cpp
+++ b/xfa/fxfa/parser/xfa_localevalue.cpp
@@ -128,7 +128,7 @@ bool CXFA_LocaleValue::ValidateValue(const CFX_WideString& wsValue,
case FX_LOCALECATEGORY_Zero:
bRet = pFormat->ParseZero(wsValue, wsFormat);
if (!bRet) {
- bRet = wsValue == FX_WSTRC(L"0");
+ bRet = wsValue == L"0";
}
break;
case FX_LOCALECATEGORY_Num: {
@@ -498,7 +498,7 @@ bool CXFA_LocaleValue::FormatSinglePattern(CFX_WideString& wsResult,
}
break;
case FX_LOCALECATEGORY_Zero:
- if (m_wsValue == FX_WSTRC(L"0")) {
+ if (m_wsValue == L"0") {
bRet = pFormat->FormatZero(wsFormat, wsResult);
}
break;
@@ -813,9 +813,8 @@ bool CXFA_LocaleValue::ParsePatternValue(const CFX_WideString& wsValue,
break;
case FX_LOCALECATEGORY_Zero:
bRet = pFormat->ParseZero(wsValue, wsFormat);
- if (bRet) {
- m_wsValue = FX_WSTRC(L"0");
- }
+ if (bRet)
+ m_wsValue = L"0";
break;
case FX_LOCALECATEGORY_Num: {
CFX_WideString fNum;