Resolves: #i122497# Filter D&D flags for calc D&D
(cherry picked from commit 73a9e800ff4f61058750acb6840af780a0505b49) Change-Id: I47975b23d7ef920de24f92d6ba12bae1233b2f38
This commit is contained in:
committed by
Caolán McNamara
parent
650eaad6ce
commit
aaf3ff8adf
@@ -3704,6 +3704,13 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt )
|
||||
{
|
||||
sal_Int8 nMyAction = rEvt.mnAction;
|
||||
|
||||
// clear DND_ACTION_LINK when other actions are set. The usage below cannot handle
|
||||
// multiple set values
|
||||
if((nMyAction & DND_ACTION_LINK) && (nMyAction & (DND_ACTION_COPYMOVE)))
|
||||
{
|
||||
nMyAction &= ~DND_ACTION_LINK;
|
||||
}
|
||||
|
||||
if ( !rData.pDrawTransfer ||
|
||||
!IsMyModel(rData.pDrawTransfer->GetDragSourceView()) ) // drawing within the document
|
||||
if ( rEvt.mbDefault && nMyAction == DND_ACTION_MOVE )
|
||||
@@ -3712,7 +3719,7 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt )
|
||||
ScDocument* pThisDoc = pViewData->GetDocument();
|
||||
SdrObject* pHitObj = pThisDoc->GetObjectAtPoint(
|
||||
pViewData->GetTabNo(), PixelToLogic(rEvt.maPosPixel) );
|
||||
if ( pHitObj && nMyAction == DND_ACTION_LINK && !rData.pDrawTransfer )
|
||||
if ( pHitObj && nMyAction == DND_ACTION_LINK ) // && !rData.pDrawTransfer )
|
||||
{
|
||||
if ( IsDropFormatSupported(SOT_FORMATSTR_ID_SVXB)
|
||||
|| IsDropFormatSupported(SOT_FORMAT_GDIMETAFILE)
|
||||
@@ -4334,8 +4341,9 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
|
||||
}
|
||||
|
||||
Point aLogicPos = PixelToLogic(aPos);
|
||||
sal_Bool bIsLink = ( rEvt.mnAction == DND_ACTION_LINK );
|
||||
|
||||
if (rData.pDrawTransfer)
|
||||
if (!bIsLink && rData.pDrawTransfer)
|
||||
{
|
||||
sal_uInt16 nFlags = rData.pDrawTransfer->GetDragSourceFlags();
|
||||
|
||||
@@ -4371,8 +4379,6 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
|
||||
}
|
||||
}
|
||||
|
||||
sal_Bool bIsLink = ( rEvt.mnAction == DND_ACTION_LINK );
|
||||
|
||||
ScDocument* pThisDoc = pViewData->GetDocument();
|
||||
SdrObject* pHitObj = pThisDoc->GetObjectAtPoint( pViewData->GetTabNo(), PixelToLogic(aPos) );
|
||||
if ( pHitObj && bIsLink )
|
||||
|
Reference in New Issue
Block a user