projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b8da878
)
Reportgenerator strict
author
Sven Schöling
<s.schoeling@linet-services.de>
Tue, 23 Dec 2008 14:46:48 +0000
(14:46 +0000)
committer
Sven Schöling
<s.schoeling@linet-services.de>
Tue, 23 Dec 2008 14:46:48 +0000
(14:46 +0000)
SL/ReportGenerator.pm
patch
|
blob
|
history
diff --git
a/SL/ReportGenerator.pm
b/SL/ReportGenerator.pm
index
050984a
..
f390db0
100644
(file)
--- a/
SL/ReportGenerator.pm
+++ b/
SL/ReportGenerator.pm
@@
-1,12
+1,14
@@
package SL::ReportGenerator;
package SL::ReportGenerator;
+use strict;
+
use Encode;
use IO::Wrap;
use List::Util qw(max);
use Text::CSV_XS;
use Text::Iconv;
use Encode;
use IO::Wrap;
use List::Util qw(max);
use Text::CSV_XS;
use Text::Iconv;
-use PDF::API2;
-use PDF::Table;
+#use PDF::API2; # these two eat up to .75s on startup. only load them if we actually need them
+
#
use PDF::Table;
use SL::Form;
use SL::Form;
@@
-440,7
+442,7
@@
sub generate_pdf_content {
my $font_encoding = $main::dbcharset || 'ISO-8859-15';
$self->{text_is_utf8} = $font_encoding =~ m/^utf-?8$/i;
my $font_encoding = $main::dbcharset || 'ISO-8859-15';
$self->{text_is_utf8} = $font_encoding =~ m/^utf-?8$/i;
- foreach $name (@visible_columns) {
+ foreach
my
$name (@visible_columns) {
push @column_props, { 'justify' => $self->{columns}->{$name}->{align} eq 'right' ? 'right' : 'left' };
}
push @column_props, { 'justify' => $self->{columns}->{$name}->{align} eq 'right' ? 'right' : 'left' };
}
@@
-450,8
+452,8
@@
sub generate_pdf_content {
push @data, $data_row;
push @cell_props, $cell_props_row;
push @data, $data_row;
push @cell_props, $cell_props_row;
- foreach $name (@visible_columns) {
- $column = $self->{columns}->{$name};
+ foreach
my
$name (@visible_columns) {
+
my
$column = $self->{columns}->{$name};
push @{ $data_row }, $self->_decode_text($column->{text});
push @{ $cell_props_row }, {};
push @{ $data_row }, $self->_decode_text($column->{text});
push @{ $cell_props_row }, {};