sc/source/core/data/formulacell.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit 1b75ec3a9de7491a16f3ac99b3a418251de16cb5 Author: Luboš Luňák <l.lu...@collabora.com> AuthorDate: Tue Mar 12 12:00:50 2019 +0100 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Mar 12 18:55:33 2019 +0100 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 <vmik...@collabora.com> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> 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); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits