diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-25 17:12:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-26 10:59:42 +0200 |
commit | d9b6f4fd38da9f875b78f6ff365bcb16fb2c8e8b (patch) | |
tree | 7d38b04189cfa4fd4f4f91324fc6c95f360f080c /unotools/source/config | |
parent | 084f454e8caa2d9e43f7bdea098538bfb87423d8 (diff) |
loplugin:constmethods in unotools
Change-Id: I13df4e184a826682f34a1d9e974b601397ba4a3d
Reviewed-on: https://gerrit.libreoffice.org/43865
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools/source/config')
-rw-r--r-- | unotools/source/config/eventcfg.cxx | 8 | ||||
-rw-r--r-- | unotools/source/config/extendedsecurityoptions.cxx | 4 | ||||
-rw-r--r-- | unotools/source/config/historyoptions.cxx | 4 | ||||
-rw-r--r-- | unotools/source/config/lingucfg.cxx | 6 | ||||
-rw-r--r-- | unotools/source/config/moduleoptions.cxx | 2 | ||||
-rw-r--r-- | unotools/source/config/syslocaleoptions.cxx | 6 |
6 files changed, 15 insertions, 15 deletions
diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx index 2a8dc2034822..b998e820f28b 100644 --- a/unotools/source/config/eventcfg.cxx +++ b/unotools/source/config/eventcfg.cxx @@ -113,8 +113,8 @@ public: /// @throws css::uno::RuntimeException static css::uno::Type SAL_CALL getElementType( ); /// @throws css::uno::RuntimeException - bool SAL_CALL hasElements( ); - OUString GetEventName( GlobalEventId nID ); + bool SAL_CALL hasElements() const; + OUString const & GetEventName( GlobalEventId nID ) const; }; @@ -141,7 +141,7 @@ GlobalEventConfig_Impl::~GlobalEventConfig_Impl() assert(!IsModified()); // should have been committed } -OUString GlobalEventConfig_Impl::GetEventName( GlobalEventId nIndex ) +OUString const & GlobalEventConfig_Impl::GetEventName( GlobalEventId nIndex ) const { return m_supportedEvents[nIndex]; } @@ -306,7 +306,7 @@ Type SAL_CALL GlobalEventConfig_Impl::getElementType( ) return cppu::UnoType<Sequence<beans::PropertyValue>>::get(); } -bool SAL_CALL GlobalEventConfig_Impl::hasElements( ) +bool SAL_CALL GlobalEventConfig_Impl::hasElements() const { return m_eventBindingHash.empty(); } diff --git a/unotools/source/config/extendedsecurityoptions.cxx b/unotools/source/config/extendedsecurityoptions.cxx index 46841d3dad01..2d1279c95f52 100644 --- a/unotools/source/config/extendedsecurityoptions.cxx +++ b/unotools/source/config/extendedsecurityoptions.cxx @@ -72,7 +72,7 @@ class SvtExtendedSecurityOptions_Impl : public ConfigItem virtual void Notify( const Sequence< OUString >& seqPropertyNames ) override; - SvtExtendedSecurityOptions::OpenHyperlinkMode GetOpenHyperlinkMode() { return m_eOpenHyperlinkMode;} + SvtExtendedSecurityOptions::OpenHyperlinkMode GetOpenHyperlinkMode() const { return m_eOpenHyperlinkMode;} private: virtual void ImplCommit() override; @@ -265,7 +265,7 @@ SvtExtendedSecurityOptions::~SvtExtendedSecurityOptions() // public method -SvtExtendedSecurityOptions::OpenHyperlinkMode SvtExtendedSecurityOptions::GetOpenHyperlinkMode() +SvtExtendedSecurityOptions::OpenHyperlinkMode SvtExtendedSecurityOptions::GetOpenHyperlinkMode() const { MutexGuard aGuard( GetInitMutex() ); return m_pImpl->GetOpenHyperlinkMode(); diff --git a/unotools/source/config/historyoptions.cxx b/unotools/source/config/historyoptions.cxx index e12403f77784..d867f768d9bf 100644 --- a/unotools/source/config/historyoptions.cxx +++ b/unotools/source/config/historyoptions.cxx @@ -69,7 +69,7 @@ public: SvtHistoryOptions_Impl(); /// Returns the maximum size of the internal lists, ie. the capacity not the size. - sal_uInt32 GetCapacity(EHistoryType eHistory); + sal_uInt32 GetCapacity(EHistoryType eHistory) const; /// Clear the specified history list. void Clear(EHistoryType eHistory); @@ -121,7 +121,7 @@ SvtHistoryOptions_Impl::SvtHistoryOptions_Impl() } } -sal_uInt32 SvtHistoryOptions_Impl::GetCapacity(EHistoryType eHistory) +sal_uInt32 SvtHistoryOptions_Impl::GetCapacity(EHistoryType eHistory) const { uno::Reference<beans::XPropertySet> xListAccess(m_xCommonXCU, uno::UNO_QUERY); diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx index 6be5e6ce8824..5e2bab397cf3 100644 --- a/unotools/source/config/lingucfg.cxx +++ b/unotools/source/config/lingucfg.cxx @@ -831,12 +831,12 @@ SvtLinguConfigItem & SvtLinguConfig::GetConfigItem() return *pCfgItem; } -uno::Sequence< OUString > SvtLinguConfig::GetNodeNames( const OUString &rNode ) +uno::Sequence< OUString > SvtLinguConfig::GetNodeNames( const OUString &rNode ) const { return GetConfigItem().GetNodeNames( rNode ); } -uno::Sequence< uno::Any > SvtLinguConfig::GetProperties( const uno::Sequence< OUString > &rNames ) +uno::Sequence< uno::Any > SvtLinguConfig::GetProperties( const uno::Sequence< OUString > &rNames ) const { return GetConfigItem().GetProperties(rNames); } @@ -1008,7 +1008,7 @@ uno::Sequence< OUString > SvtLinguConfig::GetDisabledDictionaries() const } std::vector< SvtLinguConfigDictionaryEntry > SvtLinguConfig::GetActiveDictionariesByFormat( - const OUString &rFormatName ) + const OUString &rFormatName ) const { std::vector< SvtLinguConfigDictionaryEntry > aRes; if (rFormatName.isEmpty()) diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx index 3d92b72cfe1d..12e0eefe6a81 100644 --- a/unotools/source/config/moduleoptions.cxx +++ b/unotools/source/config/moduleoptions.cxx @@ -1120,7 +1120,7 @@ css::uno::Sequence < OUString > SvtModuleOptions::GetAllServiceNames() return m_pImpl->GetAllServiceNames(); } -OUString SvtModuleOptions::GetDefaultModuleName() +OUString SvtModuleOptions::GetDefaultModuleName() const { OUString aModule; if (m_pImpl->IsModuleInstalled(SvtModuleOptions::EModule::WRITER)) diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx index d9d15a391c2e..4eadf6d3aa54 100644 --- a/unotools/source/config/syslocaleoptions.cxx +++ b/unotools/source/config/syslocaleoptions.cxx @@ -107,8 +107,8 @@ public: void SetIgnoreLanguageChange( bool bSet); bool IsReadOnly( SvtSysLocaleOptions::EOption eOption ) const; - const LanguageTag& GetRealLocale() { return m_aRealLocale; } - const LanguageTag& GetRealUILocale() { return m_aRealUILocale; } + const LanguageTag& GetRealLocale() const { return m_aRealLocale; } + const LanguageTag& GetRealUILocale() const { return m_aRealUILocale; } }; #define ROOTNODE_SYSLOCALE "Setup/L10N" @@ -555,7 +555,7 @@ SvtSysLocaleOptions::~SvtSysLocaleOptions() pImpl.reset(); } -bool SvtSysLocaleOptions::IsModified() +bool SvtSysLocaleOptions::IsModified() const { MutexGuard aGuard( GetMutex() ); return pImpl->IsModified(); |