| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfFileAttachmentAnnotationDictionary | 1 #ifndef __DEFINED__SkPdfFileAttachmentAnnotationDictionary |
| 2 #define __DEFINED__SkPdfFileAttachmentAnnotationDictionary | 2 #define __DEFINED__SkPdfFileAttachmentAnnotationDictionary |
| 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 file attachment annotation | 9 // Additional entries specific to a file attachment annotation |
| 10 class SkPdfFileAttachmentAnnotationDictionary : public SkPdfDictionary { | 10 class SkPdfFileAttachmentAnnotationDictionary : public SkPdfDictionary { |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 | 525 |
| 526 SkPdfFileAttachmentAnnotationDictionary& operator=(const SkPdfFileAttachmentAn
notationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj
= from.fPodofoObj; return *this;} | 526 SkPdfFileAttachmentAnnotationDictionary& operator=(const SkPdfFileAttachmentAn
notationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj
= from.fPodofoObj; return *this;} |
| 527 | 527 |
| 528 /** (Required) The type of annotation that this dictionary describes; must be | 528 /** (Required) The type of annotation that this dictionary describes; must be |
| 529 * FileAttachment for a file attachment annotation. | 529 * FileAttachment for a file attachment annotation. |
| 530 **/ | 530 **/ |
| 531 bool has_Subtype() const { | 531 bool has_Subtype() const { |
| 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subty
pe", "", NULL)); | 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subty
pe", "", NULL)); |
| 533 } | 533 } |
| 534 | 534 |
| 535 std::string Subtype() const { | 535 std::string Subtype() const; |
| 536 std::string ret; | |
| 537 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "
", &ret)) return ret; | |
| 538 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 539 return ""; | |
| 540 } | |
| 541 | |
| 542 /** (Required) The file associated with this annotation. | 536 /** (Required) The file associated with this annotation. |
| 543 **/ | 537 **/ |
| 544 bool has_FS() const { | 538 bool has_FS() const { |
| 545 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FS",
"", NULL)); | 539 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FS",
"", NULL)); |
| 546 } | 540 } |
| 547 | 541 |
| 548 SkPdfFileSpec FS() const { | 542 SkPdfFileSpec FS() const; |
| 549 SkPdfFileSpec ret; | |
| 550 if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FS", ""
, &ret)) return ret; | |
| 551 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 552 return SkPdfFileSpec(); | |
| 553 } | |
| 554 | |
| 555 /** (Required) The text to be displayed in the pop-up window when the annota- | 543 /** (Required) The text to be displayed in the pop-up window when the annota- |
| 556 * tion is opened. Carriage returns may be used to separate the text into para- | 544 * tion is opened. Carriage returns may be used to separate the text into para- |
| 557 * graphs. | 545 * graphs. |
| 558 **/ | 546 **/ |
| 559 bool has_Contents() const { | 547 bool has_Contents() const { |
| 560 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Conte
nts", "", NULL)); | 548 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Conte
nts", "", NULL)); |
| 561 } | 549 } |
| 562 | 550 |
| 563 std::string Contents() const { | 551 std::string Contents() const; |
| 564 std::string ret; | |
| 565 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents"
, "", &ret)) return ret; | |
| 566 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 567 return ""; | |
| 568 } | |
| 569 | |
| 570 /** (Optional) The name of an icon to be used in displaying the annotation. | 552 /** (Optional) The name of an icon to be used in displaying the annotation. |
| 571 * Viewer applications should provide predefined icon appearances for at least | 553 * Viewer applications should provide predefined icon appearances for at least |
| 572 * the following standard names: | 554 * the following standard names: |
| 573 * Graph PushPin | 555 * Graph PushPin |
| 574 * Paperclip Tag | 556 * Paperclip Tag |
| 575 * Additional names may be supported as well. Default value: PushPin. | 557 * Additional names may be supported as well. Default value: PushPin. |
| 576 * Note: The annotation dictionary's AP entry, if present, takes precedence ove
r | 558 * Note: The annotation dictionary's AP entry, if present, takes precedence ove
r |
| 577 * the Name entry; see Table 8.10 on page 490 and Section 8.4.4, "Appearance | 559 * the Name entry; see Table 8.10 on page 490 and Section 8.4.4, "Appearance |
| 578 * Streams." | 560 * Streams." |
| 579 **/ | 561 **/ |
| 580 bool has_Name() const { | 562 bool has_Name() const { |
| 581 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name"
, "", NULL)); | 563 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name"
, "", NULL)); |
| 582 } | 564 } |
| 583 | 565 |
| 584 std::string Name() const { | 566 std::string Name() const; |
| 585 std::string ret; | |
| 586 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "",
&ret)) return ret; | |
| 587 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 588 return ""; | |
| 589 } | |
| 590 | |
| 591 }; | 567 }; |
| 592 | 568 |
| 593 #endif // __DEFINED__SkPdfFileAttachmentAnnotationDictionary | 569 #endif // __DEFINED__SkPdfFileAttachmentAnnotationDictionary |
| OLD | NEW |