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
62f56ba0
Kaydet (Commit)
62f56ba0
authored
Tem 11, 2013
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use LanguageTag and getFallbackStrings()
Change-Id: I398fb1cd3a2f456562d879b417ec964f21f67464
üst
ac469cee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
16 deletions
+9
-16
fontcfg.cxx
unotools/source/config/fontcfg.cxx
+9
-16
No files found.
unotools/source/config/fontcfg.cxx
Dosyayı görüntüle @
62f56ba0
...
@@ -1137,16 +1137,18 @@ const FontNameAttr* FontSubstConfiguration::getSubstInfo( const OUString& rFontN
...
@@ -1137,16 +1137,18 @@ const FontNameAttr* FontSubstConfiguration::getSubstInfo( const OUString& rFontN
FontNameAttr
aSearchAttr
;
FontNameAttr
aSearchAttr
;
aSearchAttr
.
Name
=
aSearchFont
;
aSearchAttr
.
Name
=
aSearchFont
;
Locale
aLocale
;
LanguageTag
aLanguageTag
(
rLocale
);
aLocale
.
Language
=
rLocale
.
Language
.
toAsciiLowerCase
();
aLocale
.
Country
=
rLocale
.
Country
.
toAsciiUpperCase
();
aLocale
.
Variant
=
rLocale
.
Variant
.
toAsciiUpperCase
();
if
(
aL
ocale
.
Language
.
isEmpty
()
)
if
(
aL
anguageTag
.
isSystemLocale
()
)
aL
ocale
=
SvtSysLocale
().
GetUILanguageTag
().
getLocale
();
aL
anguageTag
=
SvtSysLocale
().
GetUILanguageTag
();
while
(
!
aLocale
.
Language
.
isEmpty
()
)
::
std
::
vector
<
OUString
>
aFallbacks
(
aLanguageTag
.
getFallbackStrings
());
if
(
aLanguageTag
.
getLanguage
()
!=
"en"
)
aFallbacks
.
push_back
(
"en"
);
for
(
::
std
::
vector
<
OUString
>::
const_iterator
fb
(
aFallbacks
.
begin
());
fb
!=
aFallbacks
.
end
();
++
fb
)
{
{
Locale
aLocale
(
LanguageTag
(
*
fb
).
getLocale
());
boost
::
unordered_map
<
Locale
,
LocaleSubst
,
LocaleHash
>::
const_iterator
lang
=
m_aSubst
.
find
(
aLocale
);
boost
::
unordered_map
<
Locale
,
LocaleSubst
,
LocaleHash
>::
const_iterator
lang
=
m_aSubst
.
find
(
aLocale
);
if
(
lang
!=
m_aSubst
.
end
()
)
if
(
lang
!=
m_aSubst
.
end
()
)
{
{
...
@@ -1165,15 +1167,6 @@ const FontNameAttr* FontSubstConfiguration::getSubstInfo( const OUString& rFontN
...
@@ -1165,15 +1167,6 @@ const FontNameAttr* FontSubstConfiguration::getSubstInfo( const OUString& rFontN
return
&
rFoundAttr
;
return
&
rFoundAttr
;
}
}
}
}
// gradually become more unspecific
if
(
!
aLocale
.
Variant
.
isEmpty
()
)
aLocale
.
Variant
=
OUString
();
else
if
(
!
aLocale
.
Country
.
isEmpty
()
)
aLocale
.
Country
=
OUString
();
else
if
(
aLocale
.
Language
!=
"en"
)
aLocale
.
Language
=
OUString
(
"en"
);
else
aLocale
.
Language
=
OUString
();
}
}
return
NULL
;
return
NULL
;
}
}
...
...
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