summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-08-29 17:57:05 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-08-29 19:27:14 +0200
commite2c240627c8a1a9cea1f9eedfb064214c8e93a39 (patch)
tree8ed2cea01ecf2a1eee979bb95ebdb3993584a363 /sw/source/uibase/shells
parentfae3b4cc192dbce54f87a6e1c67ab5d824eda947 (diff)
sw: use SwModule::GetRedlineAuthor() in SwTextShell::ExecField()
This avoids some code duplication, and also means that the redline author set by SwDocShell::SetView() affects the inserted Writer comments as well, while those were 'Unknown Author' in the LOK case. Change-Id: Ib51183302ee6904fdf69fb16f27ecfe6df39e6cb
Diffstat (limited to 'sw/source/uibase/shells')
-rw-r--r--sw/source/uibase/shells/textfld.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx
index 04f3ea1dcd93..4279963a607c 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -70,6 +70,7 @@
#include <PostItMgr.hxx>
#include <calbck.hxx>
#include <memory>
+#include <swmodule.hxx>
using namespace nsSwDocInfoSubType;
@@ -381,10 +382,8 @@ void SwTextShell::ExecField(SfxRequest &rReq)
sAuthor = pAuthorItem->GetValue();
else
{
- SvtUserOptions aUserOpt;
- if( (sAuthor = aUserOpt.GetFullName()).isEmpty())
- if( (sAuthor = aUserOpt.GetID()).isEmpty() )
- sAuthor = SW_RES( STR_REDLINE_UNKNOWN_AUTHOR );
+ sal_uInt16 nAuthor = SW_MOD()->GetRedlineAuthor();
+ sAuthor = SW_MOD()->GetRedlineAuthor(nAuthor);
}
const SvxPostItTextItem* pTextItem = rReq.GetArg<SvxPostItTextItem>(SID_ATTR_POSTIT_TEXT);