summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-02-09 19:52:43 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-02-10 21:30:44 +0100
commitf8eb28d6b6e306d87e5cec3f1b6f83c841a5f01e (patch)
tree2a61c7d4a0815763a0d2e12d32ae79b1e912a752 /svx
parent6ca2a8d0cf238dc504920095493c777c956cea5e (diff)
tdf#137571 use XActionGuard to lock blocks that don't need updating
so we can avoid constantly generating new TextForwarders which are the same as the one they replace. The underlying problem is that of tdf#123470 but this solution should be safe to backport Change-Id: I742f2a9ce0024adf9bd0acc5bb8edb9372fc0af5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129775 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/unodraw/unoshtxt.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index ae35681d57b5..02c70e3049a9 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -661,8 +661,9 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetTextForwarder()
{
// tdf#123470 if the text edit mode of the shape is active, then we
// cannot trust a previously cached TextForwarder state as the text may
- // be out of date, so force a refetch in that case.
- if (IsEditMode())
+ // be out of date, so force a refetch in that case, unless locked against
+ // changes
+ if (IsEditMode() && mpTextForwarder && !mbIsLocked)
{
assert(!mbForwarderIsEditMode); // because without a view there is no other option except !mbForwarderIsEditMode
bool bTextEditActive = false;