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

Side by Side Diff: experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfJavascriptActionDictionary_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 "SkPdfJavascriptActionDictionary_autogen.h"
2
3
4 #include "SkPdfNativeDoc.h"
5 SkString SkPdfJavascriptActionDictionary::S(SkPdfNativeDoc* doc) {
6 SkPdfNativeObject* ret = get("S", "");
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 SkPdfJavascriptActionDictionary::has_S() const {
14 return get("S", "") != NULL;
15 }
16
17 bool SkPdfJavascriptActionDictionary::isJSAString(SkPdfNativeDoc* doc) {
18 SkPdfNativeObject* ret = get("JS", "");
19 if (doc) {ret = doc->resolveReference(ret);}
20 return ret != NULL && ret->isAnyString();
21 }
22
23 SkString SkPdfJavascriptActionDictionary::getJSAsString(SkPdfNativeDoc* doc) {
24 SkPdfNativeObject* ret = get("JS", "");
25 if (doc) {ret = doc->resolveReference(ret);}
26 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
27 // TODO(edisonn): warn about missing required field, assert for known good pdf s
28 return SkString();
29 }
30
31 bool SkPdfJavascriptActionDictionary::isJSAStream(SkPdfNativeDoc* doc) {
32 SkPdfNativeObject* ret = get("JS", "");
33 if (doc) {ret = doc->resolveReference(ret);}
34 return ret != NULL && ret->hasStream();
35 }
36
37 SkPdfStream* SkPdfJavascriptActionDictionary::getJSAsStream(SkPdfNativeDoc* doc) {
38 SkPdfNativeObject* ret = get("JS", "");
39 if (doc) {ret = doc->resolveReference(ret);}
40 if ((ret != NULL && ret->hasStream()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->getStream();
41 // TODO(edisonn): warn about missing required field, assert for known good pdf s
42 return NULL;
43 }
44
45 bool SkPdfJavascriptActionDictionary::has_JS() const {
46 return get("JS", "") != NULL;
47 }
48
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698