[Libreoffice-commits] core.git: sd/source

Andrzej J.R. Hunt andrzej at ahunt.org
Wed Nov 20 05:01:08 PST 2013


 sd/source/ui/slidesorter/controller/SlsClipboard.cxx |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

New commits:
commit d93433ba1181f5d8f6ded0ed0c103df10ebb1f22
Author: Andrzej J.R. Hunt <andrzej at ahunt.org>
Date:   Mon Nov 4 10:21:19 2013 +0000

    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 at documentfoundation.org>
    Tested-by: Thorsten Behrens <thb at documentfoundation.org>

diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
index 6d9f7f0..53b5bf2 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);


More information about the Libreoffice-commits mailing list