summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfppo.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 /fpdfsdk/fpdfppo.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 'fpdfsdk/fpdfppo.cpp')
-rw-r--r--fpdfsdk/fpdfppo.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/fpdfsdk/fpdfppo.cpp b/fpdfsdk/fpdfppo.cpp
index d08de020bb..230fd14fc8 100644
--- a/fpdfsdk/fpdfppo.cpp
+++ b/fpdfsdk/fpdfppo.cpp
@@ -26,7 +26,7 @@
namespace {
CPDF_Object* PageDictGetInheritableTag(CPDF_Dictionary* pDict,
- const CFX_ByteString& bsSrcTag) {
+ const ByteString& bsSrcTag) {
if (!pDict || bsSrcTag.IsEmpty())
return nullptr;
if (!pDict->KeyExist("Parent") || !pDict->KeyExist("Type"))
@@ -58,7 +58,7 @@ CPDF_Object* PageDictGetInheritableTag(CPDF_Dictionary* pDict,
bool CopyInheritable(CPDF_Dictionary* pCurPageDict,
CPDF_Dictionary* pSrcPageDict,
- const CFX_ByteString& key) {
+ const ByteString& key) {
if (pCurPageDict->KeyExist(key))
return true;
@@ -70,7 +70,7 @@ bool CopyInheritable(CPDF_Dictionary* pCurPageDict,
return true;
}
-bool ParserPageRangeString(CFX_ByteString rangstring,
+bool ParserPageRangeString(ByteString rangstring,
std::vector<uint16_t>* pageArray,
int nCount) {
if (rangstring.IsEmpty())
@@ -78,13 +78,13 @@ bool ParserPageRangeString(CFX_ByteString rangstring,
rangstring.Remove(' ');
FX_STRSIZE nLength = rangstring.GetLength();
- CFX_ByteString cbCompareString("0123456789-,");
+ ByteString cbCompareString("0123456789-,");
for (FX_STRSIZE i = 0; i < nLength; ++i) {
if (!cbCompareString.Contains(rangstring[i]))
return false;
}
- CFX_ByteString cbMidRange;
+ ByteString cbMidRange;
FX_STRSIZE nStringFrom = 0;
pdfium::Optional<FX_STRSIZE> nStringTo = 0;
while (nStringTo < nLength) {
@@ -165,7 +165,7 @@ bool CPDF_PageOrganizer::PDFDocInit() {
pDocInfoDict->SetNewFor<CPDF_String>("Producer", "PDFium", false);
- CFX_ByteString cbRootType = pNewRoot->GetStringFor("Type", "");
+ ByteString cbRootType = pNewRoot->GetStringFor("Type", "");
if (cbRootType.IsEmpty())
pNewRoot->SetNewFor<CPDF_Name>("Type", "Catalog");
@@ -178,7 +178,7 @@ bool CPDF_PageOrganizer::PDFDocInit() {
pNewPages->GetObjNum());
}
- CFX_ByteString cbPageType = pNewPages->GetStringFor("Type", "");
+ ByteString cbPageType = pNewPages->GetStringFor("Type", "");
if (cbPageType.IsEmpty())
pNewPages->SetNewFor<CPDF_Name>("Type", "Pages");
@@ -205,7 +205,7 @@ bool CPDF_PageOrganizer::ExportPage(const std::vector<uint16_t>& pageNums,
// Clone the page dictionary
for (const auto& it : *pSrcPageDict) {
- const CFX_ByteString& cbSrcKeyStr = it.first;
+ const ByteString& cbSrcKeyStr = it.first;
if (cbSrcKeyStr == "Type" || cbSrcKeyStr == "Parent")
continue;
@@ -271,7 +271,7 @@ bool CPDF_PageOrganizer::UpdateReference(CPDF_Object* pObj,
CPDF_Dictionary* pDict = pObj->AsDictionary();
auto it = pDict->begin();
while (it != pDict->end()) {
- const CFX_ByteString& key = it->first;
+ const ByteString& key = it->first;
CPDF_Object* pNextObj = it->second.get();
++it;
if (key == "Parent" || key == "Prev" || key == "First")
@@ -330,7 +330,7 @@ uint32_t CPDF_PageOrganizer::GetNewObjId(ObjectNumberMap* pObjNumberMap,
std::unique_ptr<CPDF_Object> pClone = pDirect->Clone();
if (CPDF_Dictionary* pDictClone = pClone->AsDictionary()) {
if (pDictClone->KeyExist("Type")) {
- CFX_ByteString strType = pDictClone->GetStringFor("Type");
+ ByteString strType = pDictClone->GetStringFor("Type");
if (!FXSYS_stricmp(strType.c_str(), "Pages"))
return 4;
if (!FXSYS_stricmp(strType.c_str(), "Page"))