View | Details | Raw Unified | Return to issue 3875
Collapse All | Expand All

(-)sc/source/ui/inc/viewdata.hxx (-1 / +7 lines)
Lines 54-60 Link Here
54
 *
54
 *
55
 *  All Rights Reserved.
55
 *  All Rights Reserved.
56
 *
56
 *
57
 *  Contributor(s): _______________________________________
57
 *  Contributor(s): Kohei Yoshida__________________________
58
 *
58
 *
59
 *
59
 *
60
 ************************************************************************/
60
 ************************************************************************/
Lines 219-224 Link Here
219
	BYTE				nFillMode;					// Modus
219
	BYTE				nFillMode;					// Modus
220
	BOOL				bPagebreak;					// Seitenumbruch-Vorschaumodus
220
	BOOL				bPagebreak;					// Seitenumbruch-Vorschaumodus
221
221
222
	BOOL				bMod1KeyDown;
223
222
	DECL_LINK (EmptyEditHdl, EditStatus*);
224
	DECL_LINK (EmptyEditHdl, EditStatus*);
223
	DECL_LINK (EditEngineHdl, EditStatus*);
225
	DECL_LINK (EditEngineHdl, EditStatus*);
224
226
Lines 308-313 Link Here
308
310
309
	void			SetZoom( const Fraction& rNewX, const Fraction& rNewY );
311
	void			SetZoom( const Fraction& rNewX, const Fraction& rNewY );
310
312
313
	void			SetMod1KeyStatus( BOOL bDown ) { bMod1KeyDown = bDown; }
314
311
	const Fraction&	GetZoomX() const		{ return bPagebreak ? aPageZoomX : aZoomX; }
315
	const Fraction&	GetZoomX() const		{ return bPagebreak ? aPageZoomX : aZoomX; }
312
	const Fraction&	GetZoomY() const		{ return bPagebreak ? aPageZoomY : aZoomY; }
316
	const Fraction&	GetZoomY() const		{ return bPagebreak ? aPageZoomY : aZoomY; }
313
317
Lines 467-472 Link Here
467
	const Size&		GetScenButSize() const				{ return aScenButSize; }
471
	const Size&		GetScenButSize() const				{ return aScenButSize; }
468
	void			SetScenButSize(const Size& rNew)	{ aScenButSize = rNew; }
472
	void			SetScenButSize(const Size& rNew)	{ aScenButSize = rNew; }
469
473
474
	BOOL			IsMod1KeyDown() { return bMod1KeyDown; }
475
470
	static inline long ToPixel( USHORT nTwips, double nFactor );
476
	static inline long ToPixel( USHORT nTwips, double nFactor );
471
};
477
};
472
478
(-)sc/source/ui/view/cellsh3.cxx (-1 / +7 lines)
Lines 54-60 Link Here
54
 *
54
 *
55
 *  All Rights Reserved.
55
 *  All Rights Reserved.
56
 *
56
 *
57
 *  Contributor(s): _______________________________________
57
 *  Contributor(s): Kohei Yoshida__________________________
58
 *
58
 *
59
 *
59
 *
60
 ************************************************************************/
60
 ************************************************************************/
Lines 204-212 Link Here
204
204
205
		case SID_STATUS_SELMODE_ERG:
205
		case SID_STATUS_SELMODE_ERG:
206
			if ( pTabViewShell->GetLockedModifiers() & KEY_MOD1 )
206
			if ( pTabViewShell->GetLockedModifiers() & KEY_MOD1 )
207
			{
207
				pTabViewShell->LockModifiers( 0 );
208
				pTabViewShell->LockModifiers( 0 );
209
				GetViewData()->SetMod1KeyStatus( FALSE ); // #i3875# *Hack*
210
			}
208
			else
211
			else
212
			{
209
				pTabViewShell->LockModifiers( KEY_MOD1 );
213
				pTabViewShell->LockModifiers( KEY_MOD1 );
214
				GetViewData()->SetMod1KeyStatus( TRUE ); // #i3875# *Hack*
215
			}
210
			rBindings.Invalidate( SID_STATUS_SELMODE );
216
			rBindings.Invalidate( SID_STATUS_SELMODE );
211
			break;
217
			break;
212
218
(-)sc/source/ui/view/select.cxx (-1 / +23 lines)
Lines 54-60 Link Here
54
 *
54
 *
55
 *  All Rights Reserved.
55
 *  All Rights Reserved.
56
 *
56
 *
57
 *  Contributor(s): _______________________________________
57
 *  Contributor(s): Kohei Yoshida__________________________
58
 *
58
 *
59
 *
59
 *
60
 ************************************************************************/
60
 ************************************************************************/
Lines 597-602 Link Here
597
				aAnchorPos.Set( nPosX, nPosY, nTab );
597
				aAnchorPos.Set( nPosX, nPosY, nTab );
598
				bStarted = TRUE;
598
				bStarted = TRUE;
599
			}
599
			}
600
			// #i3875# *Hack* When a new cell is Ctrl-clicked with no pre-selected cells, 
601
			// it highlights that new cell as well as the old cell where the cursor is 
602
			// positioned prior to the click.  A selection mode via Shift-F8 should also 
603
			// follow the same behavior.
604
			else if ( pViewData->IsMod1KeyDown() )
605
			{
606
				SCCOL nOldX = pViewData->GetCurX();
607
				SCROW nOldY = pViewData->GetCurY();
608
				
609
				pView->InitBlockMode( nOldX, nOldY, nTab, TRUE );
610
				pView->MarkCursor( (SCCOL) nOldX, (SCROW) nOldY, nTab );
611
				
612
				if ( nOldX != nPosX || nOldY != nPosY )
613
				{
614
					pView->DoneBlockMode( TRUE );
615
					pView->InitBlockMode( nPosX, nPosY, nTab, TRUE );
616
					pView->MarkCursor( (SCCOL) nPosX, (SCROW) nPosY, nTab );
617
					aAnchorPos.Set( nPosX, nPosY, nTab );
618
				}
619
				
620
				bStarted = TRUE;
621
			}
600
		}
622
		}
601
623
602
		pView->SetCursor( (SCCOL) nPosX, (SCROW) nPosY );
624
		pView->SetCursor( (SCCOL) nPosX, (SCROW) nPosY );
(-)sc/source/ui/view/tabview3.cxx (-1 / +11 lines)
Lines 54-60 Link Here
54
 *
54
 *
55
 *  All Rights Reserved.
55
 *  All Rights Reserved.
56
 *
56
 *
57
 *  Contributor(s): _______________________________________
57
 *  Contributor(s): Kohei Yoshida__________________________
58
 *
58
 *
59
 *
59
 *
60
 ************************************************************************/
60
 ************************************************************************/
Lines 931-942 Link Here
931
BOOL ScTabView::SelMouseButtonDown( const MouseEvent& rMEvt )
931
BOOL ScTabView::SelMouseButtonDown( const MouseEvent& rMEvt )
932
{
932
{
933
	BOOL bRet = FALSE;
933
	BOOL bRet = FALSE;
934
	
935
	// #i3875# *Hack*
936
	BOOL bMod1Locked = aViewData.GetViewShell()->GetLockedModifiers() & KEY_MOD1 ? TRUE : FALSE;
937
	aViewData.SetMod1KeyStatus( rMEvt.IsMod1() || bMod1Locked ); 
938
	
934
	if ( pSelEngine )
939
	if ( pSelEngine )
935
	{
940
	{
936
		bMoveIsShift = rMEvt.IsShift();
941
		bMoveIsShift = rMEvt.IsShift();
937
		bRet = pSelEngine->SelMouseButtonDown( rMEvt );
942
		bRet = pSelEngine->SelMouseButtonDown( rMEvt );
938
		bMoveIsShift = FALSE;
943
		bMoveIsShift = FALSE;
939
	}
944
	}
945
	
946
	// #i3875# *Hack*
947
	if ( !bMod1Locked )
948
		aViewData.SetMod1KeyStatus( FALSE );
949
	
940
	return bRet;
950
	return bRet;
941
}
951
}
942
952
(-)sc/source/ui/view/viewdata.cxx (-3 / +5 lines)
Lines 54-60 Link Here
54
 *
54
 *
55
 *  All Rights Reserved.
55
 *  All Rights Reserved.
56
 *
56
 *
57
 *  Contributor(s): _______________________________________
57
 *  Contributor(s): Kohei Yoshida__________________________
58
 *
58
 *
59
 *
59
 *
60
 ************************************************************************/
60
 ************************************************************************/
Lines 326-332 Link Here
326
		bDelMarkValid( FALSE ),
326
		bDelMarkValid( FALSE ),
327
		bActive		( TRUE ),					//! wie initialisieren?
327
		bActive		( TRUE ),					//! wie initialisieren?
328
		bPagebreak	( FALSE ),
328
		bPagebreak	( FALSE ),
329
		pSpellingView ( NULL )
329
		pSpellingView ( NULL ),
330
		bMod1KeyDown( FALSE )
330
{
331
{
331
332
332
	SetGridMode		( TRUE );
333
	SetGridMode		( TRUE );
Lines 391-397 Link Here
391
		bDelMarkValid( FALSE ),
392
		bDelMarkValid( FALSE ),
392
		bActive		( TRUE ),								//! wie initialisieren?
393
		bActive		( TRUE ),								//! wie initialisieren?
393
		bPagebreak	( rViewData.bPagebreak ),
394
		bPagebreak	( rViewData.bPagebreak ),
394
		pSpellingView ( rViewData.pSpellingView )
395
		pSpellingView ( rViewData.pSpellingView ),
396
		bMod1KeyDown( rViewData.bMod1KeyDown )
395
{
397
{
396
398
397
	SetGridMode		( rViewData.IsGridMode() );
399
	SetGridMode		( rViewData.IsGridMode() );

Return to issue 3875