summaryrefslogtreecommitdiffstats
path: root/lib/Spreadsheet/ParseXLSX.pm
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-06-04 13:39:31 -0500
committerJesse Luehrs <doy@tozt.net>2013-06-04 13:39:31 -0500
commit8a96d2920a573e7870f29c41ba0004baac6d72cf (patch)
tree51a81487949396698211c43213a9c9736110b1fa /lib/Spreadsheet/ParseXLSX.pm
parent8b8bc05347926db2b89a3fc8b782b41bbdf6f1aa (diff)
downloadspreadsheet-parsexlsx-8a96d2920a573e7870f29c41ba0004baac6d72cf.tar.gz
spreadsheet-parsexlsx-8a96d2920a573e7870f29c41ba0004baac6d72cf.zip
assume that no specified color just means black
is there somewhere else that specifies what the default font color should be?
Diffstat (limited to 'lib/Spreadsheet/ParseXLSX.pm')
-rw-r--r--lib/Spreadsheet/ParseXLSX.pm11
1 files 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,