double SkPdfBlockLevelStructureElementsDictionary::TextIndent(SkPdfNativeDoc* doc) { SkPdfNativeObject* ret = get("TextIndent", ""); if (doc) {ret = doc->resolveReference(ret);} if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->numberValue(); // TODO(edisonn): warn about missing default value for optional fields return 0; }
double SkPdfSoundActionDictionary::Volume(SkPdfNativeDoc* doc) { SkPdfNativeObject* ret = get("Volume", ""); if (doc) {ret = doc->resolveReference(ret);} if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->numberValue(); // TODO(edisonn): warn about missing default value for optional fields return 0; }
double SkPdfType1PatternDictionary::YStep(SkPdfNativeDoc* doc) { SkPdfNativeObject* ret = get("YStep", ""); if (doc) {ret = doc->resolveReference(ret);} if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->numberValue(); // TODO(edisonn): warn about missing required field, assert for known good pdfs return 0; }
double SkPdfStructureTreeRootDictionary::getParentTreeAsNumber(SkPdfNativeDoc* doc) { SkPdfNativeObject* ret = get("ParentTree", ""); if (doc) {ret = doc->resolveReference(ret);} if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->numberValue(); // TODO(edisonn): warn about missing default value for optional fields return 0; }
bool SkPdfBlockLevelStructureElementsDictionary::isWidthANumber(SkPdfNativeDoc* doc) { SkPdfNativeObject* ret = get("Width", ""); if (doc) {ret = doc->resolveReference(ret);} return ret != NULL && ret->isNumber(); }
bool SkPdfStructureTreeRootDictionary::isParentTreeANumber(SkPdfNativeDoc* doc) { SkPdfNativeObject* ret = get("ParentTree", ""); if (doc) {ret = doc->resolveReference(ret);} return ret != NULL && ret->isNumber(); }