OLD | NEW |
(Empty) | |
| 1 #include "SkPdfFDFTemplateDictionary_autogen.h" |
| 2 |
| 3 |
| 4 #include "SkPdfNativeDoc.h" |
| 5 SkPdfDictionary* SkPdfFDFTemplateDictionary::TRef(SkPdfNativeDoc* doc) { |
| 6 SkPdfNativeObject* ret = get("TRef", ""); |
| 7 if (doc) {ret = doc->resolveReference(ret);} |
| 8 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret
->isReference())) return (SkPdfDictionary*)ret; |
| 9 // TODO(edisonn): warn about missing required field, assert for known good pdf
s |
| 10 return NULL; |
| 11 } |
| 12 |
| 13 bool SkPdfFDFTemplateDictionary::has_TRef() const { |
| 14 return get("TRef", "") != NULL; |
| 15 } |
| 16 |
| 17 SkPdfArray* SkPdfFDFTemplateDictionary::Fields(SkPdfNativeDoc* doc) { |
| 18 SkPdfNativeObject* ret = get("Fields", ""); |
| 19 if (doc) {ret = doc->resolveReference(ret);} |
| 20 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR
eference())) return (SkPdfArray*)ret; |
| 21 // TODO(edisonn): warn about missing default value for optional fields |
| 22 return NULL; |
| 23 } |
| 24 |
| 25 bool SkPdfFDFTemplateDictionary::has_Fields() const { |
| 26 return get("Fields", "") != NULL; |
| 27 } |
| 28 |
| 29 bool SkPdfFDFTemplateDictionary::Rename(SkPdfNativeDoc* doc) { |
| 30 SkPdfNativeObject* ret = get("Rename", ""); |
| 31 if (doc) {ret = doc->resolveReference(ret);} |
| 32 if ((ret != NULL && ret->isBoolean()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->boolValue(); |
| 33 // TODO(edisonn): warn about missing default value for optional fields |
| 34 return false; |
| 35 } |
| 36 |
| 37 bool SkPdfFDFTemplateDictionary::has_Rename() const { |
| 38 return get("Rename", "") != NULL; |
| 39 } |
| 40 |
OLD | NEW |