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 <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2019-07-05 15:13:23 +02:00
parent ad1e790d76
commit 83867d0947
3 changed files with 6 additions and 35 deletions

View File

@@ -75,15 +75,11 @@ XResultSet_impl::XResultSet_impl( TaskManager* pMyShell,
} }
else else
m_nIsOpen = true; m_nIsOpen = true;
m_pMyShell->registerNotifier( m_aBaseDirectory,this );
} }
XResultSet_impl::~XResultSet_impl() XResultSet_impl::~XResultSet_impl()
{ {
m_pMyShell->deregisterNotifier( m_aBaseDirectory,this );
if( m_nIsOpen ) if( m_nIsOpen )
m_aFolder.close(); m_aFolder.close();
} }
@@ -221,7 +217,7 @@ XResultSet_impl::OneMore()
else if( err == osl::FileBase::E_None ) else if( err == osl::FileBase::E_None )
{ {
if (!m_pMyShell->getv( if (!m_pMyShell->getv(
this, m_sProperty, aDirIte, aUnqPath, IsRegular, aRow )) nullptr, m_sProperty, aDirIte, aUnqPath, IsRegular, aRow ))
{ {
SAL_WARN( SAL_WARN(
"ucb.ucp.file", "ucb.ucp.file",

View File

@@ -39,9 +39,7 @@
namespace fileaccess { namespace fileaccess {
class Notifier; class XResultSet_impl :
class XResultSet_impl : public Notifier,
public cppu::WeakImplHelper< css::lang::XEventListener, public cppu::WeakImplHelper< css::lang::XEventListener,
css::sdbc::XRow, css::sdbc::XRow,
css::sdbc::XResultSet, css::sdbc::XResultSet,
@@ -61,31 +59,6 @@ class XResultSet_impl : public Notifier,
virtual ~XResultSet_impl() override; virtual ~XResultSet_impl() override;
virtual std::unique_ptr<ContentEventNotifier> cDEL() override
{
return nullptr;
}
virtual std::unique_ptr<ContentEventNotifier> cEXC( const OUString& ) override
{
return nullptr;
}
virtual std::unique_ptr<ContentEventNotifier> cCEL() override
{
return nullptr;
}
virtual std::unique_ptr<PropertySetInfoChangeNotifier> cPSL() override
{
return nullptr;
}
virtual std::unique_ptr<PropertyChangeNotifier> cPCL() override
{
return nullptr;
}
sal_Int32 CtorSuccess() { return m_nErrorCode;} sal_Int32 CtorSuccess() { return m_nErrorCode;}
sal_Int32 getMinorError() { return m_nMinorErrorCode;} sal_Int32 getMinorError() { return m_nMinorErrorCode;}

View File

@@ -2514,7 +2514,8 @@ TaskManager::getv(
else else
aIsRegular = aFileStatus.getFileType() == osl::FileStatus::Regular; aIsRegular = aFileStatus.getFileType() == osl::FileStatus::Regular;
registerNotifier( aUnqPath,pNotifier ); if (pNotifier)
registerNotifier( aUnqPath,pNotifier );
insertDefaultProperties( aUnqPath ); insertDefaultProperties( aUnqPath );
{ {
osl::MutexGuard aGuard( m_aMutex ); osl::MutexGuard aGuard( m_aMutex );
@@ -2533,7 +2534,8 @@ TaskManager::getv(
return it1->getValue(); return it1->getValue();
}); });
} }
deregisterNotifier( aUnqPath,pNotifier ); if (pNotifier)
deregisterNotifier( aUnqPath,pNotifier );
XRow_impl* p = new XRow_impl( this,seq ); XRow_impl* p = new XRow_impl( this,seq );
row = uno::Reference< sdbc::XRow >( p ); row = uno::Reference< sdbc::XRow >( p );