summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/storage.cxx15
-rw-r--r--sot/source/sdstor/ucbstorage.cxx42
2 files changed, 6 insertions, 51 deletions
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index 16d1a976b577..f15fb22dd9f1 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -318,18 +318,9 @@ void SotStorage::CreateStorage( bool bForceUCBStorage, StreamMode nMode )
if ( bIsUCBStorage )
{
- if ( !(UCBStorage::GetLinkedFile( *m_pStorStm ).isEmpty()) )
- {
- // detect special unpacked storages
- m_pOwnStg = new UCBStorage( *m_pStorStm, true );
- m_bDelStm = true;
- }
- else
- {
- // UCBStorage always works directly on the UCB content, so discard the stream first
- DELETEZ( m_pStorStm );
- m_pOwnStg = new UCBStorage( m_aName, nMode, true, true/*bIsRoot*/ );
- }
+ // UCBStorage always works directly on the UCB content, so discard the stream first
+ DELETEZ( m_pStorStm );
+ m_pOwnStg = new UCBStorage( m_aName, nMode, true, true/*bIsRoot*/ );
}
else
{
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 5edae19704cb..5340f841454c 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -1363,22 +1363,9 @@ sal_uLong UCBStorageStream::GetSize() const
UCBStorage::UCBStorage( SvStream& rStrm, bool bDirect )
{
- OUString aURL = GetLinkedFile( rStrm );
- if ( !aURL.isEmpty() )
- {
- StreamMode nMode = StreamMode::READ;
- if( rStrm.IsWritable() )
- nMode = StreamMode::READ | StreamMode::WRITE;
-
- ::ucbhelper::Content aContent( aURL, Reference < XCommandEnvironment >(), comphelper::getProcessComponentContext() );
- pImp = new UCBStorage_Impl( aContent, aURL, nMode, this, bDirect, true );
- }
- else
- {
- // pImp must be initialized in the body, because otherwise the vtable of the stream is not initialized
- // to class UCBStorage !
- pImp = new UCBStorage_Impl( rStrm, this, bDirect );
- }
+ // pImp must be initialized in the body, because otherwise the vtable of the stream is not initialized
+ // to class UCBStorage !
+ pImp = new UCBStorage_Impl( rStrm, this, bDirect );
pImp->AddFirstRef();
pImp->Init();
@@ -2870,27 +2857,4 @@ bool UCBStorage::IsStorageFile( SvStream* pFile )
return bRet;
}
-OUString UCBStorage::GetLinkedFile( SvStream &rStream )
-{
- OUString aString;
- sal_uInt64 nPos = rStream.Tell();
- if ( !rStream.TellEnd() )
- return aString;
-
- rStream.Seek(0);
- sal_uInt32 nBytes;
- rStream.ReadUInt32( nBytes );
- if( nBytes == 0x04034b50 )
- {
- OString aTmp = read_uInt16_lenPrefixed_uInt8s_ToOString(rStream);
- if (aTmp.match("ContentURL="))
- {
- aString = OStringToOUString(aTmp.copy(11), RTL_TEXTENCODING_UTF8);
- }
- }
-
- rStream.Seek( nPos );
- return aString;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */