OLD | NEW |
1 #ifndef __DEFINED__SkPdfBlockLevelStructureElementsDictionary | 1 #ifndef __DEFINED__SkPdfBlockLevelStructureElementsDictionary |
2 #define __DEFINED__SkPdfBlockLevelStructureElementsDictionary | 2 #define __DEFINED__SkPdfBlockLevelStructureElementsDictionary |
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 // Additional standard layout attributes specific to block-level structure eleme
nts | 9 // Additional standard layout attributes specific to block-level structure eleme
nts |
10 class SkPdfBlockLevelStructureElementsDictionary : public SkPdfDictionary { | 10 class SkPdfBlockLevelStructureElementsDictionary : public SkPdfDictionary { |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 * ILSEs within the first line of the BLSE (see "Layout Attributes for ILSEs" o
n | 531 * ILSEs within the first line of the BLSE (see "Layout Attributes for ILSEs" o
n |
532 * page 646). If the preceding BLSE has a SpaceAfter attribute, the greater of
the | 532 * page 646). If the preceding BLSE has a SpaceAfter attribute, the greater of
the |
533 * two attribute values is used. Default value: 0. | 533 * two attribute values is used. Default value: 0. |
534 * Note: This attribute is disregarded for the first BLSE placed in a given ref
erence | 534 * Note: This attribute is disregarded for the first BLSE placed in a given ref
erence |
535 * area. | 535 * area. |
536 **/ | 536 **/ |
537 bool has_SpaceBefore() const { | 537 bool has_SpaceBefore() const { |
538 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Space
Before", "", NULL)); | 538 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Space
Before", "", NULL)); |
539 } | 539 } |
540 | 540 |
541 double SpaceBefore() const { | 541 double SpaceBefore() const; |
542 double ret; | |
543 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpaceBefo
re", "", &ret)) return ret; | |
544 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
545 return 0; | |
546 } | |
547 | |
548 /** (Optional) The amount of extra space following the after edge of the BLSE, | 542 /** (Optional) The amount of extra space following the after edge of the BLSE, |
549 * measured in default user space units in the block-progression direction. Thi
s | 543 * measured in default user space units in the block-progression direction. Thi
s |
550 * value is added to any adjustments induced by the LineHeight attributes of | 544 * value is added to any adjustments induced by the LineHeight attributes of |
551 * ILSEs within the last line of the BLSE (see "Layout Attributes for ILSEs" on | 545 * ILSEs within the last line of the BLSE (see "Layout Attributes for ILSEs" on |
552 * page 646). If the following BLSE has a SpaceBefore attribute, the greater of | 546 * page 646). If the following BLSE has a SpaceBefore attribute, the greater of |
553 * the two attribute values is used. Default value: 0. | 547 * the two attribute values is used. Default value: 0. |
554 * Note: This attribute is disregarded for the last BLSE placed in a given refe
rence | 548 * Note: This attribute is disregarded for the last BLSE placed in a given refe
rence |
555 * area. | 549 * area. |
556 **/ | 550 **/ |
557 bool has_SpaceAfter() const { | 551 bool has_SpaceAfter() const { |
558 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Space
After", "", NULL)); | 552 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Space
After", "", NULL)); |
559 } | 553 } |
560 | 554 |
561 double SpaceAfter() const { | 555 double SpaceAfter() const; |
562 double ret; | |
563 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpaceAfte
r", "", &ret)) return ret; | |
564 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
565 return 0; | |
566 } | |
567 | |
568 /** (Optional) The distance from the start edge of the reference area to that of
the | 556 /** (Optional) The distance from the start edge of the reference area to that of
the |
569 * BLSE, measured in default user space units in the inline-progression direc- | 557 * BLSE, measured in default user space units in the inline-progression direc- |
570 * tion. This attribute applies only to structure elements with a Placement | 558 * tion. This attribute applies only to structure elements with a Placement |
571 * attribute of Block or Start (see "General Layout Attributes" on page 640); i
t is | 559 * attribute of Block or Start (see "General Layout Attributes" on page 640); i
t is |
572 * disregarded for those with other Placement values. Default value: 0. | 560 * disregarded for those with other Placement values. Default value: 0. |
573 * Note: A negative value for this attribute places the start edge of the BLSE
out- | 561 * Note: A negative value for this attribute places the start edge of the BLSE
out- |
574 * side that of the reference area. The results are implementation-dependent an
d | 562 * side that of the reference area. The results are implementation-dependent an
d |
575 * may not be supported by all Tagged PDF consumer applications or export | 563 * may not be supported by all Tagged PDF consumer applications or export |
576 * formats. | 564 * formats. |
577 * Note: If a structure element with a StartIndent attribute is placed adjacent
to a | 565 * Note: If a structure element with a StartIndent attribute is placed adjacent
to a |
578 * floating element with a Placement attribute of Start, the actual value used
for | 566 * floating element with a Placement attribute of Start, the actual value used
for |
579 * the element's starting indent will be its own StartIndent attribute or the i
nline | 567 * the element's starting indent will be its own StartIndent attribute or the i
nline |
580 * extent of the adjacent floating element, whichever is greater. This value ma
y | 568 * extent of the adjacent floating element, whichever is greater. This value ma
y |
581 * then be further adjusted by the element's TextIndent attribute, if any. | 569 * then be further adjusted by the element's TextIndent attribute, if any. |
582 **/ | 570 **/ |
583 bool has_StartIndent() const { | 571 bool has_StartIndent() const { |
584 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Start
Indent", "", NULL)); | 572 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Start
Indent", "", NULL)); |
585 } | 573 } |
586 | 574 |
587 double StartIndent() const { | 575 double StartIndent() const; |
588 double ret; | |
589 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StartInde
nt", "", &ret)) return ret; | |
590 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
591 return 0; | |
592 } | |
593 | |
594 /** (Optional) The distance from the end edge of the BLSE to that of the ref- | 576 /** (Optional) The distance from the end edge of the BLSE to that of the ref- |
595 * erence area, measured in default user space units in the inline-progression | 577 * erence area, measured in default user space units in the inline-progression |
596 * direction. This attribute applies only to structure elements with a Placemen
t | 578 * direction. This attribute applies only to structure elements with a Placemen
t |
597 * attribute of Block or End (see "General Layout Attributes" on page 640); it
is | 579 * attribute of Block or End (see "General Layout Attributes" on page 640); it
is |
598 * disregarded for those with other Placement values. Default value: 0. | 580 * disregarded for those with other Placement values. Default value: 0. |
599 * Note: A negative value for this attribute places the end edge of the BLSE ou
tside | 581 * Note: A negative value for this attribute places the end edge of the BLSE ou
tside |
600 * that of the reference area. The results are implementation-dependent and may | 582 * that of the reference area. The results are implementation-dependent and may |
601 * not be supported by all Tagged PDF consumer applications or export formats. | 583 * not be supported by all Tagged PDF consumer applications or export formats. |
602 * Note: If a structure element with an EndIndent attribute is placed adjacent
to a | 584 * Note: If a structure element with an EndIndent attribute is placed adjacent
to a |
603 * floating element with a Placement attribute of End, the actual value used fo
r the | 585 * floating element with a Placement attribute of End, the actual value used fo
r the |
604 * element's ending indent will be its own EndIndent attribute or the inline ex
tent | 586 * element's ending indent will be its own EndIndent attribute or the inline ex
tent |
605 * of the adjacent floating element, whichever is greater. | 587 * of the adjacent floating element, whichever is greater. |
606 **/ | 588 **/ |
607 bool has_EndIndent() const { | 589 bool has_EndIndent() const { |
608 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndIn
dent", "", NULL)); | 590 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndIn
dent", "", NULL)); |
609 } | 591 } |
610 | 592 |
611 double EndIndent() const { | 593 double EndIndent() const; |
612 double ret; | |
613 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndIndent
", "", &ret)) return ret; | |
614 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
615 return 0; | |
616 } | |
617 | |
618 /** (Optional; applies only to some BLSEs, as described below) The additional | 594 /** (Optional; applies only to some BLSEs, as described below) The additional |
619 * distance, measured in default user space units in the inline-progression | 595 * distance, measured in default user space units in the inline-progression |
620 * direction, from the start edge of the BLSE, as specified by StartIndent | 596 * direction, from the start edge of the BLSE, as specified by StartIndent |
621 * (above), to that of the first line of text. A negative value indicates a han
ging | 597 * (above), to that of the first line of text. A negative value indicates a han
ging |
622 * indent. Default value: 0. | 598 * indent. Default value: 0. |
623 * This attribute applies only to paragraphlike BLSEs and those of structure | 599 * This attribute applies only to paragraphlike BLSEs and those of structure |
624 * types Lbl (Label), LBody (List body), TH (Table header), and TD (Table data)
, | 600 * types Lbl (Label), LBody (List body), TH (Table header), and TD (Table data)
, |
625 * provided that they contain content other than nested BLSEs. | 601 * provided that they contain content other than nested BLSEs. |
626 **/ | 602 **/ |
627 bool has_TextIndent() const { | 603 bool has_TextIndent() const { |
628 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TextI
ndent", "", NULL)); | 604 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TextI
ndent", "", NULL)); |
629 } | 605 } |
630 | 606 |
631 double TextIndent() const { | 607 double TextIndent() const; |
632 double ret; | |
633 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TextInden
t", "", &ret)) return ret; | |
634 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
635 return 0; | |
636 } | |
637 | |
638 /** (Optional; applies only to BLSEs containing text) The alignment, in the inli
ne- | 608 /** (Optional; applies only to BLSEs containing text) The alignment, in the inli
ne- |
639 * progression direction, of text and other content within lines of the BLSE: | 609 * progression direction, of text and other content within lines of the BLSE: |
640 * Start Aligned with the start edge. | 610 * Start Aligned with the start edge. |
641 * Center Centered between the start and end edges. | 611 * Center Centered between the start and end edges. |
642 * End Aligned with the end edge. | 612 * End Aligned with the end edge. |
643 * Justify Aligned with both the start and end edges, with internal | 613 * Justify Aligned with both the start and end edges, with internal |
644 * spacing within each line expanded, if necessary, to achieve | 614 * spacing within each line expanded, if necessary, to achieve |
645 * such alignment. The last (or only) line is aligned with the | 615 * such alignment. The last (or only) line is aligned with the |
646 * start edge only, as for Start (above). | 616 * start edge only, as for Start (above). |
647 * Default value: Start. | 617 * Default value: Start. |
648 **/ | 618 **/ |
649 bool has_TextAlign() const { | 619 bool has_TextAlign() const { |
650 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TextA
lign", "", NULL)); | 620 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TextA
lign", "", NULL)); |
651 } | 621 } |
652 | 622 |
653 std::string TextAlign() const { | 623 std::string TextAlign() const; |
654 std::string ret; | |
655 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TextAlign",
"", &ret)) return ret; | |
656 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
657 return ""; | |
658 } | |
659 | |
660 /** (Illustrations and tables only; required if the element appears in its entir
ety on a | 624 /** (Illustrations and tables only; required if the element appears in its entir
ety on a |
661 * single page) An array of four numbers in default user space units giving the | 625 * single page) An array of four numbers in default user space units giving the |
662 * coordinates of the left, bottom, right, and top edges, respectively, of the
ele- | 626 * coordinates of the left, bottom, right, and top edges, respectively, of the
ele- |
663 * ment's bounding box (the rectangle that completely encloses its visible con- | 627 * ment's bounding box (the rectangle that completely encloses its visible con- |
664 * tent). This attribute applies only to elements of structure type Figure, | 628 * tent). This attribute applies only to elements of structure type Figure, |
665 * Formula, Form, or Table. | 629 * Formula, Form, or Table. |
666 **/ | 630 **/ |
667 bool has_BBox() const { | 631 bool has_BBox() const { |
668 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox"
, "", NULL)); | 632 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox"
, "", NULL)); |
669 } | 633 } |
670 | 634 |
671 SkRect* BBox() const { | 635 SkRect* BBox() const; |
672 SkRect* ret; | |
673 if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox", ""
, &ret)) return ret; | |
674 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
675 return NULL; | |
676 } | |
677 | |
678 /** (Optional; illustrations, tables, table headers, and table cells only; stron
gly | 636 /** (Optional; illustrations, tables, table headers, and table cells only; stron
gly |
679 * recommended for table cells) The desired width of the element's content | 637 * recommended for table cells) The desired width of the element's content |
680 * rectangle (see "Content and Allocation Rectangles" on page 648), measured | 638 * rectangle (see "Content and Allocation Rectangles" on page 648), measured |
681 * in default user space units in the inline-progression direction. This attrib
ute | 639 * in default user space units in the inline-progression direction. This attrib
ute |
682 * applies only to elements of structure type Figure, Formula, Form, Table, TH | 640 * applies only to elements of structure type Figure, Formula, Form, Table, TH |
683 * (Table header), or TD (Table data). | 641 * (Table header), or TD (Table data). |
684 * The name Auto in place of a numeric value indicates that no specific width | 642 * The name Auto in place of a numeric value indicates that no specific width |
685 * constraint is to be imposed; the element's width is determined by the intrin
- | 643 * constraint is to be imposed; the element's width is determined by the intrin
- |
686 * sic width of its content. Default value: Auto. | 644 * sic width of its content. Default value: Auto. |
687 **/ | 645 **/ |
688 bool has_Width() const { | 646 bool has_Width() const { |
689 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width
", "", NULL)); | 647 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width
", "", NULL)); |
690 } | 648 } |
691 | 649 |
692 bool isWidthANumber() const { | 650 bool isWidthANumber() const { |
693 SkPdfObject* ret = NULL; | 651 SkPdfObject* ret = NULL; |
694 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width",
"", &ret)) return false; | 652 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width",
"", &ret)) return false; |
695 return ret->podofo()->GetDataType() == ePdfDataType_Real || ret->podofo()->G
etDataType() == ePdfDataType_Number; | 653 return ret->podofo()->GetDataType() == ePdfDataType_Real || ret->podofo()->G
etDataType() == ePdfDataType_Number; |
696 } | 654 } |
697 | 655 |
698 double getWidthAsNumber() const { | 656 double getWidthAsNumber() const; |
699 double ret = 0; | |
700 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width", "
", &ret)) return ret; | |
701 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
702 return 0; | |
703 } | |
704 | |
705 bool isWidthAName() const { | 657 bool isWidthAName() const { |
706 SkPdfObject* ret = NULL; | 658 SkPdfObject* ret = NULL; |
707 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width",
"", &ret)) return false; | 659 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width",
"", &ret)) return false; |
708 return ret->podofo()->GetDataType() == ePdfDataType_Name; | 660 return ret->podofo()->GetDataType() == ePdfDataType_Name; |
709 } | 661 } |
710 | 662 |
711 std::string getWidthAsName() const { | 663 std::string getWidthAsName() const; |
712 std::string ret = ""; | |
713 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width", "",
&ret)) return ret; | |
714 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
715 return ""; | |
716 } | |
717 | |
718 /** (Optional; illustrations, tables, table headers, and table cells only) The d
esired | 664 /** (Optional; illustrations, tables, table headers, and table cells only) The d
esired |
719 * height of the element's content rectangle (see "Content and Allocation | 665 * height of the element's content rectangle (see "Content and Allocation |
720 * Rectangles" on page 648), measured in default user space units in the block- | 666 * Rectangles" on page 648), measured in default user space units in the block- |
721 * progression direction. This attribute applies only to elements of structure | 667 * progression direction. This attribute applies only to elements of structure |
722 * type Figure, Formula, Form, Table, TH (Table header), or TD (Table data). | 668 * type Figure, Formula, Form, Table, TH (Table header), or TD (Table data). |
723 * The name Auto in place of a numeric value indicates that no specific height | 669 * The name Auto in place of a numeric value indicates that no specific height |
724 * constraint is to be imposed; the element's height is determined by the intri
n- | 670 * constraint is to be imposed; the element's height is determined by the intri
n- |
725 * sic height of its content. Default value: Auto. | 671 * sic height of its content. Default value: Auto. |
726 **/ | 672 **/ |
727 bool has_Height() const { | 673 bool has_Height() const { |
728 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Heigh
t", "", NULL)); | 674 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Heigh
t", "", NULL)); |
729 } | 675 } |
730 | 676 |
731 bool isHeightANumber() const { | 677 bool isHeightANumber() const { |
732 SkPdfObject* ret = NULL; | 678 SkPdfObject* ret = NULL; |
733 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height",
"", &ret)) return false; | 679 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height",
"", &ret)) return false; |
734 return ret->podofo()->GetDataType() == ePdfDataType_Real || ret->podofo()->G
etDataType() == ePdfDataType_Number; | 680 return ret->podofo()->GetDataType() == ePdfDataType_Real || ret->podofo()->G
etDataType() == ePdfDataType_Number; |
735 } | 681 } |
736 | 682 |
737 double getHeightAsNumber() const { | 683 double getHeightAsNumber() const; |
738 double ret = 0; | |
739 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height",
"", &ret)) return ret; | |
740 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
741 return 0; | |
742 } | |
743 | |
744 bool isHeightAName() const { | 684 bool isHeightAName() const { |
745 SkPdfObject* ret = NULL; | 685 SkPdfObject* ret = NULL; |
746 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height",
"", &ret)) return false; | 686 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height",
"", &ret)) return false; |
747 return ret->podofo()->GetDataType() == ePdfDataType_Name; | 687 return ret->podofo()->GetDataType() == ePdfDataType_Name; |
748 } | 688 } |
749 | 689 |
750 std::string getHeightAsName() const { | 690 std::string getHeightAsName() const; |
751 std::string ret = ""; | |
752 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height", ""
, &ret)) return ret; | |
753 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
754 return ""; | |
755 } | |
756 | |
757 /** (Optional; table cells only) The alignment, in the block-progression directi
on, | 691 /** (Optional; table cells only) The alignment, in the block-progression directi
on, |
758 * of content within the table cell: | 692 * of content within the table cell: |
759 * Before Before edge of the first child's allocation rectangle ali
gned | 693 * Before Before edge of the first child's allocation rectangle ali
gned |
760 * with that of the table cell's content rectangle. | 694 * with that of the table cell's content rectangle. |
761 * Middle Children centered within the table cell, so that the dist
ance | 695 * Middle Children centered within the table cell, so that the dist
ance |
762 * between the before edge of the first child's allocation r
ec- | 696 * between the before edge of the first child's allocation r
ec- |
763 * tangle and that of the table cell's content rectangle is
the same | 697 * tangle and that of the table cell's content rectangle is
the same |
764 * as the distance between the after edge of the last child'
s allo- | 698 * as the distance between the after edge of the last child'
s allo- |
765 * cation rectangle and that of the table cell's content rec
tangle. | 699 * cation rectangle and that of the table cell's content rec
tangle. |
766 * After After edge of the last child's allocation rectangle align
ed with | 700 * After After edge of the last child's allocation rectangle align
ed with |
767 * that of the table cell's content rectangle. | 701 * that of the table cell's content rectangle. |
768 * Justify Children aligned with both the before and after edges of
the | 702 * Justify Children aligned with both the before and after edges of
the |
769 * table cell's content rectangle. The first child is placed
as | 703 * table cell's content rectangle. The first child is placed
as |
770 * described above for Before and the last child as describe
d for | 704 * described above for Before and the last child as describe
d for |
771 * After, with equal spacing between the children. If there
is only | 705 * After, with equal spacing between the children. If there
is only |
772 * one child, it is aligned with the before edge only, as fo
r Before. | 706 * one child, it is aligned with the before edge only, as fo
r Before. |
773 * This attribute applies only to elements of structure type TH (Table header)
or | 707 * This attribute applies only to elements of structure type TH (Table header)
or |
774 * TD (Table data), and controls the placement of all BLSEs that are children
of | 708 * TD (Table data), and controls the placement of all BLSEs that are children
of |
775 * the given element. The table cell's content rectangle (see "Content and All
o- | 709 * the given element. The table cell's content rectangle (see "Content and All
o- |
776 * cation Rectangles" on page 648) becomes the reference area for all of its | 710 * cation Rectangles" on page 648) becomes the reference area for all of its |
777 * descendants. Default value: Before. | 711 * descendants. Default value: Before. |
778 **/ | 712 **/ |
779 bool has_BlockAlign() const { | 713 bool has_BlockAlign() const { |
780 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Block
Align", "", NULL)); | 714 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Block
Align", "", NULL)); |
781 } | 715 } |
782 | 716 |
783 std::string BlockAlign() const { | 717 std::string BlockAlign() const; |
784 std::string ret; | |
785 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlockAlign"
, "", &ret)) return ret; | |
786 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
787 return ""; | |
788 } | |
789 | |
790 /** (Optional; table cells only) The alignment, in the inline-progression direct
ion, | 718 /** (Optional; table cells only) The alignment, in the inline-progression direct
ion, |
791 * of content within the table cell: | 719 * of content within the table cell: |
792 * Start Start edge of each child's allocation rectangle aligned wit
h | 720 * Start Start edge of each child's allocation rectangle aligned wit
h |
793 * that of the table cell's content rectangle | 721 * that of the table cell's content rectangle |
794 * Center Each child centered within the table cell, so that the dist
ance | 722 * Center Each child centered within the table cell, so that the dist
ance |
795 * between the start edges of the child's allocation rectangle
and | 723 * between the start edges of the child's allocation rectangle
and |
796 * the table cell's content rectangle is the same as the dista
nce | 724 * the table cell's content rectangle is the same as the dista
nce |
797 * between their end edges | 725 * between their end edges |
798 * End End edge of each child's allocation rectangle aligned with | 726 * End End edge of each child's allocation rectangle aligned with |
799 * that of the table cell's content rectangle | 727 * that of the table cell's content rectangle |
800 * This attribute applies only to elements of structure type TH (Table header)
or | 728 * This attribute applies only to elements of structure type TH (Table header)
or |
801 * TD (Table data), and controls the placement of all BLSEs that are children o
f | 729 * TD (Table data), and controls the placement of all BLSEs that are children o
f |
802 * the given element. The table cell's content rectangle (see "Content and Allo
- | 730 * the given element. The table cell's content rectangle (see "Content and Allo
- |
803 * cation Rectangles" on page 648) becomes the reference area for all of its | 731 * cation Rectangles" on page 648) becomes the reference area for all of its |
804 * descendants. Default value: Start. | 732 * descendants. Default value: Start. |
805 **/ | 733 **/ |
806 bool has_InlineAlign() const { | 734 bool has_InlineAlign() const { |
807 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Inlin
eAlign", "", NULL)); | 735 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Inlin
eAlign", "", NULL)); |
808 } | 736 } |
809 | 737 |
810 std::string InlineAlign() const { | 738 std::string InlineAlign() const; |
811 std::string ret; | |
812 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "InlineAlign
", "", &ret)) return ret; | |
813 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
814 return ""; | |
815 } | |
816 | |
817 }; | 739 }; |
818 | 740 |
819 #endif // __DEFINED__SkPdfBlockLevelStructureElementsDictionary | 741 #endif // __DEFINED__SkPdfBlockLevelStructureElementsDictionary |
OLD | NEW |