From 83120950d5138577185598f5eaf8a267d2244dd1 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Thu, 14 May 2015 04:25:52 +0200 Subject: work around Excel bug with negative bar theme based color Change-Id: Id1276dc0e68b46158b750c96aad8afc24fb18743 --- sc/source/filter/oox/condformatbuffer.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sc') 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 ); } -- cgit