summaryrefslogtreecommitdiff
path: root/connectivity/source/commontools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-10-01 13:01:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-10-01 20:58:11 +0200
commit581efdec36787dc5e378e54d13e7328fddcf3a50 (patch)
tree29f04e719f8402028a4e26088a8ea825ebe9fdca /connectivity/source/commontools
parente512b53ef8ae7945131876d32121fdbbdeb1de35 (diff)
loplugin:constmethod
Change-Id: I3ed657c5c5e6840e38e3c8505505b4b372125df0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122910 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source/commontools')
-rw-r--r--connectivity/source/commontools/sqlerror.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/connectivity/source/commontools/sqlerror.cxx b/connectivity/source/commontools/sqlerror.cxx
index 383743906520..82525dc44f4a 100644
--- a/connectivity/source/commontools/sqlerror.cxx
+++ b/connectivity/source/commontools/sqlerror.cxx
@@ -50,7 +50,7 @@ namespace connectivity
// versions of the public SQLError methods which are just delegated to this impl-class
static const OUString& getMessagePrefix();
- OUString getErrorMessage( const ErrorCondition _eCondition, const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 );
+ OUString getErrorMessage( const ErrorCondition _eCondition, const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 ) const;
static ErrorCode getErrorCode( const ErrorCondition _eCondition );
void raiseException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 );
void raiseException( const ErrorCondition _eCondition, const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 );
@@ -59,8 +59,7 @@ namespace connectivity
private:
/// returns the basic error message associated with the given error condition, without any parameter replacements
- OUString
- impl_getErrorMessage( ErrorCondition _eCondition );
+ OUString impl_getErrorMessage( ErrorCondition _eCondition ) const;
/// returns the SQLState associated with the given error condition
static OUString
@@ -142,7 +141,7 @@ namespace connectivity
}
}
- OUString SQLError_Impl::getErrorMessage( const ErrorCondition _eCondition, const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 )
+ OUString SQLError_Impl::getErrorMessage( const ErrorCondition _eCondition, const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 ) const
{
OUString sErrorMessage( impl_getErrorMessage( _eCondition ) );
@@ -220,7 +219,7 @@ namespace connectivity
);
}
- OUString SQLError_Impl::impl_getErrorMessage( ErrorCondition _eCondition )
+ OUString SQLError_Impl::impl_getErrorMessage( ErrorCondition _eCondition ) const
{
OUString sResMessage(Translate::get(lcl_getResourceErrorID(_eCondition), m_aResources));
OSL_ENSURE( !sResMessage.isEmpty(), "SQLError_Impl::impl_getErrorMessage: illegal error condition, or invalid resource!" );