diff options
author | Andrzej J.R. Hunt <andrzej@ahunt.org> | 2013-11-04 10:21:19 +0000 |
---|---|---|
committer | Thorsten Behrens <thb@documentfoundation.org> | 2013-11-20 07:00:49 -0600 |
commit | d93433ba1181f5d8f6ded0ed0c103df10ebb1f22 (patch) | |
tree | 9a02698144cbbea5c22d7bd8fc0a5b6105fcd829 /sd | |
parent | dde6090b1ac8aecf539e7a779d0f3f42eff3bfb5 (diff) |
fdo#70047 Only copy slides when CTRL key pressed.
The dragging logic is able to determine whether or not slides are
being moved or copied, previously it was forced into copying mode
if no unselected slides remain, which is the case when trying to
move a single existing slide (or all slides), whereas copying
mode should only be enabled with the CTRL key.
Change-Id: If219eb8e870ff201b71e655430828d906533fe04
Reviewed-on: https://gerrit.libreoffice.org/6564
Reviewed-by: Thorsten Behrens <thb@documentfoundation.org>
Tested-by: Thorsten Behrens <thb@documentfoundation.org>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsClipboard.cxx | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx index 6d9f7f083c8c..53b5bf2ae87d 100644 --- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx +++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx @@ -497,13 +497,7 @@ void Clipboard::CreateSlideTransferable ( if (bDrag) { pTransferable->SetView (&mrSlideSorter.GetView()); - sal_Int8 nDragSourceActions (DND_ACTION_COPY); - // The move action is available only when not all pages would be - // moved. Otherwise an empty document would remain. Crash. - sal_Int32 nRemainingPages = mrSlideSorter.GetModel().GetPageCount() - aBookmarkList.size(); - if (nRemainingPages > 0) - nDragSourceActions |= DND_ACTION_MOVE; - pTransferable->StartDrag (pActionWindow, nDragSourceActions); + pTransferable->StartDrag (pActionWindow, DND_ACTION_COPY | DND_ACTION_MOVE); } else pTransferable->CopyToClipboard (pActionWindow); |