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

(-)sc/source/ui/inc/viewfunc.hxx (+1 lines)
Lines 272-277 Link Here
272
								double fStart, double fStep, double fMax, BOOL bRecord = TRUE );
272
								double fStart, double fStep, double fMax, BOOL bRecord = TRUE );
273
	void			FillAuto( FillDir eDir, SCCOL nStartCol, SCROW nStartRow,
273
	void			FillAuto( FillDir eDir, SCCOL nStartCol, SCROW nStartRow,
274
								SCCOL nEndCol, SCROW nEndRow, ULONG nCount, BOOL bRecord = TRUE );
274
								SCCOL nEndCol, SCROW nEndRow, ULONG nCount, BOOL bRecord = TRUE );
275
	void			FillCrossDblClick();
275
276
276
	void			TransliterateText( sal_Int32 nType );
277
	void			TransliterateText( sal_Int32 nType );
277
278
(-)sc/source/ui/view/gridwin.cxx (-5 / +10 lines)
Lines 1621-1631 Link Here
1621
		return;
1621
		return;
1622
	}
1622
	}
1623
1623
1624
	BOOL bAutoFill = TestMouse( rMEvt, TRUE );
1624
	BOOL bCrossPointer = TestMouse( rMEvt, TRUE );
1625
	if (bAutoFill)
1625
	if ( bCrossPointer )
1626
	{
1627
		if ( bDouble )
1628
			pViewData->GetView()->FillCrossDblClick();
1629
		else
1626
		pScMod->InputEnterHandler();								// Autofill etc.
1630
		pScMod->InputEnterHandler();								// Autofill etc.
1631
	}
1627
1632
1628
	if (!bAutoFill)
1633
	if ( !bCrossPointer )
1629
	{
1634
	{
1630
		nPagebreakMouse = HitPageBreak( rMEvt.GetPosPixel(), &aPagebreakSource,
1635
		nPagebreakMouse = HitPageBreak( rMEvt.GetPosPixel(), &aPagebreakSource,
1631
											&nPagebreakBreak, &nPagebreakPrev );
1636
											&nPagebreakBreak, &nPagebreakPrev );
Lines 1641-1647 Link Here
1641
1646
1642
	if (!bFormulaMode && !bEditMode && rMEvt.IsLeft())
1647
	if (!bFormulaMode && !bEditMode && rMEvt.IsLeft())
1643
	{
1648
	{
1644
		if ( !bAutoFill && DrawMouseButtonDown(rMEvt) )
1649
		if ( !bCrossPointer && DrawMouseButtonDown(rMEvt) )
1645
		{
1650
		{
1646
			//if (DrawHasMarkedObj())
1651
			//if (DrawHasMarkedObj())
1647
			//	pViewData->GetViewShell()->SetDrawShellOrSub();		// Draw-Objekt selektiert
1652
			//	pViewData->GetViewShell()->SetDrawShellOrSub();		// Draw-Objekt selektiert
Lines 1759-1765 Link Here
1759
1764
1760
	if ( nMouseStatus != SC_GM_IGNORE && !bRefMode )
1765
	if ( nMouseStatus != SC_GM_IGNORE && !bRefMode )
1761
	{
1766
	{
1762
		if (bDouble)
1767
		if ( bDouble && !bCrossPointer )
1763
		{
1768
		{
1764
			if (nMouseStatus == SC_GM_TABDOWN)
1769
			if (nMouseStatus == SC_GM_TABDOWN)
1765
				nMouseStatus = SC_GM_DBLDOWN;
1770
				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
	SCTAB nTab = GetViewData()->GetCurPos().Tab();
1066
	SCCOL nStartX = aRange.aStart.Col();
1067
	SCROW nStartY = aRange.aStart.Row();
1068
	SCCOL nEndX   = aRange.aEnd.Col();
1069
	SCROW 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
			SCCOL nMovX = nStartX - 1;
1082
			SCROW 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
			SCCOL nMovX = nEndX + 1;
1101
			SCROW 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