diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-07-16 08:43:24 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-07-16 15:22:31 +0200 |
commit | ab9b5639b23ab5db93357bd076b65adea1b6e8b6 (patch) | |
tree | 9bee69648c82e3c1397d7221f74abba0bb106b78 | |
parent | d2b711ecb47e0a0701a1a72896a3148417820a84 (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
-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); } } } |