summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-04-23 20:14:51 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-04-30 20:34:59 +0200
commit0dcbf8a5a5048b30fce48081090a922d286a62e4 (patch)
tree8949251f37ed812dc85a23b8f73cd4e118918763 /sot
parentbad7f6376f96a008c1b1a77d262953c13eb8442b (diff)
Use getXWeak in sot
Change-Id: I68d6b7393b367b68206c92cd65705326c5aeda7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150870 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/ucbstorage.cxx8
-rw-r--r--sot/source/unoolestorage/xolesimplestorage.cxx2
2 files changed, 5 insertions, 5 deletions
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index e9857af608cd..8ded02a7b139 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -147,7 +147,7 @@ sal_Int32 SAL_CALL FileStreamWrapper_Impl::readBytes(Sequence< sal_Int8 >& aData
checkConnected();
if (nBytesToRead < 0)
- throw BufferSizeExceededException(OUString(),static_cast<XWeak*>(this));
+ throw BufferSizeExceededException(OUString(), getXWeak());
std::scoped_lock aGuard( m_aMutex );
@@ -176,7 +176,7 @@ sal_Int32 SAL_CALL FileStreamWrapper_Impl::readSomeBytes(Sequence< sal_Int8 >& a
checkError();
if (nMaxBytesToRead < 0)
- throw BufferSizeExceededException(OUString(),static_cast<XWeak*>(this));
+ throw BufferSizeExceededException(OUString(), getXWeak());
if (m_pSvStream->eof())
{
@@ -278,7 +278,7 @@ sal_Int64 SAL_CALL FileStreamWrapper_Impl::getLength( )
void FileStreamWrapper_Impl::checkConnected()
{
if ( m_aURL.isEmpty() )
- throw NotConnectedException(OUString(), static_cast<XWeak*>(this));
+ throw NotConnectedException(OUString(), getXWeak());
if ( !m_pSvStream )
{
m_pSvStream = ::utl::UcbStreamHelper::CreateStream( m_aURL, StreamMode::STD_READ );
@@ -295,7 +295,7 @@ void FileStreamWrapper_Impl::checkError()
if (m_pSvStream->SvStream::GetError() != ERRCODE_NONE)
// TODO: really evaluate the error
- throw NotConnectedException(OUString(), static_cast<XWeak*>(this));
+ throw NotConnectedException(OUString(), getXWeak());
}
diff --git a/sot/source/unoolestorage/xolesimplestorage.cxx b/sot/source/unoolestorage/xolesimplestorage.cxx
index d64937d9b4e0..d2cb93a04647 100644
--- a/sot/source/unoolestorage/xolesimplestorage.cxx
+++ b/sot/source/unoolestorage/xolesimplestorage.cxx
@@ -550,7 +550,7 @@ void SAL_CALL OLESimpleStorage::dispose()
if ( m_aListenersContainer.getLength(aGuard) )
{
- lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) );
+ lang::EventObject aSource( getXWeak() );
m_aListenersContainer.disposeAndClear( aGuard, aSource );
}