From 5c2c2d8dc4449c9d4ac9d645f634772ba93373af Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 9 Nov 2016 15:14:57 +0200 Subject: loplugin:expandablemethods in comphelper..cppuhelper Change-Id: I9d5487af4729bd3ee4f6450092e4b77f74a12e6d Reviewed-on: https://gerrit.libreoffice.org/30717 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- connectivity/source/commontools/DriversConfig.cxx | 3 ++- connectivity/source/commontools/formattedcolumnvalue.cxx | 8 +------- connectivity/source/commontools/sqlerror.cxx | 9 +-------- 3 files changed, 4 insertions(+), 16 deletions(-) (limited to 'connectivity/source/commontools') diff --git a/connectivity/source/commontools/DriversConfig.cxx b/connectivity/source/commontools/DriversConfig.cxx index c40ed479177b..2da9b4dc4953 100644 --- a/connectivity/source/commontools/DriversConfig.cxx +++ b/connectivity/source/commontools/DriversConfig.cxx @@ -91,7 +91,7 @@ DriversConfigImpl::DriversConfigImpl() { } -void DriversConfigImpl::Load(const uno::Reference< uno::XComponentContext >& _rxORB) const +const TInstalledDrivers& DriversConfigImpl::getInstalledDrivers(const uno::Reference< uno::XComponentContext >& _rxORB) const { if ( m_aDrivers.empty() ) { @@ -119,6 +119,7 @@ void DriversConfigImpl::Load(const uno::Reference< uno::XComponentContext >& _rx } } // if ( m_aInstalled.isValid() ) } + return m_aDrivers; } DriversConfig::DriversConfig(const uno::Reference< uno::XComponentContext >& _rxORB) diff --git a/connectivity/source/commontools/formattedcolumnvalue.cxx b/connectivity/source/commontools/formattedcolumnvalue.cxx index 8a75af3c3cde..bd582dbc82e4 100644 --- a/connectivity/source/commontools/formattedcolumnvalue.cxx +++ b/connectivity/source/commontools/formattedcolumnvalue.cxx @@ -220,15 +220,9 @@ namespace dbtools } - void FormattedColumnValue::clear() - { - lcl_clear_nothrow( *m_pData ); - } - - FormattedColumnValue::~FormattedColumnValue() { - clear(); + lcl_clear_nothrow( *m_pData ); } sal_Int16 FormattedColumnValue::getKeyType() const diff --git a/connectivity/source/commontools/sqlerror.cxx b/connectivity/source/commontools/sqlerror.cxx index 1febff0a796a..f074257e2e80 100644 --- a/connectivity/source/commontools/sqlerror.cxx +++ b/connectivity/source/commontools/sqlerror.cxx @@ -57,7 +57,6 @@ 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 ParamValue& _rParamValue1, const ParamValue& _rParamValue2, const ParamValue& _rParamValue3 ); - OUString getSQLState( const ErrorCondition _eCondition ); static ErrorCode getErrorCode( const ErrorCondition _eCondition ); void raiseException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2, const ParamValue& _rParamValue3 ); void raiseException( const ErrorCondition _eCondition, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2, const ParamValue& _rParamValue3 ); @@ -148,12 +147,6 @@ namespace connectivity } - OUString SQLError_Impl::getSQLState( const ErrorCondition _eCondition ) - { - return impl_getSQLState( _eCondition ); - } - - ErrorCode SQLError_Impl::getErrorCode( const ErrorCondition _eCondition ) { return 0 - ::sal::static_int_cast< ErrorCode, ErrorCondition >( _eCondition ); @@ -217,7 +210,7 @@ namespace connectivity return SQLException( getErrorMessage( _eCondition, _rParamValue1, _rParamValue2, _rParamValue3 ), _rxContext, - getSQLState( _eCondition ), + impl_getSQLState( _eCondition ), getErrorCode( _eCondition ), Any() ); -- cgit