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

Side by Side Diff: experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfJavascriptDictionary_autogen.cpp

Issue 1266093003: Remove experimental/PdfViewer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-03 (Monday) 10:43:56 EDT Created 5 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
OLDNEW
(Empty)
1 /*
2 * Copyright 2013 Google Inc.
3
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #include "SkPdfJavascriptDictionary_autogen.h"
9 #include "SkPdfNativeDoc.h"
10
11 bool SkPdfJavascriptDictionary::isBeforeAString(SkPdfNativeDoc* doc) {
12 SkPdfNativeObject* ret = get("Before", "");
13 if (doc) {ret = doc->resolveReference(ret);}
14 return ret != NULL && ret->isAnyString();
15 }
16
17 SkString SkPdfJavascriptDictionary::getBeforeAsString(SkPdfNativeDoc* doc) {
18 SkPdfNativeObject* ret = get("Before", "");
19 if (doc) {ret = doc->resolveReference(ret);}
20 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
21 // TODO(edisonn): warn about missing default value for optional fields
22 return SkString();
23 }
24
25 bool SkPdfJavascriptDictionary::isBeforeAStream(SkPdfNativeDoc* doc) {
26 SkPdfNativeObject* ret = get("Before", "");
27 if (doc) {ret = doc->resolveReference(ret);}
28 return ret != NULL && ret->hasStream();
29 }
30
31 SkPdfStream* SkPdfJavascriptDictionary::getBeforeAsStream(SkPdfNativeDoc* doc) {
32 SkPdfNativeObject* ret = get("Before", "");
33 if (doc) {ret = doc->resolveReference(ret);}
34 if ((ret != NULL && ret->hasStream()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->getStream();
35 // TODO(edisonn): warn about missing default value for optional fields
36 return NULL;
37 }
38
39 bool SkPdfJavascriptDictionary::has_Before() const {
40 return get("Before", "") != NULL;
41 }
42
43 bool SkPdfJavascriptDictionary::isAfterAString(SkPdfNativeDoc* doc) {
44 SkPdfNativeObject* ret = get("After", "");
45 if (doc) {ret = doc->resolveReference(ret);}
46 return ret != NULL && ret->isAnyString();
47 }
48
49 SkString SkPdfJavascriptDictionary::getAfterAsString(SkPdfNativeDoc* doc) {
50 SkPdfNativeObject* ret = get("After", "");
51 if (doc) {ret = doc->resolveReference(ret);}
52 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
53 // TODO(edisonn): warn about missing default value for optional fields
54 return SkString();
55 }
56
57 bool SkPdfJavascriptDictionary::isAfterAStream(SkPdfNativeDoc* doc) {
58 SkPdfNativeObject* ret = get("After", "");
59 if (doc) {ret = doc->resolveReference(ret);}
60 return ret != NULL && ret->hasStream();
61 }
62
63 SkPdfStream* SkPdfJavascriptDictionary::getAfterAsStream(SkPdfNativeDoc* doc) {
64 SkPdfNativeObject* ret = get("After", "");
65 if (doc) {ret = doc->resolveReference(ret);}
66 if ((ret != NULL && ret->hasStream()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->getStream();
67 // TODO(edisonn): warn about missing default value for optional fields
68 return NULL;
69 }
70
71 bool SkPdfJavascriptDictionary::has_After() const {
72 return get("After", "") != NULL;
73 }
74
75 SkPdfArray* SkPdfJavascriptDictionary::Doc(SkPdfNativeDoc* doc) {
76 SkPdfNativeObject* ret = get("Doc", "");
77 if (doc) {ret = doc->resolveReference(ret);}
78 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR eference())) return (SkPdfArray*)ret;
79 // TODO(edisonn): warn about missing default value for optional fields
80 return NULL;
81 }
82
83 bool SkPdfJavascriptDictionary::has_Doc() const {
84 return get("Doc", "") != NULL;
85 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698