summaryrefslogtreecommitdiff
path: root/sc/source/filter
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-05-11 07:21:05 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-05-11 07:21:05 +0200
commitd793b848147f5fd382d44239c4b7e27337782811 (patch)
tree4a9312274060085a259e462de80388e7b13467d5 /sc/source/filter
parentcdd36980f1e9517280d579a2467f46f87fec8237 (diff)
also support theme based colors in xlsx
Change-Id: I6a159d7e5a9315b23a5ff7ee6487ee65457552ff
Diffstat (limited to 'sc/source/filter')
-rw-r--r--sc/source/filter/oox/condformatbuffer.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx
index dd6150faaafa..d14ce8aae467 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -51,6 +51,7 @@
#include "addressconverter.hxx"
#include "biffinputstream.hxx"
#include "stylesbuffer.hxx"
+#include "themebuffer.hxx"
#include "colorscale.hxx"
#include "document.hxx"
@@ -206,7 +207,14 @@ namespace {
void ColorScaleRule::importColor( const AttributeList& rAttribs )
{
- sal_Int32 nColor = rAttribs.getIntegerHex( XML_rgb, API_RGB_TRANSPARENT );
+ sal_Int32 nColor = 0;
+ if( rAttribs.hasAttribute( XML_rgb ) )
+ nColor = rAttribs.getIntegerHex( XML_rgb, API_RGB_TRANSPARENT );
+ else if( rAttribs.hasAttribute( XML_theme ) )
+ {
+ sal_uInt32 nThemeIndex = rAttribs.getUnsigned( XML_theme, 0 );
+ nColor = getTheme().getColorByToken( nThemeIndex );
+ }
::Color aColor = RgbToRgbComponents( nColor );