Kaydet (Commit) 32899820 authored tarafından Herbert Dürr's avatar Herbert Dürr

#i118877# (author=debin.lei@gmail.com) fix Calc crash when Redo refreshes data

üst d6d612e8
...@@ -421,8 +421,12 @@ void ScTable::SwapCol(SCCOL nCol1, SCCOL nCol2) ...@@ -421,8 +421,12 @@ void ScTable::SwapCol(SCCOL nCol1, SCCOL nCol2)
const ScPatternAttr* pPat2 = GetPattern(nCol2, nRow); const ScPatternAttr* pPat2 = GetPattern(nCol2, nRow);
if (pPat1 != pPat2) if (pPat1 != pPat2)
{ {
SetPattern(nCol1, nRow, *pPat2, sal_True); //maybe the content is the same
SetPattern(nCol2, nRow, *pPat1, sal_True); 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 nRow2) ...@@ -439,8 +443,12 @@ void ScTable::SwapRow(SCROW nRow1, SCROW nRow2)
const ScPatternAttr* pPat2 = GetPattern(nCol, nRow2); const ScPatternAttr* pPat2 = GetPattern(nCol, nRow2);
if (pPat1 != pPat2) if (pPat1 != pPat2)
{ {
SetPattern(nCol, nRow1, *pPat2, sal_True); //maybe the content is the same
SetPattern(nCol, nRow2, *pPat1, sal_True); if (!(*pPat1 == *pPat2))
{
SetPattern(nCol, nRow1, *pPat2, sal_True);
SetPattern(nCol, nRow2, *pPat1, sal_True);
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment