From: Jens Gassmann Date: Thu, 6 Dec 2007 21:40:46 +0000 (+0000) Subject: Merge current-dev 0.30 back to trunk X-Git-Tag: v0.30~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1e753f77fe556d3568e999f9f1e4db533d34ef7f;p=p5sagit%2FExcel-Template.git Merge current-dev 0.30 back to trunk --- diff --git a/Changes b/Changes index e903664..8eec0d7 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ Revision history for Perl distribution Excel::Template +0.30 Sa Dec 01 00:00:00 2007 + - Add write_date_time to write a datetime-value into a cell + 0.29 Mon Oct 08 12:00:00 2007 - Added merge_range as written by Stevan Little diff --git a/Todo b/Todo index f076482..edbb4f0 100644 --- a/Todo +++ b/Todo @@ -12,9 +12,7 @@ Missing S::WE features: set_codepage Worksheet write_unicode/write_unicode_le - write_url write_url_range - write_date_time write_comment activate/select/set_first_sheet set_selection diff --git a/lib/Excel/Template.pm b/lib/Excel/Template.pm index 83f2e38..a2f1403 100644 --- a/lib/Excel/Template.pm +++ b/lib/Excel/Template.pm @@ -6,7 +6,7 @@ BEGIN { use Excel::Template::Base; use vars qw ($VERSION @ISA); - $VERSION = '0.29'; + $VERSION = '0.30'; @ISA = qw( Excel::Template::Base ); } diff --git a/lib/Excel/Template/Element/Cell.pm b/lib/Excel/Template/Element/Cell.pm index 9444fc3..a9a610b 100755 --- a/lib/Excel/Template/Element/Cell.pm +++ b/lib/Excel/Template/Element/Cell.pm @@ -40,11 +40,12 @@ sub _get_text } my %legal_types = ( - 'blank' => 'write_blank', - 'formula' => 'write_formula', - 'number' => 'write_number', - 'string' => 'write_string', - 'url' => 'write_url', + 'blank' => 'write_blank', + 'formula' => 'write_formula', + 'number' => 'write_number', + 'string' => 'write_string', + 'url' => 'write_url', + 'date_time' => 'write_date_time', ); sub render @@ -166,9 +167,11 @@ The legal types (taken from L) are: =item * url +=item * date_time + =back -q.v. L for more info. +other write_* methods as defined defined L would be integrated by request =back diff --git a/lib/Excel/Template/Format.pm b/lib/Excel/Template/Format.pm index 16bfccf..b4cb56c 100644 --- a/lib/Excel/Template/Format.pm +++ b/lib/Excel/Template/Format.pm @@ -38,12 +38,12 @@ sub _retrieve_key { $_[0]{ $_[1] } } ); my @_integer_formats = qw( - size num_format underline rotation indent pattern border + size underline rotation indent pattern border bottom top left right ); my @_string_formats = qw( - font color align valign bg_color fg_color border_color + num_format font color align valign bg_color fg_color border_color bottom_color top_color left_color right_color ); diff --git a/t/015.xml b/t/015.xml index 8934a6e..06530cc 100644 --- a/t/015.xml +++ b/t/015.xml @@ -5,5 +5,6 @@ Blank URL Formula - + DateTime + diff --git a/t/015_cell_type.t b/t/015_cell_type.t index 2c48544..e202782 100644 --- a/t/015_cell_type.t +++ b/t/015_cell_type.t @@ -27,5 +27,6 @@ Spreadsheet::WriteExcel::Worksheet::write_number( '0', '1', 'Number', '1' ) Spreadsheet::WriteExcel::Worksheet::write_blank( '0', '2', 'Blank', '1' ) Spreadsheet::WriteExcel::Worksheet::write_url( '0', '3', 'URL', '1' ) Spreadsheet::WriteExcel::Worksheet::write_formula( '0', '4', 'Formula', '1' ) +Spreadsheet::WriteExcel::Worksheet::write_date_time( '0', '5', 'DateTime', '1' ) Spreadsheet::WriteExcel::close( '' ) __END_EXPECTED__ diff --git a/t/Spreadsheet/WriteExcel/Worksheet.pm b/t/Spreadsheet/WriteExcel/Worksheet.pm index ee5ecf6..783c8c9 100644 --- a/t/Spreadsheet/WriteExcel/Worksheet.pm +++ b/t/Spreadsheet/WriteExcel/Worksheet.pm @@ -17,7 +17,7 @@ sub new { } my @funcs = qw( - write_string write_number write_blank write_url write_formula write + write_string write_number write_blank write_url write_formula write_date_time write set_row set_column keep_leading_zeros insert_bitmap freeze_panes set_landscape set_portrait merge_range );