| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfActionDictionary | 1 #ifndef __DEFINED__SkPdfActionDictionary |
| 2 #define __DEFINED__SkPdfActionDictionary | 2 #define __DEFINED__SkPdfActionDictionary |
| 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 common to all action dictionaries |
| 8 class SkPdfActionDictionary : public SkPdfDictionary { | 9 class SkPdfActionDictionary : public SkPdfDictionary { |
| 9 public: | 10 public: |
| 10 virtual SkPdfObjectType getType() const { return kActionDictionary_SkPdfObject
Type;} | 11 virtual SkPdfObjectType getType() const { return kActionDictionary_SkPdfObject
Type;} |
| 11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kActionD
ictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kActionD
ictionary_SkPdfObjectType + 1);} |
| 12 public: | 13 public: |
| 13 virtual SkPdfActionDictionary* asActionDictionary() {return this;} | 14 virtual SkPdfActionDictionary* asActionDictionary() {return this;} |
| 14 virtual const SkPdfActionDictionary* asActionDictionary() const {return this;} | 15 virtual const SkPdfActionDictionary* asActionDictionary() 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 SkPdfActionDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObject*
podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfActionDictionary(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 SkPdfActionDictionary& operator=(const SkPdfActionDictionary& from) {this->fPo
dofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;} | 523 SkPdfActionDictionary& operator=(const SkPdfActionDictionary& from) {this->fPo
dofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;} |
| 523 | 524 |
| 525 /** (Optional) The type of PDF object that this dictionary describes; if |
| 526 * present, must be Action for an action dictionary. |
| 527 **/ |
| 528 bool has_Type() const { |
| 529 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type"
, "", NULL)); |
| 530 } |
| 531 |
| 524 std::string Type() const { | 532 std::string Type() const { |
| 525 std::string ret; | 533 std::string ret; |
| 526 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "",
&ret)) return ret; | 534 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "",
&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 ""; | 536 return ""; |
| 529 } | 537 } |
| 530 | 538 |
| 539 /** (Required) The type of action that this dictionary describes; see Table 8.34 |
| 540 * on page 518 for specific values. |
| 541 **/ |
| 542 bool has_S() const { |
| 543 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "
", NULL)); |
| 544 } |
| 545 |
| 531 std::string S() const { | 546 std::string S() const { |
| 532 std::string ret; | 547 std::string ret; |
| 533 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re
t)) return ret; | 548 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re
t)) return ret; |
| 534 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 549 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 535 return ""; | 550 return ""; |
| 536 } | 551 } |
| 537 | 552 |
| 553 /** (Optional; PDF 1.2) The next action, or sequence of actions, to be per- |
| 554 * formed after this one. The value is either a single action dictionary or an |
| 555 * array of action dictionaries to be performed in order; see below for fur- |
| 556 * ther discussion. |
| 557 **/ |
| 558 bool has_Next() const { |
| 559 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Next"
, "", NULL)); |
| 560 } |
| 561 |
| 538 bool isNextADictionary() const { | 562 bool isNextADictionary() const { |
| 539 SkPdfObject* ret = NULL; | 563 SkPdfObject* ret = NULL; |
| 540 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Next", "
", &ret)) return false; | 564 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Next", "
", &ret)) return false; |
| 541 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary; | 565 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary; |
| 542 } | 566 } |
| 543 | 567 |
| 544 SkPdfDictionary* getNextAsDictionary() const { | 568 SkPdfDictionary* getNextAsDictionary() const { |
| 545 SkPdfDictionary* ret = NULL; | 569 SkPdfDictionary* ret = NULL; |
| 546 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Next"
, "", &ret)) return ret; | 570 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Next"
, "", &ret)) return ret; |
| 547 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 571 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 548 return NULL; | 572 return NULL; |
| 549 } | 573 } |
| 550 | 574 |
| 551 bool isNextAArray() const { | 575 bool isNextAArray() const { |
| 552 SkPdfObject* ret = NULL; | 576 SkPdfObject* ret = NULL; |
| 553 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Next", "
", &ret)) return false; | 577 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Next", "
", &ret)) return false; |
| 554 return ret->podofo()->GetDataType() == ePdfDataType_Array; | 578 return ret->podofo()->GetDataType() == ePdfDataType_Array; |
| 555 } | 579 } |
| 556 | 580 |
| 557 SkPdfArray getNextAsArray() const { | 581 SkPdfArray getNextAsArray() const { |
| 558 SkPdfArray ret = SkPdfArray(); | 582 SkPdfArray ret = SkPdfArray(); |
| 559 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Next", "",
&ret)) return ret; | 583 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Next", "",
&ret)) return ret; |
| 560 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 584 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 561 return SkPdfArray(); | 585 return SkPdfArray(); |
| 562 } | 586 } |
| 563 | 587 |
| 564 }; | 588 }; |
| 565 | 589 |
| 566 #endif // __DEFINED__SkPdfActionDictionary | 590 #endif // __DEFINED__SkPdfActionDictionary |
| OLD | NEW |