| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfComponentsWithMetadataDictionary | 1 #ifndef __DEFINED__SkPdfComponentsWithMetadataDictionary |
| 2 #define __DEFINED__SkPdfComponentsWithMetadataDictionary | 2 #define __DEFINED__SkPdfComponentsWithMetadataDictionary |
| 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 // Additional entry for components having metadata |
| 8 class SkPdfComponentsWithMetadataDictionary : public SkPdfDictionary { | 9 class SkPdfComponentsWithMetadataDictionary : public SkPdfDictionary { |
| 9 public: | 10 public: |
| 10 virtual SkPdfObjectType getType() const { return kComponentsWithMetadataDictio
nary_SkPdfObjectType;} | 11 virtual SkPdfObjectType getType() const { return kComponentsWithMetadataDictio
nary_SkPdfObjectType;} |
| 11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kCompone
ntsWithMetadataDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kCompone
ntsWithMetadataDictionary_SkPdfObjectType + 1);} |
| 12 public: | 13 public: |
| 13 virtual SkPdfComponentsWithMetadataDictionary* asComponentsWithMetadataDiction
ary() {return this;} | 14 virtual SkPdfComponentsWithMetadataDictionary* asComponentsWithMetadataDiction
ary() {return this;} |
| 14 virtual const SkPdfComponentsWithMetadataDictionary* asComponentsWithMetadataD
ictionary() const {return this;} | 15 virtual const SkPdfComponentsWithMetadataDictionary* asComponentsWithMetadataD
ictionary() const {return this;} |
| 15 | 16 |
| 16 private: | 17 private: |
| 17 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return
NULL;} | 18 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return
NULL;} |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 | 515 |
| 515 public: | 516 public: |
| 516 private: | 517 private: |
| 517 public: | 518 public: |
| 518 SkPdfComponentsWithMetadataDictionary(const PdfMemDocument* podofoDoc = NULL,
const PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfComponentsWithMetadataDictionary(const PdfMemDocument* podofoDoc = NULL,
const PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} |
| 519 | 520 |
| 520 virtual bool valid() const {return true;} | 521 virtual bool valid() const {return true;} |
| 521 | 522 |
| 522 SkPdfComponentsWithMetadataDictionary& operator=(const SkPdfComponentsWithMeta
dataDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = fr
om.fPodofoObj; return *this;} | 523 SkPdfComponentsWithMetadataDictionary& operator=(const SkPdfComponentsWithMeta
dataDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = fr
om.fPodofoObj; return *this;} |
| 523 | 524 |
| 525 /** (Optional; PDF 1.4) A metadata stream containing metadata for the component. |
| 526 **/ |
| 527 bool has_Metadata() const { |
| 528 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metad
ata", "", NULL)); |
| 529 } |
| 530 |
| 524 SkPdfStream Metadata() const { | 531 SkPdfStream Metadata() const { |
| 525 SkPdfStream ret; | 532 SkPdfStream ret; |
| 526 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata"
, "", &ret)) return ret; | 533 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata"
, "", &ret)) return ret; |
| 527 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 534 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 528 return SkPdfStream(); | 535 return SkPdfStream(); |
| 529 } | 536 } |
| 530 | 537 |
| 531 }; | 538 }; |
| 532 | 539 |
| 533 #endif // __DEFINED__SkPdfComponentsWithMetadataDictionary | 540 #endif // __DEFINED__SkPdfComponentsWithMetadataDictionary |
| OLD | NEW |