summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uno/unotxdoc.cxx
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-18 11:37:59 +0200
commitcb9362faad9fe702031c5e657a31b1963ad4d374 (patch)
treeef878f5c8225d6e89236fe64c64ebc7f6842b8af /sw/source/uibase/uno/unotxdoc.cxx
parent451ad09dcb07487dfd0cec58d315595c46863bc4 (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/uno/unotxdoc.cxx')
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 20a4d1a3c994..121416245fea 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3277,6 +3277,15 @@ void SwXTextDocument::initializeForTiledRendering(const css::uno::Sequence<css::
aViewOption.SetHideWhitespaceMode(rValue.Value.get<bool>());
else if (rValue.Name == ".uno:ShowBorderShadow" && rValue.Value.has<bool>())
SwViewOption::SetAppearanceFlag(ViewOptFlags::Shadow , rValue.Value.get<bool>());
+ else if (rValue.Name == ".uno:Author" && rValue.Value.has<OUString>())
+ {
+ // Store the author name in the view.
+ pView->SetRedlineAuthor(rValue.Value.get<OUString>());
+ // Let the actual author name pick up the value from the current
+ // view, which would normally happen only during the next view
+ // switch.
+ pDocShell->SetView(pView);
+ }
}
pViewShell->ApplyViewOptions(aViewOption);