[Libreoffice-commits] core.git: sd/source

Pranav Kant pranavk at collabora.co.uk
Mon Feb 20 15:25:43 UTC 2017


 sd/source/ui/annotations/annotationmanager.cxx |   13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

New commits:
commit 7cc5aca1901ca7d67dffdcfc29537f32c31e0235
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Mon Feb 20 15:12:40 2017 +0530

    sd lok: use per view author in annotations reply too
    
    Change-Id: Ibc727b54ebfcbdd1c95b679a35ddc8878ceecbfd

diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index 5b7b324..8d8c883 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -597,10 +597,17 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( SfxRequest& rReq )
         std::unique_ptr< OutlinerParaObject > pOPO( pOutliner->CreateParaObject() );
         pTextApi->SetText( *pOPO.get() );
 
-        SvtUserOptions aUserOptions;
-        xAnnotation->setAuthor( aUserOptions.GetFullName() );
-        xAnnotation->setInitials( aUserOptions.GetID() );
+        OUString sReplyAuthor;
+        if (comphelper::LibreOfficeKit::isActive())
+            sReplyAuthor = mrBase.GetMainViewShell()->GetView()->GetAuthor();
+        else
+        {
+            SvtUserOptions aUserOptions;
+            sReplyAuthor = aUserOptions.GetFullName();
+            xAnnotation->setInitials( aUserOptions.GetID() );
+        }
 
+        xAnnotation->setAuthor( sReplyAuthor );
         // set current time to reply
         xAnnotation->setDateTime( getCurrentDateTime() );
 


More information about the Libreoffice-commits mailing list