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
commit4da0c2e2fc395672a60b98dd14c08b146df76232 (patch)
tree617b2269b559948fec12f6dc2ea4b552f623f7e3 /sc/source/ui/view/tabcont.cxx
parent0da66d78242b0bb61c1806f3fa44df154c999adc (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 d147f67ea9cd..6aec70317edf 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;