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
8aca6db9
Kaydet (Commit)
8aca6db9
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: I4cd6a9a502b4bad11265ac5e42dc338b56b90598
üst
2ba7a3d0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
25 deletions
+19
-25
characterclassificationImpl.cxx
...e/characterclassification/characterclassificationImpl.cxx
+19
-25
No files found.
i18npool/source/characterclassification/characterclassificationImpl.cxx
Dosyayı görüntüle @
8aca6db9
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
#include <characterclassificationImpl.hxx>
#include <characterclassificationImpl.hxx>
#include <localedata.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/ustrbuf.hxx>
using
namespace
com
::
sun
::
star
::
uno
;
using
namespace
com
::
sun
::
star
::
uno
;
...
@@ -166,32 +167,25 @@ CharacterClassificationImpl::getLocaleSpecificCharacterClassification(const Loca
...
@@ -166,32 +167,25 @@ CharacterClassificationImpl::getLocaleSpecificCharacterClassification(const Loca
return
cachedItem
->
xCI
;
return
cachedItem
->
xCI
;
}
}
static
sal_Unicode
under
=
(
sal_Unicode
)
'_'
;
// Load service with name <base>_<lang>_<country> or
sal_Int32
l
=
rLocale
.
Language
.
getLength
();
// <base>_<bcp47> and fallbacks.
sal_Int32
c
=
rLocale
.
Country
.
getLength
();
bool
bLoaded
=
createLocaleSpecificCharacterClassification
(
sal_Int32
v
=
rLocale
.
Variant
.
getLength
();
LocaleData
::
getFirstLocaleServiceName
(
rLocale
),
rLocale
);
OUStringBuffer
aBuf
(
l
+
c
+
v
+
3
);
if
(
!
bLoaded
)
{
// load service with name <base>_<lang>_<country>_<varian>
::
std
::
vector
<
OUString
>
aFallbacks
(
LocaleData
::
getFallbackLocaleServiceNames
(
rLocale
));
if
((
l
>
0
&&
c
>
0
&&
v
>
0
&&
for
(
::
std
::
vector
<
OUString
>::
const_iterator
it
(
aFallbacks
.
begin
());
it
!=
aFallbacks
.
end
();
++
it
)
createLocaleSpecificCharacterClassification
(
aBuf
.
append
(
rLocale
.
Language
).
append
(
under
).
append
(
{
rLocale
.
Country
).
append
(
under
).
append
(
rLocale
.
Variant
).
makeStringAndClear
(),
rLocale
))
||
bLoaded
=
createLocaleSpecificCharacterClassification
(
*
it
,
rLocale
);
// load service with name <base>_<lang>_<country>
if
(
bLoaded
)
(
l
>
0
&&
c
>
0
&&
break
;
createLocaleSpecificCharacterClassification
(
aBuf
.
append
(
rLocale
.
Language
).
append
(
under
).
append
(
}
rLocale
.
Country
).
makeStringAndClear
(),
rLocale
))
||
}
(
l
>
0
&&
c
>
0
&&
rLocale
.
Language
.
compareToAscii
(
"zh"
)
==
0
&&
if
(
bLoaded
)
(
rLocale
.
Country
.
compareToAscii
(
"HK"
)
==
0
||
rLocale
.
Country
.
compareToAscii
(
"MO"
)
==
0
)
&&
// if the country code is HK or MO, one more step to try TW.
createLocaleSpecificCharacterClassification
(
aBuf
.
append
(
rLocale
.
Language
).
append
(
under
).
append
(
"TW"
).
makeStringAndClear
(),
rLocale
))
||
(
l
>
0
&&
// load service with name <base>_<lang>
createLocaleSpecificCharacterClassification
(
rLocale
.
Language
,
rLocale
)))
{
return
cachedItem
->
xCI
;
return
cachedItem
->
xCI
;
}
else
if
(
xUCI
.
is
())
{
else
if
(
xUCI
.
is
())
lookupTable
.
push_back
(
cachedItem
=
new
lookupTableItem
(
rLocale
,
OUString
(
"Unicode"
),
xUCI
)
);
{
lookupTable
.
push_back
(
cachedItem
=
new
lookupTableItem
(
rLocale
,
OUString
(
"Unicode"
),
xUCI
));
return
cachedItem
->
xCI
;
return
cachedItem
->
xCI
;
}
}
}
}
...
...
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