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

Tomaž Vajngerl (via logerrit) logerrit at kemper.freedesktop.org
Fri Oct 2 14:06:37 UTC 2020


 svx/source/table/tablecontroller.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit e31474d71235bccee8568c4a952a8319bddf39e0
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Fri Oct 2 12:02:42 2020 +0200
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Fri Oct 2 16:05:56 2020 +0200

    rearrange to not use pUndoObject after std::move
    
    pGeoUndo is always nullptr in this case because of std::move, so
    the SetSkipChangeLayout is never set.
    
    Issue since: https://gerrit.libreoffice.org/c/core/+/78201
    
    Change-Id: I4f1dcb3a25adeb0737e03aa9e9dfb193969250b6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103827
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
    Tested-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index b28522619bc6..f61ea7605567 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -1534,11 +1534,12 @@ void SvxTableController::changeTableEdge(const SfxRequest& rReq)
     {
         auto pUndoObject = rModel.GetSdrUndoFactory().CreateUndoGeoObject(rTableObj);
         rModel.BegUndo(pUndoObject->GetComment());
-        rModel.AddUndo(std::move(pUndoObject));
 
         auto* pGeoUndo = static_cast<SdrUndoGeoObj*>(pUndoObject.get());
         if (pGeoUndo)
             pGeoUndo->SetSkipChangeLayout(true);
+
+        rModel.AddUndo(std::move(pUndoObject));
     }
     tools::Rectangle aBoundRect;
     if (rTableObj.GetUserCall())


More information about the Libreoffice-commits mailing list