| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfCheckboxFieldDictionary | 1 #ifndef __DEFINED__SkPdfCheckboxFieldDictionary |
| 2 #define __DEFINED__SkPdfCheckboxFieldDictionary | 2 #define __DEFINED__SkPdfCheckboxFieldDictionary |
| 3 | 3 |
| 4 #include "SkPdfEnums_autogen.h" | 4 #include "SkPdfEnums_autogen.h" |
| 5 #include "SkPdfArray_autogen.h" | 5 #include "SkPdfArray_autogen.h" |
| 6 #include "SkPdfDictionary_autogen.h" | 6 #include "SkPdfDictionary_autogen.h" |
| 7 | 7 |
| 8 // Additional entry specific to a checkbox field |
| 8 class SkPdfCheckboxFieldDictionary : public SkPdfDictionary { | 9 class SkPdfCheckboxFieldDictionary : public SkPdfDictionary { |
| 9 public: | 10 public: |
| 10 virtual SkPdfObjectType getType() const { return kCheckboxFieldDictionary_SkPd
fObjectType;} | 11 virtual SkPdfObjectType getType() const { return kCheckboxFieldDictionary_SkPd
fObjectType;} |
| 11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kCheckbo
xFieldDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kCheckbo
xFieldDictionary_SkPdfObjectType + 1);} |
| 12 public: | 13 public: |
| 13 virtual SkPdfCheckboxFieldDictionary* asCheckboxFieldDictionary() {return this
;} | 14 virtual SkPdfCheckboxFieldDictionary* asCheckboxFieldDictionary() {return this
;} |
| 14 virtual const SkPdfCheckboxFieldDictionary* asCheckboxFieldDictionary() const
{return this;} | 15 virtual const SkPdfCheckboxFieldDictionary* asCheckboxFieldDictionary() const
{return this;} |
| 15 | 16 |
| 16 private: | 17 private: |
| 17 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return
NULL;} | 18 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return
NULL;} |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 | 515 |
| 515 public: | 516 public: |
| 516 private: | 517 private: |
| 517 public: | 518 public: |
| 518 SkPdfCheckboxFieldDictionary(const PdfMemDocument* podofoDoc = NULL, const Pdf
Object* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfCheckboxFieldDictionary(const PdfMemDocument* podofoDoc = NULL, const Pdf
Object* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} |
| 519 | 520 |
| 520 virtual bool valid() const {return true;} | 521 virtual bool valid() const {return true;} |
| 521 | 522 |
| 522 SkPdfCheckboxFieldDictionary& operator=(const SkPdfCheckboxFieldDictionary& fr
om) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; ret
urn *this;} | 523 SkPdfCheckboxFieldDictionary& operator=(const SkPdfCheckboxFieldDictionary& fr
om) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; ret
urn *this;} |
| 523 | 524 |
| 525 /** (Optional; inheritable; PDF 1.4) A text string to be used in place of the V
entry for the |
| 526 * value of the field. |
| 527 **/ |
| 528 bool has_Opt() const { |
| 529 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt",
"", NULL)); |
| 530 } |
| 531 |
| 524 std::string Opt() const { | 532 std::string Opt() const { |
| 525 std::string ret; | 533 std::string ret; |
| 526 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "",
&ret)) return ret; | 534 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "",
&ret)) return ret; |
| 527 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 535 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 528 return ""; | 536 return ""; |
| 529 } | 537 } |
| 530 | 538 |
| 531 }; | 539 }; |
| 532 | 540 |
| 533 #endif // __DEFINED__SkPdfCheckboxFieldDictionary | 541 #endif // __DEFINED__SkPdfCheckboxFieldDictionary |
| OLD | NEW |