diff options
-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 { |