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

Side by Side Diff: experimental/PdfViewer/SkPdfPageLabelDictionary_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__SkPdfPageLabelDictionary 1 #ifndef __DEFINED__SkPdfPageLabelDictionary
2 #define __DEFINED__SkPdfPageLabelDictionary 2 #define __DEFINED__SkPdfPageLabelDictionary
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 a page label dictionary
8 class SkPdfPageLabelDictionary : public SkPdfDictionary { 9 class SkPdfPageLabelDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kPageLabelDictionary_SkPdfObj ectType;} 11 virtual SkPdfObjectType getType() const { return kPageLabelDictionary_SkPdfObj ectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kPageLab elDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kPageLab elDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfPageLabelDictionary* asPageLabelDictionary() {return this;} 14 virtual SkPdfPageLabelDictionary* asPageLabelDictionary() {return this;}
14 virtual const SkPdfPageLabelDictionary* asPageLabelDictionary() const {return this;} 15 virtual const SkPdfPageLabelDictionary* asPageLabelDictionary() 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 SkPdfPageLabelDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObje ct* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfPageLabelDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObje ct* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {}
519 520
520 virtual bool valid() const {return true;} 521 virtual bool valid() const {return true;}
521 522
522 SkPdfPageLabelDictionary& operator=(const SkPdfPageLabelDictionary& from) {thi s->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *thi s;} 523 SkPdfPageLabelDictionary& operator=(const SkPdfPageLabelDictionary& from) {thi s->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *thi s;}
523 524
525 /** (Optional) The type of PDF object that this dictionary describes; if present , must be
526 * PageLabel for a page label dictionary.
527 **/
528 bool has_Type() const {
529 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type" , "", NULL));
530 }
531
524 std::string Type() const { 532 std::string Type() const {
525 std::string ret; 533 std::string ret;
526 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret; 534 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) 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 /** (Optional) The numbering style to be used for the numeric portion of each pa ge label:
540 * D Decimal arabic numerals
541 * R Uppercase roman numerals
542 * r Lowercase roman numerals
543 * A Uppercase letters (A to Z for the first 26 pages, AA to ZZ for the next 26, and so on)
544 * a Lowercase letters (a to z for the first 26 pages, aa to zz for the next 26, and so on)
545 * There is no default numbering style; if no S entry is present, page labels w ill consist solely
546 * of a label prefix with no numeric portion. For example, if the P entry (belo w) specifies the
547 * label prefix Contents, each page will simply be labeled Contents with no pag e number. (If
548 * the P entry is also missing or empty, the page label will be an empty string .)
549 **/
550 bool has_S() const {
551 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", " ", NULL));
552 }
553
531 std::string S() const { 554 std::string S() const {
532 std::string ret; 555 std::string ret;
533 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re t)) return ret; 556 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re t)) return ret;
534 // TODO(edisonn): warn about missing required field, assert for known good p dfs 557 // TODO(edisonn): warn about missing required field, assert for known good p dfs
535 return ""; 558 return "";
536 } 559 }
537 560
561 /** (Optional) The label prefix for page labels in this range.
562 **/
563 bool has_P() const {
564 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", " ", NULL));
565 }
566
538 std::string P() const { 567 std::string P() const {
539 std::string ret; 568 std::string ret;
540 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", & ret)) return ret; 569 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", & ret)) return ret;
541 // TODO(edisonn): warn about missing required field, assert for known good p dfs 570 // TODO(edisonn): warn about missing required field, assert for known good p dfs
542 return ""; 571 return "";
543 } 572 }
544 573
574 /** (Optional) The value of the numeric portion for the first page label in the range. Sub-
575 * sequent pages will be numbered sequentially from this value, which must be g reater than
576 * or equal to 1. Default value: 1.
577 **/
578 bool has_St() const {
579 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "St", "", NULL));
580 }
581
545 long St() const { 582 long St() const {
546 long ret; 583 long ret;
547 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "St", "", &r et)) return ret; 584 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "St", "", &r et)) return ret;
548 // TODO(edisonn): warn about missing required field, assert for known good p dfs 585 // TODO(edisonn): warn about missing required field, assert for known good p dfs
549 return 0; 586 return 0;
550 } 587 }
551 588
552 }; 589 };
553 590
554 #endif // __DEFINED__SkPdfPageLabelDictionary 591 #endif // __DEFINED__SkPdfPageLabelDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698