summaryrefslogtreecommitdiff
path: root/core/fxcrt/xml/cfx_saxreader.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_saxreader.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_saxreader.cpp')
-rw-r--r--core/fxcrt/xml/cfx_saxreader.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/core/fxcrt/xml/cfx_saxreader.cpp b/core/fxcrt/xml/cfx_saxreader.cpp
index 641dc08688..e2c09d14cc 100644
--- a/core/fxcrt/xml/cfx_saxreader.cpp
+++ b/core/fxcrt/xml/cfx_saxreader.cpp
@@ -293,8 +293,8 @@ void CFX_SAXReader::ParseChar(uint8_t ch) {
m_iEntityStart = -1;
// NOTE: Relies on negative lengths being treated as empty strings.
- CFX_ByteString csEntity(m_Data.data() + iSaveStart + 1,
- CurrentDataIndex() - iSaveStart - 1);
+ ByteString csEntity(m_Data.data() + iSaveStart + 1,
+ CurrentDataIndex() - iSaveStart - 1);
int32_t iLen = csEntity.GetLength();
if (iLen == 0)
return;
@@ -649,7 +649,7 @@ void CFX_SAXReader::NotifyData() {
m_pHandler->OnTagData(
pItem->m_pNode,
m_bCharData ? CFX_SAXItem::Type::CharData : CFX_SAXItem::Type::Text,
- CFX_ByteStringC(m_Data), m_File.m_dwCur + m_dwDataOffset);
+ ByteStringView(m_Data), m_File.m_dwCur + m_dwDataOffset);
}
void CFX_SAXReader::NotifyEnter() {
@@ -662,7 +662,7 @@ void CFX_SAXReader::NotifyEnter() {
if (pItem->m_eNode == CFX_SAXItem::Type::Tag ||
pItem->m_eNode == CFX_SAXItem::Type::Instruction) {
- pItem->m_pNode = m_pHandler->OnTagEnter(CFX_ByteStringC(m_Data),
+ pItem->m_pNode = m_pHandler->OnTagEnter(ByteStringView(m_Data),
pItem->m_eNode, m_dwNodePos);
}
}
@@ -677,8 +677,8 @@ void CFX_SAXReader::NotifyAttribute() {
if (pItem->m_eNode == CFX_SAXItem::Type::Tag ||
pItem->m_eNode == CFX_SAXItem::Type::Instruction) {
- m_pHandler->OnTagAttribute(pItem->m_pNode, CFX_ByteStringC(m_Name),
- CFX_ByteStringC(m_Data));
+ m_pHandler->OnTagAttribute(pItem->m_pNode, ByteStringView(m_Name),
+ ByteStringView(m_Data));
}
}
@@ -717,7 +717,7 @@ void CFX_SAXReader::NotifyEnd() {
return;
if (pItem->m_eNode == CFX_SAXItem::Type::Tag)
- m_pHandler->OnTagEnd(pItem->m_pNode, CFX_ByteStringC(m_Data), m_dwNodePos);
+ m_pHandler->OnTagEnd(pItem->m_pNode, ByteStringView(m_Data), m_dwNodePos);
}
void CFX_SAXReader::NotifyTargetData() {
@@ -730,10 +730,10 @@ void CFX_SAXReader::NotifyTargetData() {
if (pItem->m_eNode == CFX_SAXItem::Type::Instruction) {
m_pHandler->OnTargetData(pItem->m_pNode, pItem->m_eNode,
- CFX_ByteStringC(m_Name), m_dwNodePos);
+ ByteStringView(m_Name), m_dwNodePos);
} else if (pItem->m_eNode == CFX_SAXItem::Type::Comment) {
m_pHandler->OnTargetData(pItem->m_pNode, pItem->m_eNode,
- CFX_ByteStringC(m_Data), m_dwNodePos);
+ ByteStringView(m_Data), m_dwNodePos);
}
}