summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-01-12 15:40:44 +0200
committerNoel Grandin <noel@peralex.com>2016-01-13 08:44:45 +0200
commitfa7c7b160136e4b08bc1e1aef9017d4596ad6184 (patch)
treeec123062f175d9322d76c6b7311cc71c8e290e6a /sot
parent38c23520d40749ff21b6b1ed5f5c0375d40fe1fc (diff)
loplugin:unusedmethods unused return value in include/sot
Change-Id: I8da6d5f60b6c65ff0da8659045da1cd7666fb1d9
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/stg.cxx11
-rw-r--r--sot/source/sdstor/storage.cxx3
-rw-r--r--sot/source/sdstor/ucbstorage.cxx14
3 files changed, 10 insertions, 18 deletions
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()