summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-02-16 23:05:18 +0100
committerTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-02-16 23:13:02 +0100
commit84acb10f5484489612ccc84215edfcfdef87ea13 (patch)
treeff862f9555978d499ef5fd9df20faef0fbb5464a
parent3ec96dc587411c5347a77bba404c1e7a94e2d19c (diff)
fdo#71669 Poportionally scale images by default in Writer
When holding "shift" at resizing, objects are resized proportional. With this commit, proportional resizing for images is the default behavior and "free" resizing is enabled when holding "shift". The behavior for other objects is unchanged. Change-Id: I484455a8bd3edb879c75b9a27988cebeb843678b
-rw-r--r--sw/source/ui/docvw/edtwin.cxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index 4ab955565532..af7987532ee4 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -4012,15 +4012,24 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
if( bIsDocReadOnly )
break;
+ bool bIsSelectionGfx = rSh.GetSelectionType() & nsSelectionType::SEL_GRF;
+ bool bisResize = eSdrMoveHdl != HDL_MOVE;
+
if ( rMEvt.IsShift() )
{
- pSdrView->SetOrtho(true);
- pSdrView->SetAngleSnapEnabled(sal_True);
+ pSdrView->SetAngleSnapEnabled(!bIsSelectionGfx);
+ if (bisResize)
+ pSdrView->SetOrtho(!bIsSelectionGfx);
+ else
+ pSdrView->SetOrtho(true);
}
else
{
- pSdrView->SetOrtho(false);
- pSdrView->SetAngleSnapEnabled(sal_False);
+ pSdrView->SetAngleSnapEnabled(bIsSelectionGfx);
+ if (bisResize)
+ pSdrView->SetOrtho(bIsSelectionGfx);
+ else
+ pSdrView->SetOrtho(false);
}
rSh.Drag( &aDocPt, rMEvt.IsShift() );