Kaydet (Commit) 2c5548a6 authored tarafından Eike Rathke's avatar Eike Rathke

write bcp47 to dc:language

Change-Id: Ia62ef327cd07070c2e48f4140c58f3309581b562
üst 9f7eab01
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
*/ */
#include <tools/debug.hxx> #include <tools/debug.hxx>
#include <i18nlangtag/mslangid.hxx> #include <i18nlangtag/languagetag.hxx>
#include <rtl/ustrbuf.hxx> #include <rtl/ustrbuf.hxx>
#include <xmloff/xmlmetae.hxx> #include <xmloff/xmlmetae.hxx>
...@@ -148,14 +148,8 @@ void SvXMLMetaExport::_MExport() ...@@ -148,14 +148,8 @@ void SvXMLMetaExport::_MExport()
// document language // document language
{ {
const lang::Locale aLocale = mxDocProps->getLanguage(); OUString sValue = LanguageTag( mxDocProps->getLanguage()).getBcp47( false);
OUString sValue = aLocale.Language;
if (!sValue.isEmpty()) { if (!sValue.isEmpty()) {
if ( !aLocale.Country.isEmpty() )
{
sValue += OUString::valueOf((sal_Unicode)'-');
sValue += aLocale.Country;
}
SvXMLElementExport aElem( mrExport, XML_NAMESPACE_DC, XML_LANGUAGE, SvXMLElementExport aElem( mrExport, XML_NAMESPACE_DC, XML_LANGUAGE,
sal_True, sal_False ); sal_True, sal_False );
mrExport.Characters( sValue ); mrExport.Characters( sValue );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment