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

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

Issue 16975013: Deal with ca and CA transparency operators in pdf. add comments to generated classes. (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__SkPdfGoToActionDictionary 1 #ifndef __DEFINED__SkPdfGoToActionDictionary
2 #define __DEFINED__SkPdfGoToActionDictionary 2 #define __DEFINED__SkPdfGoToActionDictionary
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 entries specific to a go-to action
8 class SkPdfGoToActionDictionary : public SkPdfDictionary { 9 class SkPdfGoToActionDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kGoToActionDictionary_SkPdfOb jectType;} 11 virtual SkPdfObjectType getType() const { return kGoToActionDictionary_SkPdfOb jectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kGoToAct ionDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kGoToAct ionDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfGoToActionDictionary* asGoToActionDictionary() {return this;} 14 virtual SkPdfGoToActionDictionary* asGoToActionDictionary() {return this;}
14 virtual const SkPdfGoToActionDictionary* asGoToActionDictionary() const {retur n this;} 15 virtual const SkPdfGoToActionDictionary* asGoToActionDictionary() const {retur n 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
514 515
515 public: 516 public:
516 private: 517 private:
517 public: 518 public:
518 SkPdfGoToActionDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObj ect* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfGoToActionDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObj ect* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {}
519 520
520 virtual bool valid() const {return true;} 521 virtual bool valid() const {return true;}
521 522
522 SkPdfGoToActionDictionary& operator=(const SkPdfGoToActionDictionary& from) {t his->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *t his;} 523 SkPdfGoToActionDictionary& operator=(const SkPdfGoToActionDictionary& from) {t his->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *t his;}
523 524
525 /** (Required) The type of action that this dictionary describes; must be GoTo f or a
526 * go-to action.
527 **/
528 bool has_S() const {
529 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", " ", NULL));
530 }
531
524 std::string S() const { 532 std::string S() const {
525 std::string ret; 533 std::string ret;
526 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re t)) return ret; 534 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re t)) 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
539 /** (Required) The destination to jump to (see Section 8.2.1, "Destinations").
540 **/
541 bool has_D() const {
542 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", " ", NULL));
543 }
544
531 bool isDAName() const { 545 bool isDAName() const {
532 SkPdfObject* ret = NULL; 546 SkPdfObject* ret = NULL;
533 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return false; 547 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return false;
534 return ret->podofo()->GetDataType() == ePdfDataType_Name; 548 return ret->podofo()->GetDataType() == ePdfDataType_Name;
535 } 549 }
536 550
537 std::string getDAsName() const { 551 std::string getDAsName() const {
538 std::string ret = ""; 552 std::string ret = "";
539 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &re t)) return ret; 553 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &re t)) return ret;
540 // TODO(edisonn): warn about missing required field, assert for known good p dfs 554 // TODO(edisonn): warn about missing required field, assert for known good p dfs
(...skipping 22 matching lines...) Expand all
563 SkPdfArray getDAsArray() const { 577 SkPdfArray getDAsArray() const {
564 SkPdfArray ret = SkPdfArray(); 578 SkPdfArray ret = SkPdfArray();
565 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &r et)) return ret; 579 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &r et)) return ret;
566 // TODO(edisonn): warn about missing required field, assert for known good p dfs 580 // TODO(edisonn): warn about missing required field, assert for known good p dfs
567 return SkPdfArray(); 581 return SkPdfArray();
568 } 582 }
569 583
570 }; 584 };
571 585
572 #endif // __DEFINED__SkPdfGoToActionDictionary 586 #endif // __DEFINED__SkPdfGoToActionDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698