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

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

Issue 1335373002: Implement FPDFAction_GetFilePath(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: address some comments Created 5 years, 3 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 CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ 7 #ifndef CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_
8 #define CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ 8 #define CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_
9 9
10 #include <map> 10 #include <map>
(...skipping 15 matching lines...) Expand all
26 class CPDF_DefaultAppearance; 26 class CPDF_DefaultAppearance;
27 class CPDF_Dest; 27 class CPDF_Dest;
28 class CPDF_DocJSActions; 28 class CPDF_DocJSActions;
29 class CPDF_FileSpec; 29 class CPDF_FileSpec;
30 class CPDF_FormControl; 30 class CPDF_FormControl;
31 class CPDF_FormField; 31 class CPDF_FormField;
32 class CPDF_FormNotify; 32 class CPDF_FormNotify;
33 class CPDF_IconFit; 33 class CPDF_IconFit;
34 class CPDF_InterForm; 34 class CPDF_InterForm;
35 class CPDF_Link; 35 class CPDF_Link;
36 class CPDF_LWinParam;
37 class CPDF_Metadata; 36 class CPDF_Metadata;
38 class CPDF_NumberTree; 37 class CPDF_NumberTree;
39 class CPDF_OCContext; 38 class CPDF_OCContext;
40 class CPDF_Page; 39 class CPDF_Page;
41 class CPDF_RenderOptions; 40 class CPDF_RenderOptions;
42 class CPDF_TextObject; 41 class CPDF_TextObject;
43 class CPDF_ViewerPreferences; 42 class CPDF_ViewerPreferences;
44 class CXML_Element; 43 class CXML_Element;
45 44
46 class CPDF_NameTree { 45 class CPDF_NameTree {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 int nLevel = 0); 155 int nLevel = 0);
157 156
158 FX_BOOL LoadOCMDState(const CPDF_Dictionary* pOCMDDict, FX_BOOL bFromConfig); 157 FX_BOOL LoadOCMDState(const CPDF_Dictionary* pOCMDDict, FX_BOOL bFromConfig);
159 158
160 CPDF_Document* m_pDocument; 159 CPDF_Document* m_pDocument;
161 160
162 UsageType m_eUsageType; 161 UsageType m_eUsageType;
163 162
164 std::map<const CPDF_Dictionary*, FX_BOOL> m_OCGStates; 163 std::map<const CPDF_Dictionary*, FX_BOOL> m_OCGStates;
165 }; 164 };
166 class CPDF_LWinParam {
167 public:
168 CPDF_LWinParam(CPDF_Dictionary* pDict) { m_pDict = pDict; }
169 165
170 operator CPDF_Dictionary*() const { return m_pDict; }
171
172 inline CFX_ByteString GetFileName() { return m_pDict->GetString("F"); }
173
174 inline CFX_ByteString GetDefaultDirectory() {
175 return m_pDict->GetString("D");
176 }
177
178 inline CFX_ByteString GetOperation() { return m_pDict->GetString("O"); }
179
180 inline CFX_ByteString GetParameter() { return m_pDict->GetString("P"); }
181
182 CPDF_Dictionary* m_pDict;
183 };
184 class CPDF_ActionFields { 166 class CPDF_ActionFields {
185 public: 167 public:
186 CPDF_ActionFields(const CPDF_Action* pAction) { 168 CPDF_ActionFields(const CPDF_Action* pAction) {
187 m_pAction = (CPDF_Action*)pAction; 169 m_pAction = (CPDF_Action*)pAction;
188 } 170 }
189 171
190 operator CPDF_Action*() const { return m_pAction; } 172 operator CPDF_Action*() const { return m_pAction; }
191 173
192 FX_DWORD GetFieldsCount() const; 174 FX_DWORD GetFieldsCount() const;
193 175
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 CFX_ByteString GetTypeName() const { return m_pDict->GetString("S"); } 219 CFX_ByteString GetTypeName() const { return m_pDict->GetString("S"); }
238 220
239 ActionType GetType() const; 221 ActionType GetType() const;
240 222
241 CPDF_Dest GetDest(CPDF_Document* pDoc) const; 223 CPDF_Dest GetDest(CPDF_Document* pDoc) const;
242 224
243 CFX_WideString GetFilePath() const; 225 CFX_WideString GetFilePath() const;
244 226
245 FX_BOOL GetNewWindow() const { return m_pDict->GetBoolean("NewWindow"); } 227 FX_BOOL GetNewWindow() const { return m_pDict->GetBoolean("NewWindow"); }
246 228
247 CPDF_LWinParam GetWinParam() const;
248
249 CFX_ByteString GetURI(CPDF_Document* pDoc) const; 229 CFX_ByteString GetURI(CPDF_Document* pDoc) const;
250 230
251 FX_BOOL GetMouseMap() const { return m_pDict->GetBoolean("IsMap"); } 231 FX_BOOL GetMouseMap() const { return m_pDict->GetBoolean("IsMap"); }
252 232
253 CPDF_ActionFields GetWidgets() const { return this; } 233 CPDF_ActionFields GetWidgets() const { return this; }
254 234
255 FX_BOOL GetHideStatus() const { return m_pDict->GetBoolean("H", TRUE); } 235 FX_BOOL GetHideStatus() const { return m_pDict->GetBoolean("H", TRUE); }
256 236
257 CFX_ByteString GetNamedAction() const { return m_pDict->GetString("N"); } 237 CFX_ByteString GetNamedAction() const { return m_pDict->GetString("N"); }
258 238
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 FX_FLOAT fc[4], 1200 FX_FLOAT fc[4],
1221 const CFX_ByteStringC& csEntry); 1201 const CFX_ByteStringC& csEntry);
1222 1202
1223 CFX_WideString GetCaption(const CFX_ByteStringC& csEntry); 1203 CFX_WideString GetCaption(const CFX_ByteStringC& csEntry);
1224 1204
1225 CPDF_Stream* GetIcon(const CFX_ByteStringC& csEntry); 1205 CPDF_Stream* GetIcon(const CFX_ByteStringC& csEntry);
1226 friend class CPDF_FormControl; 1206 friend class CPDF_FormControl;
1227 }; 1207 };
1228 1208
1229 #endif // CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ 1209 #endif // CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_
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