OLD | NEW |
(Empty) | |
| 1 #include "SkPdfGoToActionDictionary_autogen.h" |
| 2 |
| 3 |
| 4 #include "SkPdfNativeDoc.h" |
| 5 SkString SkPdfGoToActionDictionary::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 SkPdfGoToActionDictionary::has_S() const { |
| 14 return get("S", "") != NULL; |
| 15 } |
| 16 |
| 17 bool SkPdfGoToActionDictionary::isDAName(SkPdfNativeDoc* doc) { |
| 18 SkPdfNativeObject* ret = get("D", ""); |
| 19 if (doc) {ret = doc->resolveReference(ret);} |
| 20 return ret != NULL && ret->isName(); |
| 21 } |
| 22 |
| 23 SkString SkPdfGoToActionDictionary::getDAsName(SkPdfNativeDoc* doc) { |
| 24 SkPdfNativeObject* ret = get("D", ""); |
| 25 if (doc) {ret = doc->resolveReference(ret);} |
| 26 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe
ference())) return ret->nameValue2(); |
| 27 // TODO(edisonn): warn about missing required field, assert for known good pdf
s |
| 28 return SkString(); |
| 29 } |
| 30 |
| 31 bool SkPdfGoToActionDictionary::isDAString(SkPdfNativeDoc* doc) { |
| 32 SkPdfNativeObject* ret = get("D", ""); |
| 33 if (doc) {ret = doc->resolveReference(ret);} |
| 34 return ret != NULL && ret->isAnyString(); |
| 35 } |
| 36 |
| 37 SkString SkPdfGoToActionDictionary::getDAsString(SkPdfNativeDoc* doc) { |
| 38 SkPdfNativeObject* ret = get("D", ""); |
| 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 SkPdfGoToActionDictionary::isDAArray(SkPdfNativeDoc* doc) { |
| 46 SkPdfNativeObject* ret = get("D", ""); |
| 47 if (doc) {ret = doc->resolveReference(ret);} |
| 48 return ret != NULL && ret->isArray(); |
| 49 } |
| 50 |
| 51 SkPdfArray* SkPdfGoToActionDictionary::getDAsArray(SkPdfNativeDoc* doc) { |
| 52 SkPdfNativeObject* ret = get("D", ""); |
| 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 SkPdfGoToActionDictionary::has_D() const { |
| 60 return get("D", "") != NULL; |
| 61 } |
| 62 |
OLD | NEW |