diff options
author | 2013-08-20 18:56:49 +0000 | |
---|---|---|
committer | 2013-08-20 18:56:49 +0000 | |
commit | 8cee797901763ab0922eb9ef484cfdcbc94bee54 (patch) | |
tree | 8d63c0e8be729fd31c7f0c7256ace37943d9b97e /experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFileAttachmentAnnotationDictionary_autogen.cpp | |
parent | 327c081e4b908b0124d07cf94abfa8ed067d348e (diff) |
pdfviewer: check in pdfapi classes
Review URL: https://codereview.chromium.org/22900010
git-svn-id: http://skia.googlecode.com/svn/trunk@10834 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFileAttachmentAnnotationDictionary_autogen.cpp')
-rw-r--r-- | experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFileAttachmentAnnotationDictionary_autogen.cpp | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFileAttachmentAnnotationDictionary_autogen.cpp b/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFileAttachmentAnnotationDictionary_autogen.cpp new file mode 100644 index 0000000000..4bf67fa37b --- /dev/null +++ b/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFileAttachmentAnnotationDictionary_autogen.cpp @@ -0,0 +1,52 @@ +#include "SkPdfFileAttachmentAnnotationDictionary_autogen.h" + + +#include "SkPdfNativeDoc.h" +SkString SkPdfFileAttachmentAnnotationDictionary::Subtype(SkPdfNativeDoc* doc) { + SkPdfNativeObject* ret = get("Subtype", ""); + 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 SkPdfFileAttachmentAnnotationDictionary::has_Subtype() const { + return get("Subtype", "") != NULL; +} + +SkPdfFileSpec SkPdfFileAttachmentAnnotationDictionary::FS(SkPdfNativeDoc* doc) { + SkPdfNativeObject* ret = get("FS", ""); + 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 SkPdfFileAttachmentAnnotationDictionary::has_FS() const { + return get("FS", "") != NULL; +} + +SkString SkPdfFileAttachmentAnnotationDictionary::Contents(SkPdfNativeDoc* doc) { + SkPdfNativeObject* ret = get("Contents", ""); + 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 SkPdfFileAttachmentAnnotationDictionary::has_Contents() const { + return get("Contents", "") != NULL; +} + +SkString SkPdfFileAttachmentAnnotationDictionary::Name(SkPdfNativeDoc* doc) { + SkPdfNativeObject* ret = get("Name", ""); + 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 default value for optional fields + return SkString(); +} + +bool SkPdfFileAttachmentAnnotationDictionary::has_Name() const { + return get("Name", "") != NULL; +} + |