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

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

Issue 17395005: put each generated pdf api class in a file (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 6 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 "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 SkPdfInlineLevelStructureElementsDictionary : public SkPdfDictionary { 8 class SkPdfInlineLevelStructureElementsDictionary : public SkPdfDictionary {
9 public: 9 public:
10 virtual SkPdfObjectType getType() const { return kObjectDictionaryInlineLevelS tructureElementsDictionary_SkPdfObjectType;} 10 virtual SkPdfObjectType getType() const { return kInlineLevelStructureElements Dictionary_SkPdfObjectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kObjectD ictionaryInlineLevelStructureElementsDictionary_SkPdfObjectType + 1);} 11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kInlineL evelStructureElementsDictionary_SkPdfObjectType + 1);}
12 public: 12 public:
13 virtual SkPdfInlineLevelStructureElementsDictionary* asInlineLevelStructureEle mentsDictionary() {return this;} 13 virtual SkPdfInlineLevelStructureElementsDictionary* asInlineLevelStructureEle mentsDictionary() {return this;}
14 virtual const SkPdfInlineLevelStructureElementsDictionary* asInlineLevelStruct ureElementsDictionary() const {return this;} 14 virtual const SkPdfInlineLevelStructureElementsDictionary* asInlineLevelStruct ureElementsDictionary() 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 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 public: 517 public:
518 SkPdfInlineLevelStructureElementsDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 518 SkPdfInlineLevelStructureElementsDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {}
519 519
520 virtual bool valid() const {return true;} 520 virtual bool valid() const {return true;}
521 521
522 SkPdfInlineLevelStructureElementsDictionary& operator=(const SkPdfInlineLevelS tructureElementsDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPo dofoObj = from.fPodofoObj; return *this;} 522 SkPdfInlineLevelStructureElementsDictionary& operator=(const SkPdfInlineLevelS tructureElementsDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPo dofoObj = from.fPodofoObj; return *this;}
523 523
524 bool isLineHeightANumber() const { 524 bool isLineHeightANumber() const {
525 SkPdfObject* ret = NULL; 525 SkPdfObject* ret = NULL;
526 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LineHeig ht", "", &ret)) return false; 526 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LineHeig ht", "", &ret)) return false;
527 return ret->podofo()->GetDataType() == ePdfDataType_Real; 527 return ret->podofo()->GetDataType() == ePdfDataType_Real || ret->podofo()->G etDataType() == ePdfDataType_Number;
528 } 528 }
529 529
530 double getLineHeightAsNumber() const { 530 double getLineHeightAsNumber() const {
531 double ret = 0; 531 double ret = 0;
532 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LineHeigh t", "", &ret)) return ret; 532 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LineHeigh t", "", &ret)) return ret;
533 // TODO(edisonn): warn about missing required field, assert for known good p dfs 533 // TODO(edisonn): warn about missing required field, assert for known good p dfs
534 return 0; 534 return 0;
535 } 535 }
536 536
537 bool isLineHeightAName() const { 537 bool isLineHeightAName() const {
538 SkPdfObject* ret = NULL; 538 SkPdfObject* ret = NULL;
539 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LineHeig ht", "", &ret)) return false; 539 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LineHeig ht", "", &ret)) return false;
540 return ret->podofo()->GetDataType() == ePdfDataType_Name; 540 return ret->podofo()->GetDataType() == ePdfDataType_Name;
541 } 541 }
542 542
543 std::string getLineHeightAsName() const { 543 std::string getLineHeightAsName() const {
544 std::string ret = ""; 544 std::string ret = "";
545 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LineHeight" , "", &ret)) return ret; 545 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LineHeight" , "", &ret)) return ret;
546 // TODO(edisonn): warn about missing required field, assert for known good p dfs 546 // TODO(edisonn): warn about missing required field, assert for known good p dfs
547 return ""; 547 return "";
548 } 548 }
549 549
550 }; 550 };
551 551
552 #endif // __DEFINED__SkPdfInlineLevelStructureElementsDictionary 552 #endif // __DEFINED__SkPdfInlineLevelStructureElementsDictionary
OLDNEW
« no previous file with comments | « experimental/PdfViewer/SkPdfInkAnnotationDictionary_autogen.h ('k') | experimental/PdfViewer/SkPdfInteger_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698