diff options
author | Dennis Francis <dennisfrancis.in@gmail.com> | 2015-12-20 07:33:46 +0530 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-01-06 13:57:07 +0000 |
commit | 33455023a9c1e33591d97116ac2e400362f87fbb (patch) | |
tree | ada45e2df3c4c4dea05aa6b2e5d00135e5852d72 | |
parent | 6a5349f1a284a360b91b65414d09406281248185 (diff) |
Fix tdf#96523 : Correct the behavior when Ctrl key is pressed
Also changed the bool member bDoneInitRef to bInRefMode which
better indicate what it does.
Change-Id: I1698202add7876b89c95f737d4b5ad2243af31ab
Reviewed-on: https://gerrit.libreoffice.org/20836
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r-- | sc/source/ui/inc/hdrcont.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/hdrcont.cxx | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/ui/inc/hdrcont.hxx b/sc/source/ui/inc/hdrcont.hxx index fe519f56bfc8..d2bcbe7f7fbe 100644 --- a/sc/source/ui/inc/hdrcont.hxx +++ b/sc/source/ui/inc/hdrcont.hxx @@ -59,7 +59,7 @@ private: bool bIgnoreMove; - bool bDoneInitRef; + bool bInRefMode; long GetScrPos( SCCOLROW nEntryNo ) const; SCCOLROW GetMousePos( const MouseEvent& rMEvt, bool& rBorder ) const; diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx index 34b7c1ff3f9d..f37f4755d9c0 100644 --- a/sc/source/ui/view/hdrcont.cxx +++ b/sc/source/ui/view/hdrcont.cxx @@ -61,7 +61,7 @@ ScHeaderControl::ScHeaderControl( vcl::Window* pParent, SelectionEngine* pSelect nDragPos ( 0 ), bDragMoved ( false ), bIgnoreMove ( false ), - bDoneInitRef( false ), + bInRefMode ( false ), pTabView ( pTab ) { // --- RTL --- no default mirroring for this window, the spreadsheet itself @@ -666,8 +666,7 @@ void ScHeaderControl::MouseButtonDown( const MouseEvent& rMEvt ) return; SCTAB nTab = pTabView->GetViewData().GetTabNo(); if( !rMEvt.IsShift() ) - pTabView->DoneRefMode(); - bDoneInitRef = true; + pTabView->DoneRefMode( rMEvt.IsMod1() ); if( !bVertical ) { pTabView->InitRefMode( nHitNo, 0, nTab, SC_REFTYPE_REF ); @@ -678,6 +677,7 @@ void ScHeaderControl::MouseButtonDown( const MouseEvent& rMEvt ) pTabView->InitRefMode( 0, nHitNo, nTab, SC_REFTYPE_REF ); pTabView->UpdateRef( MAXCOL, nHitNo, nTab ); } + bInRefMode = true; return; } if ( bIsBorder && ResizeAllowed() ) @@ -741,7 +741,7 @@ void ScHeaderControl::MouseButtonUp( const MouseEvent& rMEvt ) if ( SC_MOD()->IsFormulaMode() ) { SC_MOD()->EndReference(); - bDoneInitRef = false; + bInRefMode = false; return; } @@ -798,7 +798,7 @@ void ScHeaderControl::MouseMove( const MouseEvent& rMEvt ) return; } - if ( bDoneInitRef && rMEvt.IsLeft() && SC_MOD()->IsFormulaMode() ) + if ( bInRefMode && rMEvt.IsLeft() && SC_MOD()->IsFormulaMode() ) { if( !pTabView ) return; |