[Libreoffice-commits] core.git: librelogo/source

László Németh laszlo.nemeth at collabora.com
Fri Jun 26 19:07:00 PDT 2015


 librelogo/source/LibreLogo/LibreLogo.py |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit c5b235e16287d786e036424c6229bcee5579684b
Author: László Németh <laszlo.nemeth at collabora.com>
Date:   Sat Jun 27 04:04:15 2015 +0200

    tdf#92368 fix saved positions of arcs, segments drawn by LibreLogo
    
    Change-Id: I8f622680ddd31d0a7048c14c85932ae495ae0f5e

diff --git a/librelogo/source/LibreLogo/LibreLogo.py b/librelogo/source/LibreLogo/LibreLogo.py
index 327648c..081431c 100644
--- a/librelogo/source/LibreLogo/LibreLogo.py
+++ b/librelogo/source/LibreLogo/LibreLogo.py
@@ -1064,6 +1064,7 @@ def __boxshape__(shapetype, l):
     if shapetype == "Rectangle" and len(l) > 2:
         shape.CornerRadius = (l[2] * __PT_TO_TWIP__) / __MM10_TO_TWIP__
     elif shapetype == "Ellipse" and len(l) > 2:
+        oldBoundRect = shape.BoundRect
         try:
             shape.CircleKind = __SECTION__
             shape.CircleStartAngle = (-l[3] - 270) * 100
@@ -1071,6 +1072,9 @@ def __boxshape__(shapetype, l):
             shape.CircleKind = [__FULL__, __SECTION__, __CUT__, __ARC__][l[4]]
         except:
             pass
+        pos.X = pos.X + shape.BoundRect.X - oldBoundRect.X
+        pos.Y = pos.Y + shape.BoundRect.Y - oldBoundRect.Y
+        shape.setPosition(pos)
     __visible__(shape, True)
     __removeshape__(__ACTUAL__)
     _.shapecache[__ACTUAL__] = shape


More information about the Libreoffice-commits mailing list