summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-08-19 09:58:33 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-08-19 17:02:11 +0200
commit2fa72bab4452a629fe6912d8278c5959cecfb454 (patch)
treeae8a4a7a1d486b74c8a375686174315fe9f3c9a4 /sw/source
parent787c1a5e777f891bc0ffade69560fad09d0e8677 (diff)
tdf#101592 sw: track changes state is doc-specific, not view-specific
So update the bindings of all views after changing it. Reviewed-on: https://gerrit.libreoffice.org/28233 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit d890ec2f130188af9d998abf5968f06e7218b7a4) Conflicts: desktop/qa/desktop_lib/test_desktop_lib.cxx Change-Id: I5355f40ba27be521dcdf343b08305f3736979bbb
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/uibase/uiview/view2.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 69e7dc970050..70dd0b373577 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -604,6 +604,14 @@ void SwView::Execute(SfxRequest &rReq)
? nsRedlineMode_t::REDLINE_ON : 0;
const sal_uInt16 nMode = m_pWrtShell->GetRedlineMode();
m_pWrtShell->SetRedlineModeAndCheckInsMode( (nMode & ~nsRedlineMode_t::REDLINE_ON) | nOn);
+
+ // Notify all view shells of this document, as the track changes mode is document-global.
+ SwDocShell* pDocShell = GetDocShell();
+ for (SfxViewFrame* pViewFrame = SfxViewFrame::GetFirst(pDocShell); pViewFrame; pViewFrame = SfxViewFrame::GetNext(*pViewFrame, pDocShell))
+ {
+ pViewFrame->GetBindings().Invalidate(FN_REDLINE_ON);
+ pViewFrame->GetBindings().Update(FN_REDLINE_ON);
+ }
}
}
break;