sc/source/core/data/postit.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit eaa2b432abcf31d11256e3dc01712c93367edf32
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon Sep 30 14:58:59 2019 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Oct 1 08:26:20 2019 +0200

    save/restore locking properly in ScPostIt::CreateCaptionFromInitData
    
    noticed in passing
    
    Change-Id: I9d3f28cb413a280c183c0b199684d5a92a2724fb
    Reviewed-on: https://gerrit.libreoffice.org/79858
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 95b8854803dc..b81d17cb6ef0 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -1045,6 +1045,7 @@ void ScPostIt::CreateCaptionFromInitData( const 
ScAddress& rPos ) const
         return;
 
     // Prevent triple change broadcasts of the same object.
+    bool bWasLocked = 
maNoteData.mxCaption->getSdrModelFromSdrObject().isLocked();
     maNoteData.mxCaption->getSdrModelFromSdrObject().setLock(true);
 
     // transfer ownership of outliner object to caption, or set simple text
@@ -1079,7 +1080,7 @@ void ScPostIt::CreateCaptionFromInitData( const 
ScAddress& rPos ) const
     }
 
     // End prevent triple change broadcasts of the same object.
-    maNoteData.mxCaption->getSdrModelFromSdrObject().setLock(false);
+    maNoteData.mxCaption->getSdrModelFromSdrObject().setLock(bWasLocked);
     maNoteData.mxCaption->BroadcastObjectChange();
 }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to