OLD | NEW |
1 #ifndef __DEFINED__SkPdfInlineLevelStructureElementsDictionary | 1 #ifndef __DEFINED__SkPdfInlineLevelStructureElementsDictionary |
2 #define __DEFINED__SkPdfInlineLevelStructureElementsDictionary | 2 #define __DEFINED__SkPdfInlineLevelStructureElementsDictionary |
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 // Standard layout attributes specific to inline-level structure elements | 9 // Standard layout attributes specific to inline-level structure elements |
10 class SkPdfInlineLevelStructureElementsDictionary : public SkPdfDictionary { | 10 class SkPdfInlineLevelStructureElementsDictionary : public SkPdfDictionary { |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 bool has_LineHeight() const { | 540 bool has_LineHeight() const { |
541 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LineH
eight", "", NULL)); | 541 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LineH
eight", "", NULL)); |
542 } | 542 } |
543 | 543 |
544 bool isLineHeightANumber() const { | 544 bool isLineHeightANumber() const { |
545 SkPdfObject* ret = NULL; | 545 SkPdfObject* ret = NULL; |
546 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LineHeig
ht", "", &ret)) return false; | 546 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LineHeig
ht", "", &ret)) return false; |
547 return ret->podofo()->GetDataType() == ePdfDataType_Real || ret->podofo()->G
etDataType() == ePdfDataType_Number; | 547 return ret->podofo()->GetDataType() == ePdfDataType_Real || ret->podofo()->G
etDataType() == ePdfDataType_Number; |
548 } | 548 } |
549 | 549 |
550 double getLineHeightAsNumber() const { | 550 double getLineHeightAsNumber() const; |
551 double ret = 0; | |
552 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LineHeigh
t", "", &ret)) return ret; | |
553 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
554 return 0; | |
555 } | |
556 | |
557 bool isLineHeightAName() const { | 551 bool isLineHeightAName() const { |
558 SkPdfObject* ret = NULL; | 552 SkPdfObject* ret = NULL; |
559 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LineHeig
ht", "", &ret)) return false; | 553 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LineHeig
ht", "", &ret)) return false; |
560 return ret->podofo()->GetDataType() == ePdfDataType_Name; | 554 return ret->podofo()->GetDataType() == ePdfDataType_Name; |
561 } | 555 } |
562 | 556 |
563 std::string getLineHeightAsName() const { | 557 std::string getLineHeightAsName() const; |
564 std::string ret = ""; | |
565 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LineHeight"
, "", &ret)) return ret; | |
566 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
567 return ""; | |
568 } | |
569 | |
570 }; | 558 }; |
571 | 559 |
572 #endif // __DEFINED__SkPdfInlineLevelStructureElementsDictionary | 560 #endif // __DEFINED__SkPdfInlineLevelStructureElementsDictionary |
OLD | NEW |