Revision a2730e8a
Von Sven Schöling vor mehr als 5 Jahren hinzugefügt
modules/override/PDF/Table.pm | ||
---|---|---|
673 | 673 |
|
674 | 674 |
|
675 | 675 |
# Choose colors for this row |
676 |
$background_color = $row_index % 2 ? $background_color_even : $background_color_odd;
|
|
677 |
$font_color = $row_index % 2 ? $font_color_even : $font_color_odd;
|
|
676 |
$background_color = ($row_index - $header_props->{num_header_rows}) % 2 ? $background_color_even : $background_color_odd;
|
|
677 |
$font_color = ($row_index - $header_props->{num_header_rows}) % 2 ? $font_color_even : $font_color_odd;
|
|
678 | 678 |
|
679 | 679 |
#Determine current row height |
680 | 680 |
my $current_row_height = $pad_top + $pre_calculated_row_height + $pad_bot; |
... | ... | |
746 | 746 |
// $default_text; |
747 | 747 |
|
748 | 748 |
my $this_width; |
749 |
if (!$remaining_header_rows && $cell_props->[$row_index][$column_idx]->{colspan}) { |
|
750 |
$colspan = $cell_props->[$row_index][$column_idx]->{colspan}; |
|
751 |
} elsif ($remaining_header_rows && $header_row_cell_props[$header_props->{num_header_rows} - $remaining_header_rows][$column_idx]->{colspan}) {
|
|
749 |
if (!$remaining_header_rows && $cell_props->[$row_index + $header_props->{num_header_rows}][$column_idx]->{colspan}) {
|
|
750 |
$colspan = $cell_props->[$row_index + $header_props->{num_header_rows}][$column_idx]->{colspan};
|
|
751 |
} elsif ($remaining_header_rows && ($header_row_cell_props[$header_props->{num_header_rows} - $remaining_header_rows][$column_idx]->{colspan})) {
|
|
752 | 752 |
$colspan = $header_row_cell_props[$header_props->{num_header_rows} - $remaining_header_rows][$column_idx]->{colspan}; |
753 | 753 |
} |
754 | 754 |
|
... | ... | |
846 | 846 |
} |
847 | 847 |
|
848 | 848 |
# Get the most specific value if none was already set from header_props |
849 |
$cell_bg_color ||= $cell_props->[$row_index][$column_idx]->{'background_color'} |
|
849 |
$cell_bg_color ||= $cell_props->[$row_index + $header_props->{num_header_rows}][$column_idx]->{'background_color'}
|
|
850 | 850 |
|| $col_props->[$column_idx]->{'background_color'} |
851 | 851 |
|| $background_color; |
852 | 852 |
|
Auch abrufbar als: Unified diff
PDF::Table: Prop Index korrekt indizieren