sw/source/uibase/utlui/content.cxx | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-)
New commits: commit 44c0d38a06cd5ab765facef3242e2c0e3e7944b4 Author: Mike Kaganski <mike.kagan...@collabora.com> Date: Thu Jul 5 07:32:18 2018 +0200 tdf#43438: SwContentTree: handle ModeChanged notification Change-Id: Iebb53af7fb06ebab6d5cdd1ce514480caec1b17e Reviewed-on: https://gerrit.libreoffice.org/56985 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index c92b39bca0b4..9536891056d7 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -2351,8 +2351,25 @@ void SwContentTree::Notify(SfxBroadcaster & rBC, SfxHint const& rHint) { SfxListener::Notify(rBC, rHint); } - if (SfxHintId::DocChanged == rHint.GetId()) - m_bViewHasChanged = true; + switch (rHint.GetId()) + { + case SfxHintId::DocChanged: + m_bViewHasChanged = true; + break; + case SfxHintId::ModeChanged: + if (SwWrtShell* pShell = GetWrtShell()) + { + const bool bReadOnly = pShell->GetView().GetDocShell()->IsReadOnly(); + if (bReadOnly != m_bIsLastReadOnly) + { + m_bIsLastReadOnly = bReadOnly; + Select(GetCurEntry()); + } + } + break; + default: + break; + } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits