Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 53b59449

Von Sven Schöling vor fast 9 Jahren hinzugefügt

  • ID 53b594492c17d13c3e837531a30d3e9fac5219a2
  • Vorgänger 8428160b
  • Nachfolger 89862296

PDF::Table: Prop Index korrekt indizieren

Unterschiede anzeigen:

modules/override/PDF/Table.pm
654 654
            }
655 655

  
656 656
            # Choose colors for this row
657
            $background_color = $row_index % 2 ? $background_color_even  : $background_color_odd;
658
            $font_color       = $row_index % 2 ? $font_color_even        : $font_color_odd;
657
            $background_color = ($row_index - $header_props->{num_header_rows}) % 2 ? $background_color_even  : $background_color_odd;
658
            $font_color       = ($row_index - $header_props->{num_header_rows}) % 2 ? $font_color_even        : $font_color_odd;
659 659

  
660 660
            #Determine current row height
661 661
            my $current_row_height = $pad_top + $pre_calculated_row_height + $pad_bot;
......
716 716
                $txt->fillcolor($cell_font_color);
717 717

  
718 718
                my $this_width;
719
                if (!$remaining_header_rows && $cell_props->[$row_index][$column_idx]->{colspan}) {
720
                    $colspan = $cell_props->[$row_index][$column_idx]->{colspan};
721
                } elsif ($remaining_header_rows && $header_row_cell_props[$header_props->{num_header_rows} - $remaining_header_rows][$column_idx]->{colspan}) {
719
                if (!$remaining_header_rows && $cell_props->[$row_index + $header_props->{num_header_rows}][$column_idx]->{colspan}) {
720
                    $colspan = $cell_props->[$row_index + $header_props->{num_header_rows}][$column_idx]->{colspan};
721
                } elsif ($remaining_header_rows && ($header_row_cell_props[$header_props->{num_header_rows} - $remaining_header_rows][$column_idx]->{colspan})) {
722 722
                    $colspan = $header_row_cell_props[$header_props->{num_header_rows} - $remaining_header_rows][$column_idx]->{colspan};
723 723
                }
724 724

  
......
799 799
                }
800 800
                
801 801
                # Get the most specific value if none was already set from header_props
802
                $cell_bg_color ||= $cell_props->[$row_index][$column_idx]->{'background_color'} 
802
                $cell_bg_color ||= $cell_props->[$row_index + $header_props->{num_header_rows}][$column_idx]->{'background_color'}
803 803
                               ||  $col_props->[$column_idx]->{'background_color'}
804 804
                               ||  $background_color;
805 805

  

Auch abrufbar als: Unified diff