| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfMarkedContentReferenceDictionary | 1 #ifndef __DEFINED__SkPdfMarkedContentReferenceDictionary |
| 2 #define __DEFINED__SkPdfMarkedContentReferenceDictionary | 2 #define __DEFINED__SkPdfMarkedContentReferenceDictionary |
| 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 in a marked-content reference dictionary | 9 // Entries in a marked-content reference dictionary |
| 10 class SkPdfMarkedContentReferenceDictionary : public SkPdfDictionary { | 10 class SkPdfMarkedContentReferenceDictionary : public SkPdfDictionary { |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 | 525 |
| 526 SkPdfMarkedContentReferenceDictionary& operator=(const SkPdfMarkedContentRefer
enceDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = fr
om.fPodofoObj; return *this;} | 526 SkPdfMarkedContentReferenceDictionary& operator=(const SkPdfMarkedContentRefer
enceDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = fr
om.fPodofoObj; return *this;} |
| 527 | 527 |
| 528 /** (Required) The type of PDF object that this dictionary describes; must be MC
R | 528 /** (Required) The type of PDF object that this dictionary describes; must be MC
R |
| 529 * for a marked-content reference. | 529 * for a marked-content reference. |
| 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 /** (Optional; must be an indirect reference) The page object representing the p
age on | 536 /** (Optional; must be an indirect reference) The page object representing the p
age on |
| 543 * which the graphics objects in the marked-content sequence are rendered. This | 537 * which the graphics objects in the marked-content sequence are rendered. This |
| 544 * entry overrides any Pg entry in the structure element containing the marked- | 538 * entry overrides any Pg entry in the structure element containing the marked- |
| 545 * content reference; it is required if the structure element has no such entry
. | 539 * content reference; it is required if the structure element has no such entry
. |
| 546 **/ | 540 **/ |
| 547 bool has_Pg() const { | 541 bool has_Pg() const { |
| 548 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pg",
"", NULL)); | 542 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pg",
"", NULL)); |
| 549 } | 543 } |
| 550 | 544 |
| 551 SkPdfDictionary* Pg() const { | 545 SkPdfDictionary* Pg() const; |
| 552 SkPdfDictionary* ret; | |
| 553 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pg",
"", &ret)) return ret; | |
| 554 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 555 return NULL; | |
| 556 } | |
| 557 | |
| 558 /** (Optional; must be an indirect reference) The content stream containing the | 546 /** (Optional; must be an indirect reference) The content stream containing the |
| 559 * marked-content sequence. This entry is needed only if the marked-content | 547 * marked-content sequence. This entry is needed only if the marked-content |
| 560 * sequence resides in some other content stream associated with the page-for | 548 * sequence resides in some other content stream associated with the page-for |
| 561 * example, in a form XObject (see Section 4.9, "Form XObjects") or an annota- | 549 * example, in a form XObject (see Section 4.9, "Form XObjects") or an annota- |
| 562 * tion's appearance stream (Section 8.4.4, "Appearance Streams"). Default valu
e: | 550 * tion's appearance stream (Section 8.4.4, "Appearance Streams"). Default valu
e: |
| 563 * the content stream of the page identified by Pg. | 551 * the content stream of the page identified by Pg. |
| 564 **/ | 552 **/ |
| 565 bool has_Stm() const { | 553 bool has_Stm() const { |
| 566 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Stm",
"", NULL)); | 554 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Stm",
"", NULL)); |
| 567 } | 555 } |
| 568 | 556 |
| 569 SkPdfStream* Stm() const { | 557 SkPdfStream* Stm() const; |
| 570 SkPdfStream* ret; | |
| 571 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Stm", "",
&ret)) return ret; | |
| 572 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 573 return NULL; | |
| 574 } | |
| 575 | |
| 576 /** (Optional; must be an indirect reference) The PDF object owning the stream | 558 /** (Optional; must be an indirect reference) The PDF object owning the stream |
| 577 * identified by Stm-for example, the annotation to which an appearance stream | 559 * identified by Stm-for example, the annotation to which an appearance stream |
| 578 * belongs. | 560 * belongs. |
| 579 **/ | 561 **/ |
| 580 bool has_StmOwn() const { | 562 bool has_StmOwn() const { |
| 581 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StmOw
n", "", NULL)); | 563 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StmOw
n", "", NULL)); |
| 582 } | 564 } |
| 583 | 565 |
| 584 SkPdfObject* StmOwn() const { | 566 SkPdfObject* StmOwn() const; |
| 585 SkPdfObject* ret; | |
| 586 if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StmOwn",
"", &ret)) return ret; | |
| 587 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 588 return NULL; | |
| 589 } | |
| 590 | |
| 591 /** (Required) The marked-content identifier of the marked-content sequence with
- | 567 /** (Required) The marked-content identifier of the marked-content sequence with
- |
| 592 * in its content stream. | 568 * in its content stream. |
| 593 **/ | 569 **/ |
| 594 bool has_MCID() const { | 570 bool has_MCID() const { |
| 595 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MCID"
, "", NULL)); | 571 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MCID"
, "", NULL)); |
| 596 } | 572 } |
| 597 | 573 |
| 598 long MCID() const { | 574 long MCID() const; |
| 599 long ret; | |
| 600 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MCID", "",
&ret)) return ret; | |
| 601 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 602 return 0; | |
| 603 } | |
| 604 | |
| 605 }; | 575 }; |
| 606 | 576 |
| 607 #endif // __DEFINED__SkPdfMarkedContentReferenceDictionary | 577 #endif // __DEFINED__SkPdfMarkedContentReferenceDictionary |
| OLD | NEW |