summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeena Francis <deena.francis@gmail.com>2014-08-25 01:38:47 +0530
committerEike Rathke <erack@redhat.com>2014-08-27 06:44:08 -0500
commit3a04813fbf9824ae6cf651bab0c3f55cf36ea8fa (patch)
tree2223f8da41ad0699265a116981c3f5a3ed7b0a49
parent100a21046a95a868f32b90dab48de1cd5781fcd9 (diff)
Resolves fdo#81084 fdo#81696 fdo#80874 fdo#81010 : sort causes crash
Change-Id: I8fb9ec26bc549c264bfbf30177d720b20677b319 Reviewed-on: https://gerrit.libreoffice.org/11102 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit c25ac84688b596b9990d382d550f0514161b78c2) Reviewed-on: https://gerrit.libreoffice.org/11138 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r--sc/source/core/data/table3.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index a719f85eff45..c1a81e6c790b 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -935,9 +935,13 @@ void ScTable::SortReorderByRow(
std::vector<PatternSpan>::iterator it = aSpans.begin(), itEnd = aSpans.end();
for (; it != itEnd; ++it)
+ pDocument->GetPool()->Put(*it->mpPattern);
+
+ for (it = aSpans.begin(); it != itEnd; ++it)
{
assert(it->mpPattern); // should never be NULL.
aCol[nThisCol].SetPatternArea(it->mnRow1, it->mnRow2, *it->mpPattern, true);
+ pDocument->GetPool()->Remove(*it->mpPattern);
}
}