summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js
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/fm2js
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/fm2js')
-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
5 files changed, 283 insertions, 284 deletions
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,