summaryrefslogtreecommitdiff
path: root/sot/source/sdstor/stgelem.cxx
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2000-10-16 13:11:51 +0000
committerMathias Bauer <mba@openoffice.org>2000-10-16 13:11:51 +0000
commitcd2790c9d1a7b065e286e7fafb110a50fb7067d0 (patch)
tree68c9051838b0ac7dd9b86938f5e2c3a4f02ca25a /sot/source/sdstor/stgelem.cxx
parent85a28d00993da7000273d6282b59189c4ddc1d49 (diff)
IsStorageFile without downloading whole file
Diffstat (limited to 'sot/source/sdstor/stgelem.cxx')
-rw-r--r--sot/source/sdstor/stgelem.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx
index ef568aca861f..4a43cb207147 100644
--- a/sot/source/sdstor/stgelem.cxx
+++ b/sot/source/sdstor/stgelem.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: stgelem.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 16:56:51 $
+ * last change: $Author: mba $ $Date: 2000-10-16 14:08:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -133,6 +133,12 @@ void StgHeader::Init()
BOOL StgHeader::Load( StgIo& rIo )
{
SvStream& r = *rIo.GetStrm();
+ Load( r );
+ return rIo.Good();
+}
+
+BOOL StgHeader::Load( SvStream& r )
+{
r.Seek( 0L );
r.Read( cSignature, 8 );
r >> aClsId // 08 Class ID
@@ -151,7 +157,7 @@ BOOL StgHeader::Load( StgIo& rIo )
>> nMaster; // 48 # of additional master blocks
for( short i = 0; i < 109; i++ )
r >> nMasterFAT[ i ];
- return rIo.Good();
+ return r.GetErrorCode() == ERRCODE_NONE;
}
BOOL StgHeader::Store( StgIo& rIo )