summaryrefslogtreecommitdiff
path: root/sot/source
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2001-02-12 16:18:09 +0000
committerMathias Bauer <mba@openoffice.org>2001-02-12 16:18:09 +0000
commitb4436d90807c181bb602bbc40f9a951fa4632a96 (patch)
treed58c6573012cb65a1f18cbe707daeb0b19bf1e88 /sot/source
parent8a6973ee3bd6962e943c432901b2285eddd4d7d0 (diff)
OpenOLEStorage
Diffstat (limited to 'sot/source')
-rw-r--r--sot/source/sdstor/stg.cxx9
-rw-r--r--sot/source/sdstor/storage.cxx25
-rw-r--r--sot/source/sdstor/ucbstorage.cxx8
3 files changed, 38 insertions, 4 deletions
diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx
index 21e52fd26611..42cb8953c05e 100644
--- a/sot/source/sdstor/stg.cxx
+++ b/sot/source/sdstor/stg.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: stg.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: mba $ $Date: 2000-12-04 11:10:03 $
+ * last change: $Author: mba $ $Date: 2001-02-12 17:18:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -560,6 +560,11 @@ BaseStorage* Storage::OpenUCBStorage( const String& rName, StreamMode m, BOOL bD
return pStorage;
}
+BaseStorage* Storage::OpenOLEStorage( const String& rName, StreamMode m, BOOL bDirect )
+{
+ return OpenStorage( rName, m, bDirect );
+}
+
BaseStorage* Storage::OpenStorage( const String& rName, StreamMode m, BOOL bDirect )
{
if( !Validate() || !ValidateMode( m ) )
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index aa153f58c06e..3c6a54d60b96 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: storage.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: mba $ $Date: 2001-02-06 11:12:08 $
+ * last change: $Author: mba $ $Date: 2001-02-12 17:18:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -939,6 +939,27 @@ SotStorage * SotStorage::OpenUCBStorage( const String & rEleName,
return pStor;
}
+SotStorage * SotStorage::OpenOLEStorage( const String & rEleName,
+ StreamMode nMode,
+ StorageMode nStorageMode )
+{
+ SotStorage * pStor = NULL;
+ DBG_ASSERT( Owner(), "must be owner" )
+ if( pOwnStg )
+ {
+ nMode |= STREAM_SHARE_DENYALL;
+ ErrCode nE = pOwnStg->GetError();
+ BaseStorage * p = pOwnStg->OpenOLEStorage( rEleName, nMode,
+ (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
+ pStor = new SotStorage( p );
+ if( !nE )
+ pOwnStg->ResetError(); // kein Fehler setzen
+ }
+ else
+ SetError( SVSTREAM_GENERALERROR );
+ return pStor;
+}
+
/*************************************************************************
|* SotStorage::IsStream()
|* SotStorage::IsStorage()
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 6832b621daa5..5fe21413403c 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -1462,6 +1462,14 @@ BaseStorage* UCBStorage::OpenUCBStorage( const String& rEleName, StreamMode nMod
return OpenStorage_Impl( rEleName, nMode, bDirect, TRUE );
}
+BaseStorage* UCBStorage::OpenOLEStorage( const String& rEleName, StreamMode nMode, BOOL bDirect )
+{
+ if( !rEleName.Len() )
+ return NULL;
+
+ return OpenStorage_Impl( rEleName, nMode, bDirect, FALSE );
+}
+
BaseStorage* UCBStorage::OpenStorage( const String& rEleName, StreamMode nMode, BOOL bDirect )
{
if( !rEleName.Len() )