From 29b9df16dfbf17bbe9c46cd268849e6bfa97c84d Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 5 Feb 2016 10:44:12 +0000 Subject: [API CHANGE] add Author Initials to XAnnotation and use the users preferred initials for impress annotations i.e. the ones entered in the tools->options and save and load those to/from odf similarly to what we do for writer annotation initials Change-Id: Iadc0e994bfaf58632ce25b8f7cdc737580ee97bc Reviewed-on: https://gerrit.libreoffice.org/22143 Reviewed-by: Michael Stahl Tested-by: Michael Stahl --- xmloff/source/draw/ximppage.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'xmloff/source/draw/ximppage.cxx') diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx index 891276165390..15758d6ec517 100644 --- a/xmloff/source/draw/ximppage.cxx +++ b/xmloff/source/draw/ximppage.cxx @@ -67,6 +67,7 @@ private: Reference< XTextCursor > mxCursor; OUStringBuffer maAuthorBuffer; + OUStringBuffer maInitialsBuffer; OUStringBuffer maDateBuffer; }; @@ -141,6 +142,11 @@ SvXMLImportContext * DrawAnnotationContext::CreateChildContext( sal_uInt16 nPref else if( IsXMLToken( rLocalName, XML_DATE ) ) pContext = new XMLStringBufferImportContext(GetImport(), nPrefix, rLocalName, maDateBuffer); } + else if( (XML_NAMESPACE_TEXT == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix) && + IsXMLToken(rLocalName, XML_SENDER_INITIALS) ) + { + pContext = new XMLStringBufferImportContext(GetImport(), nPrefix, rLocalName, maInitialsBuffer); + } else { // create text cursor on demand @@ -188,6 +194,7 @@ void DrawAnnotationContext::EndElement() if( mxAnnotation.is() ) { mxAnnotation->setAuthor( maAuthorBuffer.makeStringAndClear() ); + mxAnnotation->setInitials( maInitialsBuffer.makeStringAndClear() ); util::DateTime aDateTime; if (::sax::Converter::parseDateTime(aDateTime, nullptr, -- cgit