summaryrefslogtreecommitdiffstats
path: root/xmloff/source/style/xmlnumfe.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/style/xmlnumfe.cxx')
-rw-r--r--xmloff/source/style/xmlnumfe.cxx19
1 files changed, 18 insertions, 1 deletions
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index 99366b9800fc..56a5d168cb64 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -33,6 +33,7 @@
#include <sax/tools/converter.hxx>
#include <com/sun/star/i18n/NativeNumberXmlAttributes.hpp>
+#include <com/sun/star/i18n/NativeNumberXmlAttributes2.hpp>
#include <xmloff/xmlnumfe.hxx>
#include <xmloff/xmlnmspe.hxx>
@@ -1191,7 +1192,8 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
// Native number transliteration
css::i18n::NativeNumberXmlAttributes aAttr;
- rFormat.GetNatNumXml( aAttr, nPart );
+ css::i18n::NativeNumberXmlAttributes2 aAttr2;
+ rFormat.GetNatNumXml( aAttr, aAttr2, nPart );
if ( !aAttr.Format.isEmpty() )
{
/* FIXME-BCP47: ODF defines no transliteration-script or
@@ -1209,6 +1211,21 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
aAttr.Style );
}
+ if ( !aAttr2.Spellout.isEmpty() )
+ {
+ /* FIXME-BCP47: ODF defines no transliteration-script or
+ * transliteration-rfc-language-tag */
+ LanguageTag aLanguageTag( aAttr2.Locale);
+ OUString aLanguage, aScript, aCountry;
+ aLanguageTag.getIsoLanguageScriptCountry( aLanguage, aScript, aCountry);
+ rExport.AddAttribute( XML_NAMESPACE_LO_EXT, XML_TRANSLITERATION_SPELLOUT,
+ aAttr2.Spellout );
+ rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_TRANSLITERATION_LANGUAGE,
+ aLanguage );
+ rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_TRANSLITERATION_COUNTRY,
+ aCountry );
+ }
+
// The element
SvXMLElementExport aElem( rExport, XML_NAMESPACE_NUMBER, eType,
true, true );