convert SvtSysLocaleOptions::EOption to scoped enum
and drop unused E_UILOCALE enumerator Change-Id: Ic9bdac91fab15af45e7dbd613e6e44b73b5cf9de Reviewed-on: https://gerrit.libreoffice.org/34066 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -1573,7 +1573,7 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet* rSet )
|
|||||||
m_pLocaleSettingLB->SelectLanguage( LANGUAGE_USER_SYSTEM_CONFIG );
|
m_pLocaleSettingLB->SelectLanguage( LANGUAGE_USER_SYSTEM_CONFIG );
|
||||||
else
|
else
|
||||||
m_pLocaleSettingLB->SelectLanguage( aLanguageTag.makeFallback().getLanguageType());
|
m_pLocaleSettingLB->SelectLanguage( aLanguageTag.makeFallback().getLanguageType());
|
||||||
bool bReadonly = pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::E_LOCALE);
|
bool bReadonly = pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::EOption::Locale);
|
||||||
m_pLocaleSettingLB->Enable(!bReadonly);
|
m_pLocaleSettingLB->Enable(!bReadonly);
|
||||||
m_pLocaleSettingFT->Enable(!bReadonly);
|
m_pLocaleSettingFT->Enable(!bReadonly);
|
||||||
|
|
||||||
@@ -1602,7 +1602,7 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet* rSet )
|
|||||||
// if pCurr==NULL the SYSTEM entry is selected
|
// if pCurr==NULL the SYSTEM entry is selected
|
||||||
const sal_Int32 nPos = m_pCurrencyLB->GetEntryPos( static_cast<void const *>(pCurr) );
|
const sal_Int32 nPos = m_pCurrencyLB->GetEntryPos( static_cast<void const *>(pCurr) );
|
||||||
m_pCurrencyLB->SelectEntryPos( nPos );
|
m_pCurrencyLB->SelectEntryPos( nPos );
|
||||||
bReadonly = pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::E_CURRENCY);
|
bReadonly = pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::EOption::Currency);
|
||||||
m_pCurrencyLB->Enable(!bReadonly);
|
m_pCurrencyLB->Enable(!bReadonly);
|
||||||
m_pCurrencyFT->Enable(!bReadonly);
|
m_pCurrencyFT->Enable(!bReadonly);
|
||||||
|
|
||||||
@@ -1616,7 +1616,7 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet* rSet )
|
|||||||
// Let's assume patterns are valid at this point.
|
// Let's assume patterns are valid at this point.
|
||||||
m_bDatePatternsValid = true;
|
m_bDatePatternsValid = true;
|
||||||
m_pDatePatternsED->SetText( aDatePatternsString);
|
m_pDatePatternsED->SetText( aDatePatternsString);
|
||||||
bReadonly = pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::E_DATEPATTERNS);
|
bReadonly = pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::EOption::DatePatterns);
|
||||||
m_pDatePatternsED->Enable(!bReadonly);
|
m_pDatePatternsED->Enable(!bReadonly);
|
||||||
m_pDatePatternsFT->Enable(!bReadonly);
|
m_pDatePatternsFT->Enable(!bReadonly);
|
||||||
m_pDatePatternsED->SaveValue();
|
m_pDatePatternsED->SaveValue();
|
||||||
|
@@ -42,12 +42,11 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtSysLocaleOptions : public utl::detai
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
enum EOption
|
enum class EOption
|
||||||
{
|
{
|
||||||
E_LOCALE,
|
Locale,
|
||||||
E_UILOCALE,
|
Currency,
|
||||||
E_CURRENCY,
|
DatePatterns
|
||||||
E_DATEPATTERNS
|
|
||||||
};
|
};
|
||||||
SvtSysLocaleOptions();
|
SvtSysLocaleOptions();
|
||||||
virtual ~SvtSysLocaleOptions() override;
|
virtual ~SvtSysLocaleOptions() override;
|
||||||
|
@@ -283,22 +283,17 @@ bool SvtSysLocaleOptions_Impl::IsReadOnly( SvtSysLocaleOptions::EOption eOption
|
|||||||
bool bReadOnly = CFG_READONLY_DEFAULT;
|
bool bReadOnly = CFG_READONLY_DEFAULT;
|
||||||
switch(eOption)
|
switch(eOption)
|
||||||
{
|
{
|
||||||
case SvtSysLocaleOptions::E_LOCALE :
|
case SvtSysLocaleOptions::EOption::Locale :
|
||||||
{
|
{
|
||||||
bReadOnly = m_bROLocale;
|
bReadOnly = m_bROLocale;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SvtSysLocaleOptions::E_UILOCALE :
|
case SvtSysLocaleOptions::EOption::Currency :
|
||||||
{
|
|
||||||
bReadOnly = m_bROUILocale;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SvtSysLocaleOptions::E_CURRENCY :
|
|
||||||
{
|
{
|
||||||
bReadOnly = m_bROCurrency;
|
bReadOnly = m_bROCurrency;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SvtSysLocaleOptions::E_DATEPATTERNS :
|
case SvtSysLocaleOptions::EOption::DatePatterns :
|
||||||
{
|
{
|
||||||
bReadOnly = m_bRODatePatterns;
|
bReadOnly = m_bRODatePatterns;
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user