diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-07 14:19:30 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-07 15:37:24 +0200 |
commit | 33b3439e65bc22c2d149eb18c3d7d9da43699246 (patch) | |
tree | 1789ed50b1c08421dcafb55ee868b1f2324d12e7 /io/source/stm/odata.cxx | |
parent | 8b898063f718b51732c8b47b6f7704fd8659d2a9 (diff) |
loplugin:flatten in io
Change-Id: I4f4dbbd4ce279cb25a8e4deba1967b5c23ce1385
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91818
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'io/source/stm/odata.cxx')
-rw-r--r-- | io/source/stm/odata.cxx | 75 |
1 files changed, 37 insertions, 38 deletions
diff --git a/io/source/stm/odata.cxx b/io/source/stm/odata.cxx index 6ffd12c89387..3e802b2d37a5 100644 --- a/io/source/stm/odata.cxx +++ b/io/source/stm/odata.cxx @@ -907,30 +907,29 @@ void OObjectOutputStream::writeObject( const Reference< XPersistObject > & xPObj void OObjectOutputStream::connectToMarkable() { - if( ! m_bValidMarkable ) { - if( ! m_bValidStream ) + if( m_bValidMarkable ) + return; + + if( ! m_bValidStream ) + throw NotConnectedException(); + + // find the markable stream ! + Reference< XInterface > rTry(m_output); + while( true ) { + if( ! rTry.is() ) { throw NotConnectedException(); } - - // find the markable stream ! - Reference< XInterface > rTry(m_output); - while( true ) { - if( ! rTry.is() ) - { - throw NotConnectedException(); - } - Reference < XMarkableStream > markable( rTry , UNO_QUERY ); - if( markable.is() ) - { - m_rMarkable = markable; - break; - } - Reference < XActiveDataSource > source( rTry , UNO_QUERY ); - rTry = source; + Reference < XMarkableStream > markable( rTry , UNO_QUERY ); + if( markable.is() ) + { + m_rMarkable = markable; + break; } - m_bValidMarkable = true; + Reference < XActiveDataSource > source( rTry , UNO_QUERY ); + rTry = source; } + m_bValidMarkable = true; } @@ -1180,30 +1179,30 @@ Reference< XPersistObject > OObjectInputStream::readObject() void OObjectInputStream::connectToMarkable() { - if( ! m_bValidMarkable ) { - if( ! m_bValidStream ) + if( m_bValidMarkable ) return; + + if( ! m_bValidStream ) + { + throw NotConnectedException( ); + } + + // find the markable stream ! + Reference< XInterface > rTry(m_input); + while( true ) { + if( ! rTry.is() ) { throw NotConnectedException( ); } - - // find the markable stream ! - Reference< XInterface > rTry(m_input); - while( true ) { - if( ! rTry.is() ) - { - throw NotConnectedException( ); - } - Reference< XMarkableStream > markable( rTry , UNO_QUERY ); - if( markable.is() ) - { - m_rMarkable = markable; - break; - } - Reference < XActiveDataSink > sink( rTry , UNO_QUERY ); - rTry = sink; + Reference< XMarkableStream > markable( rTry , UNO_QUERY ); + if( markable.is() ) + { + m_rMarkable = markable; + break; } - m_bValidMarkable = true; + Reference < XActiveDataSink > sink( rTry , UNO_QUERY ); + rTry = sink; } + m_bValidMarkable = true; } sal_Int32 OObjectInputStream::createMark() |