diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index fe1bf2703a34..c3473afaebbf 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -2116,23 +2116,26 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) pView->ResetBrushDocument(); // invalidates pBrushDoc pointer } + Point aPos = rMEvt.GetPosPixel(); + SCCOL nPosX; + SCROW nPosY; + SCTAB nTab = pViewData->GetTabNo(); + pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY ); + ScDPObject* pDPObj = pDoc->GetDPAtCursor( nPosX, nPosY, nTab ); + + bool bInDataPilotTable = (pDPObj != nullptr); + // double click (only left button) // in the tiled rendering case, single click works this way too bool bIsTiledRendering = comphelper::LibreOfficeKit::isActive(); bool bDouble = ( rMEvt.GetClicks() == 2 && rMEvt.IsLeft() ); - if ((bDouble || bIsTiledRendering) + if ((bDouble || (bIsTiledRendering && !bInDataPilotTable)) && !bRefMode && (nMouseStatus == SC_GM_DBLDOWN || (bIsTiledRendering && nMouseStatus != SC_GM_URLDOWN)) && !pScMod->IsRefDialogOpen()) { // data pilot table - Point aPos = rMEvt.GetPosPixel(); - SCCOL nPosX; - SCROW nPosY; - SCTAB nTab = pViewData->GetTabNo(); - pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY ); - ScDPObject* pDPObj = pDoc->GetDPAtCursor( nPosX, nPosY, nTab ); if ( pDPObj && pDPObj->GetSaveData()->GetDrillDown() ) { ScAddress aCellPos( nPosX, nPosY, pViewData->GetTabNo() ); @@ -2248,9 +2251,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) if (isTiledRendering && pViewShell && (pViewShell->isLOKMobilePhone() || pViewShell->isLOKTablet())) { - Point aPos = rMEvt.GetPosPixel(); - SCCOL nPosX; - SCROW nPosY; + aPos = rMEvt.GetPosPixel(); pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY ); auto pForTabView = dynamic_cast<const ScTabViewShell *>(pViewShell); OString aCursor = pForTabView->GetViewData().describeCellCursorAt(nPosX, nPosY); @@ -2303,10 +2304,8 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents = pDoc->GetVbaEventProcessor(); if( xVbaEvents.is() ) try { - Point aPos = rMEvt.GetPosPixel(); - SCCOL nPosX; - SCROW nPosY; - SCTAB nTab = pViewData->GetTabNo(); + aPos = rMEvt.GetPosPixel(); + nTab = pViewData->GetTabNo(); pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY ); OUString sURL; ScRefCellValue aCell; |