[ooo-build-commit] Branch 'ooo-build-3-1-1' - patches/dev300

Kohei Yoshida kohei at kemper.freedesktop.org
Wed Sep 23 21:07:24 PDT 2009


 patches/dev300/apply                         |    8 
 patches/dev300/sc-copy-on-merged-cells.diff  |   69 -----
 patches/dev300/sc-insert-inmerged-range.diff |  337 ---------------------------
 3 files changed, 414 deletions(-)

New commits:
commit 6417456af9623d4e6bcef1904bdd0fb1c312018d
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Thu Sep 24 00:02:51 2009 -0400

    Removed obsolete patches.  They are fixed upstream for 3.2.
    
    * patches/dev300/apply:
    * patches/dev300/sc-copy-on-merged-cells.diff: removed as it causes
      a crash as described in n#540923.  This unfortunately means the
      functionality that this patch provides will be unavailable for 3.1.1,
      but a better fix is in 3.2 upstream.
    
    * patches/dev300/sc-insert-inmerged-range.diff: removed, was not really
      used.  A better fix is in 3.2 upstream.

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 0fa2952..105c3a3 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -773,14 +773,6 @@ sc-print-selected-sheets.diff, n#335684, i#45497, jonp
 # Allow biffdump.cxx to compile on 64-bit platforms
 sc-biffdump.diff, i#82184, jonp
 
-# Allow to copy-paste on merged cells.
-sc-copy-on-merged-cells.diff, i#7500, mloiseleur
-
-# Allow insertion of cell range that cuts across merged areas.
-# (temporarily disabled as it causes memory exhaustion problem on
-# column insert in empty document).
-#sc-insert-inmerged-range.diff, i#8302, mloiseleur
-
 # Allow objects to stay within cells as expected when rows are resized.
 sc-object-row-position.diff, i#47088, jonp
 
diff --git a/patches/dev300/sc-copy-on-merged-cells.diff b/patches/dev300/sc-copy-on-merged-cells.diff
deleted file mode 100644
index 905b825..0000000
--- a/patches/dev300/sc-copy-on-merged-cells.diff
+++ /dev/null
@@ -1,69 +0,0 @@
---- sc/source/ui/view/viewfun3.cxx.orig	2007-10-27 11:24:05.000000000 +0200
-+++ sc/source/ui/view/viewfun3.cxx	2007-10-27 15:59:19.000000000 +0200
-@@ -982,17 +982,32 @@
- 		return FALSE;
- 	}
- 
--		//! Test auf Ueberlappung
--		//! nur wirkliche Schnittmenge testen !!!!!!!
--
--	//	pDoc->HasCommonAttr( StartCol,nStartRow, nUndoEndCol,nUndoEndRow, nStartTab,
--	//							pClipDoc, nClipStartX, nClipStartY );
-+	ScDocFunc& rDocFunc = pDocSh->GetDocFunc(); 
-+	if ( bRecord )
-+	{
-+		String aUndo = ScGlobal::GetRscString( pClipDoc->IsCutMode() ? STR_UNDO_MOVE : STR_UNDO_COPY );
-+		pUndoMgr->EnterListAction( aUndo, aUndo );
-+	}
- 
- 	if (bClipOver)
-         if (lcl_SelHasAttrib( pDoc, nStartCol,nStartRow, nUndoEndCol,nUndoEndRow, aFilteredMark, HASATTR_OVERLAPPED ))
--        {        // "Cell merge not possible if cells already merged"
--			ErrorMessage(STR_MSSG_PASTEFROMCLIP_1);
--			return FALSE;
-+        {       // "Cell merge are possible if we unmerge cells before insertion"
-+			ScRange destRange( nStartCol, nStartRow, nStartTab, nUndoEndCol, nUndoEndRow, nEndTab );
-+		    rDocFunc.UnmergeCells(destRange, bRecord, TRUE);
-+			for (SCCOL i = nStartCol; i <= nUndoEndCol; i++)
-+				for (SCROW j = nStartRow; j <= nUndoEndRow; j++) 
-+					{
-+						ScRange rrRange (i, j, nEndTab);
-+						pDoc->ExtendOverlapped(rrRange);
-+						pDoc->ExtendMerge(rrRange);
-+						// we can have merged range in the selection, 
-+						// so we take only those which are in the way
-+						if (rrRange.aStart.Col() < nStartCol || rrRange.aEnd.Col() > nEndCol || 
-+							rrRange.aStart.Row() < nStartRow || rrRange.aEnd.Row() > nEndRow) 
-+						{
-+							rDocFunc.UnmergeCells(rrRange, bRecord, TRUE);
-+						}
-+					}
- 		}
- 
- 	if ( !bCutMode )
-@@ -1085,7 +1099,7 @@
- 
- 	// skipped rows and merged cells don't mix
- 	if ( !bIncludeFiltered && pClipDoc->HasClipFilteredRows() )
--		pDocSh->GetDocFunc().UnmergeCells( aUserRange, FALSE, TRUE );
-+		rDocFunc.UnmergeCells( aUserRange, FALSE, TRUE );
- 
-     pDoc->ExtendMergeSel( nStartCol, nStartRow, nEndCol, nEndRow, aFilteredMark, TRUE );    // Refresh
- 																					// und Bereich neu
-@@ -1183,6 +1197,8 @@
- 		}
- 		else
- 			pUndoMgr->AddUndoAction( pUndo );
-+
-+		pUndoMgr->LeaveListAction();
- 	}
- 
- 	USHORT nPaint = PAINT_GRID;
-@@ -1360,7 +1376,6 @@
-         const BOOL bRecord( pDoc->IsUndoEnabled());
-         ScDocument* pUndoDoc = NULL;
-         ScDocument* pRedoDoc = NULL;
--        ScDocument* pRefUndoDoc = NULL;
-         ScRefUndoData* pUndoData = NULL;
-         SCTAB nTab = GetViewData()->GetTabNo();
-         SCTAB nStartTab = nTab;
diff --git a/patches/dev300/sc-insert-inmerged-range.diff b/patches/dev300/sc-insert-inmerged-range.diff
deleted file mode 100644
index 8b117ff..0000000
--- a/patches/dev300/sc-insert-inmerged-range.diff
+++ /dev/null
@@ -1,337 +0,0 @@
-? sc/sc.vpj
-Index: sc/inc/attarray.hxx
-===================================================================
-RCS file: /cvs/sc/sc/inc/attarray.hxx,v
-retrieving revision 1.8
-diff -u -r1.8 attarray.hxx
---- sc/inc/attarray.hxx	8 Sep 2005 17:22:53 -0000	1.8
-+++ sc/inc/attarray.hxx	16 Oct 2007 00:43:54 -0000
-@@ -186,8 +186,6 @@
- 							SCROW nStartRow, SCROW nEndRow ) const;
- 	BOOL	IsAllEqual( const ScAttrArray& rOther, SCROW nStartRow, SCROW nEndRow ) const;
- 
--	BOOL	TestInsertCol( SCROW nStartRow, SCROW nEndRow) const;
--	BOOL	TestInsertRow( SCSIZE nSize ) const;
- 	void	InsertRow( SCROW nStartRow, SCSIZE nSize );
- 	void	DeleteRow( SCROW nStartRow, SCSIZE nSize );
- 	void	DeleteRange( SCSIZE nStartIndex, SCSIZE nEndIndex );
-Index: sc/inc/column.hxx
-===================================================================
-RCS file: /cvs/sc/sc/inc/column.hxx,v
-retrieving revision 1.18
-diff -u -r1.18 column.hxx
---- sc/inc/column.hxx	25 Jan 2007 11:02:48 -0000	1.18
-+++ sc/inc/column.hxx	16 Oct 2007 00:43:54 -0000
-@@ -209,8 +209,6 @@
- 									SCROW nEndRow = MAXROW ) const;
- 	BOOL		IsAllAttrEqual( const ScColumn& rCol, SCROW nStartRow, SCROW nEndRow ) const;
- 
--	BOOL		TestInsertCol( SCROW nStartRow, SCROW nEndRow) const;
--	BOOL		TestInsertRow( SCSIZE nSize ) const;
- 	void		InsertRow( SCROW nStartRow, SCSIZE nSize );
- 	void		DeleteRow( SCROW nStartRow, SCSIZE nSize );
- 	void		DeleteRange( SCSIZE nStartIndex, SCSIZE nEndIndex, USHORT nDelFlag );
-Index: sc/source/core/data/attarray.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/core/data/attarray.cxx,v
-retrieving revision 1.23
-diff -u -r1.23 attarray.cxx
---- sc/source/core/data/attarray.cxx	27 Feb 2007 11:59:23 -0000	1.23
-+++ sc/source/core/data/attarray.cxx	16 Oct 2007 00:43:55 -0000
-@@ -2016,57 +2016,6 @@
- 	return bEqual;
- }
- 
--
--BOOL ScAttrArray::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const
--{
--	//	horizontal zusammengefasste duerfen nicht herausgeschoben werden
--	//	(ob die ganze Zusammenfassung betroffen ist, ist hier nicht zu erkennen)
--
--	BOOL bTest = TRUE;
--	if (!IsEmpty())
--	{
--		SCSIZE nIndex = 0;
--		if ( nStartRow > 0 )
--			Search( nStartRow, nIndex );
--
--		for ( ; nIndex < nCount; nIndex++ )
--		{
--			if ( ((const ScMergeFlagAttr&)pData[nIndex].pPattern->
--						GetItem(ATTR_MERGE_FLAG)).IsHorOverlapped() )
--			{
--				bTest = FALSE;						// darf nicht herausgeschoben werden
--				break;
--			}
--			if ( pData[nIndex].nRow >= nEndRow )	// Ende des Bereichs
--				break;
--		}
--	}
--	return bTest;
--}
--
--
--BOOL ScAttrArray::TestInsertRow( SCSIZE nSize ) const
--{
--	//	wenn die erste herausgeschobene Zeile vertikal ueberlappt ist,
--	//	wuerde eine kaputte Zusammenfassung uebrigbleiben
--
--	if (pData)
--	{
--		//	MAXROW + 1 - nSize	= erste herausgeschobene Zeile
--
--		SCSIZE nFirstLost = nCount-1;
--        while ( nFirstLost && pData[nFirstLost-1].nRow >= sal::static_int_cast<SCROW>(MAXROW + 1 - nSize) )
--			--nFirstLost;
--
--		if ( ((const ScMergeFlagAttr&)pData[nFirstLost].pPattern->
--							GetItem(ATTR_MERGE_FLAG)).IsVerOverlapped() )
--			return FALSE;
--	}
--
--	return TRUE;
--}
--
--
- void ScAttrArray::InsertRow( SCROW nStartRow, SCSIZE nSize )
- {
- 	if (!pData)
-Index: sc/source/core/data/column.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/core/data/column.cxx,v
-retrieving revision 1.23
-diff -u -r1.23 column.cxx
---- sc/source/core/data/column.cxx	6 Sep 2007 14:17:53 -0000	1.23
-+++ sc/source/core/data/column.cxx	16 Oct 2007 00:43:55 -0000
-@@ -1218,59 +1218,6 @@
- 	}
- }
- 
--
--BOOL ScColumn::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const
--{
--	if (!IsEmpty())
--	{
--		BOOL bTest = TRUE;
--		if (pItems)
--			for (SCSIZE i=0; (i<nCount) && bTest; i++)
--				bTest = ((pItems[i].nRow < nStartRow) && (pItems[i].nRow > nEndRow))
--						|| !CellVisible(pItems[i].pCell);
--
--		//	AttrArray testet nur zusammengefasste
--
--		if ((bTest) && (pAttrArray))
--			bTest = pAttrArray->TestInsertCol(nStartRow, nEndRow);
--
--		//!		rausgeschobene Attribute bei Undo beruecksichtigen
--
--		return bTest;
--	}
--	else
--		return TRUE;
--}
--
--
--BOOL ScColumn::TestInsertRow( SCSIZE nSize ) const
--{
--    //  AttrArray only looks for merged cells
--
--	if ( pItems && nCount )
--        return ( nSize <= sal::static_int_cast<SCSIZE>(MAXROW) &&
--                 pItems[nCount-1].nRow <= MAXROW-(SCROW)nSize && pAttrArray->TestInsertRow( nSize ) );
--	else
--		return pAttrArray->TestInsertRow( nSize );
--
--#if 0
--	//!		rausgeschobene Attribute bei Undo beruecksichtigen
--
--	if ( nSize > static_cast<SCSIZE>(MAXROW) )
--		return FALSE;
--
--	SCSIZE nVis = nCount;
--	while ( nVis && !CellVisible(pItems[nVis-1].pCell) )
--		--nVis;
--
--	if ( nVis )
--		return ( pItems[nVis-1].nRow <= MAXROW-nSize );
--	else
--		return TRUE;
--#endif
--}
--
--
- void ScColumn::InsertRow( SCROW nStartRow, SCSIZE nSize )
- {
- 	pAttrArray->InsertRow( nStartRow, nSize );
-Index: sc/source/core/data/table2.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/core/data/table2.cxx,v
-retrieving revision 1.37
-diff -u -r1.37 table2.cxx
---- sc/source/core/data/table2.cxx	27 Feb 2007 12:09:28 -0000	1.37
-+++ sc/source/core/data/table2.cxx	16 Oct 2007 00:43:56 -0000
-@@ -118,9 +118,6 @@
- 	if ( nStartCol==0 && nEndCol==MAXCOL && pOutlineTable )
- 		bTest = pOutlineTable->TestInsertRow(nSize);
- 
--	for (SCCOL i=nStartCol; (i<=nEndCol) && bTest; i++)
--		bTest = aCol[i].TestInsertRow( nSize );
--
- 	return bTest;
- }
- 
-@@ -184,9 +181,6 @@
- 	if ( nSize > static_cast<SCSIZE>(MAXCOL) )
- 		bTest = FALSE;
- 
--	for (SCCOL i=MAXCOL; (i+static_cast<SCCOL>(nSize)>MAXCOL) && bTest; i--)
--		bTest = aCol[i].TestInsertCol(nStartRow, nEndRow);
--
- 	return bTest;
- }
- 
-Index: sc/source/ui/docshell/docfunc.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/docshell/docfunc.cxx,v
-retrieving revision 1.66
-diff -u -r1.66 docfunc.cxx
---- sc/source/ui/docshell/docfunc.cxx	27 Jun 2007 12:45:25 -0000	1.66
-+++ sc/source/ui/docshell/docfunc.cxx	16 Oct 2007 00:43:56 -0000
-@@ -59,6 +59,7 @@
- #endif
- 
- #include <list>
-+#include <queue>
- 
- #include "docfunc.hxx"
- 
-@@ -1271,7 +1272,6 @@
- 	if (eCmd==INS_CELLSRIGHT)
- 		nMergeTestEndX = MAXCOL;
- 
--	BOOL bCanDo = TRUE;
- 	BOOL bNeedRefresh = FALSE;
- 
- 	SCCOL nEditTestEndX = (eCmd==INS_INSCOLS) ? MAXCOL : nMergeTestEndX;
-@@ -1284,44 +1284,6 @@
- 		return FALSE;
- 	}
- 
--	if (pDoc->HasAttrib( nMergeTestStartX,nMergeTestStartY,nTab,
--							nMergeTestEndX,nMergeTestEndY,nTab,
--							HASATTR_MERGED | HASATTR_OVERLAPPED ))
--	{
--		if (eCmd==INS_CELLSRIGHT)
--			bNeedRefresh = TRUE;
--
--		SCCOL nMergeStartX = nMergeTestStartX;
--		SCROW nMergeStartY = nMergeTestStartY;
--		SCCOL nMergeEndX   = nMergeTestEndX;
--		SCROW nMergeEndY   = nMergeTestEndY;
--
--		pDoc->ExtendMerge( nMergeStartX, nMergeStartY, nMergeEndX, nMergeEndY, nTab );
--		pDoc->ExtendOverlapped( nMergeStartX, nMergeStartY, nMergeEndX, nMergeEndY, nTab );
--		if ( nMergeStartX != nMergeTestStartX || nMergeStartY != nMergeTestStartY ||
--			 nMergeEndX   != nMergeTestEndX   || nMergeEndY   != nMergeTestEndY )
--			bCanDo = FALSE;
--
--		//!		? nur Start testen ?
--
--		if (!bCanDo)
--			if ( eCmd==INS_INSCOLS || eCmd==INS_INSROWS )
--				if ( nMergeStartX == nMergeTestStartX && nMergeStartY == nMergeTestStartY )
--				{
--					bCanDo = TRUE;
--//					bNeedRefresh = TRUE;
--				}
--	}
--
--	if (!bCanDo)
--	{
--		//!			auf Verschieben (Drag&Drop) zurueckfuehren !!!
--		//	"Kann nicht in zusammengefasste Bereiche einfuegen"
--		if (!bApi)
--			rDocShell.ErrorMessage(STR_MSSG_INSERTCELLS_0);
--		return FALSE;
--	}
--
- 	//
- 	//		ausfuehren
- 	//
-@@ -1342,6 +1304,30 @@
- 		pDoc->BeginDrawUndo();
- 	}
- 
-+    // #i8302 : we unmerge overwhelming ranges, before insertion
-+    // all the actions are put in the same ListAction
-+    String aUndo = ScGlobal::GetRscString( STR_UNDO_RESIZEMATRIX );
-+    if (bRecord)
-+      rDocShell.GetUndoManager()->EnterListAction( aUndo, aUndo );
-+
-+    std::queue<ScRange> qRange;
-+    for (SCCOL i = nStartCol; i <= nEndCol; i++)
-+        for (SCCOL j = nStartRow; j <= nEndRow; j++) 
-+        {
-+            ScRange rrRange (i, j, nTab);
-+            pDoc->ExtendOverlapped(rrRange);
-+            pDoc->ExtendMerge(rrRange);
-+            // we can have merged range in the selection, 
-+            // so we take only those which are in the way
-+            if (rrRange.aStart.Col() < nStartCol || rrRange.aEnd.Col() > nEndCol || 
-+                rrRange.aStart.Row() < nStartRow || rrRange.aEnd.Row() > nEndRow) 
-+            {
-+                qRange.push(rrRange);
-+                UnmergeCells(rrRange, TRUE, TRUE);
-+            }
-+        }
-+
-+
- 	switch (eCmd)
- 	{
- 		case INS_CELLSDOWN:
-@@ -1370,6 +1356,7 @@
- 			nPaintEndX = MAXCOL;
- 			nPaintFlags |= PAINT_TOP;
- 			break;
-+		case INS_NONE:
- 		default:
- 			DBG_ERROR("Falscher Code beim Einfuegen");
- 			bSuccess = FALSE;
-@@ -1378,6 +1365,28 @@
- 
- 	if ( bSuccess )
- 	{
-+        // #i8302 : we remerge overwhelming ranges, with the new part inserted
-+        while( !qRange.empty() ) 
-+        {
-+            ScRange rrRange = qRange.front();
-+            switch (eCmd)
-+            {
-+                case INS_CELLSDOWN:
-+                case INS_INSROWS:
-+                    rrRange.aEnd.IncRow(static_cast<SCsCOL>(nEndRow-nStartRow+1));
-+                    break;
-+                case INS_CELLSRIGHT:
-+                case INS_INSCOLS:
-+                    rrRange.aEnd.IncCol(static_cast<SCsCOL>(nEndCol-nStartCol+1));
-+                    break;
-+                case INS_NONE:
-+                default:
-+                    break;
-+            }
-+            MergeCells(rrRange, FALSE, TRUE, TRUE, FALSE);
-+            qRange.pop();
-+        }
-+
- 		if ( bRecord )
- 		{
- 			rDocShell.GetUndoManager()->AddUndoAction(
-@@ -1416,6 +1425,8 @@
- 								 nPaintEndX,   nPaintEndY,   nEndTab,
- 								 nPaintFlags,  nExtFlags);
- 		aModificator.SetDocumentModified();
-+        if (bRecord)
-+            rDocShell.GetUndoManager()->LeaveListAction();
- 
- //!		pDocSh->UpdateOle(GetViewData());	// muss an der View bleiben
- //!		CellContentChanged();				// muss an der View bleiben


More information about the ooo-build-commit mailing list