diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-20 15:03:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-21 15:18:57 +0200 |
commit | ac80f048f2bb23651ddc3c6608e9ef24635698d7 (patch) | |
tree | 925ece62dd2e859170d1267d8e7122c4f9b762e8 /comphelper/source/streaming | |
parent | More missing GetSelectEntryPos -> GetSelectedEntryPos (diff) | |
download | core-ac80f048f2bb23651ddc3c6608e9ef24635698d7.tar.gz core-ac80f048f2bb23651ddc3c6608e9ef24635698d7.zip |
loplugin:flatten in basctl..configmgr
Change-Id: I674cad57ce30a885e126d3bcc921f8fcb53dc36d
Reviewed-on: https://gerrit.libreoffice.org/42577
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper/source/streaming')
-rw-r--r-- | comphelper/source/streaming/seqinputstreamserv.cxx | 20 |
1 files changed, 9 insertions, 11 deletions
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 |