Added new tests, fixed a bug, and cleaned up more code: Intermediate check-in
[p5sagit/Excel-Template.git] / lib / Excel / Template / Container / Worksheet.pm
index b91dc15..cade828 100644 (file)
@@ -22,6 +22,12 @@ sub render
         $context->active_worksheet->protect( $password );
     }
 
+    my $keep_zeros = $context->get( $self, 'KEEP_LEADING_ZEROS' );
+    if ( defined $keep_zeros )
+    {
+        $context->active_worksheet->keep_leading_zeros( $keep_zeros ? 1 : 0 );
+    }
+
     return $self->SUPER::render($context);
 }
 
@@ -59,7 +65,11 @@ value is set will be used as the password.
 
 This activates the HIDDEN and LOCKED nodes.
 
-=back 4
+=item * KEEP_LEADING_ZEROS
+
+This will change the behavior of the worksheet to preserve leading zeros.
+
+=back
 
 =head1 CHILDREN