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

Side by Side Diff: experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfStructureElementDictionary_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 "SkPdfStructureElementDictionary_autogen.h"
2
3
4 #include "SkPdfNativeDoc.h"
5 SkString SkPdfStructureElementDictionary::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 SkPdfStructureElementDictionary::has_Type() const {
14 return get("Type", "") != NULL;
15 }
16
17 SkString SkPdfStructureElementDictionary::S(SkPdfNativeDoc* doc) {
18 SkPdfNativeObject* ret = get("S", "");
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 SkPdfStructureElementDictionary::has_S() const {
26 return get("S", "") != NULL;
27 }
28
29 SkPdfDictionary* SkPdfStructureElementDictionary::P(SkPdfNativeDoc* doc) {
30 SkPdfNativeObject* ret = get("P", "");
31 if (doc) {ret = doc->resolveReference(ret);}
32 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
33 // TODO(edisonn): warn about missing default value for optional fields
34 return NULL;
35 }
36
37 bool SkPdfStructureElementDictionary::has_P() const {
38 return get("P", "") != NULL;
39 }
40
41 SkString SkPdfStructureElementDictionary::ID(SkPdfNativeDoc* doc) {
42 SkPdfNativeObject* ret = get("ID", "");
43 if (doc) {ret = doc->resolveReference(ret);}
44 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
45 // TODO(edisonn): warn about missing default value for optional fields
46 return SkString();
47 }
48
49 bool SkPdfStructureElementDictionary::has_ID() const {
50 return get("ID", "") != NULL;
51 }
52
53 SkPdfDictionary* SkPdfStructureElementDictionary::Pg(SkPdfNativeDoc* doc) {
54 SkPdfNativeObject* ret = get("Pg", "");
55 if (doc) {ret = doc->resolveReference(ret);}
56 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
57 // TODO(edisonn): warn about missing default value for optional fields
58 return NULL;
59 }
60
61 bool SkPdfStructureElementDictionary::has_Pg() const {
62 return get("Pg", "") != NULL;
63 }
64
65 SkPdfNativeObject* SkPdfStructureElementDictionary::K(SkPdfNativeDoc* doc) {
66 SkPdfNativeObject* ret = get("K", "");
67 if (doc) {ret = doc->resolveReference(ret);}
68 if ((ret != NULL && true) || (doc == NULL && ret != NULL && ret->isReference() )) return ret;
69 // TODO(edisonn): warn about missing default value for optional fields
70 return NULL;
71 }
72
73 bool SkPdfStructureElementDictionary::has_K() const {
74 return get("K", "") != NULL;
75 }
76
77 SkPdfNativeObject* SkPdfStructureElementDictionary::A(SkPdfNativeDoc* doc) {
78 SkPdfNativeObject* ret = get("A", "");
79 if (doc) {ret = doc->resolveReference(ret);}
80 if ((ret != NULL && true) || (doc == NULL && ret != NULL && ret->isReference() )) return ret;
81 // TODO(edisonn): warn about missing default value for optional fields
82 return NULL;
83 }
84
85 bool SkPdfStructureElementDictionary::has_A() const {
86 return get("A", "") != NULL;
87 }
88
89 bool SkPdfStructureElementDictionary::isCAName(SkPdfNativeDoc* doc) {
90 SkPdfNativeObject* ret = get("C", "");
91 if (doc) {ret = doc->resolveReference(ret);}
92 return ret != NULL && ret->isName();
93 }
94
95 SkString SkPdfStructureElementDictionary::getCAsName(SkPdfNativeDoc* doc) {
96 SkPdfNativeObject* ret = get("C", "");
97 if (doc) {ret = doc->resolveReference(ret);}
98 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->nameValue2();
99 // TODO(edisonn): warn about missing default value for optional fields
100 return SkString();
101 }
102
103 bool SkPdfStructureElementDictionary::isCAArray(SkPdfNativeDoc* doc) {
104 SkPdfNativeObject* ret = get("C", "");
105 if (doc) {ret = doc->resolveReference(ret);}
106 return ret != NULL && ret->isArray();
107 }
108
109 SkPdfArray* SkPdfStructureElementDictionary::getCAsArray(SkPdfNativeDoc* doc) {
110 SkPdfNativeObject* ret = get("C", "");
111 if (doc) {ret = doc->resolveReference(ret);}
112 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR eference())) return (SkPdfArray*)ret;
113 // TODO(edisonn): warn about missing default value for optional fields
114 return NULL;
115 }
116
117 bool SkPdfStructureElementDictionary::has_C() const {
118 return get("C", "") != NULL;
119 }
120
121 int64_t SkPdfStructureElementDictionary::R(SkPdfNativeDoc* doc) {
122 SkPdfNativeObject* ret = get("R", "");
123 if (doc) {ret = doc->resolveReference(ret);}
124 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->intValue();
125 // TODO(edisonn): warn about missing default value for optional fields
126 return 0;
127 }
128
129 bool SkPdfStructureElementDictionary::has_R() const {
130 return get("R", "") != NULL;
131 }
132
133 SkString SkPdfStructureElementDictionary::T(SkPdfNativeDoc* doc) {
134 SkPdfNativeObject* ret = get("T", "");
135 if (doc) {ret = doc->resolveReference(ret);}
136 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
137 // TODO(edisonn): warn about missing default value for optional fields
138 return SkString();
139 }
140
141 bool SkPdfStructureElementDictionary::has_T() const {
142 return get("T", "") != NULL;
143 }
144
145 SkString SkPdfStructureElementDictionary::Lang(SkPdfNativeDoc* doc) {
146 SkPdfNativeObject* ret = get("Lang", "");
147 if (doc) {ret = doc->resolveReference(ret);}
148 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
149 // TODO(edisonn): warn about missing default value for optional fields
150 return SkString();
151 }
152
153 bool SkPdfStructureElementDictionary::has_Lang() const {
154 return get("Lang", "") != NULL;
155 }
156
157 SkString SkPdfStructureElementDictionary::Alt(SkPdfNativeDoc* doc) {
158 SkPdfNativeObject* ret = get("Alt", "");
159 if (doc) {ret = doc->resolveReference(ret);}
160 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
161 // TODO(edisonn): warn about missing default value for optional fields
162 return SkString();
163 }
164
165 bool SkPdfStructureElementDictionary::has_Alt() const {
166 return get("Alt", "") != NULL;
167 }
168
169 SkString SkPdfStructureElementDictionary::ActualText(SkPdfNativeDoc* doc) {
170 SkPdfNativeObject* ret = get("ActualText", "");
171 if (doc) {ret = doc->resolveReference(ret);}
172 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
173 // TODO(edisonn): warn about missing default value for optional fields
174 return SkString();
175 }
176
177 bool SkPdfStructureElementDictionary::has_ActualText() const {
178 return get("ActualText", "") != NULL;
179 }
180
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698