incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@apache.org
Subject svn commit: r1338635 - /incubator/ooo/trunk/main/sc/source/core/data/table3.cxx
Date Tue, 15 May 2012 10:42:14 GMT
Author: hdu
Date: Tue May 15 10:42:14 2012
New Revision: 1338635

URL: http://svn.apache.org/viewvc?rev=1338635&view=rev
Log:
#i118877# (author=debin.lei@gmail.com) fix Calc crash when Redo refreshes data

Modified:
    incubator/ooo/trunk/main/sc/source/core/data/table3.cxx

Modified: incubator/ooo/trunk/main/sc/source/core/data/table3.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sc/source/core/data/table3.cxx?rev=1338635&r1=1338634&r2=1338635&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sc/source/core/data/table3.cxx (original)
+++ incubator/ooo/trunk/main/sc/source/core/data/table3.cxx Tue May 15 10:42:14 2012
@@ -421,8 +421,12 @@ void ScTable::SwapCol(SCCOL nCol1, SCCOL
 			const ScPatternAttr* pPat2 = GetPattern(nCol2, nRow);
 			if (pPat1 != pPat2)
 			{
-				SetPattern(nCol1, nRow, *pPat2, sal_True);
-				SetPattern(nCol2, nRow, *pPat1, sal_True);
+				//maybe the content is the same
+				if (!(*pPat1 == *pPat2))
+				{
+					SetPattern(nCol1, nRow, *pPat2, sal_True);
+					SetPattern(nCol2, nRow, *pPat1, sal_True);
+				}
 			}
 		}
 	}
@@ -439,8 +443,12 @@ void ScTable::SwapRow(SCROW nRow1, SCROW
 			const ScPatternAttr* pPat2 = GetPattern(nCol, nRow2);
 			if (pPat1 != pPat2)
 			{
-				SetPattern(nCol, nRow1, *pPat2, sal_True);
-				SetPattern(nCol, nRow2, *pPat1, sal_True);
+				//maybe the content is the same
+				if (!(*pPat1 == *pPat2))
+				{
+					SetPattern(nCol, nRow1, *pPat2, sal_True);
+					SetPattern(nCol, nRow2, *pPat1, sal_True);
+				}
 			}
 		}
 	}



Mime
View raw message