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

Side by Side Diff: experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfCatalogDictionary_autogen.cpp

Issue 22900010: pdfviewer: check in pdfapi classes (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 #include "SkPdfCatalogDictionary_autogen.h"
2
3
4 #include "SkPdfNativeDoc.h"
5 SkString SkPdfCatalogDictionary::Type(SkPdfNativeDoc* doc) {
6 SkPdfNativeObject* ret = get("Type", "");
7 if (doc) {ret = doc->resolveReference(ret);}
8 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->nameValue2();
9 // TODO(edisonn): warn about missing required field, assert for known good pdf s
10 return SkString();
11 }
12
13 bool SkPdfCatalogDictionary::has_Type() const {
14 return get("Type", "") != NULL;
15 }
16
17 SkString SkPdfCatalogDictionary::Version(SkPdfNativeDoc* doc) {
18 SkPdfNativeObject* ret = get("Version", "");
19 if (doc) {ret = doc->resolveReference(ret);}
20 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->nameValue2();
21 // TODO(edisonn): warn about missing default value for optional fields
22 return SkString();
23 }
24
25 bool SkPdfCatalogDictionary::has_Version() const {
26 return get("Version", "") != NULL;
27 }
28
29 SkPdfPageTreeNodeDictionary* SkPdfCatalogDictionary::Pages(SkPdfNativeDoc* doc) {
30 SkPdfNativeObject* ret = get("Pages", "");
31 if (doc) {ret = doc->resolveReference(ret);}
32 if ((ret != NULL && ret->isDictionary() && ((SkPdfPageTreeNodeDictionary*)ret) ->valid()) || (doc == NULL && ret != NULL && ret->isReference())) return (SkPdfP ageTreeNodeDictionary*)ret;
33 // TODO(edisonn): warn about missing default value for optional fields
34 return NULL;
35 }
36
37 bool SkPdfCatalogDictionary::has_Pages() const {
38 return get("Pages", "") != NULL;
39 }
40
41 bool SkPdfCatalogDictionary::isPageLabelsANumber(SkPdfNativeDoc* doc) {
42 SkPdfNativeObject* ret = get("PageLabels", "");
43 if (doc) {ret = doc->resolveReference(ret);}
44 return ret != NULL && ret->isNumber();
45 }
46
47 double SkPdfCatalogDictionary::getPageLabelsAsNumber(SkPdfNativeDoc* doc) {
48 SkPdfNativeObject* ret = get("PageLabels", "");
49 if (doc) {ret = doc->resolveReference(ret);}
50 if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->is Reference())) return ret->numberValue();
51 // TODO(edisonn): warn about missing default value for optional fields
52 return 0;
53 }
54
55 bool SkPdfCatalogDictionary::isPageLabelsATree(SkPdfNativeDoc* doc) {
56 SkPdfNativeObject* ret = get("PageLabels", "");
57 if (doc) {ret = doc->resolveReference(ret);}
58 return ret != NULL && false;
59 }
60
61 SkPdfTree SkPdfCatalogDictionary::getPageLabelsAsTree(SkPdfNativeDoc* doc) {
62 SkPdfNativeObject* ret = get("PageLabels", "");
63 if (doc) {ret = doc->resolveReference(ret);}
64 if ((ret != NULL && false) || (doc == NULL && ret != NULL && ret->isReference( ))) return ret->treeValue();
65 // TODO(edisonn): warn about missing default value for optional fields
66 return SkPdfTree();
67 }
68
69 bool SkPdfCatalogDictionary::has_PageLabels() const {
70 return get("PageLabels", "") != NULL;
71 }
72
73 SkPdfDictionary* SkPdfCatalogDictionary::Names(SkPdfNativeDoc* doc) {
74 SkPdfNativeObject* ret = get("Names", "");
75 if (doc) {ret = doc->resolveReference(ret);}
76 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
77 // TODO(edisonn): warn about missing default value for optional fields
78 return NULL;
79 }
80
81 bool SkPdfCatalogDictionary::has_Names() const {
82 return get("Names", "") != NULL;
83 }
84
85 SkPdfDictionary* SkPdfCatalogDictionary::Dests(SkPdfNativeDoc* doc) {
86 SkPdfNativeObject* ret = get("Dests", "");
87 if (doc) {ret = doc->resolveReference(ret);}
88 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
89 // TODO(edisonn): warn about missing default value for optional fields
90 return NULL;
91 }
92
93 bool SkPdfCatalogDictionary::has_Dests() const {
94 return get("Dests", "") != NULL;
95 }
96
97 SkPdfDictionary* SkPdfCatalogDictionary::ViewerPreferences(SkPdfNativeDoc* doc) {
98 SkPdfNativeObject* ret = get("ViewerPreferences", "");
99 if (doc) {ret = doc->resolveReference(ret);}
100 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
101 // TODO(edisonn): warn about missing default value for optional fields
102 return NULL;
103 }
104
105 bool SkPdfCatalogDictionary::has_ViewerPreferences() const {
106 return get("ViewerPreferences", "") != NULL;
107 }
108
109 SkString SkPdfCatalogDictionary::PageLayout(SkPdfNativeDoc* doc) {
110 SkPdfNativeObject* ret = get("PageLayout", "");
111 if (doc) {ret = doc->resolveReference(ret);}
112 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->nameValue2();
113 // TODO(edisonn): warn about missing default value for optional fields
114 return SkString();
115 }
116
117 bool SkPdfCatalogDictionary::has_PageLayout() const {
118 return get("PageLayout", "") != NULL;
119 }
120
121 SkString SkPdfCatalogDictionary::PageMode(SkPdfNativeDoc* doc) {
122 SkPdfNativeObject* ret = get("PageMode", "");
123 if (doc) {ret = doc->resolveReference(ret);}
124 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->nameValue2();
125 // TODO(edisonn): warn about missing default value for optional fields
126 return SkString();
127 }
128
129 bool SkPdfCatalogDictionary::has_PageMode() const {
130 return get("PageMode", "") != NULL;
131 }
132
133 SkPdfDictionary* SkPdfCatalogDictionary::Outlines(SkPdfNativeDoc* doc) {
134 SkPdfNativeObject* ret = get("Outlines", "");
135 if (doc) {ret = doc->resolveReference(ret);}
136 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
137 // TODO(edisonn): warn about missing default value for optional fields
138 return NULL;
139 }
140
141 bool SkPdfCatalogDictionary::has_Outlines() const {
142 return get("Outlines", "") != NULL;
143 }
144
145 SkPdfArray* SkPdfCatalogDictionary::Threads(SkPdfNativeDoc* doc) {
146 SkPdfNativeObject* ret = get("Threads", "");
147 if (doc) {ret = doc->resolveReference(ret);}
148 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR eference())) return (SkPdfArray*)ret;
149 // TODO(edisonn): warn about missing default value for optional fields
150 return NULL;
151 }
152
153 bool SkPdfCatalogDictionary::has_Threads() const {
154 return get("Threads", "") != NULL;
155 }
156
157 bool SkPdfCatalogDictionary::isOpenActionAArray(SkPdfNativeDoc* doc) {
158 SkPdfNativeObject* ret = get("OpenAction", "");
159 if (doc) {ret = doc->resolveReference(ret);}
160 return ret != NULL && ret->isArray();
161 }
162
163 SkPdfArray* SkPdfCatalogDictionary::getOpenActionAsArray(SkPdfNativeDoc* doc) {
164 SkPdfNativeObject* ret = get("OpenAction", "");
165 if (doc) {ret = doc->resolveReference(ret);}
166 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR eference())) return (SkPdfArray*)ret;
167 // TODO(edisonn): warn about missing default value for optional fields
168 return NULL;
169 }
170
171 bool SkPdfCatalogDictionary::isOpenActionADictionary(SkPdfNativeDoc* doc) {
172 SkPdfNativeObject* ret = get("OpenAction", "");
173 if (doc) {ret = doc->resolveReference(ret);}
174 return ret != NULL && ret->isDictionary();
175 }
176
177 SkPdfDictionary* SkPdfCatalogDictionary::getOpenActionAsDictionary(SkPdfNativeDo c* doc) {
178 SkPdfNativeObject* ret = get("OpenAction", "");
179 if (doc) {ret = doc->resolveReference(ret);}
180 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
181 // TODO(edisonn): warn about missing default value for optional fields
182 return NULL;
183 }
184
185 bool SkPdfCatalogDictionary::has_OpenAction() const {
186 return get("OpenAction", "") != NULL;
187 }
188
189 SkPdfDictionary* SkPdfCatalogDictionary::AA(SkPdfNativeDoc* doc) {
190 SkPdfNativeObject* ret = get("AA", "");
191 if (doc) {ret = doc->resolveReference(ret);}
192 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
193 // TODO(edisonn): warn about missing default value for optional fields
194 return NULL;
195 }
196
197 bool SkPdfCatalogDictionary::has_AA() const {
198 return get("AA", "") != NULL;
199 }
200
201 SkPdfDictionary* SkPdfCatalogDictionary::URI(SkPdfNativeDoc* doc) {
202 SkPdfNativeObject* ret = get("URI", "");
203 if (doc) {ret = doc->resolveReference(ret);}
204 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
205 // TODO(edisonn): warn about missing default value for optional fields
206 return NULL;
207 }
208
209 bool SkPdfCatalogDictionary::has_URI() const {
210 return get("URI", "") != NULL;
211 }
212
213 SkPdfDictionary* SkPdfCatalogDictionary::AcroForm(SkPdfNativeDoc* doc) {
214 SkPdfNativeObject* ret = get("AcroForm", "");
215 if (doc) {ret = doc->resolveReference(ret);}
216 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
217 // TODO(edisonn): warn about missing default value for optional fields
218 return NULL;
219 }
220
221 bool SkPdfCatalogDictionary::has_AcroForm() const {
222 return get("AcroForm", "") != NULL;
223 }
224
225 SkPdfStream* SkPdfCatalogDictionary::Metadata(SkPdfNativeDoc* doc) {
226 SkPdfNativeObject* ret = get("Metadata", "");
227 if (doc) {ret = doc->resolveReference(ret);}
228 if ((ret != NULL && ret->hasStream()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->getStream();
229 // TODO(edisonn): warn about missing default value for optional fields
230 return NULL;
231 }
232
233 bool SkPdfCatalogDictionary::has_Metadata() const {
234 return get("Metadata", "") != NULL;
235 }
236
237 SkPdfDictionary* SkPdfCatalogDictionary::StructTreeRoot(SkPdfNativeDoc* doc) {
238 SkPdfNativeObject* ret = get("StructTreeRoot", "");
239 if (doc) {ret = doc->resolveReference(ret);}
240 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
241 // TODO(edisonn): warn about missing default value for optional fields
242 return NULL;
243 }
244
245 bool SkPdfCatalogDictionary::has_StructTreeRoot() const {
246 return get("StructTreeRoot", "") != NULL;
247 }
248
249 SkPdfDictionary* SkPdfCatalogDictionary::MarkInfo(SkPdfNativeDoc* doc) {
250 SkPdfNativeObject* ret = get("MarkInfo", "");
251 if (doc) {ret = doc->resolveReference(ret);}
252 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
253 // TODO(edisonn): warn about missing default value for optional fields
254 return NULL;
255 }
256
257 bool SkPdfCatalogDictionary::has_MarkInfo() const {
258 return get("MarkInfo", "") != NULL;
259 }
260
261 SkString SkPdfCatalogDictionary::Lang(SkPdfNativeDoc* doc) {
262 SkPdfNativeObject* ret = get("Lang", "");
263 if (doc) {ret = doc->resolveReference(ret);}
264 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
265 // TODO(edisonn): warn about missing default value for optional fields
266 return SkString();
267 }
268
269 bool SkPdfCatalogDictionary::has_Lang() const {
270 return get("Lang", "") != NULL;
271 }
272
273 SkPdfDictionary* SkPdfCatalogDictionary::SpiderInfo(SkPdfNativeDoc* doc) {
274 SkPdfNativeObject* ret = get("SpiderInfo", "");
275 if (doc) {ret = doc->resolveReference(ret);}
276 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
277 // TODO(edisonn): warn about missing default value for optional fields
278 return NULL;
279 }
280
281 bool SkPdfCatalogDictionary::has_SpiderInfo() const {
282 return get("SpiderInfo", "") != NULL;
283 }
284
285 SkPdfArray* SkPdfCatalogDictionary::OutputIntents(SkPdfNativeDoc* doc) {
286 SkPdfNativeObject* ret = get("OutputIntents", "");
287 if (doc) {ret = doc->resolveReference(ret);}
288 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR eference())) return (SkPdfArray*)ret;
289 // TODO(edisonn): warn about missing default value for optional fields
290 return NULL;
291 }
292
293 bool SkPdfCatalogDictionary::has_OutputIntents() const {
294 return get("OutputIntents", "") != NULL;
295 }
296
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698