summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-09-30 14:58:59 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-01 08:26:20 +0200
commiteaa2b432abcf31d11256e3dc01712c93367edf32 (patch)
tree1dd08fb403bbc133b6665d7115cec642ced8739c /sc
parenta1573b2e2fda77b7b7d605fe36f5a28f86a3e91b (diff)
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.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/postit.cxx3
1 files changed, 2 insertions, 1 deletions
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();
}