b74bdf0249
git-svn-id: http://skia.googlecode.com/svn/trunk@10842 2bbb7eff-a529-9590-31e7-b0007b416f81
28 lines
1.1 KiB
C++
28 lines
1.1 KiB
C++
#include "SkPdfStructureElementAccessDictionary_autogen.h"
|
|
|
|
|
|
#include "SkPdfNativeDoc.h"
|
|
int64_t SkPdfStructureElementAccessDictionary::StructParent(SkPdfNativeDoc* doc) {
|
|
SkPdfNativeObject* ret = get("StructParent", "");
|
|
if (doc) {ret = doc->resolveReference(ret);}
|
|
if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->intValue();
|
|
// TODO(edisonn): warn about missing default value for optional fields
|
|
return 0;
|
|
}
|
|
|
|
bool SkPdfStructureElementAccessDictionary::has_StructParent() const {
|
|
return get("StructParent", "") != NULL;
|
|
}
|
|
|
|
int64_t SkPdfStructureElementAccessDictionary::StructParents(SkPdfNativeDoc* doc) {
|
|
SkPdfNativeObject* ret = get("StructParents", "");
|
|
if (doc) {ret = doc->resolveReference(ret);}
|
|
if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->intValue();
|
|
// TODO(edisonn): warn about missing default value for optional fields
|
|
return 0;
|
|
}
|
|
|
|
bool SkPdfStructureElementAccessDictionary::has_StructParents() const {
|
|
return get("StructParents", "") != NULL;
|
|
}
|