blob: ff125a87da3aee188a736331ec1fa90f6a956adf (
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
28
29
30
31
32
33
34
35
36
37
38
39
|
#include "SkPdfResetFormActionDictionary_autogen.h"
#include "SkPdfNativeDoc.h"
SkString SkPdfResetFormActionDictionary::S(SkPdfNativeDoc* doc) {
SkPdfNativeObject* ret = get("S", "");
if (doc) {ret = doc->resolveReference(ret);}
if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->nameValue2();
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return SkString();
}
bool SkPdfResetFormActionDictionary::has_S() const {
return get("S", "") != NULL;
}
SkPdfArray* SkPdfResetFormActionDictionary::Fields(SkPdfNativeDoc* doc) {
SkPdfNativeObject* ret = get("Fields", "");
if (doc) {ret = doc->resolveReference(ret);}
if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isReference())) return (SkPdfArray*)ret;
// TODO(edisonn): warn about missing default value for optional fields
return NULL;
}
bool SkPdfResetFormActionDictionary::has_Fields() const {
return get("Fields", "") != NULL;
}
int64_t SkPdfResetFormActionDictionary::Flags(SkPdfNativeDoc* doc) {
SkPdfNativeObject* ret = get("Flags", "");
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 SkPdfResetFormActionDictionary::has_Flags() const {
return get("Flags", "") != NULL;
}
|