OLD | NEW |
(Empty) | |
| 1 #include "SkPdfMovieAnnotationDictionary_autogen.h" |
| 2 |
| 3 |
| 4 #include "SkPdfNativeDoc.h" |
| 5 SkString SkPdfMovieAnnotationDictionary::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 SkPdfMovieAnnotationDictionary::has_Subtype() const { |
| 14 return get("Subtype", "") != NULL; |
| 15 } |
| 16 |
| 17 SkPdfDictionary* SkPdfMovieAnnotationDictionary::Movie(SkPdfNativeDoc* doc) { |
| 18 SkPdfNativeObject* ret = get("Movie", ""); |
| 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 required field, assert for known good pdf
s |
| 22 return NULL; |
| 23 } |
| 24 |
| 25 bool SkPdfMovieAnnotationDictionary::has_Movie() const { |
| 26 return get("Movie", "") != NULL; |
| 27 } |
| 28 |
| 29 SkString SkPdfMovieAnnotationDictionary::Contents(SkPdfNativeDoc* doc) { |
| 30 SkPdfNativeObject* ret = get("Contents", ""); |
| 31 if (doc) {ret = doc->resolveReference(ret);} |
| 32 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret-
>isReference())) return ret->stringValue2(); |
| 33 // TODO(edisonn): warn about missing default value for optional fields |
| 34 return SkString(); |
| 35 } |
| 36 |
| 37 bool SkPdfMovieAnnotationDictionary::has_Contents() const { |
| 38 return get("Contents", "") != NULL; |
| 39 } |
| 40 |
| 41 bool SkPdfMovieAnnotationDictionary::isAABoolean(SkPdfNativeDoc* doc) { |
| 42 SkPdfNativeObject* ret = get("A", ""); |
| 43 if (doc) {ret = doc->resolveReference(ret);} |
| 44 return ret != NULL && ret->isBoolean(); |
| 45 } |
| 46 |
| 47 bool SkPdfMovieAnnotationDictionary::getAAsBoolean(SkPdfNativeDoc* doc) { |
| 48 SkPdfNativeObject* ret = get("A", ""); |
| 49 if (doc) {ret = doc->resolveReference(ret);} |
| 50 if ((ret != NULL && ret->isBoolean()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->boolValue(); |
| 51 // TODO(edisonn): warn about missing default value for optional fields |
| 52 return false; |
| 53 } |
| 54 |
| 55 bool SkPdfMovieAnnotationDictionary::isAADictionary(SkPdfNativeDoc* doc) { |
| 56 SkPdfNativeObject* ret = get("A", ""); |
| 57 if (doc) {ret = doc->resolveReference(ret);} |
| 58 return ret != NULL && ret->isDictionary(); |
| 59 } |
| 60 |
| 61 SkPdfDictionary* SkPdfMovieAnnotationDictionary::getAAsDictionary(SkPdfNativeDoc
* doc) { |
| 62 SkPdfNativeObject* ret = get("A", ""); |
| 63 if (doc) {ret = doc->resolveReference(ret);} |
| 64 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret
->isReference())) return (SkPdfDictionary*)ret; |
| 65 // TODO(edisonn): warn about missing default value for optional fields |
| 66 return NULL; |
| 67 } |
| 68 |
| 69 bool SkPdfMovieAnnotationDictionary::has_A() const { |
| 70 return get("A", "") != NULL; |
| 71 } |
| 72 |
OLD | NEW |