diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-05 11:47:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-07 07:19:33 +0100 |
commit | e1755ac8c42ba4657881ecf7aa652a137abf3267 (patch) | |
tree | 4277345d806eba389b60cce2f0f11c122fefbc2d | |
parent | c7e5c7da98d40852d18bd7683e40c9679836ba49 (diff) |
loplugin:countusersofdefaultparams in connectivity
Change-Id: Ia613257f2de1395c6629c1c37026ed48d4b927c8
Reviewed-on: https://gerrit.libreoffice.org/45854
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | connectivity/source/cpool/ZConnectionPool.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/evoab2/NTable.hxx | 6 | ||||
-rw-r--r-- | connectivity/source/drivers/evoab2/NTables.cxx | 1 | ||||
-rw-r--r-- | connectivity/source/drivers/firebird/Columns.cxx | 3 | ||||
-rw-r--r-- | connectivity/source/inc/OColumn.hxx | 11 | ||||
-rw-r--r-- | connectivity/source/inc/component/CTable.hxx | 6 | ||||
-rw-r--r-- | connectivity/source/inc/dbase/dindexnode.hxx | 6 | ||||
-rw-r--r-- | connectivity/source/inc/file/FTable.hxx | 6 | ||||
-rw-r--r-- | connectivity/source/inc/file/fcode.hxx | 4 | ||||
-rw-r--r-- | connectivity/source/inc/hsqldb/HTable.hxx | 8 | ||||
-rw-r--r-- | connectivity/source/inc/mysql/YTable.hxx | 8 | ||||
-rw-r--r-- | dbaccess/source/core/api/OptimisticSet.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/core/api/RowSetCache.cxx | 10 | ||||
-rw-r--r-- | include/connectivity/FValue.hxx | 4 | ||||
-rw-r--r-- | include/connectivity/TColumnsHelper.hxx | 2 | ||||
-rw-r--r-- | include/connectivity/dbexception.hxx | 2 | ||||
-rw-r--r-- | include/connectivity/dbtools.hxx | 8 | ||||
-rw-r--r-- | include/connectivity/sqlparse.hxx | 2 |
18 files changed, 49 insertions, 48 deletions
diff --git a/connectivity/source/cpool/ZConnectionPool.cxx b/connectivity/source/cpool/ZConnectionPool.cxx index d6d1c8f3ee13..ddb80da0c02c 100644 --- a/connectivity/source/cpool/ZConnectionPool.cxx +++ b/connectivity/source/cpool/ZConnectionPool.cxx @@ -82,7 +82,7 @@ struct TRemoveEventListenerFunctor OConnectionPool* m_pConnectionPool; bool m_bDispose; - TRemoveEventListenerFunctor(OConnectionPool* _pConnectionPool,bool _bDispose = false) + TRemoveEventListenerFunctor(OConnectionPool* _pConnectionPool, bool _bDispose) : m_pConnectionPool(_pConnectionPool) ,m_bDispose(_bDispose) { diff --git a/connectivity/source/drivers/evoab2/NTable.hxx b/connectivity/source/drivers/evoab2/NTable.hxx index c3e984ce78b6..eb1159847d20 100644 --- a/connectivity/source/drivers/evoab2/NTable.hxx +++ b/connectivity/source/drivers/evoab2/NTable.hxx @@ -38,9 +38,9 @@ namespace connectivity OEvoabConnection* _pConnection, const OUString& Name, const OUString& Type, - const OUString& Description = OUString(), - const OUString& SchemaName = OUString(), - const OUString& CatalogName = OUString() + const OUString& Description, + const OUString& SchemaName, + const OUString& CatalogName ); OEvoabConnection* getConnection() { return m_pConnection;} diff --git a/connectivity/source/drivers/evoab2/NTables.cxx b/connectivity/source/drivers/evoab2/NTables.cxx index 652ac07030e1..7beaffdca6d6 100644 --- a/connectivity/source/drivers/evoab2/NTables.cxx +++ b/connectivity/source/drivers/evoab2/NTables.cxx @@ -63,6 +63,7 @@ ObjectType OEvoabTables::createObject(const OUString& aName) aName, xRow->getString(4), xRow->getString(5), + "", ""); xRet = pRet; } diff --git a/connectivity/source/drivers/firebird/Columns.cxx b/connectivity/source/drivers/firebird/Columns.cxx index d418026ce6c2..8089cab8c965 100644 --- a/connectivity/source/drivers/firebird/Columns.cxx +++ b/connectivity/source/drivers/firebird/Columns.cxx @@ -29,7 +29,8 @@ Columns::Columns(Table& rTable, OColumnsHelper(rTable, true, // TODO: is this case sensitivity? rMutex, - rVector) + rVector, + /*bUseHardRef*/true) { OColumnsHelper::setParent(&rTable); } diff --git a/connectivity/source/inc/OColumn.hxx b/connectivity/source/inc/OColumn.hxx index fb087a859853..e0d86d7e9497 100644 --- a/connectivity/source/inc/OColumn.hxx +++ b/connectivity/source/inc/OColumn.hxx @@ -71,12 +71,11 @@ namespace connectivity OColumn(const OUString &_aTableName, const OUString &_aColumnName, - - sal_Int32 _aNullable=0, - sal_Int32 _aColumnDisplaySize=0, - sal_Int32 _aPrecision=0, - sal_Int32 _aScale=0, - sal_Int32 _aColumnType=0) + sal_Int32 _aNullable, + sal_Int32 _aColumnDisplaySize, + sal_Int32 _aPrecision, + sal_Int32 _aScale, + sal_Int32 _aColumnType) : m_TableName(_aTableName), m_ColumnName(_aColumnName), m_ColumnLabel(), diff --git a/connectivity/source/inc/component/CTable.hxx b/connectivity/source/inc/component/CTable.hxx index f1daff08633c..8bd55668f4e7 100644 --- a/connectivity/source/inc/component/CTable.hxx +++ b/connectivity/source/inc/component/CTable.hxx @@ -49,9 +49,9 @@ namespace connectivity OComponentTable( sdbcx::OCollection* _pTables,file::OConnection* _pConnection, const OUString& Name, const OUString& Type, - const OUString& Description = OUString(), - const OUString& SchemaName = OUString(), - const OUString& CatalogName = OUString() + const OUString& Description, + const OUString& SchemaName, + const OUString& CatalogName ); virtual void refreshColumns() override; diff --git a/connectivity/source/inc/dbase/dindexnode.hxx b/connectivity/source/inc/dbase/dindexnode.hxx index 01b45ddde646..481faa1ccbf5 100644 --- a/connectivity/source/inc/dbase/dindexnode.hxx +++ b/connectivity/source/inc/dbase/dindexnode.hxx @@ -51,8 +51,8 @@ namespace connectivity public: 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); + ONDXKey(const OUString& aStr, sal_uInt32 nRec); + ONDXKey(double aVal, sal_uInt32 nRec); inline ONDXKey(const ONDXKey& rKey); @@ -177,7 +177,7 @@ namespace connectivity void SearchAndReplace(const ONDXKey& rSearch, ONDXKey const & rReplace); protected: - ONDXPage(ODbaseIndex& rIndex, sal_uInt32 nPos, ONDXPage* = nullptr); + ONDXPage(ODbaseIndex& rIndex, sal_uInt32 nPos, ONDXPage*); ~ONDXPage(); void ReleaseRef(); diff --git a/connectivity/source/inc/file/FTable.hxx b/connectivity/source/inc/file/FTable.hxx index 60270ff2dead..3a234674b620 100644 --- a/connectivity/source/inc/file/FTable.hxx +++ b/connectivity/source/inc/file/FTable.hxx @@ -58,9 +58,9 @@ namespace connectivity OFileTable( sdbcx::OCollection* _pTables,OConnection* _pConnection, const OUString& Name, const OUString& Type, - const OUString& Description = OUString(), - const OUString& SchemaName = OUString(), - const OUString& CatalogName = OUString() + const OUString& Description, + const OUString& SchemaName, + const OUString& CatalogName ); //XInterface diff --git a/connectivity/source/inc/file/fcode.hxx b/connectivity/source/inc/file/fcode.hxx index c9fe37efdecc..6993a799a180 100644 --- a/connectivity/source/inc/file/fcode.hxx +++ b/connectivity/source/inc/file/fcode.hxx @@ -245,7 +245,7 @@ namespace connectivity const sal_Unicode cEscape; public: - OOp_LIKE(const sal_Unicode cEsc = L'\0'):cEscape(cEsc){}; + OOp_LIKE(const sal_Unicode cEsc):cEscape(cEsc){}; virtual bool operate(const OOperand*, const OOperand*) const override; }; @@ -254,7 +254,7 @@ namespace connectivity { public: public: - OOp_NOTLIKE(const sal_Unicode cEsc = L'\0'):OOp_LIKE(cEsc){}; + OOp_NOTLIKE(const sal_Unicode cEsc):OOp_LIKE(cEsc){}; virtual bool operate(const OOperand*, const OOperand*) const override; }; diff --git a/connectivity/source/inc/hsqldb/HTable.hxx b/connectivity/source/inc/hsqldb/HTable.hxx index 4048ac845cac..f642d39a35d8 100644 --- a/connectivity/source/inc/hsqldb/HTable.hxx +++ b/connectivity/source/inc/hsqldb/HTable.hxx @@ -77,10 +77,10 @@ namespace connectivity const css::uno::Reference< css::sdbc::XConnection >& _xConnection, const OUString& Name, const OUString& Type, - const OUString& Description = OUString(), - const OUString& SchemaName = OUString(), - const OUString& CatalogName = OUString(), - sal_Int32 _nPrivileges = 0 + const OUString& Description, + const OUString& SchemaName, + const OUString& CatalogName, + sal_Int32 _nPrivileges ); // ODescriptor diff --git a/connectivity/source/inc/mysql/YTable.hxx b/connectivity/source/inc/mysql/YTable.hxx index 9648d29411c6..a692b03ea8f6 100644 --- a/connectivity/source/inc/mysql/YTable.hxx +++ b/connectivity/source/inc/mysql/YTable.hxx @@ -84,10 +84,10 @@ namespace connectivity const css::uno::Reference< css::sdbc::XConnection >& _xConnection, const OUString& Name, const OUString& Type, - const OUString& Description = OUString(), - const OUString& SchemaName = OUString(), - const OUString& CatalogName = OUString(), - sal_Int32 _nPrivileges = 0 + const OUString& Description, + const OUString& SchemaName, + const OUString& CatalogName, + sal_Int32 _nPrivileges ); // ODescriptor diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx index 0d8383cd8b07..461bd6334385 100644 --- a/dbaccess/source/core/api/OptimisticSet.cxx +++ b/dbaccess/source/core/api/OptimisticSet.cxx @@ -460,7 +460,7 @@ void OptimisticSet::mergeColumnValues(sal_Int32 i_nColumnIndex,ORowSetValueVecto { io_aRow[aJoinIter->second] = io_aRow[i_nColumnIndex]; io_aInsertRow[aJoinIter->second] = io_aInsertRow[i_nColumnIndex]; - io_aRow[aJoinIter->second].setModified(); + io_aRow[aJoinIter->second].setModified(true); o_aChangedColumns.push_back(aJoinIter->second); } } @@ -496,7 +496,7 @@ bool OptimisticSet::updateColumnValues(const ORowSetValueVector::Vector& io_aCac if ( aCol.second.sTableName == sTableName ) { io_aRow[aCol.second.nPosition] = io_aCachedRow[aCol.second.nPosition]; - io_aRow[aCol.second.nPosition].setModified(); + io_aRow[aCol.second.nPosition].setModified(true); } } } @@ -537,7 +537,7 @@ bool OptimisticSet::columnValuesUpdated(ORowSetValueVector::Vector& o_aCachedRow if ( aCol2.second.sTableName == sTableName ) { o_aCachedRow[aCol2.second.nPosition] = i_aRow[aCol2.second.nPosition]; - o_aCachedRow[aCol2.second.nPosition].setModified(); + o_aCachedRow[aCol2.second.nPosition].setModified(true); } } fillMissingValues(o_aCachedRow); @@ -609,7 +609,7 @@ void OptimisticSet::fillMissingValues(ORowSetValueVector::Vector& io_aRow) const if ( aColIter->second.sTableName == aSqlIter->first ) { io_aRow[aColIter->second.nPosition].fill(i++, aColIter->second.nType, xRow); - io_aRow[aColIter->second.nPosition].setModified(); + io_aRow[aColIter->second.nPosition].setModified(true); } } } diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index 8dacb0efa514..78bb0140f5a6 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -562,7 +562,7 @@ void ORowSetCache::updateNull(sal_Int32 columnIndex,ORowSetValueVector::Vector& { rInsert[columnIndex].setBound(true); rInsert[columnIndex].setNull(); - rInsert[columnIndex].setModified(); + rInsert[columnIndex].setModified(true); io_aRow[columnIndex].setNull(); m_xCacheSet->mergeColumnValues(columnIndex,rInsert,io_aRow,o_ChangedColumns); @@ -582,7 +582,7 @@ void ORowSetCache::updateValue(sal_Int32 columnIndex,const ORowSetValue& x { rInsert[columnIndex].setBound(true); rInsert[columnIndex] = x; - rInsert[columnIndex].setModified(); + rInsert[columnIndex].setModified(true); io_aRow[columnIndex] = rInsert[columnIndex]; m_xCacheSet->mergeColumnValues(columnIndex,rInsert,io_aRow,o_ChangedColumns); @@ -604,7 +604,7 @@ void ORowSetCache::updateCharacterStream( sal_Int32 columnIndex, const Reference ORowSetValueVector::Vector& rInsert = (*m_aInsertRow)->get(); rInsert[columnIndex].setBound(true); rInsert[columnIndex] = aSeq; - rInsert[columnIndex].setModified(); + rInsert[columnIndex].setModified(true); io_aRow[columnIndex] = makeAny(x); m_xCacheSet->mergeColumnValues(columnIndex,rInsert,io_aRow,o_ChangedColumns); @@ -625,7 +625,7 @@ void ORowSetCache::updateObject( sal_Int32 columnIndex, const Any& x { rInsert[columnIndex].setBound(true); rInsert[columnIndex] = aTemp; - rInsert[columnIndex].setModified(); + rInsert[columnIndex].setModified(true); io_aRow[columnIndex] = rInsert[columnIndex]; m_xCacheSet->mergeColumnValues(columnIndex,rInsert,io_aRow,o_ChangedColumns); @@ -647,7 +647,7 @@ void ORowSetCache::updateNumericObject( sal_Int32 columnIndex, const Any& x { rInsert[columnIndex].setBound(true); rInsert[columnIndex] = aTemp; - rInsert[columnIndex].setModified(); + rInsert[columnIndex].setModified(true); io_aRow[columnIndex] = rInsert[columnIndex]; m_xCacheSet->mergeColumnValues(columnIndex,rInsert,io_aRow,o_ChangedColumns); diff --git a/include/connectivity/FValue.hxx b/include/connectivity/FValue.hxx index d2fbfd47e9ba..33279f12757e 100644 --- a/include/connectivity/FValue.hxx +++ b/include/connectivity/FValue.hxx @@ -381,10 +381,10 @@ namespace connectivity void setBound(bool _bBound) { m_bBound = _bBound; } bool isModified() const { return m_bModified; } - void setModified(bool _bMod=true) { m_bModified = _bMod; } + void setModified(bool _bMod) { m_bModified = _bMod; } bool isSigned() const { return m_bSigned; } - void setSigned(bool _bSig=true); + void setSigned(bool _bSig); sal_Int32 getTypeKind() const { return m_eTypeKind; } void setTypeKind(sal_Int32 _eType); diff --git a/include/connectivity/TColumnsHelper.hxx b/include/connectivity/TColumnsHelper.hxx index 2a1580485a1d..3aea77fd2955 100644 --- a/include/connectivity/TColumnsHelper.hxx +++ b/include/connectivity/TColumnsHelper.hxx @@ -48,7 +48,7 @@ namespace connectivity ,bool _bCase ,::osl::Mutex& _rMutex ,const TStringVector &_rVector - ,bool _bUseHardRef = true + ,bool _bUseHardRef ); virtual ~OColumnsHelper() override; diff --git a/include/connectivity/dbexception.hxx b/include/connectivity/dbexception.hxx index 3dcdde0cfcee..e273cf8cb14c 100644 --- a/include/connectivity/dbexception.hxx +++ b/include/connectivity/dbexception.hxx @@ -309,7 +309,7 @@ OOO_DLLPUBLIC_DBTOOLS void throwSQLException( const OUString& _rMessage, const OUString& _rSQLState, const css::uno::Reference< css::uno::XInterface >& _rxContext, - const sal_Int32 _nErrorCode = 0 + const sal_Int32 _nErrorCode ); diff --git a/include/connectivity/dbtools.hxx b/include/connectivity/dbtools.hxx index 885cf82e50b9..432d5a66fadf 100644 --- a/include/connectivity/dbtools.hxx +++ b/include/connectivity/dbtools.hxx @@ -704,9 +704,9 @@ namespace dbtools const OUString& _rName, bool _bCase, bool _bQueryForInfo, - bool _bIsAutoIncrement = false, - bool _bIsCurrency = false, - sal_Int32 _nDataType = css::sdbc::DataType::OTHER); + bool _bIsAutoIncrement, + bool _bIsCurrency, + sal_Int32 _nDataType); /** tries to locate the corresponding DataDefinitionSupplier for the given url and connection @param _rsUrl @@ -803,7 +803,7 @@ namespace dbtools OOO_DLLPUBLIC_DBTOOLS bool isAggregateColumn( const css::uno::Reference< css::container::XNameAccess > &_xColumns, const OUString &_sName, - bool whenNotFound = false + bool whenNotFound ); /** is this column an aggregate? diff --git a/include/connectivity/sqlparse.hxx b/include/connectivity/sqlparse.hxx index 49db658b202f..7dda08c4bca7 100644 --- a/include/connectivity/sqlparse.hxx +++ b/include/connectivity/sqlparse.hxx @@ -207,7 +207,7 @@ namespace connectivity // RuleId with enum, far more efficient static sal_uInt32 RuleID(OSQLParseNode::Rule eRule); // compares the _sFunctionName with all known function names and return the DataType of the return value - static sal_Int32 getFunctionReturnType(const OUString& _sFunctionName, const IParseContext* pContext = nullptr); + static sal_Int32 getFunctionReturnType(const OUString& _sFunctionName, const IParseContext* pContext); // returns the type for a parameter in a given function name static sal_Int32 getFunctionParameterType(sal_uInt32 _nTokenId,sal_uInt32 _nPos); |