diff options
author | Ryan Harrison <rharrison@chromium.org> | 2017-09-18 14:23:18 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-09-18 18:40:16 +0000 |
commit | 275e260a6cd4a8e506ba974feb85ebcd926c1739 (patch) | |
tree | 2029b9158ec044764ceff122fe5fb5d0a3f123d1 /fpdfsdk/fpdf_ext.cpp | |
parent | 450fbeaaabf1ab340c1018de2e58f1950657517e (diff) | |
download | pdfium-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 'fpdfsdk/fpdf_ext.cpp')
-rw-r--r-- | fpdfsdk/fpdf_ext.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fpdfsdk/fpdf_ext.cpp b/fpdfsdk/fpdf_ext.cpp index 676f701106..1e39f2b2c9 100644 --- a/fpdfsdk/fpdf_ext.cpp +++ b/fpdfsdk/fpdf_ext.cpp @@ -52,7 +52,7 @@ void CheckUnSupportAnnot(CPDF_Document* pDoc, const CPDF_Annot* pPDFAnnot) { FPDF_UnSupportError(FPDF_UNSP_ANNOT_3DANNOT); } else if (nAnnotSubtype == CPDF_Annot::Subtype::SCREEN) { const CPDF_Dictionary* pAnnotDict = pPDFAnnot->GetAnnotDict(); - CFX_ByteString cbString; + ByteString cbString; if (pAnnotDict->KeyExist("IT")) cbString = pAnnotDict->GetStringFor("IT"); if (cbString.Compare("Img") != 0) @@ -67,7 +67,7 @@ void CheckUnSupportAnnot(CPDF_Document* pDoc, const CPDF_Annot* pPDFAnnot) { FPDF_UnSupportError(FPDF_UNSP_ANNOT_ATTACHMENT); } else if (nAnnotSubtype == CPDF_Annot::Subtype::WIDGET) { const CPDF_Dictionary* pAnnotDict = pPDFAnnot->GetAnnotDict(); - CFX_ByteString cbString; + ByteString cbString; if (pAnnotDict->KeyExist("FT")) cbString = pAnnotDict->GetStringFor("FT"); if (cbString.Compare("Sig") == 0) @@ -75,18 +75,18 @@ void CheckUnSupportAnnot(CPDF_Document* pDoc, const CPDF_Annot* pPDFAnnot) { } } -bool CheckSharedForm(const CXML_Element* pElement, CFX_ByteString cbName) { +bool CheckSharedForm(const CXML_Element* pElement, ByteString cbName) { int count = pElement->CountAttrs(); int i = 0; for (i = 0; i < count; i++) { - CFX_ByteString space; - CFX_ByteString name; - CFX_WideString value; + ByteString space; + ByteString name; + WideString value; pElement->GetAttrByIndex(i, &space, &name, &value); if (space == "xmlns" && name == "adhocwf" && value == L"http://ns.adobe.com/AcrobatAdhocWorkflow/1.0/") { CXML_Element* pVersion = - pElement->GetElement("adhocwf", cbName.AsStringC(), 0); + pElement->GetElement("adhocwf", cbName.AsStringView(), 0); if (!pVersion) continue; CXML_Content* pContent = ToContent(pVersion->GetChild(0)); @@ -127,7 +127,7 @@ void CheckUnSupportError(CPDF_Document* pDoc, uint32_t err_code) { // Portfolios and Packages const CPDF_Dictionary* pRootDict = pDoc->GetRoot(); if (pRootDict) { - CFX_ByteString cbString; + ByteString cbString; if (pRootDict->KeyExist("Collection")) { FPDF_UnSupportError(FPDF_UNSP_DOC_PORTABLECOLLECTION); return; @@ -143,7 +143,7 @@ void CheckUnSupportError(CPDF_Document* pDoc, uint32_t err_code) { CPDF_Array* pArray = pJSDict ? pJSDict->GetArrayFor("Names") : nullptr; if (pArray) { for (size_t i = 0; i < pArray->GetCount(); i++) { - CFX_ByteString cbStr = pArray->GetStringAt(i); + ByteString cbStr = pArray->GetStringAt(i); if (cbStr.Compare("com.adobe.acrobat.SharedReview.Register") == 0) { FPDF_UnSupportError(FPDF_UNSP_DOC_SHAREDREVIEW); return; @@ -181,7 +181,7 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFDoc_GetPageMode(FPDF_DOCUMENT document) { if (!pName) return PAGEMODE_USENONE; - CFX_ByteString strPageMode = pName->GetString(); + ByteString strPageMode = pName->GetString(); if (strPageMode.IsEmpty() || strPageMode.EqualNoCase("UseNone")) return PAGEMODE_USENONE; if (strPageMode.EqualNoCase("UseOutlines")) |