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

Side by Side Diff: experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfWebCaptureCommandDictionary_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 "SkPdfWebCaptureCommandDictionary_autogen.h"
2
3
4 #include "SkPdfNativeDoc.h"
5 SkString SkPdfWebCaptureCommandDictionary::URL(SkPdfNativeDoc* doc) {
6 SkPdfNativeObject* ret = get("URL", "");
7 if (doc) {ret = doc->resolveReference(ret);}
8 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
9 // TODO(edisonn): warn about missing required field, assert for known good pdf s
10 return SkString();
11 }
12
13 bool SkPdfWebCaptureCommandDictionary::has_URL() const {
14 return get("URL", "") != NULL;
15 }
16
17 int64_t SkPdfWebCaptureCommandDictionary::L(SkPdfNativeDoc* doc) {
18 SkPdfNativeObject* ret = get("L", "");
19 if (doc) {ret = doc->resolveReference(ret);}
20 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->intValue();
21 // TODO(edisonn): warn about missing default value for optional fields
22 return 0;
23 }
24
25 bool SkPdfWebCaptureCommandDictionary::has_L() const {
26 return get("L", "") != NULL;
27 }
28
29 int64_t SkPdfWebCaptureCommandDictionary::F(SkPdfNativeDoc* doc) {
30 SkPdfNativeObject* ret = get("F", "");
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 default value for optional fields
34 return 0;
35 }
36
37 bool SkPdfWebCaptureCommandDictionary::has_F() const {
38 return get("F", "") != NULL;
39 }
40
41 bool SkPdfWebCaptureCommandDictionary::isPAString(SkPdfNativeDoc* doc) {
42 SkPdfNativeObject* ret = get("P", "");
43 if (doc) {ret = doc->resolveReference(ret);}
44 return ret != NULL && ret->isAnyString();
45 }
46
47 SkString SkPdfWebCaptureCommandDictionary::getPAsString(SkPdfNativeDoc* doc) {
48 SkPdfNativeObject* ret = get("P", "");
49 if (doc) {ret = doc->resolveReference(ret);}
50 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
51 // TODO(edisonn): warn about missing default value for optional fields
52 return SkString();
53 }
54
55 bool SkPdfWebCaptureCommandDictionary::isPAStream(SkPdfNativeDoc* doc) {
56 SkPdfNativeObject* ret = get("P", "");
57 if (doc) {ret = doc->resolveReference(ret);}
58 return ret != NULL && ret->hasStream();
59 }
60
61 SkPdfStream* SkPdfWebCaptureCommandDictionary::getPAsStream(SkPdfNativeDoc* doc) {
62 SkPdfNativeObject* ret = get("P", "");
63 if (doc) {ret = doc->resolveReference(ret);}
64 if ((ret != NULL && ret->hasStream()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->getStream();
65 // TODO(edisonn): warn about missing default value for optional fields
66 return NULL;
67 }
68
69 bool SkPdfWebCaptureCommandDictionary::has_P() const {
70 return get("P", "") != NULL;
71 }
72
73 SkString SkPdfWebCaptureCommandDictionary::CT(SkPdfNativeDoc* doc) {
74 SkPdfNativeObject* ret = get("CT", "");
75 if (doc) {ret = doc->resolveReference(ret);}
76 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
77 // TODO(edisonn): warn about missing default value for optional fields
78 return SkString();
79 }
80
81 bool SkPdfWebCaptureCommandDictionary::has_CT() const {
82 return get("CT", "") != NULL;
83 }
84
85 SkString SkPdfWebCaptureCommandDictionary::H(SkPdfNativeDoc* doc) {
86 SkPdfNativeObject* ret = get("H", "");
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 SkPdfWebCaptureCommandDictionary::has_H() const {
94 return get("H", "") != NULL;
95 }
96
97 SkPdfDictionary* SkPdfWebCaptureCommandDictionary::S(SkPdfNativeDoc* doc) {
98 SkPdfNativeObject* ret = get("S", "");
99 if (doc) {ret = doc->resolveReference(ret);}
100 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
101 // TODO(edisonn): warn about missing default value for optional fields
102 return NULL;
103 }
104
105 bool SkPdfWebCaptureCommandDictionary::has_S() const {
106 return get("S", "") != NULL;
107 }
108
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698