diff options
author | Henry Castro <hcastro@collabora.com> | 2015-04-03 16:29:24 -0400 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-04-07 09:18:19 +0200 |
commit | ee1e0919c29bca99405c9c3b1f250b69ec069fd0 (patch) | |
tree | 41f3a0b2f92442ecfec00b51369f9e67ad14586f /sc | |
parent | 7bc83da3d6d1863d86c43db81ed9115e93689510 (diff) |
sc tiled editing: Changed behaviour double click to click.
In the tiled rendering case, it points the cell cursor, and immediately
start the editing.
When it is double click, it will only trigger the selection of the cell.
Change-Id: Iafcabba408533e8162bd45d780f5e8926c6970bb
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 8d825c41b316..d7d56e0d671e 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -1837,6 +1837,17 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta // TestMouse schon oben passiert } + // In the tiled rendering case, select shapes + if (rMEvt.IsLeft() && pViewData->GetDocument()->GetDrawLayer()->isTiledRendering()) + { + if ( !bCrossPointer && DrawMouseButtonDown(rMEvt) ) + { + return; + } + + pViewData->GetViewShell()->SetDrawShell( false ); + } + Point aPos = rMEvt.GetPosPixel(); SCsCOL nPosX; SCsROW nPosY; @@ -1916,6 +1927,10 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta } else nMouseStatus = SC_GM_TABDOWN; + + // In the tiled rendering case, fake mouse status to double click + if ( nMouseStatus == SC_GM_TABDOWN && pDoc->GetDrawLayer()->isTiledRendering() ) + nMouseStatus = SC_GM_DBLDOWN; } // Links in Edit-Zellen @@ -2200,9 +2215,8 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) pView->ResetBrushDocument(); // invalidates pBrushDoc pointer } - // double click (only left button) - - bool bDouble = ( rMEvt.GetClicks() == 2 && rMEvt.IsLeft() ); + // In the tiled rendering case, change double click to single click (only left button) + bool bDouble = ( pDoc->GetDrawLayer()->isTiledRendering() && rMEvt.IsLeft() ) || ( rMEvt.GetClicks() == 2 && rMEvt.IsLeft() ); if ( bDouble && !bRefMode && nMouseStatus == SC_GM_DBLDOWN && !pScMod->IsRefDialogOpen() ) { // data pilot table @@ -2751,7 +2765,10 @@ void ScGridWindow::Tracking( const TrackingEvent& rTEvt ) MouseEvent aUpEvt( rMEvt.GetPosPixel(), rMEvt.GetClicks(), rMEvt.GetMode(), nButtonDown, rMEvt.GetModifier() ); - MouseButtonUp( aUpEvt ); + + // In the tiled rendering case, do not spawn fake mouse up + if (!pViewData->GetDocument()->GetDrawLayer()->isTiledRendering()) + MouseButtonUp( aUpEvt ); } else MouseMove( rMEvt ); |