diff options
Diffstat (limited to 'sot')
-rw-r--r-- | sot/source/sdstor/stg.cxx | 13 | ||||
-rw-r--r-- | sot/source/sdstor/stgelem.cxx | 4 | ||||
-rw-r--r-- | sot/source/sdstor/stgio.cxx | 12 |
3 files changed, 5 insertions, 24 deletions
diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx index 73a19719f86e..398e3fdb53d1 100644 --- a/sot/source/sdstor/stg.cxx +++ b/sot/source/sdstor/stg.cxx @@ -315,17 +315,8 @@ bool Storage::IsStorageFile( SvStream* pStream ) { StgHeader aHdr; sal_uInt64 nPos = pStream->Tell(); - try - { - bRet = ( aHdr.Load( *pStream ) && aHdr.Check() ); - } - catch(SvStreamEOFException&) - { - // It's not a stream error if it is too small for an OLE storage header - pStream->ResetError(); - pStream->Seek( nPos ); - return false; - } + bRet = ( aHdr.Load( *pStream ) && aHdr.Check() ); + // It's not a stream error if it is too small for an OLE storage header if ( pStream->GetErrorCode() == ERRCODE_IO_CANTSEEK ) pStream->ResetError(); diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx index 3b946f4c77b4..ff41d8d70f9c 100644 --- a/sot/source/sdstor/stgelem.cxx +++ b/sot/source/sdstor/stgelem.cxx @@ -126,9 +126,9 @@ bool StgHeader::Load( SvStream& r ) { r.Seek( 0 ); r.ReadBytes( m_cSignature, 8 ); - ReadClsId( r, m_aClsId ); // 08 Class ID + ReadClsId( r, m_aClsId ); // 08 Class ID r.ReadInt32( m_nVersion ) // 1A version number - .ReadUInt16( m_nByteOrder ) // 1C Unicode byte order indicator + .ReadUInt16( m_nByteOrder ) // 1C Unicode byte order indicator .ReadInt16( m_nPageSize ) // 1E 1 << nPageSize = block size .ReadInt16( m_nDataPageSize ); // 20 1 << this size == data block size if (!r.good()) diff --git a/sot/source/sdstor/stgio.cxx b/sot/source/sdstor/stgio.cxx index c4294924697a..7d90c490c634 100644 --- a/sot/source/sdstor/stgio.cxx +++ b/sot/source/sdstor/stgio.cxx @@ -55,17 +55,7 @@ bool StgIo::Load() { if( GetStrm() ) { - bool bLoaded; - try - { - bLoaded = m_aHdr.Load(*this); - } - catch (const SvStreamEOFException&) - { - SAL_WARN("sot", "EOF"); - bLoaded = false; - } - if (bLoaded) + if( m_aHdr.Load( *this ) ) { if( m_aHdr.Check() ) SetupStreams(); |