diff options
author | Noel Grandin <noel@peralex.com> | 2014-05-23 12:03:21 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-05-23 15:06:00 +0200 |
commit | e7bc3cab019fbf040f9fb8b53ae2cf3f977d200b (patch) | |
tree | bc507bccee9fb71134e362b72d22991561e32aa0 /package/source/zippackage/wrapstreamforshare.cxx | |
parent | c5d47c327a57df55fa3dac0fff6b65888d0345e4 (diff) |
remove boilerplate in UNO Exception constructor calls
Now that we have default values for Exception constructor params,
remove lots of boilerplate code.
Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74
Diffstat (limited to 'package/source/zippackage/wrapstreamforshare.cxx')
-rw-r--r-- | package/source/zippackage/wrapstreamforshare.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/package/source/zippackage/wrapstreamforshare.cxx b/package/source/zippackage/wrapstreamforshare.cxx index 5bd868427169..4f737bfa2964 100644 --- a/package/source/zippackage/wrapstreamforshare.cxx +++ b/package/source/zippackage/wrapstreamforshare.cxx @@ -39,7 +39,7 @@ WrapStreamForShare::WrapStreamForShare( const uno::Reference< io::XInputStream > if ( !m_rMutexRef.Is() || !m_xInStream.is() || !m_xSeekable.is() ) { OSL_FAIL( "Wrong initialization of wrapping stream!\n" ); - throw uno::RuntimeException(THROW_WHERE, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException(THROW_WHERE ); } } @@ -57,7 +57,7 @@ sal_Int32 SAL_CALL WrapStreamForShare::readBytes( uno::Sequence< sal_Int8 >& aDa ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); if ( !m_xInStream.is() ) - throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() ); + throw io::IOException(THROW_WHERE ); m_xSeekable->seek( m_nCurPos ); @@ -76,7 +76,7 @@ sal_Int32 SAL_CALL WrapStreamForShare::readSomeBytes( uno::Sequence< sal_Int8 >& ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); if ( !m_xInStream.is() ) - throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() ); + throw io::IOException(THROW_WHERE ); m_xSeekable->seek( m_nCurPos ); @@ -95,7 +95,7 @@ void SAL_CALL WrapStreamForShare::skipBytes( sal_Int32 nBytesToSkip ) ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); if ( !m_xInStream.is() ) - throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() ); + throw io::IOException(THROW_WHERE ); m_xSeekable->seek( m_nCurPos ); @@ -111,7 +111,7 @@ sal_Int32 SAL_CALL WrapStreamForShare::available() ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); if ( !m_xInStream.is() ) - throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() ); + throw io::IOException(THROW_WHERE ); return m_xInStream->available(); } @@ -124,7 +124,7 @@ void SAL_CALL WrapStreamForShare::closeInput() ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); if ( !m_xInStream.is() ) - throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() ); + throw io::IOException(THROW_WHERE ); // the package is the owner so it will close the stream // m_xInStream->closeInput(); @@ -141,7 +141,7 @@ void SAL_CALL WrapStreamForShare::seek( sal_Int64 location ) ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); if ( !m_xInStream.is() ) - throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() ); + throw io::IOException(THROW_WHERE ); // let stream implementation do all the checking m_xSeekable->seek( location ); @@ -156,7 +156,7 @@ sal_Int64 SAL_CALL WrapStreamForShare::getPosition() ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); if ( !m_xInStream.is() ) - throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() ); + throw io::IOException(THROW_WHERE ); return m_nCurPos; } @@ -168,7 +168,7 @@ sal_Int64 SAL_CALL WrapStreamForShare::getLength() ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); if ( !m_xInStream.is() ) - throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() ); + throw io::IOException(THROW_WHERE ); return m_xSeekable->getLength(); } |