diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-21 13:42:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-21 15:55:46 +0100 |
commit | 25298930bc86d1a449a7e5b139d65e49f695f8c1 (patch) | |
tree | b3f28ef6b18b12347694a637b6785ecb5eedc1fe /connectivity/source/manager | |
parent | 1edaee2f03bce0efa409c592919458658d0aa751 (diff) |
loplugin:flatten in canvas..cui
Change-Id: I208767eaa60d913fe2882403f1f9351eb08256f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127224
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source/manager')
-rw-r--r-- | connectivity/source/manager/mdrivermanager.cxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx index bef3c8d74eaa..b30007667ec3 100644 --- a/connectivity/source/manager/mdrivermanager.cxx +++ b/connectivity/source/manager/mdrivermanager.cxx @@ -113,23 +113,23 @@ Any SAL_CALL ODriverEnumeration::nextElement( ) const DriverAccess& operator()( const DriverAccess& _rDescriptor ) const { // we did not load this driver, yet - if (!_rDescriptor.xDriver.is()) + if (_rDescriptor.xDriver.is()) + return _rDescriptor; + + // we have a factory for it + if (_rDescriptor.xComponentFactory.is()) { - // we have a factory for it - if (_rDescriptor.xComponentFactory.is()) + DriverAccess& rDesc = const_cast<DriverAccess&>(_rDescriptor); + try { - DriverAccess& rDesc = const_cast<DriverAccess&>(_rDescriptor); - try - { - //load driver - rDesc.xDriver.set( - rDesc.xComponentFactory->createInstanceWithContext(mxContext), css::uno::UNO_QUERY); - } - catch (const Exception&) - { - //failure, abandon driver - rDesc.xComponentFactory.clear(); - } + //load driver + rDesc.xDriver.set( + rDesc.xComponentFactory->createInstanceWithContext(mxContext), css::uno::UNO_QUERY); + } + catch (const Exception&) + { + //failure, abandon driver + rDesc.xComponentFactory.clear(); } } return _rDescriptor; |