OLD | NEW |
1 #ifndef __DEFINED__SkPdfFDFFileAnnotationDictionary | 1 #ifndef __DEFINED__SkPdfFDFFileAnnotationDictionary |
2 #define __DEFINED__SkPdfFDFFileAnnotationDictionary | 2 #define __DEFINED__SkPdfFDFFileAnnotationDictionary |
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 annotation dictionaries in an FDF file |
8 class SkPdfFDFFileAnnotationDictionary : public SkPdfDictionary { | 9 class SkPdfFDFFileAnnotationDictionary : public SkPdfDictionary { |
9 public: | 10 public: |
10 virtual SkPdfObjectType getType() const { return kFDFFileAnnotationDictionary_
SkPdfObjectType;} | 11 virtual SkPdfObjectType getType() const { return kFDFFileAnnotationDictionary_
SkPdfObjectType;} |
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kFDFFile
AnnotationDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kFDFFile
AnnotationDictionary_SkPdfObjectType + 1);} |
12 public: | 13 public: |
13 virtual SkPdfFDFFileAnnotationDictionary* asFDFFileAnnotationDictionary() {ret
urn this;} | 14 virtual SkPdfFDFFileAnnotationDictionary* asFDFFileAnnotationDictionary() {ret
urn this;} |
14 virtual const SkPdfFDFFileAnnotationDictionary* asFDFFileAnnotationDictionary(
) const {return this;} | 15 virtual const SkPdfFDFFileAnnotationDictionary* asFDFFileAnnotationDictionary(
) 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 SkPdfFDFFileAnnotationDictionary(const PdfMemDocument* podofoDoc = NULL, const
PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfFDFFileAnnotationDictionary(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 SkPdfFDFFileAnnotationDictionary& operator=(const SkPdfFDFFileAnnotationDictio
nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo
Obj; return *this;} | 523 SkPdfFDFFileAnnotationDictionary& operator=(const SkPdfFDFFileAnnotationDictio
nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo
Obj; return *this;} |
523 | 524 |
| 525 /** (Required for annotations in FDF files) The ordinal page number on which |
| 526 * this annotation should appear, where page 0 is the first page. |
| 527 **/ |
| 528 bool has_Page() const { |
| 529 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Page"
, "", NULL)); |
| 530 } |
| 531 |
524 long Page() const { | 532 long Page() const { |
525 long ret; | 533 long ret; |
526 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Page", "",
&ret)) return ret; | 534 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Page", "",
&ret)) return ret; |
527 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 535 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
528 return 0; | 536 return 0; |
529 } | 537 } |
530 | 538 |
531 }; | 539 }; |
532 | 540 |
533 #endif // __DEFINED__SkPdfFDFFileAnnotationDictionary | 541 #endif // __DEFINED__SkPdfFDFFileAnnotationDictionary |
OLD | NEW |