diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-01 20:34:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-03 09:12:32 +0200 |
commit | ddef1e2c017b7d8e421dedc1a0ce722ff4208985 (patch) | |
tree | 54e52c86e4e33bcb61eee44706117b1616e99624 /cui/source | |
parent | 0a6d946694e4fcb39228c5e1fec58fcfd8a45989 (diff) |
add o3tl::equalsAscii
Change-Id: I042b8dcadbf7581de325c161763fe35aecde5ca2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133694
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/options/optgdlg.cxx | 18 | ||||
-rw-r--r-- | cui/source/options/optsave.cxx | 5 |
2 files changed, 12 insertions, 11 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index fb39369984b9..4a7778973471 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -1365,7 +1365,7 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet ) Any aValue; Locale aLocale = LanguageTag::convertToLocale( eSelectLang, false); aValue <<= aLocale; - pLangConfig->aLinguConfig.SetProperty( "DefaultLocale", aValue ); + pLangConfig->aLinguConfig.SetProperty( u"DefaultLocale", aValue ); if (xLinguProp.is()) xLinguProp->setDefaultLocale( aLocale ); } @@ -1384,7 +1384,7 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet ) Any aValue; Locale aLocale = LanguageTag::convertToLocale( eSelectLang, false); aValue <<= aLocale; - pLangConfig->aLinguConfig.SetProperty( "DefaultLocale_CJK", aValue ); + pLangConfig->aLinguConfig.SetProperty( u"DefaultLocale_CJK", aValue ); if (xLinguProp.is()) xLinguProp->setDefaultLocale_CJK( aLocale ); } @@ -1403,7 +1403,7 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet ) Any aValue; Locale aLocale = LanguageTag::convertToLocale( eSelectLang, false); aValue <<= aLocale; - pLangConfig->aLinguConfig.SetProperty( "DefaultLocale_CTL", aValue ); + pLangConfig->aLinguConfig.SetProperty( u"DefaultLocale_CTL", aValue ); if (xLinguProp.is()) xLinguProp->setDefaultLocale_CTL( aLocale ); } @@ -1530,18 +1530,18 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet* rSet ) Any aCTLLang; try { - aWestLang = pLangConfig->aLinguConfig.GetProperty("DefaultLocale"); + aWestLang = pLangConfig->aLinguConfig.GetProperty(u"DefaultLocale"); Locale aLocale; aWestLang >>= aLocale; eCurLang = LanguageTag::convertToLanguageType( aLocale, false); - aCJKLang = pLangConfig->aLinguConfig.GetProperty("DefaultLocale_CJK"); + aCJKLang = pLangConfig->aLinguConfig.GetProperty(u"DefaultLocale_CJK"); aLocale = Locale(); aCJKLang >>= aLocale; eCurLangCJK = LanguageTag::convertToLanguageType( aLocale, false); - aCTLLang = pLangConfig->aLinguConfig.GetProperty("DefaultLocale_CTL"); + aCTLLang = pLangConfig->aLinguConfig.GetProperty(u"DefaultLocale_CTL"); aLocale = Locale(); aCTLLang >>= aLocale; eCurLangCTL = LanguageTag::convertToLanguageType( aLocale, false); @@ -1596,7 +1596,7 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet* rSet ) m_xIgnoreLanguageChangeCB->save_state(); m_xCurrentDocCB->save_state(); - bool bEnable = !pLangConfig->aLinguConfig.IsReadOnly( "DefaultLocale" ); + bool bEnable = !pLangConfig->aLinguConfig.IsReadOnly( u"DefaultLocale" ); m_xWesternLanguageFT->set_sensitive( bEnable ); m_xWesternLanguageLB->set_sensitive( bEnable ); @@ -1616,7 +1616,7 @@ IMPL_LINK(OfaLanguagesTabPage, SupportHdl, weld::Toggleable&, rBox, void) bool bCheck = rBox.get_active(); if ( m_xAsianSupportCB.get() == &rBox ) { - bool bReadonly = pLangConfig->aLinguConfig.IsReadOnly("DefaultLocale_CJK"); + bool bReadonly = pLangConfig->aLinguConfig.IsReadOnly(u"DefaultLocale_CJK"); bCheck = ( bCheck && !bReadonly ); m_xAsianLanguageLB->set_sensitive( bCheck ); if (rBox.get_sensitive()) @@ -1624,7 +1624,7 @@ IMPL_LINK(OfaLanguagesTabPage, SupportHdl, weld::Toggleable&, rBox, void) } else if ( m_xCTLSupportCB.get() == &rBox ) { - bool bReadonly = pLangConfig->aLinguConfig.IsReadOnly("DefaultLocale_CTL"); + bool bReadonly = pLangConfig->aLinguConfig.IsReadOnly(u"DefaultLocale_CTL"); bCheck = ( bCheck && !bReadonly ); m_xComplexLanguageLB->set_sensitive( bCheck ); if (rBox.get_sensitive()) diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx index 4c783e15298e..717fa623a668 100644 --- a/cui/source/options/optsave.cxx +++ b/cui/source/options/optsave.cxx @@ -21,6 +21,7 @@ #include <string_view> +#include <o3tl/string_view.hxx> #include <svl/eitem.hxx> #include <svl/intitem.hxx> #include "optsave.hxx" @@ -324,7 +325,7 @@ bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet ) return bModified; } -static bool isODFFormat( const OUString& sFilter ) +static bool isODFFormat( std::u16string_view sFilter ) { static const char* aODFFormats[] = { @@ -348,7 +349,7 @@ static bool isODFFormat( const OUString& sFilter ) int i = 0; while ( aODFFormats[i] != nullptr ) { - if ( sFilter.equalsAscii( aODFFormats[i++] ) ) + if ( o3tl::equalsAscii( sFilter, aODFFormats[i++] ) ) { bRet = true; break; |