summaryrefslogtreecommitdiff
path: root/sot/source
diff options
context:
space:
mode:
Diffstat (limited to 'sot/source')
-rw-r--r--sot/source/sdstor/stgelem.cxx4
-rw-r--r--sot/source/sdstor/stgio.cxx12
2 files changed, 13 insertions, 3 deletions
diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx
index ff41d8d70f9c..3b946f4c77b4 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 7d90c490c634..c4294924697a 100644
--- a/sot/source/sdstor/stgio.cxx
+++ b/sot/source/sdstor/stgio.cxx
@@ -55,7 +55,17 @@ bool StgIo::Load()
{
if( GetStrm() )
{
- if( m_aHdr.Load( *this ) )
+ bool bLoaded;
+ try
+ {
+ bLoaded = m_aHdr.Load(*this);
+ }
+ catch (const SvStreamEOFException&)
+ {
+ SAL_WARN("sot", "EOF");
+ bLoaded = false;
+ }
+ if (bLoaded)
{
if( m_aHdr.Check() )
SetupStreams();