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
dcf67b25
Kaydet (Commit)
dcf67b25
authored
Eki 25, 2010
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
micro optimization
üst
6a679931
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
langselect.cxx
desktop/source/app/langselect.cxx
+14
-14
No files found.
desktop/source/app/langselect.cxx
Dosyayı görüntüle @
dcf67b25
...
...
@@ -70,7 +70,7 @@ sal_Bool LanguageSelection::bFoundLanguage = sal_False;
OUString
LanguageSelection
::
aFoundLanguage
;
LanguageSelection
::
LanguageSelectionStatus
LanguageSelection
::
m_eStatus
=
LS_STATUS_OK
;
const
OUString
LanguageSelection
::
usFallbackLanguage
=
OUString
::
createFromAscii
(
"en-US"
);
const
OUString
LanguageSelection
::
usFallbackLanguage
(
RTL_CONSTASCII_USTRINGPARAM
(
"en-US"
)
);
static
sal_Bool
existsURL
(
OUString
const
&
sURL
)
{
...
...
@@ -126,7 +126,7 @@ Locale LanguageSelection::IsoStringToLocale(const OUString& str)
bool
LanguageSelection
::
prepareLanguage
()
{
m_eStatus
=
LS_STATUS_OK
;
OUString
sConfigSrvc
=
OUString
::
createFromAscii
(
"com.sun.star.configuration.ConfigurationProvider"
);
OUString
sConfigSrvc
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.configuration.ConfigurationProvider"
)
);
Reference
<
XMultiServiceFactory
>
theMSF
=
comphelper
::
getProcessServiceFactory
();
Reference
<
XLocalizable
>
theConfigProvider
;
try
...
...
@@ -147,7 +147,7 @@ bool LanguageSelection::prepareLanguage()
try
{
Reference
<
XPropertySet
>
xProp
(
getConfigAccess
(
"org.openoffice.System/L10N/"
,
sal_False
),
UNO_QUERY_THROW
);
Any
aWin16SysLocale
=
xProp
->
getPropertyValue
(
OUString
::
createFromAscii
(
"SystemLocale"
));
Any
aWin16SysLocale
=
xProp
->
getPropertyValue
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"SystemLocale"
)
));
::
rtl
::
OUString
sWin16SysLocale
;
aWin16SysLocale
>>=
sWin16SysLocale
;
if
(
sWin16SysLocale
.
getLength
())
...
...
@@ -164,7 +164,7 @@ bool LanguageSelection::prepareLanguage()
OUString
usLocale
;
Reference
<
XPropertySet
>
xLocaleProp
(
getConfigAccess
(
"org.openoffice.System/L10N"
,
sal_True
),
UNO_QUERY_THROW
);
xLocaleProp
->
getPropertyValue
(
OUString
::
createFromAscii
(
"Locale"
))
>>=
usLocale
;
xLocaleProp
->
getPropertyValue
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"Locale"
)
))
>>=
usLocale
;
setDefaultLanguage
(
usLocale
);
}
catch
(
Exception
&
)
...
...
@@ -235,7 +235,7 @@ bool LanguageSelection::prepareLanguage()
if
(
!
bCmdLanguage
)
{
// Store language only
xProp
->
setPropertyValue
(
OUString
::
createFromAscii
(
"ooLocale"
),
makeAny
(
aLocaleString
));
xProp
->
setPropertyValue
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"ooLocale"
)
),
makeAny
(
aLocaleString
));
Reference
<
XChangesBatch
>
(
xProp
,
UNO_QUERY_THROW
)
->
commitChanges
();
}
...
...
@@ -243,14 +243,14 @@ bool LanguageSelection::prepareLanguage()
{
// Store language only
Reference
<
XPropertySet
>
xProp2
(
getConfigAccess
(
"org.openoffice.Office.Linguistic/General/"
,
sal_True
),
UNO_QUERY_THROW
);
xProp2
->
setPropertyValue
(
OUString
::
createFromAscii
(
"UILocale"
),
makeAny
(
aLocaleString
));
xProp2
->
setPropertyValue
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"UILocale"
)
),
makeAny
(
aLocaleString
));
Reference
<
XChangesBatch
>
(
xProp2
,
UNO_QUERY_THROW
)
->
commitChanges
();
}
MsLangId
::
setConfiguredSystemUILanguage
(
MsLangId
::
convertLocaleToLanguage
(
loc
)
);
OUString
sLocale
;
xProp
->
getPropertyValue
(
OUString
::
createFromAscii
(
"ooSetupSystemLocale"
))
>>=
sLocale
;
xProp
->
getPropertyValue
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"ooSetupSystemLocale"
)
))
>>=
sLocale
;
if
(
sLocale
.
getLength
()
)
{
loc
=
LanguageSelection
::
IsoStringToLocale
(
sLocale
);
...
...
@@ -371,12 +371,12 @@ Reference< XNameAccess > LanguageSelection::getConfigAccess(const sal_Char* pPat
{
Reference
<
XNameAccess
>
xNameAccess
;
try
{
OUString
sConfigSrvc
=
OUString
::
createFromAscii
(
"com.sun.star.configuration.ConfigurationProvider"
);
OUString
sConfigSrvc
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.configuration.ConfigurationProvider"
)
);
OUString
sAccessSrvc
;
if
(
bUpdate
)
sAccessSrvc
=
OUString
::
createFromAscii
(
"com.sun.star.configuration.ConfigurationUpdateAccess"
);
sAccessSrvc
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.configuration.ConfigurationUpdateAccess"
)
);
else
sAccessSrvc
=
OUString
::
createFromAscii
(
"com.sun.star.configuration.ConfigurationAccess"
);
sAccessSrvc
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.configuration.ConfigurationAccess"
)
);
OUString
sConfigURL
=
OUString
::
createFromAscii
(
pPath
);
...
...
@@ -418,7 +418,7 @@ static Sequence< OUString > _getFallbackLocales(const OUString& aIsoLang)
Sequence
<
OUString
>
seqFallbacks
;
if
(
aIsoLang
.
equalsAscii
(
"zh-HK"
))
{
seqFallbacks
=
Sequence
<
OUString
>
(
1
);
seqFallbacks
[
0
]
=
OUString
::
createFromAscii
(
"zh-TW"
);
seqFallbacks
[
0
]
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"zh-TW"
)
);
}
return
seqFallbacks
;
}
...
...
@@ -490,7 +490,7 @@ OUString LanguageSelection::getUserLanguage()
{
try
{
xAccess
->
getByName
(
OUString
::
createFromAscii
(
"UILocale"
))
>>=
aUserLanguage
;
xAccess
->
getByName
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"UILocale"
)
))
>>=
aUserLanguage
;
}
catch
(
NoSuchElementException
const
&
)
{
...
...
@@ -514,7 +514,7 @@ OUString LanguageSelection::getSystemLanguage()
{
try
{
xAccess
->
getByName
(
OUString
::
createFromAscii
(
"UILocale"
))
>>=
aUserLanguage
;
xAccess
->
getByName
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"UILocale"
)
))
>>=
aUserLanguage
;
}
catch
(
NoSuchElementException
const
&
)
{
...
...
@@ -536,7 +536,7 @@ void LanguageSelection::resetUserLanguage()
try
{
Reference
<
XPropertySet
>
xProp
(
getConfigAccess
(
"org.openoffice.Office.Linguistic/General"
,
sal_True
),
UNO_QUERY_THROW
);
xProp
->
setPropertyValue
(
OUString
::
createFromAscii
(
"UILocale"
),
makeAny
(
OUString
::
createFromAscii
(
""
)));
xProp
->
setPropertyValue
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"UILocale"
)
),
makeAny
(
OUString
::
createFromAscii
(
""
)));
Reference
<
XChangesBatch
>
(
xProp
,
UNO_QUERY_THROW
)
->
commitChanges
();
}
catch
(
PropertyVetoException
&
)
...
...
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