diff options
Diffstat (limited to 'tools/source/ref/pstm.cxx')
-rw-r--r-- | tools/source/ref/pstm.cxx | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/tools/source/ref/pstm.cxx b/tools/source/ref/pstm.cxx index 47dc22e40949..6c10aaace559 100644 --- a/tools/source/ref/pstm.cxx +++ b/tools/source/ref/pstm.cxx @@ -70,33 +70,16 @@ SvPersistStream::SvPersistStream( SvClassManager & rMgr, SvStream * pStream, Ind SvPersistStream::~SvPersistStream() { - SetStream( nullptr ); + ClearStream(); } -/** - - @param pStream This stream is used as the medium for PersistStream - - @warning pStream is used as the medium for PersistStream. - It must not be manipulated while used in SvPersistStream. - An Exception to this is pvStream (cf. <SvPersistStream::SetStream>). -*/ -void SvPersistStream::SetStream( SvStream * pStream ) +void SvPersistStream::ClearStream() { - if( pStm != pStream ) - { - if( pStm ) - { - SyncSysStream(); - pStm->SetError( GetError() ); - } - pStm = pStream; - } - if( pStm ) + if( pStm != nullptr ) { - SetVersion( pStm->GetVersion() ); - SetError( pStm->GetError() ); - SyncSvStream( pStm->Tell() ); + SyncSysStream(); + pStm->SetError( GetError() ); + pStm = nullptr; } } |