[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - xmloff/source
Eike Rathke
erack at redhat.com
Mon Dec 16 00:48:24 PST 2013
xmloff/source/text/txtflde.cxx | 38 +++++++++++++++++++++++++++-----------
1 file changed, 27 insertions(+), 11 deletions(-)
New commits:
commit c062276a068a14df530fa21e9099a489a26b2096
Author: Eike Rathke <erack at redhat.com>
Date: Fri Dec 13 23:30:34 2013 +0100
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 at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index 0ad8fcb..6855a3b 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);
More information about the Libreoffice-commits
mailing list