summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-03-12 12:00:50 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-03-12 18:55:33 +0100
commit1b75ec3a9de7491a16f3ac99b3a418251de16cb5 (patch)
tree44ada498a6a36a49d516f7e891e0d8f21b0eb9e3 /sc
parenta984387f296e2e9d073da1aad1b09f32ad41c0d2 (diff)
don't let two unique_ptr's handle the same ScTokenArray
The max-opencl-group-length ugly hack splits too long cell groups into smaller ones, but 60a66bd57d17a2 accidentally made the temporary group delete the array if the HW triggered this hack. Testcase: 'SC_MAX_GROUP_LENGTH=1000 make CppunitTest_sc_copypaste' Change-Id: I47ab08cd8511ad66e887c3c2d5eef25b08858c60 Reviewed-on: https://gerrit.libreoffice.org/69090 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/formulacell.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index e7b9b2eedd04..782e3d499517 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -4876,7 +4876,7 @@ bool ScFormulaCell::InterpretFormulaGroupOpenCL(sc::FormulaLogger::GroupScope& a
xGroup->mpTopCell->aPos.IncRow(nOffset);
xGroup->mbInvariant = mxGroup->mbInvariant;
xGroup->mnLength = nCurChunkSize;
- xGroup->mpCode.reset( mxGroup->mpCode.get() );
+ xGroup->mpCode = std::move(mxGroup->mpCode); // temporarily transfer
}
ScTokenArray aCode;
@@ -4908,7 +4908,7 @@ bool ScFormulaCell::InterpretFormulaGroupOpenCL(sc::FormulaLogger::GroupScope& a
{
mxGroup->mpTopCell->aPos = aOrigPos;
xGroup->mpTopCell = nullptr;
- xGroup->mpCode.release();
+ mxGroup->mpCode = std::move(xGroup->mpCode);
}
aScope.addMessage("group token conversion failed");
@@ -4932,7 +4932,7 @@ bool ScFormulaCell::InterpretFormulaGroupOpenCL(sc::FormulaLogger::GroupScope& a
{
mxGroup->mpTopCell->aPos = aOrigPos;
xGroup->mpTopCell = nullptr;
- xGroup->mpCode = nullptr;
+ mxGroup->mpCode = std::move(xGroup->mpCode);
}
aScope.addMessage("group interpretation unsuccessful");
@@ -4944,7 +4944,7 @@ bool ScFormulaCell::InterpretFormulaGroupOpenCL(sc::FormulaLogger::GroupScope& a
if (nNumParts > 1)
{
xGroup->mpTopCell = nullptr;
- xGroup->mpCode = nullptr;
+ mxGroup->mpCode = std::move(xGroup->mpCode);
}
}