diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-04-09 07:51:31 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-04-09 08:18:33 +0200 |
commit | 5639909d59b158708305ce3b2e6afe3760032e84 (patch) | |
tree | 8c701c15be46c6d981d37750d8faaa8944af602c /sc | |
parent | ee2f723e467e5ac17c34c51639deb3612f75d415 (diff) |
work around Excel theme color bug, tdf#98554
Change-Id: Id0cd37b37394a0759ee6ffccafd8def719c14312
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/oox/condformatbuffer.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx index 1e61d32ca3a7..6e8239b6051f 100644 --- a/sc/source/filter/oox/condformatbuffer.cxx +++ b/sc/source/filter/oox/condformatbuffer.cxx @@ -194,14 +194,17 @@ namespace { { sal_uInt32 nThemeIndex = rAttribs.getUnsigned( XML_theme, 0 ); - // looks like an Excel bug + // Excel has a bug in the mapping of index 0, 1, 2 and 3. if (nThemeIndex == 0) nThemeIndex = 1; else if (nThemeIndex == 1) nThemeIndex = 0; + else if (nThemeIndex == 2) + nThemeIndex = 3; + else if (nThemeIndex == 3) + nThemeIndex = 2; nColor = rThemeBuffer.getColorByIndex( nThemeIndex ); - } ::Color aColor; |