From ac80f048f2bb23651ddc3c6608e9ef24635698d7 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 20 Sep 2017 15:03:35 +0200 Subject: loplugin:flatten in basctl..configmgr Change-Id: I674cad57ce30a885e126d3bcc921f8fcb53dc36d Reviewed-on: https://gerrit.libreoffice.org/42577 Tested-by: Jenkins Reviewed-by: Noel Grandin --- comphelper/source/streaming/seqinputstreamserv.cxx | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'comphelper/source/streaming') diff --git a/comphelper/source/streaming/seqinputstreamserv.cxx b/comphelper/source/streaming/seqinputstreamserv.cxx index 0bee70b8f303..7fa619442318 100644 --- a/comphelper/source/streaming/seqinputstreamserv.cxx +++ b/comphelper/source/streaming/seqinputstreamserv.cxx @@ -194,20 +194,18 @@ void SAL_CALL SequenceInputStreamService::initialize( const uno::Sequence< css:: 1 ); uno::Sequence< sal_Int8 > aSeq; - if ( aArguments[0] >>= aSeq ) - { - uno::Reference< io::XInputStream > xInputStream( - static_cast< ::cppu::OWeakObject* >( new ::comphelper::SequenceInputStream( aSeq ) ), - uno::UNO_QUERY_THROW ); - uno::Reference< io::XSeekable > xSeekable( xInputStream, uno::UNO_QUERY_THROW ); - m_xInputStream = xInputStream; - m_xSeekable = xSeekable; - m_bInitialized = true; - } - else + if ( !(aArguments[0] >>= aSeq) ) throw lang::IllegalArgumentException( "Unexpected type of argument!", static_cast< ::cppu::OWeakObject* >(this), 1 ); + + uno::Reference< io::XInputStream > xInputStream( + static_cast< ::cppu::OWeakObject* >( new ::comphelper::SequenceInputStream( aSeq ) ), + uno::UNO_QUERY_THROW ); + uno::Reference< io::XSeekable > xSeekable( xInputStream, uno::UNO_QUERY_THROW ); + m_xInputStream = xInputStream; + m_xSeekable = xSeekable; + m_bInitialized = true; } } // anonymous namespace -- cgit