[Libreoffice-commits] core.git: sd/source
Andrzej J.R. Hunt
andrzej at ahunt.org
Fri Nov 8 17:26:10 CET 2013
sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx | 21 +++++++++++
1 file changed, 21 insertions(+)
New commits:
commit 61a20e43b1ec7641bed073244c988e3ea981f086
Author: Andrzej J.R. Hunt <andrzej at ahunt.org>
Date: Sat Oct 26 17:10:52 2013 +0100
SlideSorter: insert new slide on double-click.
Previously inserting a new slide required using a context menu
(via right-click) or the main menu-bar. It is now possible
to insert a blank slide by double-clicking in an empty area
of the slide sorter.
Change-Id: Id7ac5f9d3befd02d0a89ad5e1631885c0493ad3d
Reviewed-on: https://gerrit.libreoffice.org/6442
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
index ee6c867..746e940a 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
@@ -1275,6 +1275,27 @@ bool NormalModeHandler::ProcessButtonDownEvent (
DeselectAllPages();
break;
+ case BUTTON_DOWN | LEFT_BUTTON | DOUBLE_CLICK | NOT_OVER_PAGE:
+ {
+ // Insert a new slide:
+ // First of all we need to set the insertion indicator which sets the
+ // position where the new slide will be inserted.
+ ::boost::shared_ptr<InsertionIndicatorHandler> pInsertionIndicatorHandler
+ = mrSlideSorter.GetController().GetInsertionIndicatorHandler();
+
+ pInsertionIndicatorHandler->Start(false);
+ pInsertionIndicatorHandler->UpdatePosition(
+ rDescriptor.maMousePosition,
+ InsertionIndicatorHandler::MoveMode);
+ mrSlideSorter.GetController().GetSelectionManager()->SetInsertionPosition(
+ pInsertionIndicatorHandler->GetInsertionPageIndex());
+
+ mrSlideSorter.GetViewShell()->GetDispatcher()->Execute(
+ SID_INSERTPAGE,
+ SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD);
+ break;
+ }
+
default:
return false;
}
More information about the Libreoffice-commits
mailing list