diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2017-02-19 15:16:56 +0530 |
---|---|---|
committer | Pranav Kant <pranavk@collabora.co.uk> | 2017-02-20 13:39:41 +0530 |
commit | 5556b6e9ad791fc31ef4428ec7dd342c5e0e5482 (patch) | |
tree | 4866264b458ef6ec08380be2ab39460b27611fd5 /sd | |
parent | b46f3cd56fc5bcd419d79d1f615c3e1921ec5bb0 (diff) |
sd lok: use stored per view author name
Change-Id: I8b56a7d6aeb9d98d42cb1c07cd347d1171762b08
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/annotations/annotationmanager.cxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 2c75dff8bf4a..4f895c530ffa 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -26,6 +26,7 @@ #include <com/sun/star/geometry/RealPoint2D.hpp> #include <com/sun/star/text/XText.hpp> #include <com/sun/star/document/XEventBroadcaster.hpp> +#include <comphelper/lok.hxx> #include <comphelper/string.hxx> #include <svx/svxids.hrc> @@ -394,11 +395,18 @@ void AnnotationManagerImpl::InsertAnnotation() Reference< XAnnotation > xAnnotation; pPage->createAnnotation( xAnnotation ); - // set current author to new annotation - SvtUserOptions aUserOptions; - xAnnotation->setAuthor( aUserOptions.GetFullName() ); - xAnnotation->setInitials( aUserOptions.GetID() ); + OUString sAuthor; + if (comphelper::LibreOfficeKit::isActive()) + sAuthor = mrBase.GetMainViewShell()->GetView()->GetAuthor(); + else + { + SvtUserOptions aUserOptions; + sAuthor = aUserOptions.GetFullName(); + xAnnotation->setInitials( aUserOptions.GetID() ); + } + // set current author to new annotation + xAnnotation->setAuthor( sAuthor ); // set current time to new annotation xAnnotation->setDateTime( getCurrentDateTime() ); |