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
37126d76
Kaydet (Commit)
37126d76
authored
Eyl 05, 2013
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
cUnder, cHyphen
Change-Id: I6c295f887d90809b63c5b13fee466a584d1f6404
üst
d261ddf3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
localedata.cxx
i18npool/source/localedata/localedata.cxx
+12
-11
No files found.
i18npool/source/localedata/localedata.cxx
Dosyayı görüntüle @
37126d76
...
@@ -291,7 +291,8 @@ static const struct {
...
@@ -291,7 +291,8 @@ static const struct {
#endif
#endif
static
const
sal_Unicode
under
=
sal_Unicode
(
'_'
);
static
const
sal_Unicode
cUnder
=
sal_Unicode
(
'_'
);
static
const
sal_Unicode
cHyphen
=
sal_Unicode
(
'-'
);
static
const
sal_Int16
nbOfLocales
=
SAL_N_ELEMENTS
(
aLibTable
);
static
const
sal_Int16
nbOfLocales
=
SAL_N_ELEMENTS
(
aLibTable
);
...
@@ -445,7 +446,7 @@ oslGenericFunction SAL_CALL lcl_LookupTableHelper::getFunctionSymbolByName(
...
@@ -445,7 +446,7 @@ oslGenericFunction SAL_CALL lcl_LookupTableHelper::getFunctionSymbolByName(
LocaleDataLookupTableItem
**
pOutCachedItem
)
LocaleDataLookupTableItem
**
pOutCachedItem
)
{
{
OUString
aFallback
;
OUString
aFallback
;
bool
bFallback
=
(
localeName
.
indexOf
(
u
nder
)
<
0
);
bool
bFallback
=
(
localeName
.
indexOf
(
cU
nder
)
<
0
);
if
(
bFallback
)
if
(
bFallback
)
{
{
Locale
aLocale
;
Locale
aLocale
;
...
@@ -478,7 +479,7 @@ oslGenericFunction SAL_CALL lcl_LookupTableHelper::getFunctionSymbolByName(
...
@@ -478,7 +479,7 @@ oslGenericFunction SAL_CALL lcl_LookupTableHelper::getFunctionSymbolByName(
(
*
pOutCachedItem
)
=
new
LocaleDataLookupTableItem
(
*
pCurrent
);
(
*
pOutCachedItem
)
=
new
LocaleDataLookupTableItem
(
*
pCurrent
);
(
*
pOutCachedItem
)
->
localeName
=
aLibTable
[
i
].
pLocale
;
(
*
pOutCachedItem
)
->
localeName
=
aLibTable
[
i
].
pLocale
;
return
(
*
pOutCachedItem
)
->
module
->
getFunctionSymbol
(
return
(
*
pOutCachedItem
)
->
module
->
getFunctionSymbol
(
aBuf
.
appendAscii
(
pFunction
).
append
(
u
nder
).
aBuf
.
appendAscii
(
pFunction
).
append
(
cU
nder
).
appendAscii
(
(
*
pOutCachedItem
)
->
localeName
).
makeStringAndClear
());
appendAscii
(
(
*
pOutCachedItem
)
->
localeName
).
makeStringAndClear
());
}
}
else
else
...
@@ -505,7 +506,7 @@ oslGenericFunction SAL_CALL lcl_LookupTableHelper::getFunctionSymbolByName(
...
@@ -505,7 +506,7 @@ oslGenericFunction SAL_CALL lcl_LookupTableHelper::getFunctionSymbolByName(
{
{
(
*
pOutCachedItem
)
=
new
LocaleDataLookupTableItem
(
*
pNewItem
);
(
*
pOutCachedItem
)
=
new
LocaleDataLookupTableItem
(
*
pNewItem
);
return
module
->
getFunctionSymbol
(
return
module
->
getFunctionSymbol
(
aBuf
.
appendAscii
(
pFunction
).
append
(
u
nder
).
aBuf
.
appendAscii
(
pFunction
).
append
(
cU
nder
).
appendAscii
((
*
pOutCachedItem
)
->
localeName
).
makeStringAndClear
());
appendAscii
((
*
pOutCachedItem
)
->
localeName
).
makeStringAndClear
());
}
}
else
else
...
@@ -577,8 +578,8 @@ Sequence< CalendarItem2 > &LocaleData::getCalendarItemByName(const OUString& nam
...
@@ -577,8 +578,8 @@ Sequence< CalendarItem2 > &LocaleData::getCalendarItemByName(const OUString& nam
{
{
if
(
!
ref_name
.
equals
(
name
))
{
if
(
!
ref_name
.
equals
(
name
))
{
sal_Int32
index
=
0
;
sal_Int32
index
=
0
;
OUString
language
=
name
.
getToken
(
0
,
u
nder
,
index
);
OUString
language
=
name
.
getToken
(
0
,
cU
nder
,
index
);
OUString
country
=
name
.
getToken
(
0
,
u
nder
,
index
);
OUString
country
=
name
.
getToken
(
0
,
cU
nder
,
index
);
Locale
loc
(
language
,
country
,
OUString
());
Locale
loc
(
language
,
country
,
OUString
());
Sequence
<
Calendar2
>
cals
;
Sequence
<
Calendar2
>
cals
;
if
(
loc
==
rLocale
)
{
if
(
loc
==
rLocale
)
{
...
@@ -586,7 +587,7 @@ Sequence< CalendarItem2 > &LocaleData::getCalendarItemByName(const OUString& nam
...
@@ -586,7 +587,7 @@ Sequence< CalendarItem2 > &LocaleData::getCalendarItemByName(const OUString& nam
}
else
{
}
else
{
cals
=
getAllCalendars2
(
loc
);
cals
=
getAllCalendars2
(
loc
);
}
}
const
OUString
&
id
=
name
.
getToken
(
0
,
u
nder
,
index
);
const
OUString
&
id
=
name
.
getToken
(
0
,
cU
nder
,
index
);
for
(
index
=
0
;
index
<
cals
.
getLength
();
index
++
)
{
for
(
index
=
0
;
index
<
cals
.
getLength
();
index
++
)
{
if
(
id
.
equals
(
cals
[
index
].
Name
))
{
if
(
id
.
equals
(
cals
[
index
].
Name
))
{
ref_cal
=
cals
[
index
];
ref_cal
=
cals
[
index
];
...
@@ -1465,7 +1466,7 @@ oslGenericFunction SAL_CALL LocaleData::getFunctionSymbol( const Locale& rLocale
...
@@ -1465,7 +1466,7 @@ oslGenericFunction SAL_CALL LocaleData::getFunctionSymbol( const Locale& rLocale
if
(
cachedItem
.
get
()
&&
cachedItem
->
equals
(
rLocale
))
if
(
cachedItem
.
get
()
&&
cachedItem
->
equals
(
rLocale
))
{
{
aBuf
.
ensureCapacity
(
strlen
(
pFunction
)
+
1
+
strlen
(
cachedItem
->
localeName
));
aBuf
.
ensureCapacity
(
strlen
(
pFunction
)
+
1
+
strlen
(
cachedItem
->
localeName
));
return
cachedItem
->
module
->
getFunctionSymbol
(
aBuf
.
appendAscii
(
pFunction
).
append
(
u
nder
).
return
cachedItem
->
module
->
getFunctionSymbol
(
aBuf
.
appendAscii
(
pFunction
).
append
(
cU
nder
).
appendAscii
(
cachedItem
->
localeName
).
makeStringAndClear
());
appendAscii
(
cachedItem
->
localeName
).
makeStringAndClear
());
}
}
...
@@ -1520,7 +1521,7 @@ LocaleData::getAllInstalledLocaleNames() throw(RuntimeException)
...
@@ -1520,7 +1521,7 @@ LocaleData::getAllInstalledLocaleNames() throw(RuntimeException)
if
(
lcl_LookupTableStatic
::
get
().
getFunctionSymbolByName
(
name
,
"getLocaleItem"
,
&
pCachedItem
))
{
if
(
lcl_LookupTableStatic
::
get
().
getFunctionSymbolByName
(
name
,
"getLocaleItem"
,
&
pCachedItem
))
{
if
(
pCachedItem
)
if
(
pCachedItem
)
cachedItem
.
reset
(
pCachedItem
);
cachedItem
.
reset
(
pCachedItem
);
seq
[
nInstalled
++
]
=
LanguageTag
::
convertToLocale
(
name
.
replace
(
under
,
'-'
),
false
);
seq
[
nInstalled
++
]
=
LanguageTag
::
convertToLocale
(
name
.
replace
(
cUnder
,
cHyphen
),
false
);
}
}
else
else
{
{
...
@@ -1628,7 +1629,7 @@ LocaleData::getSupportedServiceNames() throw( RuntimeException )
...
@@ -1628,7 +1629,7 @@ LocaleData::getSupportedServiceNames() throw( RuntimeException )
OUString
LocaleData
::
getFirstLocaleServiceName
(
const
com
::
sun
::
star
::
lang
::
Locale
&
rLocale
)
OUString
LocaleData
::
getFirstLocaleServiceName
(
const
com
::
sun
::
star
::
lang
::
Locale
&
rLocale
)
{
{
if
(
rLocale
.
Language
==
I18NLANGTAG_QLT
)
if
(
rLocale
.
Language
==
I18NLANGTAG_QLT
)
return
rLocale
.
Variant
.
replace
(
'-'
,
u
nder
);
return
rLocale
.
Variant
.
replace
(
cHyphen
,
cU
nder
);
else
if
(
!
rLocale
.
Country
.
isEmpty
())
else
if
(
!
rLocale
.
Country
.
isEmpty
())
return
rLocale
.
Language
+
"_"
+
rLocale
.
Country
;
return
rLocale
.
Language
+
"_"
+
rLocale
.
Country
;
else
else
...
@@ -1645,7 +1646,7 @@ OUString LocaleData::getFirstLocaleServiceName( const com::sun::star::lang::Loca
...
@@ -1645,7 +1646,7 @@ OUString LocaleData::getFirstLocaleServiceName( const com::sun::star::lang::Loca
aVec
.
erase
(
aVec
.
begin
());
aVec
.
erase
(
aVec
.
begin
());
for
(
::
std
::
vector
<
OUString
>::
iterator
it
(
aVec
.
begin
());
it
!=
aVec
.
end
();
++
it
)
for
(
::
std
::
vector
<
OUString
>::
iterator
it
(
aVec
.
begin
());
it
!=
aVec
.
end
();
++
it
)
{
{
*
it
=
(
*
it
).
replace
(
'-'
,
u
nder
);
*
it
=
(
*
it
).
replace
(
cHyphen
,
cU
nder
);
}
}
}
}
else
if
(
!
rLocale
.
Country
.
isEmpty
())
else
if
(
!
rLocale
.
Country
.
isEmpty
())
...
...
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