From 8a96d2920a573e7870f29c41ba0004baac6d72cf Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Tue, 4 Jun 2013 13:39:31 -0500 Subject: assume that no specified color just means black is there somewhere else that specifies what the default font color should be? --- lib/Spreadsheet/ParseXLSX.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/Spreadsheet/ParseXLSX.pm b/lib/Spreadsheet/ParseXLSX.pm index c140811..0be9efd 100644 --- a/lib/Spreadsheet/ParseXLSX.pm +++ b/lib/Spreadsheet/ParseXLSX.pm @@ -306,9 +306,14 @@ sub _parse_styles { # Attr => $iAttr, # XXX not sure if there's a better way to keep the indexing stuff # intact rather than just going straight to #xxxxxx - Color => $self->_color( - $workbook->{Color}, - $_->first_child('color') + # XXX also not sure what it means for the color tag to be missing, + # just assuming black for now + Color => ($_->first_child('color') + ? $self->_color( + $workbook->{Color}, + $_->first_child('color') + ) + : '#000000' ), # Super => $iSuper, # UnderlineStyle => $iUnderline, -- cgit v1.2.3-54-g00ecf