summaryrefslogtreecommitdiff
path: root/unotools/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-09-16 15:55:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-09-17 08:40:59 +0200
commit7fd3c5e8e5897617f1e89fda26f8cdbd4092071d (patch)
tree60704a90ddff313e6702925224a747cac0d6f1cc /unotools/source
parent388685ea72fc22bd375e9f31a339632e175f4290 (diff)
remove GetCharClassPtr from SvtSysLocale
we already have GetCharClass and we never return a nullptr Change-Id: I3cb79bc60be614c0474ecfdaad17991f2ecb6368 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122208 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools/source')
-rw-r--r--unotools/source/misc/syslocale.cxx13
1 files changed, 4 insertions, 9 deletions
diff --git a/unotools/source/misc/syslocale.cxx b/unotools/source/misc/syslocale.cxx
index 0201d9f8be72..2882eb7fc436 100644
--- a/unotools/source/misc/syslocale.cxx
+++ b/unotools/source/misc/syslocale.cxx
@@ -53,7 +53,7 @@ public:
SvtSysLocale_Impl();
virtual ~SvtSysLocale_Impl() override;
- CharClass* GetCharClass();
+ CharClass& GetCharClass();
virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) override;
private:
@@ -75,11 +75,11 @@ SvtSysLocale_Impl::~SvtSysLocale_Impl()
aSysLocaleOptions.RemoveListener( this );
}
-CharClass* SvtSysLocale_Impl::GetCharClass()
+CharClass& SvtSysLocale_Impl::GetCharClass()
{
if ( !pCharClass )
pCharClass.reset(new CharClass( aSysLocaleOptions.GetRealLanguageTag() ));
- return pCharClass.get();
+ return *pCharClass;
}
void SvtSysLocale_Impl::ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints nHint )
@@ -93,7 +93,7 @@ void SvtSysLocale_Impl::ConfigurationChanged( utl::ConfigurationBroadcaster*, Co
const LanguageTag& rLanguageTag = aSysLocaleOptions.GetRealLanguageTag();
if ( nHint & ConfigurationHints::Locale )
{
- GetCharClass()->setLanguageTag( rLanguageTag );
+ GetCharClass().setLanguageTag( rLanguageTag );
}
pLocaleData.reset(new LocaleDataWrapper(rLanguageTag, getDateAcceptancePatternsConfig()));
}
@@ -148,11 +148,6 @@ const LocaleDataWrapper& SvtSysLocale::GetLocaleData() const
const CharClass& SvtSysLocale::GetCharClass() const
{
- return *(pImpl->GetCharClass());
-}
-
-const CharClass* SvtSysLocale::GetCharClassPtr() const
-{
return pImpl->GetCharClass();
}