summaryrefslogtreecommitdiff
path: root/oox/source/ole
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-09-29 12:43:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-09-30 06:57:26 +0000
commit4d87443bf59c3242d58b56cc1583d73213ae1f2f (patch)
treec1f74fc569506299100b5063f14c09e46035a943 /oox/source/ole
parent8e812b87ff7f8c5bf2c6f8858646c55effd2eea3 (diff)
loplugin:constantparam
Change-Id: Idbe8c8e6b3d44cacce296ec8c79b2b244281057c Reviewed-on: https://gerrit.libreoffice.org/29321 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox/source/ole')
-rw-r--r--oox/source/ole/axcontrol.cxx4
-rw-r--r--oox/source/ole/vbaexport.cxx21
-rw-r--r--oox/source/ole/vbaproject.cxx6
3 files changed, 14 insertions, 17 deletions
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index 92a9aa1c6851..69ab00395709 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -2674,8 +2674,8 @@ void EmbeddedControl::convertFromProperties( const Reference< XControlModel >& r
}
EmbeddedForm::EmbeddedForm( const Reference< XModel >& rxDocModel,
- const Reference< XDrawPage >& rxDrawPage, const GraphicHelper& rGraphicHelper, bool bDefaultColorBgr ) :
- maControlConv( rxDocModel, rGraphicHelper, bDefaultColorBgr ),
+ const Reference< XDrawPage >& rxDrawPage, const GraphicHelper& rGraphicHelper ) :
+ maControlConv( rxDocModel, rGraphicHelper, true/*bDefaultColorBgr*/ ),
mxModelFactory( rxDocModel, UNO_QUERY ),
mxFormsSupp( rxDrawPage, UNO_QUERY )
{
diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index 7272757754a8..dec660eccd96 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -395,7 +395,7 @@ void VBACompression::write()
// section 2.4.3
#if VBA_ENCRYPTION
-VBAEncryption::VBAEncryption(const sal_uInt8* pData, const sal_uInt16 length, SvStream& rEncryptedData, sal_uInt8* pSeed, sal_uInt8 nProjKey)
+VBAEncryption::VBAEncryption(const sal_uInt8* pData, const sal_uInt16 length, SvStream& rEncryptedData, sal_uInt8 nProjKey)
:mpData(pData)
,mnLength(length)
,mrEncryptedData(rEncryptedData)
@@ -404,16 +404,13 @@ VBAEncryption::VBAEncryption(const sal_uInt8* pData, const sal_uInt16 length, Sv
,mnEncryptedByte2(0)
,mnProjKey(nProjKey)
,mnIgnoredLength(0)
- ,mnSeed(pSeed ? *pSeed : 0x00)
+ ,mnSeed(0x00)
,mnVersionEnc(0)
{
- if (!pSeed)
- {
- std::random_device rd;
- std::mt19937 gen(rd());
- std::uniform_int_distribution<> dis(0, 255);
- mnSeed = dis(gen);
- }
+ std::random_device rd;
+ std::mt19937 gen(rd());
+ std::uniform_int_distribution<> dis(0, 255);
+ mnSeed = dis(gen);
}
void VBAEncryption::writeSeed()
@@ -915,7 +912,7 @@ void exportPROJECTStream(SvStream& rStrm, const css::uno::Reference<css::contain
aProtectedStream.WriteUInt32(0x00000000);
const sal_uInt8* pData = static_cast<const sal_uInt8*>(aProtectedStream.GetData());
sal_uInt8 nProjKey = VBAEncryption::calculateProjKey(aProjectID);
- VBAEncryption aProtectionState(pData, 4, rStrm, nullptr, nProjKey);
+ VBAEncryption aProtectionState(pData, 4, rStrm, nProjKey);
aProtectionState.write();
exportString(rStrm, "\"\r\n");
#else
@@ -928,7 +925,7 @@ void exportPROJECTStream(SvStream& rStrm, const css::uno::Reference<css::contain
aProtectedStream.Seek(0);
aProtectedStream.WriteUInt8(0x00);
pData = static_cast<const sal_uInt8*>(aProtectedStream.GetData());
- VBAEncryption aProjectPassword(pData, 1, rStrm, nullptr, nProjKey);
+ VBAEncryption aProjectPassword(pData, 1, rStrm, nProjKey);
aProjectPassword.write();
exportString(rStrm, "\"\r\n");
#else
@@ -941,7 +938,7 @@ void exportPROJECTStream(SvStream& rStrm, const css::uno::Reference<css::contain
aProtectedStream.Seek(0);
aProtectedStream.WriteUInt8(0xFF);
pData = static_cast<const sal_uInt8*>(aProtectedStream.GetData());
- VBAEncryption aVisibilityState(pData, 1, rStrm, nullptr, nProjKey);
+ VBAEncryption aVisibilityState(pData, 1, rStrm, nProjKey);
aVisibilityState.write();
exportString(rStrm, "\"\r\n\r\n");
#else
diff --git a/oox/source/ole/vbaproject.cxx b/oox/source/ole/vbaproject.cxx
index 0642a8a5324e..54711172fa98 100644
--- a/oox/source/ole/vbaproject.cxx
+++ b/oox/source/ole/vbaproject.cxx
@@ -174,7 +174,7 @@ void VbaProject::importVbaProject( StorageBase& rVbaPrjStrg, const GraphicHelper
{
// load the code modules and forms
if( isImportVba() )
- importVba( rVbaPrjStrg, rGraphicHelper, true/*bDefaultColorBgr*/ );
+ importVba( rVbaPrjStrg, rGraphicHelper );
// copy entire storage into model
if( isExportVba() )
copyStorage( rVbaPrjStrg );
@@ -249,10 +249,10 @@ Reference< XNameContainer > const & VbaProject::createDialogLibrary()
return mxDialogLib;
}
-void VbaProject::importVba( StorageBase& rVbaPrjStrg, const GraphicHelper& rGraphicHelper, bool bDefaultColorBgr )
+void VbaProject::importVba( StorageBase& rVbaPrjStrg, const GraphicHelper& rGraphicHelper )
{
readVbaModules( rVbaPrjStrg );
- importModulesAndForms(rVbaPrjStrg, rGraphicHelper, bDefaultColorBgr );
+ importModulesAndForms(rVbaPrjStrg, rGraphicHelper );
}
void VbaProject::readVbaModules( StorageBase& rVbaPrjStrg )