diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-24 13:02:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-25 08:32:27 +0200 |
commit | 57c5f980835f834f6ea96c6f5ca841b5372aa61d (patch) | |
tree | 7851f29791296a006e936f1f323489b79c11e9b2 /include | |
parent | 80a30219c4c553ff22979b73dd97a8869d87e488 (diff) |
loplugin:constmethod in comphelper,ucbhelper
Change-Id: I27a860fbbedd2174c60c199af18cae76e02abc25
Reviewed-on: https://gerrit.libreoffice.org/43759
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/comphelper/MasterPropertySet.hxx | 2 | ||||
-rw-r--r-- | include/comphelper/backupfilehelper.hxx | 2 | ||||
-rw-r--r-- | include/comphelper/embeddedobjectcontainer.hxx | 8 | ||||
-rw-r--r-- | include/comphelper/propertystatecontainer.hxx | 4 | ||||
-rw-r--r-- | include/comphelper/proxyaggregation.hxx | 2 | ||||
-rw-r--r-- | include/comphelper/stillreadwriteinteraction.hxx | 2 | ||||
-rw-r--r-- | include/comphelper/syntaxhighlight.hxx | 2 | ||||
-rw-r--r-- | include/i18nlangtag/languagetag.hxx | 3 | ||||
-rw-r--r-- | include/ucbhelper/content.hxx | 2 | ||||
-rw-r--r-- | include/ucbhelper/interactionrequest.hxx | 2 | ||||
-rw-r--r-- | include/ucbhelper/resultset.hxx | 6 |
11 files changed, 18 insertions, 17 deletions
diff --git a/include/comphelper/MasterPropertySet.hxx b/include/comphelper/MasterPropertySet.hxx index 937832488b78..44472d4c3977 100644 --- a/include/comphelper/MasterPropertySet.hxx +++ b/include/comphelper/MasterPropertySet.hxx @@ -39,7 +39,7 @@ namespace comphelper bool mbInit; SlaveData ( ChainablePropertySet *pSlave); - bool IsInit () { return mbInit;} + bool IsInit () const { return mbInit;} void SetInit ( bool bInit) { mbInit = bInit; } }; } diff --git a/include/comphelper/backupfilehelper.hxx b/include/comphelper/backupfilehelper.hxx index 68835b866452..6f3445870625 100644 --- a/include/comphelper/backupfilehelper.hxx +++ b/include/comphelper/backupfilehelper.hxx @@ -137,7 +137,7 @@ namespace comphelper * isPopPossibleExtensionInfo is the specialized version for ExtensionInfo */ bool isPopPossible(); - bool isPopPossibleExtensionInfo(); + bool isPopPossibleExtensionInfo() const; /** tries to execute a restore. Will overwrite the base file * in that case and take one version off the 'stack' of copies. diff --git a/include/comphelper/embeddedobjectcontainer.hxx b/include/comphelper/embeddedobjectcontainer.hxx index eb4cd1308911..d838af94a3c1 100644 --- a/include/comphelper/embeddedobjectcontainer.hxx +++ b/include/comphelper/embeddedobjectcontainer.hxx @@ -80,18 +80,18 @@ public: OUString CreateUniqueObjectName(); // get a list of object names that have been added so far - css::uno::Sequence < OUString > GetObjectNames(); + css::uno::Sequence < OUString > GetObjectNames() const; // check for existence of objects at all - bool HasEmbeddedObjects(); + bool HasEmbeddedObjects() const; // check existence of an object - either by identity or by name bool HasEmbeddedObject( const OUString& ); - bool HasEmbeddedObject( const css::uno::Reference < css::embed::XEmbeddedObject >& ); + bool HasEmbeddedObject( const css::uno::Reference < css::embed::XEmbeddedObject >& ) const; bool HasInstantiatedEmbeddedObject( const OUString& ); // get the object name of an object - this is the persist name if the object has persistence - OUString GetEmbeddedObjectName( const css::uno::Reference < css::embed::XEmbeddedObject >& ); + OUString GetEmbeddedObjectName( const css::uno::Reference < css::embed::XEmbeddedObject >& ) const; // retrieve an embedded object by name that either has been added already or is available in the container storage css::uno::Reference<css::embed::XEmbeddedObject> GetEmbeddedObject(const OUString&, OUString const* pBaseURL = nullptr); diff --git a/include/comphelper/propertystatecontainer.hxx b/include/comphelper/propertystatecontainer.hxx index 1585f85c3ec6..f2f04410d732 100644 --- a/include/comphelper/propertystatecontainer.hxx +++ b/include/comphelper/propertystatecontainer.hxx @@ -74,14 +74,14 @@ namespace comphelper <p>Already implemented by this base class, no need to override</p> @precond <arg>_nHandle</arg> is a valid property handle */ - css::beans::PropertyState getPropertyStateByHandle( sal_Int32 _nHandle ); + css::beans::PropertyState getPropertyStateByHandle( sal_Int32 _nHandle ) const; /** set the property denoted by the given handle to its default value <p>Already implemented by this base class, no need to override</p> @precond <arg>_nHandle</arg> is a valid property handle */ - void setPropertyToDefaultByHandle( sal_Int32 _nHandle ); + void setPropertyToDefaultByHandle( sal_Int32 _nHandle ); /** get the default value for the property denoted by the given handle diff --git a/include/comphelper/proxyaggregation.hxx b/include/comphelper/proxyaggregation.hxx index 465d3e243666..585d81010931 100644 --- a/include/comphelper/proxyaggregation.hxx +++ b/include/comphelper/proxyaggregation.hxx @@ -88,7 +88,7 @@ namespace comphelper css::uno::Reference< css::uno::XComponentContext > m_xContext; protected: - const css::uno::Reference< css::uno::XComponentContext >& getComponentContext() + const css::uno::Reference< css::uno::XComponentContext >& getComponentContext() const { return m_xContext; } diff --git a/include/comphelper/stillreadwriteinteraction.hxx b/include/comphelper/stillreadwriteinteraction.hxx index 375a23590bcb..11b0f12c4e69 100644 --- a/include/comphelper/stillreadwriteinteraction.hxx +++ b/include/comphelper/stillreadwriteinteraction.hxx @@ -45,7 +45,7 @@ public: void resetInterceptions(); void resetErrorStates(); - bool wasWriteError() { return (m_bUsed && m_bHandledByMySelf);} + bool wasWriteError() const { return (m_bUsed && m_bHandledByMySelf);} private: css::uno::Reference< css::task::XInteractionHandler > m_xAuxiliaryHandler; diff --git a/include/comphelper/syntaxhighlight.hxx b/include/comphelper/syntaxhighlight.hxx index 76e87124bdc8..c8faf2211bfc 100644 --- a/include/comphelper/syntaxhighlight.hxx +++ b/include/comphelper/syntaxhighlight.hxx @@ -81,7 +81,7 @@ public: void getHighlightPortions( const OUString& rLine, std::vector<HighlightPortion>& pPortions ) const; - HighlighterLanguage GetLanguage(); + HighlighterLanguage GetLanguage() const; }; #endif diff --git a/include/i18nlangtag/languagetag.hxx b/include/i18nlangtag/languagetag.hxx index 5088756e4691..42da7cc88179 100644 --- a/include/i18nlangtag/languagetag.hxx +++ b/include/i18nlangtag/languagetag.hxx @@ -544,7 +544,8 @@ private: mutable bool mbInitializedLangID : 1; bool mbIsFallback : 1; - ImplPtr const & getImpl() const; + LanguageTagImpl* getImpl(); + LanguageTagImpl const* getImpl() const; ImplPtr registerImpl() const; void syncFromImpl(); void syncVarsFromRawImpl() const; diff --git a/include/ucbhelper/content.hxx b/include/ucbhelper/content.hxx index eec9d2d26926..3d48b70915f0 100644 --- a/include/ucbhelper/content.hxx +++ b/include/ucbhelper/content.hxx @@ -663,7 +663,7 @@ public: bool bMajorVersion = false, const OUString & rCommentVersion = OUString( ), OUString* pResultURL = nullptr, - const OUString & rDocumentId = OUString( ) ); + const OUString & rDocumentId = OUString( ) ) const; /** * This method lock the resource. diff --git a/include/ucbhelper/interactionrequest.hxx b/include/ucbhelper/interactionrequest.hxx index 7c2a5f565cad..5481797ff4b5 100644 --- a/include/ucbhelper/interactionrequest.hxx +++ b/include/ucbhelper/interactionrequest.hxx @@ -548,7 +548,7 @@ public: // XAuthFallback virtual void SAL_CALL setCode( const OUString& code ) override; /// @throws css::uno::RuntimeException - const OUString& SAL_CALL getCode(); + const OUString& SAL_CALL getCode() const; }; diff --git a/include/ucbhelper/resultset.hxx b/include/ucbhelper/resultset.hxx index a71afddabb5f..906b7c9af103 100644 --- a/include/ucbhelper/resultset.hxx +++ b/include/ucbhelper/resultset.hxx @@ -259,7 +259,7 @@ public: * @param rEvt is a property change event. */ void propertyChanged( - const css::beans::PropertyChangeEvent& rEvt ); + const css::beans::PropertyChangeEvent& rEvt ) const; /** * This method should be called by the data supplier for the result set @@ -283,7 +283,7 @@ public: * @return a sequence of properties. */ const css::uno::Sequence< css::beans::Property >& - getProperties(); + getProperties() const; /** * This method returns the environment to use for interactions, progress @@ -292,7 +292,7 @@ public: * @return an environment or an empty reference. */ const css::uno::Reference< css::ucb::XCommandEnvironment >& - getEnvironment(); + getEnvironment() const; }; |