summaryrefslogtreecommitdiff
path: root/dtrans/source
diff options
context:
space:
mode:
authorPhilipp Lohmann <pl@openoffice.org>2001-07-31 09:51:37 +0000
committerPhilipp Lohmann <pl@openoffice.org>2001-07-31 09:51:37 +0000
commitf760d35f087ded18c181ac70f0591f4a796292da (patch)
treeb4d7b755e76013f334e8c4b261ccd0fe2ea3544e /dtrans/source
parent07b4e84a0a8cd55012a8eb8e824ce2615888cf2e (diff)
#90417# react on multiple actions in accept
Diffstat (limited to 'dtrans/source')
-rw-r--r--dtrans/source/X11/X11_selection.cxx23
1 files changed, 9 insertions, 14 deletions
diff --git a/dtrans/source/X11/X11_selection.cxx b/dtrans/source/X11/X11_selection.cxx
index 0d0c7179659e..ec74c8c2f2df 100644
--- a/dtrans/source/X11/X11_selection.cxx
+++ b/dtrans/source/X11/X11_selection.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: X11_selection.cxx,v $
*
- * $Revision: 1.37 $
+ * $Revision: 1.38 $
*
- * last change: $Author: pl $ $Date: 2001-07-26 15:05:37 $
+ * last change: $Author: pl $ $Date: 2001-07-31 10:51:37 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1963,18 +1963,13 @@ void SelectionManager::accept( sal_Int8 dragOperation, Window aDropWindow, Time
if( aDropWindow == m_aCurrentDropWindow )
{
Atom nAction = None;
- switch( dragOperation & (DNDConstants::ACTION_MOVE | DNDConstants::ACTION_COPY | DNDConstants::ACTION_LINK) )
- {
- case DNDConstants::ACTION_LINK:
- nAction = m_nXdndActionLink;
- break;
- case DNDConstants::ACTION_MOVE:
- nAction = m_nXdndActionMove;
- break;
- case DNDConstants::ACTION_COPY:
- nAction = m_nXdndActionCopy;
- break;
- }
+ dragOperation &= (DNDConstants::ACTION_MOVE | DNDConstants::ACTION_COPY | DNDConstants::ACTION_LINK);
+ if( dragOperation & DNDConstants::ACTION_MOVE )
+ nAction = m_nXdndActionMove;
+ else if( dragOperation & DNDConstants::ACTION_COPY )
+ nAction = m_nXdndActionCopy;
+ else if( dragOperation & DNDConstants::ACTION_LINK )
+ nAction = m_nXdndActionLink;
sendDragStatus( nAction );
}
}