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

Side by Side Diff: experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfThreadActionDictionary_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 "SkPdfThreadActionDictionary_autogen.h"
9 #include "SkPdfNativeDoc.h"
10
11 SkString SkPdfThreadActionDictionary::S(SkPdfNativeDoc* doc) {
12 SkPdfNativeObject* ret = get("S", "");
13 if (doc) {ret = doc->resolveReference(ret);}
14 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->nameValue2();
15 // TODO(edisonn): warn about missing required field, assert for known good pdf s
16 return SkString();
17 }
18
19 bool SkPdfThreadActionDictionary::has_S() const {
20 return get("S", "") != NULL;
21 }
22
23 SkPdfFileSpec SkPdfThreadActionDictionary::F(SkPdfNativeDoc* doc) {
24 SkPdfNativeObject* ret = get("F", "");
25 if (doc) {ret = doc->resolveReference(ret);}
26 if ((ret != NULL && false) || (doc == NULL && ret != NULL && ret->isReference( ))) return ret->fileSpecValue();
27 // TODO(edisonn): warn about missing default value for optional fields
28 return SkPdfFileSpec();
29 }
30
31 bool SkPdfThreadActionDictionary::has_F() const {
32 return get("F", "") != NULL;
33 }
34
35 bool SkPdfThreadActionDictionary::isDADictionary(SkPdfNativeDoc* doc) {
36 SkPdfNativeObject* ret = get("D", "");
37 if (doc) {ret = doc->resolveReference(ret);}
38 return ret != NULL && ret->isDictionary();
39 }
40
41 SkPdfDictionary* SkPdfThreadActionDictionary::getDAsDictionary(SkPdfNativeDoc* d oc) {
42 SkPdfNativeObject* ret = get("D", "");
43 if (doc) {ret = doc->resolveReference(ret);}
44 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
45 // TODO(edisonn): warn about missing required field, assert for known good pdf s
46 return NULL;
47 }
48
49 bool SkPdfThreadActionDictionary::isDAInteger(SkPdfNativeDoc* doc) {
50 SkPdfNativeObject* ret = get("D", "");
51 if (doc) {ret = doc->resolveReference(ret);}
52 return ret != NULL && ret->isInteger();
53 }
54
55 int64_t SkPdfThreadActionDictionary::getDAsInteger(SkPdfNativeDoc* doc) {
56 SkPdfNativeObject* ret = get("D", "");
57 if (doc) {ret = doc->resolveReference(ret);}
58 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->intValue();
59 // TODO(edisonn): warn about missing required field, assert for known good pdf s
60 return 0;
61 }
62
63 bool SkPdfThreadActionDictionary::isDAString(SkPdfNativeDoc* doc) {
64 SkPdfNativeObject* ret = get("D", "");
65 if (doc) {ret = doc->resolveReference(ret);}
66 return ret != NULL && ret->isAnyString();
67 }
68
69 SkString SkPdfThreadActionDictionary::getDAsString(SkPdfNativeDoc* doc) {
70 SkPdfNativeObject* ret = get("D", "");
71 if (doc) {ret = doc->resolveReference(ret);}
72 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
73 // TODO(edisonn): warn about missing required field, assert for known good pdf s
74 return SkString();
75 }
76
77 bool SkPdfThreadActionDictionary::has_D() const {
78 return get("D", "") != NULL;
79 }
80
81 bool SkPdfThreadActionDictionary::isBADictionary(SkPdfNativeDoc* doc) {
82 SkPdfNativeObject* ret = get("B", "");
83 if (doc) {ret = doc->resolveReference(ret);}
84 return ret != NULL && ret->isDictionary();
85 }
86
87 SkPdfDictionary* SkPdfThreadActionDictionary::getBAsDictionary(SkPdfNativeDoc* d oc) {
88 SkPdfNativeObject* ret = get("B", "");
89 if (doc) {ret = doc->resolveReference(ret);}
90 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
91 // TODO(edisonn): warn about missing default value for optional fields
92 return NULL;
93 }
94
95 bool SkPdfThreadActionDictionary::isBAInteger(SkPdfNativeDoc* doc) {
96 SkPdfNativeObject* ret = get("B", "");
97 if (doc) {ret = doc->resolveReference(ret);}
98 return ret != NULL && ret->isInteger();
99 }
100
101 int64_t SkPdfThreadActionDictionary::getBAsInteger(SkPdfNativeDoc* doc) {
102 SkPdfNativeObject* ret = get("B", "");
103 if (doc) {ret = doc->resolveReference(ret);}
104 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->intValue();
105 // TODO(edisonn): warn about missing default value for optional fields
106 return 0;
107 }
108
109 bool SkPdfThreadActionDictionary::has_B() const {
110 return get("B", "") != NULL;
111 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698