| 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 "SkPdfViewerPreferencesDictionary_autogen.h" | |
| 9 #include "SkPdfNativeDoc.h" | |
| 10 | |
| 11 bool SkPdfViewerPreferencesDictionary::HideToolbar(SkPdfNativeDoc* doc) { | |
| 12 SkPdfNativeObject* ret = get("HideToolbar", ""); | |
| 13 if (doc) {ret = doc->resolveReference(ret);} | |
| 14 if ((ret != NULL && ret->isBoolean()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->boolValue(); | |
| 15 // TODO(edisonn): warn about missing default value for optional fields | |
| 16 return false; | |
| 17 } | |
| 18 | |
| 19 bool SkPdfViewerPreferencesDictionary::has_HideToolbar() const { | |
| 20 return get("HideToolbar", "") != NULL; | |
| 21 } | |
| 22 | |
| 23 bool SkPdfViewerPreferencesDictionary::HideMenubar(SkPdfNativeDoc* doc) { | |
| 24 SkPdfNativeObject* ret = get("HideMenubar", ""); | |
| 25 if (doc) {ret = doc->resolveReference(ret);} | |
| 26 if ((ret != NULL && ret->isBoolean()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->boolValue(); | |
| 27 // TODO(edisonn): warn about missing default value for optional fields | |
| 28 return false; | |
| 29 } | |
| 30 | |
| 31 bool SkPdfViewerPreferencesDictionary::has_HideMenubar() const { | |
| 32 return get("HideMenubar", "") != NULL; | |
| 33 } | |
| 34 | |
| 35 bool SkPdfViewerPreferencesDictionary::HideWindowUI(SkPdfNativeDoc* doc) { | |
| 36 SkPdfNativeObject* ret = get("HideWindowUI", ""); | |
| 37 if (doc) {ret = doc->resolveReference(ret);} | |
| 38 if ((ret != NULL && ret->isBoolean()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->boolValue(); | |
| 39 // TODO(edisonn): warn about missing default value for optional fields | |
| 40 return false; | |
| 41 } | |
| 42 | |
| 43 bool SkPdfViewerPreferencesDictionary::has_HideWindowUI() const { | |
| 44 return get("HideWindowUI", "") != NULL; | |
| 45 } | |
| 46 | |
| 47 bool SkPdfViewerPreferencesDictionary::FitWindow(SkPdfNativeDoc* doc) { | |
| 48 SkPdfNativeObject* ret = get("FitWindow", ""); | |
| 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 SkPdfViewerPreferencesDictionary::has_FitWindow() const { | |
| 56 return get("FitWindow", "") != NULL; | |
| 57 } | |
| 58 | |
| 59 bool SkPdfViewerPreferencesDictionary::CenterWindow(SkPdfNativeDoc* doc) { | |
| 60 SkPdfNativeObject* ret = get("CenterWindow", ""); | |
| 61 if (doc) {ret = doc->resolveReference(ret);} | |
| 62 if ((ret != NULL && ret->isBoolean()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->boolValue(); | |
| 63 // TODO(edisonn): warn about missing default value for optional fields | |
| 64 return false; | |
| 65 } | |
| 66 | |
| 67 bool SkPdfViewerPreferencesDictionary::has_CenterWindow() const { | |
| 68 return get("CenterWindow", "") != NULL; | |
| 69 } | |
| 70 | |
| 71 bool SkPdfViewerPreferencesDictionary::DisplayDocTitle(SkPdfNativeDoc* doc) { | |
| 72 SkPdfNativeObject* ret = get("DisplayDocTitle", ""); | |
| 73 if (doc) {ret = doc->resolveReference(ret);} | |
| 74 if ((ret != NULL && ret->isBoolean()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->boolValue(); | |
| 75 // TODO(edisonn): warn about missing default value for optional fields | |
| 76 return false; | |
| 77 } | |
| 78 | |
| 79 bool SkPdfViewerPreferencesDictionary::has_DisplayDocTitle() const { | |
| 80 return get("DisplayDocTitle", "") != NULL; | |
| 81 } | |
| 82 | |
| 83 SkString SkPdfViewerPreferencesDictionary::NonFullScreenPageMode(SkPdfNativeDoc*
doc) { | |
| 84 SkPdfNativeObject* ret = get("NonFullScreenPageMode", ""); | |
| 85 if (doc) {ret = doc->resolveReference(ret);} | |
| 86 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe
ference())) return ret->nameValue2(); | |
| 87 // TODO(edisonn): warn about missing default value for optional fields | |
| 88 return SkString(); | |
| 89 } | |
| 90 | |
| 91 bool SkPdfViewerPreferencesDictionary::has_NonFullScreenPageMode() const { | |
| 92 return get("NonFullScreenPageMode", "") != NULL; | |
| 93 } | |
| 94 | |
| 95 SkString SkPdfViewerPreferencesDictionary::Direction(SkPdfNativeDoc* doc) { | |
| 96 SkPdfNativeObject* ret = get("Direction", ""); | |
| 97 if (doc) {ret = doc->resolveReference(ret);} | |
| 98 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe
ference())) return ret->nameValue2(); | |
| 99 // TODO(edisonn): warn about missing default value for optional fields | |
| 100 return SkString(); | |
| 101 } | |
| 102 | |
| 103 bool SkPdfViewerPreferencesDictionary::has_Direction() const { | |
| 104 return get("Direction", "") != NULL; | |
| 105 } | |
| 106 | |
| 107 SkString SkPdfViewerPreferencesDictionary::ViewArea(SkPdfNativeDoc* doc) { | |
| 108 SkPdfNativeObject* ret = get("ViewArea", ""); | |
| 109 if (doc) {ret = doc->resolveReference(ret);} | |
| 110 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe
ference())) return ret->nameValue2(); | |
| 111 // TODO(edisonn): warn about missing default value for optional fields | |
| 112 return SkString(); | |
| 113 } | |
| 114 | |
| 115 bool SkPdfViewerPreferencesDictionary::has_ViewArea() const { | |
| 116 return get("ViewArea", "") != NULL; | |
| 117 } | |
| 118 | |
| 119 SkString SkPdfViewerPreferencesDictionary::ViewClip(SkPdfNativeDoc* doc) { | |
| 120 SkPdfNativeObject* ret = get("ViewClip", ""); | |
| 121 if (doc) {ret = doc->resolveReference(ret);} | |
| 122 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe
ference())) return ret->nameValue2(); | |
| 123 // TODO(edisonn): warn about missing default value for optional fields | |
| 124 return SkString(); | |
| 125 } | |
| 126 | |
| 127 bool SkPdfViewerPreferencesDictionary::has_ViewClip() const { | |
| 128 return get("ViewClip", "") != NULL; | |
| 129 } | |
| 130 | |
| 131 SkString SkPdfViewerPreferencesDictionary::PrintArea(SkPdfNativeDoc* doc) { | |
| 132 SkPdfNativeObject* ret = get("PrintArea", ""); | |
| 133 if (doc) {ret = doc->resolveReference(ret);} | |
| 134 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe
ference())) return ret->nameValue2(); | |
| 135 // TODO(edisonn): warn about missing default value for optional fields | |
| 136 return SkString(); | |
| 137 } | |
| 138 | |
| 139 bool SkPdfViewerPreferencesDictionary::has_PrintArea() const { | |
| 140 return get("PrintArea", "") != NULL; | |
| 141 } | |
| 142 | |
| 143 SkString SkPdfViewerPreferencesDictionary::PrintClip(SkPdfNativeDoc* doc) { | |
| 144 SkPdfNativeObject* ret = get("PrintClip", ""); | |
| 145 if (doc) {ret = doc->resolveReference(ret);} | |
| 146 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe
ference())) return ret->nameValue2(); | |
| 147 // TODO(edisonn): warn about missing default value for optional fields | |
| 148 return SkString(); | |
| 149 } | |
| 150 | |
| 151 bool SkPdfViewerPreferencesDictionary::has_PrintClip() const { | |
| 152 return get("PrintClip", "") != NULL; | |
| 153 } | |
| OLD | NEW |