Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1625)

Unified Diff: experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfCIDFontDictionary_autogen.cpp

Issue 22900010: pdfviewer: check in pdfapi classes (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfCIDFontDictionary_autogen.cpp
===================================================================
--- experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfCIDFontDictionary_autogen.cpp (revision 0)
+++ experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfCIDFontDictionary_autogen.cpp (revision 0)
@@ -0,0 +1,144 @@
+#include "SkPdfCIDFontDictionary_autogen.h"
+
+
+#include "SkPdfNativeDoc.h"
+SkString SkPdfCIDFontDictionary::Type(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("Type", "");
+ 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 SkPdfCIDFontDictionary::has_Type() const {
+ return get("Type", "") != NULL;
+}
+
+SkString SkPdfCIDFontDictionary::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 SkPdfCIDFontDictionary::has_Subtype() const {
+ return get("Subtype", "") != NULL;
+}
+
+SkString SkPdfCIDFontDictionary::BaseFont(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("BaseFont", "");
+ 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 SkPdfCIDFontDictionary::has_BaseFont() const {
+ return get("BaseFont", "") != NULL;
+}
+
+SkPdfDictionary* SkPdfCIDFontDictionary::CIDSystemInfo(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("CIDSystemInfo", "");
+ if (doc) {ret = doc->resolveReference(ret);}
+ if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret->isReference())) return (SkPdfDictionary*)ret;
+ // TODO(edisonn): warn about missing required field, assert for known good pdfs
+ return NULL;
+}
+
+bool SkPdfCIDFontDictionary::has_CIDSystemInfo() const {
+ return get("CIDSystemInfo", "") != NULL;
+}
+
+SkPdfFontDescriptorDictionary* SkPdfCIDFontDictionary::FontDescriptor(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("FontDescriptor", "");
+ if (doc) {ret = doc->resolveReference(ret);}
+ if ((ret != NULL && ret->isDictionary() && ((SkPdfFontDescriptorDictionary*)ret)->valid()) || (doc == NULL && ret != NULL && ret->isReference())) return (SkPdfFontDescriptorDictionary*)ret;
+ // TODO(edisonn): warn about missing default value for optional fields
+ return NULL;
+}
+
+bool SkPdfCIDFontDictionary::has_FontDescriptor() const {
+ return get("FontDescriptor", "") != NULL;
+}
+
+int64_t SkPdfCIDFontDictionary::DW(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("DW", "");
+ 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 SkPdfCIDFontDictionary::has_DW() const {
+ return get("DW", "") != NULL;
+}
+
+SkPdfArray* SkPdfCIDFontDictionary::W(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("W", "");
+ 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 SkPdfCIDFontDictionary::has_W() const {
+ return get("W", "") != NULL;
+}
+
+SkPdfArray* SkPdfCIDFontDictionary::DW2(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("DW2", "");
+ 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 SkPdfCIDFontDictionary::has_DW2() const {
+ return get("DW2", "") != NULL;
+}
+
+SkPdfArray* SkPdfCIDFontDictionary::W2(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("W2", "");
+ 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 SkPdfCIDFontDictionary::has_W2() const {
+ return get("W2", "") != NULL;
+}
+
+bool SkPdfCIDFontDictionary::isCIDToGIDMapAStream(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("CIDToGIDMap", "");
+ if (doc) {ret = doc->resolveReference(ret);}
+ return ret != NULL && ret->hasStream();
+}
+
+SkPdfStream* SkPdfCIDFontDictionary::getCIDToGIDMapAsStream(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("CIDToGIDMap", "");
+ if (doc) {ret = doc->resolveReference(ret);}
+ if ((ret != NULL && ret->hasStream()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->getStream();
+ // TODO(edisonn): warn about missing default value for optional fields
+ return NULL;
+}
+
+bool SkPdfCIDFontDictionary::isCIDToGIDMapAName(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("CIDToGIDMap", "");
+ if (doc) {ret = doc->resolveReference(ret);}
+ return ret != NULL && ret->isName();
+}
+
+SkString SkPdfCIDFontDictionary::getCIDToGIDMapAsName(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("CIDToGIDMap", "");
+ 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 SkPdfCIDFontDictionary::has_CIDToGIDMap() const {
+ return get("CIDToGIDMap", "") != NULL;
+}
+

Powered by Google App Engine
This is Rietveld 408576698