summaryrefslogtreecommitdiff
path: root/core/fxcrt/xml/cfx_xmlelement.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 /core/fxcrt/xml/cfx_xmlelement.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 'core/fxcrt/xml/cfx_xmlelement.cpp')
-rw-r--r--core/fxcrt/xml/cfx_xmlelement.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/core/fxcrt/xml/cfx_xmlelement.cpp b/core/fxcrt/xml/cfx_xmlelement.cpp
index 5b5fe45561..1317e9a72b 100644
--- a/core/fxcrt/xml/cfx_xmlelement.cpp
+++ b/core/fxcrt/xml/cfx_xmlelement.cpp
@@ -15,7 +15,7 @@
#include "third_party/base/ptr_util.h"
#include "third_party/base/stl_util.h"
-CFX_XMLElement::CFX_XMLElement(const CFX_WideString& wsTag)
+CFX_XMLElement::CFX_XMLElement(const WideString& wsTag)
: CFX_XMLAttributeNode(wsTag) {}
CFX_XMLElement::~CFX_XMLElement() {}
@@ -28,7 +28,7 @@ std::unique_ptr<CFX_XMLNode> CFX_XMLElement::Clone() {
auto pClone = pdfium::MakeUnique<CFX_XMLElement>(GetName());
pClone->SetAttributes(GetAttributes());
- CFX_WideString wsText;
+ WideString wsText;
CFX_XMLNode* pChild = m_pChild;
while (pChild) {
switch (pChild->GetType()) {
@@ -44,21 +44,21 @@ std::unique_ptr<CFX_XMLNode> CFX_XMLElement::Clone() {
return std::move(pClone);
}
-CFX_WideString CFX_XMLElement::GetLocalTagName() const {
+WideString CFX_XMLElement::GetLocalTagName() const {
auto pos = GetName().Find(L':');
return pos.has_value()
? GetName().Right(GetName().GetLength() - pos.value() - 1)
: GetName();
}
-CFX_WideString CFX_XMLElement::GetNamespacePrefix() const {
+WideString CFX_XMLElement::GetNamespacePrefix() const {
auto pos = GetName().Find(L':');
- return pos.has_value() ? GetName().Left(pos.value()) : CFX_WideString();
+ return pos.has_value() ? GetName().Left(pos.value()) : WideString();
}
-CFX_WideString CFX_XMLElement::GetNamespaceURI() const {
- CFX_WideString wsAttri(L"xmlns");
- CFX_WideString wsPrefix = GetNamespacePrefix();
+WideString CFX_XMLElement::GetNamespaceURI() const {
+ WideString wsAttri(L"xmlns");
+ WideString wsPrefix = GetNamespacePrefix();
if (wsPrefix.GetLength() > 0) {
wsAttri += L":";
wsAttri += wsPrefix;
@@ -76,10 +76,10 @@ CFX_WideString CFX_XMLElement::GetNamespaceURI() const {
}
return pElement->GetString(wsAttri);
}
- return CFX_WideString();
+ return WideString();
}
-CFX_WideString CFX_XMLElement::GetTextData() const {
+WideString CFX_XMLElement::GetTextData() const {
CFX_WideTextBuf buffer;
CFX_XMLNode* pChild = m_pChild;
while (pChild) {
@@ -96,7 +96,7 @@ CFX_WideString CFX_XMLElement::GetTextData() const {
return buffer.MakeString();
}
-void CFX_XMLElement::SetTextData(const CFX_WideString& wsText) {
+void CFX_XMLElement::SetTextData(const WideString& wsText) {
if (wsText.GetLength() < 1)
return;
InsertChildNode(new CFX_XMLText(wsText));