Revision 7d42d369
Von Moritz Bunkus vor mehr als 16 Jahren hinzugefügt
SL/ReportGenerator.pm | ||
---|---|---|
454 | 454 |
push @cell_props, $cell_props_row; |
455 | 455 |
|
456 | 456 |
foreach my $custom_header_col (@{ $custom_header_row }) { |
457 |
push @{ $data_row }, $custom_header_col->{text}; |
|
458 |
push @{ $cell_props_row }, {}; |
|
457 |
push @{ $data_row }, $custom_header_col->{text}; |
|
458 |
|
|
459 |
my $num_output = ($custom_header_col->{colspan} * 1 > 1) ? $custom_header_col->{colspan} : 1; |
|
460 |
if ($num_output > 1) { |
|
461 |
push @{ $data_row }, ('') x ($num_output - 1); |
|
462 |
push @{ $cell_props_row }, { 'colspan' => $num_output }; |
|
463 |
push @{ $cell_props_row }, ({ }) x ($num_output - 1); |
|
464 |
|
|
465 |
} else { |
|
466 |
push @{ $cell_props_row }, {}; |
|
467 |
} |
|
459 | 468 |
} |
460 | 469 |
} |
461 | 470 |
} |
... | ... | |
478 | 487 |
} |
479 | 488 |
|
480 | 489 |
foreach my $row (@{ $row_set }) { |
481 |
$data_row = []; |
|
482 |
push @data, $data_row; |
|
490 |
$data_row = []; |
|
491 |
$cell_props_row = []; |
|
492 |
|
|
493 |
push @data, $data_row; |
|
494 |
push @cell_props, $cell_props_row; |
|
483 | 495 |
|
484 | 496 |
my $col_idx = 0; |
485 | 497 |
foreach my $col_name (@visible_columns) { |
... | ... | |
488 | 500 |
|
489 | 501 |
$column_props[$col_idx]->{justify} = 'right' if ($col->{align} eq 'right'); |
490 | 502 |
|
491 |
$col_idx++;
|
|
492 |
}
|
|
503 |
my $cell_props = { };
|
|
504 |
push @{ $cell_props_row }, $cell_props;
|
|
493 | 505 |
|
494 |
$cell_props_row = []; |
|
495 |
push @cell_props, $cell_props_row; |
|
506 |
if ($col->{colspan} && $col->{colspan} > 1) { |
|
507 |
$cell_props->{colspan} = $col->{colspan}; |
|
508 |
} |
|
496 | 509 |
|
497 |
foreach (0 .. $num_columns - 1) { |
|
498 |
push @{ $cell_props_row }, { }; |
|
510 |
$col_idx++; |
|
499 | 511 |
} |
500 | 512 |
} |
501 | 513 |
} |
Auch abrufbar als: Unified diff
ReportGenerator: Unterstützung für das Verbinden von Tabellenzellen mit dem "colspan"-Attribut in der PDF-Ausgabe.