diff options
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/smdetect.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx index ca9453ad09c7..c943bee91e23 100644 --- a/starmath/source/smdetect.cxx +++ b/starmath/source/smdetect.cxx @@ -296,8 +296,16 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor //this approach, to be fixed at a better level than here SvStream *pStrm = aMedium.GetInStream(); aTypeName = OUString(); + + sal_Size nStreamSize = 0; if (pStrm && !pStrm->GetError()) { + pStrm->Seek( STREAM_SEEK_TO_BEGIN ); + nStreamSize = pStrm->remainingSize(); + } + + if ( nStreamSize > 0 ) + { SotStorageRef aStorage = new SotStorage ( pStrm, sal_False ); if ( !aStorage->GetError() ) { |