summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_textlayout.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_textlayout.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_textlayout.cpp')
-rw-r--r--xfa/fxfa/cxfa_textlayout.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/xfa/fxfa/cxfa_textlayout.cpp b/xfa/fxfa/cxfa_textlayout.cpp
index 9c4e36739d..bbc61d40f2 100644
--- a/xfa/fxfa/cxfa_textlayout.cpp
+++ b/xfa/fxfa/cxfa_textlayout.cpp
@@ -79,7 +79,7 @@ CFX_XMLNode* CXFA_TextLayout::GetXMLContainerNode() {
pXMLChild = pXMLChild->GetNodeItem(CFX_XMLNode::NextSibling)) {
if (pXMLChild->GetType() == FX_XMLNODE_Element) {
CFX_XMLElement* pXMLElement = static_cast<CFX_XMLElement*>(pXMLChild);
- CFX_WideString wsTag = pXMLElement->GetLocalTagName();
+ WideString wsTag = pXMLElement->GetLocalTagName();
if (wsTag == L"body" || wsTag == L"html") {
pXMLContainer = pXMLChild;
break;
@@ -237,7 +237,7 @@ void CXFA_TextLayout::InitBreak(CFX_CSSComputedStyle* pStyle,
m_pBreak->SetCharSpace(pStyle->GetLetterSpacing().GetValue());
}
-int32_t CXFA_TextLayout::GetText(CFX_WideString& wsText) {
+int32_t CXFA_TextLayout::GetText(WideString& wsText) {
GetTextDataNode();
wsText.clear();
if (!m_bRichText)
@@ -676,7 +676,7 @@ void CXFA_TextLayout::LoadText(CXFA_Node* pNode,
}
}
- CFX_WideString wsText = pNode->GetContent();
+ WideString wsText = pNode->GetContent();
wsText.TrimRight(L" ");
bool bRet = AppendChar(wsText, fLinePos, fSpaceAbove, bSavePieces);
if (bRet && m_pLoader)
@@ -704,7 +704,7 @@ bool CXFA_TextLayout::LoadRichText(
bool bContentNode = false;
float fSpaceBelow = 0;
CFX_RetainPtr<CFX_CSSComputedStyle> pStyle;
- CFX_WideString wsName;
+ WideString wsName;
if (bEndBreak) {
bool bCurOl = false;
bool bCurLi = false;
@@ -749,7 +749,7 @@ bool CXFA_TextLayout::LoadRichText(
if (wsName == L"a") {
ASSERT(pElement);
- CFX_WideString wsLinkContent = pElement->GetString(L"href");
+ WideString wsLinkContent = pElement->GetString(L"href");
if (!wsLinkContent.IsEmpty()) {
pLinkData = pdfium::MakeRetain<CXFA_LinkUserData>(
wsLinkContent.GetBuffer(wsLinkContent.GetLength()));
@@ -761,7 +761,7 @@ bool CXFA_TextLayout::LoadRichText(
bContentNode ? pParentStyle.Get() : pStyle.Get());
bool bSpaceRun = m_textParser.IsSpaceRun(
bContentNode ? pParentStyle.Get() : pStyle.Get());
- CFX_WideString wsText;
+ WideString wsText;
if (bContentNode && iTabCount == 0) {
wsText = static_cast<CFX_XMLText*>(pXMLNode)->GetText();
} else if (wsName == L"br") {
@@ -771,7 +771,7 @@ bool CXFA_TextLayout::LoadRichText(
if (bIsOl)
wsText.Format(L"%d. ", iLiCount);
else
- wsText = 0x00B7 + CFX_WideStringC(L" ", 1);
+ wsText = 0x00B7 + WideStringView(L" ", 1);
} else if (!bContentNode) {
if (iTabCount > 0) {
while (iTabCount-- > 0)
@@ -874,7 +874,7 @@ bool CXFA_TextLayout::LoadRichText(
return true;
}
-bool CXFA_TextLayout::AppendChar(const CFX_WideString& wsText,
+bool CXFA_TextLayout::AppendChar(const WideString& wsText,
float& fLinePos,
float fSpaceAbove,
bool bSavePieces) {
@@ -915,7 +915,7 @@ bool CXFA_TextLayout::IsEnd(bool bSavePieces) {
return false;
}
-void CXFA_TextLayout::ProcessText(CFX_WideString& wsText) {
+void CXFA_TextLayout::ProcessText(WideString& wsText) {
int32_t iLen = wsText.GetLength();
if (iLen == 0)
return;