summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_parser_imp.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-04-08 12:20:38 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-08 12:20:39 -0700
commit4c3debb3c91f5842784be30a911b52cdabcab7df (patch)
treee0534dcb43a71376be8da0b376a97de37080ecc5 /xfa/fxfa/parser/xfa_parser_imp.cpp
parentf172290a8dc527cd8bc73b0d0ad59e78797968c1 (diff)
downloadpdfium-4c3debb3c91f5842784be30a911b52cdabcab7df.tar.xz
Rename both As{Byte,Wide}StringC() helpers to AsStringC().
The naming is redundant given the base type, and will stand in the way of consolidating Byte and Wide code. BUG= Review URL: https://codereview.chromium.org/1862123003
Diffstat (limited to 'xfa/fxfa/parser/xfa_parser_imp.cpp')
-rw-r--r--xfa/fxfa/parser/xfa_parser_imp.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/xfa/fxfa/parser/xfa_parser_imp.cpp b/xfa/fxfa/parser/xfa_parser_imp.cpp
index 7b8e73410e..5cd28e79df 100644
--- a/xfa/fxfa/parser/xfa_parser_imp.cpp
+++ b/xfa/fxfa/parser/xfa_parser_imp.cpp
@@ -226,7 +226,7 @@ static inline void XFA_FDEExtension_GetElementTagNamespaceURI(
CFX_WideString wsNodeStr;
pElement->GetNamespacePrefix(wsNodeStr);
if (!XFA_FDEExtension_ResolveNamespaceQualifier(
- pElement, wsNodeStr.AsWideStringC(), wsNamespaceURI)) {
+ pElement, wsNodeStr.AsStringC(), wsNamespaceURI)) {
wsNamespaceURI.Empty();
}
}
@@ -284,7 +284,7 @@ static FX_BOOL XFA_FDEExtension_ResolveAttribute(
return FALSE;
}
if (!XFA_FDEExtension_ResolveNamespaceQualifier(
- pElement, wsNSPrefix.AsWideStringC(), wsNamespaceURI)) {
+ pElement, wsNSPrefix.AsStringC(), wsNamespaceURI)) {
wsNamespaceURI.Empty();
return FALSE;
}
@@ -319,7 +319,7 @@ static FX_BOOL XFA_FDEExtension_FindAttributeWithNS(
wsNSPrefix = wsAttrName.Left(iFind);
}
if (!XFA_FDEExtension_ResolveNamespaceQualifier(
- pElement, wsNSPrefix.AsWideStringC(), wsAttrNS)) {
+ pElement, wsNSPrefix.AsStringC(), wsAttrNS)) {
continue;
}
if (bMatchNSAsPrefix) {
@@ -434,7 +434,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_XDP(
CFX_WideString wsPacketName;
pElement->GetLocalTagName(wsPacketName);
const XFA_PACKETINFO* pPacketInfo =
- XFA_GetPacketByName(wsPacketName.AsWideStringC());
+ XFA_GetPacketByName(wsPacketName.AsStringC());
if (pPacketInfo && pPacketInfo->pURI) {
if (!XFA_FDEExtension_MatchNodeName(pElement, pPacketInfo->pName,
pPacketInfo->pURI,
@@ -586,7 +586,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_TemplateForm(
}
pNode->SetCData(XFA_ATTRIBUTE_Name,
XFA_GetPacketByIndex(XFA_PACKET_Form)->pName);
- pNode->SetAttribute(XFA_ATTRIBUTE_Checksum, wsChecksum.AsWideStringC());
+ pNode->SetAttribute(XFA_ATTRIBUTE_Checksum, wsChecksum.AsStringC());
CXFA_Node* pTemplateRoot =
m_pRootNode->GetFirstChildByClass(XFA_ELEMENT_Template);
CXFA_Node* pTemplateChosen =
@@ -823,7 +823,7 @@ CXFA_Node* CXFA_SimpleParser::NormalLoader(CXFA_Node* pXFANode,
CFX_WideString wsTagName;
pXMLElement->GetLocalTagName(wsTagName);
const XFA_ELEMENTINFO* pElemInfo =
- XFA_GetElementByName(wsTagName.AsWideStringC());
+ XFA_GetElementByName(wsTagName.AsStringC());
if (!pElemInfo) {
continue;
}
@@ -843,8 +843,7 @@ CXFA_Node* CXFA_SimpleParser::NormalLoader(CXFA_Node* pXFANode,
return NULL;
}
if (ePacketID == XFA_XDPPACKET_Config) {
- pXFAChild->SetAttribute(XFA_ATTRIBUTE_Name,
- wsTagName.AsWideStringC());
+ pXFAChild->SetAttribute(XFA_ATTRIBUTE_Name, wsTagName.AsStringC());
}
FX_BOOL IsNeedValue = TRUE;
for (int32_t i = 0, count = pXMLElement->CountAttributes(); i < count;
@@ -854,13 +853,13 @@ CXFA_Node* CXFA_SimpleParser::NormalLoader(CXFA_Node* pXFANode,
CFX_WideString wsAttrValue;
pXMLElement->GetAttribute(i, wsAttrQualifiedName, wsAttrValue);
XFA_FDEExtension_GetAttributeLocalName(
- wsAttrQualifiedName.AsWideStringC(), wsAttrName);
+ wsAttrQualifiedName.AsStringC(), wsAttrName);
if (wsAttrName == FX_WSTRC(L"nil") &&
wsAttrValue == FX_WSTRC(L"true")) {
IsNeedValue = FALSE;
}
const XFA_ATTRIBUTEINFO* lpAttrInfo =
- XFA_GetAttributeByName(wsAttrName.AsWideStringC());
+ XFA_GetAttributeByName(wsAttrName.AsStringC());
if (!lpAttrInfo) {
continue;
}
@@ -868,8 +867,7 @@ CXFA_Node* CXFA_SimpleParser::NormalLoader(CXFA_Node* pXFANode,
lpAttrInfo->eName != XFA_ATTRIBUTE_Save) {
continue;
}
- pXFAChild->SetAttribute(lpAttrInfo->eName,
- wsAttrValue.AsWideStringC());
+ pXFAChild->SetAttribute(lpAttrInfo->eName, wsAttrValue.AsStringC());
}
pXFANode->InsertChild(pXFAChild);
if (pElemInfo->eName == XFA_ELEMENT_Validate ||
@@ -1112,8 +1110,8 @@ void CXFA_SimpleParser::ParseDataGroup(CXFA_Node* pXFANode,
CFX_WideString wsAttrNamespaceURI;
pXMLElement->GetAttribute(i, wsAttrQualifiedName, wsAttrValue);
if (!XFA_FDEExtension_ResolveAttribute(
- pXMLElement, wsAttrQualifiedName.AsWideStringC(),
- wsAttrName, wsAttrNamespaceURI)) {
+ pXMLElement, wsAttrQualifiedName.AsStringC(), wsAttrName,
+ wsAttrNamespaceURI)) {
continue;
}
if (wsAttrName == FX_WSTRC(L"nil") &&