summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_validate.cpp
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2017-09-18 14:23:18 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-18 18:40:16 +0000
commit275e260a6cd4a8e506ba974feb85ebcd926c1739 (patch)
tree2029b9158ec044764ceff122fe5fb5d0a3f123d1 /xfa/fxfa/parser/cxfa_validate.cpp
parent450fbeaaabf1ab340c1018de2e58f1950657517e (diff)
downloadpdfium-275e260a6cd4a8e506ba974feb85ebcd926c1739.tar.xz
Convert string class names
Automated using git grep & sed. Replace StringC classes with StringView classes. Remove the CFX_ prefix and put string classes in fxcrt namespace. Change AsStringC() to AsStringView(). Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*, Foo). Couple of tests needed to have their names regularlized. BUG=pdfium:894 Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d Reviewed-on: https://pdfium-review.googlesource.com/14151 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_validate.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_validate.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/xfa/fxfa/parser/cxfa_validate.cpp b/xfa/fxfa/parser/cxfa_validate.cpp
index 712d0f2829..fc472741a9 100644
--- a/xfa/fxfa/parser/cxfa_validate.cpp
+++ b/xfa/fxfa/parser/cxfa_validate.cpp
@@ -16,10 +16,10 @@ int32_t CXFA_Validate::GetFormatTest() {
}
bool CXFA_Validate::SetTestValue(int32_t iType,
- CFX_WideString& wsValue,
+ WideString& wsValue,
XFA_ATTRIBUTEENUM eName) {
const XFA_ATTRIBUTEENUMINFO* pInfo =
- XFA_GetAttributeEnumByName(wsValue.AsStringC());
+ XFA_GetAttributeEnumByName(wsValue.AsStringView());
if (pInfo)
eName = pInfo->eName;
@@ -27,7 +27,7 @@ bool CXFA_Validate::SetTestValue(int32_t iType,
return true;
}
-bool CXFA_Validate::SetNullTest(CFX_WideString wsValue) {
+bool CXFA_Validate::SetNullTest(WideString wsValue) {
return SetTestValue(XFA_ATTRIBUTE_NullTest, wsValue,
XFA_ATTRIBUTEENUM_Disabled);
}
@@ -40,8 +40,8 @@ int32_t CXFA_Validate::GetScriptTest() {
return m_pNode->GetEnum(XFA_ATTRIBUTE_ScriptTest);
}
-void CXFA_Validate::GetMessageText(CFX_WideString& wsMessage,
- const CFX_WideString& wsMessageType) {
+void CXFA_Validate::GetMessageText(WideString& wsMessage,
+ const WideString& wsMessageType) {
CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_Element::Message, false);
if (!pNode)
return;
@@ -52,7 +52,7 @@ void CXFA_Validate::GetMessageText(CFX_WideString& wsMessage,
if (pItemNode->GetElementType() != XFA_Element::Text)
continue;
- CFX_WideStringC wsName;
+ WideStringView wsName;
pItemNode->TryCData(XFA_ATTRIBUTE_Name, wsName);
if (wsName.IsEmpty() || wsName == wsMessageType) {
pItemNode->TryContent(wsMessage);
@@ -61,24 +61,24 @@ void CXFA_Validate::GetMessageText(CFX_WideString& wsMessage,
}
}
-void CXFA_Validate::SetFormatMessageText(CFX_WideString wsMessage) {
+void CXFA_Validate::SetFormatMessageText(WideString wsMessage) {
SetMessageText(wsMessage, L"formatTest");
}
-void CXFA_Validate::GetFormatMessageText(CFX_WideString& wsMessage) {
+void CXFA_Validate::GetFormatMessageText(WideString& wsMessage) {
GetMessageText(wsMessage, L"formatTest");
}
-void CXFA_Validate::SetNullMessageText(CFX_WideString wsMessage) {
+void CXFA_Validate::SetNullMessageText(WideString wsMessage) {
SetMessageText(wsMessage, L"nullTest");
}
-void CXFA_Validate::GetNullMessageText(CFX_WideString& wsMessage) {
+void CXFA_Validate::GetNullMessageText(WideString& wsMessage) {
GetMessageText(wsMessage, L"nullTest");
}
-void CXFA_Validate::SetMessageText(CFX_WideString& wsMessage,
- const CFX_WideString& wsMessageType) {
+void CXFA_Validate::SetMessageText(WideString& wsMessage,
+ const WideString& wsMessageType) {
CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_Element::Message, true);
if (!pNode)
return;
@@ -89,7 +89,7 @@ void CXFA_Validate::SetMessageText(CFX_WideString& wsMessage,
if (pItemNode->GetElementType() != XFA_Element::Text)
continue;
- CFX_WideStringC wsName;
+ WideStringView wsName;
pItemNode->TryCData(XFA_ATTRIBUTE_Name, wsName);
if (wsName.IsEmpty() || wsName == wsMessageType) {
pItemNode->SetContent(wsMessage, wsMessage, false);
@@ -102,15 +102,15 @@ void CXFA_Validate::SetMessageText(CFX_WideString& wsMessage,
pTextNode->SetContent(wsMessage, wsMessage, false);
}
-void CXFA_Validate::GetScriptMessageText(CFX_WideString& wsMessage) {
+void CXFA_Validate::GetScriptMessageText(WideString& wsMessage) {
GetMessageText(wsMessage, L"scriptTest");
}
-void CXFA_Validate::SetScriptMessageText(CFX_WideString wsMessage) {
+void CXFA_Validate::SetScriptMessageText(WideString wsMessage) {
SetMessageText(wsMessage, L"scriptTest");
}
-void CXFA_Validate::GetPicture(CFX_WideString& wsPicture) {
+void CXFA_Validate::GetPicture(WideString& wsPicture) {
if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Picture))
pNode->TryContent(wsPicture);
}