summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-09-09 11:06:42 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-09-09 11:27:23 +0000
commitcb958bb5e0e81d343c91c08a8513006a7bf1d913 (patch)
tree376b6bdfd1e4be0851f5eba9092588cfde451945 /sot
parentf4fcec5f0802620192c31aad24db436ead1b2036 (diff)
loplugin:constantparam in sot..svl
Change-Id: I08db2db3b90725c556e3ba062da5d62d98f6e882 Reviewed-on: https://gerrit.libreoffice.org/28769 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/stg.cxx5
-rw-r--r--sot/source/sdstor/ucbstorage.cxx8
2 files changed, 4 insertions, 9 deletions
diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx
index 26703ff5fd15..fefd677b1bb6 100644
--- a/sot/source/sdstor/stg.cxx
+++ b/sot/source/sdstor/stg.cxx
@@ -601,11 +601,8 @@ BaseStorage* Storage::OpenStorage( const OUString& rName, StreamMode m, bool bDi
// Open a stream
-BaseStorageStream* Storage::OpenStream( const OUString& rName, StreamMode m, bool,
- const OString* pB )
+BaseStorageStream* Storage::OpenStream( const OUString& rName, StreamMode m, bool )
{
- DBG_ASSERT(!pB, "Encryption not supported");
-
if( !Validate() || !ValidateMode( m ) )
return new StorageStream( pIo, nullptr, m );
StgDirEntry* p = pIo->m_pTOC->Find( *pEntry, rName );
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 7ea86ab09978..1056ce20dcf0 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -2615,7 +2615,7 @@ bool UCBStorage::Revert()
return pImp->Revert();
}
-BaseStorageStream* UCBStorage::OpenStream( const OUString& rEleName, StreamMode nMode, bool bDirect, const OString* pKey )
+BaseStorageStream* UCBStorage::OpenStream( const OUString& rEleName, StreamMode nMode, bool bDirect )
{
if( rEleName.isEmpty() )
return nullptr;
@@ -2631,7 +2631,7 @@ BaseStorageStream* UCBStorage::OpenStream( const OUString& rEleName, StreamMode
OUString aName( pImp->m_aURL );
aName += "/";
aName += rEleName;
- UCBStorageStream* pStream = new UCBStorageStream( aName, nMode, bDirect, pKey, pImp->m_bRepairPackage, pImp->m_xProgressHandler );
+ UCBStorageStream* pStream = new UCBStorageStream( aName, nMode, bDirect, nullptr, pImp->m_bRepairPackage, pImp->m_xProgressHandler );
pStream->SetError( GetError() );
pStream->pImp->m_aName = rEleName;
return pStream;
@@ -2662,8 +2662,6 @@ BaseStorageStream* UCBStorage::OpenStream( const OUString& rEleName, StreamMode
// check if stream is opened with the same keyword as before
// if not, generate a new stream because it could be encrypted vs. decrypted!
OString aKey;
- if ( pKey )
- aKey = *pKey;
if ( pElement->m_xStream->m_aKey == aKey )
{
pElement->m_xStream->PrepareCachedForReopen( nMode );
@@ -2674,7 +2672,7 @@ BaseStorageStream* UCBStorage::OpenStream( const OUString& rEleName, StreamMode
}
// stream is opened the first time
- pImp->OpenStream( pElement, nMode, bDirect, pKey );
+ pImp->OpenStream( pElement, nMode, bDirect, nullptr );
// if name has been changed before creating the stream: set name!
pElement->m_xStream->m_aName = rEleName;