| OLD | NEW |
| (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 "SkPdfFieldDictionary_autogen.h" | |
| 9 #include "SkPdfNativeDoc.h" | |
| 10 | |
| 11 SkString SkPdfFieldDictionary::FT(SkPdfNativeDoc* doc) { | |
| 12 SkPdfNativeObject* ret = get("FT", ""); | |
| 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 default value for optional fields | |
| 16 return SkString(); | |
| 17 } | |
| 18 | |
| 19 bool SkPdfFieldDictionary::has_FT() const { | |
| 20 return get("FT", "") != NULL; | |
| 21 } | |
| 22 | |
| 23 SkPdfDictionary* SkPdfFieldDictionary::Parent(SkPdfNativeDoc* doc) { | |
| 24 SkPdfNativeObject* ret = get("Parent", ""); | |
| 25 if (doc) {ret = doc->resolveReference(ret);} | |
| 26 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret
->isReference())) return (SkPdfDictionary*)ret; | |
| 27 // TODO(edisonn): warn about missing default value for optional fields | |
| 28 return NULL; | |
| 29 } | |
| 30 | |
| 31 bool SkPdfFieldDictionary::has_Parent() const { | |
| 32 return get("Parent", "") != NULL; | |
| 33 } | |
| 34 | |
| 35 SkPdfArray* SkPdfFieldDictionary::Kids(SkPdfNativeDoc* doc) { | |
| 36 SkPdfNativeObject* ret = get("Kids", ""); | |
| 37 if (doc) {ret = doc->resolveReference(ret);} | |
| 38 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR
eference())) return (SkPdfArray*)ret; | |
| 39 // TODO(edisonn): warn about missing default value for optional fields | |
| 40 return NULL; | |
| 41 } | |
| 42 | |
| 43 bool SkPdfFieldDictionary::has_Kids() const { | |
| 44 return get("Kids", "") != NULL; | |
| 45 } | |
| 46 | |
| 47 SkString SkPdfFieldDictionary::T(SkPdfNativeDoc* doc) { | |
| 48 SkPdfNativeObject* ret = get("T", ""); | |
| 49 if (doc) {ret = doc->resolveReference(ret);} | |
| 50 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret-
>isReference())) return ret->stringValue2(); | |
| 51 // TODO(edisonn): warn about missing default value for optional fields | |
| 52 return SkString(); | |
| 53 } | |
| 54 | |
| 55 bool SkPdfFieldDictionary::has_T() const { | |
| 56 return get("T", "") != NULL; | |
| 57 } | |
| 58 | |
| 59 SkString SkPdfFieldDictionary::TU(SkPdfNativeDoc* doc) { | |
| 60 SkPdfNativeObject* ret = get("TU", ""); | |
| 61 if (doc) {ret = doc->resolveReference(ret);} | |
| 62 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret-
>isReference())) return ret->stringValue2(); | |
| 63 // TODO(edisonn): warn about missing default value for optional fields | |
| 64 return SkString(); | |
| 65 } | |
| 66 | |
| 67 bool SkPdfFieldDictionary::has_TU() const { | |
| 68 return get("TU", "") != NULL; | |
| 69 } | |
| 70 | |
| 71 SkString SkPdfFieldDictionary::TM(SkPdfNativeDoc* doc) { | |
| 72 SkPdfNativeObject* ret = get("TM", ""); | |
| 73 if (doc) {ret = doc->resolveReference(ret);} | |
| 74 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret-
>isReference())) return ret->stringValue2(); | |
| 75 // TODO(edisonn): warn about missing default value for optional fields | |
| 76 return SkString(); | |
| 77 } | |
| 78 | |
| 79 bool SkPdfFieldDictionary::has_TM() const { | |
| 80 return get("TM", "") != NULL; | |
| 81 } | |
| 82 | |
| 83 int64_t SkPdfFieldDictionary::Ff(SkPdfNativeDoc* doc) { | |
| 84 SkPdfNativeObject* ret = get("Ff", ""); | |
| 85 if (doc) {ret = doc->resolveReference(ret);} | |
| 86 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->intValue(); | |
| 87 // TODO(edisonn): warn about missing default value for optional fields | |
| 88 return 0; | |
| 89 } | |
| 90 | |
| 91 bool SkPdfFieldDictionary::has_Ff() const { | |
| 92 return get("Ff", "") != NULL; | |
| 93 } | |
| 94 | |
| 95 SkPdfNativeObject* SkPdfFieldDictionary::V(SkPdfNativeDoc* doc) { | |
| 96 SkPdfNativeObject* ret = get("V", ""); | |
| 97 if (doc) {ret = doc->resolveReference(ret);} | |
| 98 if ((ret != NULL && true) || (doc == NULL && ret != NULL && ret->isReference()
)) return ret; | |
| 99 // TODO(edisonn): warn about missing default value for optional fields | |
| 100 return NULL; | |
| 101 } | |
| 102 | |
| 103 bool SkPdfFieldDictionary::has_V() const { | |
| 104 return get("V", "") != NULL; | |
| 105 } | |
| 106 | |
| 107 SkPdfNativeObject* SkPdfFieldDictionary::DV(SkPdfNativeDoc* doc) { | |
| 108 SkPdfNativeObject* ret = get("DV", ""); | |
| 109 if (doc) {ret = doc->resolveReference(ret);} | |
| 110 if ((ret != NULL && true) || (doc == NULL && ret != NULL && ret->isReference()
)) return ret; | |
| 111 // TODO(edisonn): warn about missing default value for optional fields | |
| 112 return NULL; | |
| 113 } | |
| 114 | |
| 115 bool SkPdfFieldDictionary::has_DV() const { | |
| 116 return get("DV", "") != NULL; | |
| 117 } | |
| 118 | |
| 119 SkPdfDictionary* SkPdfFieldDictionary::AA(SkPdfNativeDoc* doc) { | |
| 120 SkPdfNativeObject* ret = get("AA", ""); | |
| 121 if (doc) {ret = doc->resolveReference(ret);} | |
| 122 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret
->isReference())) return (SkPdfDictionary*)ret; | |
| 123 // TODO(edisonn): warn about missing default value for optional fields | |
| 124 return NULL; | |
| 125 } | |
| 126 | |
| 127 bool SkPdfFieldDictionary::has_AA() const { | |
| 128 return get("AA", "") != NULL; | |
| 129 } | |
| OLD | NEW |