diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-08-18 10:01:32 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-08-18 11:37:59 +0200 |
commit | cb9362faad9fe702031c5e657a31b1963ad4d374 (patch) | |
tree | ef878f5c8225d6e89236fe64c64ebc7f6842b8af /sw/source/uibase/app | |
parent | 451ad09dcb07487dfd0cec58d315595c46863bc4 (diff) |
sw redlining: support per-view authors
In case there are multiple SwView instances and SetRedlineAuthor() is
called with a non-empty string on them, switching views will keep the
SwModule redline author string up to date as expected.
Change-Id: I363221049dbacd67d7c8f4ff3e778f8032a3bc43
Diffstat (limited to 'sw/source/uibase/app')
-rw-r--r-- | sw/source/uibase/app/docsh.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 06708852497c..03ea367f5c7c 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -1107,7 +1107,14 @@ void SwDocShell::SetView(SwView* pVw) SetViewShell_Impl(pVw); m_pView = pVw; if (m_pView) + { m_pWrtShell = &m_pView->GetWrtShell(); + + // Set view-specific redline author. + const OUString& rRedlineAuthor = m_pView->GetRedlineAuthor(); + if (!rRedlineAuthor.isEmpty()) + SW_MOD()->SetRedlineAuthor(m_pView->GetRedlineAuthor()); + } else m_pWrtShell = nullptr; } |