skia2/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfImportDataActionDictionary_autogen.cpp

34 lines
1.1 KiB
C++

/*
* 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;
}