OLD | NEW |
| (Empty) |
1 /* | |
2 * Copyright 2013 Google Inc. | |
3 | |
4 * Use of this source code is governed by a BSD-style license that can be | |
5 * found in the LICENSE file. | |
6 */ | |
7 | |
8 #include "SkPdfFDFFieldDictionary_autogen.h" | |
9 #include "SkPdfNativeDoc.h" | |
10 | |
11 SkPdfArray* SkPdfFDFFieldDictionary::Kids(SkPdfNativeDoc* doc) { | |
12 SkPdfNativeObject* ret = get("Kids", ""); | |
13 if (doc) {ret = doc->resolveReference(ret);} | |
14 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR
eference())) return (SkPdfArray*)ret; | |
15 // TODO(edisonn): warn about missing default value for optional fields | |
16 return NULL; | |
17 } | |
18 | |
19 bool SkPdfFDFFieldDictionary::has_Kids() const { | |
20 return get("Kids", "") != NULL; | |
21 } | |
22 | |
23 SkString SkPdfFDFFieldDictionary::T(SkPdfNativeDoc* doc) { | |
24 SkPdfNativeObject* ret = get("T", ""); | |
25 if (doc) {ret = doc->resolveReference(ret);} | |
26 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret-
>isReference())) return ret->stringValue2(); | |
27 // TODO(edisonn): warn about missing required field, assert for known good pdf
s | |
28 return SkString(); | |
29 } | |
30 | |
31 bool SkPdfFDFFieldDictionary::has_T() const { | |
32 return get("T", "") != NULL; | |
33 } | |
34 | |
35 SkPdfNativeObject* SkPdfFDFFieldDictionary::V(SkPdfNativeDoc* doc) { | |
36 SkPdfNativeObject* ret = get("V", ""); | |
37 if (doc) {ret = doc->resolveReference(ret);} | |
38 if ((ret != NULL && true) || (doc == NULL && ret != NULL && ret->isReference()
)) return ret; | |
39 // TODO(edisonn): warn about missing default value for optional fields | |
40 return NULL; | |
41 } | |
42 | |
43 bool SkPdfFDFFieldDictionary::has_V() const { | |
44 return get("V", "") != NULL; | |
45 } | |
46 | |
47 int64_t SkPdfFDFFieldDictionary::Ff(SkPdfNativeDoc* doc) { | |
48 SkPdfNativeObject* ret = get("Ff", ""); | |
49 if (doc) {ret = doc->resolveReference(ret);} | |
50 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->intValue(); | |
51 // TODO(edisonn): warn about missing default value for optional fields | |
52 return 0; | |
53 } | |
54 | |
55 bool SkPdfFDFFieldDictionary::has_Ff() const { | |
56 return get("Ff", "") != NULL; | |
57 } | |
58 | |
59 int64_t SkPdfFDFFieldDictionary::SetFf(SkPdfNativeDoc* doc) { | |
60 SkPdfNativeObject* ret = get("SetFf", ""); | |
61 if (doc) {ret = doc->resolveReference(ret);} | |
62 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->intValue(); | |
63 // TODO(edisonn): warn about missing default value for optional fields | |
64 return 0; | |
65 } | |
66 | |
67 bool SkPdfFDFFieldDictionary::has_SetFf() const { | |
68 return get("SetFf", "") != NULL; | |
69 } | |
70 | |
71 int64_t SkPdfFDFFieldDictionary::ClrFf(SkPdfNativeDoc* doc) { | |
72 SkPdfNativeObject* ret = get("ClrFf", ""); | |
73 if (doc) {ret = doc->resolveReference(ret);} | |
74 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->intValue(); | |
75 // TODO(edisonn): warn about missing default value for optional fields | |
76 return 0; | |
77 } | |
78 | |
79 bool SkPdfFDFFieldDictionary::has_ClrFf() const { | |
80 return get("ClrFf", "") != NULL; | |
81 } | |
82 | |
83 int64_t SkPdfFDFFieldDictionary::F(SkPdfNativeDoc* doc) { | |
84 SkPdfNativeObject* ret = get("F", ""); | |
85 if (doc) {ret = doc->resolveReference(ret);} | |
86 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->intValue(); | |
87 // TODO(edisonn): warn about missing default value for optional fields | |
88 return 0; | |
89 } | |
90 | |
91 bool SkPdfFDFFieldDictionary::has_F() const { | |
92 return get("F", "") != NULL; | |
93 } | |
94 | |
95 int64_t SkPdfFDFFieldDictionary::SetF(SkPdfNativeDoc* doc) { | |
96 SkPdfNativeObject* ret = get("SetF", ""); | |
97 if (doc) {ret = doc->resolveReference(ret);} | |
98 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->intValue(); | |
99 // TODO(edisonn): warn about missing default value for optional fields | |
100 return 0; | |
101 } | |
102 | |
103 bool SkPdfFDFFieldDictionary::has_SetF() const { | |
104 return get("SetF", "") != NULL; | |
105 } | |
106 | |
107 int64_t SkPdfFDFFieldDictionary::ClrF(SkPdfNativeDoc* doc) { | |
108 SkPdfNativeObject* ret = get("ClrF", ""); | |
109 if (doc) {ret = doc->resolveReference(ret);} | |
110 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->intValue(); | |
111 // TODO(edisonn): warn about missing default value for optional fields | |
112 return 0; | |
113 } | |
114 | |
115 bool SkPdfFDFFieldDictionary::has_ClrF() const { | |
116 return get("ClrF", "") != NULL; | |
117 } | |
118 | |
119 SkPdfDictionary* SkPdfFDFFieldDictionary::AP(SkPdfNativeDoc* doc) { | |
120 SkPdfNativeObject* ret = get("AP", ""); | |
121 if (doc) {ret = doc->resolveReference(ret);} | |
122 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret
->isReference())) return (SkPdfDictionary*)ret; | |
123 // TODO(edisonn): warn about missing default value for optional fields | |
124 return NULL; | |
125 } | |
126 | |
127 bool SkPdfFDFFieldDictionary::has_AP() const { | |
128 return get("AP", "") != NULL; | |
129 } | |
130 | |
131 SkPdfDictionary* SkPdfFDFFieldDictionary::APRef(SkPdfNativeDoc* doc) { | |
132 SkPdfNativeObject* ret = get("APRef", ""); | |
133 if (doc) {ret = doc->resolveReference(ret);} | |
134 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret
->isReference())) return (SkPdfDictionary*)ret; | |
135 // TODO(edisonn): warn about missing default value for optional fields | |
136 return NULL; | |
137 } | |
138 | |
139 bool SkPdfFDFFieldDictionary::has_APRef() const { | |
140 return get("APRef", "") != NULL; | |
141 } | |
142 | |
143 SkPdfDictionary* SkPdfFDFFieldDictionary::IF(SkPdfNativeDoc* doc) { | |
144 SkPdfNativeObject* ret = get("IF", ""); | |
145 if (doc) {ret = doc->resolveReference(ret);} | |
146 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret
->isReference())) return (SkPdfDictionary*)ret; | |
147 // TODO(edisonn): warn about missing default value for optional fields | |
148 return NULL; | |
149 } | |
150 | |
151 bool SkPdfFDFFieldDictionary::has_IF() const { | |
152 return get("IF", "") != NULL; | |
153 } | |
154 | |
155 SkPdfArray* SkPdfFDFFieldDictionary::Opt(SkPdfNativeDoc* doc) { | |
156 SkPdfNativeObject* ret = get("Opt", ""); | |
157 if (doc) {ret = doc->resolveReference(ret);} | |
158 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR
eference())) return (SkPdfArray*)ret; | |
159 // TODO(edisonn): warn about missing default value for optional fields | |
160 return NULL; | |
161 } | |
162 | |
163 bool SkPdfFDFFieldDictionary::has_Opt() const { | |
164 return get("Opt", "") != NULL; | |
165 } | |
166 | |
167 SkPdfDictionary* SkPdfFDFFieldDictionary::A(SkPdfNativeDoc* doc) { | |
168 SkPdfNativeObject* ret = get("A", ""); | |
169 if (doc) {ret = doc->resolveReference(ret);} | |
170 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret
->isReference())) return (SkPdfDictionary*)ret; | |
171 // TODO(edisonn): warn about missing default value for optional fields | |
172 return NULL; | |
173 } | |
174 | |
175 bool SkPdfFDFFieldDictionary::has_A() const { | |
176 return get("A", "") != NULL; | |
177 } | |
178 | |
179 SkPdfDictionary* SkPdfFDFFieldDictionary::AA(SkPdfNativeDoc* doc) { | |
180 SkPdfNativeObject* ret = get("AA", ""); | |
181 if (doc) {ret = doc->resolveReference(ret);} | |
182 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret
->isReference())) return (SkPdfDictionary*)ret; | |
183 // TODO(edisonn): warn about missing default value for optional fields | |
184 return NULL; | |
185 } | |
186 | |
187 bool SkPdfFDFFieldDictionary::has_AA() const { | |
188 return get("AA", "") != NULL; | |
189 } | |
OLD | NEW |