[Libreoffice-commits] core.git: sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Mar 12 17:56:00 UTC 2019


 sc/source/core/data/formulacell.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 1b75ec3a9de7491a16f3ac99b3a418251de16cb5
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Tue Mar 12 12:00:50 2019 +0100
Commit:     Noel Grandin <noel.grandin at 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 <vmiklos at collabora.com>
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at 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);
         }
     }
 


More information about the Libreoffice-commits mailing list