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
f7002026
Kaydet (Commit)
f7002026
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: Ieb286027644446c1109ab4fc637445c3582e316e
üst
acd09ada
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
38 deletions
+12
-38
localedata.cxx
i18npool/source/localedata/localedata.cxx
+12
-38
No files found.
i18npool/source/localedata/localedata.cxx
Dosyayı görüntüle @
f7002026
...
@@ -453,12 +453,8 @@ oslGenericFunction SAL_CALL lcl_LookupTableHelper::getFunctionSymbolByName(
...
@@ -453,12 +453,8 @@ oslGenericFunction SAL_CALL lcl_LookupTableHelper::getFunctionSymbolByName(
Locale
aFbLocale
=
MsLangId
::
getFallbackLocale
(
aLocale
);
Locale
aFbLocale
=
MsLangId
::
getFallbackLocale
(
aLocale
);
if
(
aFbLocale
==
aLocale
)
if
(
aFbLocale
==
aLocale
)
bFallback
=
false
;
// may be a "language-only-locale" like Interlingua (ia)
bFallback
=
false
;
// may be a "language-only-locale" like Interlingua (ia)
else
if
(
!
aFbLocale
.
Country
.
isEmpty
())
{
OUStringBuffer
aBuf
(
5
);
aFallback
=
aBuf
.
append
(
aFbLocale
.
Language
).
append
(
under
).
append
(
aFbLocale
.
Country
).
makeStringAndClear
();
}
else
else
aFallback
=
aFbLocale
.
Language
;
aFallback
=
LocaleData
::
getFirstLocaleServiceName
(
aFbLocale
)
;
}
}
for
(
sal_Int16
i
=
0
;
i
<
nbOfLocales
;
i
++
)
for
(
sal_Int16
i
=
0
;
i
<
nbOfLocales
;
i
++
)
...
@@ -1474,44 +1470,22 @@ oslGenericFunction SAL_CALL LocaleData::getFunctionSymbol( const Locale& rLocale
...
@@ -1474,44 +1470,22 @@ oslGenericFunction SAL_CALL LocaleData::getFunctionSymbol( const Locale& rLocale
}
}
oslGenericFunction
pSymbol
=
0
;
oslGenericFunction
pSymbol
=
0
;
sal_Int32
l
=
rLocale
.
Language
.
getLength
();
sal_Int32
c
=
rLocale
.
Country
.
getLength
();
sal_Int32
v
=
rLocale
.
Variant
.
getLength
();
aBuf
.
ensureCapacity
(
l
+
c
+
v
+
3
);
LocaleDataLookupTableItem
*
pCachedItem
=
0
;
LocaleDataLookupTableItem
*
pCachedItem
=
0
;
if
(
l
>
0
&&
c
>
0
&&
v
>
0
)
// Load function with name <func>_<lang>_<country> or <func>_<bcp47> and
{
// fallbacks.
// load function with name <func>_<lang>_<country>_<variant>
pSymbol
=
rLookupTable
.
getFunctionSymbolByName
(
LocaleData
::
getFirstLocaleServiceName
(
rLocale
),
pSymbol
=
rLookupTable
.
getFunctionSymbolByName
(
pFunction
,
&
pCachedItem
);
aBuf
.
append
(
rLocale
.
Language
).
append
(
under
).
append
(
rLocale
.
Country
).
append
(
under
).
append
(
rLocale
.
Variant
).
makeStringAndClear
(),
pFunction
,
&
pCachedItem
);
}
if
(
!
pSymbol
&&
l
>
0
&&
c
>
0
)
{
// load function with name <ase>_<lang>_<country>
pSymbol
=
rLookupTable
.
getFunctionSymbolByName
(
aBuf
.
append
(
rLocale
.
Language
).
append
(
under
).
append
(
rLocale
.
Country
).
makeStringAndClear
(),
pFunction
,
&
pCachedItem
);
}
if
(
!
pSymbol
&&
l
>
0
&&
c
>
0
&&
rLocale
.
Language
==
"zh"
&&
(
rLocale
.
Country
==
"HK"
||
rLocale
.
Country
==
"MO"
))
{
// if the country code is HK or MO, one more step to try TW.
pSymbol
=
rLookupTable
.
getFunctionSymbolByName
(
aBuf
.
append
(
rLocale
.
Language
).
append
(
under
).
append
(
"TW"
).
makeStringAndClear
(),
pFunction
,
&
pCachedItem
);
}
if
(
!
pSymbol
)
if
(
!
pSymbol
)
{
{
// load function with name <func>_<lang>
::
std
::
vector
<
OUString
>
aFallbacks
(
LocaleData
::
getFallbackLocaleServiceNames
(
rLocale
));
pSymbol
=
rLookupTable
.
getFunctionSymbolByName
(
rLocale
.
Language
,
pFunction
,
&
pCachedItem
);
for
(
::
std
::
vector
<
OUString
>::
const_iterator
it
(
aFallbacks
.
begin
());
it
!=
aFallbacks
.
end
();
++
it
)
{
pSymbol
=
rLookupTable
.
getFunctionSymbolByName
(
*
it
,
pFunction
,
&
pCachedItem
);
if
(
pSymbol
)
break
;
}
}
}
if
(
!
pSymbol
)
if
(
!
pSymbol
)
{
{
// load default function with name <func>_en_US
// load default function with name <func>_en_US
...
...
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