[Libreoffice-commits] .: sc/source
Markus Mohrhard
mmohrhard at kemper.freedesktop.org
Mon Jul 16 06:29:14 PDT 2012
sc/source/core/data/table3.cxx | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit ab9b5639b23ab5db93357bd076b65adea1b6e8b6
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Mon Jul 16 08:43:24 2012 +0200
correct but ugly fix for i#118877
This fix is better than the AOO patch and does not require direct ref
count manipulation but still feels dirty.
Change-Id: I1f37bc4c72f668fec229b874cfa1ea5e9ab9153e
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 85354f3..ea49b05 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -60,6 +60,7 @@
#include "queryentry.hxx"
#include "segmenttree.hxx"
#include "subtotalparam.hxx"
+#include "docpool.hxx"
#include <vector>
#include <boost/unordered_set.hpp>
@@ -571,8 +572,10 @@ void ScTable::SwapCol(SCCOL nCol1, SCCOL nCol2)
const ScPatternAttr* pPat2 = GetPattern(nCol2, nRow);
if (pPat1 != pPat2)
{
+ pDocument->GetPool()->Put(*pPat1);
SetPattern(nCol1, nRow, *pPat2, true);
SetPattern(nCol2, nRow, *pPat1, true);
+ pDocument->GetPool()->Remove(*pPat1);
}
}
}
@@ -623,8 +626,10 @@ void ScTable::SwapRow(SCROW nRow1, SCROW nRow2)
const ScPatternAttr* pPat2 = GetPattern(nCol, nRow2);
if (pPat1 != pPat2)
{
+ pDocument->GetPool()->Put(*pPat1);
SetPattern(nCol, nRow1, *pPat2, true);
SetPattern(nCol, nRow2, *pPat1, true);
+ pDocument->GetPool()->Remove(*pPat1);
}
}
}
More information about the Libreoffice-commits
mailing list