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 18:21:20 +0200 |
commit | d23f9b40c5d95ab209747417aa543f8b7ecc3d5f (patch) | |
tree | 23894fb3806189d56002b7d59615ff5f32067b74 /oox | |
parent | d2809580d8e520bfa05152a9bba9ff686fdfb1d6 (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.
Reviewed-on: https://gerrit.libreoffice.org/15089
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit debf3ffb87d607704ddea97f6710c3ceaa9a243d)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Conflicts:
sd/qa/unit/import-tests.cxx
Change-Id: Ibde90df81ff253ba65618dde4038093d1caabfe8
Diffstat (limited to 'oox')
-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 1b336591a51a..7c4dd9fcfebb 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 ); |