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 /core/fpdfapi/parser/cpdf_parser.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 'core/fpdfapi/parser/cpdf_parser.cpp')
-rw-r--r-- | core/fpdfapi/parser/cpdf_parser.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/core/fpdfapi/parser/cpdf_parser.cpp b/core/fpdfapi/parser/cpdf_parser.cpp index a9cad02f5e..b0a8126a3d 100644 --- a/core/fpdfapi/parser/cpdf_parser.cpp +++ b/core/fpdfapi/parser/cpdf_parser.cpp @@ -239,7 +239,7 @@ CPDF_Parser::Error CPDF_Parser::StartParseInternal(CPDF_Document* pDocument) { m_pSyntax->GetKeyword(); bool bNumber; - CFX_ByteString xrefpos_str = m_pSyntax->GetNextWord(&bNumber); + ByteString xrefpos_str = m_pSyntax->GetNextWord(&bNumber); if (!bNumber) return FORMAT_ERROR; @@ -314,7 +314,7 @@ CPDF_Parser::Error CPDF_Parser::SetEncryptHandler() { } if (m_pEncryptDict) { - CFX_ByteString filter = m_pEncryptDict->GetStringFor("Filter"); + ByteString filter = m_pEncryptDict->GetStringFor("Filter"); if (filter != "Standard") return HANDLER_ERROR; @@ -364,7 +364,7 @@ bool CPDF_Parser::VerifyCrossRefV4() { FX_FILESIZE SavedPos = m_pSyntax->GetPos(); m_pSyntax->SetPos(it.second.pos); bool is_num = false; - CFX_ByteString num_str = m_pSyntax->GetNextWord(&is_num); + ByteString num_str = m_pSyntax->GetNextWord(&is_num); m_pSyntax->SetPos(SavedPos); if (!is_num || num_str.IsEmpty() || FXSYS_atoui(num_str.c_str()) != it.first) { @@ -593,7 +593,7 @@ bool CPDF_Parser::ParseCrossRefV4(std::vector<CrossRefObjData>* out_objects) { while (1) { FX_FILESIZE SavedPos = m_pSyntax->GetPos(); bool bIsNumber; - CFX_ByteString word = m_pSyntax->GetNextWord(&bIsNumber); + ByteString word = m_pSyntax->GetNextWord(&bIsNumber); if (word.IsEmpty()) { return false; } @@ -884,7 +884,7 @@ bool CPDF_Parser::RebuildCrossRef() { m_ObjectInfo[pRef->GetRefObjNum()].pos != 0)) { auto it = pTrailer->begin(); while (it != pTrailer->end()) { - const CFX_ByteString& key = it->first; + const ByteString& key = it->first; CPDF_Object* pElement = it->second.get(); ++it; uint32_t dwObjNum = @@ -903,11 +903,10 @@ bool CPDF_Parser::RebuildCrossRef() { : std::move(pObj))); FX_FILESIZE dwSavePos = m_pSyntax->GetPos(); - CFX_ByteString strWord = m_pSyntax->GetKeyword(); + ByteString strWord = m_pSyntax->GetKeyword(); if (!strWord.Compare("startxref")) { bool bNumber; - CFX_ByteString bsOffset = - m_pSyntax->GetNextWord(&bNumber); + ByteString bsOffset = m_pSyntax->GetNextWord(&bNumber); if (bNumber) m_LastXRefOffset = FXSYS_atoi(bsOffset.c_str()); } @@ -1316,7 +1315,7 @@ bool CPDF_Parser::ParseLinearizedHeader() { FX_FILESIZE SavedPos = m_pSyntax->GetPos(); bool bIsNumber; - CFX_ByteString word = m_pSyntax->GetNextWord(&bIsNumber); + ByteString word = m_pSyntax->GetNextWord(&bIsNumber); if (!bIsNumber) return false; |