Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3461)

Unified Diff: core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp

Issue 1194933003: Make CPDF_Object::GetString() a virtual method. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
index 22826a3609095aa6d194e9be5809966a96406f4a..0b3638437d703093a15a6368e73bfb3718a07dfd 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
@@ -929,7 +929,7 @@ int32_t CPDF_Creator::WriteIndirectObjectToStream(const CPDF_Object* pObj)
}
CPDF_Dictionary *pDict = pObj->GetDict();
if (pObj->GetType() == PDFOBJ_STREAM) {
- if (pDict && pDict->GetString(FX_BSTRC("Type")) == FX_BSTRC("XRef")) {
+ if (pDict && pDict->GetStringAt("Type") == "XRef") {
return 0;
}
return 1;
@@ -941,7 +941,7 @@ int32_t CPDF_Creator::WriteIndirectObjectToStream(const CPDF_Object* pObj)
if (IsSignatureDict(pDict)) {
return 1;
}
- if (pDict->GetString(FX_BSTRC("Type")) == FX_BSTRC("Page")) {
+ if (pDict->GetStringAt("Type") == "Page") {
return 1;
}
}
@@ -2061,7 +2061,7 @@ void CPDF_Creator::InitID(FX_BOOL bDefault )
}
m_pIDArray->Add(m_pIDArray->GetElement(0)->Clone());
if (m_pEncryptDict && !pOldIDArray && m_pParser && bNewId) {
- if (m_pEncryptDict->GetString(FX_BSTRC("Filter")) == FX_BSTRC("Standard")) {
+ if (m_pEncryptDict->GetStringAt("Filter") == "Standard") {
CPDF_StandardSecurityHandler handler;
CFX_ByteString user_pass = m_pParser->GetPassword();
FX_DWORD flag = PDF_ENCRYPT_CONTENT;

Powered by Google App Engine
This is Rietveld 408576698