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

Side by Side Diff: experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfWebCaptureDictionary_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 "SkPdfWebCaptureDictionary_autogen.h"
2
3
4 #include "SkPdfNativeDoc.h"
5 SkString SkPdfWebCaptureDictionary::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 SkPdfWebCaptureDictionary::has_Type() const {
14 return get("Type", "") != NULL;
15 }
16
17 SkString SkPdfWebCaptureDictionary::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 SkPdfWebCaptureDictionary::has_S() const {
26 return get("S", "") != NULL;
27 }
28
29 SkString SkPdfWebCaptureDictionary::ID(SkPdfNativeDoc* doc) {
30 SkPdfNativeObject* ret = get("ID", "");
31 if (doc) {ret = doc->resolveReference(ret);}
32 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
33 // TODO(edisonn): warn about missing required field, assert for known good pdf s
34 return SkString();
35 }
36
37 bool SkPdfWebCaptureDictionary::has_ID() const {
38 return get("ID", "") != NULL;
39 }
40
41 SkPdfArray* SkPdfWebCaptureDictionary::O(SkPdfNativeDoc* doc) {
42 SkPdfNativeObject* ret = get("O", "");
43 if (doc) {ret = doc->resolveReference(ret);}
44 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR eference())) return (SkPdfArray*)ret;
45 // TODO(edisonn): warn about missing required field, assert for known good pdf s
46 return NULL;
47 }
48
49 bool SkPdfWebCaptureDictionary::has_O() const {
50 return get("O", "") != NULL;
51 }
52
53 bool SkPdfWebCaptureDictionary::isSIADictionary(SkPdfNativeDoc* doc) {
54 SkPdfNativeObject* ret = get("SI", "");
55 if (doc) {ret = doc->resolveReference(ret);}
56 return ret != NULL && ret->isDictionary();
57 }
58
59 SkPdfDictionary* SkPdfWebCaptureDictionary::getSIAsDictionary(SkPdfNativeDoc* do c) {
60 SkPdfNativeObject* ret = get("SI", "");
61 if (doc) {ret = doc->resolveReference(ret);}
62 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
63 // TODO(edisonn): warn about missing required field, assert for known good pdf s
64 return NULL;
65 }
66
67 bool SkPdfWebCaptureDictionary::isSIAArray(SkPdfNativeDoc* doc) {
68 SkPdfNativeObject* ret = get("SI", "");
69 if (doc) {ret = doc->resolveReference(ret);}
70 return ret != NULL && ret->isArray();
71 }
72
73 SkPdfArray* SkPdfWebCaptureDictionary::getSIAsArray(SkPdfNativeDoc* doc) {
74 SkPdfNativeObject* ret = get("SI", "");
75 if (doc) {ret = doc->resolveReference(ret);}
76 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR eference())) return (SkPdfArray*)ret;
77 // TODO(edisonn): warn about missing required field, assert for known good pdf s
78 return NULL;
79 }
80
81 bool SkPdfWebCaptureDictionary::has_SI() const {
82 return get("SI", "") != NULL;
83 }
84
85 SkString SkPdfWebCaptureDictionary::CT(SkPdfNativeDoc* doc) {
86 SkPdfNativeObject* ret = get("CT", "");
87 if (doc) {ret = doc->resolveReference(ret);}
88 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
89 // TODO(edisonn): warn about missing default value for optional fields
90 return SkString();
91 }
92
93 bool SkPdfWebCaptureDictionary::has_CT() const {
94 return get("CT", "") != NULL;
95 }
96
97 SkPdfDate SkPdfWebCaptureDictionary::TS(SkPdfNativeDoc* doc) {
98 SkPdfNativeObject* ret = get("TS", "");
99 if (doc) {ret = doc->resolveReference(ret);}
100 if ((ret != NULL && ret->isDate()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->dateValue();
101 // TODO(edisonn): warn about missing default value for optional fields
102 return SkPdfDate();
103 }
104
105 bool SkPdfWebCaptureDictionary::has_TS() const {
106 return get("TS", "") != NULL;
107 }
108
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698