[Libreoffice-commits] core.git: sd/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Sep 14 13:07:10 UTC 2018
sd/source/ui/view/drviewse.cxx | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
New commits:
commit eb0a38c178179493f4c86314f78c5de75d18a482
Author: Maxim Monastirsky <momonasmon at gmail.com>
AuthorDate: Fri Sep 14 00:22:00 2018 +0300
Commit: Maxim Monastirsky <momonasmon at gmail.com>
CommitDate: Fri Sep 14 15:06:45 2018 +0200
tdf#119836 tdf#118840 Toggle behavior for some draw commands
Keeping a function active after a subsequent click only makes sense
for shape drawing, as it's used to lock the function so more that one
shape can be drawn in a row. Otherwise just do what users expect, and
turn the function off.
Affected commands:
.uno:Mirror
.uno:Crop
.uno:InteractiveTransparence
.uno:InteractiveGradient
.uno:Shear
.uno:CrookRotate
.uno:CrookSlant
.uno:CrookStretch
.uno:ConvertInto3DLathe
.uno:ZoomMode
.uno:ZoomPanning
Change-Id: Ic441cd72423cbc0570c4a070402b474e85b5084b
Reviewed-on: https://gerrit.libreoffice.org/60472
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <tietze.heiko at gmail.com>
Tested-by: Heiko Tietze <tietze.heiko at gmail.com>
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index eaf4612ef6b9..6245206d2c0a 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -304,16 +304,13 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
case SID_OBJECT_CROOK_STRETCH:
case SID_CONVERT_TO_3D_LATHE:
{
- short nSlotId = rReq.GetSlot();
+ sal_uInt16 nSlotId = rReq.GetSlot();
- if( nSlotId == sal_uInt16(SID_OBJECT_ROTATE) )
+ // toggle function
+ if( nOldSId == nSlotId )
{
- // toggle rotation
- if( nOldSId == nSlotId )
- {
- nSlotId = SID_OBJECT_SELECT;
- rReq.SetSlot( nSlotId );
- }
+ nSlotId = SID_OBJECT_SELECT;
+ rReq.SetSlot( nSlotId );
}
if (nSlotId == SID_OBJECT_CROOK_ROTATE ||
@@ -544,8 +541,15 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
case SID_ZOOM_MODE:
case SID_ZOOM_PANNING:
{
- mbZoomOnPage = false;
- SetCurrentFunction( FuZoom::Create(this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
+ if (nOldSId != nSId)
+ {
+ mbZoomOnPage = false;
+ SetCurrentFunction( FuZoom::Create(this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
+ }
+ else
+ {
+ GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::ASYNCHRON);
+ }
rReq.Done();
}
break;
More information about the Libreoffice-commits
mailing list