diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-27 09:03:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-30 13:21:13 +0100 |
commit | db378d64a9ca8675066fda31f3bd77dc37c52398 (patch) | |
tree | dc6c2c85b4996cff913c9f590eda19712bf9e309 /stoc/source | |
parent | 9ee60319c675087486907707c8a2b18b5c9dc9fc (diff) |
loplugin:constmethod in vcl and stoc
Change-Id: I7c02eecc16ca7cf89d9f7021116b0226885dbf06
Reviewed-on: https://gerrit.libreoffice.org/44044
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'stoc/source')
-rw-r--r-- | stoc/source/corereflection/criface.cxx | 8 | ||||
-rw-r--r-- | stoc/source/implementationregistration/implreg.cxx | 4 | ||||
-rw-r--r-- | stoc/source/servicemanager/servicemanager.cxx | 6 | ||||
-rw-r--r-- | stoc/source/uriproc/UriReference.cxx | 2 | ||||
-rw-r--r-- | stoc/source/uriproc/UriReference.hxx | 4 | ||||
-rw-r--r-- | stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx | 4 |
6 files changed, 14 insertions, 14 deletions
diff --git a/stoc/source/corereflection/criface.cxx b/stoc/source/corereflection/criface.cxx index 9ead12622f54..50290d0b5c6b 100644 --- a/stoc/source/corereflection/criface.cxx +++ b/stoc/source/corereflection/criface.cxx @@ -64,7 +64,7 @@ class IdlAttributeFieldImpl , public XIdlField2 { public: - typelib_InterfaceAttributeTypeDescription * getAttributeTypeDescr() + typelib_InterfaceAttributeTypeDescription * getAttributeTypeDescr() const { return reinterpret_cast<typelib_InterfaceAttributeTypeDescription *>(getTypeDescr()); } IdlAttributeFieldImpl( IdlReflectionServiceImpl * pReflection, const OUString & rName, @@ -94,7 +94,7 @@ public: private: void checkException( - uno_Any * exception, Reference< XInterface > const & context); + uno_Any * exception, Reference< XInterface > const & context) const; }; // XInterface @@ -301,7 +301,7 @@ void IdlAttributeFieldImpl::set( const Any & rObj, const Any & rValue ) } void IdlAttributeFieldImpl::checkException( - uno_Any * exception, Reference< XInterface > const & context) + uno_Any * exception, Reference< XInterface > const & context) const { if (exception != nullptr) { Any e; @@ -332,7 +332,7 @@ class IdlInterfaceMethodImpl Sequence< ParamInfo > * _pParamInfos; public: - typelib_InterfaceMethodTypeDescription * getMethodTypeDescr() + typelib_InterfaceMethodTypeDescription * getMethodTypeDescr() const { return reinterpret_cast<typelib_InterfaceMethodTypeDescription *>(getTypeDescr()); } IdlInterfaceMethodImpl( IdlReflectionServiceImpl * pReflection, const OUString & rName, diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx index 4dae09f124f5..d9beabfe48b7 100644 --- a/stoc/source/implementationregistration/implreg.cxx +++ b/stoc/source/implementationregistration/implreg.cxx @@ -1243,7 +1243,7 @@ private: // helper methods static void doRevoke( const Reference < XSimpleRegistry >& xDest, const OUString& locationUrl ); // throw( InvalidRegistryException, RuntimeException ) - Reference< XSimpleRegistry > getRegistryFromServiceManager(); + Reference< XSimpleRegistry > getRegistryFromServiceManager() const; static Reference< XSimpleRegistry > createTemporarySimpleRegistry( const Reference< XMultiComponentFactory > &rSMgr, @@ -1281,7 +1281,7 @@ Sequence< OUString > ImplementationRegistration::getSupportedServiceNames() return seqNames; } -Reference< XSimpleRegistry > ImplementationRegistration::getRegistryFromServiceManager() +Reference< XSimpleRegistry > ImplementationRegistration::getRegistryFromServiceManager() const { Reference < XPropertySet > xPropSet( m_xSMgr, UNO_QUERY ); Reference < XSimpleRegistry > xRegistry; diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index e35ac7427996..a44d788d3ecb 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -464,7 +464,7 @@ class OServiceManagerWrapper : public OServiceManagerMutex, public t_OServiceMan { Reference< XComponentContext > m_xContext; Reference< XMultiComponentFactory > m_root; - Reference< XMultiComponentFactory > const & getRoot() + Reference< XMultiComponentFactory > const & getRoot() const { if (! m_root.is()) { @@ -1221,7 +1221,7 @@ private: Reference<XRegistryKey > getRootKey(); Reference<XInterface > loadWithImplementationName( const OUString & rImplName, Reference< XComponentContext > const & xContext ); - Sequence<OUString> getFromServiceName(const OUString& serviceName); + Sequence<OUString> getFromServiceName(const OUString& serviceName) const; Reference<XInterface > loadWithServiceName( const OUString & rImplName, Reference< XComponentContext > const & xContext ); void fillAllNamesFromRegistry( HashSet_OWString & ); @@ -1333,7 +1333,7 @@ Reference<XInterface > ORegistryServiceManager::loadWithImplementationName( * Return all implementation out of the registry. */ Sequence<OUString> ORegistryServiceManager::getFromServiceName( - const OUString& serviceName ) + const OUString& serviceName ) const { OUStringBuffer buf; buf.append( "/SERVICES/" ); diff --git a/stoc/source/uriproc/UriReference.cxx b/stoc/source/uriproc/UriReference.cxx index 2baa1f3b9b20..18ada1d3cf0b 100644 --- a/stoc/source/uriproc/UriReference.cxx +++ b/stoc/source/uriproc/UriReference.cxx @@ -67,7 +67,7 @@ OUString UriReference::getUriReference() return buf.makeStringAndClear(); } -bool UriReference::isAbsolute() { +bool UriReference::isAbsolute() const { return !m_scheme.isEmpty(); } diff --git a/stoc/source/uriproc/UriReference.hxx b/stoc/source/uriproc/UriReference.hxx index 05fdc37f6e09..b117b5710955 100644 --- a/stoc/source/uriproc/UriReference.hxx +++ b/stoc/source/uriproc/UriReference.hxx @@ -41,10 +41,10 @@ public: OUString getUriReference(); /// @throws css::uno::RuntimeException - bool isAbsolute(); + bool isAbsolute() const; /// @throws css::uno::RuntimeException - const OUString& getScheme() { return m_scheme;} + const OUString& getScheme() const { return m_scheme;} /// @throws css::uno::RuntimeException OUString getSchemeSpecificPart(); diff --git a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx index 6df3cd3e33ca..f7f13c6eb046 100644 --- a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx +++ b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx @@ -265,7 +265,7 @@ public: private: virtual ~UrlReference() override {} - sal_Int32 findParameter(OUString const & key); + sal_Int32 findParameter(OUString const & key) const; stoc::uriproc::UriReference m_base; }; @@ -335,7 +335,7 @@ void UrlReference::setParameter(OUString const & key, OUString const & value) m_base.m_path = newPath.makeStringAndClear(); } -sal_Int32 UrlReference::findParameter(OUString const & key) { +sal_Int32 UrlReference::findParameter(OUString const & key) const { sal_Int32 i = 0; parsePart(m_base.m_path, true, &i); // skip name for (;;) { |