From 0fd58674a9607a5fbafaf68850e0fe24b00775cf Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Tue, 7 May 2013 16:01:25 -0500 Subject: i hate microsoft documentation so much --- lib/Spreadsheet/Template/Generator/Parser/XLSX.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') 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 -- cgit v1.2.3-54-g00ecf