| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfBlockLevelStructureElementsDictionary | 1 #ifndef __DEFINED__SkPdfBlockLevelStructureElementsDictionary |
| 2 #define __DEFINED__SkPdfBlockLevelStructureElementsDictionary | 2 #define __DEFINED__SkPdfBlockLevelStructureElementsDictionary |
| 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 class SkPdfBlockLevelStructureElementsDictionary : public SkPdfDictionary { | 8 class SkPdfBlockLevelStructureElementsDictionary : public SkPdfDictionary { |
| 9 public: | 9 public: |
| 10 virtual SkPdfObjectType getType() const { return kObjectDictionaryBlockLevelSt
ructureElementsDictionary_SkPdfObjectType;} | 10 virtual SkPdfObjectType getType() const { return kBlockLevelStructureElementsD
ictionary_SkPdfObjectType;} |
| 11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kObjectD
ictionaryBlockLevelStructureElementsDictionary_SkPdfObjectType + 1);} | 11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kBlockLe
velStructureElementsDictionary_SkPdfObjectType + 1);} |
| 12 public: | 12 public: |
| 13 virtual SkPdfBlockLevelStructureElementsDictionary* asBlockLevelStructureEleme
ntsDictionary() {return this;} | 13 virtual SkPdfBlockLevelStructureElementsDictionary* asBlockLevelStructureEleme
ntsDictionary() {return this;} |
| 14 virtual const SkPdfBlockLevelStructureElementsDictionary* asBlockLevelStructur
eElementsDictionary() const {return this;} | 14 virtual const SkPdfBlockLevelStructureElementsDictionary* asBlockLevelStructur
eElementsDictionary() const {return this;} |
| 15 | 15 |
| 16 private: | 16 private: |
| 17 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return
NULL;} | 17 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return
NULL;} |
| 18 virtual const SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() co
nst {return NULL;} | 18 virtual const SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() co
nst {return NULL;} |
| 19 | 19 |
| 20 virtual SkPdfActionDictionary* asActionDictionary() {return NULL;} | 20 virtual SkPdfActionDictionary* asActionDictionary() {return NULL;} |
| 21 virtual const SkPdfActionDictionary* asActionDictionary() const {return NULL;} | 21 virtual const SkPdfActionDictionary* asActionDictionary() const {return NULL;} |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 SkRect BBox() const { | 566 SkRect BBox() const { |
| 567 SkRect ret; | 567 SkRect ret; |
| 568 if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox", ""
, &ret)) return ret; | 568 if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox", ""
, &ret)) return ret; |
| 569 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 569 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 570 return SkRect(); | 570 return SkRect(); |
| 571 } | 571 } |
| 572 | 572 |
| 573 bool isWidthANumber() const { | 573 bool isWidthANumber() const { |
| 574 SkPdfObject* ret = NULL; | 574 SkPdfObject* ret = NULL; |
| 575 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width",
"", &ret)) return false; | 575 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width",
"", &ret)) return false; |
| 576 return ret->podofo()->GetDataType() == ePdfDataType_Real; | 576 return ret->podofo()->GetDataType() == ePdfDataType_Real || ret->podofo()->G
etDataType() == ePdfDataType_Number; |
| 577 } | 577 } |
| 578 | 578 |
| 579 double getWidthAsNumber() const { | 579 double getWidthAsNumber() const { |
| 580 double ret = 0; | 580 double ret = 0; |
| 581 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width", "
", &ret)) return ret; | 581 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width", "
", &ret)) return ret; |
| 582 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 582 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 583 return 0; | 583 return 0; |
| 584 } | 584 } |
| 585 | 585 |
| 586 bool isWidthAName() const { | 586 bool isWidthAName() const { |
| 587 SkPdfObject* ret = NULL; | 587 SkPdfObject* ret = NULL; |
| 588 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width",
"", &ret)) return false; | 588 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width",
"", &ret)) return false; |
| 589 return ret->podofo()->GetDataType() == ePdfDataType_Name; | 589 return ret->podofo()->GetDataType() == ePdfDataType_Name; |
| 590 } | 590 } |
| 591 | 591 |
| 592 std::string getWidthAsName() const { | 592 std::string getWidthAsName() const { |
| 593 std::string ret = ""; | 593 std::string ret = ""; |
| 594 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width", "",
&ret)) return ret; | 594 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width", "",
&ret)) return ret; |
| 595 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 595 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 596 return ""; | 596 return ""; |
| 597 } | 597 } |
| 598 | 598 |
| 599 bool isHeightANumber() const { | 599 bool isHeightANumber() const { |
| 600 SkPdfObject* ret = NULL; | 600 SkPdfObject* ret = NULL; |
| 601 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height",
"", &ret)) return false; | 601 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height",
"", &ret)) return false; |
| 602 return ret->podofo()->GetDataType() == ePdfDataType_Real; | 602 return ret->podofo()->GetDataType() == ePdfDataType_Real || ret->podofo()->G
etDataType() == ePdfDataType_Number; |
| 603 } | 603 } |
| 604 | 604 |
| 605 double getHeightAsNumber() const { | 605 double getHeightAsNumber() const { |
| 606 double ret = 0; | 606 double ret = 0; |
| 607 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height",
"", &ret)) return ret; | 607 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height",
"", &ret)) return ret; |
| 608 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 608 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 609 return 0; | 609 return 0; |
| 610 } | 610 } |
| 611 | 611 |
| 612 bool isHeightAName() const { | 612 bool isHeightAName() const { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 632 std::string InlineAlign() const { | 632 std::string InlineAlign() const { |
| 633 std::string ret; | 633 std::string ret; |
| 634 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "InlineAlign
", "", &ret)) return ret; | 634 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "InlineAlign
", "", &ret)) return ret; |
| 635 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 635 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 636 return ""; | 636 return ""; |
| 637 } | 637 } |
| 638 | 638 |
| 639 }; | 639 }; |
| 640 | 640 |
| 641 #endif // __DEFINED__SkPdfBlockLevelStructureElementsDictionary | 641 #endif // __DEFINED__SkPdfBlockLevelStructureElementsDictionary |
| OLD | NEW |