OLD | NEW |
(Empty) | |
| 1 #include "SkPdfHideActionDictionary_autogen.h" |
| 2 |
| 3 |
| 4 #include "SkPdfNativeDoc.h" |
| 5 SkString SkPdfHideActionDictionary::S(SkPdfNativeDoc* doc) { |
| 6 SkPdfNativeObject* ret = get("S", ""); |
| 7 if (doc) {ret = doc->resolveReference(ret);} |
| 8 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe
ference())) return ret->nameValue2(); |
| 9 // TODO(edisonn): warn about missing required field, assert for known good pdf
s |
| 10 return SkString(); |
| 11 } |
| 12 |
| 13 bool SkPdfHideActionDictionary::has_S() const { |
| 14 return get("S", "") != NULL; |
| 15 } |
| 16 |
| 17 bool SkPdfHideActionDictionary::isTADictionary(SkPdfNativeDoc* doc) { |
| 18 SkPdfNativeObject* ret = get("T", ""); |
| 19 if (doc) {ret = doc->resolveReference(ret);} |
| 20 return ret != NULL && ret->isDictionary(); |
| 21 } |
| 22 |
| 23 SkPdfDictionary* SkPdfHideActionDictionary::getTAsDictionary(SkPdfNativeDoc* doc
) { |
| 24 SkPdfNativeObject* ret = get("T", ""); |
| 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 required field, assert for known good pdf
s |
| 28 return NULL; |
| 29 } |
| 30 |
| 31 bool SkPdfHideActionDictionary::isTAString(SkPdfNativeDoc* doc) { |
| 32 SkPdfNativeObject* ret = get("T", ""); |
| 33 if (doc) {ret = doc->resolveReference(ret);} |
| 34 return ret != NULL && ret->isAnyString(); |
| 35 } |
| 36 |
| 37 SkString SkPdfHideActionDictionary::getTAsString(SkPdfNativeDoc* doc) { |
| 38 SkPdfNativeObject* ret = get("T", ""); |
| 39 if (doc) {ret = doc->resolveReference(ret);} |
| 40 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret-
>isReference())) return ret->stringValue2(); |
| 41 // TODO(edisonn): warn about missing required field, assert for known good pdf
s |
| 42 return SkString(); |
| 43 } |
| 44 |
| 45 bool SkPdfHideActionDictionary::isTAArray(SkPdfNativeDoc* doc) { |
| 46 SkPdfNativeObject* ret = get("T", ""); |
| 47 if (doc) {ret = doc->resolveReference(ret);} |
| 48 return ret != NULL && ret->isArray(); |
| 49 } |
| 50 |
| 51 SkPdfArray* SkPdfHideActionDictionary::getTAsArray(SkPdfNativeDoc* doc) { |
| 52 SkPdfNativeObject* ret = get("T", ""); |
| 53 if (doc) {ret = doc->resolveReference(ret);} |
| 54 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR
eference())) return (SkPdfArray*)ret; |
| 55 // TODO(edisonn): warn about missing required field, assert for known good pdf
s |
| 56 return NULL; |
| 57 } |
| 58 |
| 59 bool SkPdfHideActionDictionary::has_T() const { |
| 60 return get("T", "") != NULL; |
| 61 } |
| 62 |
| 63 bool SkPdfHideActionDictionary::H(SkPdfNativeDoc* doc) { |
| 64 SkPdfNativeObject* ret = get("H", ""); |
| 65 if (doc) {ret = doc->resolveReference(ret);} |
| 66 if ((ret != NULL && ret->isBoolean()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->boolValue(); |
| 67 // TODO(edisonn): warn about missing default value for optional fields |
| 68 return false; |
| 69 } |
| 70 |
| 71 bool SkPdfHideActionDictionary::has_H() const { |
| 72 return get("H", "") != NULL; |
| 73 } |
| 74 |
OLD | NEW |