From 22086e70c4f3bb41620ff81ecaf57fd2af6ccbce Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 9 Jan 2019 17:49:14 +0100 Subject: oox smartart, org chart: fix vertical order of assistant nodes It seems the manager -> assistant -> employees ordering is not part of the file format. The order is stored twice in the file: the hierRoot algorithm has 3 layout nodes as a children, and also the data model has an order of the presentation nodes: both describe that employees go before assistant nodes. In contrast to that, PowerPoint orders XML_asst nodes before XML_node ones, so teach the hierRoot algorithm about this. This requires tracking the data model node type for each in-diagram drawingML shape, so that layout can determine if a hierRoot algorithm children has an assistant node or not. Change-Id: Ib81f3666fb092ed3b036d830f69ba7e1b94f8331 Reviewed-on: https://gerrit.libreoffice.org/66048 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- include/oox/drawingml/shape.hxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/oox') diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx index 21972666f5f6..9dd643b34ae8 100644 --- a/include/oox/drawingml/shape.hxx +++ b/include/oox/drawingml/shape.hxx @@ -215,6 +215,10 @@ public: sal_Int32 getZOrderOff() const { return mnZOrderOff; } + void setDataNodeType(sal_Int32 nDataNodeType) { mnDataNodeType = nDataNodeType; } + + sal_Int32 getDataNodeType() const { return mnDataNodeType; } + protected: css::uno::Reference< css::drawing::XShape > const & @@ -335,6 +339,9 @@ private: /// Z-Order offset. sal_Int32 mnZOrderOff = 0; + + /// Type of data node for an in-diagram shape. + sal_Int32 mnDataNodeType = 0; }; } } -- cgit