summaryrefslogtreecommitdiffstats
path: root/lib/Spreadsheet/ParseXLSX.pm
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-01-29 15:56:58 -0500
committerJesse Luehrs <doy@tozt.net>2014-01-29 15:56:58 -0500
commit9b1330ff59fd6b7faefa1fcc798b898359e7b9e9 (patch)
treec57f33e139875d93aa368b405ae3e0252ed56c5d /lib/Spreadsheet/ParseXLSX.pm
parent3e1b783c60afe860f38b7947888a0bb443694691 (diff)
downloadspreadsheet-parsexlsx-9b1330ff59fd6b7faefa1fcc798b898359e7b9e9.tar.gz
spreadsheet-parsexlsx-9b1330ff59fd6b7faefa1fcc798b898359e7b9e9.zip
return undef to mean 'the default color' (#15)
Diffstat (limited to 'lib/Spreadsheet/ParseXLSX.pm')
-rw-r--r--lib/Spreadsheet/ParseXLSX.pm8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Spreadsheet/ParseXLSX.pm b/lib/Spreadsheet/ParseXLSX.pm
index 72d8a58..9a41518 100644
--- a/lib/Spreadsheet/ParseXLSX.pm
+++ b/lib/Spreadsheet/ParseXLSX.pm
@@ -673,11 +673,9 @@ sub _color {
my $self = shift;
my ($colors, $color_node) = @_;
- my $color; # XXX
- if ($color_node) {
- $color = '#000000' # XXX
- if $color_node->att('auto');
- $color = '#' . Spreadsheet::ParseExcel->ColorIdxToRGB( # XXX
+ my $color;
+ if ($color_node && !$color_node->att('auto')) {
+ $color = '#' . Spreadsheet::ParseExcel->ColorIdxToRGB(
$color_node->att('indexed')
) if defined $color_node->att('indexed');
$color = '#' . substr($color_node->att('rgb'), 2, 6)