summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-06-04 17:52:56 -0500
committerJesse Luehrs <doy@tozt.net>2013-06-04 17:52:56 -0500
commit676da141358384bc329e75ffb585d7c9f300bf13 (patch)
treeb0a9d127d745fa99eeed3b6e4e5772f79820e911
parent2a15eb9998fc97644e40d25cf82d3fc8a9312390 (diff)
downloadspreadsheet-template-676da141358384bc329e75ffb585d7c9f300bf13.tar.gz
spreadsheet-template-676da141358384bc329e75ffb585d7c9f300bf13.zip
not sure what's going on here
some places say that solid fills use the fg color, and other places say that they use the bg color, and so i'm not sure what to do here. should look into this more.
-rw-r--r--lib/Spreadsheet/Template/Generator/Parser/Excel.pm11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/Spreadsheet/Template/Generator/Parser/Excel.pm b/lib/Spreadsheet/Template/Generator/Parser/Excel.pm
index 6348147..d81ebbd 100644
--- a/lib/Spreadsheet/Template/Generator/Parser/Excel.pm
+++ b/lib/Spreadsheet/Template/Generator/Parser/Excel.pm
@@ -167,8 +167,15 @@ sub _parse_cell {
if (!$format->{IgnoreFill}) {
if ($format->{Fill}[0] != 0) {
$format_data->{pattern} = $fill{$format->{Fill}[0]};
- $format_data->{fg_color} = $format->{Fill}[1];
- $format_data->{bg_color} = $format->{Fill}[2];
+ # XXX this seems pretty wrong, but... not sure what the
+ # actually right way is, and this works for now
+ if ($format_data->{pattern} eq 'solid') {
+ $format_data->{bg_color} = $format->{Fill}[1];
+ }
+ else {
+ $format_data->{fg_color} = $format->{Fill}[1];
+ $format_data->{bg_color} = $format->{Fill}[2];
+ }
}
}
if (!$format->{IgnoreBorder}) {