summaryrefslogtreecommitdiff
path: root/xmloff/source/text
diff options
context:
space:
mode:
authorScott Clarke <scott.clarke@codethink.co.uk>2019-06-07 15:28:42 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2019-07-25 10:38:36 +0200
commitd2025bdc33cc8d9e2f6c9f90da4574275ed6b0e4 (patch)
tree7200817278ff1902071ba1e8d52147d240cfc02e /xmloff/source/text
parent38583daef69bc39de15ff41d2f149b34116d825c (diff)
tdf#119228 Add storage and serialisation for the Resolved flag
Change-Id: I0278588dc533378104e544d05b60583c85271f6a Co-authored-by: Jim MacArthur <jim.macarthur@codethink.co.uk> Reviewed-on: https://gerrit.libreoffice.org/75858 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'xmloff/source/text')
-rw-r--r--xmloff/source/text/txtflde.cxx12
-rw-r--r--xmloff/source/text/txtfldi.cxx7
-rw-r--r--xmloff/source/text/txtimp.cxx1
3 files changed, 20 insertions, 0 deletions
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index dd71ec72d3ba..ee5d935576bc 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -1760,6 +1760,18 @@ void XMLTextFieldExport::ExportFieldHelper(
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);
+ }
SvXMLElementExport aElem(GetExport(), XML_NAMESPACE_OFFICE,
XML_ANNOTATION, false, true);
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 7bba48a20444..80be0124235d 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -3306,6 +3306,8 @@ void XMLAnnotationImportContext::ProcessAttribute(
{
if (nToken == XML_TOK_TEXT_NAME)
aName = rValue;
+ if (nToken == XML_TOK_TEXT_RESOLVED)
+ aResolved = rValue;
}
SvXMLImportContextRef XMLAnnotationImportContext::CreateChildContext(
@@ -3468,6 +3470,11 @@ void XMLAnnotationImportContext::PrepareField(
OUString sInitials( aInitialsBuffer.makeStringAndClear() );
xPropertySet->setPropertyValue("Initials", makeAny(sInitials));
+ //import resolved flag
+ bool bTmp(false);
+ ::sax::Converter::convertBool(bTmp, aResolved);
+ xPropertySet->setPropertyValue("Resolved", makeAny(bTmp));
+
util::DateTime aDateTime;
if (::sax::Converter::parseDateTime(aDateTime,
aDateBuffer.makeStringAndClear()))
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 9f57ac3ac08a..3fbe2eaab4ff 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -491,6 +491,7 @@ static const SvXMLTokenMapEntry aTextFieldAttrTokenMap[] =
XML_TOK_TEXTFIELD_REFERENCE_LANGUAGE },
{ XML_NAMESPACE_TEXT, XML_REFERENCE_LANGUAGE,
XML_TOK_TEXTFIELD_REFERENCE_LANGUAGE },
+ { XML_NAMESPACE_LO_EXT, XML_RESOLVED, XML_TOK_TEXT_RESOLVED },
XML_TOKEN_MAP_END
};