summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/tabcont.cxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-01-29 14:51:05 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-01-29 14:51:05 +0000
commite950135b998c240d3e1206bb542ca38f4b03335e (patch)
treedac6d62b8e2dc292e04e626104782fdd4d8ea1b1 /sc/source/ui/view/tabcont.cxx
parentd89b1fe49bb5314ffb8a68918f0e484344dfac12 (diff)
INTEGRATION: CWS dr58_SRC680 (1.15.188); FILE MERGED
2008/01/11 12:50:46 nn 1.15.188.1: #i83005# ExecuteDrop: don't move to the same position
Diffstat (limited to 'sc/source/ui/view/tabcont.cxx')
-rw-r--r--sc/source/ui/view/tabcont.cxx27
1 files changed, 18 insertions, 9 deletions
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index a72583bf2..49081e4e7 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: tabcont.cxx,v $
*
- * $Revision: 1.15 $
+ * $Revision: 1.16 $
*
- * last change: $Author: vg $ $Date: 2007-02-27 13:57:13 $
+ * last change: $Author: rt $ $Date: 2008-01-29 15:51:05 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -485,16 +485,25 @@ sal_Int8 ScTabControl::ExecuteDrop( const ExecuteDropEvent& rEvt )
// moving of tables within the document
SCTAB nPos = GetPrivatDropPos( rEvt.maPosPixel );
HideDropPos();
- if ( !pDoc->GetChangeTrack() && pDoc->IsDocEditable() )
- {
- //! use table selection from the tab control where dragging was started?
- pViewData->GetView()->MoveTable( lcl_DocShellNr(pDoc), nPos, rEvt.mnAction != DND_ACTION_MOVE );
- rData.pCellTransfer->SetDragWasInternal(); // don't delete
- return TRUE;
+ if ( nPos == rData.pCellTransfer->GetVisibleTab() && rEvt.mnAction == DND_ACTION_MOVE )
+ {
+ // #i83005# do nothing - don't move to the same position
+ // (too easily triggered unintentionally, and might take a long time in large documents)
}
else
- Sound::Beep();
+ {
+ if ( !pDoc->GetChangeTrack() && pDoc->IsDocEditable() )
+ {
+ //! use table selection from the tab control where dragging was started?
+ pViewData->GetView()->MoveTable( lcl_DocShellNr(pDoc), nPos, rEvt.mnAction != DND_ACTION_MOVE );
+
+ rData.pCellTransfer->SetDragWasInternal(); // don't delete
+ return TRUE;
+ }
+ else
+ Sound::Beep();
+ }
}
return 0;