OLD | NEW |
1 #ifndef __DEFINED__SkPdfFDFCatalogDictionary | 1 #ifndef __DEFINED__SkPdfFDFCatalogDictionary |
2 #define __DEFINED__SkPdfFDFCatalogDictionary | 2 #define __DEFINED__SkPdfFDFCatalogDictionary |
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 // Entries in the FDF catalog dictionary |
8 class SkPdfFDFCatalogDictionary : public SkPdfDictionary { | 9 class SkPdfFDFCatalogDictionary : public SkPdfDictionary { |
9 public: | 10 public: |
10 virtual SkPdfObjectType getType() const { return kFDFCatalogDictionary_SkPdfOb
jectType;} | 11 virtual SkPdfObjectType getType() const { return kFDFCatalogDictionary_SkPdfOb
jectType;} |
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kFDFCata
logDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kFDFCata
logDictionary_SkPdfObjectType + 1);} |
12 public: | 13 public: |
13 virtual SkPdfFDFCatalogDictionary* asFDFCatalogDictionary() {return this;} | 14 virtual SkPdfFDFCatalogDictionary* asFDFCatalogDictionary() {return this;} |
14 virtual const SkPdfFDFCatalogDictionary* asFDFCatalogDictionary() const {retur
n this;} | 15 virtual const SkPdfFDFCatalogDictionary* asFDFCatalogDictionary() const {retur
n 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 SkPdfFDFCatalogDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObj
ect* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfFDFCatalogDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObj
ect* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} |
519 | 520 |
520 virtual bool valid() const {return true;} | 521 virtual bool valid() const {return true;} |
521 | 522 |
522 SkPdfFDFCatalogDictionary& operator=(const SkPdfFDFCatalogDictionary& from) {t
his->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *t
his;} | 523 SkPdfFDFCatalogDictionary& operator=(const SkPdfFDFCatalogDictionary& from) {t
his->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *t
his;} |
523 | 524 |
| 525 /** (Optional; PDF 1.4) The version of the PDF specification to which |
| 526 * this FDF file conforms (for example, 1.4), if later than the version |
| 527 * specified in the file's header (see "FDF Header" on page 559). If the |
| 528 * header specifies a later version, or if this entry is absent, the docu- |
| 529 * ment conforms to the version specified in the header. |
| 530 * Note: The value of this entry is a name object, not a number, and so |
| 531 * must be preceded by a slash character (/) when written in the FDF file |
| 532 * (for example, /1.4). |
| 533 **/ |
| 534 bool has_Version() const { |
| 535 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Versi
on", "", NULL)); |
| 536 } |
| 537 |
524 std::string Version() const { | 538 std::string Version() const { |
525 std::string ret; | 539 std::string ret; |
526 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Version", "
", &ret)) return ret; | 540 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Version", "
", &ret)) return ret; |
527 // 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 |
528 return ""; | 542 return ""; |
529 } | 543 } |
530 | 544 |
| 545 /** (Required) The FDF dictionary for this file (see Table 8.69). |
| 546 **/ |
| 547 bool has_FDF() const { |
| 548 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FDF",
"", NULL)); |
| 549 } |
| 550 |
531 SkPdfDictionary* FDF() const { | 551 SkPdfDictionary* FDF() const { |
532 SkPdfDictionary* ret; | 552 SkPdfDictionary* ret; |
533 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FDF",
"", &ret)) return ret; | 553 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FDF",
"", &ret)) return ret; |
534 // 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 |
535 return NULL; | 555 return NULL; |
536 } | 556 } |
537 | 557 |
538 }; | 558 }; |
539 | 559 |
540 #endif // __DEFINED__SkPdfFDFCatalogDictionary | 560 #endif // __DEFINED__SkPdfFDFCatalogDictionary |
OLD | NEW |