diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-12-05 19:23:01 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-03-31 16:04:40 +0000 |
commit | debf3ffb87d607704ddea97f6710c3ceaa9a243d (patch) | |
tree | 060f4255e50a522f41376c6919a5316aeaee37a0 /oox/source/drawingml/table | |
parent | e27d7c38ba1de0f4bbb1197bd84c063a0fdee9d1 (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'oox/source/drawingml/table')
-rw-r--r-- | oox/source/drawingml/table/tablecell.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
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 ); |