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

Markus Mohrhard markus.mohrhard at googlemail.com
Sat Mar 12 13:43:28 UTC 2016


 sc/source/core/tool/detfunc.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 67f4b98b9833f0529cf62928b274ba9234853d2f
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sat Mar 12 03:35:39 2016 +0100

    fix memory leak in detective sdr objects
    
    The SdrObject ownership needs to be transferred from the SdrObjList to
    the Undo object. Only SdrUndoDelObj takes ownership of the object
    SdrUndoRemoveObj does not.
    
    Change-Id: I28f9c538eb4e54ec89ada8521f63d2f49d47a1ff
    Reviewed-on: https://gerrit.libreoffice.org/23172
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index ffce77a..7e58c7b 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -689,7 +689,7 @@ void ScDetectiveFunc::DeleteArrowsAt( SCCOL nCol, SCROW nRow, bool bDestPnt )
         }
 
         for (size_t i=1; i<=nDelCount; ++i)
-            pModel->AddCalcUndo( new SdrUndoRemoveObj( *ppObj[nDelCount-i] ) );
+            pModel->AddCalcUndo( new SdrUndoDelObj( *ppObj[nDelCount-i] ) );
 
         for (size_t i=1; i<=nDelCount; ++i)
             pPage->RemoveObject( ppObj[nDelCount-i]->GetOrdNum() );


More information about the Libreoffice-commits mailing list