summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser')
-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
18 files changed, 154 insertions, 176 deletions
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;