oox/source/drawingml/diagram/diagramlayoutatoms.cxx |   10 ++++++++++
 1 file changed, 10 insertions(+)

New commits:
commit f1368d6a45456b5682d588371cfa2efa5571d798
Author: ekuiitr <jhaekans...@gmail.com>
Date:   Sun May 27 01:49:09 2018 +0530

    Smartart: Corrected Line Algorithm
    
    Earlier it display odd height of the children nodes as compared to
    their width.
    
    Change-Id: I379fb192afc5078d089ef276f35ca5a95ff60cfb
    Reviewed-on: https://gerrit.libreoffice.org/54866
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Jan Holesovsky <ke...@collabora.com>

diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx 
b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index 92b6e9129591..366759581bc0 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -361,12 +361,22 @@ void AlgAtom::layoutShape( const ShapePtr& rShape,
             if (nIncY)
                 aChildSize.Height /= (nCount + (nCount-1)*fSpace);
 
+            if(nCount <= 2 && nIncY)
+                aChildSize.Height /= 2;
+            else
+                aChildSize.Height /= (nCount+1);
+
             awt::Point aCurrPos(0, 0);
             if (nIncX == -1)
                 aCurrPos.X = rShape->getSize().Width - aChildSize.Width;
             if (nIncY == -1)
                 aCurrPos.Y = rShape->getSize().Height - aChildSize.Height;
 
+            if(nCount <= 2 && nIncY == -1)
+                aCurrPos.Y = rShape->getSize().Height - aChildSize.Height*2;
+            else
+                aCurrPos.Y = rShape->getSize().Height - 
aChildSize.Height*(nCount+1);
+
             for (auto & aCurrShape : rShape->getChildren())
             {
                 aCurrShape->setPosition(aCurrPos);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to