summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-07-03 11:50:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-07-03 13:22:08 +0200
commit84f1c0f7cafc0afb01eac53995d987cbe9b0c771 (patch)
tree9bbfb6ad26d831343154dfbb69eaf972dcf34cf4 /vcl/source
parent3c1026bd793ebd81a94a9bf8514553aea23ce375 (diff)
DragDropMode::CTRL_COPY is dead
since commit 3c5e074a8fe5e0a18d326d37bc54a5ec0f077e4e Date: Fri Jun 19 12:37:05 2020 +0100 weld DataNavigator Change-Id: Ib1a0474e0543f863236d58195653c6369c21e2fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97829 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/treelist/treelistbox.cxx27
1 files changed, 11 insertions, 16 deletions
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index f8a196ef29b4..ef3176e08162 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -492,25 +492,20 @@ bool SvTreeListBox::DoubleClickHdl()
bool SvTreeListBox::CheckDragAndDropMode( SvTreeListBox const * pSource, sal_Int8 nAction )
{
- if ( pSource == this )
+ if ( pSource != this )
+ return false; // no drop
+
+ if ( !(nDragDropMode & DragDropMode::CTRL_MOVE) )
+ return false; // D&D locked within list
+
+ if( DND_ACTION_MOVE == nAction )
{
- if ( !(nDragDropMode & (DragDropMode::CTRL_MOVE | DragDropMode::CTRL_COPY) ) )
- return false; // D&D locked within list
- if( DND_ACTION_MOVE == nAction )
- {
- if ( !(nDragDropMode & DragDropMode::CTRL_MOVE) )
- return false; // no local move
- }
- else
- {
- if ( !(nDragDropMode & DragDropMode::CTRL_COPY))
- return false; // no local copy
- }
+ if ( !(nDragDropMode & DragDropMode::CTRL_MOVE) )
+ return false; // no local move
}
else
- {
- return false; // no drop
- }
+ return false; // no local copy
+
return true;
}