summaryrefslogtreecommitdiff
path: root/comphelper/source/streaming
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 /comphelper/source/streaming
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 'comphelper/source/streaming')
-rw-r--r--comphelper/source/streaming/memorystream.cxx4
-rw-r--r--comphelper/source/streaming/seqinputstreamserv.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/comphelper/source/streaming/memorystream.cxx b/comphelper/source/streaming/memorystream.cxx
index c4379cdb46ba..b8b3f4c113ca 100644
--- a/comphelper/source/streaming/memorystream.cxx
+++ b/comphelper/source/streaming/memorystream.cxx
@@ -148,7 +148,7 @@ void SAL_CALL UNOMemoryStream::closeInput() throw (NotConnectedException, IOExce
void SAL_CALL UNOMemoryStream::seek( sal_Int64 location ) throw (IllegalArgumentException, IOException, RuntimeException, std::exception)
{
if( (location < 0) || (location > SAL_MAX_INT32) )
- throw IllegalArgumentException("this implementation does not support more than 2GB!", Reference< XInterface >(static_cast<OWeakObject*>(this)), 0 );
+ throw IllegalArgumentException("this implementation does not support more than 2GB!", static_cast<OWeakObject*>(this), 0 );
// seek operation should be able to resize the stream
if ( location > static_cast< sal_Int64 >( maData.size() ) )
@@ -180,7 +180,7 @@ void SAL_CALL UNOMemoryStream::writeBytes( const Sequence< sal_Int8 >& aData ) t
if( nNewSize > SAL_MAX_INT32 )
{
OSL_ASSERT(false);
- throw IOException("this implementation does not support more than 2GB!", Reference< XInterface >(static_cast<OWeakObject*>(this)) );
+ throw IOException("this implementation does not support more than 2GB!", static_cast<OWeakObject*>(this) );
}
if( static_cast< sal_Int32 >( nNewSize ) > static_cast< sal_Int32 >( maData.size() ) )
diff --git a/comphelper/source/streaming/seqinputstreamserv.cxx b/comphelper/source/streaming/seqinputstreamserv.cxx
index b5750d454b8f..1ea60fa5a63f 100644
--- a/comphelper/source/streaming/seqinputstreamserv.cxx
+++ b/comphelper/source/streaming/seqinputstreamserv.cxx
@@ -208,7 +208,7 @@ void SAL_CALL SequenceInputStreamService::initialize( const uno::Sequence< ::com
if ( aArguments.getLength() != 1 )
throw lang::IllegalArgumentException( "Wrong number of arguments!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ),
+ static_cast< ::cppu::OWeakObject* >(this),
1 );
uno::Sequence< sal_Int8 > aSeq;
@@ -224,7 +224,7 @@ void SAL_CALL SequenceInputStreamService::initialize( const uno::Sequence< ::com
}
else
throw lang::IllegalArgumentException( "Unexpected type of argument!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ),
+ static_cast< ::cppu::OWeakObject* >(this),
1 );
}