diff options
author | Eike Rathke <erack@redhat.com> | 2013-07-04 19:51:35 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-07-04 20:32:59 +0200 |
commit | 78f053dd87c350524cce281e6dfcee5ed00811a2 (patch) | |
tree | 11ce65159be682a2094dd7b59ae6813cc21e7cf1 /oox/source | |
parent | 6dfe34d6ff30bede5a17e27e02cdc0ca54c11325 (diff) |
use LanguageTag and write bcp47 for ST_Lang
Change-Id: I6e8ad53f769939fd7f7539514ca20374e5fd9248
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/export/drawingml.cxx | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 6b4f80ea7aad..0232d07d1397 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -771,17 +771,11 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, sal_Bool bIs } if( GETA( CharLocale ) ) { - com::sun::star::lang::Locale eLocale; - mAny >>= eLocale; - - OUStringBuffer usLanguageBuffer = eLocale.Language; - if( !eLocale.Country.isEmpty() ) { - usLanguageBuffer.appendAscii( "-" ); - usLanguageBuffer.append( eLocale.Country ); - } - - if( !usLanguageBuffer.isEmpty() ) - usLanguage = usLanguageBuffer.makeStringAndClear(); + com::sun::star::lang::Locale aLocale; + mAny >>= aLocale; + LanguageTag aLanguageTag( aLocale); + if (!aLanguageTag.isSystemLocale()) + usLanguage = aLanguageTag.getBcp47(); } mpFS->startElementNS( XML_a, XML_rPr, |