Kaydet (Commit) 93f49088 authored tarafından Eike Rathke's avatar Eike Rathke

Introduce LanguageTag::getBcp47MS() for writing MS malformed tags, tdf#83190

Change-Id: I1e2815b9ae60681c7cddc416cc05bf4c70dcc48a
üst 8cca31aa
......@@ -2359,6 +2359,14 @@ LanguageTag & LanguageTag::makeFallback()
}
OUString LanguageTag::getBcp47MS() const
{
if (getLanguageType() == LANGUAGE_SPANISH_DATED)
return "es-ES_tradnl";
return getBcp47();
}
bool LanguageTag::equals( const LanguageTag & rLanguageTag ) const
{
// If SYSTEM is not to be resolved or either both are SYSTEM or none, we
......
......@@ -120,6 +120,14 @@ public:
*/
const OUString & getBcp47( bool bResolveSystem = true ) const;
/** Obtain BCP 47 language tag, but with MS malformed exceptions.
To be used *only* in OOXML filter context.
For example, es-ES-u-co-trad is stored as es-ES_tradnl which is not a
valid BCP 47 language tag.
*/
OUString getBcp47MS() const;
/** Obtain language tag as Locale.
As a convention, language tags that can not be expressed as "pure"
......
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