summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-07-12 11:22:35 +0200
committerEike Rathke <erack@redhat.com>2013-07-12 12:32:34 +0200
commit2c5548a6fb0886f32cf20609638d171c43a6d1af (patch)
treeb5d902db35e6667735a11fb2b3687816974c5721
parent9f7eab01a65c39b07afb1fba8819593694a3fef3 (diff)
write bcp47 to dc:language
Change-Id: Ia62ef327cd07070c2e48f4140c58f3309581b562
-rw-r--r--xmloff/source/meta/xmlmetae.cxx10
1 files changed, 2 insertions, 8 deletions
diff --git a/xmloff/source/meta/xmlmetae.cxx b/xmloff/source/meta/xmlmetae.cxx
index cae4ee1e3426..efe634c8b5dd 100644
--- a/xmloff/source/meta/xmlmetae.cxx
+++ b/xmloff/source/meta/xmlmetae.cxx
@@ -18,7 +18,7 @@
*/
#include <tools/debug.hxx>
-#include <i18nlangtag/mslangid.hxx>
+#include <i18nlangtag/languagetag.hxx>
#include <rtl/ustrbuf.hxx>
#include <xmloff/xmlmetae.hxx>
@@ -148,14 +148,8 @@ void SvXMLMetaExport::_MExport()
// document language
{
- const lang::Locale aLocale = mxDocProps->getLanguage();
- OUString sValue = aLocale.Language;
+ OUString sValue = LanguageTag( mxDocProps->getLanguage()).getBcp47( false);
if (!sValue.isEmpty()) {
- if ( !aLocale.Country.isEmpty() )
- {
- sValue += OUString::valueOf((sal_Unicode)'-');
- sValue += aLocale.Country;
- }
SvXMLElementExport aElem( mrExport, XML_NAMESPACE_DC, XML_LANGUAGE,
sal_True, sal_False );
mrExport.Characters( sValue );