1cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com/* 2cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com * Copyright 2013 Google Inc. 38cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com 4cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com * Use of this source code is governed by a BSD-style license that can be 5cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com * found in the LICENSE file. 6cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com */ 78cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com 8cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com#include "SkPdfURIDictionary_autogen.h" 98cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com#include "SkPdfNativeDoc.h" 10cf2cfa174ca878c144e17e9fc60ca8e9070d7dededisonn@google.com 118cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.comSkString SkPdfURIDictionary::Base(SkPdfNativeDoc* doc) { 128cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com SkPdfNativeObject* ret = get("Base", ""); 138cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com if (doc) {ret = doc->resolveReference(ret);} 148cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->stringValue2(); 158cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com // TODO(edisonn): warn about missing default value for optional fields 168cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com return SkString(); 178cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com} 188cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com 198cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.combool SkPdfURIDictionary::has_Base() const { 208cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com return get("Base", "") != NULL; 218cee797901763ab0922eb9ef484cfdcbc94bee54edisonn@google.com} 22