diff options
author | Eike Rathke <erack@redhat.com> | 2013-12-13 23:30:34 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-12-13 23:31:17 +0100 |
commit | 49f9694e34d07468cff4a7e4de332f11be3e0dd8 (patch) | |
tree | 269bccc43115c257e307966276f180bca915f759 /xmloff | |
parent | b4a4e51641273c6bd3dd271389e9dd31f7dacac0 (diff) |
fdo#72697 actually write this only in ODF 1.2 extended
Change-Id: I32097cc4b8a67615b0b6d6172cafd0edad7469b6
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/text/txtflde.cxx | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index 63f5cc9bd6c3..6f476c47e593 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -1752,14 +1752,17 @@ void XMLTextFieldExport::ExportFieldHelper( GetExport().Characters(aBuffer.makeStringAndClear()); } - // initials - OUString aInitials( GetStringProperty(sPropertyInitials, rPropSet) ); - if( !aInitials.isEmpty() ) + if (SvtSaveOptions().GetODFDefaultVersion() > SvtSaveOptions::ODFVER_012) { - SvXMLElementExport aCreatorElem( GetExport(), XML_NAMESPACE_LO_EXT, - XML_SENDER_INITIALS, sal_True, - sal_False ); - GetExport().Characters(aInitials); + // initials + OUString aInitials( GetStringProperty(sPropertyInitials, rPropSet) ); + if( !aInitials.isEmpty() ) + { + SvXMLElementExport aCreatorElem( GetExport(), XML_NAMESPACE_LO_EXT, + XML_SENDER_INITIALS, sal_True, + sal_False ); + GetExport().Characters(aInitials); + } } com::sun::star::uno::Reference < com::sun::star::text::XText > xText; @@ -2228,10 +2231,13 @@ void XMLTextFieldExport::ExportElement(enum XMLTokenEnum eElementName, // Element if (eElementName == XML_SENDER_INITIALS) { - SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_LO_EXT, - eElementName, bAddSpace, bAddSpace ); - // export content - GetExport().Characters(sContent); + if (SvtSaveOptions().GetODFDefaultVersion() > SvtSaveOptions::ODFVER_012) + { + SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_LO_EXT, + eElementName, bAddSpace, bAddSpace ); + // export content + GetExport().Characters(sContent); + } } else { |