summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-02-09 19:52:43 +0000
committerAndras Timar <andras.timar@collabora.com>2022-02-14 11:00:10 +0100
commitdc8b215455cd0c02cc6b088e126abd2b45f82b41 (patch)
tree1644dc5891d02d2d57360931b9c7b1248739287f /svx
parent70b02b4cbdc424a4abe55f7f175ce6b3ce029862 (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/+/129762 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.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 cfb01211c129..8ccf0e8e47b8 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;