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_data_avail.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_data_avail.cpp')
-rw-r--r-- | core/fpdfapi/parser/cpdf_data_avail.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/core/fpdfapi/parser/cpdf_data_avail.cpp b/core/fpdfapi/parser/cpdf_data_avail.cpp index b10029d4ce..994d082712 100644 --- a/core/fpdfapi/parser/cpdf_data_avail.cpp +++ b/core/fpdfapi/parser/cpdf_data_avail.cpp @@ -473,7 +473,7 @@ bool CPDF_DataAvail::CheckPage() { if (!pObj->IsDictionary()) continue; - CFX_ByteString type = pObj->GetDict()->GetStringFor("Type"); + ByteString type = pObj->GetDict()->GetStringFor("Type"); if (type == "Pages") { m_PagesArray.push_back(std::move(pObj)); continue; @@ -661,7 +661,7 @@ std::unique_ptr<CPDF_Object> CPDF_DataAvail::ParseIndirectObjectAt( m_syntaxParser.SetPos(pos); bool bIsNumber; - CFX_ByteString word = m_syntaxParser.GetNextWord(&bIsNumber); + ByteString word = m_syntaxParser.GetNextWord(&bIsNumber); if (!bIsNumber) return nullptr; @@ -723,7 +723,7 @@ bool CPDF_DataAvail::IsLinearizedFile(uint8_t* pData, uint32_t dwLen) { m_syntaxParser.SetPos(m_syntaxParser.m_HeaderOffset + 9); bool bNumber; - CFX_ByteString wordObjNum = m_syntaxParser.GetNextWord(&bNumber); + ByteString wordObjNum = m_syntaxParser.GetNextWord(&bNumber); if (!bNumber) return false; @@ -761,7 +761,7 @@ bool CPDF_DataAvail::CheckEnd() { m_syntaxParser.GetNextWord(nullptr); bool bNumber; - CFX_ByteString xrefpos_str = m_syntaxParser.GetNextWord(&bNumber); + ByteString xrefpos_str = m_syntaxParser.GetNextWord(&bNumber); if (!bNumber) { m_docStatus = PDF_DATAAVAIL_ERROR; return false; @@ -781,7 +781,7 @@ void CPDF_DataAvail::SetStartOffset(FX_FILESIZE dwOffset) { m_Pos = dwOffset; } -bool CPDF_DataAvail::GetNextToken(CFX_ByteString* token) { +bool CPDF_DataAvail::GetNextToken(ByteString* token) { uint8_t ch; if (!GetNextChar(ch)) return false; @@ -814,7 +814,7 @@ bool CPDF_DataAvail::GetNextToken(CFX_ByteString* token) { if (!PDFCharIsOther(ch) && !PDFCharIsNumeric(ch)) { m_Pos--; - *token = CFX_ByteString(buffer, index); + *token = ByteString(buffer, index); return true; } if (index < sizeof(buffer)) @@ -837,7 +837,7 @@ bool CPDF_DataAvail::GetNextToken(CFX_ByteString* token) { else m_Pos--; } - *token = CFX_ByteString(buffer, index); + *token = ByteString(buffer, index); return true; } @@ -854,7 +854,7 @@ bool CPDF_DataAvail::GetNextToken(CFX_ByteString* token) { } } - *token = CFX_ByteString(buffer, index); + *token = ByteString(buffer, index); return true; } @@ -885,7 +885,7 @@ bool CPDF_DataAvail::GetNextChar(uint8_t& ch) { } bool CPDF_DataAvail::CheckCrossRefItem() { - CFX_ByteString token; + ByteString token; while (1) { const CPDF_ReadValidator::Session read_session(GetValidator().Get()); if (!GetNextToken(&token)) { @@ -904,7 +904,7 @@ bool CPDF_DataAvail::CheckCrossRefItem() { bool CPDF_DataAvail::CheckCrossRef() { const CPDF_ReadValidator::Session read_session(GetValidator().Get()); - CFX_ByteString token; + ByteString token; if (!GetNextToken(&token)) { if (!GetValidator()->has_read_problems()) m_docStatus = PDF_DATAAVAIL_ERROR; @@ -1046,7 +1046,7 @@ bool CPDF_DataAvail::CheckUnknownPageNode(uint32_t dwPageNo, pPageNode->m_dwPageNo = dwPageNo; CPDF_Dictionary* pDict = pPage->GetDict(); - const CFX_ByteString type = pDict->GetStringFor("Type"); + const ByteString type = pDict->GetStringFor("Type"); if (type == "Page") { pPageNode->m_type = PDF_PAGENODE_PAGE; return true; |