r953 - in packages/libspreadsheet-writeexcel-perl/trunk: . charts debian doc examples lib/Spreadsheet lib/Spreadsheet/WriteExcel t

Gunnar Wolf gwolf@costa.debian.org
Sat, 23 Apr 2005 00:26:08 +0000


Author: gwolf
Date: 2005-04-23 00:26:04 +0000 (Sat, 23 Apr 2005)
New Revision: 953

Added:
   packages/libspreadsheet-writeexcel-perl/trunk/bin/
   packages/libspreadsheet-writeexcel-perl/trunk/examples/hide_sheet.pl
   packages/libspreadsheet-writeexcel-perl/trunk/t/01_merge_formats.t
   packages/libspreadsheet-writeexcel-perl/trunk/t/11_date_time.t
   packages/libspreadsheet-writeexcel-perl/trunk/t/12_date_only.t
   packages/libspreadsheet-writeexcel-perl/trunk/t/13_date_seconds.t
Removed:
   packages/libspreadsheet-writeexcel-perl/trunk/exe/
Modified:
   packages/libspreadsheet-writeexcel-perl/trunk/Changes
   packages/libspreadsheet-writeexcel-perl/trunk/MANIFEST
   packages/libspreadsheet-writeexcel-perl/trunk/META.yml
   packages/libspreadsheet-writeexcel-perl/trunk/Makefile.PL
   packages/libspreadsheet-writeexcel-perl/trunk/charts/README
   packages/libspreadsheet-writeexcel-perl/trunk/charts/chartex.pl
   packages/libspreadsheet-writeexcel-perl/trunk/debian/changelog
   packages/libspreadsheet-writeexcel-perl/trunk/doc/WriteExcel.html
   packages/libspreadsheet-writeexcel-perl/trunk/examples/README
   packages/libspreadsheet-writeexcel-perl/trunk/lib/Spreadsheet/WriteExcel.pm
   packages/libspreadsheet-writeexcel-perl/trunk/lib/Spreadsheet/WriteExcel/Chart.pm
   packages/libspreadsheet-writeexcel-perl/trunk/lib/Spreadsheet/WriteExcel/Format.pm
   packages/libspreadsheet-writeexcel-perl/trunk/lib/Spreadsheet/WriteExcel/Workbook.pm
   packages/libspreadsheet-writeexcel-perl/trunk/lib/Spreadsheet/WriteExcel/Worksheet.pm
Log:
New upstream version 2.13


Modified: packages/libspreadsheet-writeexcel-perl/trunk/Changes
===================================================================
--- packages/libspreadsheet-writeexcel-perl/trunk/Changes	2005-04-23 00:22:22 UTC (rev 952)
+++ packages/libspreadsheet-writeexcel-perl/trunk/Changes	2005-04-23 00:26:04 UTC (rev 953)
@@ -1,5 +1,17 @@
 Revision history for Perl module Spreadsheet::WriteExcel.
 
+2.13 April 20 2005 - Minor
+
+    ! Made it a fatal error to use a merged format in a non-
+      merged cell (and vice-versa). This is a temporary measure
+      to prevent people from shooting themselves in the foot
+      until the Format.pm code can be refactored.
+
+    + Add 01_merge_formats.t test for above.
+
+    + Added date_time tests.
+
+
 2.12 March 22 2005 - Minor
 
     + Added further Unicode support. The following methods now

Modified: packages/libspreadsheet-writeexcel-perl/trunk/MANIFEST
===================================================================
--- packages/libspreadsheet-writeexcel-perl/trunk/MANIFEST	2005-04-23 00:22:22 UTC (rev 952)
+++ packages/libspreadsheet-writeexcel-perl/trunk/MANIFEST	2005-04-23 00:26:04 UTC (rev 953)
@@ -20,6 +20,10 @@
 
 t/00_IEEE_double.t
 t/01_add_worksheet.t
+t/01_merge_formats.t
+t/11_date_time.t
+t/12_date_only.t
+t/13_date_seconds.t
 
 doc/index.html
 doc/WriteExcel.html
@@ -63,6 +67,7 @@
 examples/formats.pl
 examples/function_locale.pl
 examples/headers.pl
+examples/hide_sheet.pl
 examples/hyperlink1.pl
 examples/hyperlink2.pl
 examples/images.pl
@@ -131,4 +136,4 @@
 charts/Chart2.xls
 charts/Chart3.xls
 
-exe/chartex
+bin/chartex

Modified: packages/libspreadsheet-writeexcel-perl/trunk/META.yml
===================================================================
--- packages/libspreadsheet-writeexcel-perl/trunk/META.yml	2005-04-23 00:22:22 UTC (rev 952)
+++ packages/libspreadsheet-writeexcel-perl/trunk/META.yml	2005-04-23 00:26:04 UTC (rev 953)
@@ -1,10 +1,10 @@
-name:               Spreadsheet-WriteExcel
-version:            2.12
-version_from:       lib/Spreadsheet/WriteExcel.pm
-installdirs:        site
+name:         Spreadsheet-WriteExcel
+version:      2.13
+version_from: lib/Spreadsheet/WriteExcel.pm
+installdirs:  site
 requires:
     File::Temp:                    0
     Parse::RecDescent:             0
 
-distribution_type:  module
-generated_by:       hand
+distribution_type: module
+generated_by: hand

Modified: packages/libspreadsheet-writeexcel-perl/trunk/Makefile.PL
===================================================================
--- packages/libspreadsheet-writeexcel-perl/trunk/Makefile.PL	2005-04-23 00:22:22 UTC (rev 952)
+++ packages/libspreadsheet-writeexcel-perl/trunk/Makefile.PL	2005-04-23 00:26:04 UTC (rev 953)
@@ -13,5 +13,5 @@
     'NEEDS_LINKING' => 0,
     'PREREQ_PM'     => {Parse::RecDescent => 0, File::Temp => 0},
     'dist'          => {COMPRESS => 'gzip -best', SUFFIX => 'gz'},
-    'EXE_FILES'     => ['exe/chartex'],
+    'EXE_FILES'     => ['bin/chartex'],
 );

Copied: packages/libspreadsheet-writeexcel-perl/trunk/bin (from rev 952, packages/libspreadsheet-writeexcel-perl/branches/upstream/current/bin)

Modified: packages/libspreadsheet-writeexcel-perl/trunk/charts/README
===================================================================
--- packages/libspreadsheet-writeexcel-perl/trunk/charts/README	2005-04-23 00:22:22 UTC (rev 952)
+++ packages/libspreadsheet-writeexcel-perl/trunk/charts/README	2005-04-23 00:26:04 UTC (rev 953)
@@ -18,8 +18,8 @@
     Chart3.xls      A template for use with demo3.pl.
 
     * If you performed a normal installation then the chartex utility
-      should be installed to your C<perl/bin> directory and should be
-      available from the command line.
+      should be installed to your 'somepath/perl/bin' directory and
+      should be available from the command line.
 
 
 You can run the examples as follows:

Modified: packages/libspreadsheet-writeexcel-perl/trunk/charts/chartex.pl
===================================================================
--- packages/libspreadsheet-writeexcel-perl/trunk/charts/chartex.pl	2005-04-23 00:22:22 UTC (rev 952)
+++ packages/libspreadsheet-writeexcel-perl/trunk/charts/chartex.pl	2005-04-23 00:26:04 UTC (rev 953)
@@ -148,7 +148,7 @@
 
     $range = "'$range'" if $range =~ /[^\w:]/;
 
-    print "    \$worksheet->store_formula(\"=$range!A1\");\n";
+    print "    \$worksheet->store_formula('=$range!A1');\n";
 }
 
 

Modified: packages/libspreadsheet-writeexcel-perl/trunk/debian/changelog
===================================================================
--- packages/libspreadsheet-writeexcel-perl/trunk/debian/changelog	2005-04-23 00:22:22 UTC (rev 952)
+++ packages/libspreadsheet-writeexcel-perl/trunk/debian/changelog	2005-04-23 00:26:04 UTC (rev 953)
@@ -1,3 +1,9 @@
+libspreadsheet-writeexcel-perl (2.13-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Gunnar Wolf <gwolf@debian.org>  Fri, 22 Apr 2005 19:22:33 -0500
+
 libspreadsheet-writeexcel-perl (2.12-1) unstable; urgency=medium
 
   * New upstream release, improving UTF8 handling (Closes: #297571)

Modified: packages/libspreadsheet-writeexcel-perl/trunk/doc/WriteExcel.html
===================================================================
--- packages/libspreadsheet-writeexcel-perl/trunk/doc/WriteExcel.html	2005-04-23 00:22:22 UTC (rev 952)
+++ packages/libspreadsheet-writeexcel-perl/trunk/doc/WriteExcel.html	2005-04-23 00:26:04 UTC (rev 953)
@@ -215,8 +215,8 @@
 <HR>
 <H1><A NAME="VERSION">VERSION</A></H1>
 <P>
-This document refers to version 2.12 of Spreadsheet::WriteExcel, released
-March 22, 2005.
+This document refers to version 2.13 of Spreadsheet::WriteExcel, released
+April 20, 2005.
 
 </P>
 <P>
@@ -1118,7 +1118,7 @@
 </PRE>
 </P>
 <P>
-The &quot;looks like&quot; rule is defined by regular expressions:
+The "looks like" rule is defined by regular expressions:
 
 </P>
 <P>
@@ -3153,7 +3153,9 @@
 </P>
 <P>
 <STRONG>WARNING</STRONG>. The format object that is used with a <CODE>merge_range()</CODE> method call is marked internally as being associated with a merged range.
-As such, <STRONG>it should not be used for other formatting</STRONG>. This will be fixed in a later version. See the <A HREF="#BUGS">BUGS</A> section.
+It is a fatal error to use a merged format in a non-merged cell. Instead
+you should use separate formats for merged and non-merged cells. This
+restriction will be removed in a future release.
 
 </P>
 <P>
@@ -6290,6 +6292,7 @@
     outline.pl              An example of outlines and grouping.
     panes.pl                An examples of how to create panes.
     protection.pl           Example of cell locking and formula hiding.
+    hide_sheet.pl           Simple example of hiding a worksheet.
     repeat.pl               Example of writing repeated formulas.
     sales.pl                An example of a simple sales spreadsheet.
     sendmail.pl             Send an Excel email attachment using Mail::Sender.
@@ -6854,10 +6857,10 @@
 
 </P>
 <P>
-The format object that is used with a <CODE>merge_range()</CODE> method call is marked internally as being associated with a merged range.If
-you use this format in a non-merged cell it will cause Excel to crash. The
-current workaround is to use separate formats for merged and non-merged
-cell. This will be fixed in a future release.
+The format object that is used with a <CODE>merge_range()</CODE> method call is marked internally as being associated with a merged range.It
+is a fatal error to use a merged format in a non-merged cell. The current
+workaround is to use separate formats for merged and non-merged cell. This
+restriction will be removed in a future release.
 
 </P>
 <P>
@@ -6910,7 +6913,7 @@
 <UL>
 <LI><A NAME="item_Macros">Macros.</A>
 <P>
-This would solve the previous problem neatly. However, the format of Excel
+This would solve some other problems neatly. However, the format of Excel
 macros isn't documented.
 
 </P>
@@ -6958,12 +6961,6 @@
   </td></tr>
 </table>
 
-
-
-
-
-
-</P>
 <P>
 Alternatively you can keep up to date with future releases by subscribing
 at: <A
@@ -7047,14 +7044,14 @@
 <P>
 Alexander Farber, Andre de Bruin, Arthur@ais, Artur Silveira da Cunha,
 Borgar Olsen, Brian White, Bob Mackay, Cedric Bouvier, Chad Johnson, CPAN
-testers, Daniel Berger, Daniel Gardner, Dmitry Kochurov, Eric Frazier,
-Ernesto Baschny, Felipe Pérez Galiana, Gordon Simpson, Hanc Pavel, Harold
-Bamford, James Holmes, James Wilkinson, Johan Ekenberg, Johann Hanne,
-Jonathan Scott Duff, J.C. Wren, Kenneth Stacey, Keith Miller, Kyle Krom,
-Marc Rosenthal, Markus Schmitz, Michael Braig, Michael Buschauer, Mike
-Blazer, Michael Erickson, Michael W J West, Ning Xie, Paul J. Falbe, Paul
-Medynski, Peter Dintelmann, Pierre Laplante, Praveen Kotha, Reto
-Badertscher, Rich Sorden, Shane Ashby, Shenyu Zheng, Stephan Loescher,
+testers, Damyan Ivanov, Daniel Berger, Daniel Gardner, Dmitry Kochurov,
+Eric Frazier, Ernesto Baschny, Felipe Pérez Galiana, Gordon Simpson, Hanc
+Pavel, Harold Bamford, James Holmes, James Wilkinson, Johan Ekenberg,
+Johann Hanne, Jonathan Scott Duff, J.C. Wren, Kenneth Stacey, Keith Miller,
+Kyle Krom, Marc Rosenthal, Markus Schmitz, Michael Braig, Michael
+Buschauer, Mike Blazer, Michael Erickson, Michael W J West, Ning Xie, Paul
+J. Falbe, Paul Medynski, Peter Dintelmann, Pierre Laplante, Praveen Kotha,
+Reto Badertscher, Rich Sorden, Shane Ashby, Shenyu Zheng, Stephan Loescher,
 Steve Sapovits, Sven Passig, Svetoslav Marinov, Tamas Gulacsi, Troy
 Daniels, Vahe Sarkissian.
 
@@ -7081,7 +7078,7 @@
 
 </P>
 <P>
-Dirk Eddelbuettel maintains the Debian distro.
+Gunnar Wolf maintains the Debian distro.
 
 </P>
 <P>
@@ -7105,20 +7102,34 @@
 </P>
 <P>
 <PRE>
-    Slow dulcimer, gavotte and bow, in autumn,
-    Basho and his friends go out to view the moon;
-    In summer, gasoline rainbow in the gutter,
+    Imagine a court of one: the queen a young mother,
+    Unhappy, alone all day with her firstborn child
+    And her new baby in a squalid apartment
 </PRE>
 </P>
 <P>
 <PRE>
-    The secret courtesy that courses like ichor
-    Through the old form of the rude, full-scale joke,
-    Impossible to tell in writing.
+    Of too few rooms, a different race from her neighbors.
+    She tells the child she's going to kill herself.
+    She broods, she rages. Hoping to distract her,
 </PRE>
 </P>
 <P>
 <PRE>
+    The child cuts capers, he sings, he does imitations
+    Of different people in the building, he jokes,
+    He feels if he keeps her alive until the father
+</PRE>
+</P>
+<P>
+<PRE>
+    Gets home from work, they'll be okay till morning.
+    It's laughter versus the bedroom and the pills.
+    What is he in his efforts but a courtier?
+</PRE>
+</P>
+<P>
+<PRE>
         -- Robert Pinsky
 </PRE>
 </P>

Modified: packages/libspreadsheet-writeexcel-perl/trunk/examples/README
===================================================================
--- packages/libspreadsheet-writeexcel-perl/trunk/examples/README	2005-04-23 00:22:22 UTC (rev 952)
+++ packages/libspreadsheet-writeexcel-perl/trunk/examples/README	2005-04-23 00:26:04 UTC (rev 953)
@@ -37,6 +37,7 @@
 outline.pl              An example of outlines and grouping.
 panes.pl                An examples of how to create panes.
 protection.pl           Example of cell locking and formula hiding.
+hide_sheet.pl           Simple example of hiding a worksheet.
 repeat.pl               Example of writing repeated formulas.
 sales.pl                An example of a simple sales spreadsheet.
 sendmail.pl             Send an Excel email attachment using Mail::Sender.

Copied: packages/libspreadsheet-writeexcel-perl/trunk/examples/hide_sheet.pl (from rev 952, packages/libspreadsheet-writeexcel-perl/branches/upstream/current/examples/hide_sheet.pl)

Modified: packages/libspreadsheet-writeexcel-perl/trunk/lib/Spreadsheet/WriteExcel/Chart.pm
===================================================================
--- packages/libspreadsheet-writeexcel-perl/trunk/lib/Spreadsheet/WriteExcel/Chart.pm	2005-04-23 00:22:22 UTC (rev 952)
+++ packages/libspreadsheet-writeexcel-perl/trunk/lib/Spreadsheet/WriteExcel/Chart.pm	2005-04-23 00:26:04 UTC (rev 953)
@@ -2,7 +2,7 @@
 
 ###############################################################################
 #
-# Worksheet - A writer class for Excel Charts.
+# Chart - A writer class for Excel Charts.
 #
 #
 # Used in conjunction with Spreadsheet::WriteExcel
@@ -24,7 +24,7 @@
 use vars qw($VERSION @ISA);
 @ISA = qw(Spreadsheet::WriteExcel::BIFFwriter);
 
-$VERSION = '2.10';
+$VERSION = '2.13';
 
 ###############################################################################
 #
@@ -64,6 +64,7 @@
     $self->{_active_pane}       = 3;
     $self->{_frozen}            = 0;
     $self->{_selected}          = 0;
+    $self->{_hidden}            = 0;
 
     $self->{_paper_size}        = 0x0;
     $self->{_orientation}       = 0x1;
@@ -201,7 +202,8 @@
 
     my $self = shift;
 
-    $self->{_selected} = 1;
+    $self->{_hidden}         = 0; # Selected worksheet can't be hidden.
+    $self->{_selected}       = 1;
 }
 
 
@@ -216,13 +218,33 @@
 
     my $self = shift;
 
-    $self->{_selected} = 1;
+    $self->{_hidden}         = 0; # Active worksheet can't be hidden.
+    $self->{_selected}       = 1;
     ${$self->{_activesheet}} = $self->{_index};
 }
 
 
 ###############################################################################
 #
+# hide()
+#
+# Hide this worksheet.
+#
+sub hide {
+
+    my $self = shift;
+
+    $self->{_hidden}         = 1;
+
+    # A hidden worksheet shouldn't be active or selected.
+    $self->{_selected}       = 0;
+    ${$self->{_activesheet}} = 0;
+    ${$self->{_firstsheet}}  = 0;
+}
+
+
+###############################################################################
+#
 # set_first_sheet()
 #
 # Set this worksheet as the first visible sheet. This is necessary
@@ -233,7 +255,8 @@
 
     my $self = shift;
 
-    ${$self->{_firstsheet}} = $self->{_index};
+    $self->{_hidden}         = 0; # Active worksheet can't be hidden.
+    ${$self->{_firstsheet}}  = $self->{_index};
 }
 
 
@@ -247,7 +270,7 @@
 
 =head1 NAME
 
-Worksheet - A writer class for Excel Charts.
+Chart - A writer class for Excel Charts.
 
 =head1 SYNOPSIS
 

Modified: packages/libspreadsheet-writeexcel-perl/trunk/lib/Spreadsheet/WriteExcel/Format.pm
===================================================================
--- packages/libspreadsheet-writeexcel-perl/trunk/lib/Spreadsheet/WriteExcel/Format.pm	2005-04-23 00:22:22 UTC (rev 952)
+++ packages/libspreadsheet-writeexcel-perl/trunk/lib/Spreadsheet/WriteExcel/Format.pm	2005-04-23 00:26:04 UTC (rev 953)
@@ -90,6 +90,9 @@
                     _diag_color     => 0x40,
                     _diag_border    => 0,
 
+                    # Temp code to prevent merged formats in non-merged cells.
+                    _used_merge     => 0,
+
                  };
 
     bless  $self, $class;

Modified: packages/libspreadsheet-writeexcel-perl/trunk/lib/Spreadsheet/WriteExcel/Workbook.pm
===================================================================
--- packages/libspreadsheet-writeexcel-perl/trunk/lib/Spreadsheet/WriteExcel/Workbook.pm	2005-04-23 00:22:22 UTC (rev 952)
+++ packages/libspreadsheet-writeexcel-perl/trunk/lib/Spreadsheet/WriteExcel/Workbook.pm	2005-04-23 00:26:04 UTC (rev 953)
@@ -24,7 +24,7 @@
 use vars qw($VERSION @ISA);
 @ISA = qw(Spreadsheet::WriteExcel::BIFFwriter Exporter);
 
-$VERSION = '2.10';
+$VERSION = '2.13';
 
 ###############################################################################
 #
@@ -769,6 +769,7 @@
     # Ensure that at least one worksheet has been selected.
     if ($self->{_activesheet} == 0) {
         @{$self->{_worksheets}}[0]->{_selected} = 1;
+        @{$self->{_worksheets}}[0]->{_hidden}   = 0;
     }
 
     # Calculate the number of selected worksheet tabs and call the finalization
@@ -797,6 +798,7 @@
         $self->_store_boundsheet($sheet->{_name},
                                  $sheet->{_offset},
                                  $sheet->{_type},
+                                 $sheet->{_hidden},
                                  $sheet->{_encoding});
     }
 
@@ -1192,10 +1194,13 @@
 
     my $sheetname = $_[0];                # Worksheet name
     my $offset    = $_[1];                # Location of worksheet BOF
-    my $grbit     = $_[2];                # Sheet identifier
-    my $encoding  = $_[3];                # Sheet name encoding
+    my $type      = $_[2];                # Worksheet type
+    my $hidden    = $_[3];                # Worksheet hidden flag
+    my $encoding  = $_[4];                # Sheet name encoding
     my $cch       = length($sheetname);   # Length of sheet name
 
+    my $grbit     = $type | $hidden;
+
     # Character length is num of chars not num of bytes
     $cch /= 2 if $encoding;
 

Modified: packages/libspreadsheet-writeexcel-perl/trunk/lib/Spreadsheet/WriteExcel/Worksheet.pm
===================================================================
--- packages/libspreadsheet-writeexcel-perl/trunk/lib/Spreadsheet/WriteExcel/Worksheet.pm	2005-04-23 00:22:22 UTC (rev 952)
+++ packages/libspreadsheet-writeexcel-perl/trunk/lib/Spreadsheet/WriteExcel/Worksheet.pm	2005-04-23 00:26:04 UTC (rev 953)
@@ -24,7 +24,7 @@
 use vars qw($VERSION @ISA);
 @ISA = qw(Spreadsheet::WriteExcel::BIFFwriter);
 
-$VERSION = '2.11';
+$VERSION = '2.13';
 
 ###############################################################################
 #
@@ -74,6 +74,7 @@
     $self->{_active_pane}       = 3;
     $self->{_frozen}            = 0;
     $self->{_selected}          = 0;
+    $self->{_hidden}            = 0;
 
     $self->{_paper_size}        = 0x0;
     $self->{_orientation}       = 0x1;
@@ -376,7 +377,8 @@
 
     my $self = shift;
 
-    $self->{_selected} = 1;
+    $self->{_hidden}         = 0; # Selected worksheet can't be hidden.
+    $self->{_selected}       = 1;
 }
 
 
@@ -391,13 +393,33 @@
 
     my $self = shift;
 
-    $self->{_selected} = 1;
+    $self->{_hidden}         = 0; # Active worksheet can't be hidden.
+    $self->{_selected}       = 1;
     ${$self->{_activesheet}} = $self->{_index};
 }
 
 
 ###############################################################################
 #
+# hide()
+#
+# Hide this worksheet.
+#
+sub hide {
+
+    my $self = shift;
+
+    $self->{_hidden}         = 1;
+
+    # A hidden worksheet shouldn't be active or selected.
+    $self->{_selected}       = 0;
+    ${$self->{_activesheet}} = 0;
+    ${$self->{_firstsheet}}  = 0;
+}
+
+
+###############################################################################
+#
 # set_first_sheet()
 #
 # Set this worksheet as the first visible sheet. This is necessary
@@ -408,7 +430,8 @@
 
     my $self = shift;
 
-    ${$self->{_firstsheet}} = $self->{_index};
+    $self->{_hidden}         = 0; # Active worksheet can't be hidden.
+    ${$self->{_firstsheet}}  = $self->{_index};
 }
 
 
@@ -1238,13 +1261,28 @@
     my $col    = $_[2];
     my $format = $_[3];
 
+    my $error = "Error: refer to merge_range() in the documentation. " .
+                 "Can't use previously merged format in non-merged cell";
+
     if (ref($format)) {
+        # Temp code to prevent merged formats in non-merged cells.
+        croak $error if $format->{_used_merge} == 1;
+        $format->{_used_merge} = -1;
+
         return $format->get_xf_index();
     }
     elsif (exists $self->{_row_formats}->{$row}) {
+        # Temp code to prevent merged formats in non-merged cells.
+        croak $error if $self->{_row_formats}->{$row}->{_used_merge} == 1;
+        $self->{_row_formats}->{$row}->{_used_merge} = -1;
+
         return $self->{_row_formats}->{$row}->get_xf_index();
     }
     elsif (exists $self->{_col_formats}->{$col}) {
+        # Temp code to prevent merged formats in non-merged cells.
+        croak $error if $self->{_col_formats}->{$col}->{_used_merge} == 1;
+        $self->{_col_formats}->{$col}->{_used_merge} = -1;
+
         return $self->{_col_formats}->{$col}->get_xf_index();
     }
     else {
@@ -3322,6 +3360,14 @@
     my $format   = $_[5];
 
 
+    # Temp code to prevent merged formats in non-merged cells.
+    my $error = "Error: refer to merge_range() in the documentation. " .
+                "Can't use previously non-merged format in merged cells";
+
+    croak $error if $format->{_used_merge} == -1;
+    $format->{_used_merge} = 0; # Until the end of this function.
+
+
     # Set the merge_range property of the format object. For BIFF8+.
     $format->set_merge_range();
 
@@ -3345,6 +3391,10 @@
     }
 
     $self->merge_cells($rwFirst, $colFirst, $rwLast, $colLast);
+
+    # Temp code to prevent merged formats in non-merged cells.
+    $format->{_used_merge} = 1;
+
 }
 
 

Modified: packages/libspreadsheet-writeexcel-perl/trunk/lib/Spreadsheet/WriteExcel.pm
===================================================================
--- packages/libspreadsheet-writeexcel-perl/trunk/lib/Spreadsheet/WriteExcel.pm	2005-04-23 00:22:22 UTC (rev 952)
+++ packages/libspreadsheet-writeexcel-perl/trunk/lib/Spreadsheet/WriteExcel.pm	2005-04-23 00:26:04 UTC (rev 953)
@@ -21,7 +21,7 @@
 use vars qw($VERSION @ISA);
 @ISA = qw(Spreadsheet::WriteExcel::Workbook Exporter);
 
-$VERSION = '2.12'; # Months mind
+$VERSION = '2.13'; # Impossible to Tell
 
 
 
@@ -63,7 +63,7 @@
 
 =head1 VERSION
 
-This document refers to version 2.12 of Spreadsheet::WriteExcel, released March 22, 2005.
+This document refers to version 2.13 of Spreadsheet::WriteExcel, released April 20, 2005.
 
 
 
@@ -1669,7 +1669,7 @@
 
     $worksheet->merge_range('B3:D4', 'Vertical and horizontal', $format);
 
-B<WARNING>. The format object that is used with a C<merge_range()> method call is marked internally as being associated with a merged range. As such, B<it should not be used for other formatting>. This will be fixed in a later version. See the L<BUGS> section.
+B<WARNING>. The format object that is used with a C<merge_range()> method call is marked internally as being associated with a merged range. It is a fatal error to use a merged format in a non-merged cell. Instead you should use separate formats for merged and non-merged cells. This restriction will be removed in a future release.
 
 C<merge_range()> writes its $token argument using the worksheet C<write()> method. Therefore it will handle numbers, strings, formulas or urls as required.
 
@@ -3627,6 +3627,7 @@
     outline.pl              An example of outlines and grouping.
     panes.pl                An examples of how to create panes.
     protection.pl           Example of cell locking and formula hiding.
+    hide_sheet.pl           Simple example of hiding a worksheet.
     repeat.pl               Example of writing repeated formulas.
     sales.pl                An example of a simple sales spreadsheet.
     sendmail.pl             Send an Excel email attachment using Mail::Sender.
@@ -3956,7 +3957,7 @@
 
 XML and UTF8 data on Perl 5.6 can cause Excel files created by Spreadsheet::WriteExcel to become corrupt. See L<Warning about XML::Parser and Perl 5.6> for further details.
 
-The format object that is used with a C<merge_range()> method call is marked internally as being associated with a merged range.If you use this format in a non-merged cell it will cause Excel to crash. The current workaround is to use separate formats for merged and non-merged cell. This will be fixed in a future release.
+The format object that is used with a C<merge_range()> method call is marked internally as being associated with a merged range.It is a fatal error to use a merged format in a non-merged cell. The current workaround is to use separate formats for merged and non-merged cell. This restriction will be removed in a future release.
 
 Nested formulas sometimes aren't parsed correctly and give a result of "#VALUE". If you come across a formula that parses like this, let me know.
 
@@ -3992,7 +3993,7 @@
 
 =item * Macros.
 
-This would solve the previous problem neatly. However, the format of Excel macros isn't documented.
+This would solve some other problems neatly. However, the format of Excel macros isn't documented.
 
 =item * Some feature that you really need. ;-)
 
@@ -4008,12 +4009,41 @@
 
 There is a Google group for discussing and asking questions about Spreadsheet::WriteExcel:  http://groups-beta.google.com/group/spreadsheet-writeexcel/
 
+=begin html
+
+<table style="border:1px solid #aa0033; font-size:small" align=center>
+  <tr>
+    <td rowspan=3>
+     <img src="http://groups-beta.google.com/groups/img/groups_medium.gif" height=58 width=150 alt="Google Groups">
+    </td>
+    <td colspan=2 align=center><b>Subscribe to Spreadsheet::WriteExcel</b></td>
+  </tr>
+  <form action="http://groups-beta.google.com/group/spreadsheet-writeexcel/boxsubscribe">
+  <tr>
+    <td>Email: <input type=text name=email></td>
+    <td>
+      <table
+       style="background-color:#ffcc33;padding:2px;border:2px outset #ffcc33;">
+      <tr>
+        <td>
+         <input type=submit name="sub" value="Subscribe">
+        </td>
+      </tr>
+      </table>
+    </td>
+  </tr>
+   </form>
+  <tr><td colspan=2 align=center>
+   <a href="http://groups-beta.google.com/group/spreadsheet-writeexcel">Browse Archives</a> at <a href="http://groups-beta.google.com/">groups-beta.google.com</a>
+  </td></tr>
+</table>
+
+=end html
+
 Alternatively you can keep up to date with future releases by subscribing at:
 http://freshmeat.net/projects/writeexcel/
 
 
-
-
 =head1 SEE ALSO
 
 Spreadsheet::ParseExcel: http://search.cpan.org/dist/Spreadsheet-ParseExcel
@@ -4043,7 +4073,7 @@
 
 The following people contributed to the debugging and testing of Spreadsheet::WriteExcel:
 
-Alexander Farber, Andre de Bruin, Arthur@ais, Artur Silveira da Cunha, Borgar Olsen, Brian White, Bob Mackay, Cedric Bouvier, Chad Johnson, CPAN testers, Daniel Berger, Daniel Gardner, Dmitry Kochurov, Eric Frazier, Ernesto Baschny, Felipe Pérez Galiana, Gordon Simpson, Hanc Pavel, Harold Bamford, James Holmes, James Wilkinson, Johan Ekenberg, Johann Hanne, Jonathan Scott Duff, J.C. Wren, Kenneth Stacey, Keith Miller, Kyle Krom, Marc Rosenthal, Markus Schmitz, Michael Braig, Michael Buschauer, Mike Blazer, Michael Erickson, Michael W J West, Ning Xie, Paul J. Falbe, Paul Medynski, Peter Dintelmann, Pierre Laplante, Praveen Kotha, Reto Badertscher, Rich Sorden, Shane Ashby, Shenyu Zheng, Stephan Loescher, Steve Sapovits, Sven Passig, Svetoslav Marinov, Tamas Gulacsi, Troy Daniels, Vahe Sarkissian.
+Alexander Farber, Andre de Bruin, Arthur@ais, Artur Silveira da Cunha, Borgar Olsen, Brian White, Bob Mackay, Cedric Bouvier, Chad Johnson, CPAN testers, Damyan Ivanov, Daniel Berger, Daniel Gardner, Dmitry Kochurov, Eric Frazier, Ernesto Baschny, Felipe Pérez Galiana, Gordon Simpson, Hanc Pavel, Harold Bamford, James Holmes, James Wilkinson, Johan Ekenberg, Johann Hanne, Jonathan Scott Duff, J.C. Wren, Kenneth Stacey, Keith Miller, Kyle Krom, Marc Rosenthal, Markus Schmitz, Michael Braig, Michael Buschauer, Mike Blazer, Michael Erickson, Michael W J West, Ning Xie, Paul J. Falbe, Paul Medynski, Peter Dintelmann, Pierre Laplante, Praveen Kotha, Reto Badertscher, Rich Sorden, Shane Ashby, Shenyu Zheng, Stephan Loescher, Steve Sapovits, Sven Passig, Svetoslav Marinov, Tamas Gulacsi, Troy Daniels, Vahe Sarkissian.
 
 The following people contributed patches, examples or Excel information:
 
@@ -4053,7 +4083,7 @@
 
 Additional thanks to Takanori Kawai for translating the documentation into Japanese.
 
-Dirk Eddelbuettel maintains the Debian distro.
+Gunnar Wolf maintains the Debian distro.
 
 Thanks to Damian Conway for the excellent Parse::RecDescent.
 
@@ -4068,14 +4098,22 @@
 
 John McNamara jmcnamara@cpan.org
 
-    Slow dulcimer, gavotte and bow, in autumn,
-    Basho and his friends go out to view the moon;
-    In summer, gasoline rainbow in the gutter,
+    Imagine a court of one: the queen a young mother,
+    Unhappy, alone all day with her firstborn child
+    And her new baby in a squalid apartment
 
-    The secret courtesy that courses like ichor
-    Through the old form of the rude, full-scale joke,
-    Impossible to tell in writing.
+    Of too few rooms, a different race from her neighbors.
+    She tells the child she's going to kill herself.
+    She broods, she rages. Hoping to distract her,
 
+    The child cuts capers, he sings, he does imitations
+    Of different people in the building, he jokes,
+    He feels if he keeps her alive until the father
+
+    Gets home from work, they'll be okay till morning.
+    It's laughter versus the bedroom and the pills.
+    What is he in his efforts but a courtier?
+
         -- Robert Pinsky
 
 

Copied: packages/libspreadsheet-writeexcel-perl/trunk/t/01_merge_formats.t (from rev 952, packages/libspreadsheet-writeexcel-perl/branches/upstream/current/t/01_merge_formats.t)

Copied: packages/libspreadsheet-writeexcel-perl/trunk/t/11_date_time.t (from rev 952, packages/libspreadsheet-writeexcel-perl/branches/upstream/current/t/11_date_time.t)

Copied: packages/libspreadsheet-writeexcel-perl/trunk/t/12_date_only.t (from rev 952, packages/libspreadsheet-writeexcel-perl/branches/upstream/current/t/12_date_only.t)

Copied: packages/libspreadsheet-writeexcel-perl/trunk/t/13_date_seconds.t (from rev 952, packages/libspreadsheet-writeexcel-perl/branches/upstream/current/t/13_date_seconds.t)