[Libreoffice-commits] core.git: sw/source
Tomaž Vajngerl
tomaz.vajngerl at collabora.com
Sun Feb 16 23:14:41 CET 2014
sw/source/ui/docvw/edtwin.cxx | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
New commits:
commit 84acb10f5484489612ccc84215edfcfdef87ea13
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date: Sun Feb 16 23:05:18 2014 +0100
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
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index 4ab9555..af79875 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() );
More information about the Libreoffice-commits
mailing list