Kaydet (Commit) 1013587c authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

loplugin:constantparam in package..stoc

Change-Id: I04b6d14d3dd8d55ccc4d4eb9313bc37959690672
Reviewed-on: https://gerrit.libreoffice.org/28824Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst feb54746
......@@ -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
......
......@@ -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; }
};
......
......@@ -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 ); }
......
......@@ -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 );
......
......@@ -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 )
{}
......
......@@ -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);
}
}
......
......@@ -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";
......
......@@ -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 )
......
......@@ -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(
......
......@@ -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)
......
......@@ -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!");
......
......@@ -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,
......
......@@ -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:
......
......@@ -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();
......@@ -427,11 +425,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);
......
......@@ -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.
*/
......
......@@ -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)
......
......@@ -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
......
......@@ -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)
......
......@@ -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;
};
......
......@@ -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 )
{
}
......
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment