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
edf99f88
Kaydet (Commit)
edf99f88
authored
Kas 17, 2010
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
drop unused methods
üst
24c53573
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
389 deletions
+0
-389
locale.hxx
comphelper/inc/comphelper/locale.hxx
+0
-55
locale.cxx
comphelper/source/misc/locale.cxx
+0
-334
No files found.
comphelper/inc/comphelper/locale.hxx
Dosyayı görüntüle @
edf99f88
...
...
@@ -70,40 +70,8 @@ class COMPHELPER_DLLPUBLIC Locale
/** @short some predefined Locale objects. */
static
const
Locale
EN_US
();
static
const
Locale
EN
();
static
const
Locale
DE_DE
();
static
const
Locale
DE_CH
();
static
const
Locale
DE_AT
();
static
const
Locale
AR
();
static
const
Locale
CA
();
static
const
Locale
CS
();
static
const
Locale
DA
();
static
const
Locale
EL
();
static
const
Locale
ES
();
static
const
Locale
FI
();
static
const
Locale
FR
();
static
const
Locale
HE
();
static
const
Locale
HI_IN
();
static
const
Locale
HU
();
static
const
Locale
IT
();
static
const
Locale
JA
();
static
const
Locale
KO
();
static
const
Locale
NL
();
static
const
Locale
PL
();
static
const
Locale
PT
();
static
const
Locale
PT_BR
();
static
const
Locale
RU
();
static
const
Locale
SK
();
static
const
Locale
SL
();
static
const
Locale
SV
();
static
const
Locale
TH
();
static
const
Locale
TR
();
static
const
Locale
X_DEFAULT
();
static
const
Locale
X_COMMENT
();
static
const
Locale
X_TRANSLATE
();
static
const
Locale
X_NOTRANSLATE
();
static
const
Locale
ZH_CN
();
static
const
Locale
ZH_TW
();
//-------------------------------------------
// types
...
...
@@ -380,29 +348,6 @@ class COMPHELPER_DLLPUBLIC Locale
const
::
rtl
::
OUString
&
sReferenceISO
)
throw
(
MalFormedLocaleException
);
//---------------------------------------
/** @short search for the next possible fallback locale.
@descr Instead of getFallback(vector<>, string) this method
uses the given locale and decide by using an algorithm
which locale can be the next possible one.
Algorithm:
- if locale has country return language only
- if locale different "en-US" return "en-US"
- if locale "en-US" return "en"
@param aLocale [in/out]!
the incoming value will be used to start
search for a possible fallback ...
and in case such fallback was found this parameter
will be used for return too.
@return TRUE if the parameter aLocale contains a new fallback value;
FALSE otherwise.
*/
static
sal_Bool
getFallback
(
Locale
&
aLocale
);
//---------------------------------------
/** @short assign elements of another locale
to this instance.
...
...
comphelper/source/misc/locale.cxx
Dosyayı görüntüle @
edf99f88
...
...
@@ -53,15 +53,6 @@ const Locale Locale::X_DEFAULT()
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
EN
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"en"
)),
::
rtl
::
OUString
());
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
EN_US
()
{
...
...
@@ -71,267 +62,6 @@ const Locale Locale::EN_US()
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
DE_DE
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"de"
)),
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"DE"
)));
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
DE_CH
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"de"
)),
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"CH"
)));
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
DE_AT
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"de"
)),
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"AT"
)));
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
AR
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"ar"
)),
::
rtl
::
OUString
());
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
CA
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"ca"
)),
::
rtl
::
OUString
());
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
CS
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"cs"
)),
::
rtl
::
OUString
());
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
DA
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"da"
)),
::
rtl
::
OUString
());
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
EL
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"el"
)),
::
rtl
::
OUString
());
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
ES
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"es"
)),
::
rtl
::
OUString
());
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
FI
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"fi"
)),
::
rtl
::
OUString
());
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
FR
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"fr"
)),
::
rtl
::
OUString
());
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
HE
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"he"
)),
::
rtl
::
OUString
());
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
HI_IN
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"hi"
)),
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"IN"
)));
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
HU
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"hu"
)),
::
rtl
::
OUString
());
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
IT
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"it"
)),
::
rtl
::
OUString
());
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
JA
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"ja"
)),
::
rtl
::
OUString
());
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
KO
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"ko"
)),
::
rtl
::
OUString
());
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
NL
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"nl"
)),
::
rtl
::
OUString
());
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
PL
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"pl"
)),
::
rtl
::
OUString
());
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
PT
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"pt"
)),
::
rtl
::
OUString
());
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
PT_BR
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"pt"
)),
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"BR"
)));
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
RU
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"ru"
)),
::
rtl
::
OUString
());
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
SK
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"sk"
)),
::
rtl
::
OUString
());
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
SL
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"sl"
)),
::
rtl
::
OUString
());
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
SV
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"sv"
)),
::
rtl
::
OUString
());
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
TH
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"th"
)),
::
rtl
::
OUString
());
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
TR
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"tr"
)),
::
rtl
::
OUString
());
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
X_COMMENT
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"x"
)),
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"comment"
)));
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
X_TRANSLATE
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"x"
)),
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"translate"
)));
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
X_NOTRANSLATE
()
{
...
...
@@ -341,24 +71,6 @@ const Locale Locale::X_NOTRANSLATE()
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
ZH_CN
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"zh"
)),
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"CN"
)));
return
aLocale
;
}
//-----------------------------------------------
const
Locale
Locale
::
ZH_TW
()
{
static
Locale
aLocale
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"zh"
)),
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"TW"
)));
return
aLocale
;
}
//-----------------------------------------------
Locale
::
Locale
(
const
::
rtl
::
OUString
&
sISO
)
throw
(
Locale
::
MalFormedLocaleException
)
...
...
@@ -611,52 +323,6 @@ sal_Bool Locale::similar(const Locale& aComparable) const
return
lISOList
.
end
();
}
//-----------------------------------------------
sal_Bool
Locale
::
getFallback
(
Locale
&
aLocale
)
{
// a)
// this was our last fallback!
// break any further calls to this method ...
if
(
aLocale
.
equals
(
X_NOTRANSLATE
()))
return
sal_False
;
// b)
// switch from X_DEFAULT to X_NOTRANSLATE
// next time we will go to a)
if
(
aLocale
.
equals
(
X_DEFAULT
()))
{
aLocale
=
X_NOTRANSLATE
();
return
sal_True
;
}
// c)
// switch from EN to X_DEFAULT
// next time we will go to b)
if
(
aLocale
.
equals
(
EN
()))
{
aLocale
=
X_DEFAULT
();
return
sal_True
;
}
// d) remove country from incoming locale
// e.g. "de-DE" => "de" or "en-US" => "en"!
if
(
aLocale
.
getCountry
().
getLength
())
{
aLocale
.
setCountry
(
::
rtl
::
OUString
());
return
sal_True
;
}
// e) "en-US" possible?
if
(
!
aLocale
.
equals
(
EN_US
()))
{
aLocale
=
EN_US
();
return
sal_True
;
}
// f) no more fallbacks
return
sal_False
;
}
//-----------------------------------------------
void
Locale
::
operator
=
(
const
Locale
&
rCopy
)
{
...
...
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