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

Side by Side Diff: experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfAnnotationDictionary_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 "SkPdfAnnotationDictionary_autogen.h"
2
3
4 #include "SkPdfNativeDoc.h"
5 SkString SkPdfAnnotationDictionary::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 default value for optional fields
10 return SkString();
11 }
12
13 bool SkPdfAnnotationDictionary::has_Type() const {
14 return get("Type", "") != NULL;
15 }
16
17 SkString SkPdfAnnotationDictionary::Subtype(SkPdfNativeDoc* doc) {
18 SkPdfNativeObject* ret = get("Subtype", "");
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 required field, assert for known good pdf s
22 return SkString();
23 }
24
25 bool SkPdfAnnotationDictionary::has_Subtype() const {
26 return get("Subtype", "") != NULL;
27 }
28
29 SkString SkPdfAnnotationDictionary::Contents(SkPdfNativeDoc* doc) {
30 SkPdfNativeObject* ret = get("Contents", "");
31 if (doc) {ret = doc->resolveReference(ret);}
32 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
33 // TODO(edisonn): warn about missing default value for optional fields
34 return SkString();
35 }
36
37 bool SkPdfAnnotationDictionary::has_Contents() const {
38 return get("Contents", "") != NULL;
39 }
40
41 SkPdfDictionary* SkPdfAnnotationDictionary::P(SkPdfNativeDoc* doc) {
42 SkPdfNativeObject* ret = get("P", "");
43 if (doc) {ret = doc->resolveReference(ret);}
44 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
45 // TODO(edisonn): warn about missing default value for optional fields
46 return NULL;
47 }
48
49 bool SkPdfAnnotationDictionary::has_P() const {
50 return get("P", "") != NULL;
51 }
52
53 SkRect SkPdfAnnotationDictionary::Rect(SkPdfNativeDoc* doc) {
54 SkPdfNativeObject* ret = get("Rect", "");
55 if (doc) {ret = doc->resolveReference(ret);}
56 if ((ret != NULL && ret->isRectangle()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->rectangleValue();
57 // TODO(edisonn): warn about missing required field, assert for known good pdf s
58 return SkRect::MakeEmpty();
59 }
60
61 bool SkPdfAnnotationDictionary::has_Rect() const {
62 return get("Rect", "") != NULL;
63 }
64
65 bool SkPdfAnnotationDictionary::has_NM() const {
66 return get("NM", "") != NULL;
67 }
68
69 bool SkPdfAnnotationDictionary::isMADate(SkPdfNativeDoc* doc) {
70 SkPdfNativeObject* ret = get("M", "");
71 if (doc) {ret = doc->resolveReference(ret);}
72 return ret != NULL && ret->isDate();
73 }
74
75 SkPdfDate SkPdfAnnotationDictionary::getMAsDate(SkPdfNativeDoc* doc) {
76 SkPdfNativeObject* ret = get("M", "");
77 if (doc) {ret = doc->resolveReference(ret);}
78 if ((ret != NULL && ret->isDate()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->dateValue();
79 // TODO(edisonn): warn about missing default value for optional fields
80 return SkPdfDate();
81 }
82
83 bool SkPdfAnnotationDictionary::isMAString(SkPdfNativeDoc* doc) {
84 SkPdfNativeObject* ret = get("M", "");
85 if (doc) {ret = doc->resolveReference(ret);}
86 return ret != NULL && ret->isAnyString();
87 }
88
89 SkString SkPdfAnnotationDictionary::getMAsString(SkPdfNativeDoc* doc) {
90 SkPdfNativeObject* ret = get("M", "");
91 if (doc) {ret = doc->resolveReference(ret);}
92 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
93 // TODO(edisonn): warn about missing default value for optional fields
94 return SkString();
95 }
96
97 bool SkPdfAnnotationDictionary::has_M() const {
98 return get("M", "") != NULL;
99 }
100
101 int64_t SkPdfAnnotationDictionary::F(SkPdfNativeDoc* doc) {
102 SkPdfNativeObject* ret = get("F", "");
103 if (doc) {ret = doc->resolveReference(ret);}
104 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->intValue();
105 // TODO(edisonn): warn about missing default value for optional fields
106 return 0;
107 }
108
109 bool SkPdfAnnotationDictionary::has_F() const {
110 return get("F", "") != NULL;
111 }
112
113 SkPdfDictionary* SkPdfAnnotationDictionary::BS(SkPdfNativeDoc* doc) {
114 SkPdfNativeObject* ret = get("BS", "");
115 if (doc) {ret = doc->resolveReference(ret);}
116 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
117 // TODO(edisonn): warn about missing default value for optional fields
118 return NULL;
119 }
120
121 bool SkPdfAnnotationDictionary::has_BS() const {
122 return get("BS", "") != NULL;
123 }
124
125 SkPdfArray* SkPdfAnnotationDictionary::Border(SkPdfNativeDoc* doc) {
126 SkPdfNativeObject* ret = get("Border", "");
127 if (doc) {ret = doc->resolveReference(ret);}
128 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR eference())) return (SkPdfArray*)ret;
129 // TODO(edisonn): warn about missing default value for optional fields
130 return NULL;
131 }
132
133 bool SkPdfAnnotationDictionary::has_Border() const {
134 return get("Border", "") != NULL;
135 }
136
137 SkPdfDictionary* SkPdfAnnotationDictionary::AP(SkPdfNativeDoc* doc) {
138 SkPdfNativeObject* ret = get("AP", "");
139 if (doc) {ret = doc->resolveReference(ret);}
140 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
141 // TODO(edisonn): warn about missing default value for optional fields
142 return NULL;
143 }
144
145 bool SkPdfAnnotationDictionary::has_AP() const {
146 return get("AP", "") != NULL;
147 }
148
149 SkString SkPdfAnnotationDictionary::AS(SkPdfNativeDoc* doc) {
150 SkPdfNativeObject* ret = get("AS", "");
151 if (doc) {ret = doc->resolveReference(ret);}
152 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->nameValue2();
153 // TODO(edisonn): warn about missing default value for optional fields
154 return SkString();
155 }
156
157 bool SkPdfAnnotationDictionary::has_AS() const {
158 return get("AS", "") != NULL;
159 }
160
161 SkPdfArray* SkPdfAnnotationDictionary::C(SkPdfNativeDoc* doc) {
162 SkPdfNativeObject* ret = get("C", "");
163 if (doc) {ret = doc->resolveReference(ret);}
164 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR eference())) return (SkPdfArray*)ret;
165 // TODO(edisonn): warn about missing default value for optional fields
166 return NULL;
167 }
168
169 bool SkPdfAnnotationDictionary::has_C() const {
170 return get("C", "") != NULL;
171 }
172
173 double SkPdfAnnotationDictionary::CA(SkPdfNativeDoc* doc) {
174 SkPdfNativeObject* ret = get("CA", "");
175 if (doc) {ret = doc->resolveReference(ret);}
176 if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->is Reference())) return ret->numberValue();
177 // TODO(edisonn): warn about missing default value for optional fields
178 return 0;
179 }
180
181 bool SkPdfAnnotationDictionary::has_CA() const {
182 return get("CA", "") != NULL;
183 }
184
185 SkString SkPdfAnnotationDictionary::T(SkPdfNativeDoc* doc) {
186 SkPdfNativeObject* ret = get("T", "");
187 if (doc) {ret = doc->resolveReference(ret);}
188 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
189 // TODO(edisonn): warn about missing default value for optional fields
190 return SkString();
191 }
192
193 bool SkPdfAnnotationDictionary::has_T() const {
194 return get("T", "") != NULL;
195 }
196
197 SkPdfDictionary* SkPdfAnnotationDictionary::Popup(SkPdfNativeDoc* doc) {
198 SkPdfNativeObject* ret = get("Popup", "");
199 if (doc) {ret = doc->resolveReference(ret);}
200 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
201 // TODO(edisonn): warn about missing default value for optional fields
202 return NULL;
203 }
204
205 bool SkPdfAnnotationDictionary::has_Popup() const {
206 return get("Popup", "") != NULL;
207 }
208
209 SkPdfDictionary* SkPdfAnnotationDictionary::A(SkPdfNativeDoc* doc) {
210 SkPdfNativeObject* ret = get("A", "");
211 if (doc) {ret = doc->resolveReference(ret);}
212 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
213 // TODO(edisonn): warn about missing default value for optional fields
214 return NULL;
215 }
216
217 bool SkPdfAnnotationDictionary::has_A() const {
218 return get("A", "") != NULL;
219 }
220
221 SkPdfDictionary* SkPdfAnnotationDictionary::AA(SkPdfNativeDoc* doc) {
222 SkPdfNativeObject* ret = get("AA", "");
223 if (doc) {ret = doc->resolveReference(ret);}
224 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
225 // TODO(edisonn): warn about missing default value for optional fields
226 return NULL;
227 }
228
229 bool SkPdfAnnotationDictionary::has_AA() const {
230 return get("AA", "") != NULL;
231 }
232
233 int64_t SkPdfAnnotationDictionary::StructParent(SkPdfNativeDoc* doc) {
234 SkPdfNativeObject* ret = get("StructParent", "");
235 if (doc) {ret = doc->resolveReference(ret);}
236 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->intValue();
237 // TODO(edisonn): warn about missing default value for optional fields
238 return 0;
239 }
240
241 bool SkPdfAnnotationDictionary::has_StructParent() const {
242 return get("StructParent", "") != NULL;
243 }
244
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698