diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-07-16 08:43:24 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2012-07-18 00:33:47 +0200 |
commit | 92dd63864142ad4d124d43accc111489fe6cda12 (patch) | |
tree | c0b6509c7808c0c25d7112eb7e3b9f3a3169d896 | |
parent | 733d07a79a46a551e1eba443a81f3cc851d4cb25 (diff) |
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
(cherry picked from commit ab9b5639b23ab5db93357bd076b65adea1b6e8b6)
Signed-off-by: Eike Rathke <erack@redhat.com>
-rw-r--r-- | sc/source/core/data/table3.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 85354f3bb27d..ea49b058d947 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); } } } |