diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-11-13 21:02:02 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-11-14 10:11:32 +0000 |
commit | a94b6ec2d57cab51d79329ea62d908f3b3713505 (patch) | |
tree | 68dd3fe95d4e46e24fb68b225d5ef93310593cda /sot/source/sdstor | |
parent | 288a3e6ef7e04c95be1ed26a5df850fbf4e6ea24 (diff) |
callcatcher: update unused code post binfilter death
Change-Id: I5b25d14ef2769126f98523551597f43812b9feb7
Diffstat (limited to 'sot/source/sdstor')
-rw-r--r-- | sot/source/sdstor/storage.cxx | 109 |
1 files changed, 2 insertions, 107 deletions
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx index bc0ab823386b..5fd1efa0b8b0 100644 --- a/sot/source/sdstor/storage.cxx +++ b/sot/source/sdstor/storage.cxx @@ -360,36 +360,6 @@ sal_Bool SotStorageStream::SetProperty( const String& rName, const ::com::sun::s } } -sal_Bool SotStorageStream::GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue ) -{ - UCBStorageStream* pStg = PTR_CAST( UCBStorageStream, pOwnStm ); - if ( pStg ) - { - return pStg->GetProperty( rName, rValue ); - } - else - { - OSL_FAIL("Not implemented!"); - return sal_False; - } -} - -::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SotStorageStream::GetXInputStream() const -{ - UCBStorageStream* pStg = PTR_CAST( UCBStorageStream, pOwnStm ); - if ( pStg ) - { - return pStg->GetXInputStream(); - } - else - { - OSL_FAIL("Not implemented!"); - return ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >(); - } -} - - - /************** class SotStorage ****************************************** *************************************************************************/ class SotStorageFactory : public SotFactory @@ -732,13 +702,9 @@ const String & SotStorage::GetName() const return m_aName; } -void SotStorage::SetName( const String& rName ) +const rtl::OString& SotStorage::GetKey() const { - // This method is necessary because most storages will not be opened with a FileName, but an external stream instead - // This stream is a stream opened by a UCP and so aName is only used as a transport for all client code of the SotStorage - // class that depends on the fact that a root storage has a name - DBG_ASSERT( !GetName().Len(), "SetName() must not be called when the storage already has a name!" ); - m_aName = rName; + return m_aKey; } /************************************************************************* @@ -960,27 +926,6 @@ SotStorage * SotStorage::OpenSotStorage( const String & rEleName, return NULL; } -SotStorage * SotStorage::OpenUCBStorage( const String & rEleName, - StreamMode nMode, - StorageMode nStorageMode ) -{ - SotStorage * pStor = NULL; - DBG_ASSERT( Owner(), "must be owner" ); - if( m_pOwnStg ) - { - nMode |= STREAM_SHARE_DENYALL; - ErrCode nE = m_pOwnStg->GetError(); - BaseStorage * p = m_pOwnStg->OpenUCBStorage( rEleName, nMode, - (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True ); - pStor = new SotStorage( p ); - if( !nE ) - m_pOwnStg->ResetError(); // kein Fehler setzen - } - else - SetError( SVSTREAM_GENERALERROR ); - return pStor; -} - /************************************************************************* |* SotStorage::IsStream() |* SotStorage::IsStorage() @@ -1093,15 +1038,6 @@ sal_Bool SotStorage::MoveTo( const String & rEleName, return SVSTREAM_OK == GetError(); } -const SvStream* SotStorage::GetSvStream() -{ - const SvStream* pResult = 0; - DBG_ASSERT( Owner(), "must be owner" ); - if( m_pOwnStg ) - pResult = m_pOwnStg->GetSvStream(); - return pResult; -} - sal_Bool SotStorage::Validate() { DBG_ASSERT( m_bIsRoot, "Validate nur an Rootstorage" ); @@ -1125,29 +1061,6 @@ sal_Bool SotStorage::SetProperty( const String& rName, const ::com::sun::star::u } } -sal_Bool SotStorage::GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue ) -{ - UCBStorage* pStg = PTR_CAST( UCBStorage, m_pOwnStg ); - if ( pStg ) - { - return pStg->GetProperty( rName, rValue ); - } - else if ( rName.CompareToAscii("MediaType") == COMPARE_EQUAL ) - { - String aStr = SotExchange::GetFormatMimeType( GetFormat() ); - sal_uInt16 nPos = aStr.Search(';'); - if ( nPos != STRING_NOTFOUND ) - aStr = aStr.Copy( 0, nPos ); - rValue <<= (::rtl::OUString) aStr; - return sal_True; - } - else - { - DBG_WARNING("W1:Not implemented!"); - return sal_False; - } -} - sal_Bool SotStorage::IsOLEStorage() const { UCBStorage* pStg = PTR_CAST( UCBStorage, m_pOwnStg ); @@ -1164,24 +1077,6 @@ sal_Bool SotStorage::IsOLEStorage( SvStream* pStream ) return Storage::IsStorageFile( pStream ); } -void SotStorage::SetKey( const rtl::OString& rKey ) -{ - m_aKey = rKey; - if ( !IsOLEStorage() ) - { - sal_uInt8 aBuffer[RTL_DIGEST_LENGTH_SHA1]; - rtlDigestError nError = rtl_digest_SHA1( m_aKey.getStr(), m_aKey.getLength(), aBuffer, RTL_DIGEST_LENGTH_SHA1 ); - if ( nError == rtl_Digest_E_None ) - { - sal_uInt8* pBuffer = aBuffer; - ::com::sun::star::uno::Sequence < sal_Int8 > aSequ( (sal_Int8*) pBuffer, RTL_DIGEST_LENGTH_SHA1 ); - ::com::sun::star::uno::Any aAny; - aAny <<= aSequ; - SetProperty( ::rtl::OUString("EncryptionKey"), aAny ); - } - } -} - SotStorage* SotStorage::OpenOLEStorage( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage, const String& rEleName, StreamMode nMode ) { |