summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-17 11:40:41 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-03-18 06:00:58 +0000
commit6b84445e33cb13602a0da9ab92d382748bcbbd51 (patch)
tree8825b514307e239eb01fc93e9ef89d02ae51d64c
parentbdcef25c5cfacbaac7d439a7ad2106308dc3a7e5 (diff)
loplugin:constantparam in package
Change-Id: Ifd9bb81ff9ccfaf5093c04024d7ea93946b00e66 Reviewed-on: https://gerrit.libreoffice.org/23329 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--include/package/Deflater.hxx2
-rw-r--r--package/inc/ZipPackageEntry.hxx2
-rw-r--r--package/source/zipapi/Deflater.cxx6
-rw-r--r--package/source/zippackage/ZipPackage.cxx4
-rw-r--r--package/source/zippackage/ZipPackageEntry.cxx6
5 files changed, 10 insertions, 10 deletions
diff --git a/include/package/Deflater.hxx b/include/package/Deflater.hxx
index 640c6d4828a5..d29cea948889 100644
--- a/include/package/Deflater.hxx
+++ b/include/package/Deflater.hxx
@@ -38,7 +38,7 @@ protected:
sal_Int64 nOffset, nLength;
z_stream* pStream;
- void init (sal_Int32 nLevel, sal_Int32 nStrategy, bool bNowrap);
+ void init (sal_Int32 nLevel, bool bNowrap);
sal_Int32 doDeflateBytes (css::uno::Sequence < sal_Int8 > &rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength);
public:
diff --git a/package/inc/ZipPackageEntry.hxx b/package/inc/ZipPackageEntry.hxx
index bd613ae9bf3e..6d7381e280b7 100644
--- a/package/inc/ZipPackageEntry.hxx
+++ b/package/inc/ZipPackageEntry.hxx
@@ -61,7 +61,7 @@ public:
const OUString& GetMediaType () const { return msMediaType; }
void SetMediaType ( const OUString & sNewType) { msMediaType = sNewType; }
- void doSetParent ( ZipPackageFolder * pNewParent, bool bInsert );
+ void doSetParent ( ZipPackageFolder * pNewParent );
bool IsFolder ( ) { return mbIsFolder; }
void SetFolder ( bool bSetFolder ) { mbIsFolder = bSetFolder; }
diff --git a/package/source/zipapi/Deflater.cxx b/package/source/zipapi/Deflater.cxx
index ce3df035b612..6af18af08dc7 100644
--- a/package/source/zipapi/Deflater.cxx
+++ b/package/source/zipapi/Deflater.cxx
@@ -35,14 +35,14 @@ Deflater::~Deflater()
{
end();
}
-void Deflater::init (sal_Int32 nLevelArg, sal_Int32 nStrategyArg, bool bNowrap)
+void Deflater::init (sal_Int32 nLevelArg, bool bNowrap)
{
pStream = new z_stream;
/* Memset it to 0...sets zalloc/zfree/opaque to NULL */
memset (pStream, 0, sizeof(*pStream));
switch (deflateInit2(pStream, nLevelArg, Z_DEFLATED, bNowrap? -MAX_WBITS : MAX_WBITS,
- DEF_MEM_LEVEL, nStrategyArg))
+ DEF_MEM_LEVEL, DEFAULT_STRATEGY))
{
case Z_OK:
break;
@@ -63,7 +63,7 @@ Deflater::Deflater(sal_Int32 nSetLevel, bool bNowrap)
, nOffset(0)
, nLength(0)
{
- init(nSetLevel, DEFAULT_STRATEGY, bNowrap);
+ init(nSetLevel, bNowrap);
}
sal_Int32 Deflater::doDeflateBytes (uno::Sequence < sal_Int8 > &rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength)
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index c1bd32a2ff99..4b9a67105613 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -535,7 +535,7 @@ void ZipPackage::getZipFileContents()
{
pPkgFolder = new ZipPackageFolder( m_xContext, m_nFormat, m_bAllowRemoveOnInsert );
pPkgFolder->setName( sTemp );
- pPkgFolder->doSetParent( pCurrent, true );
+ pPkgFolder->doSetParent( pCurrent );
pCurrent = pPkgFolder;
}
else
@@ -553,7 +553,7 @@ void ZipPackage::getZipFileContents()
pPkgStream->SetPackageMember( true );
pPkgStream->setZipEntryOnLoading( rEntry );
pPkgStream->setName( sTemp );
- pPkgStream->doSetParent( pCurrent, true );
+ pPkgStream->doSetParent( pCurrent );
}
}
diff --git a/package/source/zippackage/ZipPackageEntry.cxx b/package/source/zippackage/ZipPackageEntry.cxx
index 33518946c00d..327292f8b894 100644
--- a/package/source/zippackage/ZipPackageEntry.cxx
+++ b/package/source/zippackage/ZipPackageEntry.cxx
@@ -83,11 +83,11 @@ uno::Reference< XInterface > SAL_CALL ZipPackageEntry::getParent( )
return uno::Reference< XInterface >( static_cast< ::cppu::OWeakObject* >( mpParent ), UNO_QUERY );
}
-void ZipPackageEntry::doSetParent ( ZipPackageFolder * pNewParent, bool bInsert )
+void ZipPackageEntry::doSetParent ( ZipPackageFolder * pNewParent )
{
// xParent = mpParent = pNewParent;
mpParent = pNewParent;
- if ( bInsert && !msName.isEmpty() && !pNewParent->hasByName ( msName ) )
+ if ( !msName.isEmpty() && !pNewParent->hasByName ( msName ) )
pNewParent->doInsertByName ( this, false );
}
@@ -105,7 +105,7 @@ void SAL_CALL ZipPackageEntry::setParent( const uno::Reference< XInterface >& xN
{
if ( mpParent && !msName.isEmpty() && mpParent->hasByName ( msName ) && mbAllowRemoveOnInsert )
mpParent->removeByName( msName );
- doSetParent ( pNewParent, true );
+ doSetParent ( pNewParent );
}
}
//XPropertySet