OLD | NEW |
(Empty) | |
| 1 #include "SkPdfMarkedContentReferenceDictionary_autogen.h" |
| 2 |
| 3 |
| 4 #include "SkPdfNativeDoc.h" |
| 5 SkString SkPdfMarkedContentReferenceDictionary::Type(SkPdfNativeDoc* doc) { |
| 6 SkPdfNativeObject* ret = get("Type", ""); |
| 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 SkPdfMarkedContentReferenceDictionary::has_Type() const { |
| 14 return get("Type", "") != NULL; |
| 15 } |
| 16 |
| 17 SkPdfDictionary* SkPdfMarkedContentReferenceDictionary::Pg(SkPdfNativeDoc* doc)
{ |
| 18 SkPdfNativeObject* ret = get("Pg", ""); |
| 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 default value for optional fields |
| 22 return NULL; |
| 23 } |
| 24 |
| 25 bool SkPdfMarkedContentReferenceDictionary::has_Pg() const { |
| 26 return get("Pg", "") != NULL; |
| 27 } |
| 28 |
| 29 SkPdfStream* SkPdfMarkedContentReferenceDictionary::Stm(SkPdfNativeDoc* doc) { |
| 30 SkPdfNativeObject* ret = get("Stm", ""); |
| 31 if (doc) {ret = doc->resolveReference(ret);} |
| 32 if ((ret != NULL && ret->hasStream()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->getStream(); |
| 33 // TODO(edisonn): warn about missing default value for optional fields |
| 34 return NULL; |
| 35 } |
| 36 |
| 37 bool SkPdfMarkedContentReferenceDictionary::has_Stm() const { |
| 38 return get("Stm", "") != NULL; |
| 39 } |
| 40 |
| 41 SkPdfNativeObject* SkPdfMarkedContentReferenceDictionary::StmOwn(SkPdfNativeDoc*
doc) { |
| 42 SkPdfNativeObject* ret = get("StmOwn", ""); |
| 43 if (doc) {ret = doc->resolveReference(ret);} |
| 44 if ((ret != NULL && true) || (doc == NULL && ret != NULL && ret->isReference()
)) return ret; |
| 45 // TODO(edisonn): warn about missing default value for optional fields |
| 46 return NULL; |
| 47 } |
| 48 |
| 49 bool SkPdfMarkedContentReferenceDictionary::has_StmOwn() const { |
| 50 return get("StmOwn", "") != NULL; |
| 51 } |
| 52 |
| 53 int64_t SkPdfMarkedContentReferenceDictionary::MCID(SkPdfNativeDoc* doc) { |
| 54 SkPdfNativeObject* ret = get("MCID", ""); |
| 55 if (doc) {ret = doc->resolveReference(ret);} |
| 56 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->intValue(); |
| 57 // TODO(edisonn): warn about missing required field, assert for known good pdf
s |
| 58 return 0; |
| 59 } |
| 60 |
| 61 bool SkPdfMarkedContentReferenceDictionary::has_MCID() const { |
| 62 return get("MCID", "") != NULL; |
| 63 } |
| 64 |
OLD | NEW |