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

Side by Side Diff: experimental/PdfViewer/SkPdfFileTrailerDictionary_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__SkPdfFileTrailerDictionary 1 #ifndef __DEFINED__SkPdfFileTrailerDictionary
2 #define __DEFINED__SkPdfFileTrailerDictionary 2 #define __DEFINED__SkPdfFileTrailerDictionary
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 // Entries in the file trailer dictionary
8 class SkPdfFileTrailerDictionary : public SkPdfDictionary { 9 class SkPdfFileTrailerDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kFileTrailerDictionary_SkPdfO bjectType;} 11 virtual SkPdfObjectType getType() const { return kFileTrailerDictionary_SkPdfO bjectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kFileTra ilerDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kFileTra ilerDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfFileTrailerDictionary* asFileTrailerDictionary() {return this;} 14 virtual SkPdfFileTrailerDictionary* asFileTrailerDictionary() {return this;}
14 virtual const SkPdfFileTrailerDictionary* asFileTrailerDictionary() const {ret urn this;} 15 virtual const SkPdfFileTrailerDictionary* asFileTrailerDictionary() const {ret urn 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 SkPdfFileTrailerDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfOb ject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfFileTrailerDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfOb ject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {}
519 520
520 virtual bool valid() const {return true;} 521 virtual bool valid() const {return true;}
521 522
522 SkPdfFileTrailerDictionary& operator=(const SkPdfFileTrailerDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;} 523 SkPdfFileTrailerDictionary& operator=(const SkPdfFileTrailerDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
523 524
525 /** (Required) The total number of entries in the file's cross-reference table, as defined
526 * by the combination of the original section and all update sections. Equivale ntly, this
527 * value is 1 greater than the highest object number used in the file.
528 **/
529 bool has_Size() const {
530 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Size" , "", NULL));
531 }
532
524 long Size() const { 533 long Size() const {
525 long ret; 534 long ret;
526 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Size", "", &ret)) return ret; 535 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Size", "", &ret)) return ret;
527 // TODO(edisonn): warn about missing required field, assert for known good p dfs 536 // TODO(edisonn): warn about missing required field, assert for known good p dfs
528 return 0; 537 return 0;
529 } 538 }
530 539
540 /** (Present only if the file has more than one cross-reference section) The byt e offset from
541 * the beginning of the file to the beginning of the previous cross-reference s ection.
542 **/
543 bool has_Prev() const {
544 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Prev" , "", NULL));
545 }
546
531 long Prev() const { 547 long Prev() const {
532 long ret; 548 long ret;
533 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Prev", "", &ret)) return ret; 549 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Prev", "", &ret)) return ret;
534 // TODO(edisonn): warn about missing required field, assert for known good p dfs 550 // TODO(edisonn): warn about missing required field, assert for known good p dfs
535 return 0; 551 return 0;
536 } 552 }
537 553
554 /** (Required; must be an indirect reference) The catalog dictionary for the PDF docu-
555 * ment contained in the file (see Section 3.6.1, "Document Catalog").
556 **/
557 bool has_Root() const {
558 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Root" , "", NULL));
559 }
560
538 SkPdfDictionary* Root() const { 561 SkPdfDictionary* Root() const {
539 SkPdfDictionary* ret; 562 SkPdfDictionary* ret;
540 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Root" , "", &ret)) return ret; 563 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Root" , "", &ret)) return ret;
541 // TODO(edisonn): warn about missing required field, assert for known good p dfs 564 // TODO(edisonn): warn about missing required field, assert for known good p dfs
542 return NULL; 565 return NULL;
543 } 566 }
544 567
568 /** (Required if document is encrypted; PDF 1.1) The document's encryption dicti onary
569 * (see Section 3.5, "Encryption").
570 **/
571 bool has_Encrypt() const {
572 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Encry pt", "", NULL));
573 }
574
545 SkPdfDictionary* Encrypt() const { 575 SkPdfDictionary* Encrypt() const {
546 SkPdfDictionary* ret; 576 SkPdfDictionary* ret;
547 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Encry pt", "", &ret)) return ret; 577 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Encry pt", "", &ret)) return ret;
548 // TODO(edisonn): warn about missing required field, assert for known good p dfs 578 // TODO(edisonn): warn about missing required field, assert for known good p dfs
549 return NULL; 579 return NULL;
550 } 580 }
551 581
582 /** (Optional; must be an indirect reference) The document's information diction ary
583 * (see Section 9.2.1, "Document Information Dictionary").
584 **/
585 bool has_Info() const {
586 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Info" , "", NULL));
587 }
588
552 SkPdfDictionary* Info() const { 589 SkPdfDictionary* Info() const {
553 SkPdfDictionary* ret; 590 SkPdfDictionary* ret;
554 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Info" , "", &ret)) return ret; 591 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Info" , "", &ret)) return ret;
555 // TODO(edisonn): warn about missing required field, assert for known good p dfs 592 // TODO(edisonn): warn about missing required field, assert for known good p dfs
556 return NULL; 593 return NULL;
557 } 594 }
558 595
596 /** (Optional; PDF 1.1) An array of two strings constituting a file identifier ( see Section
597 * 9.3, "File Identifiers") for the file.
598 **/
599 bool has_ID() const {
600 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", NULL));
601 }
602
559 SkPdfArray ID() const { 603 SkPdfArray ID() const {
560 SkPdfArray ret; 604 SkPdfArray ret;
561 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", & ret)) return ret; 605 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", & ret)) return ret;
562 // TODO(edisonn): warn about missing required field, assert for known good p dfs 606 // TODO(edisonn): warn about missing required field, assert for known good p dfs
563 return SkPdfArray(); 607 return SkPdfArray();
564 } 608 }
565 609
566 }; 610 };
567 611
568 #endif // __DEFINED__SkPdfFileTrailerDictionary 612 #endif // __DEFINED__SkPdfFileTrailerDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698