summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-10-17 13:08:01 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-10-17 15:30:51 +0200
commit6a8a73566c475c945e45e40e269765959d93164d (patch)
treea8da7da018f46961fc9366eb13e9e5653a1a0c5c /sot
parent6a902b238324d4d0c3c45819c2b23e6973d40a29 (diff)
ofz#18280 remove LinkedFile support
The code to create these "linked files" added by: commit 6f2f7e3091504e8e58d9be603ed3739f6f2cd68e Author: Mathias Bauer <mba@openoffice.org> Date: Fri Jul 6 14:03:59 2001 +0000 #89377#: new StorageMode for creating unpacked files use of creating them then introduced in: commit 53fe2691a3fb65110e7f5aee2919f7d8d559ff02 Author: Mathias Bauer <mba@openoffice.org> Date: Fri Jul 6 13:55:57 2001 +0000 #88062#: some optimizations that use then commented out in: commit 762dd2b15bfd201b2271b460efa72a5b68d6fb2a Author: Kurt Zenker <kz@openoffice.org> Date: Mon Oct 4 19:53:11 2004 +0000 and the unused code to create them removed in: commit 8a91528a3e03fe6e2923c33327b687ecf57adb0b Author: Stephan Bergmann <sbergman@redhat.com> Date: Thu May 7 10:37:27 2015 +0200 StorageMode::CreateUnpacked is never used It seems to me that there is no need to keep support for reading them as they seem to have been temporary files rather than something still existant Change-Id: I783cae63dc078a7e843729d3ca13f45c18168f4c Reviewed-on: https://gerrit.libreoffice.org/80943 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
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: */