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

(-)sc/source/ui/inc/viewfunc.hxx (+1 lines)
Lines 274-279 Link Here
274
								double fStart, double fStep, double fMax, BOOL bRecord = TRUE );
274
								double fStart, double fStep, double fMax, BOOL bRecord = TRUE );
275
	void			FillAuto( FillDir eDir, USHORT nStartCol, USHORT nStartRow,
275
	void			FillAuto( FillDir eDir, USHORT nStartCol, USHORT nStartRow,
276
								USHORT nEndCol, USHORT nEndRow, USHORT nCount, BOOL bRecord = TRUE );
276
								USHORT nEndCol, USHORT nEndRow, USHORT nCount, BOOL bRecord = TRUE );
277
	void			FillCrossDblClick();
277
278
278
	void			TransliterateText( sal_Int32 nType );
279
	void			TransliterateText( sal_Int32 nType );
279
280
(-)sc/source/ui/view/gridwin.cxx (-6 / +11 lines)
Lines 1403-1413 Link Here
1403
		return;
1403
		return;
1404
	}
1404
	}
1405
1405
1406
	BOOL bAutoFill = TestMouse( rMEvt, TRUE );
1406
	BOOL bCrossPointer = TestMouse( rMEvt, TRUE );
1407
	if (bAutoFill)
1407
	if ( bCrossPointer )
1408
		pScMod->InputEnterHandler();								// Autofill etc.
1408
	{
1409
		if ( bDouble )
1410
			pViewData->GetView()->FillCrossDblClick();
1411
		else
1412
			pScMod->InputEnterHandler();								// Autofill etc.
1413
	}
1409
1414
1410
	if (!bAutoFill)
1415
	if ( !bCrossPointer )
1411
	{
1416
	{
1412
		nPagebreakMouse = HitPageBreak( rMEvt.GetPosPixel(), &aPagebreakSource,
1417
		nPagebreakMouse = HitPageBreak( rMEvt.GetPosPixel(), &aPagebreakSource,
1413
											&nPagebreakBreak, &nPagebreakPrev );
1418
											&nPagebreakBreak, &nPagebreakPrev );
Lines 1423-1429 Link Here
1423
1428
1424
	if (!bFormulaMode && !bEditMode && rMEvt.IsLeft())
1429
	if (!bFormulaMode && !bEditMode && rMEvt.IsLeft())
1425
	{
1430
	{
1426
		if ( !bAutoFill && DrawMouseButtonDown(rMEvt) )
1431
		if ( !bCrossPointer && DrawMouseButtonDown(rMEvt) )
1427
		{
1432
		{
1428
			//if (DrawHasMarkedObj())
1433
			//if (DrawHasMarkedObj())
1429
			//	pViewData->GetViewShell()->SetDrawShellOrSub();		// Draw-Objekt selektiert
1434
			//	pViewData->GetViewShell()->SetDrawShellOrSub();		// Draw-Objekt selektiert
Lines 1519-1525 Link Here
1519
1524
1520
	if ( nMouseStatus != SC_GM_IGNORE && !bRefMode )
1525
	if ( nMouseStatus != SC_GM_IGNORE && !bRefMode )
1521
	{
1526
	{
1522
		if (bDouble)
1527
		if ( bDouble && !bCrossPointer )
1523
		{
1528
		{
1524
			if (nMouseStatus == SC_GM_TABDOWN)
1529
			if (nMouseStatus == SC_GM_TABDOWN)
1525
				nMouseStatus = SC_GM_DBLDOWN;
1530
				nMouseStatus = SC_GM_DBLDOWN;
(-)sc/source/ui/view/viewfun2.cxx (-1 / +76 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 1043-1048 Link Here
1043
1043
1044
//----------------------------------------------------------------------------
1044
//----------------------------------------------------------------------------
1045
1045
1046
/** Downward fill of selected cell(s) by double-clicking cross-hair cursor
1047
1048
	Extends a current selection down to the last non-empty cell of an adjacent 
1049
	column when the lower-right corner of the selection is double-clicked.  It
1050
	uses a left-adjoining non-empty column as a guide if such is available, 
1051
	otherwise a right-adjoining non-empty column is used.
1052
1053
	@author Kohei Yoshida (kohei@openoffice.org)
1054
1055
	@return No return value
1056
1057
	@see #i12313#
1058
*/
1059
void ScViewFunc::FillCrossDblClick()
1060
{	
1061
	ScRange aRange;
1062
	GetViewData()->GetSimpleArea( aRange );
1063
	aRange.Justify();
1064
	
1065
	USHORT nTab = GetViewData()->GetCurPos().Tab();
1066
	USHORT nStartX = aRange.aStart.Col();
1067
	USHORT nStartY = aRange.aStart.Row();
1068
	USHORT nEndX   = aRange.aEnd.Col();
1069
	USHORT nEndY   = aRange.aEnd.Row();
1070
	
1071
	ScDocument* pDoc = GetViewData()->GetDocument();
1072
	
1073
	// Make sure the selection is not empty
1074
	if ( pDoc->IsBlockEmpty( nTab, nStartX, nStartY, nEndX, nEndY ) )
1075
		return;
1076
	
1077
	if ( nEndY < MAXROW )
1078
	{
1079
		if ( nStartX > 0 )
1080
		{
1081
			USHORT nMovX = nStartX - 1;
1082
			USHORT nMovY = nStartY;
1083
			
1084
			if ( pDoc->HasData( nMovX, nStartY, nTab ) && 
1085
				 pDoc->HasData( nMovX, nStartY + 1, nTab ) )
1086
			{
1087
				pDoc->FindAreaPos( nMovX, nMovY, nTab, 0, 1 );
1088
	
1089
				if ( nMovY > nEndY )
1090
				{
1091
					FillAuto( FILL_TO_BOTTOM, nStartX, nStartY, nEndX, nEndY, 
1092
							  nMovY - nEndY );
1093
					return;
1094
				}
1095
			}
1096
		}
1097
		
1098
		if ( nEndX < MAXCOL )
1099
		{
1100
			USHORT nMovX = nEndX + 1;
1101
			USHORT nMovY = nStartY;
1102
1103
			if ( pDoc->HasData( nMovX, nStartY, nTab ) && 
1104
				 pDoc->HasData( nMovX, nStartY + 1, nTab ) )
1105
			{
1106
				pDoc->FindAreaPos( nMovX, nMovY, nTab, 0, 1 );
1107
	
1108
				if ( nMovY > nEndY )
1109
				{
1110
					FillAuto( FILL_TO_BOTTOM, nStartX, nStartY, nEndX, nEndY, 
1111
							  nMovY - nEndY );
1112
					return;
1113
				}
1114
			}
1115
		}
1116
	}
1117
}
1118
1119
//----------------------------------------------------------------------------
1120
1046
void ScViewFunc::TransliterateText( sal_Int32 nType )
1121
void ScViewFunc::TransliterateText( sal_Int32 nType )
1047
{
1122
{
1048
	ScMarkData aFuncMark = GetViewData()->GetMarkData();
1123
	ScMarkData aFuncMark = GetViewData()->GetMarkData();

Return to issue 12313