summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrent MacAlpine <tmacalp@gmail.com>2015-01-16 22:06:39 -0500
committerCaolán McNamara <caolanm@redhat.com>2015-01-19 12:31:18 +0000
commit7a4a68e2515fa54e041004cf63042c1ead00d576 (patch)
tree42a5e7edd7583a97ea30ff9b53c65c485511bb38
parente8c0a29797250fd54eb41a4399f1fda39ef25647 (diff)
fdo#88339 Fixed Calc constrained image movement
Change-Id: Id4143e0a8410e6a9589f941c2bda83074eaf4844 Reviewed-on: https://gerrit.libreoffice.org/13975 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sc/source/ui/drawfunc/fupoor.cxx19
1 files changed, 16 insertions, 3 deletions
diff --git a/sc/source/ui/drawfunc/fupoor.cxx b/sc/source/ui/drawfunc/fupoor.cxx
index 979e7b6e2cec..d66a293bcacf 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;