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

Side by Side Diff: experimental/PdfViewer/SkPdfRemoteGoToActionDictionary_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__SkPdfRemoteGoToActionDictionary 1 #ifndef __DEFINED__SkPdfRemoteGoToActionDictionary
2 #define __DEFINED__SkPdfRemoteGoToActionDictionary 2 #define __DEFINED__SkPdfRemoteGoToActionDictionary
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 remote go-to action
8 class SkPdfRemoteGoToActionDictionary : public SkPdfDictionary { 9 class SkPdfRemoteGoToActionDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kRemoteGoToActionDictionary_S kPdfObjectType;} 11 virtual SkPdfObjectType getType() const { return kRemoteGoToActionDictionary_S kPdfObjectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kRemoteG oToActionDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kRemoteG oToActionDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfRemoteGoToActionDictionary* asRemoteGoToActionDictionary() {retur n this;} 14 virtual SkPdfRemoteGoToActionDictionary* asRemoteGoToActionDictionary() {retur n this;}
14 virtual const SkPdfRemoteGoToActionDictionary* asRemoteGoToActionDictionary() const {return this;} 15 virtual const SkPdfRemoteGoToActionDictionary* asRemoteGoToActionDictionary() const {return 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 SkPdfRemoteGoToActionDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfRemoteGoToActionDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {}
519 520
520 virtual bool valid() const {return true;} 521 virtual bool valid() const {return true;}
521 522
522 SkPdfRemoteGoToActionDictionary& operator=(const SkPdfRemoteGoToActionDictiona ry& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoOb j; return *this;} 523 SkPdfRemoteGoToActionDictionary& operator=(const SkPdfRemoteGoToActionDictiona ry& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoOb j; return *this;}
523 524
525 /** (Required) The type of action that this dictionary describes; must be GoToR
526 * for a remote 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 file in which the destination is located.
540 **/
541 bool has_F() const {
542 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", " ", NULL));
543 }
544
531 SkPdfFileSpec F() const { 545 SkPdfFileSpec F() const {
532 SkPdfFileSpec ret; 546 SkPdfFileSpec ret;
533 if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret; 547 if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
534 // TODO(edisonn): warn about missing required field, assert for known good p dfs 548 // TODO(edisonn): warn about missing required field, assert for known good p dfs
535 return SkPdfFileSpec(); 549 return SkPdfFileSpec();
536 } 550 }
537 551
552 /** (Required) The destination to jump to (see Section 8.2.1, "Destinations"). I f
553 * the value is an array defining an explicit destination (as described under
554 * "Explicit Destinations" on page 474), its first element must be a page numbe r
555 * within the remote document rather than an indirect reference to a page ob-
556 * ject in the current document. The first page is numbered 0.
557 **/
558 bool has_D() const {
559 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", " ", NULL));
560 }
561
538 bool isDAName() const { 562 bool isDAName() const {
539 SkPdfObject* ret = NULL; 563 SkPdfObject* ret = NULL;
540 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return false; 564 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return false;
541 return ret->podofo()->GetDataType() == ePdfDataType_Name; 565 return ret->podofo()->GetDataType() == ePdfDataType_Name;
542 } 566 }
543 567
544 std::string getDAsName() const { 568 std::string getDAsName() const {
545 std::string ret = ""; 569 std::string ret = "";
546 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &re t)) return ret; 570 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &re t)) return ret;
547 // TODO(edisonn): warn about missing required field, assert for known good p dfs 571 // TODO(edisonn): warn about missing required field, assert for known good p dfs
(...skipping 19 matching lines...) Expand all
567 return ret->podofo()->GetDataType() == ePdfDataType_Array; 591 return ret->podofo()->GetDataType() == ePdfDataType_Array;
568 } 592 }
569 593
570 SkPdfArray getDAsArray() const { 594 SkPdfArray getDAsArray() const {
571 SkPdfArray ret = SkPdfArray(); 595 SkPdfArray ret = SkPdfArray();
572 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &r et)) return ret; 596 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &r et)) return ret;
573 // TODO(edisonn): warn about missing required field, assert for known good p dfs 597 // TODO(edisonn): warn about missing required field, assert for known good p dfs
574 return SkPdfArray(); 598 return SkPdfArray();
575 } 599 }
576 600
601 /** (Optional; PDF 1.2) A flag specifying whether to open the destination docu-
602 * ment in a new window. If this flag is false, the destination document will
603 * replace the current document in the same window. If this entry is absent,
604 * the viewer application should behave in accordance with the current user
605 * preference.
606 **/
607 bool has_NewWindow() const {
608 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NewWi ndow", "", NULL));
609 }
610
577 bool NewWindow() const { 611 bool NewWindow() const {
578 bool ret; 612 bool ret;
579 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NewWindow", "", &ret)) return ret; 613 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NewWindow", "", &ret)) return ret;
580 // TODO(edisonn): warn about missing required field, assert for known good p dfs 614 // TODO(edisonn): warn about missing required field, assert for known good p dfs
581 return false; 615 return false;
582 } 616 }
583 617
584 }; 618 };
585 619
586 #endif // __DEFINED__SkPdfRemoteGoToActionDictionary 620 #endif // __DEFINED__SkPdfRemoteGoToActionDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698