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
d75dd80a
Kaydet (Commit)
d75dd80a
authored
Tem 12, 2013
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Resolves: fdo#54493 autoenable CJK/CTL ui based on installed keyboards
Change-Id: I66d3c57c88ff64fc3e3a7fa50fb5a173e709e3bf
üst
a865cec5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
21 deletions
+66
-21
cjkoptions.cxx
svl/source/config/cjkoptions.cxx
+28
-8
ctloptions.cxx
svl/source/config/ctloptions.cxx
+38
-13
No files found.
svl/source/config/cjkoptions.cxx
Dosyayı görüntüle @
d75dd80a
...
@@ -197,15 +197,35 @@ void SvtCJKOptions_Impl::Load()
...
@@ -197,15 +197,35 @@ void SvtCJKOptions_Impl::Load()
}
}
}
}
SvtSystemLanguageOptions
aSystemLocaleSettings
;
if
(
!
bCJKFont
)
LanguageType
eSystemLanguage
=
aSystemLocaleSettings
.
GetWin16SystemLanguage
();
sal_uInt16
nWinScript
=
SvtLanguageOptions
::
GetScriptTypeOfLanguage
(
eSystemLanguage
);
sal_uInt16
nScriptType
=
SvtLanguageOptions
::
GetScriptTypeOfLanguage
(
LANGUAGE_SYSTEM
);
if
(
!
bCJKFont
&&
((
nScriptType
&
SCRIPTTYPE_ASIAN
)
||
((
eSystemLanguage
!=
LANGUAGE_SYSTEM
)
&&
(
nWinScript
&
SCRIPTTYPE_ASIAN
))))
{
{
SetAll
(
sal_True
);
bool
bAutoEnableCJK
=
false
;
sal_uInt16
nScriptType
=
SvtLanguageOptions
::
GetScriptTypeOfLanguage
(
LANGUAGE_SYSTEM
);
//system locale is CJK
bAutoEnableCJK
=
(
nScriptType
&
SCRIPTTYPE_ASIAN
);
if
(
!
bAutoEnableCJK
)
{
SvtSystemLanguageOptions
aSystemLocaleSettings
;
//windows secondary system locale is CJK
LanguageType
eSystemLanguage
=
aSystemLocaleSettings
.
GetWin16SystemLanguage
();
if
(
eSystemLanguage
!=
LANGUAGE_SYSTEM
)
{
sal_uInt16
nWinScript
=
SvtLanguageOptions
::
GetScriptTypeOfLanguage
(
eSystemLanguage
);
bAutoEnableCJK
=
(
nWinScript
&
SCRIPTTYPE_ASIAN
);
}
//CJK keyboard is installed
if
(
!
bAutoEnableCJK
)
bAutoEnableCJK
=
aSystemLocaleSettings
.
isCJKKeyboardLayoutInstalled
();
}
if
(
bAutoEnableCJK
)
{
SetAll
(
sal_True
);
}
}
}
bIsLoaded
=
sal_True
;
bIsLoaded
=
sal_True
;
}
}
...
...
svl/source/config/ctloptions.cxx
Dosyayı görüntüle @
d75dd80a
...
@@ -287,21 +287,46 @@ void SvtCTLOptions_Impl::Load()
...
@@ -287,21 +287,46 @@ void SvtCTLOptions_Impl::Load()
}
}
}
}
}
}
sal_uInt16
nType
=
SvtLanguageOptions
::
GetScriptTypeOfLanguage
(
LANGUAGE_SYSTEM
);
SvtSystemLanguageOptions
aSystemLocaleSettings
;
if
(
!
m_bCTLFontEnabled
)
LanguageType
eSystemLanguage
=
aSystemLocaleSettings
.
GetWin16SystemLanguage
();
sal_uInt16
nWinScript
=
SvtLanguageOptions
::
GetScriptTypeOfLanguage
(
eSystemLanguage
);
if
(
!
m_bCTLFontEnabled
&&
((
nType
&
SCRIPTTYPE_COMPLEX
)
||
((
eSystemLanguage
!=
LANGUAGE_SYSTEM
)
&&
(
nWinScript
&
SCRIPTTYPE_COMPLEX
)))
)
{
{
m_bCTLFontEnabled
=
sal_True
;
bool
bAutoEnableCTL
=
false
;
sal_uInt16
nLanguage
=
SvtSysLocale
().
GetLanguageTag
().
getLanguageType
();
//enable sequence checking for the appropriate languages
sal_uInt16
nScriptType
=
SvtLanguageOptions
::
GetScriptTypeOfLanguage
(
LANGUAGE_SYSTEM
);
m_bCTLSequenceChecking
=
m_bCTLRestricted
=
m_bCTLTypeAndReplace
=
//system locale is CTL
(
MsLangId
::
needsSequenceChecking
(
nLanguage
)
||
bAutoEnableCTL
=
(
nScriptType
&
SCRIPTTYPE_COMPLEX
);
MsLangId
::
needsSequenceChecking
(
eSystemLanguage
));
Commit
();
LanguageType
eSystemLanguage
=
LANGUAGE_SYSTEM
;
if
(
!
bAutoEnableCTL
)
{
SvtSystemLanguageOptions
aSystemLocaleSettings
;
//windows secondary system locale is CTL
eSystemLanguage
=
aSystemLocaleSettings
.
GetWin16SystemLanguage
();
if
(
eSystemLanguage
!=
LANGUAGE_SYSTEM
)
{
sal_uInt16
nWinScript
=
SvtLanguageOptions
::
GetScriptTypeOfLanguage
(
eSystemLanguage
);
bAutoEnableCTL
=
(
nWinScript
&
SCRIPTTYPE_COMPLEX
);
}
//CTL keyboard is installed
if
(
!
bAutoEnableCTL
)
bAutoEnableCTL
=
aSystemLocaleSettings
.
isCTLKeyboardLayoutInstalled
();
}
if
(
bAutoEnableCTL
)
{
m_bCTLFontEnabled
=
sal_True
;
sal_uInt16
nLanguage
=
SvtSysLocale
().
GetLanguageTag
().
getLanguageType
();
//enable sequence checking for the appropriate languages
m_bCTLSequenceChecking
=
m_bCTLRestricted
=
m_bCTLTypeAndReplace
=
(
MsLangId
::
needsSequenceChecking
(
nLanguage
)
||
MsLangId
::
needsSequenceChecking
(
eSystemLanguage
));
Commit
();
}
}
}
m_bIsLoaded
=
sal_True
;
m_bIsLoaded
=
sal_True
;
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
...
...
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