diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-04-09 08:16:01 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-04-12 11:56:18 +0000 |
commit | 883326c3e175a53a567a32806f77489c8f942d40 (patch) | |
tree | ba596d8e1ca13b94fc575fde0e96d533864df22c /sc | |
parent | 8cb85d3605451739f09eb1733faefce26f894cef (diff) |
use the better color import method also for databars, tdf#98554
Ideally we would move some of the magic here into the ThemeBuffer class
but this requires a lot more test cases.
Change-Id: I29adadda6b40cd1863ad3d68554acf7f27c57900
Reviewed-on: https://gerrit.libreoffice.org/23945
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/oox/condformatbuffer.cxx | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx index da8dad6f9885..98f654f2610b 100644 --- a/sc/source/filter/oox/condformatbuffer.cxx +++ b/sc/source/filter/oox/condformatbuffer.cxx @@ -275,27 +275,9 @@ DataBarRule::DataBarRule( const CondFormat& rFormat ): void DataBarRule::importColor( const AttributeList& rAttribs ) { - sal_uInt32 nColor = 0; - if( rAttribs.hasAttribute( XML_rgb ) ) - nColor = rAttribs.getUnsignedHex( XML_rgb, UNSIGNED_RGB_TRANSPARENT ); - else if( rAttribs.hasAttribute( XML_theme ) ) - { - sal_uInt32 nThemeIndex = rAttribs.getUnsigned( XML_theme, 0 ); - nColor = getTheme().getColorByIndex( nThemeIndex ); - } - - ::Color aColor; - double nTint = rAttribs.getDouble(XML_tint, 0.0); - if (nTint != 0.0) - { - oox::drawingml::Color aDMColor; - aDMColor.setSrgbClr(nColor); - aDMColor.addExcelTintTransformation(nTint); - nColor = aDMColor.getColor(getBaseFilter().getGraphicHelper()); - aColor = ::Color(nColor); - } - else - aColor = ARgbToARgbComponents( nColor ); + ThemeBuffer& rThemeBuffer = getTheme(); + GraphicHelper& rGraphicHelper = getBaseFilter().getGraphicHelper(); + ::Color aColor = importOOXColor(rAttribs, rThemeBuffer, rGraphicHelper); mxFormat->maPositiveColor = aColor; } |