summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-07-30 16:16:54 -0400
committerJesse Luehrs <doy@tozt.net>2013-07-30 16:16:54 -0400
commit722082d52bb34d7e32613b879d5a3e4900549dba (patch)
tree365c46642e09ebc4d4eec20c380570b3980a0183
parentf56eb8c3e991d34438e8dc38ea04d091750daa6f (diff)
downloadspreadsheet-parsexlsx-722082d52bb34d7e32613b879d5a3e4900549dba.tar.gz
spreadsheet-parsexlsx-722082d52bb34d7e32613b879d5a3e4900549dba.zip
sometimes the whole themes section doesn't exist (#3)
-rw-r--r--lib/Spreadsheet/ParseXLSX.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Spreadsheet/ParseXLSX.pm b/lib/Spreadsheet/ParseXLSX.pm
index 7b672fb..6d2f232 100644
--- a/lib/Spreadsheet/ParseXLSX.pm
+++ b/lib/Spreadsheet/ParseXLSX.pm
@@ -240,6 +240,8 @@ sub _parse_themes {
my $self = shift;
my ($themes) = @_;
+ return {} unless $themes;
+
my @color = map {
$_->name eq 'a:sysClr' ? $_->att('lastClr') : $_->att('val')
} $themes->find_nodes('//a:clrScheme/*/*');