Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Side by Side Diff: experimental/PdfViewer/autogen/SkPdfInlineLevelStructureElementsDictionary_autogen.h

Issue 17856004: refactoring for pdf viewer lib (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698