From 275e260a6cd4a8e506ba974feb85ebcd926c1739 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Mon, 18 Sep 2017 14:23:18 -0400 Subject: 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 Commit-Queue: Ryan Harrison --- xfa/fxfa/cxfa_textlayout.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'xfa/fxfa/cxfa_textlayout.cpp') 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(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 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( 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(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; -- cgit v1.2.3