From 83867d0947fe033693636a233b606d9a3372fbdc Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 5 Jul 2019 15:13:23 +0200 Subject: [PATCH] no need for XResultSet_impl to extend Notifier it never returns any kind of ContentEventNotifier Change-Id: I53d14378c3c70e4797782aa2c35602103c7cf813 Reviewed-on: https://gerrit.libreoffice.org/75139 Tested-by: Jenkins Reviewed-by: Noel Grandin --- ucb/source/ucp/file/filrset.cxx | 6 +----- ucb/source/ucp/file/filrset.hxx | 29 +---------------------------- ucb/source/ucp/file/filtask.cxx | 6 ++++-- 3 files changed, 6 insertions(+), 35 deletions(-) diff --git a/ucb/source/ucp/file/filrset.cxx b/ucb/source/ucp/file/filrset.cxx index 9c3916844c1a..f9d1b8d503cd 100644 --- a/ucb/source/ucp/file/filrset.cxx +++ b/ucb/source/ucp/file/filrset.cxx @@ -75,15 +75,11 @@ XResultSet_impl::XResultSet_impl( TaskManager* pMyShell, } else m_nIsOpen = true; - - m_pMyShell->registerNotifier( m_aBaseDirectory,this ); } XResultSet_impl::~XResultSet_impl() { - m_pMyShell->deregisterNotifier( m_aBaseDirectory,this ); - if( m_nIsOpen ) m_aFolder.close(); } @@ -221,7 +217,7 @@ XResultSet_impl::OneMore() else if( err == osl::FileBase::E_None ) { if (!m_pMyShell->getv( - this, m_sProperty, aDirIte, aUnqPath, IsRegular, aRow )) + nullptr, m_sProperty, aDirIte, aUnqPath, IsRegular, aRow )) { SAL_WARN( "ucb.ucp.file", diff --git a/ucb/source/ucp/file/filrset.hxx b/ucb/source/ucp/file/filrset.hxx index 0c9f57acc1fb..82c1db908fd2 100644 --- a/ucb/source/ucp/file/filrset.hxx +++ b/ucb/source/ucp/file/filrset.hxx @@ -39,9 +39,7 @@ namespace fileaccess { -class Notifier; - -class XResultSet_impl : public Notifier, +class XResultSet_impl : public cppu::WeakImplHelper< css::lang::XEventListener, css::sdbc::XRow, css::sdbc::XResultSet, @@ -61,31 +59,6 @@ class XResultSet_impl : public Notifier, virtual ~XResultSet_impl() override; - virtual std::unique_ptr cDEL() override - { - return nullptr; - } - - virtual std::unique_ptr cEXC( const OUString& ) override - { - return nullptr; - } - - virtual std::unique_ptr cCEL() override - { - return nullptr; - } - - virtual std::unique_ptr cPSL() override - { - return nullptr; - } - - virtual std::unique_ptr cPCL() override - { - return nullptr; - } - sal_Int32 CtorSuccess() { return m_nErrorCode;} sal_Int32 getMinorError() { return m_nMinorErrorCode;} diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx index bb47d6e653ba..db1e4ca19dda 100644 --- a/ucb/source/ucp/file/filtask.cxx +++ b/ucb/source/ucp/file/filtask.cxx @@ -2514,7 +2514,8 @@ TaskManager::getv( else aIsRegular = aFileStatus.getFileType() == osl::FileStatus::Regular; - registerNotifier( aUnqPath,pNotifier ); + if (pNotifier) + registerNotifier( aUnqPath,pNotifier ); insertDefaultProperties( aUnqPath ); { osl::MutexGuard aGuard( m_aMutex ); @@ -2533,7 +2534,8 @@ TaskManager::getv( return it1->getValue(); }); } - deregisterNotifier( aUnqPath,pNotifier ); + if (pNotifier) + deregisterNotifier( aUnqPath,pNotifier ); XRow_impl* p = new XRow_impl( this,seq ); row = uno::Reference< sdbc::XRow >( p );