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

Side by Side Diff: experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfJavascriptDictionary_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 "SkPdfJavascriptDictionary_autogen.h"
2
3
4 #include "SkPdfNativeDoc.h"
5 bool SkPdfJavascriptDictionary::isBeforeAString(SkPdfNativeDoc* doc) {
6 SkPdfNativeObject* ret = get("Before", "");
7 if (doc) {ret = doc->resolveReference(ret);}
8 return ret != NULL && ret->isAnyString();
9 }
10
11 SkString SkPdfJavascriptDictionary::getBeforeAsString(SkPdfNativeDoc* doc) {
12 SkPdfNativeObject* ret = get("Before", "");
13 if (doc) {ret = doc->resolveReference(ret);}
14 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
15 // TODO(edisonn): warn about missing default value for optional fields
16 return SkString();
17 }
18
19 bool SkPdfJavascriptDictionary::isBeforeAStream(SkPdfNativeDoc* doc) {
20 SkPdfNativeObject* ret = get("Before", "");
21 if (doc) {ret = doc->resolveReference(ret);}
22 return ret != NULL && ret->hasStream();
23 }
24
25 SkPdfStream* SkPdfJavascriptDictionary::getBeforeAsStream(SkPdfNativeDoc* doc) {
26 SkPdfNativeObject* ret = get("Before", "");
27 if (doc) {ret = doc->resolveReference(ret);}
28 if ((ret != NULL && ret->hasStream()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->getStream();
29 // TODO(edisonn): warn about missing default value for optional fields
30 return NULL;
31 }
32
33 bool SkPdfJavascriptDictionary::has_Before() const {
34 return get("Before", "") != NULL;
35 }
36
37 bool SkPdfJavascriptDictionary::isAfterAString(SkPdfNativeDoc* doc) {
38 SkPdfNativeObject* ret = get("After", "");
39 if (doc) {ret = doc->resolveReference(ret);}
40 return ret != NULL && ret->isAnyString();
41 }
42
43 SkString SkPdfJavascriptDictionary::getAfterAsString(SkPdfNativeDoc* doc) {
44 SkPdfNativeObject* ret = get("After", "");
45 if (doc) {ret = doc->resolveReference(ret);}
46 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
47 // TODO(edisonn): warn about missing default value for optional fields
48 return SkString();
49 }
50
51 bool SkPdfJavascriptDictionary::isAfterAStream(SkPdfNativeDoc* doc) {
52 SkPdfNativeObject* ret = get("After", "");
53 if (doc) {ret = doc->resolveReference(ret);}
54 return ret != NULL && ret->hasStream();
55 }
56
57 SkPdfStream* SkPdfJavascriptDictionary::getAfterAsStream(SkPdfNativeDoc* doc) {
58 SkPdfNativeObject* ret = get("After", "");
59 if (doc) {ret = doc->resolveReference(ret);}
60 if ((ret != NULL && ret->hasStream()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->getStream();
61 // TODO(edisonn): warn about missing default value for optional fields
62 return NULL;
63 }
64
65 bool SkPdfJavascriptDictionary::has_After() const {
66 return get("After", "") != NULL;
67 }
68
69 SkPdfArray* SkPdfJavascriptDictionary::Doc(SkPdfNativeDoc* doc) {
70 SkPdfNativeObject* ret = get("Doc", "");
71 if (doc) {ret = doc->resolveReference(ret);}
72 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR eference())) return (SkPdfArray*)ret;
73 // TODO(edisonn): warn about missing default value for optional fields
74 return NULL;
75 }
76
77 bool SkPdfJavascriptDictionary::has_Doc() const {
78 return get("Doc", "") != NULL;
79 }
80
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698