From 6f9407c0d872675dbcbd0dc52fd7a0fdb098804b Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 14 Oct 2019 21:49:32 +0200 Subject: tdf#127964 PPTX import: fix shape fill handling: style vs slide background MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Regression from commit 943a534ac7cb3df513583e226c986dafd8ba246b (tdf#123684 PPTX import: fix wrong background color for , 2019-04-23), the problem was that we didn't handle the case when a shape had an XML fragment like this: i.e. the shape both wants to use background fill and it has a style declaring how to fill it as well. We gave the style a priority, while PowerPoint gives the background fill a priority. Fix the problem by not setting the fill from the style in case the background fill is already set. Change-Id: Ie1b56e5615219138a5b7ddd7a2b25295b991bc05 Reviewed-on: https://gerrit.libreoffice.org/80804 Tested-by: Jenkins Reviewed-by: Miklos Vajna (cherry picked from commit 46d630f98f1c07ec2048da35d1a4804181148ac5) Reviewed-on: https://gerrit.libreoffice.org/80807 Reviewed-by: Xisco FaulĂ­ --- include/oox/drawingml/shape.hxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx index 5aa6f00318a8..4abf973d8cb7 100644 --- a/include/oox/drawingml/shape.hxx +++ b/include/oox/drawingml/shape.hxx @@ -228,6 +228,8 @@ public: void setVerticalShapesCount(sal_Int32 nVerticalShapesCount) { mnVerticalShapesCount = nVerticalShapesCount; } sal_Int32 getVerticalShapesCount() const { return mnVerticalShapesCount; } + void setUseBgFill(bool bUseBgFill) { mbUseBgFill = bUseBgFill; } + /// Changes reference semantics to value semantics for fill properties. void cloneFillProperties(); @@ -367,6 +369,9 @@ private: /// Number of child shapes to be layouted vertically inside org chart in-diagram shape. sal_Int32 mnVerticalShapesCount = 0; + + /// The shape fill should be set to that of the slide background surface. + bool mbUseBgFill = false; }; } } -- cgit