| 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 "SkPdfStructureElementAccessDictionary_autogen.h" | |
| 9 #include "SkPdfNativeDoc.h" | |
| 10 | |
| 11 int64_t SkPdfStructureElementAccessDictionary::StructParent(SkPdfNativeDoc* doc)
{ | |
| 12 SkPdfNativeObject* ret = get("StructParent", ""); | |
| 13 if (doc) {ret = doc->resolveReference(ret);} | |
| 14 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->intValue(); | |
| 15 // TODO(edisonn): warn about missing default value for optional fields | |
| 16 return 0; | |
| 17 } | |
| 18 | |
| 19 bool SkPdfStructureElementAccessDictionary::has_StructParent() const { | |
| 20 return get("StructParent", "") != NULL; | |
| 21 } | |
| 22 | |
| 23 int64_t SkPdfStructureElementAccessDictionary::StructParents(SkPdfNativeDoc* doc
) { | |
| 24 SkPdfNativeObject* ret = get("StructParents", ""); | |
| 25 if (doc) {ret = doc->resolveReference(ret);} | |
| 26 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->intValue(); | |
| 27 // TODO(edisonn): warn about missing default value for optional fields | |
| 28 return 0; | |
| 29 } | |
| 30 | |
| 31 bool SkPdfStructureElementAccessDictionary::has_StructParents() const { | |
| 32 return get("StructParents", "") != NULL; | |
| 33 } | |
| OLD | NEW |