loplugin:constantparam in package..stoc
Change-Id: I04b6d14d3dd8d55ccc4d4eb9313bc37959690672
Reviewed-on: https://gerrit.libreoffice.org/28824
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
diff --git a/include/registry/registry.hxx b/include/registry/registry.hxx
index 614f54f..a9be21d 100644
--- a/include/registry/registry.hxx
+++ b/include/registry/registry.hxx
@@ -153,7 +153,6 @@ public:
If keyName is an empty string the registry information under the key specified
by rKey is merged with the information from the specified file.
@param regFileName specifies the file containing the registry information.
@param bWarnings if TRUE the function returns an error if a key already exists.
@param bReport if TRUE the function reports warnings on stdout if a key already exists.
@return RegError::NO_ERROR if succeeds else an error code. If it returns an error the registry will
restore the state before merging.
@@ -161,8 +160,7 @@ public:
inline RegError mergeKey(RegistryKey& rKey,
const rtl::OUString& keyName,
const rtl::OUString& regFileName,
bool bWarnings = false,
bool bReport = false);
bool bReport);
friend class RegistryKey;
friend class RegistryKeyArray;
@@ -1041,9 +1039,8 @@ inline RegError Registry::destroy(const rtl::OUString& registryName)
inline RegError Registry::mergeKey(RegistryKey& rKey,
const rtl::OUString& keyName,
const rtl::OUString& regFileName,
bool bWarnings,
bool bReport)
{ return m_pApi->mergeKey(m_hImpl, rKey.m_hImpl, keyName.pData, regFileName.pData, bWarnings, bReport); }
{ return m_pApi->mergeKey(m_hImpl, rKey.m_hImpl, keyName.pData, regFileName.pData, false/*bWarnings*/, bReport); }
#endif
diff --git a/package/inc/ZipOutputStream.hxx b/package/inc/ZipOutputStream.hxx
index 0149ade..e532c3a 100644
--- a/package/inc/ZipOutputStream.hxx
+++ b/package/inc/ZipOutputStream.hxx
@@ -78,8 +78,7 @@ private:
public:
void reduceScheduledThreadsToGivenNumberOrLess(
sal_Int32 nThreads,
sal_Int32 nWaitTimeInTenthSeconds);
sal_Int32 nThreads);
const std::shared_ptr<comphelper::ThreadTaskTag>& getThreadTaskTag() { return mpThreadTaskTag; }
};
diff --git a/package/inc/ZipPackageBuffer.hxx b/package/inc/ZipPackageBuffer.hxx
index 8278b3d..6873d7b 100644
--- a/package/inc/ZipPackageBuffer.hxx
+++ b/package/inc/ZipPackageBuffer.hxx
@@ -36,7 +36,7 @@ protected:
sal_Int64 m_nBufferSize, m_nEnd, m_nCurrent;
bool m_bMustInitBuffer;
public:
ZipPackageBuffer(sal_Int64 nNewBufferSize);
ZipPackageBuffer();
virtual ~ZipPackageBuffer();
inline void realloc ( sal_Int32 nSize ) { m_aBuffer.realloc ( nSize ); }
diff --git a/package/source/xstor/ohierarchyholder.cxx b/package/source/xstor/ohierarchyholder.cxx
index 4d84e2d..a173f79 100644
--- a/package/source/xstor/ohierarchyholder.cxx
+++ b/package/source/xstor/ohierarchyholder.cxx
@@ -138,7 +138,7 @@ uno::Reference< embed::XExtendedStorageStream > OHierarchyElement_Impl::GetStrea
if ( !xChildStorage.is() )
throw uno::RuntimeException();
aElement = new OHierarchyElement_Impl( nullptr, xChildStorage );
aElement = new OHierarchyElement_Impl( xChildStorage );
}
xResult = aElement->GetStreamHierarchically( nStorageMode, aListPath, nStreamMode, aEncryptionData );
@@ -195,7 +195,7 @@ void OHierarchyElement_Impl::RemoveStreamHierarchically( OStringList_Impl& aList
if ( !xChildStorage.is() )
throw uno::RuntimeException();
aElement = new OHierarchyElement_Impl( nullptr, xChildStorage );
aElement = new OHierarchyElement_Impl( xChildStorage );
}
aElement->RemoveStreamHierarchically( aListPath );
diff --git a/package/source/xstor/ohierarchyholder.hxx b/package/source/xstor/ohierarchyholder.hxx
index f9d6a97..e8ae40d 100644
--- a/package/source/xstor/ohierarchyholder.hxx
+++ b/package/source/xstor/ohierarchyholder.hxx
@@ -65,8 +65,8 @@ struct OHierarchyElement_Impl : public cppu::WeakImplHelper< css::embed::XTransa
OWeakStorRefList_Impl m_aOpenStreams;
public:
OHierarchyElement_Impl( OHierarchyElement_Impl* pParent, const css::uno::Reference< css::embed::XStorage >& xStorage )
: m_rParent( pParent )
OHierarchyElement_Impl( const css::uno::Reference< css::embed::XStorage >& xStorage )
: m_rParent( nullptr )
, m_xOwnStorage( xStorage )
{}
diff --git a/package/source/zipapi/ZipOutputStream.cxx b/package/source/zipapi/ZipOutputStream.cxx
index 4db3aba..3803963 100644
--- a/package/source/zipapi/ZipOutputStream.cxx
+++ b/package/source/zipapi/ZipOutputStream.cxx
@@ -158,7 +158,7 @@ void ZipOutputStream::consumeAllScheduledThreadEntries()
}
}
void ZipOutputStream::reduceScheduledThreadsToGivenNumberOrLess(sal_Int32 nThreads, sal_Int32 nWaitTimeInTenthSeconds)
void ZipOutputStream::reduceScheduledThreadsToGivenNumberOrLess(sal_Int32 nThreads)
{
while(static_cast< sal_Int32 >(m_aEntries.size()) > nThreads)
{
@@ -166,7 +166,7 @@ void ZipOutputStream::reduceScheduledThreadsToGivenNumberOrLess(sal_Int32 nThrea
if(static_cast< sal_Int32 >(m_aEntries.size()) > nThreads)
{
const TimeValue aTimeValue(0, 100000 * nWaitTimeInTenthSeconds);
const TimeValue aTimeValue(0, 100000);
osl_waitThread(&aTimeValue);
}
}
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 26f6dd2..c35eb8a 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -1009,7 +1009,7 @@ void ZipPackage::WriteManifest( ZipOutputStream& aZipOut, const vector< uno::Seq
// Write the manifest
uno::Reference < XManifestWriter > xWriter = ManifestWriter::create( m_xContext );
ZipEntry * pEntry = new ZipEntry;
ZipPackageBuffer *pBuffer = new ZipPackageBuffer( n_ConstBufferSize );
ZipPackageBuffer *pBuffer = new ZipPackageBuffer;
uno::Reference < XOutputStream > xManOutStream( *pBuffer, UNO_QUERY );
pEntry->sPath = "META-INF/manifest.xml";
@@ -1035,7 +1035,7 @@ void ZipPackage::WriteManifest( ZipOutputStream& aZipOut, const vector< uno::Seq
void ZipPackage::WriteContentTypes( ZipOutputStream& aZipOut, const vector< uno::Sequence < PropertyValue > >& aManList )
{
ZipEntry* pEntry = new ZipEntry;
ZipPackageBuffer *pBuffer = new ZipPackageBuffer( n_ConstBufferSize );
ZipPackageBuffer *pBuffer = new ZipPackageBuffer;
uno::Reference< io::XOutputStream > xConTypeOutStream( *pBuffer, UNO_QUERY );
pEntry->sPath = "[Content_Types].xml";
diff --git a/package/source/zippackage/ZipPackageBuffer.cxx b/package/source/zippackage/ZipPackageBuffer.cxx
index 00f2640..904c395 100644
--- a/package/source/zippackage/ZipPackageBuffer.cxx
+++ b/package/source/zippackage/ZipPackageBuffer.cxx
@@ -18,6 +18,7 @@
*/
#include <ZipPackageBuffer.hxx>
#include <PackageConstants.hxx>
#include <string.h>
using namespace ::com::sun::star;
@@ -31,8 +32,8 @@ using com::sun::star::lang::IllegalArgumentException;
#define THROW_WHERE ""
#endif
ZipPackageBuffer::ZipPackageBuffer(sal_Int64 nNewBufferSize )
: m_nBufferSize (nNewBufferSize)
ZipPackageBuffer::ZipPackageBuffer()
: m_nBufferSize (n_ConstBufferSize)
, m_nEnd(0)
, m_nCurrent(0)
, m_bMustInitBuffer ( true )
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index a07fa0f..45d1dcb 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -845,7 +845,7 @@ bool ZipPackageStream::saveChild(
// 2nd parameter is the time to wait between cleanups in 10th of a second.
// Both values may be added to the configuration settings if needed.
static sal_Int32 nAllowedThreads(comphelper::ThreadPool::getPreferredConcurrency() * 4);
rZipOut.reduceScheduledThreadsToGivenNumberOrLess(nAllowedThreads, 1);
rZipOut.reduceScheduledThreadsToGivenNumberOrLess(nAllowedThreads);
// Start a new thread deflating this zip entry
ZipOutputEntry *pZipEntry = new ZipOutputEntry(
diff --git a/registry/tools/regmerge.cxx b/registry/tools/regmerge.cxx
index b7e4a50..9f12709 100644
--- a/registry/tools/regmerge.cxx
+++ b/registry/tools/regmerge.cxx
@@ -133,7 +133,7 @@ int __cdecl main( int argc, char * argv[] )
for (size_t i = 2; i < args.size(); i++)
{
OUString targetRegName( convertToFileUrl(args[i].c_str(), args[i].size()) );
RegError _ret = reg.mergeKey(rootKey, mergeKeyName, targetRegName, false, options.isVerbose());
RegError _ret = reg.mergeKey(rootKey, mergeKeyName, targetRegName, options.isVerbose());
if (_ret != RegError::NO_ERROR)
{
if (_ret == RegError::MERGE_CONFLICT)
diff --git a/reportdesign/source/filter/xml/xmlReport.cxx b/reportdesign/source/filter/xml/xmlReport.cxx
index 2170f84..a153432 100644
--- a/reportdesign/source/filter/xml/xmlReport.cxx
+++ b/reportdesign/source/filter/xml/xmlReport.cxx
@@ -41,9 +41,8 @@ namespace rptxml
OXMLReport::OXMLReport( ORptFilter& rImport,
sal_uInt16 nPrfx, const OUString& rLName,
const Reference< XAttributeList > & _xAttrList
,const uno::Reference< report::XReportDefinition >& _xComponent
,OXMLTable* _pContainer) :
OXMLReportElementBase( rImport, nPrfx, rLName,_xComponent.get(),_pContainer)
,const uno::Reference< report::XReportDefinition >& _xComponent) :
OXMLReportElementBase( rImport, nPrfx, rLName,_xComponent.get(),nullptr)
,m_xComponent(_xComponent)
{
OSL_ENSURE(m_xComponent.is(),"No Report definition!");
diff --git a/reportdesign/source/filter/xml/xmlReport.hxx b/reportdesign/source/filter/xml/xmlReport.hxx
index a1928c6..9e26120 100644
--- a/reportdesign/source/filter/xml/xmlReport.hxx
+++ b/reportdesign/source/filter/xml/xmlReport.hxx
@@ -37,8 +37,7 @@ namespace rptxml
OXMLReport( ORptFilter& rImport, sal_uInt16 nPrfx,
const OUString& rLName,
const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList
,const css::uno::Reference< css::report::XReportDefinition >& _xComponent
,OXMLTable* _pContainer);
,const css::uno::Reference< css::report::XReportDefinition >& _xComponent);
virtual ~OXMLReport();
virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index c9d3404..6578b35 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -636,7 +636,7 @@ SvXMLImportContext* ORptFilter::CreateContext( sal_uInt16 nPrefix,
pAutoStyle->FillPropertySet(getReportDefinition().get());
}
}
pContext = new OXMLReport( *this, nPrefix, rLocalName,xAttrList,getReportDefinition(),nullptr );
pContext = new OXMLReport( *this, nPrefix, rLocalName,xAttrList,getReportDefinition() );
}
break;
case XML_TOK_DOC_STYLES:
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index 87ebac9..3b65e9b 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -109,8 +109,6 @@ class OFieldExpressionControl : public ::svt::EditBrowseBox
bool m_bIgnoreEvent;
rtl::Reference<OFieldExpressionControlContainerListener> aContainerListener;
bool SaveModified(bool _bAppend);
public:
OFieldExpressionControl(OGroupsSortingDialog* _pParentDialog, vcl::Window *_pParent);
virtual ~OFieldExpressionControl();
@@ -428,11 +426,6 @@ bool OFieldExpressionControl::IsTabAllowed(bool /*bForward*/) const
bool OFieldExpressionControl::SaveModified()
{
return SaveModified(true);
}
bool OFieldExpressionControl::SaveModified(bool _bAppendRow)
{
sal_Int32 nRow = GetCurRow();
if ( nRow != BROWSER_ENDOFSELECTION )
{
@@ -493,7 +486,7 @@ bool OFieldExpressionControl::SaveModified(bool _bAppendRow)
if ( Controller() )
Controller()->ClearModified();
if ( _bAppendRow && GetRowCount() == m_pParent->getGroups()->getCount() )
if ( GetRowCount() == m_pParent->getGroups()->getCount() )
{
RowInserted( GetRowCount()-1);
m_aGroupPositions.push_back(NO_GROUP);
diff --git a/reportdesign/source/ui/inc/ScrollHelper.hxx b/reportdesign/source/ui/inc/ScrollHelper.hxx
index b888d02..cf56be2 100644
--- a/reportdesign/source/ui/inc/ScrollHelper.hxx
+++ b/reportdesign/source/ui/inc/ScrollHelper.hxx
@@ -140,11 +140,9 @@ namespace rptui
*/
void toggleGrid(bool _bVisible);
/** unmark all objects on the views without the given one.
*
* @param _pSectionView The view where the objects should not be unmarked.
/** unmark all objects on the views.
*/
void unmarkAllObjects(OSectionView* _pSectionView);
void unmarkAllObjects();
/** shows or hides the ruler.
*/
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index 7e7d984b..f092d8f 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -422,7 +422,7 @@ void ODesignView::SelectAll(const sal_uInt16 _nObjectType)
void ODesignView::unmarkAllObjects()
{
m_aScrollWindow->unmarkAllObjects(nullptr);
m_aScrollWindow->unmarkAllObjects();
}
void ODesignView::togglePropertyBrowser(bool _bToogleOn)
diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx
index dc9bc34..2a685ca 100644
--- a/reportdesign/source/ui/report/ScrollHelper.cxx
+++ b/reportdesign/source/ui/report/ScrollHelper.cxx
@@ -265,9 +265,9 @@ void OScrollWindowHelper::SelectAll(const sal_uInt16 _nObjectType)
m_aReportWindow->SelectAll(_nObjectType);
}
void OScrollWindowHelper::unmarkAllObjects(OSectionView* _pSectionView)
void OScrollWindowHelper::unmarkAllObjects()
{
m_aReportWindow->unmarkAllObjects(_pSectionView);
m_aReportWindow->unmarkAllObjects(nullptr);
}
sal_Int32 OScrollWindowHelper::getMaxMarkerWidth() const
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index 16c94af..f45718b 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -967,18 +967,15 @@ namespace
{
private:
SectionViewAction m_eAction;
bool m_bCopy;
public:
explicit ApplySectionViewAction(bool _bCopy)
explicit ApplySectionViewAction()
: m_eAction(eEndDragObj)
, m_bCopy(_bCopy)
{
}
explicit ApplySectionViewAction(SectionViewAction _eAction = eEndAction)
explicit ApplySectionViewAction(SectionViewAction _eAction)
: m_eAction(_eAction)
, m_bCopy(false)
{
}
@@ -988,7 +985,7 @@ namespace
switch ( m_eAction )
{
case eEndDragObj:
rView.EndDragObj( m_bCopy );
rView.EndDragObj();
break;
case eEndAction:
if ( rView.IsAction() )
@@ -1352,7 +1349,7 @@ void OViewsWindow::EndDragObj(bool _bControlKeyPressed, const OSectionView* _pSe
}
else
{
::std::for_each( m_aSections.begin(), m_aSections.end(), ApplySectionViewAction( false ) );
::std::for_each( m_aSections.begin(), m_aSections.end(), ApplySectionViewAction() );
EndDragObj_removeInvisibleObjects();
}
m_aDragDelta = Point(SAL_MAX_INT32, SAL_MAX_INT32);
@@ -1360,7 +1357,7 @@ void OViewsWindow::EndDragObj(bool _bControlKeyPressed, const OSectionView* _pSe
void OViewsWindow::EndAction()
{
::std::for_each( m_aSections.begin(), m_aSections.end(), ApplySectionViewAction() );
::std::for_each( m_aSections.begin(), m_aSections.end(), ApplySectionViewAction(eEndAction) );
}
void OViewsWindow::MovAction(const Point& _aPnt,const OSectionView* _pSection,bool _bMove, bool _bControlKeySet)
diff --git a/rsc/inc/rsccont.hxx b/rsc/inc/rsccont.hxx
index f72f1ae..1d7cc58 100644
--- a/rsc/inc/rsccont.hxx
+++ b/rsc/inc/rsccont.hxx
@@ -115,8 +115,7 @@ public:
class RscCont : public RscContWriteSrc
{
public:
RscCont( Atom nId, sal_uInt32 nTypId,
RscTop * pSuper = nullptr );
RscCont( Atom nId, sal_uInt32 nTypId );
ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
RscTypCont * pTC, sal_uInt32, bool bExtra ) override;
};
@@ -124,8 +123,7 @@ public:
class RscContExtraData : public RscContWriteSrc
{
public:
RscContExtraData( Atom nId, sal_uInt32 nTypId,
RscTop * pSuper = nullptr );
RscContExtraData( Atom nId, sal_uInt32 nTypId );
ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
RscTypCont * pTC, sal_uInt32, bool bExtra ) override;
};
diff --git a/rsc/source/res/rsccont.cxx b/rsc/source/res/rsccont.cxx
index c3bf619..c6c50dd 100644
--- a/rsc/source/res/rsccont.cxx
+++ b/rsc/source/res/rsccont.cxx
@@ -747,8 +747,8 @@ void RscContWriteSrc::WriteSrc( const RSCINST & rInst, FILE * fOutput,
fprintf( fOutput, "}" );
}
RscCont::RscCont( Atom nId, sal_uInt32 nTypeId, RscTop * pSuper )
: RscContWriteSrc( nId, nTypeId, pSuper )
RscCont::RscCont( Atom nId, sal_uInt32 nTypeId )
: RscContWriteSrc( nId, nTypeId, nullptr )
{
}
@@ -770,9 +770,8 @@ ERRTYPE RscCont::WriteRc( const RSCINST & rInst, RscWriteRc & rMem,
return aError;
}
RscContExtraData::RscContExtraData( Atom nId, sal_uInt32 nTypeId,
RscTop * pSuper )
: RscContWriteSrc( nId, nTypeId, pSuper )
RscContExtraData::RscContExtraData( Atom nId, sal_uInt32 nTypeId )
: RscContWriteSrc( nId, nTypeId, nullptr )
{
}
diff --git a/stoc/source/simpleregistry/simpleregistry.cxx b/stoc/source/simpleregistry/simpleregistry.cxx
index 1c279ba..b6a98c6 100644
--- a/stoc/source/simpleregistry/simpleregistry.cxx
+++ b/stoc/source/simpleregistry/simpleregistry.cxx
@@ -1052,7 +1052,7 @@ void SimpleRegistry::mergeKey(
RegistryKey root;
RegError err = registry_.openRootKey(root);
if (err == RegError::NO_ERROR) {
err = registry_.mergeKey(root, aKeyName, aUrl);
err = registry_.mergeKey(root, aKeyName, aUrl, false);
}
switch (err) {
case RegError::NO_ERROR: