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
4467a4a6
Kaydet (Commit)
4467a4a6
authored
Tem 05, 2013
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
added convenience ctor for ODF import
Change-Id: I80fc2d531b612d9e2e94fc4f5efcca594e35a561
üst
6a17dc24
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
0 deletions
+47
-0
languagetag.cxx
i18nlangtag/source/languagetag/languagetag.cxx
+38
-0
languagetag.hxx
include/i18nlangtag/languagetag.hxx
+9
-0
No files found.
i18nlangtag/source/languagetag/languagetag.cxx
Dosyayı görüntüle @
4467a4a6
...
...
@@ -206,6 +206,44 @@ LanguageTag::LanguageTag( LanguageType nLanguage )
}
LanguageTag
::
LanguageTag
(
const
OUString
&
rBcp47
,
const
OUString
&
rLanguage
,
const
OUString
&
rScript
,
const
OUString
&
rCountry
)
:
maBcp47
(
rBcp47
),
mpImplLangtag
(
NULL
),
mnLangID
(
LANGUAGE_DONTKNOW
),
meIsValid
(
DECISION_DONTKNOW
),
meIsIsoLocale
(
DECISION_DONTKNOW
),
meIsIsoODF
(
DECISION_DONTKNOW
),
meIsLiblangtagNeeded
(
DECISION_DONTKNOW
),
mbSystemLocale
(
rBcp47
.
isEmpty
()
&&
rLanguage
.
isEmpty
()),
mbInitializedBcp47
(
!
rBcp47
.
isEmpty
()),
mbInitializedLocale
(
false
),
mbInitializedLangID
(
false
),
mbCachedLanguage
(
false
),
mbCachedScript
(
false
),
mbCachedCountry
(
false
),
mbIsFallback
(
false
)
{
if
(
!
mbSystemLocale
&&
!
mbInitializedBcp47
)
{
if
(
rScript
.
isEmpty
())
{
maLocale
=
lang
::
Locale
(
rLanguage
,
rCountry
,
""
);
mbInitializedLocale
=
true
;
}
else
{
if
(
rCountry
.
isEmpty
())
maBcp47
=
rLanguage
+
"-"
+
rScript
;
else
maBcp47
=
rLanguage
+
"-"
+
rScript
+
"-"
+
rCountry
;
mbInitializedBcp47
=
true
;
}
}
}
LanguageTag
::
LanguageTag
(
const
OUString
&
rLanguage
,
const
OUString
&
rCountry
)
:
maLocale
(
rLanguage
,
rCountry
,
""
),
...
...
include/i18nlangtag/languagetag.hxx
Dosyayı görüntüle @
4467a4a6
...
...
@@ -53,6 +53,15 @@ public:
/** Init LanguageTag with LanguageType MS-LangID. */
explicit
LanguageTag
(
LanguageType
nLanguage
);
/** Init LanguageTag with either BCP 47 language tag (precedence if not
empty), or a combination of language, script and country.
This is a convenience ctor to be used in ODF import where these are
distinct attributes.
*/
explicit
LanguageTag
(
const
OUString
&
rBcp47
,
const
OUString
&
rLanguage
,
const
OUString
&
rScript
,
const
OUString
&
rCountry
);
/** Init LanguageTag with language and country strings.
This is a convenience ctor for places that so far use only language and
...
...
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