Kaydet (Commit) a86f37c5 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

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
üst 5639909d
...@@ -287,27 +287,9 @@ DataBarRule::DataBarRule( const CondFormat& rFormat ): ...@@ -287,27 +287,9 @@ DataBarRule::DataBarRule( const CondFormat& rFormat ):
void DataBarRule::importColor( const AttributeList& rAttribs ) void DataBarRule::importColor( const AttributeList& rAttribs )
{ {
sal_uInt32 nColor = 0; ThemeBuffer& rThemeBuffer = getTheme();
if( rAttribs.hasAttribute( XML_rgb ) ) GraphicHelper& rGraphicHelper = getBaseFilter().getGraphicHelper();
nColor = rAttribs.getUnsignedHex( XML_rgb, UNSIGNED_RGB_TRANSPARENT ); ::Color aColor = importOOXColor(rAttribs, rThemeBuffer, rGraphicHelper);
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 );
mxFormat->maPositiveColor = aColor; mxFormat->maPositiveColor = aColor;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment