OLD | NEW |
(Empty) | |
| 1 #include "SkPdfRemoteGoToActionDictionary_autogen.h" |
| 2 |
| 3 |
| 4 #include "SkPdfNativeDoc.h" |
| 5 SkString SkPdfRemoteGoToActionDictionary::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 SkPdfRemoteGoToActionDictionary::has_S() const { |
| 14 return get("S", "") != NULL; |
| 15 } |
| 16 |
| 17 SkPdfFileSpec SkPdfRemoteGoToActionDictionary::F(SkPdfNativeDoc* doc) { |
| 18 SkPdfNativeObject* ret = get("F", ""); |
| 19 if (doc) {ret = doc->resolveReference(ret);} |
| 20 if ((ret != NULL && false) || (doc == NULL && ret != NULL && ret->isReference(
))) return ret->fileSpecValue(); |
| 21 // TODO(edisonn): warn about missing required field, assert for known good pdf
s |
| 22 return SkPdfFileSpec(); |
| 23 } |
| 24 |
| 25 bool SkPdfRemoteGoToActionDictionary::has_F() const { |
| 26 return get("F", "") != NULL; |
| 27 } |
| 28 |
| 29 bool SkPdfRemoteGoToActionDictionary::isDAName(SkPdfNativeDoc* doc) { |
| 30 SkPdfNativeObject* ret = get("D", ""); |
| 31 if (doc) {ret = doc->resolveReference(ret);} |
| 32 return ret != NULL && ret->isName(); |
| 33 } |
| 34 |
| 35 SkString SkPdfRemoteGoToActionDictionary::getDAsName(SkPdfNativeDoc* doc) { |
| 36 SkPdfNativeObject* ret = get("D", ""); |
| 37 if (doc) {ret = doc->resolveReference(ret);} |
| 38 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe
ference())) return ret->nameValue2(); |
| 39 // TODO(edisonn): warn about missing required field, assert for known good pdf
s |
| 40 return SkString(); |
| 41 } |
| 42 |
| 43 bool SkPdfRemoteGoToActionDictionary::isDAString(SkPdfNativeDoc* doc) { |
| 44 SkPdfNativeObject* ret = get("D", ""); |
| 45 if (doc) {ret = doc->resolveReference(ret);} |
| 46 return ret != NULL && ret->isAnyString(); |
| 47 } |
| 48 |
| 49 SkString SkPdfRemoteGoToActionDictionary::getDAsString(SkPdfNativeDoc* doc) { |
| 50 SkPdfNativeObject* ret = get("D", ""); |
| 51 if (doc) {ret = doc->resolveReference(ret);} |
| 52 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret-
>isReference())) return ret->stringValue2(); |
| 53 // TODO(edisonn): warn about missing required field, assert for known good pdf
s |
| 54 return SkString(); |
| 55 } |
| 56 |
| 57 bool SkPdfRemoteGoToActionDictionary::isDAArray(SkPdfNativeDoc* doc) { |
| 58 SkPdfNativeObject* ret = get("D", ""); |
| 59 if (doc) {ret = doc->resolveReference(ret);} |
| 60 return ret != NULL && ret->isArray(); |
| 61 } |
| 62 |
| 63 SkPdfArray* SkPdfRemoteGoToActionDictionary::getDAsArray(SkPdfNativeDoc* doc) { |
| 64 SkPdfNativeObject* ret = get("D", ""); |
| 65 if (doc) {ret = doc->resolveReference(ret);} |
| 66 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR
eference())) return (SkPdfArray*)ret; |
| 67 // TODO(edisonn): warn about missing required field, assert for known good pdf
s |
| 68 return NULL; |
| 69 } |
| 70 |
| 71 bool SkPdfRemoteGoToActionDictionary::has_D() const { |
| 72 return get("D", "") != NULL; |
| 73 } |
| 74 |
| 75 bool SkPdfRemoteGoToActionDictionary::NewWindow(SkPdfNativeDoc* doc) { |
| 76 SkPdfNativeObject* ret = get("NewWindow", ""); |
| 77 if (doc) {ret = doc->resolveReference(ret);} |
| 78 if ((ret != NULL && ret->isBoolean()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->boolValue(); |
| 79 // TODO(edisonn): warn about missing default value for optional fields |
| 80 return false; |
| 81 } |
| 82 |
| 83 bool SkPdfRemoteGoToActionDictionary::has_NewWindow() const { |
| 84 return get("NewWindow", "") != NULL; |
| 85 } |
| 86 |
OLD | NEW |