Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
3acc0cc1
Kaydet (Commit)
3acc0cc1
authored
Eyl 21, 2013
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
moved LANGUAGE_DONTKNOW impl detection up
Change-Id: Iba2c7f03420a709c5ee6338c1504b1133a8cb643
üst
745f5945
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
23 deletions
+27
-23
languagetag.cxx
i18nlangtag/source/languagetag/languagetag.cxx
+27
-23
No files found.
i18nlangtag/source/languagetag/languagetag.cxx
Dosyayı görüntüle @
3acc0cc1
...
...
@@ -698,17 +698,37 @@ LanguageTag::ImplPtr LanguageTag::registerImpl() const
if
(
mbInitializedLangID
)
{
// A great share are calls for a system equal locale.
pImpl
=
theSystemLocale
::
get
();
if
(
pImpl
&&
pImpl
->
mnLangID
==
mnLangID
)
if
(
mnLangID
==
LANGUAGE_DONTKNOW
)
{
// Heavy usage of LANGUAGE_DONTKNOW, make it an own Impl for all the
// conversion attempts. At the same time provide a central breakpoint
// to inspect such places.
LanguageTag
::
ImplPtr
&
rDontKnow
=
theDontKnow
::
get
();
if
(
!
rDontKnow
)
rDontKnow
.
reset
(
new
LanguageTagImpl
(
*
this
));
pImpl
=
rDontKnow
;
#if OSL_DEBUG_LEVEL > 0
static
size_t
nCalls
SystemEqual
=
0
;
++
nCalls
SystemEqual
;
SAL_INFO
(
"i18nlangtag"
,
"LanguageTag::registerImpl: "
<<
nCalls
SystemEqual
<<
" system equal LangID
calls"
);
static
size_t
nCalls
DontKnow
=
0
;
++
nCalls
DontKnow
;
SAL_INFO
(
"i18nlangtag"
,
"LanguageTag::registerImpl: "
<<
nCalls
DontKnow
<<
" DontKnow
calls"
);
#endif
return
pImpl
;
}
else
{
// A great share are calls for a system equal locale.
pImpl
=
theSystemLocale
::
get
();
if
(
pImpl
&&
pImpl
->
mnLangID
==
mnLangID
)
{
#if OSL_DEBUG_LEVEL > 0
static
size_t
nCallsSystemEqual
=
0
;
++
nCallsSystemEqual
;
SAL_INFO
(
"i18nlangtag"
,
"LanguageTag::registerImpl: "
<<
nCallsSystemEqual
<<
" system equal LangID calls"
);
#endif
return
pImpl
;
}
}
}
// Force Bcp47 if not LangID.
...
...
@@ -752,8 +772,7 @@ LanguageTag::ImplPtr LanguageTag::registerImpl() const
#endif
// Prefer LangID map as find+insert needs less comparison work.
// Never insert LANGUAGE_DONTKNOW
if
(
mbInitializedLangID
&&
mnLangID
!=
LANGUAGE_DONTKNOW
)
if
(
mbInitializedLangID
)
{
MapLangID
&
rMap
=
theMapLangID
::
get
();
MapLangID
::
const_iterator
it
(
rMap
.
find
(
mnLangID
));
...
...
@@ -863,21 +882,6 @@ LanguageTag::ImplPtr LanguageTag::registerImpl() const
}
}
}
else
if
(
mbInitializedLangID
&&
mnLangID
==
LANGUAGE_DONTKNOW
)
{
// Heavy usage of LANGUAGE_DONTKNOW, make it an own Impl for all the
// conversion attempts. At the same time provide a central breakpoint
// to inspect such places.
LanguageTag
::
ImplPtr
&
rDontKnow
=
theDontKnow
::
get
();
if
(
!
rDontKnow
)
rDontKnow
.
reset
(
new
LanguageTagImpl
(
*
this
));
pImpl
=
rDontKnow
;
#if OSL_DEBUG_LEVEL > 0
static
size_t
nCallsDontKnow
=
0
;
++
nCallsDontKnow
;
SAL_INFO
(
"i18nlangtag"
,
"LanguageTag::registerImpl: "
<<
nCallsDontKnow
<<
" DontKnow calls"
);
#endif
}
else
{
SAL_WARN
(
"i18nlangtag"
,
"LanguageTag::registerImpl: can't register for 0x"
<<
::
std
::
hex
<<
mnLangID
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment