| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfFieldDictionary | 1 #ifndef __DEFINED__SkPdfFieldDictionary |
| 2 #define __DEFINED__SkPdfFieldDictionary | 2 #define __DEFINED__SkPdfFieldDictionary |
| 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 field dictionaries | 9 // Entries common to all field dictionaries |
| 10 class SkPdfFieldDictionary : public SkPdfDictionary { | 10 class SkPdfFieldDictionary : public SkPdfDictionary { |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 * Note: This entry may be present in a nonterminal field (one whose descendant
s | 534 * Note: This entry may be present in a nonterminal field (one whose descendant
s |
| 535 * are themselves fields) in order to provide an inheritable FT value. However,
a | 535 * are themselves fields) in order to provide an inheritable FT value. However,
a |
| 536 * nonterminal field does not logically have a type of its own; it is merely a
contain- | 536 * nonterminal field does not logically have a type of its own; it is merely a
contain- |
| 537 * er for inheritable attributes that are intended for descendant terminal fiel
ds of | 537 * er for inheritable attributes that are intended for descendant terminal fiel
ds of |
| 538 * any type. | 538 * any type. |
| 539 **/ | 539 **/ |
| 540 bool has_FT() const { | 540 bool has_FT() const { |
| 541 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FT",
"", NULL)); | 541 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FT",
"", NULL)); |
| 542 } | 542 } |
| 543 | 543 |
| 544 std::string FT() const { | 544 std::string FT() const; |
| 545 std::string ret; | |
| 546 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FT", "", &r
et)) return ret; | |
| 547 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 548 return ""; | |
| 549 } | |
| 550 | |
| 551 /** (Required if this field is the child of another in the field hierarchy; abse
nt other- | 545 /** (Required if this field is the child of another in the field hierarchy; abse
nt other- |
| 552 * wise) The field that is the immediate parent of this one (the field, if any, | 546 * wise) The field that is the immediate parent of this one (the field, if any, |
| 553 * whose Kids array includes this field). A field can have at most one parent;
that | 547 * whose Kids array includes this field). A field can have at most one parent;
that |
| 554 * is, it can be included in the Kids array of at most one other field. | 548 * is, it can be included in the Kids array of at most one other field. |
| 555 **/ | 549 **/ |
| 556 bool has_Parent() const { | 550 bool has_Parent() const { |
| 557 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Paren
t", "", NULL)); | 551 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Paren
t", "", NULL)); |
| 558 } | 552 } |
| 559 | 553 |
| 560 SkPdfDictionary* Parent() const { | 554 SkPdfDictionary* Parent() const; |
| 561 SkPdfDictionary* ret; | |
| 562 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Paren
t", "", &ret)) return ret; | |
| 563 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 564 return NULL; | |
| 565 } | |
| 566 | |
| 567 /** (Optional) An array of indirect references to the immediate children of this | 555 /** (Optional) An array of indirect references to the immediate children of this |
| 568 * field. | 556 * field. |
| 569 **/ | 557 **/ |
| 570 bool has_Kids() const { | 558 bool has_Kids() const { |
| 571 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids"
, "", NULL)); | 559 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids"
, "", NULL)); |
| 572 } | 560 } |
| 573 | 561 |
| 574 SkPdfArray* Kids() const { | 562 SkPdfArray* Kids() const; |
| 575 SkPdfArray* ret; | |
| 576 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "",
&ret)) return ret; | |
| 577 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 578 return NULL; | |
| 579 } | |
| 580 | |
| 581 /** (Optional) The partial field name (see "Field Names," below; see also imple- | 563 /** (Optional) The partial field name (see "Field Names," below; see also imple- |
| 582 * mentation notes 82 and 83 in Appendix H). | 564 * mentation notes 82 and 83 in Appendix H). |
| 583 **/ | 565 **/ |
| 584 bool has_T() const { | 566 bool has_T() const { |
| 585 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "
", NULL)); | 567 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "
", NULL)); |
| 586 } | 568 } |
| 587 | 569 |
| 588 std::string T() const { | 570 std::string T() const; |
| 589 std::string ret; | |
| 590 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", &
ret)) return ret; | |
| 591 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 592 return ""; | |
| 593 } | |
| 594 | |
| 595 /** (Optional; PDF 1.3) An alternate field name, to be used in place of the actu
al | 571 /** (Optional; PDF 1.3) An alternate field name, to be used in place of the actu
al |
| 596 * field name wherever the field must be identified in the user interface (such
as | 572 * field name wherever the field must be identified in the user interface (such
as |
| 597 * in error or status messages referring to the field). This text is also usefu
l | 573 * in error or status messages referring to the field). This text is also usefu
l |
| 598 * when extracting the document's contents in support of accessibility to dis- | 574 * when extracting the document's contents in support of accessibility to dis- |
| 599 * abled users or for other purposes (see Section 9.8.2, "Alternate Descrip- | 575 * abled users or for other purposes (see Section 9.8.2, "Alternate Descrip- |
| 600 * tions"). | 576 * tions"). |
| 601 **/ | 577 **/ |
| 602 bool has_TU() const { | 578 bool has_TU() const { |
| 603 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TU",
"", NULL)); | 579 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TU",
"", NULL)); |
| 604 } | 580 } |
| 605 | 581 |
| 606 std::string TU() const { | 582 std::string TU() const; |
| 607 std::string ret; | |
| 608 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TU", "",
&ret)) return ret; | |
| 609 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 610 return ""; | |
| 611 } | |
| 612 | |
| 613 /** (Optional; PDF 1.3) The mapping name to be used when exporting inter- | 583 /** (Optional; PDF 1.3) The mapping name to be used when exporting inter- |
| 614 * active form field data from the document. | 584 * active form field data from the document. |
| 615 **/ | 585 **/ |
| 616 bool has_TM() const { | 586 bool has_TM() const { |
| 617 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TM",
"", NULL)); | 587 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TM",
"", NULL)); |
| 618 } | 588 } |
| 619 | 589 |
| 620 std::string TM() const { | 590 std::string TM() const; |
| 621 std::string ret; | |
| 622 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TM", "",
&ret)) return ret; | |
| 623 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 624 return ""; | |
| 625 } | |
| 626 | |
| 627 /** (Optional; inheritable) A set of flags specifying various characteristics of
the | 591 /** (Optional; inheritable) A set of flags specifying various characteristics of
the |
| 628 * field (see Table 8.50). Default value: 0. | 592 * field (see Table 8.50). Default value: 0. |
| 629 **/ | 593 **/ |
| 630 bool has_Ff() const { | 594 bool has_Ff() const { |
| 631 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ff",
"", NULL)); | 595 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ff",
"", NULL)); |
| 632 } | 596 } |
| 633 | 597 |
| 634 long Ff() const { | 598 long Ff() const; |
| 635 long ret; | |
| 636 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ff", "", &r
et)) return ret; | |
| 637 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 638 return 0; | |
| 639 } | |
| 640 | |
| 641 /** (Optional; inheritable) The field's value, whose format varies depending on | 599 /** (Optional; inheritable) The field's value, whose format varies depending on |
| 642 * the field type; see the descriptions of individual field types for further i
nfor- | 600 * the field type; see the descriptions of individual field types for further i
nfor- |
| 643 * mation. | 601 * mation. |
| 644 **/ | 602 **/ |
| 645 bool has_V() const { | 603 bool has_V() const { |
| 646 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "
", NULL)); | 604 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "
", NULL)); |
| 647 } | 605 } |
| 648 | 606 |
| 649 SkPdfObject* V() const { | 607 SkPdfObject* V() const; |
| 650 SkPdfObject* ret; | |
| 651 if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", &
ret)) return ret; | |
| 652 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 653 return NULL; | |
| 654 } | |
| 655 | |
| 656 /** (Optional; inheritable) The default value to which the field reverts when a | 608 /** (Optional; inheritable) The default value to which the field reverts when a |
| 657 * reset-form action is executed (see "Reset-Form Actions" on page 554). The | 609 * reset-form action is executed (see "Reset-Form Actions" on page 554). The |
| 658 * format of this value is the same as that of V. | 610 * format of this value is the same as that of V. |
| 659 **/ | 611 **/ |
| 660 bool has_DV() const { | 612 bool has_DV() const { |
| 661 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DV",
"", NULL)); | 613 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DV",
"", NULL)); |
| 662 } | 614 } |
| 663 | 615 |
| 664 SkPdfObject* DV() const { | 616 SkPdfObject* DV() const; |
| 665 SkPdfObject* ret; | |
| 666 if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DV", "",
&ret)) return ret; | |
| 667 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 668 return NULL; | |
| 669 } | |
| 670 | |
| 671 /** (Optional; PDF 1.2) An additional-actions dictionary defining the field's | 617 /** (Optional; PDF 1.2) An additional-actions dictionary defining the field's |
| 672 * behavior in response to various trigger events (see Section 8.5.2, "Trigger | 618 * behavior in response to various trigger events (see Section 8.5.2, "Trigger |
| 673 * Events"). This entry has exactly the same meaning as the AA entry in an | 619 * Events"). This entry has exactly the same meaning as the AA entry in an |
| 674 * annotation dictionary (see Section 8.4.1, "Annotation Dictionaries"). | 620 * annotation dictionary (see Section 8.4.1, "Annotation Dictionaries"). |
| 675 **/ | 621 **/ |
| 676 bool has_AA() const { | 622 bool has_AA() const { |
| 677 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA",
"", NULL)); | 623 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA",
"", NULL)); |
| 678 } | 624 } |
| 679 | 625 |
| 680 SkPdfDictionary* AA() const { | 626 SkPdfDictionary* AA() const; |
| 681 SkPdfDictionary* ret; | |
| 682 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA",
"", &ret)) return ret; | |
| 683 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 684 return NULL; | |
| 685 } | |
| 686 | |
| 687 }; | 627 }; |
| 688 | 628 |
| 689 #endif // __DEFINED__SkPdfFieldDictionary | 629 #endif // __DEFINED__SkPdfFieldDictionary |
| OLD | NEW |