OLD | NEW |
(Empty) | |
| 1 #include "SkPdfOutlineItemDictionary_autogen.h" |
| 2 |
| 3 |
| 4 #include "SkPdfNativeDoc.h" |
| 5 SkString SkPdfOutlineItemDictionary::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 required field, assert for known good pdf
s |
| 10 return SkString(); |
| 11 } |
| 12 |
| 13 bool SkPdfOutlineItemDictionary::has_Title() const { |
| 14 return get("Title", "") != NULL; |
| 15 } |
| 16 |
| 17 SkPdfDictionary* SkPdfOutlineItemDictionary::Parent(SkPdfNativeDoc* doc) { |
| 18 SkPdfNativeObject* ret = get("Parent", ""); |
| 19 if (doc) {ret = doc->resolveReference(ret);} |
| 20 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret
->isReference())) return (SkPdfDictionary*)ret; |
| 21 // TODO(edisonn): warn about missing default value for optional fields |
| 22 return NULL; |
| 23 } |
| 24 |
| 25 bool SkPdfOutlineItemDictionary::has_Parent() const { |
| 26 return get("Parent", "") != NULL; |
| 27 } |
| 28 |
| 29 SkPdfDictionary* SkPdfOutlineItemDictionary::Prev(SkPdfNativeDoc* doc) { |
| 30 SkPdfNativeObject* ret = get("Prev", ""); |
| 31 if (doc) {ret = doc->resolveReference(ret);} |
| 32 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret
->isReference())) return (SkPdfDictionary*)ret; |
| 33 // TODO(edisonn): warn about missing default value for optional fields |
| 34 return NULL; |
| 35 } |
| 36 |
| 37 bool SkPdfOutlineItemDictionary::has_Prev() const { |
| 38 return get("Prev", "") != NULL; |
| 39 } |
| 40 |
| 41 SkPdfDictionary* SkPdfOutlineItemDictionary::Next(SkPdfNativeDoc* doc) { |
| 42 SkPdfNativeObject* ret = get("Next", ""); |
| 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 default value for optional fields |
| 46 return NULL; |
| 47 } |
| 48 |
| 49 bool SkPdfOutlineItemDictionary::has_Next() const { |
| 50 return get("Next", "") != NULL; |
| 51 } |
| 52 |
| 53 SkPdfDictionary* SkPdfOutlineItemDictionary::First(SkPdfNativeDoc* doc) { |
| 54 SkPdfNativeObject* ret = get("First", ""); |
| 55 if (doc) {ret = doc->resolveReference(ret);} |
| 56 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret
->isReference())) return (SkPdfDictionary*)ret; |
| 57 // TODO(edisonn): warn about missing default value for optional fields |
| 58 return NULL; |
| 59 } |
| 60 |
| 61 bool SkPdfOutlineItemDictionary::has_First() const { |
| 62 return get("First", "") != NULL; |
| 63 } |
| 64 |
| 65 SkPdfDictionary* SkPdfOutlineItemDictionary::Last(SkPdfNativeDoc* doc) { |
| 66 SkPdfNativeObject* ret = get("Last", ""); |
| 67 if (doc) {ret = doc->resolveReference(ret);} |
| 68 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret
->isReference())) return (SkPdfDictionary*)ret; |
| 69 // TODO(edisonn): warn about missing default value for optional fields |
| 70 return NULL; |
| 71 } |
| 72 |
| 73 bool SkPdfOutlineItemDictionary::has_Last() const { |
| 74 return get("Last", "") != NULL; |
| 75 } |
| 76 |
| 77 int64_t SkPdfOutlineItemDictionary::Count(SkPdfNativeDoc* doc) { |
| 78 SkPdfNativeObject* ret = get("Count", ""); |
| 79 if (doc) {ret = doc->resolveReference(ret);} |
| 80 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->intValue(); |
| 81 // TODO(edisonn): warn about missing default value for optional fields |
| 82 return 0; |
| 83 } |
| 84 |
| 85 bool SkPdfOutlineItemDictionary::has_Count() const { |
| 86 return get("Count", "") != NULL; |
| 87 } |
| 88 |
| 89 bool SkPdfOutlineItemDictionary::isDestAName(SkPdfNativeDoc* doc) { |
| 90 SkPdfNativeObject* ret = get("Dest", ""); |
| 91 if (doc) {ret = doc->resolveReference(ret);} |
| 92 return ret != NULL && ret->isName(); |
| 93 } |
| 94 |
| 95 SkString SkPdfOutlineItemDictionary::getDestAsName(SkPdfNativeDoc* doc) { |
| 96 SkPdfNativeObject* ret = get("Dest", ""); |
| 97 if (doc) {ret = doc->resolveReference(ret);} |
| 98 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe
ference())) return ret->nameValue2(); |
| 99 // TODO(edisonn): warn about missing default value for optional fields |
| 100 return SkString(); |
| 101 } |
| 102 |
| 103 bool SkPdfOutlineItemDictionary::isDestAString(SkPdfNativeDoc* doc) { |
| 104 SkPdfNativeObject* ret = get("Dest", ""); |
| 105 if (doc) {ret = doc->resolveReference(ret);} |
| 106 return ret != NULL && ret->isAnyString(); |
| 107 } |
| 108 |
| 109 SkString SkPdfOutlineItemDictionary::getDestAsString(SkPdfNativeDoc* doc) { |
| 110 SkPdfNativeObject* ret = get("Dest", ""); |
| 111 if (doc) {ret = doc->resolveReference(ret);} |
| 112 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret-
>isReference())) return ret->stringValue2(); |
| 113 // TODO(edisonn): warn about missing default value for optional fields |
| 114 return SkString(); |
| 115 } |
| 116 |
| 117 bool SkPdfOutlineItemDictionary::isDestAArray(SkPdfNativeDoc* doc) { |
| 118 SkPdfNativeObject* ret = get("Dest", ""); |
| 119 if (doc) {ret = doc->resolveReference(ret);} |
| 120 return ret != NULL && ret->isArray(); |
| 121 } |
| 122 |
| 123 SkPdfArray* SkPdfOutlineItemDictionary::getDestAsArray(SkPdfNativeDoc* doc) { |
| 124 SkPdfNativeObject* ret = get("Dest", ""); |
| 125 if (doc) {ret = doc->resolveReference(ret);} |
| 126 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR
eference())) return (SkPdfArray*)ret; |
| 127 // TODO(edisonn): warn about missing default value for optional fields |
| 128 return NULL; |
| 129 } |
| 130 |
| 131 bool SkPdfOutlineItemDictionary::has_Dest() const { |
| 132 return get("Dest", "") != NULL; |
| 133 } |
| 134 |
| 135 SkPdfDictionary* SkPdfOutlineItemDictionary::A(SkPdfNativeDoc* doc) { |
| 136 SkPdfNativeObject* ret = get("A", ""); |
| 137 if (doc) {ret = doc->resolveReference(ret);} |
| 138 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret
->isReference())) return (SkPdfDictionary*)ret; |
| 139 // TODO(edisonn): warn about missing default value for optional fields |
| 140 return NULL; |
| 141 } |
| 142 |
| 143 bool SkPdfOutlineItemDictionary::has_A() const { |
| 144 return get("A", "") != NULL; |
| 145 } |
| 146 |
| 147 SkPdfDictionary* SkPdfOutlineItemDictionary::SE(SkPdfNativeDoc* doc) { |
| 148 SkPdfNativeObject* ret = get("SE", ""); |
| 149 if (doc) {ret = doc->resolveReference(ret);} |
| 150 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret
->isReference())) return (SkPdfDictionary*)ret; |
| 151 // TODO(edisonn): warn about missing default value for optional fields |
| 152 return NULL; |
| 153 } |
| 154 |
| 155 bool SkPdfOutlineItemDictionary::has_SE() const { |
| 156 return get("SE", "") != NULL; |
| 157 } |
| 158 |
| 159 SkPdfArray* SkPdfOutlineItemDictionary::C(SkPdfNativeDoc* doc) { |
| 160 SkPdfNativeObject* ret = get("C", ""); |
| 161 if (doc) {ret = doc->resolveReference(ret);} |
| 162 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR
eference())) return (SkPdfArray*)ret; |
| 163 // TODO(edisonn): warn about missing default value for optional fields |
| 164 return NULL; |
| 165 } |
| 166 |
| 167 bool SkPdfOutlineItemDictionary::has_C() const { |
| 168 return get("C", "") != NULL; |
| 169 } |
| 170 |
| 171 int64_t SkPdfOutlineItemDictionary::F(SkPdfNativeDoc* doc) { |
| 172 SkPdfNativeObject* ret = get("F", ""); |
| 173 if (doc) {ret = doc->resolveReference(ret);} |
| 174 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->intValue(); |
| 175 // TODO(edisonn): warn about missing default value for optional fields |
| 176 return 0; |
| 177 } |
| 178 |
| 179 bool SkPdfOutlineItemDictionary::has_F() const { |
| 180 return get("F", "") != NULL; |
| 181 } |
| 182 |
OLD | NEW |