summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/inc/hdrcont.hxx2
-rw-r--r--sc/source/ui/view/hdrcont.cxx10
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;