| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfFDFTemplateDictionary | 1 #ifndef __DEFINED__SkPdfFDFTemplateDictionary |
| 2 #define __DEFINED__SkPdfFDFTemplateDictionary | 2 #define __DEFINED__SkPdfFDFTemplateDictionary |
| 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 an FDF template dictionary | 9 // Entries in an FDF template dictionary |
| 10 class SkPdfFDFTemplateDictionary : public SkPdfDictionary { | 10 class SkPdfFDFTemplateDictionary : public SkPdfDictionary { |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 | 525 |
| 526 SkPdfFDFTemplateDictionary& operator=(const SkPdfFDFTemplateDictionary& from)
{this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return
*this;} | 526 SkPdfFDFTemplateDictionary& operator=(const SkPdfFDFTemplateDictionary& from)
{this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return
*this;} |
| 527 | 527 |
| 528 /** (Required) A named page reference dictionary (see Table 8.76) specifying the | 528 /** (Required) A named page reference dictionary (see Table 8.76) specifying the |
| 529 * location of the template. | 529 * location of the template. |
| 530 **/ | 530 **/ |
| 531 bool has_TRef() const { | 531 bool has_TRef() const { |
| 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TRef"
, "", NULL)); | 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TRef"
, "", NULL)); |
| 533 } | 533 } |
| 534 | 534 |
| 535 SkPdfDictionary* TRef() const { | 535 SkPdfDictionary* TRef() const; |
| 536 SkPdfDictionary* ret; | |
| 537 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TRef"
, "", &ret)) return ret; | |
| 538 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 539 return NULL; | |
| 540 } | |
| 541 | |
| 542 /** (Optional) An array of references to FDF field dictionaries (see Table 8.72
on | 536 /** (Optional) An array of references to FDF field dictionaries (see Table 8.72
on |
| 543 * page 564) describing the root fields to be imported (those with no ancestors
in | 537 * page 564) describing the root fields to be imported (those with no ancestors
in |
| 544 * the field hierarchy). | 538 * the field hierarchy). |
| 545 **/ | 539 **/ |
| 546 bool has_Fields() const { | 540 bool has_Fields() const { |
| 547 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Field
s", "", NULL)); | 541 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Field
s", "", NULL)); |
| 548 } | 542 } |
| 549 | 543 |
| 550 SkPdfArray* Fields() const { | 544 SkPdfArray* Fields() const; |
| 551 SkPdfArray* ret; | |
| 552 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fields", "
", &ret)) return ret; | |
| 553 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 554 return NULL; | |
| 555 } | |
| 556 | |
| 557 /** (Optional) A flag specifying whether fields imported from the template may b
e | 545 /** (Optional) A flag specifying whether fields imported from the template may b
e |
| 558 * renamed in the event of name conflicts with existing fields; see below for f
urther | 546 * renamed in the event of name conflicts with existing fields; see below for f
urther |
| 559 * discussion. Default value: true. | 547 * discussion. Default value: true. |
| 560 **/ | 548 **/ |
| 561 bool has_Rename() const { | 549 bool has_Rename() const { |
| 562 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Renam
e", "", NULL)); | 550 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Renam
e", "", NULL)); |
| 563 } | 551 } |
| 564 | 552 |
| 565 bool Rename() const { | 553 bool Rename() const; |
| 566 bool ret; | |
| 567 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rename", ""
, &ret)) return ret; | |
| 568 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 569 return false; | |
| 570 } | |
| 571 | |
| 572 }; | 554 }; |
| 573 | 555 |
| 574 #endif // __DEFINED__SkPdfFDFTemplateDictionary | 556 #endif // __DEFINED__SkPdfFDFTemplateDictionary |
| OLD | NEW |