diff options
author | Eike Rathke <erack@redhat.com> | 2013-07-10 14:18:24 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-07-10 14:20:03 +0200 |
commit | 8a4307e4bb0eab3dd0a2a82c1fd4b2eab5df9a2e (patch) | |
tree | a5f6433262a7ac6af4a91527531e50c79f228dc4 /xmloff | |
parent | adab0134662562298ff13e7fe564623af4bc33da (diff) |
do not write attributes with 'none' for non-ISO language/country
Change-Id: I774a4a8a283828d81fdab93e33fb3b2aa0cf680b
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/style/chrlohdl.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xmloff/source/style/chrlohdl.cxx b/xmloff/source/style/chrlohdl.cxx index 9fd0cfe6625b..4a0ee091c680 100644 --- a/xmloff/source/style/chrlohdl.cxx +++ b/xmloff/source/style/chrlohdl.cxx @@ -117,6 +117,11 @@ sal_Bool XMLCharLanguageHdl::exportXML( OUString& rStrExpValue, const uno::Any& LanguageTag aLanguageTag( aLocale); OUString aCountry; aLanguageTag.getIsoLanguageCountry( rStrExpValue, aCountry); + // Do not write *:language='none' for a non-ISO language with + // *:rfc-language-tag that is written if Variant is not empty. If there + // is no match do not write this attribute at all. + if (rStrExpValue.isEmpty()) + return sal_False; } if( rStrExpValue.isEmpty() ) @@ -298,6 +303,11 @@ sal_Bool XMLCharCountryHdl::exportXML( OUString& rStrExpValue, const uno::Any& r LanguageTag aLanguageTag( aLocale); OUString aLanguage; aLanguageTag.getIsoLanguageCountry( aLanguage, rStrExpValue); + // Do not write *:country='none' for a non-ISO country with + // *:rfc-language-tag that is written if Variant is not empty. If there + // is no match do not write this attribute at all. + if (rStrExpValue.isEmpty()) + return sal_False; } if( rStrExpValue.isEmpty() ) |