[Libreoffice-commits] core.git: Branch 'libreoffice-4-4-0' - sc/source

Trent MacAlpine tmacalp at gmail.com
Tue Jan 20 13:05:58 PST 2015


 sc/source/ui/drawfunc/fupoor.cxx |   19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

New commits:
commit 5417429d0ef2d968b227dd2a533c1bf9cb0156b9
Author: Trent MacAlpine <tmacalp at gmail.com>
Date:   Fri Jan 16 22:06:39 2015 -0500

    fdo#88339 Fixed Calc constrained image movement
    
    fixed on master by commit# 7a4a68e2515fa54e041004cf63042c1ead00d576
    
    Change-Id: Id4143e0a8410e6a9589f941c2bda83074eaf4844
    Reviewed-on: https://gerrit.libreoffice.org/14022
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit fdff4b60b6d4beabadab15a4fceb60cb84e542d8)
    Reviewed-on: https://gerrit.libreoffice.org/14024
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/ui/drawfunc/fupoor.cxx b/sc/source/ui/drawfunc/fupoor.cxx
index 979e7b6..d66a293 100644
--- a/sc/source/ui/drawfunc/fupoor.cxx
+++ b/sc/source/ui/drawfunc/fupoor.cxx
@@ -324,17 +324,30 @@ void FuPoor::ImpForceQuadratic(Rectangle& rRect)
     }
 }
 
-// #i33136#
+// #i33136# fdo#88339
 bool FuPoor::doConstructOrthogonal() const
 {
-    // Check whether an image is selected -> they should scale proportionally
+    // Detect whether we're moving an object or resizing.
+    bool bIsMoveMode = false;
+    if (pView->IsDragObj())
+    {
+        const SdrHdl* pHdl = pView->GetDragStat().GetHdl();
+        if (!pHdl || (!pHdl->IsCornerHdl() && !pHdl->IsVertexHdl()))
+        {
+            bIsMoveMode = true;
+        }
+    }
+
+    // Detect image and resize proportionally, but don't constrain movement by default
     if (pView->AreObjectsMarked())
     {
         const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
         if (rMarkList.GetMarkCount() == 1)
         {
-            if (rMarkList.GetMark(0)->GetMarkedSdrObj()->GetObjIdentifier() == OBJ_GRAF)
+            if (rMarkList.GetMark(0)->GetMarkedSdrObj()->GetObjIdentifier() == OBJ_GRAF && !bIsMoveMode)
+            {
                 return true;
+            }
         }
     }
     return false;


More information about the Libreoffice-commits mailing list