From 9751b4b4fa00cf5175ccc0f9c52a22b07f73d4aa Mon Sep 17 00:00:00 2001 From: Scott Clarke Date: Tue, 13 Aug 2019 09:54:12 +0100 Subject: Change some handling for resolved comments Changed the way the lcl_CommentNotification method is called when a comment is resolved such that resolution is distinct from other changes. Resolved flag is now only stored in the top annotation of a thread when saved as ODT. Change-Id: I5ef36718fd7e1dfcc16c077871653a70476e8804 Reviewed-on: https://gerrit.libreoffice.org/77411 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt --- xmloff/source/text/txtflde.cxx | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'xmloff/source') diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index ee5d935576bc..ca796c95cc58 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -1759,18 +1759,20 @@ void XMLTextFieldExport::ExportFieldHelper( OUString aName; rPropSet->getPropertyValue(gsPropertyName) >>= aName; if (!aName.isEmpty()) - GetExport().AddAttribute(XML_NAMESPACE_OFFICE, XML_NAME, aName); - SvtSaveOptions::ODFSaneDefaultVersion eVersion = rExport.getSaneDefaultVersion(); - if(eVersion > SvtSaveOptions::ODFSVER_012) { - bool b = GetBoolProperty("Resolved", rPropSet); - OUString aResolvedText; - OUStringBuffer aResolvedTextBuffer; - ::sax::Converter::convertBool(aResolvedTextBuffer, b); - aResolvedText = aResolvedTextBuffer.makeStringAndClear(); - - GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_RESOLVED, - aResolvedText); + GetExport().AddAttribute(XML_NAMESPACE_OFFICE, XML_NAME, aName); + SvtSaveOptions::ODFSaneDefaultVersion eVersion = rExport.getSaneDefaultVersion(); + if(eVersion > SvtSaveOptions::ODFSVER_012) + { + bool b = GetBoolProperty("Resolved", rPropSet); + OUString aResolvedText; + OUStringBuffer aResolvedTextBuffer; + ::sax::Converter::convertBool(aResolvedTextBuffer, b); + aResolvedText = aResolvedTextBuffer.makeStringAndClear(); + + GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_RESOLVED, + aResolvedText); + } } SvXMLElementExport aElem(GetExport(), XML_NAMESPACE_OFFICE, XML_ANNOTATION, false, true); -- cgit