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

Side by Side Diff: core/src/fpdfdoc/doc_viewerPreferences.cpp

Issue 1780503002: Split off CPDF_Document into its own .cpp/.h files. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "core/include/fpdfapi/cpdf_document.h"
7 #include "core/include/fpdfdoc/fpdf_doc.h" 8 #include "core/include/fpdfdoc/fpdf_doc.h"
8 9
9 CPDF_ViewerPreferences::CPDF_ViewerPreferences(CPDF_Document* pDoc) 10 CPDF_ViewerPreferences::CPDF_ViewerPreferences(CPDF_Document* pDoc)
10 : m_pDoc(pDoc) {} 11 : m_pDoc(pDoc) {}
11 CPDF_ViewerPreferences::~CPDF_ViewerPreferences() {} 12 CPDF_ViewerPreferences::~CPDF_ViewerPreferences() {}
12 FX_BOOL CPDF_ViewerPreferences::IsDirectionR2L() const { 13 FX_BOOL CPDF_ViewerPreferences::IsDirectionR2L() const {
13 CPDF_Dictionary* pDict = m_pDoc->GetRoot(); 14 CPDF_Dictionary* pDict = m_pDoc->GetRoot();
14 pDict = pDict->GetDictBy("ViewerPreferences"); 15 pDict = pDict->GetDictBy("ViewerPreferences");
15 if (!pDict) { 16 if (!pDict) {
16 return FALSE; 17 return FALSE;
(...skipping 27 matching lines...) Expand all
44 return pRange; 45 return pRange;
45 } 46 }
46 CFX_ByteString CPDF_ViewerPreferences::Duplex() const { 47 CFX_ByteString CPDF_ViewerPreferences::Duplex() const {
47 CPDF_Dictionary* pDict = m_pDoc->GetRoot(); 48 CPDF_Dictionary* pDict = m_pDoc->GetRoot();
48 pDict = pDict->GetDictBy("ViewerPreferences"); 49 pDict = pDict->GetDictBy("ViewerPreferences");
49 if (!pDict) { 50 if (!pDict) {
50 return "None"; 51 return "None";
51 } 52 }
52 return pDict->GetStringBy("Duplex"); 53 return pDict->GetStringBy("Duplex");
53 } 54 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698