[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sw/source

Caolán McNamara caolanm at redhat.com
Wed Mar 21 20:44:15 UTC 2018


 sw/source/core/frmedt/feshview.cxx |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit deb5db7bf6d45338c9b6f6f4a1d62fba168b7a85
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Mar 21 14:08:49 2018 +0000

    Resolves: tdf#116429 unwanted extra step in undo insert shape
    
    Change-Id: I23065275baa60a09f2a3c15513e3f2b8160e2bf0
    Reviewed-on: https://gerrit.libreoffice.org/51706
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 655d7340536ed2847d1da873b141d8776f791d12)
    Reviewed-on: https://gerrit.libreoffice.org/51711

diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 8f6e3ef357b9..69b41e9a3c98 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -2005,6 +2005,14 @@ bool SwFEShell::ImpEndCreate()
     }
     else
     {
+        if (rSdrObj.GetName().isEmpty())
+        {
+            bool bRestore = GetDoc()->GetIDocumentUndoRedo().DoesDrawUndo();
+            GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(false);
+            rSdrObj.SetName(GetUniqueShapeName());
+            GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(bRestore);
+        }
+
         Point aRelNullPt;
         if( OBJ_CAPTION == nIdent )
             aRelNullPt = static_cast<SdrCaptionObj&>(rSdrObj).GetTailPos();
@@ -2060,9 +2068,6 @@ bool SwFEShell::ImpEndCreate()
             pAnch = pTmp;
         }
 
-        if (rSdrObj.GetName().isEmpty())
-            rSdrObj.SetName(GetUniqueShapeName());
-
         pContact->ConnectToLayout();
 
         // mark object at frame the object is inserted at.


More information about the Libreoffice-commits mailing list