blob: f136e2d723c39feefec58276cc86133b2a8ae62c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include "SkPdfFDFNamedPageReferenceDictionary_autogen.h"
#include "SkPdfNativeDoc.h"
SkString SkPdfFDFNamedPageReferenceDictionary::Name(SkPdfNativeDoc* doc) {
SkPdfNativeObject* ret = get("Name", "");
if (doc) {ret = doc->resolveReference(ret);}
if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->stringValue2();
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return SkString();
}
bool SkPdfFDFNamedPageReferenceDictionary::has_Name() const {
return get("Name", "") != NULL;
}
SkPdfFileSpec SkPdfFDFNamedPageReferenceDictionary::F(SkPdfNativeDoc* doc) {
SkPdfNativeObject* ret = get("F", "");
if (doc) {ret = doc->resolveReference(ret);}
if ((ret != NULL && false) || (doc == NULL && ret != NULL && ret->isReference())) return ret->fileSpecValue();
// TODO(edisonn): warn about missing default value for optional fields
return SkPdfFileSpec();
}
bool SkPdfFDFNamedPageReferenceDictionary::has_F() const {
return get("F", "") != NULL;
}
|