summaryrefslogtreecommitdiff
path: root/xmloff/source/style/xmlnumfe.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-07-09 15:48:10 +0200
committerEike Rathke <erack@redhat.com>2013-07-09 15:52:21 +0200
commit4935422b410757bb4920b98a2d81da3c11b8e3d7 (patch)
tree8c6c5e217e76f77313b864ee1cd6b29b499eadb8 /xmloff/source/style/xmlnumfe.cxx
parentcc7a301dad831f8113cc3d737e2f4d23061a65ac (diff)
read/write ODF *:script* and *:rfc-language-tag*
This prepares to be able to read/write the attributes, it does not enable proper handling of unknown language tags yet. An unknown tag usually falls back to SYSTEM locale. Change-Id: I4a78e8fd37deae188c69570157bc4589a712bc7a
Diffstat (limited to 'xmloff/source/style/xmlnumfe.cxx')
-rw-r--r--xmloff/source/style/xmlnumfe.cxx17
1 files changed, 4 insertions, 13 deletions
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index a71042f9b603..a23e94b42e4d 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -340,19 +340,8 @@ void SvXMLNumFmtExport::AddLanguageAttr_Impl( sal_Int32 nLang )
{
if ( nLang != LANGUAGE_SYSTEM )
{
- /* FIXME-BCP47: handle language tags!
- * ODF now provides fo:script, and rfc-language-tag attribute in case a
- * locale can't be expressed using these three ISO codes.
- * Of course these need to be read in xmlnumfi.cxx then..
- * In general all places using XML_LANGUAGE and XML_COUNTRY need to be
- * adapted once we really support bcp47. */
- OUString aLangStr, aCountryStr;
- LanguageTag( (LanguageType)nLang ).getIsoLanguageCountry( aLangStr, aCountryStr );
-
- if (!aLangStr.isEmpty())
- rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_LANGUAGE, aLangStr );
- if (!aCountryStr.isEmpty())
- rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_COUNTRY, aCountryStr );
+ rExport.AddLanguageTagAttributes( XML_NAMESPACE_NUMBER, XML_NAMESPACE_NUMBER,
+ LanguageTag( (LanguageType)nLang), false);
}
}
@@ -1118,6 +1107,8 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
rFormat.GetNatNumXml( aAttr, nPart );
if ( !aAttr.Format.isEmpty() )
{
+ /* FIXME-BCP47: ODF defines no transliteration-script or
+ * transliteration-rfc-language-tag */
rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_TRANSLITERATION_FORMAT,
aAttr.Format );
rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_TRANSLITERATION_LANGUAGE,