summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_textprovider.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/cxfa_textprovider.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/cxfa_textprovider.cpp')
-rw-r--r--xfa/fxfa/cxfa_textprovider.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/xfa/fxfa/cxfa_textprovider.cpp b/xfa/fxfa/cxfa_textprovider.cpp
index 16a2b58a8a..9f1ecd51c3 100644
--- a/xfa/fxfa/cxfa_textprovider.cpp
+++ b/xfa/fxfa/cxfa_textprovider.cpp
@@ -43,7 +43,7 @@ CXFA_Node* CXFA_TextProvider::GetTextNode(bool& bRichText) {
CXFA_Node* pChildNode = pValueNode->GetNodeItem(XFA_NODEITEM_FirstChild);
if (pChildNode && pChildNode->GetElementType() == XFA_Element::ExData) {
- CFX_WideString wsContentType;
+ WideString wsContentType;
pChildNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, false);
if (wsContentType == L"text/html")
bRichText = true;
@@ -80,7 +80,7 @@ CXFA_Node* CXFA_TextProvider::GetTextNode(bool& bRichText) {
CXFA_Node* pChildNode = pValueNode->GetNodeItem(XFA_NODEITEM_FirstChild);
if (pChildNode && pChildNode->GetElementType() == XFA_Element::ExData) {
- CFX_WideString wsContentType;
+ WideString wsContentType;
pChildNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, false);
if (wsContentType == L"text/html")
bRichText = true;
@@ -95,7 +95,7 @@ CXFA_Node* CXFA_TextProvider::GetTextNode(bool& bRichText) {
CXFA_Node* pNode = pItemNode->GetNodeItem(XFA_NODEITEM_FirstChild);
while (pNode) {
- CFX_WideStringC wsName;
+ WideStringView wsName;
pNode->TryCData(XFA_ATTRIBUTE_Name, wsName);
if (m_eType == XFA_TEXTPROVIDERTYPE_Rollover && wsName == L"rollover")
return pNode;
@@ -135,8 +135,8 @@ bool CXFA_TextProvider::IsCheckButtonAndAutoWidth() {
bool CXFA_TextProvider::GetEmbbedObj(bool bURI,
bool bRaw,
- const CFX_WideString& wsAttr,
- CFX_WideString& wsValue) {
+ const WideString& wsAttr,
+ WideString& wsValue) {
if (m_eType != XFA_TEXTPROVIDERTYPE_Text)
return false;
@@ -149,11 +149,12 @@ bool CXFA_TextProvider::GetEmbbedObj(bool bURI,
CXFA_Node* pIDNode = nullptr;
CXFA_WidgetAcc* pEmbAcc = nullptr;
if (pParent)
- pIDNode = pDocument->GetNodeByID(pParent, wsAttr.AsStringC());
+ pIDNode = pDocument->GetNodeByID(pParent, wsAttr.AsStringView());
if (!pIDNode) {
pIDNode = pDocument->GetNodeByID(
- ToNode(pDocument->GetXFAObject(XFA_HASHCODE_Form)), wsAttr.AsStringC());
+ ToNode(pDocument->GetXFAObject(XFA_HASHCODE_Form)),
+ wsAttr.AsStringView());
}
if (pIDNode)
pEmbAcc = static_cast<CXFA_WidgetAcc*>(pIDNode->GetWidgetData());