| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright 2013 Google Inc. | |
| 3 | |
| 4 * Use of this source code is governed by a BSD-style license that can be | |
| 5 * found in the LICENSE file. | |
| 6 */ | |
| 7 | |
| 8 #include "SkPdfFileSpecificationDictionary_autogen.h" | |
| 9 #include "SkPdfNativeDoc.h" | |
| 10 | |
| 11 SkString SkPdfFileSpecificationDictionary::Type(SkPdfNativeDoc* doc) { | |
| 12 SkPdfNativeObject* ret = get("Type", ""); | |
| 13 if (doc) {ret = doc->resolveReference(ret);} | |
| 14 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe
ference())) return ret->nameValue2(); | |
| 15 // TODO(edisonn): warn about missing default value for optional fields | |
| 16 return SkString(); | |
| 17 } | |
| 18 | |
| 19 bool SkPdfFileSpecificationDictionary::has_Type() const { | |
| 20 return get("Type", "") != NULL; | |
| 21 } | |
| 22 | |
| 23 SkString SkPdfFileSpecificationDictionary::FS(SkPdfNativeDoc* doc) { | |
| 24 SkPdfNativeObject* ret = get("FS", ""); | |
| 25 if (doc) {ret = doc->resolveReference(ret);} | |
| 26 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe
ference())) return ret->nameValue2(); | |
| 27 // TODO(edisonn): warn about missing default value for optional fields | |
| 28 return SkString(); | |
| 29 } | |
| 30 | |
| 31 bool SkPdfFileSpecificationDictionary::has_FS() const { | |
| 32 return get("FS", "") != NULL; | |
| 33 } | |
| 34 | |
| 35 SkString SkPdfFileSpecificationDictionary::F(SkPdfNativeDoc* doc) { | |
| 36 SkPdfNativeObject* ret = get("F", ""); | |
| 37 if (doc) {ret = doc->resolveReference(ret);} | |
| 38 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret-
>isReference())) return ret->stringValue2(); | |
| 39 // TODO(edisonn): warn about missing default value for optional fields | |
| 40 return SkString(); | |
| 41 } | |
| 42 | |
| 43 bool SkPdfFileSpecificationDictionary::has_F() const { | |
| 44 return get("F", "") != NULL; | |
| 45 } | |
| 46 | |
| 47 SkString SkPdfFileSpecificationDictionary::DOS(SkPdfNativeDoc* doc) { | |
| 48 SkPdfNativeObject* ret = get("DOS", ""); | |
| 49 if (doc) {ret = doc->resolveReference(ret);} | |
| 50 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret-
>isReference())) return ret->stringValue2(); | |
| 51 // TODO(edisonn): warn about missing default value for optional fields | |
| 52 return SkString(); | |
| 53 } | |
| 54 | |
| 55 bool SkPdfFileSpecificationDictionary::has_DOS() const { | |
| 56 return get("DOS", "") != NULL; | |
| 57 } | |
| 58 | |
| 59 SkString SkPdfFileSpecificationDictionary::Mac(SkPdfNativeDoc* doc) { | |
| 60 SkPdfNativeObject* ret = get("Mac", ""); | |
| 61 if (doc) {ret = doc->resolveReference(ret);} | |
| 62 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret-
>isReference())) return ret->stringValue2(); | |
| 63 // TODO(edisonn): warn about missing default value for optional fields | |
| 64 return SkString(); | |
| 65 } | |
| 66 | |
| 67 bool SkPdfFileSpecificationDictionary::has_Mac() const { | |
| 68 return get("Mac", "") != NULL; | |
| 69 } | |
| 70 | |
| 71 SkString SkPdfFileSpecificationDictionary::Unix(SkPdfNativeDoc* doc) { | |
| 72 SkPdfNativeObject* ret = get("Unix", ""); | |
| 73 if (doc) {ret = doc->resolveReference(ret);} | |
| 74 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret-
>isReference())) return ret->stringValue2(); | |
| 75 // TODO(edisonn): warn about missing default value for optional fields | |
| 76 return SkString(); | |
| 77 } | |
| 78 | |
| 79 bool SkPdfFileSpecificationDictionary::has_Unix() const { | |
| 80 return get("Unix", "") != NULL; | |
| 81 } | |
| 82 | |
| 83 SkPdfArray* SkPdfFileSpecificationDictionary::ID(SkPdfNativeDoc* doc) { | |
| 84 SkPdfNativeObject* ret = get("ID", ""); | |
| 85 if (doc) {ret = doc->resolveReference(ret);} | |
| 86 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR
eference())) return (SkPdfArray*)ret; | |
| 87 // TODO(edisonn): warn about missing default value for optional fields | |
| 88 return NULL; | |
| 89 } | |
| 90 | |
| 91 bool SkPdfFileSpecificationDictionary::has_ID() const { | |
| 92 return get("ID", "") != NULL; | |
| 93 } | |
| 94 | |
| 95 bool SkPdfFileSpecificationDictionary::V(SkPdfNativeDoc* doc) { | |
| 96 SkPdfNativeObject* ret = get("V", ""); | |
| 97 if (doc) {ret = doc->resolveReference(ret);} | |
| 98 if ((ret != NULL && ret->isBoolean()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->boolValue(); | |
| 99 // TODO(edisonn): warn about missing default value for optional fields | |
| 100 return false; | |
| 101 } | |
| 102 | |
| 103 bool SkPdfFileSpecificationDictionary::has_V() const { | |
| 104 return get("V", "") != NULL; | |
| 105 } | |
| 106 | |
| 107 SkPdfDictionary* SkPdfFileSpecificationDictionary::EF(SkPdfNativeDoc* doc) { | |
| 108 SkPdfNativeObject* ret = get("EF", ""); | |
| 109 if (doc) {ret = doc->resolveReference(ret);} | |
| 110 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret
->isReference())) return (SkPdfDictionary*)ret; | |
| 111 // TODO(edisonn): warn about missing default value for optional fields | |
| 112 return NULL; | |
| 113 } | |
| 114 | |
| 115 bool SkPdfFileSpecificationDictionary::has_EF() const { | |
| 116 return get("EF", "") != NULL; | |
| 117 } | |
| 118 | |
| 119 SkPdfDictionary* SkPdfFileSpecificationDictionary::RF(SkPdfNativeDoc* doc) { | |
| 120 SkPdfNativeObject* ret = get("RF", ""); | |
| 121 if (doc) {ret = doc->resolveReference(ret);} | |
| 122 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret
->isReference())) return (SkPdfDictionary*)ret; | |
| 123 // TODO(edisonn): warn about missing default value for optional fields | |
| 124 return NULL; | |
| 125 } | |
| 126 | |
| 127 bool SkPdfFileSpecificationDictionary::has_RF() const { | |
| 128 return get("RF", "") != NULL; | |
| 129 } | |
| OLD | NEW |