| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfHideActionDictionary | 1 #ifndef __DEFINED__SkPdfHideActionDictionary |
| 2 #define __DEFINED__SkPdfHideActionDictionary | 2 #define __DEFINED__SkPdfHideActionDictionary |
| 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 // Additional entries specific to a hide action | 9 // Additional entries specific to a hide action |
| 10 class SkPdfHideActionDictionary : public SkPdfDictionary { | 10 class SkPdfHideActionDictionary : public SkPdfDictionary { |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 | 525 |
| 526 SkPdfHideActionDictionary& operator=(const SkPdfHideActionDictionary& from) {t
his->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *t
his;} | 526 SkPdfHideActionDictionary& operator=(const SkPdfHideActionDictionary& from) {t
his->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *t
his;} |
| 527 | 527 |
| 528 /** (Required) The type of action that this dictionary describes; must be Hide f
or a hide | 528 /** (Required) The type of action that this dictionary describes; must be Hide f
or a hide |
| 529 * action. | 529 * action. |
| 530 **/ | 530 **/ |
| 531 bool has_S() const { | 531 bool has_S() const { |
| 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "
", NULL)); | 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "
", NULL)); |
| 533 } | 533 } |
| 534 | 534 |
| 535 std::string S() const { | 535 std::string S() const; |
| 536 std::string ret; | |
| 537 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re
t)) return ret; | |
| 538 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 539 return ""; | |
| 540 } | |
| 541 | |
| 542 /** (Required) The annotation or annotations to be hidden or shown, specified in
any | 536 /** (Required) The annotation or annotations to be hidden or shown, specified in
any |
| 543 * of the following forms: | 537 * of the following forms: |
| 544 * * An indirect reference to an annotation dictionary | 538 * * An indirect reference to an annotation dictionary |
| 545 * * A string giving the fully qualified field name of an interactive form fie
ld whose | 539 * * A string giving the fully qualified field name of an interactive form fie
ld whose |
| 546 * associated widget annotation or annotations are to be affected (see "Fiel
d | 540 * associated widget annotation or annotations are to be affected (see "Fiel
d |
| 547 * Names" on page 532) | 541 * Names" on page 532) |
| 548 * * An array of such dictionaries or strings | 542 * * An array of such dictionaries or strings |
| 549 **/ | 543 **/ |
| 550 bool has_T() const { | 544 bool has_T() const { |
| 551 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "
", NULL)); | 545 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "
", NULL)); |
| 552 } | 546 } |
| 553 | 547 |
| 554 bool isTADictionary() const { | 548 bool isTADictionary() const { |
| 555 SkPdfObject* ret = NULL; | 549 SkPdfObject* ret = NULL; |
| 556 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "",
&ret)) return false; | 550 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "",
&ret)) return false; |
| 557 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary; | 551 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary; |
| 558 } | 552 } |
| 559 | 553 |
| 560 SkPdfDictionary* getTAsDictionary() const { | 554 SkPdfDictionary* getTAsDictionary() const; |
| 561 SkPdfDictionary* ret = NULL; | |
| 562 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "
", &ret)) return ret; | |
| 563 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 564 return NULL; | |
| 565 } | |
| 566 | |
| 567 bool isTAString() const { | 555 bool isTAString() const { |
| 568 SkPdfObject* ret = NULL; | 556 SkPdfObject* ret = NULL; |
| 569 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "",
&ret)) return false; | 557 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "",
&ret)) return false; |
| 570 return ret->podofo()->GetDataType() == ePdfDataType_String || ret->podofo()-
>GetDataType() == ePdfDataType_HexString; | 558 return ret->podofo()->GetDataType() == ePdfDataType_String || ret->podofo()-
>GetDataType() == ePdfDataType_HexString; |
| 571 } | 559 } |
| 572 | 560 |
| 573 std::string getTAsString() const { | 561 std::string getTAsString() const; |
| 574 std::string ret = ""; | |
| 575 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", &
ret)) return ret; | |
| 576 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 577 return ""; | |
| 578 } | |
| 579 | |
| 580 bool isTAArray() const { | 562 bool isTAArray() const { |
| 581 SkPdfObject* ret = NULL; | 563 SkPdfObject* ret = NULL; |
| 582 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "",
&ret)) return false; | 564 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "",
&ret)) return false; |
| 583 return ret->podofo()->GetDataType() == ePdfDataType_Array; | 565 return ret->podofo()->GetDataType() == ePdfDataType_Array; |
| 584 } | 566 } |
| 585 | 567 |
| 586 SkPdfArray* getTAsArray() const { | 568 SkPdfArray* getTAsArray() const; |
| 587 SkPdfArray* ret = NULL; | |
| 588 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", &r
et)) return ret; | |
| 589 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 590 return NULL; | |
| 591 } | |
| 592 | |
| 593 /** (Optional) A flag indicating whether to hide the annotation (true) or show i
t (false). | 569 /** (Optional) A flag indicating whether to hide the annotation (true) or show i
t (false). |
| 594 * Default value: true. | 570 * Default value: true. |
| 595 **/ | 571 **/ |
| 596 bool has_H() const { | 572 bool has_H() const { |
| 597 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "
", NULL)); | 573 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "
", NULL)); |
| 598 } | 574 } |
| 599 | 575 |
| 600 bool H() const { | 576 bool H() const; |
| 601 bool ret; | |
| 602 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "", &re
t)) return ret; | |
| 603 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 604 return false; | |
| 605 } | |
| 606 | |
| 607 }; | 577 }; |
| 608 | 578 |
| 609 #endif // __DEFINED__SkPdfHideActionDictionary | 579 #endif // __DEFINED__SkPdfHideActionDictionary |
| OLD | NEW |