From debf3ffb87d607704ddea97f6710c3ceaa9a243d Mon Sep 17 00:00:00 2001 From: Zolnai Tamás Date: Fri, 5 Dec 2014 19:23:01 +0100 Subject: bnc#910045 wrong cell fill color defined by table style Problems were with those table styles which used color themes to define cell fill color. Change-Id: Ibde90df81ff253ba65618dde4038093d1caabfe8 Reviewed-on: https://gerrit.libreoffice.org/15089 Tested-by: Jenkins Reviewed-by: Andras Timar --- oox/source/drawingml/table/tablecell.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'oox/source/drawingml') diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx index 2d8dfb8ad7b7..d753326aa4a5 100644 --- a/oox/source/drawingml/table/tablecell.cxx +++ b/oox/source/drawingml/table/tablecell.cxx @@ -116,6 +116,17 @@ void applyTableStylePart( const ::oox::core::XmlFilterBase& rFilterBase, ::oox::drawingml::FillPropertiesPtr& rPartFillPropertiesPtr( rTableStylePart.getFillProperties() ); if ( rPartFillPropertiesPtr.get() ) rFillProperties.assignUsed( *rPartFillPropertiesPtr ); + else + { + ::oox::drawingml::ShapeStyleRef& rFillStyleRef = rTableStylePart.getStyleRefs()[ XML_fillRef ]; + const Theme* pTheme = rFilterBase.getCurrentTheme(); + if (pTheme && rFillStyleRef.mnThemedIdx != 0 ) + { + rFillProperties.assignUsed( *pTheme->getFillStyle( rFillStyleRef.mnThemedIdx ) ); + sal_Int32 nPhClr = rFillStyleRef.maPhClr.getColor( rFilterBase.getGraphicHelper() ); + rFillProperties.maFillColor.setSrgbClr( nPhClr ); + } + } applyBorder( rFilterBase, rTableStylePart, XML_left, rLeftBorder ); applyBorder( rFilterBase, rTableStylePart, XML_right, rRightBorder ); -- cgit