diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-23 07:46:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-23 09:44:09 +0200 |
commit | a8a461b2fba27f1a729e2b9b28426286617892a9 (patch) | |
tree | 8e05dfae5ef9b070dc54fcbd344ad591cf6e229c /connectivity/source | |
parent | tdf#120451: Use primary screen if requested screen doesn't exist (diff) | |
download | core-a8a461b2fba27f1a729e2b9b28426286617892a9.tar.gz core-a8a461b2fba27f1a729e2b9b28426286617892a9.zip |
clang-tidy performance-unnecessary-copy-init in canvas..cui
Change-Id: I08c137d852b5f1f817c171ee4f1cee7971417dc4
Reviewed-on: https://gerrit.libreoffice.org/62214
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source')
-rw-r--r-- | connectivity/source/commontools/dbtools.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/commontools/parameters.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/calc/CDatabaseMetaData.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/dbase/DColumns.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/dbase/DIndexColumns.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/file/fcode.cxx | 8 | ||||
-rw-r--r-- | connectivity/source/drivers/flat/EColumns.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/mork/MQueryHelper.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/parse/sqliterator.cxx | 3 | ||||
-rw-r--r-- | connectivity/source/parse/sqlnode.cxx | 2 |
10 files changed, 13 insertions, 14 deletions
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index 26e2c604a230..757e4fa37fb1 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -480,7 +480,7 @@ Reference< XNameAccess> getPrimaryKeyColumns_throw(const Reference< XPropertySet if ( xKeys.is() ) { ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); - const OUString sPropName = rPropMap.getNameByIndex(PROPERTY_ID_TYPE); + const OUString& sPropName = rPropMap.getNameByIndex(PROPERTY_ID_TYPE); Reference<XPropertySet> xProp; const sal_Int32 nCount = xKeys->getCount(); for(sal_Int32 i = 0;i< nCount;++i) diff --git a/connectivity/source/commontools/parameters.cxx b/connectivity/source/commontools/parameters.cxx index ffa43f04644a..b3dfdd008c41 100644 --- a/connectivity/source/commontools/parameters.cxx +++ b/connectivity/source/commontools/parameters.cxx @@ -674,7 +674,7 @@ namespace dbtools try { // transfer the values from the continuation object to the parameter columns - Sequence< PropertyValue > aFinalValues = pParams->getValues(); + const Sequence< PropertyValue >& aFinalValues = pParams->getValues(); const PropertyValue* pFinalValues = aFinalValues.getConstArray(); for ( sal_Int32 i = 0; i < aFinalValues.getLength(); ++i, ++pFinalValues ) { diff --git a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx index 65e79f2b5df0..9b030637723a 100644 --- a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx +++ b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx @@ -168,7 +168,7 @@ Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getTables( // get the sheet names from the document OCalcConnection::ODocHolder aDocHolder(static_cast<OCalcConnection*>(m_pConnection)); - Reference<XSpreadsheetDocument> xDoc = aDocHolder.getDoc(); + const Reference<XSpreadsheetDocument>& xDoc = aDocHolder.getDoc(); if ( !xDoc.is() ) throw SQLException(); Reference<XSpreadsheets> xSheets = xDoc->getSheets(); diff --git a/connectivity/source/drivers/dbase/DColumns.cxx b/connectivity/source/drivers/dbase/DColumns.cxx index c43caf4a4a8a..b06bdd99173c 100644 --- a/connectivity/source/drivers/dbase/DColumns.cxx +++ b/connectivity/source/drivers/dbase/DColumns.cxx @@ -35,7 +35,7 @@ sdbcx::ObjectType ODbaseColumns::createObject(const OUString& _rName) { ODbaseTable* pTable = static_cast<ODbaseTable*>(m_pTable); - ::rtl::Reference<OSQLColumns> aCols = pTable->getTableColumns(); + const ::rtl::Reference<OSQLColumns>& aCols = pTable->getTableColumns(); OSQLColumns::Vector::const_iterator aIter = find(aCols->get().begin(),aCols->get().end(),_rName,::comphelper::UStringMixEqual(isCaseSensitive())); sdbcx::ObjectType xRet; diff --git a/connectivity/source/drivers/dbase/DIndexColumns.cxx b/connectivity/source/drivers/dbase/DIndexColumns.cxx index bdc774e95549..533a6023ef2a 100644 --- a/connectivity/source/drivers/dbase/DIndexColumns.cxx +++ b/connectivity/source/drivers/dbase/DIndexColumns.cxx @@ -38,7 +38,7 @@ sdbcx::ObjectType ODbaseIndexColumns::createObject(const OUString& _rName) { const ODbaseTable* pTable = m_pIndex->getTable(); - ::rtl::Reference<OSQLColumns> aCols = pTable->getTableColumns(); + const ::rtl::Reference<OSQLColumns>& aCols = pTable->getTableColumns(); OSQLColumns::Vector::const_iterator aIter = find(aCols->get().begin(),aCols->get().end(),_rName,::comphelper::UStringMixEqual(isCaseSensitive())); Reference< XPropertySet > xCol; diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx index 1ad83491986c..52c6099f9442 100644 --- a/connectivity/source/drivers/file/fcode.cxx +++ b/connectivity/source/drivers/file/fcode.cxx @@ -215,8 +215,8 @@ bool OOp_ISNOTNULL::operate(const OOperand* pOperand, const OOperand*) const bool OOp_LIKE::operate(const OOperand* pLeft, const OOperand* pRight) const { bool bMatch; - ORowSetValue aLH(pLeft->getValue()); - ORowSetValue aRH(pRight->getValue()); + const ORowSetValue& aLH(pLeft->getValue()); + const ORowSetValue& aRH(pRight->getValue()); if (aLH.isNull() || aRH.isNull()) bMatch = false; @@ -236,8 +236,8 @@ bool OOp_NOTLIKE::operate(const OOperand* pLeft, const OOperand* pRight) const bool OOp_COMPARE::operate(const OOperand* pLeft, const OOperand* pRight) const { - ORowSetValue aLH(pLeft->getValue()); - ORowSetValue aRH(pRight->getValue()); + const ORowSetValue& aLH(pLeft->getValue()); + const ORowSetValue& aRH(pRight->getValue()); if (aLH.isNull() || aRH.isNull()) // if (!aLH.getValue() || !aRH.getValue()) return false; diff --git a/connectivity/source/drivers/flat/EColumns.cxx b/connectivity/source/drivers/flat/EColumns.cxx index e00e9b275443..6336753d30d9 100644 --- a/connectivity/source/drivers/flat/EColumns.cxx +++ b/connectivity/source/drivers/flat/EColumns.cxx @@ -33,7 +33,7 @@ using namespace ::com::sun::star::container; sdbcx::ObjectType OFlatColumns::createObject(const OUString& _rName) { OFlatTable* pTable = static_cast<OFlatTable*>(m_pTable); - ::rtl::Reference<OSQLColumns> aCols = pTable->getTableColumns(); + const ::rtl::Reference<OSQLColumns>& aCols = pTable->getTableColumns(); OSQLColumns::Vector::const_iterator aIter = find(aCols->get().begin(),aCols->get().end(),_rName,::comphelper::UStringMixEqual(isCaseSensitive())); sdbcx::ObjectType xRet; if(aIter != aCols->get().end()) diff --git a/connectivity/source/drivers/mork/MQueryHelper.cxx b/connectivity/source/drivers/mork/MQueryHelper.cxx index f53e7e619cef..7f0d4ae08d52 100644 --- a/connectivity/source/drivers/mork/MQueryHelper.cxx +++ b/connectivity/source/drivers/mork/MQueryHelper.cxx @@ -258,7 +258,7 @@ std::vector<bool> entryMatchedByExpression(MQueryHelper* _aQuery, MQueryExpressi if (bRequiresValue) { SAL_INFO("connectivity.mork", "Value = " << evStr->getValue() ); - OUString searchedValue = evStr->getValue(); + const OUString& searchedValue = evStr->getValue(); if (evStr->getCond() == MQueryOp::Is) { SAL_INFO("connectivity.mork", "MQueryOp::Is; done"); resultVector.push_back(currentValue == searchedValue); diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx index e29c8d394557..0f7170143cad 100644 --- a/connectivity/source/parse/sqliterator.cxx +++ b/connectivity/source/parse/sqliterator.cxx @@ -723,9 +723,8 @@ namespace // look up the column in the select column, to find an possible alias if ( _pSelectColumns ) { - for (auto const& lookupColumn : _pSelectColumns->get()) + for (const Reference< XPropertySet >& xColumn : _pSelectColumns->get()) { - Reference< XPropertySet > xColumn( lookupColumn ); try { OUString sName, sTableName; diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index 6b4b4351fb46..14b271a61ee7 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -1535,7 +1535,7 @@ bool OSQLParser::extractDate(OSQLParseNode const * pLiteral,double& _rfValue) m_nFormatKey = ::dbtools::getDefaultNumberFormat( m_xField, xFormatTypes, m_pData->aLocale ); } catch( Exception& ) { } - OUString sValue = pLiteral->getTokenValue(); + const OUString& sValue = pLiteral->getTokenValue(); sal_Int32 nTryFormat = m_nFormatKey; bool bSuccess = lcl_saveConvertToNumber( m_xFormatter, nTryFormat, sValue, _rfValue ); |