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