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

Side by Side Diff: experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfDocumentInformationDictionary_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 "SkPdfDocumentInformationDictionary_autogen.h"
2
3
4 #include "SkPdfNativeDoc.h"
5 SkString SkPdfDocumentInformationDictionary::Title(SkPdfNativeDoc* doc) {
6 SkPdfNativeObject* ret = get("Title", "");
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 default value for optional fields
10 return SkString();
11 }
12
13 bool SkPdfDocumentInformationDictionary::has_Title() const {
14 return get("Title", "") != NULL;
15 }
16
17 SkString SkPdfDocumentInformationDictionary::Author(SkPdfNativeDoc* doc) {
18 SkPdfNativeObject* ret = get("Author", "");
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 SkPdfDocumentInformationDictionary::has_Author() const {
26 return get("Author", "") != NULL;
27 }
28
29 SkString SkPdfDocumentInformationDictionary::Subject(SkPdfNativeDoc* doc) {
30 SkPdfNativeObject* ret = get("Subject", "");
31 if (doc) {ret = doc->resolveReference(ret);}
32 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
33 // TODO(edisonn): warn about missing default value for optional fields
34 return SkString();
35 }
36
37 bool SkPdfDocumentInformationDictionary::has_Subject() const {
38 return get("Subject", "") != NULL;
39 }
40
41 SkString SkPdfDocumentInformationDictionary::Keywords(SkPdfNativeDoc* doc) {
42 SkPdfNativeObject* ret = get("Keywords", "");
43 if (doc) {ret = doc->resolveReference(ret);}
44 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
45 // TODO(edisonn): warn about missing default value for optional fields
46 return SkString();
47 }
48
49 bool SkPdfDocumentInformationDictionary::has_Keywords() const {
50 return get("Keywords", "") != NULL;
51 }
52
53 SkString SkPdfDocumentInformationDictionary::Creator(SkPdfNativeDoc* doc) {
54 SkPdfNativeObject* ret = get("Creator", "");
55 if (doc) {ret = doc->resolveReference(ret);}
56 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
57 // TODO(edisonn): warn about missing default value for optional fields
58 return SkString();
59 }
60
61 bool SkPdfDocumentInformationDictionary::has_Creator() const {
62 return get("Creator", "") != NULL;
63 }
64
65 SkString SkPdfDocumentInformationDictionary::Producer(SkPdfNativeDoc* doc) {
66 SkPdfNativeObject* ret = get("Producer", "");
67 if (doc) {ret = doc->resolveReference(ret);}
68 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
69 // TODO(edisonn): warn about missing default value for optional fields
70 return SkString();
71 }
72
73 bool SkPdfDocumentInformationDictionary::has_Producer() const {
74 return get("Producer", "") != NULL;
75 }
76
77 SkPdfDate SkPdfDocumentInformationDictionary::CreationDate(SkPdfNativeDoc* doc) {
78 SkPdfNativeObject* ret = get("CreationDate", "");
79 if (doc) {ret = doc->resolveReference(ret);}
80 if ((ret != NULL && ret->isDate()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->dateValue();
81 // TODO(edisonn): warn about missing default value for optional fields
82 return SkPdfDate();
83 }
84
85 bool SkPdfDocumentInformationDictionary::has_CreationDate() const {
86 return get("CreationDate", "") != NULL;
87 }
88
89 SkPdfDate SkPdfDocumentInformationDictionary::ModDate(SkPdfNativeDoc* doc) {
90 SkPdfNativeObject* ret = get("ModDate", "");
91 if (doc) {ret = doc->resolveReference(ret);}
92 if ((ret != NULL && ret->isDate()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->dateValue();
93 // TODO(edisonn): warn about missing default value for optional fields
94 return SkPdfDate();
95 }
96
97 bool SkPdfDocumentInformationDictionary::has_ModDate() const {
98 return get("ModDate", "") != NULL;
99 }
100
101 SkString SkPdfDocumentInformationDictionary::Trapped(SkPdfNativeDoc* doc) {
102 SkPdfNativeObject* ret = get("Trapped", "");
103 if (doc) {ret = doc->resolveReference(ret);}
104 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->nameValue2();
105 // TODO(edisonn): warn about missing default value for optional fields
106 return SkString();
107 }
108
109 bool SkPdfDocumentInformationDictionary::has_Trapped() const {
110 return get("Trapped", "") != NULL;
111 }
112
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698