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

Side by Side Diff: experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfCIDFontDictionary_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 "SkPdfCIDFontDictionary_autogen.h"
2
3
4 #include "SkPdfNativeDoc.h"
5 SkString SkPdfCIDFontDictionary::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 SkPdfCIDFontDictionary::has_Type() const {
14 return get("Type", "") != NULL;
15 }
16
17 SkString SkPdfCIDFontDictionary::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 SkPdfCIDFontDictionary::has_Subtype() const {
26 return get("Subtype", "") != NULL;
27 }
28
29 SkString SkPdfCIDFontDictionary::BaseFont(SkPdfNativeDoc* doc) {
30 SkPdfNativeObject* ret = get("BaseFont", "");
31 if (doc) {ret = doc->resolveReference(ret);}
32 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->nameValue2();
33 // TODO(edisonn): warn about missing required field, assert for known good pdf s
34 return SkString();
35 }
36
37 bool SkPdfCIDFontDictionary::has_BaseFont() const {
38 return get("BaseFont", "") != NULL;
39 }
40
41 SkPdfDictionary* SkPdfCIDFontDictionary::CIDSystemInfo(SkPdfNativeDoc* doc) {
42 SkPdfNativeObject* ret = get("CIDSystemInfo", "");
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 required field, assert for known good pdf s
46 return NULL;
47 }
48
49 bool SkPdfCIDFontDictionary::has_CIDSystemInfo() const {
50 return get("CIDSystemInfo", "") != NULL;
51 }
52
53 SkPdfFontDescriptorDictionary* SkPdfCIDFontDictionary::FontDescriptor(SkPdfNativ eDoc* doc) {
54 SkPdfNativeObject* ret = get("FontDescriptor", "");
55 if (doc) {ret = doc->resolveReference(ret);}
56 if ((ret != NULL && ret->isDictionary() && ((SkPdfFontDescriptorDictionary*)re t)->valid()) || (doc == NULL && ret != NULL && ret->isReference())) return (SkPd fFontDescriptorDictionary*)ret;
57 // TODO(edisonn): warn about missing default value for optional fields
58 return NULL;
59 }
60
61 bool SkPdfCIDFontDictionary::has_FontDescriptor() const {
62 return get("FontDescriptor", "") != NULL;
63 }
64
65 int64_t SkPdfCIDFontDictionary::DW(SkPdfNativeDoc* doc) {
66 SkPdfNativeObject* ret = get("DW", "");
67 if (doc) {ret = doc->resolveReference(ret);}
68 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->intValue();
69 // TODO(edisonn): warn about missing default value for optional fields
70 return 0;
71 }
72
73 bool SkPdfCIDFontDictionary::has_DW() const {
74 return get("DW", "") != NULL;
75 }
76
77 SkPdfArray* SkPdfCIDFontDictionary::W(SkPdfNativeDoc* doc) {
78 SkPdfNativeObject* ret = get("W", "");
79 if (doc) {ret = doc->resolveReference(ret);}
80 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR eference())) return (SkPdfArray*)ret;
81 // TODO(edisonn): warn about missing default value for optional fields
82 return NULL;
83 }
84
85 bool SkPdfCIDFontDictionary::has_W() const {
86 return get("W", "") != NULL;
87 }
88
89 SkPdfArray* SkPdfCIDFontDictionary::DW2(SkPdfNativeDoc* doc) {
90 SkPdfNativeObject* ret = get("DW2", "");
91 if (doc) {ret = doc->resolveReference(ret);}
92 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR eference())) return (SkPdfArray*)ret;
93 // TODO(edisonn): warn about missing default value for optional fields
94 return NULL;
95 }
96
97 bool SkPdfCIDFontDictionary::has_DW2() const {
98 return get("DW2", "") != NULL;
99 }
100
101 SkPdfArray* SkPdfCIDFontDictionary::W2(SkPdfNativeDoc* doc) {
102 SkPdfNativeObject* ret = get("W2", "");
103 if (doc) {ret = doc->resolveReference(ret);}
104 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR eference())) return (SkPdfArray*)ret;
105 // TODO(edisonn): warn about missing default value for optional fields
106 return NULL;
107 }
108
109 bool SkPdfCIDFontDictionary::has_W2() const {
110 return get("W2", "") != NULL;
111 }
112
113 bool SkPdfCIDFontDictionary::isCIDToGIDMapAStream(SkPdfNativeDoc* doc) {
114 SkPdfNativeObject* ret = get("CIDToGIDMap", "");
115 if (doc) {ret = doc->resolveReference(ret);}
116 return ret != NULL && ret->hasStream();
117 }
118
119 SkPdfStream* SkPdfCIDFontDictionary::getCIDToGIDMapAsStream(SkPdfNativeDoc* doc) {
120 SkPdfNativeObject* ret = get("CIDToGIDMap", "");
121 if (doc) {ret = doc->resolveReference(ret);}
122 if ((ret != NULL && ret->hasStream()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->getStream();
123 // TODO(edisonn): warn about missing default value for optional fields
124 return NULL;
125 }
126
127 bool SkPdfCIDFontDictionary::isCIDToGIDMapAName(SkPdfNativeDoc* doc) {
128 SkPdfNativeObject* ret = get("CIDToGIDMap", "");
129 if (doc) {ret = doc->resolveReference(ret);}
130 return ret != NULL && ret->isName();
131 }
132
133 SkString SkPdfCIDFontDictionary::getCIDToGIDMapAsName(SkPdfNativeDoc* doc) {
134 SkPdfNativeObject* ret = get("CIDToGIDMap", "");
135 if (doc) {ret = doc->resolveReference(ret);}
136 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->nameValue2();
137 // TODO(edisonn): warn about missing default value for optional fields
138 return SkString();
139 }
140
141 bool SkPdfCIDFontDictionary::has_CIDToGIDMap() const {
142 return get("CIDToGIDMap", "") != NULL;
143 }
144
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698