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
a72ca75e
Kaydet (Commit)
a72ca75e
authored
Tem 09, 2013
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
publish the "qlt" reserved code in header file
Change-Id: Idb0bfa61655aa2f2d4b73661bce8166121727922
üst
4cf80bd8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
10 deletions
+19
-10
languagetag.cxx
i18nlangtag/source/languagetag/languagetag.cxx
+5
-10
languagetag.hxx
include/i18nlangtag/languagetag.hxx
+14
-0
No files found.
i18nlangtag/source/languagetag/languagetag.cxx
Dosyayı görüntüle @
a72ca75e
...
@@ -35,11 +35,6 @@ using namespace com::sun::star;
...
@@ -35,11 +35,6 @@ using namespace com::sun::star;
#define LANGTAGCAST(p) (reinterpret_cast<lt_tag_t*>(p))
#define LANGTAGCAST(p) (reinterpret_cast<lt_tag_t*>(p))
#define MPLANGTAG LANGTAGCAST(mpImplLangtag)
#define MPLANGTAG LANGTAGCAST(mpImplLangtag)
/** Convention to signal presence of BCP 47 language tag in a Locale's Variant
field. The Locale's Language field then will contain this ISO 639-2
reserved for local use code. */
#define ISO639_LANGUAGE_TAG "qlt"
// Helper to ensure lt_error_t is free'd
// Helper to ensure lt_error_t is free'd
struct
myLtError
struct
myLtError
...
@@ -474,7 +469,7 @@ bool LanguageTag::canonicalize()
...
@@ -474,7 +469,7 @@ bool LanguageTag::canonicalize()
}
}
else
else
{
{
maLocale
.
Language
=
I
SO639_LANGUAGE_TAG
;
maLocale
.
Language
=
I
18NLANGTAG_QLT
;
maLocale
.
Country
=
aCountry
;
maLocale
.
Country
=
aCountry
;
maLocale
.
Variant
=
maBcp47
;
maLocale
.
Variant
=
maBcp47
;
}
}
...
@@ -574,7 +569,7 @@ void LanguageTag::convertLocaleToBcp47()
...
@@ -574,7 +569,7 @@ void LanguageTag::convertLocaleToBcp47()
if
(
mbSystemLocale
&&
!
mbInitializedLocale
)
if
(
mbSystemLocale
&&
!
mbInitializedLocale
)
convertLangToLocale
();
convertLangToLocale
();
if
(
maLocale
.
Language
==
I
SO639_LANGUAGE_TAG
)
if
(
maLocale
.
Language
==
I
18NLANGTAG_QLT
)
{
{
maBcp47
=
maLocale
.
Variant
;
maBcp47
=
maLocale
.
Variant
;
meIsIsoLocale
=
DECISION_NO
;
meIsIsoLocale
=
DECISION_NO
;
...
@@ -607,7 +602,7 @@ void LanguageTag::convertLocaleToLang()
...
@@ -607,7 +602,7 @@ void LanguageTag::convertLocaleToLang()
{
{
/* FIXME: this is temporary until code base is converted to not use
/* FIXME: this is temporary until code base is converted to not use
* MsLangId::convert...() anymore. After that, proper new method has to
* MsLangId::convert...() anymore. After that, proper new method has to
* be implemented to allow I
SO639_LANGUAGE_TAG
and sript tag and such. */
* be implemented to allow I
18NLANGTAG_QLT
and sript tag and such. */
mnLangID
=
MsLangId
::
Conversion
::
convertLocaleToLanguage
(
maLocale
);
mnLangID
=
MsLangId
::
Conversion
::
convertLocaleToLanguage
(
maLocale
);
}
}
mbInitializedLangID
=
true
;
mbInitializedLangID
=
true
;
...
@@ -625,7 +620,7 @@ void LanguageTag::convertBcp47ToLocale()
...
@@ -625,7 +620,7 @@ void LanguageTag::convertBcp47ToLocale()
}
}
else
else
{
{
maLocale
.
Language
=
I
SO639_LANGUAGE_TAG
;
maLocale
.
Language
=
I
18NLANGTAG_QLT
;
maLocale
.
Country
=
getCountry
();
maLocale
.
Country
=
getCountry
();
maLocale
.
Variant
=
maBcp47
;
maLocale
.
Variant
=
maBcp47
;
}
}
...
@@ -661,7 +656,7 @@ void LanguageTag::convertLangToLocale()
...
@@ -661,7 +656,7 @@ void LanguageTag::convertLangToLocale()
}
}
/* FIXME: this is temporary until code base is converted to not use
/* FIXME: this is temporary until code base is converted to not use
* MsLangId::convert...() anymore. After that, proper new method has to be
* MsLangId::convert...() anymore. After that, proper new method has to be
* implemented to allow I
SO639_LANGUAGE_TAG
and script tag and such. */
* implemented to allow I
18NLANGTAG_QLT
and script tag and such. */
// Resolve system here!
// Resolve system here!
maLocale
=
MsLangId
::
Conversion
::
convertLanguageToLocale
(
mnLangID
,
true
);
maLocale
=
MsLangId
::
Conversion
::
convertLanguageToLocale
(
mnLangID
,
true
);
mbInitializedLocale
=
true
;
mbInitializedLocale
=
true
;
...
...
include/i18nlangtag/languagetag.hxx
Dosyayı görüntüle @
a72ca75e
...
@@ -21,6 +21,20 @@
...
@@ -21,6 +21,20 @@
typedef
struct
_rtl_Locale
rtl_Locale
;
// as in rtl/locale.h
typedef
struct
_rtl_Locale
rtl_Locale
;
// as in rtl/locale.h
/** The ISO 639-2 code reserved for local use used to indicate that a
com::sun::star::Locale contains a BCP 47 string in its Variant field. The
Locale's Language field then will contain this language code.
@see LanguageTag::getLocale()
Avoid use, only needed internally or if conversion from Locale to
LanguageTag is not wanted, i.e. during ODF import. To check whether a
LanguageTag contains a plain language/country combination or a more
detailed BCP 47 language tag use LanguageTag::isIsoLocale() instead.
*/
#define I18NLANGTAG_QLT "qlt"
/** Wrapper for liblangtag BCP 47 language tags, MS-LangIDs, locales and
/** Wrapper for liblangtag BCP 47 language tags, MS-LangIDs, locales and
conversions in between.
conversions in between.
...
...
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