summaryrefslogtreecommitdiff
path: root/xmloff/source/text
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-12-13 23:30:34 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-12-16 08:48:02 +0000
commitc062276a068a14df530fa21e9099a489a26b2096 (patch)
treeb228d4e89d63781c7624a944d593e202a78a3ad2 /xmloff/source/text
parentc8a237e87e909bb9fc8105fcad01317901f08c45 (diff)
fdo#72697 actually write this only in ODF 1.2 extended
(cherry picked from commit 49f9694e34d07468cff4a7e4de332f11be3e0dd8) Conflicts: xmloff/source/text/txtflde.cxx Change-Id: I32097cc4b8a67615b0b6d6172cafd0edad7469b6 (cherry picked from commit 4031765b004dded31f04c54f9a055b7a3d0053f2) Reviewed-on: https://gerrit.libreoffice.org/7078 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'xmloff/source/text')
-rw-r--r--xmloff/source/text/txtflde.cxx38
1 files changed, 27 insertions, 11 deletions
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index 0ad8fcb58306..6855a3b0fb46 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_TEXT,
- XML_SENDER_INITIALS, sal_True,
- sal_False );
- GetExport().Characters(aInitials);
+ // initials
+ OUString aInitials( GetStringProperty(sPropertyInitials, rPropSet) );
+ if( !aInitials.isEmpty() )
+ {
+ SvXMLElementExport aCreatorElem( GetExport(), XML_NAMESPACE_TEXT,
+ XML_SENDER_INITIALS, sal_True,
+ sal_False );
+ GetExport().Characters(aInitials);
+ }
}
com::sun::star::uno::Reference < com::sun::star::text::XText > xText;
@@ -2226,10 +2229,23 @@ void XMLTextFieldExport::ExportElement(enum XMLTokenEnum eElementName,
if (eElementName != XML_TOKEN_INVALID)
{
// Element
- SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT,
- eElementName, bAddSpace, bAddSpace );
- // export content
- GetExport().Characters(sContent);
+ if (eElementName == XML_SENDER_INITIALS)
+ {
+ if (SvtSaveOptions().GetODFDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ {
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT,
+ eElementName, bAddSpace, bAddSpace );
+ // export content
+ GetExport().Characters(sContent);
+ }
+ }
+ else
+ {
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT,
+ eElementName, bAddSpace, bAddSpace );
+ // export content
+ GetExport().Characters(sContent);
+ }
} else {
// always export content
GetExport().Characters(sContent);