summaryrefslogtreecommitdiff
path: root/sw/source/uibase/app
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-08-18 10:01:32 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-08-19 10:37:54 +0200
commitfd590397606e944e9a2974a2c62759436a5a5b20 (patch)
treed2e692a576bb9a4e535fdcb0448965d6f8e6dd37 /sw/source/uibase/app
parentc57b7875b4f725187faf113da6d563a9ea43164c (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. (cherry picked from commit cb9362faad9fe702031c5e657a31b1963ad4d374) Conflicts: sw/source/uibase/uno/unotxdoc.cxx Change-Id: I363221049dbacd67d7c8f4ff3e778f8032a3bc43
Diffstat (limited to 'sw/source/uibase/app')
-rw-r--r--sw/source/uibase/app/docsh.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index e112b71de0d6..14d8cd8fedc1 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -1101,7 +1101,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;
}