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

Unified Diff: core/src/fpdfdoc/doc_viewerPreferences.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/fpdfdoc/doc_viewerPreferences.cpp
diff --git a/core/src/fpdfdoc/doc_viewerPreferences.cpp b/core/src/fpdfdoc/doc_viewerPreferences.cpp
index eb824eb5a48a1412bab64ef8bd0e945e36c4feaa..12d56dd9b2a8985564685bdec87d5b1ab8a989cf 100644
--- a/core/src/fpdfdoc/doc_viewerPreferences.cpp
+++ b/core/src/fpdfdoc/doc_viewerPreferences.cpp
@@ -15,19 +15,17 @@ FX_BOOL CPDF_ViewerPreferences::IsDirectionR2L() const
{
CPDF_Dictionary *pDict = m_pDoc->GetRoot();
pDict = pDict->GetDict(FX_BSTRC("ViewerPreferences"));
- if (!pDict) {
+ if (!pDict)
return FALSE;
- }
- return FX_BSTRC("R2L") == pDict->GetString(FX_BSTRC("Direction"));
+ return pDict->GetStringAt("Direction") == "R2L";
}
FX_BOOL CPDF_ViewerPreferences::PrintScaling() const
{
CPDF_Dictionary *pDict = m_pDoc->GetRoot();
pDict = pDict->GetDict(FX_BSTRC("ViewerPreferences"));
- if (!pDict) {
+ if (!pDict)
return TRUE;
- }
- return FX_BSTRC("None") != pDict->GetString(FX_BSTRC("PrintScaling"));
+ return pDict->GetStringAt("PrintScaling") != "None";
}
int32_t CPDF_ViewerPreferences::NumCopies() const
{
@@ -56,5 +54,5 @@ CFX_ByteString CPDF_ViewerPreferences::Duplex() const
if (!pDict) {
return FX_BSTRC("None");
}
- return pDict->GetString(FX_BSTRC("Duplex"));
+ return pDict->GetStringAt("Duplex");
}

Powered by Google App Engine
This is Rietveld 408576698