blob: 3f47eb8a5413846adba000021a6d2367f4c1b796 [file] [log] [blame]
/*
* Copyright 2013 Google Inc.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkPdfImportDataActionDictionary_autogen.h"
#include "SkPdfNativeDoc.h"
SkString SkPdfImportDataActionDictionary::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 SkPdfImportDataActionDictionary::has_S() const {
return get("S", "") != NULL;
}
SkPdfFileSpec SkPdfImportDataActionDictionary::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 required field, assert for known good pdfs
return SkPdfFileSpec();
}
bool SkPdfImportDataActionDictionary::has_F() const {
return get("F", "") != NULL;
}