summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-05-26 15:26:03 +0200
committerNoel Grandin <noel@peralex.com>2014-05-27 08:20:11 +0200
commit9af0abebfd61641c9d028505caa864cdf898e35b (patch)
treeaff469b96f89daf093271d95f790250147ea9c0d /svl
parent9b791f9c31165b82ec0fa3760a8af18c5af21294 (diff)
remove unnecessary use of Reference constructor in throw
Convert code like this: throw IOException("xx", Reference< XInterface >(static_cast<OWeakObject*>(this)) ); to this: throw IOException("xx", static_cast<OWeakObject*>(this) ); Change-Id: Ife9f645f0f1810a8e80219126193015502c43dbb
Diffstat (limited to 'svl')
-rw-r--r--svl/source/fsstor/fsstorage.cxx20
1 files changed, 8 insertions, 12 deletions
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx
index d7986a34ecc8..f354bfc1bebb 100644
--- a/svl/source/fsstor/fsstorage.cxx
+++ b/svl/source/fsstor/fsstorage.cxx
@@ -1018,8 +1018,7 @@ uno::Any SAL_CALL FSStorage::getByName( const OUString& aName )
{
uno::Any aCaught( ::cppu::getCaughtException() );
throw lang::WrappedTargetException( "Can not open element!",
- uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ),
- uno::UNO_QUERY ),
+ static_cast< OWeakObject* >( this ),
aCaught );
}
@@ -1067,10 +1066,9 @@ uno::Sequence< OUString > SAL_CALL FSStorage::getElementNames()
OSL_FAIL( "The folder does not exist!\n" );
else
{
- uno::Any aCaught( ::cppu::getCaughtException() );
+ uno::Any aCaught( ::cppu::getCaughtException() );
throw lang::WrappedTargetRuntimeException( "Can not open storage!",
- uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ),
- uno::UNO_QUERY ),
+ static_cast< OWeakObject* >( this ),
aCaught );
}
}
@@ -1080,10 +1078,9 @@ uno::Sequence< OUString > SAL_CALL FSStorage::getElementNames()
}
catch ( uno::Exception& )
{
- uno::Any aCaught( ::cppu::getCaughtException() );
+ uno::Any aCaught( ::cppu::getCaughtException() );
throw lang::WrappedTargetRuntimeException( "Can not open storage!",
- uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ),
- uno::UNO_QUERY ),
+ static_cast< OWeakObject* >( this ),
aCaught );
}
@@ -1113,10 +1110,9 @@ sal_Bool SAL_CALL FSStorage::hasByName( const OUString& aName )
}
catch ( uno::Exception& )
{
- uno::Any aCaught( ::cppu::getCaughtException() );
+ uno::Any aCaught( ::cppu::getCaughtException() );
throw lang::WrappedTargetRuntimeException( "Can not open storage!",
- uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ),
- uno::UNO_QUERY ),
+ static_cast< OWeakObject* >( this ),
aCaught );
}
@@ -1178,7 +1174,7 @@ void SAL_CALL FSStorage::dispose()
if ( m_pImpl->m_pListenersContainer )
{
- lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) );
+ lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) );
m_pImpl->m_pListenersContainer->disposeAndClear( aSource );
}