diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-03-15 16:06:05 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-03-15 17:08:17 +0000 |
commit | f669eec43ee902071c8f56a322a6dfb1a4a66e45 (patch) | |
tree | 47464cf44d9d4bd01c1d1cf8ca1d1fc9b2f394c4 /sd/source/ui | |
parent | 29ee431c1cf859c3d5a5041cff5cb04b89db27a0 (diff) |
tdf#97919 Resize media objects proportionally by default
as we do with images
Change-Id: I5b27b8310736b9dfd5c274614ad4d1e4becb1fa9
Reviewed-on: https://gerrit.libreoffice.org/23277
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sd/source/ui')
-rw-r--r-- | sd/source/ui/func/fudraw.cxx | 12 | ||||
-rw-r--r-- | sd/source/ui/inc/fudraw.hxx | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx index 9d735c4d4251..5404dc30ffd8 100644 --- a/sd/source/ui/func/fudraw.cxx +++ b/sd/source/ui/func/fudraw.cxx @@ -78,7 +78,7 @@ FuDraw::FuDraw(ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, , bDragHelpLine(false) , nHelpLine(0) , bPermanent(false) - , bIsImageSelected(false) + , bIsMediaSelected(false) { } @@ -155,8 +155,8 @@ bool FuDraw::MouseButtonDown(const MouseEvent& rMEvt) bDragHelpLine = false; aMDPos = mpWindow->PixelToLogic( rMEvt.GetPosPixel() ); - // Check whether an image is selected - bIsImageSelected = false; + // Check whether a media object is selected + bIsMediaSelected = false; if (mpView->AreObjectsMarked()) { const SdrMarkList& rMarkList = mpView->GetMarkedObjectList(); @@ -167,7 +167,9 @@ bool FuDraw::MouseButtonDown(const MouseEvent& rMEvt) // proportionally scaled by default. if (mpView->GetDragMode() != SDRDRAG_CROP) { - bIsImageSelected = pMark->GetMarkedSdrObj()->GetObjIdentifier() == OBJ_GRAF; + sal_uInt16 aObjIdentifier = pMark->GetMarkedSdrObj()->GetObjIdentifier(); + bIsMediaSelected = aObjIdentifier == OBJ_GRAF || + aObjIdentifier == OBJ_MEDIA; } } } @@ -259,7 +261,7 @@ bool FuDraw::MouseMove(const MouseEvent& rMEvt) if (mpView->IsAction()) { // #i33136# and fdo#88339 - if(bRestricted && (bIsImageSelected || doConstructOrthogonal())) + if(bRestricted && (bIsMediaSelected || doConstructOrthogonal())) { // Scale proportionally by default: // rectangle->quadrat, ellipse->circle, Images etc. diff --git a/sd/source/ui/inc/fudraw.hxx b/sd/source/ui/inc/fudraw.hxx index b315e0bce27b..6a22089551c2 100644 --- a/sd/source/ui/inc/fudraw.hxx +++ b/sd/source/ui/inc/fudraw.hxx @@ -77,7 +77,7 @@ protected: bool bDragHelpLine; sal_uInt16 nHelpLine; bool bPermanent; - bool bIsImageSelected; + bool bIsMediaSelected; private: void DoModifiers(const MouseEvent& rMEvt, bool bSnapModPressed); |