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/parser/cxfa_itemlayoutprocessor.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp') diff --git a/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp b/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp index f7a019d2d8..7d9a2188c8 100644 --- a/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp +++ b/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp @@ -29,10 +29,10 @@ namespace { -std::vector SeparateStringW(const wchar_t* pStr, - int32_t iStrLen, - wchar_t delimiter) { - std::vector ret; +std::vector SeparateStringW(const wchar_t* pStr, + int32_t iStrLen, + wchar_t delimiter) { + std::vector ret; if (!pStr) return ret; if (iStrLen < 0) @@ -42,7 +42,7 @@ std::vector SeparateStringW(const wchar_t* pStr, const wchar_t* pEnd = pStr + iStrLen; while (true) { if (pStr >= pEnd || delimiter == *pStr) { - ret.push_back(CFX_WideString(pToken, pStr - pToken)); + ret.push_back(WideString(pToken, pStr - pToken)); pToken = pStr + 1; if (pStr >= pEnd) break; @@ -1746,7 +1746,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode) { float fContentWidthLimit = bContainerWidthAutoSize ? FLT_MAX : containerSize.width - fLeftInset - fRightInset; - CFX_WideStringC wsColumnWidths; + WideStringView wsColumnWidths; if (pLayoutNode->TryCData(XFA_ATTRIBUTE_ColumnWidths, wsColumnWidths)) { auto widths = SeparateStringW(wsColumnWidths.unterminated_c_str(), wsColumnWidths.GetLength(), L' '); @@ -1756,7 +1756,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode) { continue; m_rgSpecifiedColumnWidths.push_back( - CXFA_Measurement(width.AsStringC()).ToUnit(XFA_UNIT_Pt)); + CXFA_Measurement(width.AsStringView()).ToUnit(XFA_UNIT_Pt)); } } -- cgit v1.2.3