summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-15 09:13:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-15 12:56:26 +0000
commit0d051730156f633150fa9e3107fe97cf7be6d8f9 (patch)
tree73a29cd8f7f6c3630088c74f52cb53c948eb4ba5 /sot
parentd2e9d3d0ed42f0fc24255c64546d8d256ca33aae (diff)
loplugin:constantparam
Change-Id: Iced8ff99d52d55e6b6c3126affafbea6786e94f0 Reviewed-on: https://gerrit.libreoffice.org/30858 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/stg.cxx2
-rw-r--r--sot/source/sdstor/stgole.cxx4
-rw-r--r--sot/source/sdstor/stgole.hxx2
-rw-r--r--sot/source/sdstor/ucbstorage.cxx23
4 files changed, 8 insertions, 23 deletions
diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx
index fefd677b1bb6..0ce16d4900e5 100644
--- a/sot/source/sdstor/stg.cxx
+++ b/sot/source/sdstor/stg.cxx
@@ -842,7 +842,7 @@ void Storage::SetClass( const SvGlobalName & rClass,
SetError( aCompObj.GetError() );
else
{
- StgOleStream aOle(*this, true);
+ StgOleStream aOle(*this);
if( !aOle.Store() )
SetError( aOle.GetError() );
}
diff --git a/sot/source/sdstor/stgole.cxx b/sot/source/sdstor/stgole.cxx
index a13a68ff6d2f..9adfcac5fbd4 100644
--- a/sot/source/sdstor/stgole.cxx
+++ b/sot/source/sdstor/stgole.cxx
@@ -163,8 +163,8 @@ bool StgCompObjStream::Store()
/////////////////////////// class StgOleStream
-StgOleStream::StgOleStream( BaseStorage& rStg, bool bWr )
- : StgInternalStream( rStg, OUString("\1Ole"), bWr )
+StgOleStream::StgOleStream( BaseStorage& rStg )
+ : StgInternalStream( rStg, OUString("\1Ole"), true )
{
}
diff --git a/sot/source/sdstor/stgole.hxx b/sot/source/sdstor/stgole.hxx
index 30d8ab3336cb..cfe09b18ba63 100644
--- a/sot/source/sdstor/stgole.hxx
+++ b/sot/source/sdstor/stgole.hxx
@@ -59,7 +59,7 @@ public:
class StgOleStream : public StgInternalStream
{
public:
- StgOleStream( BaseStorage&, bool );
+ explicit StgOleStream( BaseStorage& );
bool Store();
};
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index b0a4f87017b0..148e9cc9efa6 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -436,7 +436,7 @@ public:
// reference is destroyed
bool m_bIsOLEStorage;// an OLEStorage on a UCBStorageStream makes this an Autocommit-stream
- UCBStorageStream_Impl( const OUString&, StreamMode, UCBStorageStream*, bool, const OString* pKey,
+ UCBStorageStream_Impl( const OUString&, StreamMode, UCBStorageStream*, bool,
bool bRepair, Reference< XProgressHandler > const & xProgress );
void Free();
@@ -634,7 +634,7 @@ bool UCBStorageElement_Impl::IsModified()
return bModified;
}
-UCBStorageStream_Impl::UCBStorageStream_Impl( const OUString& rName, StreamMode nMode, UCBStorageStream* pStream, bool bDirect, const OString* pKey, bool bRepair, Reference< XProgressHandler > const & xProgress )
+UCBStorageStream_Impl::UCBStorageStream_Impl( const OUString& rName, StreamMode nMode, UCBStorageStream* pStream, bool bDirect, bool bRepair, Reference< XProgressHandler > const & xProgress )
: m_pAntiImpl( pStream )
, m_aURL( rName )
, m_pContent( nullptr )
@@ -665,21 +665,6 @@ UCBStorageStream_Impl::UCBStorageStream_Impl( const OUString& rName, StreamMode
}
m_pContent = new ::ucbhelper::Content( aTemp, xComEnv, comphelper::getProcessComponentContext() );
-
- if ( pKey )
- {
- m_aKey = *pKey;
-
- // stream is encrypted and should be decrypted (without setting the key we'll get the raw data)
- sal_uInt8 aBuffer[RTL_DIGEST_LENGTH_SHA1];
- rtlDigestError nErr = rtl_digest_SHA1( pKey->getStr(), pKey->getLength(), aBuffer, RTL_DIGEST_LENGTH_SHA1 );
- if ( nErr == rtl_Digest_E_None )
- {
- sal_uInt8* pBuffer = aBuffer;
- css::uno::Sequence < sal_Int8 > aSequ( reinterpret_cast<sal_Int8*>(pBuffer), RTL_DIGEST_LENGTH_SHA1 );
- m_pContent->setPropertyValue("EncryptionKey", Any(aSequ) );
- }
- }
}
catch (const ContentCreationException&)
{
@@ -1245,7 +1230,7 @@ UCBStorageStream::UCBStorageStream( const OUString& rName, StreamMode nMode, boo
{
// pImp must be initialized in the body, because otherwise the vtable of the stream is not initialized
// to class UCBStorageStream !
- pImp = new UCBStorageStream_Impl( rName, nMode, this, bDirect, nullptr, bRepair, xProgress );
+ pImp = new UCBStorageStream_Impl( rName, nMode, this, bDirect, bRepair, xProgress );
pImp->AddFirstRef(); // use direct refcounting because in header file only a pointer should be used
StorageBase::m_nMode = pImp->m_nMode;
}
@@ -2687,7 +2672,7 @@ void UCBStorage_Impl::OpenStream( UCBStorageElement_Impl* pElement, StreamMode n
OUString aName( m_aURL );
aName += "/";
aName += pElement->m_aOriginalName;
- pElement->m_xStream = new UCBStorageStream_Impl( aName, nMode, nullptr, bDirect, nullptr, m_bRepairPackage, m_xProgressHandler );
+ pElement->m_xStream = new UCBStorageStream_Impl( aName, nMode, nullptr, bDirect, m_bRepairPackage, m_xProgressHandler );
}
BaseStorage* UCBStorage::OpenUCBStorage( const OUString& rEleName, StreamMode nMode, bool bDirect )