From 1e49e33c26950b606714c0dafb26cbcb2aeb3877 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 12 Sep 2016 13:10:16 +0200 Subject: loplugin:constantparam in chart2..connectivity Change-Id: Ic9e1bd36a11c7148fa7595a2b6c6de9bd7a8653d Reviewed-on: https://gerrit.libreoffice.org/28834 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- connectivity/source/commontools/TIndexColumns.cxx | 2 +- connectivity/source/commontools/TKeyColumns.cxx | 3 -- connectivity/source/drivers/dbase/DIndex.cxx | 2 +- .../source/drivers/dbase/DIndexColumns.cxx | 3 -- connectivity/source/drivers/dbase/dindexnode.cxx | 4 +-- connectivity/source/drivers/hsqldb/HUser.cxx | 2 +- connectivity/source/drivers/hsqldb/HView.cxx | 2 +- connectivity/source/drivers/mork/MorkParser.cxx | 4 +-- connectivity/source/drivers/mork/MorkParser.hxx | 2 +- connectivity/source/drivers/mysql/YUser.cxx | 2 +- connectivity/source/drivers/mysql/YViews.cxx | 1 - connectivity/source/inc/OColumn.hxx | 37 +++++++--------------- connectivity/source/inc/dbase/DIndexIter.hxx | 8 ++--- connectivity/source/inc/dbase/dindexnode.hxx | 4 +-- connectivity/source/sdbcx/VIndex.cxx | 4 +-- connectivity/source/sdbcx/VIndexColumn.cxx | 9 ++---- connectivity/source/sdbcx/VKey.cxx | 2 +- connectivity/source/sdbcx/VKeyColumn.cxx | 9 ++---- connectivity/source/sdbcx/VView.cxx | 3 +- 19 files changed, 37 insertions(+), 66 deletions(-) (limited to 'connectivity') diff --git a/connectivity/source/commontools/TIndexColumns.cxx b/connectivity/source/commontools/TIndexColumns.cxx index c5b9249fb544..4aa37e197144 100644 --- a/connectivity/source/commontools/TIndexColumns.cxx +++ b/connectivity/source/commontools/TIndexColumns.cxx @@ -94,7 +94,7 @@ sdbcx::ObjectType OIndexColumns::createObject(const OUString& _rName) nSize, nDec, nDataType, - false,false,false,true, + true, aCatalog, aSchema, aTable); xRet = pRet; break; diff --git a/connectivity/source/commontools/TKeyColumns.cxx b/connectivity/source/commontools/TKeyColumns.cxx index b2ad1966a435..6a71ff72088f 100644 --- a/connectivity/source/commontools/TKeyColumns.cxx +++ b/connectivity/source/commontools/TKeyColumns.cxx @@ -109,9 +109,6 @@ sdbcx::ObjectType OKeyColumnsHelper::createObject(const OUString& _rName) nSize, nDec, nDataType, - false, - false, - false, isCaseSensitive(), aCatalog, aSchema, diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx index 0e8caed1782d..5498b982c7dc 100644 --- a/connectivity/source/drivers/dbase/DIndex.cxx +++ b/connectivity/source/drivers/dbase/DIndex.cxx @@ -175,7 +175,7 @@ bool ODbaseIndex::openIndexFile() OIndexIterator* ODbaseIndex::createIterator() { openIndexFile(); - return new OIndexIterator(this, nullptr, nullptr); + return new OIndexIterator(this); } bool ODbaseIndex::ConvertToKey(ONDXKey* rKey, sal_uInt32 nRec, const ORowSetValue& rValue) diff --git a/connectivity/source/drivers/dbase/DIndexColumns.cxx b/connectivity/source/drivers/dbase/DIndexColumns.cxx index 7aa3df1e625d..951c0982f41b 100644 --- a/connectivity/source/drivers/dbase/DIndexColumns.cxx +++ b/connectivity/source/drivers/dbase/DIndexColumns.cxx @@ -56,9 +56,6 @@ sdbcx::ObjectType ODbaseIndexColumns::createObject(const OUString& _rName) ,getINT32(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION))) ,getINT32(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE))) ,getINT32(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))) - ,false - ,false - ,false ,pTable->getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers() ,getString(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_CATALOGNAME))) ,getString(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCHEMANAME))) diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx index 3451cb9f8e18..44d90cdc61ac 100644 --- a/connectivity/source/drivers/dbase/dindexnode.cxx +++ b/connectivity/source/drivers/dbase/dindexnode.cxx @@ -33,8 +33,8 @@ using namespace connectivity::dbase; using namespace connectivity::file; using namespace com::sun::star::sdbc; -ONDXKey::ONDXKey(sal_uInt32 nRec) - :nRecord(nRec) +ONDXKey::ONDXKey() + :nRecord(0) { } diff --git a/connectivity/source/drivers/hsqldb/HUser.cxx b/connectivity/source/drivers/hsqldb/HUser.cxx index fe87987fd73e..dc7f20087aa8 100644 --- a/connectivity/source/drivers/hsqldb/HUser.cxx +++ b/connectivity/source/drivers/hsqldb/HUser.cxx @@ -44,7 +44,7 @@ OHSQLUser::OHSQLUser( const css::uno::Reference< css::sdbc::XConnection >& _xC OHSQLUser::OHSQLUser( const css::uno::Reference< css::sdbc::XConnection >& _xConnection, const OUString& Name - ) : connectivity::sdbcx::OUser(Name, true) + ) : connectivity::sdbcx::OUser(Name,true) ,m_xConnection(_xConnection) { construct(); diff --git a/connectivity/source/drivers/hsqldb/HView.cxx b/connectivity/source/drivers/hsqldb/HView.cxx index 7498422a4b8b..f98dcd57367a 100644 --- a/connectivity/source/drivers/hsqldb/HView.cxx +++ b/connectivity/source/drivers/hsqldb/HView.cxx @@ -54,7 +54,7 @@ namespace connectivity { namespace hsqldb HView::HView( const Reference< XConnection >& _rxConnection, bool _bCaseSensitive, const OUString& _rSchemaName, const OUString& _rName ) - :HView_Base( _bCaseSensitive, _rName, _rxConnection->getMetaData(), 0, OUString(), _rSchemaName, OUString() ) + :HView_Base( _bCaseSensitive, _rName, _rxConnection->getMetaData(), OUString(), _rSchemaName, OUString() ) ,m_xConnection( _rxConnection ) { } diff --git a/connectivity/source/drivers/mork/MorkParser.cxx b/connectivity/source/drivers/mork/MorkParser.cxx index 18ae66d34ed4..93c7177a181b 100644 --- a/connectivity/source/drivers/mork/MorkParser.cxx +++ b/connectivity/source/drivers/mork/MorkParser.cxx @@ -51,7 +51,7 @@ const char *MorkMagicHeader = "// "; const char *MorkDictColumnMeta = "<(a=c)>"; -MorkParser::MorkParser( int DefaultScope ) : +MorkParser::MorkParser() : columns_(), values_(), mork_(), @@ -60,7 +60,7 @@ MorkParser::MorkParser( int DefaultScope ) : morkData_(), morkPos_(0), nextAddValueId_(0x7fffffff), - defaultScope_(DefaultScope), + defaultScope_(0x80), defaultListScope_(0x81), defaultTableId_(1), nowParsing_(NPValues) diff --git a/connectivity/source/drivers/mork/MorkParser.hxx b/connectivity/source/drivers/mork/MorkParser.hxx index b43557400f9f..0d3993351f5e 100644 --- a/connectivity/source/drivers/mork/MorkParser.hxx +++ b/connectivity/source/drivers/mork/MorkParser.hxx @@ -69,7 +69,7 @@ class LO_DLLPUBLIC_MORK MorkParser { public: - explicit MorkParser( int defaultScope = 0x80 ); + explicit MorkParser(); /// Open and parse mork file diff --git a/connectivity/source/drivers/mysql/YUser.cxx b/connectivity/source/drivers/mysql/YUser.cxx index 7a81dd2bbafe..0cd8d5ad341a 100644 --- a/connectivity/source/drivers/mysql/YUser.cxx +++ b/connectivity/source/drivers/mysql/YUser.cxx @@ -44,7 +44,7 @@ OMySQLUser::OMySQLUser( const css::uno::Reference< css::sdbc::XConnection >& _xC OMySQLUser::OMySQLUser( const css::uno::Reference< css::sdbc::XConnection >& _xConnection, const OUString& Name - ) : connectivity::sdbcx::OUser(Name, true) + ) : connectivity::sdbcx::OUser(Name,true) ,m_xConnection(_xConnection) { construct(); diff --git a/connectivity/source/drivers/mysql/YViews.cxx b/connectivity/source/drivers/mysql/YViews.cxx index 1519ea4adca5..0e45831c7ad2 100644 --- a/connectivity/source/drivers/mysql/YViews.cxx +++ b/connectivity/source/drivers/mysql/YViews.cxx @@ -60,7 +60,6 @@ sdbcx::ObjectType OViews::createObject(const OUString& _rName) return new ::connectivity::sdbcx::OView(isCaseSensitive(), sTable, m_xMetaData, - 0, OUString(), sSchema, sCatalog diff --git a/connectivity/source/inc/OColumn.hxx b/connectivity/source/inc/OColumn.hxx index 74563555a51e..948d6f8f3731 100644 --- a/connectivity/source/inc/OColumn.hxx +++ b/connectivity/source/inc/OColumn.hxx @@ -76,25 +76,12 @@ namespace connectivity sal_Int32 _aColumnDisplaySize=0, sal_Int32 _aPrecision=0, sal_Int32 _aScale=0, - sal_Int32 _aColumnType=0, - - bool _aAutoIncrement=false, - bool _aCaseSensitive=false, - bool _aSearchable=true, - bool _aCurrency=false, - bool _aSigned=false, - bool _aReadOnly=true, - bool _aWritable=false, - bool _aDefinitelyWritable=false, - - const OUString &_aColumnLabel = OUString(), - const OUString &_aColumnTypeName = OUString(), - const OUString &_aColumnServiceName = OUString()) + sal_Int32 _aColumnType=0) : m_TableName(_aTableName), m_ColumnName(_aColumnName), - m_ColumnLabel(_aColumnLabel), - m_ColumnTypeName(_aColumnTypeName), - m_ColumnServiceName(_aColumnServiceName), + m_ColumnLabel(), + m_ColumnTypeName(), + m_ColumnServiceName(), m_Nullable(_aNullable), m_ColumnDisplaySize(_aColumnDisplaySize), @@ -102,14 +89,14 @@ namespace connectivity m_Scale(_aScale), m_ColumnType(_aColumnType), - m_AutoIncrement(_aAutoIncrement), - m_CaseSensitive(_aCaseSensitive), - m_Searchable(_aSearchable), - m_Currency(_aCurrency), - m_Signed(_aSigned), - m_ReadOnly(_aReadOnly), - m_Writable(_aWritable), - m_DefinitelyWritable(_aDefinitelyWritable) + m_AutoIncrement(false), + m_CaseSensitive(false), + m_Searchable(true), + m_Currency(false), + m_Signed(false), + m_ReadOnly(true), + m_Writable(false), + m_DefinitelyWritable(false) { if(m_ColumnLabel.isEmpty()) m_ColumnLabel = _aColumnName; diff --git a/connectivity/source/inc/dbase/DIndexIter.hxx b/connectivity/source/inc/dbase/DIndexIter.hxx index 141b4bed83ba..55305bf3c74a 100644 --- a/connectivity/source/inc/dbase/DIndexIter.hxx +++ b/connectivity/source/inc/dbase/DIndexIter.hxx @@ -52,11 +52,9 @@ namespace connectivity ONDXKey* GetNextKey(); public: - OIndexIterator(ODbaseIndex* pInd, - file::OBoolOperator* pOp, - const file::OOperand* pOper) - :m_pOperator(pOp) - ,m_pOperand(pOper) + OIndexIterator(ODbaseIndex* pInd) + :m_pOperator(nullptr) + ,m_pOperand(nullptr) ,m_xIndex(pInd) ,m_nCurNode(NODE_NOTFOUND) { diff --git a/connectivity/source/inc/dbase/dindexnode.hxx b/connectivity/source/inc/dbase/dindexnode.hxx index 9d5977e3a384..53d079c4c83a 100644 --- a/connectivity/source/inc/dbase/dindexnode.hxx +++ b/connectivity/source/inc/dbase/dindexnode.hxx @@ -48,7 +48,7 @@ namespace connectivity ORowSetValue xValue; /* Key values */ public: - ONDXKey(sal_uInt32 nRec=0); + ONDXKey(); ONDXKey(const ORowSetValue& rVal, sal_Int32 eType, sal_uInt32 nRec); ONDXKey(const OUString& aStr, sal_uInt32 nRec = 0); ONDXKey(double aVal, sal_uInt32 nRec = 0); @@ -90,7 +90,7 @@ namespace connectivity sal_uInt32 nPagePos; // Position in the index file public: - ONDXPagePtr(sal_uInt32 nPos = 0) : mpPage(nullptr), nPagePos(nPos) {} + ONDXPagePtr() : mpPage(nullptr), nPagePos(0) {} ONDXPagePtr(const ONDXPagePtr& rRef); ONDXPagePtr(ONDXPage* pRefPage); inline ~ONDXPagePtr(); diff --git a/connectivity/source/sdbcx/VIndex.cxx b/connectivity/source/sdbcx/VIndex.cxx index 3981e2670382..a0dacf137503 100644 --- a/connectivity/source/sdbcx/VIndex.cxx +++ b/connectivity/source/sdbcx/VIndex.cxx @@ -61,7 +61,7 @@ sal_Bool SAL_CALL OIndex::supportsService( const OUString& _rServiceName ) throw return cppu::supportsService(this, _rServiceName); } -OIndex::OIndex(bool _bCase) : ODescriptor_BASE(m_aMutex) +OIndex::OIndex(bool _bCase) : ODescriptor_BASE(m_aMutex) , ODescriptor(ODescriptor_BASE::rBHelper,_bCase,true) ,m_IsUnique(false) ,m_IsPrimaryKeyIndex(false) @@ -76,7 +76,7 @@ OIndex::OIndex( const OUString& Name, bool _isPrimaryKeyIndex, bool _isClustered, bool _bCase) : ODescriptor_BASE(m_aMutex) - ,ODescriptor(ODescriptor_BASE::rBHelper,_bCase) + ,ODescriptor(ODescriptor_BASE::rBHelper, _bCase) ,m_Catalog(Catalog) ,m_IsUnique(_isUnique) ,m_IsPrimaryKeyIndex(_isPrimaryKeyIndex) diff --git a/connectivity/source/sdbcx/VIndexColumn.cxx b/connectivity/source/sdbcx/VIndexColumn.cxx index 2cf762a9d49e..115382acf1a0 100644 --- a/connectivity/source/sdbcx/VIndexColumn.cxx +++ b/connectivity/source/sdbcx/VIndexColumn.cxx @@ -63,9 +63,6 @@ OIndexColumn::OIndexColumn( bool IsAscending, sal_Int32 Precision, sal_Int32 Scale, sal_Int32 Type, - bool IsAutoIncrement, - bool IsRowVersion, - bool IsCurrency, bool _bCase, const OUString& CatalogName, const OUString& SchemaName, @@ -78,9 +75,9 @@ OIndexColumn::OIndexColumn( bool IsAscending, Precision, Scale, Type, - IsAutoIncrement, - IsRowVersion, - IsCurrency, + false/*IsAutoIncrement*/, + false/*IsRowVersion*/, + false/*IsCurrency*/, _bCase, CatalogName, SchemaName, diff --git a/connectivity/source/sdbcx/VKey.cxx b/connectivity/source/sdbcx/VKey.cxx index ce448f78cd94..8eaf5e784792 100644 --- a/connectivity/source/sdbcx/VKey.cxx +++ b/connectivity/source/sdbcx/VKey.cxx @@ -68,7 +68,7 @@ OKey::OKey(bool _bCase) : ODescriptor_BASE(m_aMutex) OKey::OKey(const OUString& Name,const std::shared_ptr& _rProps, bool _bCase) : ODescriptor_BASE(m_aMutex) - ,ODescriptor(ODescriptor_BASE::rBHelper,_bCase) + ,ODescriptor(ODescriptor_BASE::rBHelper, _bCase) ,m_aProps(_rProps) ,m_pColumns(nullptr) { diff --git a/connectivity/source/sdbcx/VKeyColumn.cxx b/connectivity/source/sdbcx/VKeyColumn.cxx index 7ebc912e3815..7693717178db 100644 --- a/connectivity/source/sdbcx/VKeyColumn.cxx +++ b/connectivity/source/sdbcx/VKeyColumn.cxx @@ -63,9 +63,6 @@ OKeyColumn::OKeyColumn( const OUString& ReferencedColumn, sal_Int32 Precision, sal_Int32 Scale, sal_Int32 Type, - bool IsAutoIncrement, - bool IsRowVersion, - bool IsCurrency, bool _bCase, const OUString& CatalogName, const OUString& SchemaName, @@ -78,9 +75,9 @@ OKeyColumn::OKeyColumn( const OUString& ReferencedColumn, Precision, Scale, Type, - IsAutoIncrement, - IsRowVersion, - IsCurrency, + false/*IsAutoIncrement*/, + false/*IsRowVersion*/, + false/*IsCurrency*/, _bCase, CatalogName, SchemaName, diff --git a/connectivity/source/sdbcx/VView.cxx b/connectivity/source/sdbcx/VView.cxx index 8bdbca929ff2..673b11d11f08 100644 --- a/connectivity/source/sdbcx/VView.cxx +++ b/connectivity/source/sdbcx/VView.cxx @@ -37,14 +37,13 @@ IMPLEMENT_SERVICE_INFO(OView,"com.sun.star.sdbcx.VView","com.sun.star.sdbcx.View OView::OView(bool _bCase, const OUString& Name, const css::uno::Reference< css::sdbc::XDatabaseMetaData >& _xMetaData, - sal_Int32 CheckOption, const OUString& Command, const OUString& SchemaName, const OUString& CatalogName) : ODescriptor(::comphelper::OMutexAndBroadcastHelper::m_aBHelper,_bCase) ,m_CatalogName(CatalogName) ,m_SchemaName(SchemaName) ,m_Command(Command) - ,m_CheckOption(CheckOption) + ,m_CheckOption(0) ,m_xMetaData(_xMetaData) { -- cgit