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

Side by Side Diff: core/include/fpdfdoc/fpdf_doc.h

Issue 984143002: Merge to XFA: Make conversion between CPDF_Dest and its object explicit. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 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
« no previous file with comments | « no previous file | core/src/fpdfdoc/doc_action.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef _FPDF_DOC_H_ 7 #ifndef _FPDF_DOC_H_
8 #define _FPDF_DOC_H_ 8 #define _FPDF_DOC_H_
9 #ifndef _FPDF_PARSER_ 9 #ifndef _FPDF_PARSER_
10 #include "../fpdfapi/fpdf_parser.h" 10 #include "../fpdfapi/fpdf_parser.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 #define PDFZOOM_FITPAGE 2 117 #define PDFZOOM_FITPAGE 2
118 #define PDFZOOM_FITHORZ 3 118 #define PDFZOOM_FITHORZ 3
119 #define PDFZOOM_FITVERT 4 119 #define PDFZOOM_FITVERT 4
120 #define PDFZOOM_FITRECT 5 120 #define PDFZOOM_FITRECT 5
121 #define PDFZOOM_FITBBOX 6 121 #define PDFZOOM_FITBBOX 6
122 #define PDFZOOM_FITBHORZ 7 122 #define PDFZOOM_FITBHORZ 7
123 #define PDFZOOM_FITBVERT 8 123 #define PDFZOOM_FITBVERT 8
124 class CPDF_Dest : public CFX_Object 124 class CPDF_Dest : public CFX_Object
125 { 125 {
126 public: 126 public:
127 CPDF_Dest() : m_pObj(nullptr) { }
128 explicit CPDF_Dest(CPDF_Object* pObj) : m_pObj(pObj) { }
127 129
128 CPDF_Dest(CPDF_Object* pObj = NULL) 130 operator bool () const { return m_pObj != NULL; }
129 { 131 CPDF_Object* GetObject() const { return m_pObj; }
130 m_pObj = pObj;
131 }
132
133 operator CPDF_Object* () const
134 {
135 return m_pObj;
136 }
137 132
138 CFX_ByteString GetRemoteName(); 133 CFX_ByteString GetRemoteName();
139
140 int GetPageIndex(CPDF_Document* pDoc); 134 int GetPageIndex(CPDF_Document* pDoc);
141
142 FX_DWORD GetPageObjNum(); 135 FX_DWORD GetPageObjNum();
143
144 int GetZoomMode(); 136 int GetZoomMode();
145
146 FX_FLOAT GetParam(int index); 137 FX_FLOAT GetParam(int index);
147 138
148 139 protected:
149 CPDF_Object* m_pObj; 140 CPDF_Object* m_pObj;
150 }; 141 };
151 class CPDF_OCContext : public CFX_Object, public IPDF_OCContext 142 class CPDF_OCContext : public CFX_Object, public IPDF_OCContext
152 { 143 {
153 public: 144 public:
154 145
155 enum UsageType { 146 enum UsageType {
156 View = 0, 147 View = 0,
157 Design, 148 Design,
158 Print, 149 Print,
(...skipping 1606 matching lines...) Expand 10 before | Expand all | Expand 10 after
1765 FX_FLOAT GetOriginalColor(int index, FX_BSTR csEn try); 1756 FX_FLOAT GetOriginalColor(int index, FX_BSTR csEn try);
1766 1757
1767 void GetOriginalColor(int& iColorType , FX_FLOAT fc[4], FX_BSTR csEntry); 1758 void GetOriginalColor(int& iColorType , FX_FLOAT fc[4], FX_BSTR csEntry);
1768 1759
1769 CFX_WideString GetCaption(FX_BSTR csEntry); 1760 CFX_WideString GetCaption(FX_BSTR csEntry);
1770 1761
1771 CPDF_Stream* GetIcon(FX_BSTR csEntry); 1762 CPDF_Stream* GetIcon(FX_BSTR csEntry);
1772 friend class CPDF_FormControl; 1763 friend class CPDF_FormControl;
1773 }; 1764 };
1774 #endif 1765 #endif
OLDNEW
« no previous file with comments | « no previous file | core/src/fpdfdoc/doc_action.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698