Kaydet (Commit) 79dbf611 authored tarafından Eike Rathke's avatar Eike Rathke

do not register LANGUAGE_DONTKNOW

Change-Id: Ibfe4407c1b2740e806c7d9cb75529a8babc3fd92
üst c640f19c
......@@ -676,7 +676,8 @@ LanguageTag::ImplPtr LanguageTag::registerImpl() const
#endif
// Prefer LangID map as find+insert needs less comparison work.
if (mbInitializedLangID)
// Never insert LANGUAGE_DONTKNOW
if (mbInitializedLangID && mnLangID != LANGUAGE_DONTKNOW)
{
MapLangID& rMap = theMapLangID::get();
MapLangID::const_iterator it( rMap.find( mnLangID));
......@@ -753,10 +754,13 @@ LanguageTag::ImplPtr LanguageTag::registerImpl() const
OUString aBcp47;
if (!bInsert)
{
// May have involved canonicalize(), so compare with pImpl->maBcp47!
aBcp47 = LanguageTagImpl::convertToBcp47(
if (pImpl->mnLangID != LANGUAGE_DONTKNOW)
{
// May have involved canonicalize(), so compare with pImpl->maBcp47!
aBcp47 = LanguageTagImpl::convertToBcp47(
MsLangId::Conversion::convertLanguageToLocale( pImpl->mnLangID, true));
bInsert = (aBcp47 == pImpl->maBcp47);
bInsert = (aBcp47 == pImpl->maBcp47);
}
}
// If round-trip is identical cross-insert to Bcp47 map.
if (bInsert)
......
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