summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-05-07 16:01:25 -0500
committerJesse Luehrs <doy@tozt.net>2013-05-07 16:01:25 -0500
commit0fd58674a9607a5fbafaf68850e0fe24b00775cf (patch)
tree12bfd4244867db2b678c61522211cf0db2012c58
parente26631072fcf0fe885ed1215b6d4c80b6a719e3c (diff)
downloadspreadsheet-template-0fd58674a9607a5fbafaf68850e0fe24b00775cf.tar.gz
spreadsheet-template-0fd58674a9607a5fbafaf68850e0fe24b00775cf.zip
i hate microsoft documentation so much
-rw-r--r--lib/Spreadsheet/Template/Generator/Parser/XLSX.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Spreadsheet/Template/Generator/Parser/XLSX.pm b/lib/Spreadsheet/Template/Generator/Parser/XLSX.pm
index 3189785..630b7df 100644
--- a/lib/Spreadsheet/Template/Generator/Parser/XLSX.pm
+++ b/lib/Spreadsheet/Template/Generator/Parser/XLSX.pm
@@ -77,6 +77,11 @@ sub _parse_styles {
$_->name eq 'a:sysClr' ? $_->att('lastClr') : $_->att('val')
} $theme_xml->root->find_nodes('//a:clrScheme/*/*');
+ # this shouldn't be necessary, but the documentation is wrong here
+ # see http://stackoverflow.com/questions/2760976/theme-confusion-in-spreadsheetml
+ ($colors[0], $colors[1]) = ($colors[1], $colors[0]);
+ ($colors[2], $colors[3]) = ($colors[3], $colors[2]);
+
my @fills = map {
my $fgcolor_node = $_->first_child('fgColor');
my $fgcolor = 64; # XXX