edisonn@google.com | 8cee797 | 2013-08-20 18:56:49 +0000 | [diff] [blame] | 1 | #include "SkPdfWebCaptureInformationDictionary_autogen.h" |
| 2 | |
| 3 | |
| 4 | #include "SkPdfNativeDoc.h" |
| 5 | double SkPdfWebCaptureInformationDictionary::V(SkPdfNativeDoc* doc) { |
| 6 | SkPdfNativeObject* ret = get("V", ""); |
| 7 | if (doc) {ret = doc->resolveReference(ret);} |
| 8 | if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->numberValue(); |
| 9 | // TODO(edisonn): warn about missing required field, assert for known good pdfs |
| 10 | return 0; |
| 11 | } |
| 12 | |
| 13 | bool SkPdfWebCaptureInformationDictionary::has_V() const { |
| 14 | return get("V", "") != NULL; |
| 15 | } |
| 16 | |
| 17 | SkPdfArray* SkPdfWebCaptureInformationDictionary::C(SkPdfNativeDoc* doc) { |
| 18 | SkPdfNativeObject* ret = get("C", ""); |
| 19 | if (doc) {ret = doc->resolveReference(ret);} |
| 20 | if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isReference())) return (SkPdfArray*)ret; |
| 21 | // TODO(edisonn): warn about missing default value for optional fields |
| 22 | return NULL; |
| 23 | } |
| 24 | |
| 25 | bool SkPdfWebCaptureInformationDictionary::has_C() const { |
| 26 | return get("C", "") != NULL; |
| 27 | } |