sc/source/ui/inc/hdrcont.hxx | 2 +- sc/source/ui/view/hdrcont.cxx | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-)
New commits: commit 33455023a9c1e33591d97116ac2e400362f87fbb Author: Dennis Francis <dennisfrancis...@gmail.com> Date: Sun Dec 20 07:33:46 2015 +0530 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 <er...@redhat.com> Tested-by: Eike Rathke <er...@redhat.com> diff --git a/sc/source/ui/inc/hdrcont.hxx b/sc/source/ui/inc/hdrcont.hxx index fe519f5..d2bcbe7 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 34b7c1f..f37f475 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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits