From 2c5548a6fb0886f32cf20609638d171c43a6d1af Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Fri, 12 Jul 2013 11:22:35 +0200 Subject: write bcp47 to dc:language Change-Id: Ia62ef327cd07070c2e48f4140c58f3309581b562 --- xmloff/source/meta/xmlmetae.cxx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'xmloff') 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 -#include +#include #include #include @@ -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 ); -- cgit