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