diff options
Diffstat (limited to 'tools/source/stream/vcompat.cxx')
-rw-r--r-- | tools/source/stream/vcompat.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/tools/source/stream/vcompat.cxx b/tools/source/stream/vcompat.cxx index d77f866e06af..a63440701360 100644 --- a/tools/source/stream/vcompat.cxx +++ b/tools/source/stream/vcompat.cxx @@ -27,21 +27,21 @@ VersionCompat::VersionCompat( SvStream& rStm, StreamMode nStreamMode, sal_uInt16 mnStmMode ( nStreamMode ), mnVersion ( nVersion ) { - if( !mpRWStm->GetError() ) + if( mpRWStm->GetError() ) + return; + + if( StreamMode::WRITE == mnStmMode ) + { + mpRWStm->WriteUInt16( mnVersion ); + mnCompatPos = mpRWStm->Tell(); + mnTotalSize = mnCompatPos + 4; + mpRWStm->SeekRel( 4 ); + } + else { - if( StreamMode::WRITE == mnStmMode ) - { - mpRWStm->WriteUInt16( mnVersion ); - mnCompatPos = mpRWStm->Tell(); - mnTotalSize = mnCompatPos + 4; - mpRWStm->SeekRel( 4 ); - } - else - { - mpRWStm->ReadUInt16( mnVersion ); - mpRWStm->ReadUInt32( mnTotalSize ); - mnCompatPos = mpRWStm->Tell(); - } + mpRWStm->ReadUInt16( mnVersion ); + mpRWStm->ReadUInt32( mnTotalSize ); + mnCompatPos = mpRWStm->Tell(); } } |