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
a865cec5
Kaydet (Commit)
a865cec5
authored
Tem 12, 2013
tarafından
Marc Garcia
Kaydeden (comit)
Caolán McNamara
Tem 12, 2013
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Related: fdo#54493 determine if a CJK/CTL keyboard is installed
Change-Id: If21a34c69f58612f8ec2eba1253f325f352962cd
üst
20cbceac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
0 deletions
+52
-0
languageoptions.hxx
include/svl/languageoptions.hxx
+5
-0
languageoptions.cxx
svl/source/config/languageoptions.cxx
+47
-0
No files found.
include/svl/languageoptions.hxx
Dosyayı görüntüle @
a865cec5
...
@@ -98,6 +98,8 @@ class SVL_DLLPUBLIC SvtSystemLanguageOptions : public utl::ConfigItem
...
@@ -98,6 +98,8 @@ class SVL_DLLPUBLIC SvtSystemLanguageOptions : public utl::ConfigItem
private
:
private
:
OUString
m_sWin16SystemLocale
;
OUString
m_sWin16SystemLocale
;
bool
isKeyboardLayoutTypeInstalled
(
sal_Int16
scriptType
);
public
:
public
:
SvtSystemLanguageOptions
();
SvtSystemLanguageOptions
();
~
SvtSystemLanguageOptions
();
~
SvtSystemLanguageOptions
();
...
@@ -106,6 +108,9 @@ public:
...
@@ -106,6 +108,9 @@ public:
virtual
void
Notify
(
const
com
::
sun
::
star
::
uno
::
Sequence
<
OUString
>&
rPropertyNames
);
virtual
void
Notify
(
const
com
::
sun
::
star
::
uno
::
Sequence
<
OUString
>&
rPropertyNames
);
LanguageType
GetWin16SystemLanguage
();
LanguageType
GetWin16SystemLanguage
();
bool
isCTLKeyboardLayoutInstalled
();
bool
isCJKKeyboardLayoutInstalled
();
};
};
#endif // _SVTOOLS_LANGUAGEOPTIONS_HXX
#endif // _SVTOOLS_LANGUAGEOPTIONS_HXX
...
...
svl/source/config/languageoptions.cxx
Dosyayı görüntüle @
a865cec5
...
@@ -28,6 +28,10 @@
...
@@ -28,6 +28,10 @@
#include <com/sun/star/i18n/ScriptType.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <unotools/syslocale.hxx>
#include <unotools/syslocale.hxx>
#ifdef WNT
#include <windows.h>
#endif
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
;
// global ----------------------------------------------------------------------
// global ----------------------------------------------------------------------
...
@@ -205,4 +209,47 @@ LanguageType SvtSystemLanguageOptions::GetWin16SystemLanguage()
...
@@ -205,4 +209,47 @@ LanguageType SvtSystemLanguageOptions::GetWin16SystemLanguage()
}
}
bool
SvtSystemLanguageOptions
::
isKeyboardLayoutTypeInstalled
(
sal_Int16
scriptType
)
{
bool
isInstalled
=
false
;
#ifdef WNT
int
nLayouts
=
GetKeyboardLayoutList
(
0
,
NULL
);
if
(
nLayouts
>
0
)
{
HKL
*
lpList
=
(
HKL
*
)
LocalAlloc
(
LPTR
,
(
nLayouts
*
sizeof
(
HKL
)));
if
(
lpList
)
{
nLayouts
=
GetKeyboardLayoutList
(
nLayouts
,
lpList
);
for
(
int
i
=
0
;
i
<
nLayouts
;
++
i
)
{
LCID
lang
=
MAKELCID
(((
UINT
)
lpList
[
i
]
&
0xffffffff
),
SORT_DEFAULT
);
if
(
MsLangId
::
getScriptType
(
lang
)
==
scriptType
)
{
isInstalled
=
true
;
break
;
}
}
LocalFree
(
lpList
);
}
}
#else
(
void
)
scriptType
;
#endif
return
isInstalled
;
}
bool
SvtSystemLanguageOptions
::
isCTLKeyboardLayoutInstalled
()
{
return
isKeyboardLayoutTypeInstalled
(
::
com
::
sun
::
star
::
i18n
::
ScriptType
::
COMPLEX
);
}
bool
SvtSystemLanguageOptions
::
isCJKKeyboardLayoutInstalled
()
{
return
isKeyboardLayoutTypeInstalled
(
::
com
::
sun
::
star
::
i18n
::
ScriptType
::
ASIAN
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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