summaryrefslogtreecommitdiff
path: root/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-11-16 15:14:03 +0000
committerOliver Bolte <obo@openoffice.org>2004-11-16 15:14:03 +0000
commit7c862b02e48294bf2631e54cde33e93069ef58da (patch)
tree5bc3fb771343493503f9caeacb77c97f261ff68a /sd/source/ui/slidesorter/controller/SlsClipboard.cxx
parent7a278602ebe40b78f7a441a43aa138c0fc768aed (diff)
INTEGRATION: CWS impress15 (1.4.8); FILE MERGED
2004/10/18 13:10:07 af 1.4.8.1: #i33707# Prevented draging last slide from a document.
Diffstat (limited to 'sd/source/ui/slidesorter/controller/SlsClipboard.cxx')
-rw-r--r--sd/source/ui/slidesorter/controller/SlsClipboard.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
index 9b3392c828ee..8ce39ac9f035 100644
--- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: SlsClipboard.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: kz $ $Date: 2004-10-04 18:37:41 $
+ * last change: $Author: obo $ $Date: 2004-11-16 16:14:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -364,9 +364,13 @@ void Clipboard::CreateSlideTransferable (
if (bDrag)
{
pTransferable->SetView (&mrController.GetView());
- pTransferable->StartDrag (
- pActionWindow,
- DND_ACTION_COPY | DND_ACTION_MOVE );
+ 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 = mrController.GetModel().GetPageCount() - aBookmarkList.Count();
+ if (nRemainingPages > 0)
+ nDragSourceActions |= DND_ACTION_MOVE;
+ pTransferable->StartDrag (pActionWindow, nDragSourceActions);
}
else
pTransferable->CopyToClipboard (pActionWindow);