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

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

Powered by Google App Engine
This is Rietveld 408576698