[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [1690] trunk/LedgerSMB/Template/ODS.pm
- Subject: SF.net SVN: ledger-smb: [1690] trunk/LedgerSMB/Template/ODS.pm
- From: ..hidden..
- Date: Tue, 02 Oct 2007 11:31:40 -0700
Revision: 1690
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1690&view=rev
Author: tetragon
Date: 2007-10-02 11:31:39 -0700 (Tue, 02 Oct 2007)
Log Message:
-----------
Removing unused variable
Modified Paths:
--------------
trunk/LedgerSMB/Template/ODS.pm
Modified: trunk/LedgerSMB/Template/ODS.pm
===================================================================
--- trunk/LedgerSMB/Template/ODS.pm 2007-10-02 16:57:29 UTC (rev 1689)
+++ trunk/LedgerSMB/Template/ODS.pm 2007-10-02 18:31:39 UTC (rev 1690)
@@ -114,33 +114,6 @@
'0.039cm double', '0.002cm solid'
);
-sub get_template {
- my $name = shift;
- return "${name}.odst";
-}
-
-sub preprocess {
- my $rawvars = shift;
- my $vars;
- my $type = ref $rawvars;
-
- #XXX fix escaping function
- return $rawvars if $type =~ /^LedgerSMB::Locale/;
- if ( $type eq 'ARRAY' ) {
- for (@{$rawvars}) {
- push @{$vars}, preprocess( $_ );
- }
- } elsif (!$type) {
- return escapeHTML($rawvars);
- } else { # Hashes and objects
- for ( keys %{$rawvars} ) {
- $vars->{preprocess($_)} = preprocess( $rawvars->{$_} );
- }
- }
-
- return $vars;
-}
-
sub _worksheet_handler {
$rowcount = -1;
$currcol = 0;
@@ -778,7 +751,7 @@
}
sub _ods_process {
- my ($filename, $template, $user) = @_;
+ my ($filename, $template) = @_;
$ods = ooDocument(file => $filename, create => 'spreadsheet');
@@ -799,6 +772,33 @@
$ods->save;
}
+sub get_template {
+ my $name = shift;
+ return "${name}.odst";
+}
+
+sub preprocess {
+ my $rawvars = shift;
+ my $vars;
+ my $type = ref $rawvars;
+
+ #XXX fix escaping function
+ return $rawvars if $type =~ /^LedgerSMB::Locale/;
+ if ( $type eq 'ARRAY' ) {
+ for (@{$rawvars}) {
+ push @{$vars}, preprocess( $_ );
+ }
+ } elsif (!$type) {
+ return escapeHTML($rawvars);
+ } else { # Hashes and objects
+ for ( keys %{$rawvars} ) {
+ $vars->{preprocess($_)} = preprocess( $rawvars->{$_} );
+ }
+ }
+
+ return $vars;
+}
+
sub process {
my $parent = shift;
my $cleanvars = shift;
@@ -831,7 +831,7 @@
\$output, binmode => ':utf8')) {
throw Error::Simple $template->error();
}
- &_ods_process("$parent->{outputfile}.ods", $output, $parent->{myconfig});
+ &_ods_process("$parent->{outputfile}.ods", $output);
$parent->{mimetype} = 'application/vnd.oasis.opendocument.spreadsheet';
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.