OLD | NEW |
1 #ifndef __DEFINED__SkPdfFDFNamedPageReferenceDictionary | 1 #ifndef __DEFINED__SkPdfFDFNamedPageReferenceDictionary |
2 #define __DEFINED__SkPdfFDFNamedPageReferenceDictionary | 2 #define __DEFINED__SkPdfFDFNamedPageReferenceDictionary |
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 named page reference dictionary | 9 // Entries in an FDF named page reference dictionary |
10 class SkPdfFDFNamedPageReferenceDictionary : public SkPdfDictionary { | 10 class SkPdfFDFNamedPageReferenceDictionary : public SkPdfDictionary { |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 virtual bool valid() const {return true;} | 524 virtual bool valid() const {return true;} |
525 | 525 |
526 SkPdfFDFNamedPageReferenceDictionary& operator=(const SkPdfFDFNamedPageReferen
ceDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from
.fPodofoObj; return *this;} | 526 SkPdfFDFNamedPageReferenceDictionary& operator=(const SkPdfFDFNamedPageReferen
ceDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from
.fPodofoObj; return *this;} |
527 | 527 |
528 /** (Required) The name of the referenced page. | 528 /** (Required) The name of the referenced page. |
529 **/ | 529 **/ |
530 bool has_Name() const { | 530 bool has_Name() const { |
531 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name"
, "", NULL)); | 531 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name"
, "", NULL)); |
532 } | 532 } |
533 | 533 |
534 std::string Name() const { | 534 std::string Name() const; |
535 std::string ret; | |
536 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", ""
, &ret)) return ret; | |
537 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
538 return ""; | |
539 } | |
540 | |
541 /** (Optional) The file containing the named page. If this key is absent, it is | 535 /** (Optional) The file containing the named page. If this key is absent, it is |
542 * assumed that the page resides in the associated PDF file. | 536 * assumed that the page resides in the associated PDF file. |
543 **/ | 537 **/ |
544 bool has_F() const { | 538 bool has_F() const { |
545 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "
", NULL)); | 539 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "
", NULL)); |
546 } | 540 } |
547 | 541 |
548 SkPdfFileSpec F() const { | 542 SkPdfFileSpec F() const; |
549 SkPdfFileSpec ret; | |
550 if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "",
&ret)) return ret; | |
551 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
552 return SkPdfFileSpec(); | |
553 } | |
554 | |
555 }; | 543 }; |
556 | 544 |
557 #endif // __DEFINED__SkPdfFDFNamedPageReferenceDictionary | 545 #endif // __DEFINED__SkPdfFDFNamedPageReferenceDictionary |
OLD | NEW |