OLD | NEW |
(Empty) | |
| 1 #include "SkPdfTrapNetworkAnnotationDictionary_autogen.h" |
| 2 |
| 3 |
| 4 #include "SkPdfNativeDoc.h" |
| 5 SkString SkPdfTrapNetworkAnnotationDictionary::Subtype(SkPdfNativeDoc* doc) { |
| 6 SkPdfNativeObject* ret = get("Subtype", ""); |
| 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 SkPdfTrapNetworkAnnotationDictionary::has_Subtype() const { |
| 14 return get("Subtype", "") != NULL; |
| 15 } |
| 16 |
| 17 SkString SkPdfTrapNetworkAnnotationDictionary::Contents(SkPdfNativeDoc* doc) { |
| 18 SkPdfNativeObject* ret = get("Contents", ""); |
| 19 if (doc) {ret = doc->resolveReference(ret);} |
| 20 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret-
>isReference())) return ret->stringValue2(); |
| 21 // TODO(edisonn): warn about missing default value for optional fields |
| 22 return SkString(); |
| 23 } |
| 24 |
| 25 bool SkPdfTrapNetworkAnnotationDictionary::has_Contents() const { |
| 26 return get("Contents", "") != NULL; |
| 27 } |
| 28 |
| 29 SkPdfDate SkPdfTrapNetworkAnnotationDictionary::LastModified(SkPdfNativeDoc* doc
) { |
| 30 SkPdfNativeObject* ret = get("LastModified", ""); |
| 31 if (doc) {ret = doc->resolveReference(ret);} |
| 32 if ((ret != NULL && ret->isDate()) || (doc == NULL && ret != NULL && ret->isRe
ference())) return ret->dateValue(); |
| 33 // TODO(edisonn): warn about missing default value for optional fields |
| 34 return SkPdfDate(); |
| 35 } |
| 36 |
| 37 bool SkPdfTrapNetworkAnnotationDictionary::has_LastModified() const { |
| 38 return get("LastModified", "") != NULL; |
| 39 } |
| 40 |
| 41 SkPdfArray* SkPdfTrapNetworkAnnotationDictionary::Version(SkPdfNativeDoc* doc) { |
| 42 SkPdfNativeObject* ret = get("Version", ""); |
| 43 if (doc) {ret = doc->resolveReference(ret);} |
| 44 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR
eference())) return (SkPdfArray*)ret; |
| 45 // TODO(edisonn): warn about missing default value for optional fields |
| 46 return NULL; |
| 47 } |
| 48 |
| 49 bool SkPdfTrapNetworkAnnotationDictionary::has_Version() const { |
| 50 return get("Version", "") != NULL; |
| 51 } |
| 52 |
| 53 SkPdfArray* SkPdfTrapNetworkAnnotationDictionary::AnnotStates(SkPdfNativeDoc* do
c) { |
| 54 SkPdfNativeObject* ret = get("AnnotStates", ""); |
| 55 if (doc) {ret = doc->resolveReference(ret);} |
| 56 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR
eference())) return (SkPdfArray*)ret; |
| 57 // TODO(edisonn): warn about missing default value for optional fields |
| 58 return NULL; |
| 59 } |
| 60 |
| 61 bool SkPdfTrapNetworkAnnotationDictionary::has_AnnotStates() const { |
| 62 return get("AnnotStates", "") != NULL; |
| 63 } |
| 64 |
| 65 SkPdfArray* SkPdfTrapNetworkAnnotationDictionary::FontFauxing(SkPdfNativeDoc* do
c) { |
| 66 SkPdfNativeObject* ret = get("FontFauxing", ""); |
| 67 if (doc) {ret = doc->resolveReference(ret);} |
| 68 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR
eference())) return (SkPdfArray*)ret; |
| 69 // TODO(edisonn): warn about missing default value for optional fields |
| 70 return NULL; |
| 71 } |
| 72 |
| 73 bool SkPdfTrapNetworkAnnotationDictionary::has_FontFauxing() const { |
| 74 return get("FontFauxing", "") != NULL; |
| 75 } |
| 76 |
OLD | NEW |