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
41f02355
Kaydet (Commit)
41f02355
authored
Eyl 05, 2013
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use get*LocaleServiceName
Change-Id: I976d6d565c7970858a5a259199fe14075e4f5d2e
üst
5ef76b39
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
30 deletions
+31
-30
indexentrysupplier.cxx
i18npool/source/indexentry/indexentrysupplier.cxx
+31
-30
No files found.
i18npool/source/indexentry/indexentrysupplier.cxx
Dosyayı görüntüle @
41f02355
...
...
@@ -129,39 +129,40 @@ IndexEntrySupplier::getLocaleSpecificIndexEntrySupplier(const Locale& rLocale, c
if
(
!
module
.
isEmpty
()
&&
createLocaleSpecificIndexEntrySupplier
(
module
))
return
xIES
;
sal_Int32
l
=
rLocale
.
Language
.
getLength
();
sal_Int32
c
=
rLocale
.
Country
.
getLength
();
sal_Int32
v
=
rLocale
.
Variant
.
getLength
();
sal_Int32
a
=
aSortAlgorithm
.
getLength
();
OUStringBuffer
aBuf
(
l
+
c
+
v
+
a
+
4
);
if
((
l
>
0
&&
c
>
0
&&
v
>
0
&&
a
>
0
&&
// load service with name <base>_<lang>_<country>_<varian>_<algorithm>
createLocaleSpecificIndexEntrySupplier
(
aBuf
.
append
(
rLocale
.
Language
).
append
(
under
).
append
(
rLocale
.
Country
).
append
(
under
).
append
(
rLocale
.
Variant
).
append
(
under
).
append
(
aSortAlgorithm
).
makeStringAndClear
()))
||
(
l
>
0
&&
c
>
0
&&
a
>
0
&&
// load service with name <base>_<lang>_<country>_<algorithm>
createLocaleSpecificIndexEntrySupplier
(
aBuf
.
append
(
rLocale
.
Language
).
append
(
under
).
append
(
rLocale
.
Country
).
append
(
under
).
append
(
aSortAlgorithm
).
makeStringAndClear
()))
||
(
l
>
0
&&
c
>
0
&&
a
>
0
&&
rLocale
.
Language
.
compareToAscii
(
"zh"
)
==
0
&&
(
rLocale
.
Country
.
compareToAscii
(
"HK"
)
==
0
||
rLocale
.
Country
.
compareToAscii
(
"MO"
)
==
0
)
&&
// if the country code is HK or MO, one more step to try TW.
createLocaleSpecificIndexEntrySupplier
(
aBuf
.
append
(
rLocale
.
Language
).
append
(
under
).
appendAscii
(
"TW"
).
append
(
under
).
append
(
aSortAlgorithm
).
makeStringAndClear
()))
||
(
l
>
0
&&
a
>
0
&&
// load service with name <base>_<lang>_<algorithm>
createLocaleSpecificIndexEntrySupplier
(
aBuf
.
append
(
rLocale
.
Language
).
append
(
under
).
append
(
aSortAlgorithm
).
makeStringAndClear
()))
||
bool
bLoaded
=
false
;
if
(
!
aSortAlgorithm
.
isEmpty
())
{
// Load service with name <base>_<lang>_<country>_<algorithm>
// or <base>_<bcp47>_<algorithm> and fallbacks.
bLoaded
=
createLocaleSpecificIndexEntrySupplier
(
LocaleDataImpl
::
getFirstLocaleServiceName
(
rLocale
)
+
"_"
+
aSortAlgorithm
);
if
(
!
bLoaded
)
{
::
std
::
vector
<
OUString
>
aFallbacks
(
LocaleDataImpl
::
getFallbackLocaleServiceNames
(
rLocale
));
for
(
::
std
::
vector
<
OUString
>::
const_iterator
it
(
aFallbacks
.
begin
());
it
!=
aFallbacks
.
end
();
++
it
)
{
bLoaded
=
createLocaleSpecificIndexEntrySupplier
(
*
it
+
"_"
+
aSortAlgorithm
);
if
(
bLoaded
)
break
;
}
if
(
!
bLoaded
)
{
// load service with name <base>_<algorithm>
(
a
>
0
&&
createLocaleSpecificIndexEntrySupplier
(
aSortAlgorithm
))
||
// load default service with name <base>_Unicode
createLocaleSpecificIndexEntrySupplier
(
OUString
(
"Unicode"
)))
{
return
xIES
;
bLoaded
=
createLocaleSpecificIndexEntrySupplier
(
aSortAlgorithm
);
}
}
}
if
(
!
bLoaded
)
{
// load default service with name <base>_Unicode
bLoaded
=
createLocaleSpecificIndexEntrySupplier
(
"Unicode"
);
if
(
!
bLoaded
)
{
throw
RuntimeException
();
// could not load any service
}
}
return
xIES
;
}
throw
RuntimeException
();
}
OUString
SAL_CALL
IndexEntrySupplier
::
getIndexFollowPageWord
(
sal_Bool
bMorePages
,
...
...
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