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

Side by Side Diff: experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfBlockLevelStructureElementsDictionary_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 "SkPdfBlockLevelStructureElementsDictionary_autogen.h"
2
3
4 #include "SkPdfNativeDoc.h"
5 double SkPdfBlockLevelStructureElementsDictionary::SpaceBefore(SkPdfNativeDoc* d oc) {
6 SkPdfNativeObject* ret = get("SpaceBefore", "");
7 if (doc) {ret = doc->resolveReference(ret);}
8 if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->is Reference())) return ret->numberValue();
9 // TODO(edisonn): warn about missing default value for optional fields
10 return 0;
11 }
12
13 bool SkPdfBlockLevelStructureElementsDictionary::has_SpaceBefore() const {
14 return get("SpaceBefore", "") != NULL;
15 }
16
17 double SkPdfBlockLevelStructureElementsDictionary::SpaceAfter(SkPdfNativeDoc* do c) {
18 SkPdfNativeObject* ret = get("SpaceAfter", "");
19 if (doc) {ret = doc->resolveReference(ret);}
20 if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->is Reference())) return ret->numberValue();
21 // TODO(edisonn): warn about missing default value for optional fields
22 return 0;
23 }
24
25 bool SkPdfBlockLevelStructureElementsDictionary::has_SpaceAfter() const {
26 return get("SpaceAfter", "") != NULL;
27 }
28
29 double SkPdfBlockLevelStructureElementsDictionary::StartIndent(SkPdfNativeDoc* d oc) {
30 SkPdfNativeObject* ret = get("StartIndent", "");
31 if (doc) {ret = doc->resolveReference(ret);}
32 if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->is Reference())) return ret->numberValue();
33 // TODO(edisonn): warn about missing default value for optional fields
34 return 0;
35 }
36
37 bool SkPdfBlockLevelStructureElementsDictionary::has_StartIndent() const {
38 return get("StartIndent", "") != NULL;
39 }
40
41 double SkPdfBlockLevelStructureElementsDictionary::EndIndent(SkPdfNativeDoc* doc ) {
42 SkPdfNativeObject* ret = get("EndIndent", "");
43 if (doc) {ret = doc->resolveReference(ret);}
44 if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->is Reference())) return ret->numberValue();
45 // TODO(edisonn): warn about missing default value for optional fields
46 return 0;
47 }
48
49 bool SkPdfBlockLevelStructureElementsDictionary::has_EndIndent() const {
50 return get("EndIndent", "") != NULL;
51 }
52
53 double SkPdfBlockLevelStructureElementsDictionary::TextIndent(SkPdfNativeDoc* do c) {
54 SkPdfNativeObject* ret = get("TextIndent", "");
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 default value for optional fields
58 return 0;
59 }
60
61 bool SkPdfBlockLevelStructureElementsDictionary::has_TextIndent() const {
62 return get("TextIndent", "") != NULL;
63 }
64
65 SkString SkPdfBlockLevelStructureElementsDictionary::TextAlign(SkPdfNativeDoc* d oc) {
66 SkPdfNativeObject* ret = get("TextAlign", "");
67 if (doc) {ret = doc->resolveReference(ret);}
68 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->nameValue2();
69 // TODO(edisonn): warn about missing default value for optional fields
70 return SkString();
71 }
72
73 bool SkPdfBlockLevelStructureElementsDictionary::has_TextAlign() const {
74 return get("TextAlign", "") != NULL;
75 }
76
77 SkRect SkPdfBlockLevelStructureElementsDictionary::BBox(SkPdfNativeDoc* doc) {
78 SkPdfNativeObject* ret = get("BBox", "");
79 if (doc) {ret = doc->resolveReference(ret);}
80 if ((ret != NULL && ret->isRectangle()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->rectangleValue();
81 // TODO(edisonn): warn about missing default value for optional fields
82 return SkRect::MakeEmpty();
83 }
84
85 bool SkPdfBlockLevelStructureElementsDictionary::has_BBox() const {
86 return get("BBox", "") != NULL;
87 }
88
89 bool SkPdfBlockLevelStructureElementsDictionary::isWidthANumber(SkPdfNativeDoc* doc) {
90 SkPdfNativeObject* ret = get("Width", "");
91 if (doc) {ret = doc->resolveReference(ret);}
92 return ret != NULL && ret->isNumber();
93 }
94
95 double SkPdfBlockLevelStructureElementsDictionary::getWidthAsNumber(SkPdfNativeD oc* doc) {
96 SkPdfNativeObject* ret = get("Width", "");
97 if (doc) {ret = doc->resolveReference(ret);}
98 if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->is Reference())) return ret->numberValue();
99 // TODO(edisonn): warn about missing default value for optional fields
100 return 0;
101 }
102
103 bool SkPdfBlockLevelStructureElementsDictionary::isWidthAName(SkPdfNativeDoc* do c) {
104 SkPdfNativeObject* ret = get("Width", "");
105 if (doc) {ret = doc->resolveReference(ret);}
106 return ret != NULL && ret->isName();
107 }
108
109 SkString SkPdfBlockLevelStructureElementsDictionary::getWidthAsName(SkPdfNativeD oc* doc) {
110 SkPdfNativeObject* ret = get("Width", "");
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 SkPdfBlockLevelStructureElementsDictionary::has_Width() const {
118 return get("Width", "") != NULL;
119 }
120
121 bool SkPdfBlockLevelStructureElementsDictionary::isHeightANumber(SkPdfNativeDoc* doc) {
122 SkPdfNativeObject* ret = get("Height", "");
123 if (doc) {ret = doc->resolveReference(ret);}
124 return ret != NULL && ret->isNumber();
125 }
126
127 double SkPdfBlockLevelStructureElementsDictionary::getHeightAsNumber(SkPdfNative Doc* doc) {
128 SkPdfNativeObject* ret = get("Height", "");
129 if (doc) {ret = doc->resolveReference(ret);}
130 if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->is Reference())) return ret->numberValue();
131 // TODO(edisonn): warn about missing default value for optional fields
132 return 0;
133 }
134
135 bool SkPdfBlockLevelStructureElementsDictionary::isHeightAName(SkPdfNativeDoc* d oc) {
136 SkPdfNativeObject* ret = get("Height", "");
137 if (doc) {ret = doc->resolveReference(ret);}
138 return ret != NULL && ret->isName();
139 }
140
141 SkString SkPdfBlockLevelStructureElementsDictionary::getHeightAsName(SkPdfNative Doc* doc) {
142 SkPdfNativeObject* ret = get("Height", "");
143 if (doc) {ret = doc->resolveReference(ret);}
144 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->nameValue2();
145 // TODO(edisonn): warn about missing default value for optional fields
146 return SkString();
147 }
148
149 bool SkPdfBlockLevelStructureElementsDictionary::has_Height() const {
150 return get("Height", "") != NULL;
151 }
152
153 SkString SkPdfBlockLevelStructureElementsDictionary::BlockAlign(SkPdfNativeDoc* doc) {
154 SkPdfNativeObject* ret = get("BlockAlign", "");
155 if (doc) {ret = doc->resolveReference(ret);}
156 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->nameValue2();
157 // TODO(edisonn): warn about missing default value for optional fields
158 return SkString();
159 }
160
161 bool SkPdfBlockLevelStructureElementsDictionary::has_BlockAlign() const {
162 return get("BlockAlign", "") != NULL;
163 }
164
165 SkString SkPdfBlockLevelStructureElementsDictionary::InlineAlign(SkPdfNativeDoc* doc) {
166 SkPdfNativeObject* ret = get("InlineAlign", "");
167 if (doc) {ret = doc->resolveReference(ret);}
168 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->nameValue2();
169 // TODO(edisonn): warn about missing default value for optional fields
170 return SkString();
171 }
172
173 bool SkPdfBlockLevelStructureElementsDictionary::has_InlineAlign() const {
174 return get("InlineAlign", "") != NULL;
175 }
176
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698