summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-05-14 04:25:52 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-05-14 05:33:27 +0200
commit83120950d5138577185598f5eaf8a267d2244dd1 (patch)
tree3a3bad7ef710ccb7fd5d7c6352c546b8d6a47872 /sc
parent41df7db9459c61cc03dda0dfb344b8ac7bf901cb (diff)
work around Excel bug with negative bar theme based color
Change-Id: Id1276dc0e68b46158b750c96aad8afc24fb18743
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/oox/condformatbuffer.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx
index a5c42f3d0d8c..16946aa4b7ab 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -179,6 +179,13 @@ namespace {
else if( rAttribs.hasAttribute( XML_theme ) )
{
sal_uInt32 nThemeIndex = rAttribs.getUnsigned( XML_theme, 0 );
+
+ // looks like an Excel bug
+ if (nThemeIndex == 0)
+ nThemeIndex = 1;
+ else if (nThemeIndex == 1)
+ nThemeIndex = 0;
+
nColor = rThemeBuffer.getColorByIndex( nThemeIndex );
}