summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-04-09 08:16:01 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-04-09 08:18:33 +0200
commita86f37c5182d11d8f43a8b173d0d4dcea4be42c4 (patch)
treeddc5e473f71337876bfa3c649ecfb76c3c498d37 /sc
parent5639909d59b158708305ce3b2e6afe3760032e84 (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
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/oox/condformatbuffer.cxx24
1 files changed, 3 insertions, 21 deletions
diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx
index 6e8239b6051f..1c6b5ba8c746 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -287,27 +287,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;
}