diff options
-rw-r--r-- | include/sot/stg.hxx | 12 | ||||
-rw-r--r-- | include/sot/storage.hxx | 2 | ||||
-rw-r--r-- | include/store/store.hxx | 14 | ||||
-rw-r--r-- | sot/source/sdstor/stg.cxx | 11 | ||||
-rw-r--r-- | sot/source/sdstor/storage.cxx | 3 | ||||
-rw-r--r-- | sot/source/sdstor/ucbstorage.cxx | 14 |
6 files changed, 17 insertions, 39 deletions
diff --git a/include/sot/stg.hxx b/include/sot/stg.hxx index 90cf9be52cac..a0a5eeaa5884 100644 --- a/include/sot/stg.hxx +++ b/include/sot/stg.hxx @@ -74,7 +74,7 @@ public: virtual void Flush() = 0; virtual bool SetSize( sal_uLong nNewSize ) = 0; virtual sal_uLong GetSize() const = 0; - virtual bool CopyTo( BaseStorageStream * pDestStm ) = 0; + virtual void CopyTo( BaseStorageStream * pDestStm ) = 0; virtual bool Commit() = 0; virtual bool Equals( const BaseStorageStream& rStream ) const = 0; }; @@ -114,7 +114,7 @@ public: virtual bool IsStream( const OUString& rEleName ) const = 0; virtual bool IsStorage( const OUString& rEleName ) const = 0; virtual bool IsContained( const OUString& rEleName ) const = 0; - virtual bool Remove( const OUString & rEleName ) = 0; + virtual void Remove( const OUString & rEleName ) = 0; virtual bool CopyTo( const OUString & rEleName, BaseStorage * pDest, const OUString & rNewName ) = 0; virtual bool ValidateFAT() = 0; virtual bool Equals( const BaseStorage& rStream ) const = 0; @@ -147,7 +147,7 @@ public: virtual void Flush() override; virtual bool SetSize( sal_uLong nNewSize ) override; virtual sal_uLong GetSize() const override; - virtual bool CopyTo( BaseStorageStream * pDestStm ) override; + virtual void CopyTo( BaseStorageStream * pDestStm ) override; virtual bool Commit() override; virtual bool Validate( bool=false ) const override; virtual bool ValidateMode( StreamMode ) const override; @@ -202,7 +202,7 @@ public: virtual bool IsStream( const OUString& rEleName ) const override; virtual bool IsStorage( const OUString& rEleName ) const override; virtual bool IsContained( const OUString& rEleName ) const override; - virtual bool Remove( const OUString & rEleName ) override; + virtual void Remove( const OUString & rEleName ) override; virtual bool CopyTo( const OUString & rEleName, BaseStorage * pDest, const OUString & rNewName ) override; virtual bool ValidateFAT() override; virtual bool Validate( bool=false ) const override; @@ -231,7 +231,7 @@ public: virtual void Flush() override; virtual bool SetSize( sal_uLong nNewSize ) override; virtual sal_uLong GetSize() const override; - virtual bool CopyTo( BaseStorageStream * pDestStm ) override; + virtual void CopyTo( BaseStorageStream * pDestStm ) override; virtual bool Commit() override; virtual bool Validate( bool=false ) const override; virtual bool ValidateMode( StreamMode ) const override; @@ -305,7 +305,7 @@ public: virtual bool IsStream( const OUString& rEleName ) const override; virtual bool IsStorage( const OUString& rEleName ) const override; virtual bool IsContained( const OUString& rEleName ) const override; - virtual bool Remove( const OUString & rEleName ) override; + virtual void Remove( const OUString & rEleName ) override; virtual bool CopyTo( const OUString & rEleName, BaseStorage * pDest, const OUString & rNewName ) override; virtual bool ValidateFAT() override; virtual bool Validate( bool=false ) const override; diff --git a/include/sot/storage.hxx b/include/sot/storage.hxx index 3e431a34280b..326ef1e1a71e 100644 --- a/include/sot/storage.hxx +++ b/include/sot/storage.hxx @@ -53,7 +53,7 @@ public: virtual void SetSize( sal_uInt64 nNewSize ) override; sal_uInt32 GetSize() const; - bool CopyTo( SotStorageStream * pDestStm ); + void CopyTo( SotStorageStream * pDestStm ); bool Commit(); bool SetProperty( const OUString& rName, const css::uno::Any& rValue ); virtual sal_uInt64 remainingSize() override; diff --git a/include/store/store.hxx b/include/store/store.hxx index 790fd4b483d0..050e9b732ba4 100644 --- a/include/store/store.hxx +++ b/include/store/store.hxx @@ -81,13 +81,6 @@ public: (void) store_acquireHandle (m_hImpl); } - /** Conversion into Stream Handle. - */ - inline operator storeStreamHandle() const - { - return m_hImpl; - } - /** Open the stream. @see store_openStream() */ @@ -193,13 +186,6 @@ public: (void) store_acquireHandle (m_hImpl); } - /** Conversion into Directory Handle. - */ - inline operator storeDirectoryHandle() const - { - return m_hImpl; - } - /** Open the directory. @see store_openDirectory() */ diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx index 52453000f5f8..45c0296db896 100644 --- a/sot/source/sdstor/stg.cxx +++ b/sot/source/sdstor/stg.cxx @@ -263,15 +263,14 @@ bool StorageStream::Commit() } } -bool StorageStream::CopyTo( BaseStorageStream* pDest ) +void StorageStream::CopyTo( BaseStorageStream* pDest ) { if( !Validate() || !pDest || !pDest->Validate( true ) || Equals( *pDest ) ) - return false; + return; pEntry->Copy( *pDest ); pDest->Commit(); pIo->MoveError( *this ); SetError( pDest->GetError() ); - return Good() && pDest->Good(); } bool StorageStream::Validate( bool bValidate ) const @@ -650,20 +649,18 @@ BaseStorageStream* Storage::OpenStream( const OUString& rName, StreamMode m, boo // Delete a stream or substorage by setting the temp bit. -bool Storage::Remove( const OUString& rName ) +void Storage::Remove( const OUString& rName ) { if( !Validate( true ) ) - return false; + return; StgDirEntry* p = pIo->m_pTOC->Find( *pEntry, rName ); if( p ) { p->Invalidate( true ); - return true; } else { SetError( SVSTREAM_FILE_NOT_FOUND ); - return false; } } diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx index 9cdc66ea5e14..9abf9ccda276 100644 --- a/sot/source/sdstor/storage.cxx +++ b/sot/source/sdstor/storage.cxx @@ -195,7 +195,7 @@ sal_uInt64 SotStorageStream::remainingSize() return SvStream::remainingSize(); } -bool SotStorageStream::CopyTo( SotStorageStream * pDestStm ) +void SotStorageStream::CopyTo( SotStorageStream * pDestStm ) { Flush(); // alle Daten schreiben pDestStm->ClearBuffer(); @@ -226,7 +226,6 @@ bool SotStorageStream::CopyTo( SotStorageStream * pDestStm ) pOwnStm->CopyTo( pDestStm->pOwnStm ); SetError( pOwnStm->GetError() ); } - return GetError() == SVSTREAM_OK; } bool SotStorageStream::Commit() diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index aa00eda5e570..a8586fd82402 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -1366,10 +1366,10 @@ bool UCBStorageStream::Commit() return true; } -bool UCBStorageStream::CopyTo( BaseStorageStream* pDestStm ) +void UCBStorageStream::CopyTo( BaseStorageStream* pDestStm ) { if( !pImp->Init() ) - return false; + return; UCBStorageStream* pStg = dynamic_cast<UCBStorageStream*>( pDestStm ); if ( pStg ) @@ -1379,7 +1379,7 @@ bool UCBStorageStream::CopyTo( BaseStorageStream* pDestStm ) Seek( STREAM_SEEK_TO_END ); sal_Int32 n = Tell(); if( n < 0 ) - return false; + return; if( pDestStm->SetSize( n ) && n ) { @@ -1398,8 +1398,6 @@ bool UCBStorageStream::CopyTo( BaseStorageStream* pDestStm ) n -= nn; } } - - return true; } bool UCBStorageStream::SetProperty( const OUString& rName, const css::uno::Any& rValue ) @@ -2924,10 +2922,10 @@ bool UCBStorage::IsContained( const OUString & rEleName ) const return ( pElement != nullptr ); } -bool UCBStorage::Remove( const OUString& rEleName ) +void UCBStorage::Remove( const OUString& rEleName ) { if( rEleName.isEmpty() ) - return false; + return; UCBStorageElement_Impl *pElement = FindElement_Impl( rEleName ); if ( pElement ) @@ -2936,8 +2934,6 @@ bool UCBStorage::Remove( const OUString& rEleName ) } else SetError( SVSTREAM_FILE_NOT_FOUND ); - - return ( pElement != nullptr ); } bool UCBStorage::ValidateFAT() |