diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-06-29 11:20:40 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2021-07-11 13:41:27 +0200 |
commit | 6c8280e7209a1590a6e5e72fd7d0a99600d0ce7b (patch) | |
tree | 7e58e3463d2204083c64a436360f64620a5e1836 /svx | |
parent | 4f55c5f37a62c2222dd35b17d0959ccf51fb617b (diff) |
Related: tdf#143088 return early on notification from frozen editengine
processing EE_NOTIFY_PROCESSNOTIFICATIONS from an EditEngine with an
UpdateMode mode of false will just to on to cause
AccessibleTextHelper_Impl::GetTextForwarder to throw an exception as a
Frozen EditEngine is considered Invalid so return early instead
Change-Id: I86f9647b7bf839cf3c7cf2f029be8c7c5aeef1f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118071
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/weldeditview.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx index ec606790ac0a..052bd8f4d8f9 100644 --- a/svx/source/dialog/weldeditview.cxx +++ b/svx/source/dialog/weldeditview.cxx @@ -818,6 +818,19 @@ WeldTextForwarder::~WeldTextForwarder() IMPL_LINK(WeldTextForwarder, NotifyHdl, EENotify&, rNotify, void) { + if (EditEngine* pEditEngine = m_rEditAcc.GetEditEngine()) + { + if (rNotify.eNotificationType == EE_NOTIFY_PROCESSNOTIFICATIONS + && !pEditEngine->GetUpdateMode()) + { + // tdf#143088 an UpdateMode of false will just to on to cause + // AccessibleTextHelper_Impl::GetTextForwarder to throw an + // exception as a Frozen EditEngine is considered Invalid so return + // early instead + return; + } + } + ::std::unique_ptr<SfxHint> aHint = SvxEditSourceHelper::EENotification2Hint(&rNotify); if (aHint) m_rEditSource.GetBroadcaster().Broadcast(*aHint); |