ooo-build r12560 - in trunk: . patches/dev300



Author: kyoshida
Date: Fri May 16 15:27:55 2008
New Revision: 12560
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12560&view=rev

Log:
2008-05-16  Yun Jingtao  <yunjingtao redflag2000 cn>

	* patches/dev300/sc-sort-cell-note-position.diff: Move the position of
	cell notes along with their anchored cells when the cells are sorted.
	Previously, the cell note objects were stuck in their original position
	even when their anchored cells were sorted (i#59745).

	* patches/dev300/apply: apply the new patch.


Added:
   trunk/patches/dev300/sc-sort-cell-note-position.diff
Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Fri May 16 15:27:55 2008
@@ -1626,6 +1626,8 @@
 # sheets can be distinguished.
 svtools-adjust-sheet-tabcolor.diff, n#386029, kohei
 
+# Move cell notes along with the anchored cells when cells are sorted.
+sc-sort-cell-note-position.diff, i#59745, kohei
 
 #[ OOXSTLport5 ]
 #

Added: trunk/patches/dev300/sc-sort-cell-note-position.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/sc-sort-cell-note-position.diff	Fri May 16 15:27:55 2008
@@ -0,0 +1,83 @@
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj --exclude='*.orig' sc.clean/source/core/data/column.cxx sc/source/core/data/column.cxx
+--- sc.clean/source/core/data/column.cxx	2008-05-13 16:55:14.000000000 -0400
++++ sc/source/core/data/column.cxx	2008-05-13 19:47:53.000000000 -0400
+@@ -909,10 +909,45 @@ void ScColumn::SwapRow(SCROW nRow1, SCRO
+ 		else
+ 			pBC2 = NULL;
+ 
++        ScPostIt aCellNote1(pDocument);
++        ScPostIt aCellNote2(pDocument);  
++
+ 		if ( pCell1 && pCell2 )
+ 		{
+ 			pItems[nIndex1].pCell = pCell2;
+ 			pItems[nIndex2].pCell = pCell1;
++            
++            if(pCell1 && pCell1->GetNote(aCellNote1))
++            {
++                const Rectangle Rectangle1 = aCellNote1.GetRectangle();
++                Size aSizeEdit1 = Rectangle1.GetSize();
++                
++                Rectangle aRectEdit1 = aCellNote1.DefaultRectangle(ScAddress(nCol,nRow2,nTab));
++                long nCoordX1 = aRectEdit1.getX();
++                long nCoordY1 = aRectEdit1.getY();              
++                Rectangle aNewRect1(Point(nCoordX1, nCoordY1),aSizeEdit1);              
++                aCellNote1.SetRectangle(aNewRect1);
++
++                pCell1->SetNote(aCellNote1);
++                
++            }
++
++            if(pCell2 && pCell2->GetNote( aCellNote2 ))
++            {
++                const Rectangle Rectangle2 = aCellNote2.GetRectangle();
++                Size aSizeEdit2 = Rectangle2.GetSize();
++
++                Rectangle aRectEdit2 = aCellNote2.DefaultRectangle(ScAddress(nCol,nRow1,nTab));
++                long nCoordX2 = aRectEdit2.getX();
++                long nCoordY2 = aRectEdit2.getY();
++
++                Rectangle aNewRect2(Point(nCoordX2, nCoordY2),aSizeEdit2);
++                aCellNote2.SetRectangle(aNewRect2);
++
++                pCell2->SetNote(aCellNote2);
++
++            }           
++            
+ 			if ( pBC1 )
+ 				pCell2->SetBroadcaster( pBC1 );
+ 			if ( pBC2 )
+@@ -966,19 +1001,20 @@ void ScColumn::SwapRow(SCROW nRow1, SCRO
+ 		}
+ 		ScPostIt aCellNote(pDocument);
+ 		// Hide the visible note if doing a swap.
+-		if(pCell1 && pCell1->GetNote(aCellNote) && aCellNote.IsShown())
+-		{
+-		    ScDetectiveFunc( pDocument, nTab ).HideComment( nCol, nRow1 );
+-		    aCellNote.SetShown(FALSE);
+-		    pCell1->SetNote(aCellNote);
+-		}
+-		if(pCell2 && pCell2->GetNote(aCellNote) && aCellNote.IsShown())
+-		{
+-		    ScDetectiveFunc( pDocument, nTab ).HideComment( nCol, nRow2 );
+-		    aCellNote.SetShown(FALSE);
+-		    pCell2->SetNote(aCellNote);
+-		}
+-
++        if(pCell1 && pCell2->GetNote(aCellNote) && aCellNote.IsShown())
++        {
++            ScDetectiveFunc( pDocument, nTab ).HideComment( nCol, nRow2 );
++            ScDetectiveFunc( pDocument, nTab ).ShowComment( nCol, nRow1, FALSE );
++            aCellNote.SetShown(TRUE);
++            pCell2->SetNote(aCellNote);
++        }
++        if(pCell2 && pCell1->GetNote(aCellNote) && aCellNote.IsShown())
++        {
++            ScDetectiveFunc( pDocument, nTab ).HideComment( nCol, nRow1 );
++            ScDetectiveFunc( pDocument, nTab ).ShowComment( nCol, nRow2, FALSE );
++            aCellNote.SetShown(TRUE);
++            pCell1->SetNote(aCellNote);
++        }
+ 		return ;
+ 	}
+ 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]