OLD | NEW |
1 #ifndef __DEFINED__SkPdfCatalogDictionary | 1 #ifndef __DEFINED__SkPdfCatalogDictionary |
2 #define __DEFINED__SkPdfCatalogDictionary | 2 #define __DEFINED__SkPdfCatalogDictionary |
3 | 3 |
4 #include "SkPdfEnums_autogen.h" | 4 #include "SkPdfEnums_autogen.h" |
5 #include "SkPdfArray_autogen.h" | 5 #include "SkPdfArray_autogen.h" |
6 #include "SkPdfDictionary_autogen.h" | 6 #include "SkPdfDictionary_autogen.h" |
7 | 7 |
8 class SkPdfCatalogDictionary : public SkPdfDictionary { | 8 class SkPdfCatalogDictionary : public SkPdfDictionary { |
9 public: | 9 public: |
10 virtual SkPdfObjectType getType() const { return kObjectDictionaryCatalogDicti
onary_SkPdfObjectType;} | 10 virtual SkPdfObjectType getType() const { return kCatalogDictionary_SkPdfObjec
tType;} |
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kObjectD
ictionaryCatalogDictionary_SkPdfObjectType + 1);} | 11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kCatalog
Dictionary_SkPdfObjectType + 1);} |
12 public: | 12 public: |
13 virtual SkPdfCatalogDictionary* asCatalogDictionary() {return this;} | 13 virtual SkPdfCatalogDictionary* asCatalogDictionary() {return this;} |
14 virtual const SkPdfCatalogDictionary* asCatalogDictionary() const {return this
;} | 14 virtual const SkPdfCatalogDictionary* asCatalogDictionary() const {return this
;} |
15 | 15 |
16 private: | 16 private: |
17 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return
NULL;} | 17 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return
NULL;} |
18 virtual const SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() co
nst {return NULL;} | 18 virtual const SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() co
nst {return NULL;} |
19 | 19 |
20 virtual SkPdfActionDictionary* asActionDictionary() {return NULL;} | 20 virtual SkPdfActionDictionary* asActionDictionary() {return NULL;} |
21 virtual const SkPdfActionDictionary* asActionDictionary() const {return NULL;} | 21 virtual const SkPdfActionDictionary* asActionDictionary() const {return NULL;} |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 SkPdfDictionary* Pages() const { | 538 SkPdfDictionary* Pages() const { |
539 SkPdfDictionary* ret; | 539 SkPdfDictionary* ret; |
540 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pages
", "", &ret)) return ret; | 540 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pages
", "", &ret)) return ret; |
541 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 541 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
542 return NULL; | 542 return NULL; |
543 } | 543 } |
544 | 544 |
545 bool isPageLabelsANumber() const { | 545 bool isPageLabelsANumber() const { |
546 SkPdfObject* ret = NULL; | 546 SkPdfObject* ret = NULL; |
547 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageLabe
ls", "", &ret)) return false; | 547 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageLabe
ls", "", &ret)) return false; |
548 return ret->podofo()->GetDataType() == ePdfDataType_Real; | 548 return ret->podofo()->GetDataType() == ePdfDataType_Real || ret->podofo()->G
etDataType() == ePdfDataType_Number; |
549 } | 549 } |
550 | 550 |
551 double getPageLabelsAsNumber() const { | 551 double getPageLabelsAsNumber() const { |
552 double ret = 0; | 552 double ret = 0; |
553 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageLabel
s", "", &ret)) return ret; | 553 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageLabel
s", "", &ret)) return ret; |
554 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 554 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
555 return 0; | 555 return 0; |
556 } | 556 } |
557 | 557 |
558 bool isPageLabelsATree() const { | 558 bool isPageLabelsATree() const { |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 SkPdfArray OutputIntents() const { | 702 SkPdfArray OutputIntents() const { |
703 SkPdfArray ret; | 703 SkPdfArray ret; |
704 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OutputInte
nts", "", &ret)) return ret; | 704 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OutputInte
nts", "", &ret)) return ret; |
705 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 705 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
706 return SkPdfArray(); | 706 return SkPdfArray(); |
707 } | 707 } |
708 | 708 |
709 }; | 709 }; |
710 | 710 |
711 #endif // __DEFINED__SkPdfCatalogDictionary | 711 #endif // __DEFINED__SkPdfCatalogDictionary |
OLD | NEW |