From 4a96a5d862ed46bbcb64d34b32720b5b1b3d7ca8 Mon Sep 17 00:00:00 2001
From: Grzegorz Araminowicz <grzegorz.araminowicz@collabora.com>
Date: Sun, 7 Jul 2019 14:12:05 +0200
Subject: SmartArt: improve organization chart layout

layout shapes in two steps:
  * first calculate vertical child shapes count for every shape
    (taking into accout hierBranch alg variable)
  * then actual layout using that count to calculate size for subtrees

Change-Id: I2e5ca34ed3383aa9502c52511cc1fb2bee215572
Reviewed-on: https://gerrit.libreoffice.org/75195
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
---
 include/oox/drawingml/shape.hxx | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'include')

diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx
index 1f8b163b5d35..5aa6f00318a8 100644
--- a/include/oox/drawingml/shape.hxx
+++ b/include/oox/drawingml/shape.hxx
@@ -225,6 +225,9 @@ public:
 
     double getAspectRatio() const { return mfAspectRatio; }
 
+    void setVerticalShapesCount(sal_Int32 nVerticalShapesCount) { mnVerticalShapesCount = nVerticalShapesCount; }
+    sal_Int32 getVerticalShapesCount() const { return mnVerticalShapesCount; }
+
     /// Changes reference semantics to value semantics for fill properties.
     void cloneFillProperties();
 
@@ -361,6 +364,9 @@ private:
 
     /// Aspect ratio for an in-diagram shape.
     double mfAspectRatio = 0;
+
+    /// Number of child shapes to be layouted vertically inside org chart in-diagram shape.
+    sal_Int32 mnVerticalShapesCount = 0;
 };
 
 } }
-- 
cgit