summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_parser
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-04-08 12:20:38 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-08 12:20:39 -0700
commit4c3debb3c91f5842784be30a911b52cdabcab7df (patch)
treee0534dcb43a71376be8da0b376a97de37080ecc5 /core/fpdfapi/fpdf_parser
parentf172290a8dc527cd8bc73b0d0ad59e78797968c1 (diff)
downloadpdfium-4c3debb3c91f5842784be30a911b52cdabcab7df.tar.xz
Rename both As{Byte,Wide}StringC() helpers to AsStringC().
The naming is redundant given the base type, and will stand in the way of consolidating Byte and Wide code. BUG= Review URL: https://codereview.chromium.org/1862123003
Diffstat (limited to 'core/fpdfapi/fpdf_parser')
-rw-r--r--core/fpdfapi/fpdf_parser/cpdf_name.cpp2
-rw-r--r--core/fpdfapi/fpdf_parser/cpdf_number.cpp2
-rw-r--r--core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp2
-rw-r--r--core/fpdfapi/fpdf_parser/cpdf_parser.cpp4
-rw-r--r--core/fpdfapi/fpdf_parser/cpdf_standard_security_handler.cpp5
-rw-r--r--core/fpdfapi/fpdf_parser/cpdf_string.cpp2
-rw-r--r--core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp4
7 files changed, 10 insertions, 11 deletions
diff --git a/core/fpdfapi/fpdf_parser/cpdf_name.cpp b/core/fpdfapi/fpdf_parser/cpdf_name.cpp
index a7adf1b3d6..d641374547 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_name.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_name.cpp
@@ -29,7 +29,7 @@ CFX_ByteString CPDF_Name::GetString() const {
}
CFX_ByteStringC CPDF_Name::GetConstString() const {
- return m_Name.AsByteStringC();
+ return m_Name.AsStringC();
}
void CPDF_Name::SetString(const CFX_ByteString& str) {
diff --git a/core/fpdfapi/fpdf_parser/cpdf_number.cpp b/core/fpdfapi/fpdf_parser/cpdf_number.cpp
index dbc17d5dd6..a6bace57c9 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_number.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_number.cpp
@@ -47,7 +47,7 @@ const CPDF_Number* CPDF_Number::AsNumber() const {
}
void CPDF_Number::SetString(const CFX_ByteString& str) {
- FX_atonum(str.AsByteStringC(), m_bInteger, &m_Integer);
+ FX_atonum(str.AsStringC(), m_bInteger, &m_Integer);
}
CFX_ByteString CPDF_Number::GetString() const {
diff --git a/core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp b/core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp
index 17fd891d1b..362991f723 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp
@@ -135,7 +135,7 @@ class PDFObjectsTest : public testing::Test {
return false;
for (CPDF_Dictionary::const_iterator it = dict1->begin();
it != dict1->end(); ++it) {
- if (!Equal(it->second, dict2->GetObjectBy(it->first.AsByteStringC())))
+ if (!Equal(it->second, dict2->GetObjectBy(it->first.AsStringC())))
return false;
}
return true;
diff --git a/core/fpdfapi/fpdf_parser/cpdf_parser.cpp b/core/fpdfapi/fpdf_parser/cpdf_parser.cpp
index 15af1ca5c7..4ba43678b8 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_parser.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_parser.cpp
@@ -822,10 +822,10 @@ FX_BOOL CPDF_Parser::RebuildCrossRef() {
uint32_t dwObjNum =
pElement ? pElement->GetObjNum() : 0;
if (dwObjNum) {
- m_pTrailer->SetAtReference(key.AsByteStringC(),
+ m_pTrailer->SetAtReference(key.AsStringC(),
m_pDocument, dwObjNum);
} else {
- m_pTrailer->SetAt(key.AsByteStringC(),
+ m_pTrailer->SetAt(key.AsStringC(),
pElement->Clone());
}
}
diff --git a/core/fpdfapi/fpdf_parser/cpdf_standard_security_handler.cpp b/core/fpdfapi/fpdf_parser/cpdf_standard_security_handler.cpp
index 9846c40d8f..b7ed0315bb 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_standard_security_handler.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_standard_security_handler.cpp
@@ -173,7 +173,7 @@ FX_BOOL CPDF_StandardSecurityHandler::LoadDict(CPDF_Dictionary* pEncryptDict) {
if (stmf_name != strf_name) {
return FALSE;
}
- if (!_LoadCryptInfo(pEncryptDict, strf_name.AsByteStringC(), m_Cipher,
+ if (!_LoadCryptInfo(pEncryptDict, strf_name.AsStringC(), m_Cipher,
m_KeyLen)) {
return FALSE;
}
@@ -196,8 +196,7 @@ FX_BOOL CPDF_StandardSecurityHandler::LoadDict(CPDF_Dictionary* pEncryptDict,
return FALSE;
}
}
- if (!_LoadCryptInfo(pEncryptDict, strf_name.AsByteStringC(), cipher,
- key_len)) {
+ if (!_LoadCryptInfo(pEncryptDict, strf_name.AsStringC(), cipher, key_len)) {
return FALSE;
}
m_Cipher = cipher;
diff --git a/core/fpdfapi/fpdf_parser/cpdf_string.cpp b/core/fpdfapi/fpdf_parser/cpdf_string.cpp
index 3f04d125a2..52f6a5a836 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_string.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_string.cpp
@@ -32,7 +32,7 @@ CFX_ByteString CPDF_String::GetString() const {
}
CFX_ByteStringC CPDF_String::GetConstString() const {
- return m_String.AsByteStringC();
+ return m_String.AsStringC();
}
void CPDF_String::SetString(const CFX_ByteString& str) {
diff --git a/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp b/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp
index 3deecf54ff..0190c6e692 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp
@@ -399,7 +399,7 @@ CPDF_Object* CPDF_SyntaxParser::GetObject(CPDF_IndirectObjectHolder* pObjList,
}
}
m_Pos = SavedPos;
- return new CPDF_Number(word.AsByteStringC());
+ return new CPDF_Number(word.AsStringC());
}
if (word == "true" || word == "false")
@@ -521,7 +521,7 @@ CPDF_Object* CPDF_SyntaxParser::GetObjectByStrict(
return new CPDF_Reference(pObjList, FXSYS_atoui(word));
}
m_Pos = SavedPos;
- return new CPDF_Number(word.AsByteStringC());
+ return new CPDF_Number(word.AsStringC());
}
if (word == "true" || word == "false")