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

Side by Side Diff: experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFontDescriptorDictionary_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 "SkPdfFontDescriptorDictionary_autogen.h"
2
3
4 #include "SkPdfNativeDoc.h"
5 SkString SkPdfFontDescriptorDictionary::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 SkPdfFontDescriptorDictionary::has_Type() const {
14 return get("Type", "") != NULL;
15 }
16
17 SkString SkPdfFontDescriptorDictionary::FontName(SkPdfNativeDoc* doc) {
18 SkPdfNativeObject* ret = get("FontName", "");
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 SkPdfFontDescriptorDictionary::has_FontName() const {
26 return get("FontName", "") != NULL;
27 }
28
29 int64_t SkPdfFontDescriptorDictionary::Flags(SkPdfNativeDoc* doc) {
30 SkPdfNativeObject* ret = get("Flags", "");
31 if (doc) {ret = doc->resolveReference(ret);}
32 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->intValue();
33 // TODO(edisonn): warn about missing required field, assert for known good pdf s
34 return 0;
35 }
36
37 bool SkPdfFontDescriptorDictionary::has_Flags() const {
38 return get("Flags", "") != NULL;
39 }
40
41 SkRect SkPdfFontDescriptorDictionary::FontBBox(SkPdfNativeDoc* doc) {
42 SkPdfNativeObject* ret = get("FontBBox", "");
43 if (doc) {ret = doc->resolveReference(ret);}
44 if ((ret != NULL && ret->isRectangle()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->rectangleValue();
45 // TODO(edisonn): warn about missing required field, assert for known good pdf s
46 return SkRect::MakeEmpty();
47 }
48
49 bool SkPdfFontDescriptorDictionary::has_FontBBox() const {
50 return get("FontBBox", "") != NULL;
51 }
52
53 double SkPdfFontDescriptorDictionary::ItalicAngle(SkPdfNativeDoc* doc) {
54 SkPdfNativeObject* ret = get("ItalicAngle", "");
55 if (doc) {ret = doc->resolveReference(ret);}
56 if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->is Reference())) return ret->numberValue();
57 // TODO(edisonn): warn about missing required field, assert for known good pdf s
58 return 0;
59 }
60
61 bool SkPdfFontDescriptorDictionary::has_ItalicAngle() const {
62 return get("ItalicAngle", "") != NULL;
63 }
64
65 double SkPdfFontDescriptorDictionary::Ascent(SkPdfNativeDoc* doc) {
66 SkPdfNativeObject* ret = get("Ascent", "");
67 if (doc) {ret = doc->resolveReference(ret);}
68 if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->is Reference())) return ret->numberValue();
69 // TODO(edisonn): warn about missing required field, assert for known good pdf s
70 return 0;
71 }
72
73 bool SkPdfFontDescriptorDictionary::has_Ascent() const {
74 return get("Ascent", "") != NULL;
75 }
76
77 double SkPdfFontDescriptorDictionary::Descent(SkPdfNativeDoc* doc) {
78 SkPdfNativeObject* ret = get("Descent", "");
79 if (doc) {ret = doc->resolveReference(ret);}
80 if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->is Reference())) return ret->numberValue();
81 // TODO(edisonn): warn about missing required field, assert for known good pdf s
82 return 0;
83 }
84
85 bool SkPdfFontDescriptorDictionary::has_Descent() const {
86 return get("Descent", "") != NULL;
87 }
88
89 double SkPdfFontDescriptorDictionary::Leading(SkPdfNativeDoc* doc) {
90 SkPdfNativeObject* ret = get("Leading", "");
91 if (doc) {ret = doc->resolveReference(ret);}
92 if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->is Reference())) return ret->numberValue();
93 // TODO(edisonn): warn about missing default value for optional fields
94 return 0;
95 }
96
97 bool SkPdfFontDescriptorDictionary::has_Leading() const {
98 return get("Leading", "") != NULL;
99 }
100
101 double SkPdfFontDescriptorDictionary::CapHeight(SkPdfNativeDoc* doc) {
102 SkPdfNativeObject* ret = get("CapHeight", "");
103 if (doc) {ret = doc->resolveReference(ret);}
104 if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->is Reference())) return ret->numberValue();
105 // TODO(edisonn): warn about missing required field, assert for known good pdf s
106 return 0;
107 }
108
109 bool SkPdfFontDescriptorDictionary::has_CapHeight() const {
110 return get("CapHeight", "") != NULL;
111 }
112
113 double SkPdfFontDescriptorDictionary::XHeight(SkPdfNativeDoc* doc) {
114 SkPdfNativeObject* ret = get("XHeight", "");
115 if (doc) {ret = doc->resolveReference(ret);}
116 if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->is Reference())) return ret->numberValue();
117 // TODO(edisonn): warn about missing default value for optional fields
118 return 0;
119 }
120
121 bool SkPdfFontDescriptorDictionary::has_XHeight() const {
122 return get("XHeight", "") != NULL;
123 }
124
125 double SkPdfFontDescriptorDictionary::StemV(SkPdfNativeDoc* doc) {
126 SkPdfNativeObject* ret = get("StemV", "");
127 if (doc) {ret = doc->resolveReference(ret);}
128 if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->is Reference())) return ret->numberValue();
129 // TODO(edisonn): warn about missing required field, assert for known good pdf s
130 return 0;
131 }
132
133 bool SkPdfFontDescriptorDictionary::has_StemV() const {
134 return get("StemV", "") != NULL;
135 }
136
137 double SkPdfFontDescriptorDictionary::StemH(SkPdfNativeDoc* doc) {
138 SkPdfNativeObject* ret = get("StemH", "");
139 if (doc) {ret = doc->resolveReference(ret);}
140 if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->is Reference())) return ret->numberValue();
141 // TODO(edisonn): warn about missing default value for optional fields
142 return 0;
143 }
144
145 bool SkPdfFontDescriptorDictionary::has_StemH() const {
146 return get("StemH", "") != NULL;
147 }
148
149 double SkPdfFontDescriptorDictionary::AvgWidth(SkPdfNativeDoc* doc) {
150 SkPdfNativeObject* ret = get("AvgWidth", "");
151 if (doc) {ret = doc->resolveReference(ret);}
152 if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->is Reference())) return ret->numberValue();
153 // TODO(edisonn): warn about missing default value for optional fields
154 return 0;
155 }
156
157 bool SkPdfFontDescriptorDictionary::has_AvgWidth() const {
158 return get("AvgWidth", "") != NULL;
159 }
160
161 double SkPdfFontDescriptorDictionary::MaxWidth(SkPdfNativeDoc* doc) {
162 SkPdfNativeObject* ret = get("MaxWidth", "");
163 if (doc) {ret = doc->resolveReference(ret);}
164 if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->is Reference())) return ret->numberValue();
165 // TODO(edisonn): warn about missing default value for optional fields
166 return 0;
167 }
168
169 bool SkPdfFontDescriptorDictionary::has_MaxWidth() const {
170 return get("MaxWidth", "") != NULL;
171 }
172
173 double SkPdfFontDescriptorDictionary::MissingWidth(SkPdfNativeDoc* doc) {
174 SkPdfNativeObject* ret = get("MissingWidth", "");
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 SkPdfFontDescriptorDictionary::has_MissingWidth() const {
182 return get("MissingWidth", "") != NULL;
183 }
184
185 SkPdfStream* SkPdfFontDescriptorDictionary::FontFile(SkPdfNativeDoc* doc) {
186 SkPdfNativeObject* ret = get("FontFile", "");
187 if (doc) {ret = doc->resolveReference(ret);}
188 if ((ret != NULL && ret->hasStream()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->getStream();
189 // TODO(edisonn): warn about missing default value for optional fields
190 return NULL;
191 }
192
193 bool SkPdfFontDescriptorDictionary::has_FontFile() const {
194 return get("FontFile", "") != NULL;
195 }
196
197 SkPdfStream* SkPdfFontDescriptorDictionary::FontFile2(SkPdfNativeDoc* doc) {
198 SkPdfNativeObject* ret = get("FontFile2", "");
199 if (doc) {ret = doc->resolveReference(ret);}
200 if ((ret != NULL && ret->hasStream()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->getStream();
201 // TODO(edisonn): warn about missing default value for optional fields
202 return NULL;
203 }
204
205 bool SkPdfFontDescriptorDictionary::has_FontFile2() const {
206 return get("FontFile2", "") != NULL;
207 }
208
209 SkPdfStream* SkPdfFontDescriptorDictionary::FontFile3(SkPdfNativeDoc* doc) {
210 SkPdfNativeObject* ret = get("FontFile3", "");
211 if (doc) {ret = doc->resolveReference(ret);}
212 if ((ret != NULL && ret->hasStream()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->getStream();
213 // TODO(edisonn): warn about missing default value for optional fields
214 return NULL;
215 }
216
217 bool SkPdfFontDescriptorDictionary::has_FontFile3() const {
218 return get("FontFile3", "") != NULL;
219 }
220
221 SkString SkPdfFontDescriptorDictionary::CharSet(SkPdfNativeDoc* doc) {
222 SkPdfNativeObject* ret = get("CharSet", "");
223 if (doc) {ret = doc->resolveReference(ret);}
224 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
225 // TODO(edisonn): warn about missing default value for optional fields
226 return SkString();
227 }
228
229 bool SkPdfFontDescriptorDictionary::has_CharSet() const {
230 return get("CharSet", "") != NULL;
231 }
232
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698