diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-19 15:10:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-19 19:28:03 +0200 |
commit | 9c10e29287740f473fa4f33ac6188b8c8543bfbb (patch) | |
tree | c46ec88b5fe6156ac8a3dc27632b71a4a691938b | |
parent | 16da5e2cc9add87aa44783af270f63de01e7ced4 (diff) |
loplugin:constvars in chart2..connectivity
Change-Id: I35d450b022af870df4e57714363892554a4ae917
Reviewed-on: https://gerrit.libreoffice.org/77722
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | chart2/source/controller/uitest/uiobject.cxx | 2 | ||||
-rw-r--r-- | chart2/source/model/main/BaseCoordinateSystem.cxx | 2 | ||||
-rw-r--r-- | chart2/source/tools/InternalDataProvider.cxx | 4 | ||||
-rw-r--r-- | chart2/source/view/main/ChartView.cxx | 12 | ||||
-rw-r--r-- | comphelper/source/misc/backupfilehelper.cxx | 2 | ||||
-rw-r--r-- | comphelper/source/misc/lok.cxx | 2 | ||||
-rw-r--r-- | comphelper/source/property/MasterPropertySet.cxx | 2 | ||||
-rw-r--r-- | comphelper/source/property/MasterPropertySetInfo.cxx | 2 | ||||
-rw-r--r-- | comphelper/source/property/propertycontainerhelper.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/evoab2/NDriver.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/file/fcode.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/hsqldb/HDriver.cxx | 6 | ||||
-rw-r--r-- | connectivity/source/drivers/mork/MDatabaseMetaData.cxx | 4 | ||||
-rw-r--r-- | connectivity/source/drivers/postgresql/pq_preparedstatement.cxx | 4 | ||||
-rw-r--r-- | connectivity/source/drivers/postgresql/pq_updateableresultset.cxx | 2 |
15 files changed, 25 insertions, 25 deletions
diff --git a/chart2/source/controller/uitest/uiobject.cxx b/chart2/source/controller/uitest/uiobject.cxx index 0672b1bc26a7..0f3ec51b1bf8 100644 --- a/chart2/source/controller/uitest/uiobject.cxx +++ b/chart2/source/controller/uitest/uiobject.cxx @@ -158,7 +158,7 @@ void recursiveAdd(chart::ObjectIdentifier const & rID, std::set<OUString>& rChil } ); - for (chart::ObjectIdentifier& ID: aChildIndentifiers) + for (const chart::ObjectIdentifier& ID: aChildIndentifiers) recursiveAdd(ID, rChildren, rHierarchy); } diff --git a/chart2/source/model/main/BaseCoordinateSystem.cxx b/chart2/source/model/main/BaseCoordinateSystem.cxx index 94fa8592c1aa..a343cc614a91 100644 --- a/chart2/source/model/main/BaseCoordinateSystem.cxx +++ b/chart2/source/model/main/BaseCoordinateSystem.cxx @@ -169,7 +169,7 @@ BaseCoordinateSystem::~BaseCoordinateSystem() { try { - for(tAxisVecVecType::value_type & i : m_aAllAxis) + for(const tAxisVecVecType::value_type & i : m_aAllAxis) ModifyListenerHelper::removeListenerFromAllElements( i, m_xModifyEventForwarder ); ModifyListenerHelper::removeListenerFromAllElements( m_aChartTypes, m_xModifyEventForwarder ); } diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx index acce76d5ea19..0fa8a4bff815 100644 --- a/chart2/source/tools/InternalDataProvider.cxx +++ b/chart2/source/tools/InternalDataProvider.cxx @@ -569,7 +569,7 @@ InternalDataProvider::createDataSequenceFromArray( const OUString& rArrayStr, co std::vector<double> aValues; aValues.reserve(aRawElems.size()); - for (OUString & aRawElem : aRawElems) + for (const OUString & aRawElem : aRawElems) { if (aRawElem.isEmpty()) aValues.push_back(NAN); @@ -590,7 +590,7 @@ InternalDataProvider::createDataSequenceFromArray( const OUString& rArrayStr, co aValues.reserve(aRawElems.size()); if (bAllNumeric) { - for (OUString & aRawElem : aRawElems) + for (const OUString & aRawElem : aRawElems) aValues.push_back(aRawElem.toDouble()); } else diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 897d1276c095..876d47570878 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -372,7 +372,7 @@ std::vector< LegendEntryProvider* > SeriesPlotterContainer::getLegendEntryProvid { std::vector< LegendEntryProvider* > aRet( m_aSeriesPlotterList.size() ); sal_Int32 nN = 0; - for( std::unique_ptr<VSeriesPlotter>& aPlotter : m_aSeriesPlotterList) + for( const std::unique_ptr<VSeriesPlotter>& aPlotter : m_aSeriesPlotterList) aRet[nN++] = aPlotter.get(); return aRet; } @@ -696,7 +696,7 @@ void SeriesPlotterContainer::initAxisUsageList(const Date& rNullDate) // Determine the highest axis index of all dimensions. m_nMaxAxisIndex = 0; - for (auto & pVCooSys : m_rVCooSysList) + for (const auto & pVCooSys : m_rVCooSysList) { uno::Reference<XCoordinateSystem> xCooSys = pVCooSys->getModel(); sal_Int32 nDimCount = xCooSys->getDimension(); @@ -716,7 +716,7 @@ void SeriesPlotterContainer::initAxisUsageList(const Date& rNullDate) void SeriesPlotterContainer::setScalesFromCooSysToPlotter() { //set scales to plotter to enable them to provide the preferred scene AspectRatio - for( std::unique_ptr<VSeriesPlotter>& aPlotter : m_aSeriesPlotterList ) + for( const std::unique_ptr<VSeriesPlotter>& aPlotter : m_aSeriesPlotterList ) { VSeriesPlotter* pSeriesPlotter = aPlotter.get(); VCoordinateSystem* pVCooSys = lcl_getCooSysForPlotter( m_rVCooSysList, pSeriesPlotter ); @@ -733,7 +733,7 @@ void SeriesPlotterContainer::setScalesFromCooSysToPlotter() void SeriesPlotterContainer::setNumberFormatsFromAxes() { //set numberformats to plotter to enable them to display the data labels in the numberformat of the axis - for( std::unique_ptr<VSeriesPlotter>& aPlotter : m_aSeriesPlotterList ) + for( const std::unique_ptr<VSeriesPlotter>& aPlotter : m_aSeriesPlotterList ) { VSeriesPlotter* pSeriesPlotter = aPlotter.get(); VCoordinateSystem* pVCooSys = lcl_getCooSysForPlotter( m_rVCooSysList, pSeriesPlotter ); @@ -971,7 +971,7 @@ drawing::Direction3D SeriesPlotterContainer::getPreferredAspectRatio() //first with special demands wins (less or equal zero <-> arbitrary) double fx, fy, fz; fx = fy = fz = -1.0; - for( std::unique_ptr<VSeriesPlotter>& aPlotter : m_aSeriesPlotterList ) + for( const std::unique_ptr<VSeriesPlotter>& aPlotter : m_aSeriesPlotterList ) { drawing::Direction3D aSingleRatio( aPlotter->getPreferredDiagramAspectRatio() ); if( fx<0 && aSingleRatio.DirectionX>0 ) @@ -1568,7 +1568,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D // - create data series for all charttypes m_bPointsWereSkipped = false; - for( std::unique_ptr<VSeriesPlotter>& aPlotter : rSeriesPlotterList ) + for( const std::unique_ptr<VSeriesPlotter>& aPlotter : rSeriesPlotterList ) { VSeriesPlotter* pSeriesPlotter = aPlotter.get(); uno::Reference< drawing::XShapes > xSeriesTarget; diff --git a/comphelper/source/misc/backupfilehelper.cxx b/comphelper/source/misc/backupfilehelper.cxx index c60f9fa6e75e..113edfbea845 100644 --- a/comphelper/source/misc/backupfilehelper.cxx +++ b/comphelper/source/misc/backupfilehelper.cxx @@ -1518,7 +1518,7 @@ namespace if (bRetval) { // write headers - for (auto& candidate : maPackedFileEntryVector) + for (const auto& candidate : maPackedFileEntryVector) { if (!candidate.write_header(aHandle)) { diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx index 0c43c3fc0822..c06d7e87d9b8 100644 --- a/comphelper/source/misc/lok.cxx +++ b/comphelper/source/misc/lok.cxx @@ -186,7 +186,7 @@ bool isWhitelistedLanguage(const OUString& lang) if (aWhitelist.empty()) return false; - for (auto& entry : aWhitelist) + for (const auto& entry : aWhitelist) { if (lang.startsWith(entry)) return true; diff --git a/comphelper/source/property/MasterPropertySet.cxx b/comphelper/source/property/MasterPropertySet.cxx index 3c339ef6d6f0..61e6f84ecdd5 100644 --- a/comphelper/source/property/MasterPropertySet.cxx +++ b/comphelper/source/property/MasterPropertySet.cxx @@ -67,7 +67,7 @@ MasterPropertySet::MasterPropertySet( comphelper::MasterPropertySetInfo* pInfo, MasterPropertySet::~MasterPropertySet() throw() { - for( auto& rSlave : maSlaveMap ) + for( const auto& rSlave : maSlaveMap ) delete rSlave.second; } diff --git a/comphelper/source/property/MasterPropertySetInfo.cxx b/comphelper/source/property/MasterPropertySetInfo.cxx index 6aa017de92da..1b1a2249ec08 100644 --- a/comphelper/source/property/MasterPropertySetInfo.cxx +++ b/comphelper/source/property/MasterPropertySetInfo.cxx @@ -40,7 +40,7 @@ MasterPropertySetInfo::MasterPropertySetInfo( PropertyInfo const * pMap ) MasterPropertySetInfo::~MasterPropertySetInfo() throw() { - for( auto& rObj : maMap ) + for( const auto& rObj : maMap ) delete rObj.second; } diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx index 623ff7bb09eb..e25743342136 100644 --- a/comphelper/source/property/propertycontainerhelper.cxx +++ b/comphelper/source/property/propertycontainerhelper.cxx @@ -176,7 +176,7 @@ namespace void OPropertyContainerHelper::implPushBackProperty(const PropertyDescription& _rProp) { #ifdef DBG_UTIL - for (auto& checkConflicts : m_aProperties) + for (const auto& checkConflicts : m_aProperties) { OSL_ENSURE(checkConflicts.aProperty.Name != _rProp.aProperty.Name, "OPropertyContainerHelper::implPushBackProperty: name already exists!"); OSL_ENSURE(checkConflicts.aProperty.Handle != _rProp.aProperty.Handle, "OPropertyContainerHelper::implPushBackProperty: handle already exists!"); diff --git a/connectivity/source/drivers/evoab2/NDriver.cxx b/connectivity/source/drivers/evoab2/NDriver.cxx index 9cbb265fce2a..fdbebf0000f4 100644 --- a/connectivity/source/drivers/evoab2/NDriver.cxx +++ b/connectivity/source/drivers/evoab2/NDriver.cxx @@ -55,7 +55,7 @@ void OEvoabDriver::disposing() ::osl::MutexGuard aGuard(m_aMutex); // when driver will be destroyed so all our connections have to be destroyed as well - for (auto& rxConnection : m_xConnections) + for (const auto& rxConnection : m_xConnections) { Reference< XComponent > xComp(rxConnection.get(), UNO_QUERY); if (xComp.is()) diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx index e3731671ae10..c4bebbfd7cca 100644 --- a/connectivity/source/drivers/file/fcode.cxx +++ b/connectivity/source/drivers/file/fcode.cxx @@ -355,7 +355,7 @@ void ONthOperator::Exec(OCodeStack& rCodeStack) rCodeStack.push(new OOperandResult(operate(aValues))); - for (auto& rpOperand : aOperands) + for (const auto& rpOperand : aOperands) { if (typeid(OOperandResult) == typeid(*rpOperand)) delete rpOperand; diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index e76ef27cc59d..e7811fdac811 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -109,7 +109,7 @@ namespace connectivity try { - for (auto& rConnection : m_aConnections) + for (const auto& rConnection : m_aConnections) { Reference<XInterface > xTemp = rConnection.first.get(); ::comphelper::disposeComponent(xTemp); @@ -580,7 +580,7 @@ namespace connectivity void ODriverDelegator::shutdownConnections() { m_bInShutDownConnections = true; - for (auto& rConnection : m_aConnections) + for (const auto& rConnection : m_aConnections) { try { @@ -597,7 +597,7 @@ namespace connectivity void ODriverDelegator::flushConnections() { - for (auto& rConnection : m_aConnections) + for (const auto& rConnection : m_aConnections) { try { diff --git a/connectivity/source/drivers/mork/MDatabaseMetaData.cxx b/connectivity/source/drivers/mork/MDatabaseMetaData.cxx index b2810d3612dc..490688df3c91 100644 --- a/connectivity/source/drivers/mork/MDatabaseMetaData.cxx +++ b/connectivity/source/drivers/mork/MDatabaseMetaData.cxx @@ -101,7 +101,7 @@ ODatabaseMetaDataResultSet::ORows ODatabaseMetaData::getColumnRows( aRow[18] = new ORowSetValueDecorator(OUString("YES")); // Iterate over all tables - for(OUString & table : tables) { + for(const OUString & table : tables) { if(match(tableNamePattern, table,'\0')) { // TABLE_NAME aRow[3] = new ORowSetValueDecorator( table ); @@ -923,7 +923,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( // Iterate over all tables - for(OUString & table : tables) { + for(const OUString & table : tables) { if(match(tableNamePattern, table,'\0')) { // TABLE_NAME diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx index 13fbcdf03579..82f26a3be1b0 100644 --- a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx +++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx @@ -168,7 +168,7 @@ PreparedStatement::PreparedStatement( splitSQL( m_stmt, m_splittedStatement ); int elements = 0; - for(OString & str : m_splittedStatement) + for(const OString & str : m_splittedStatement) { // ignore quoted strings .... if( ! isQuoted( str ) ) @@ -298,7 +298,7 @@ sal_Bool PreparedStatement::execute( ) OStringBuffer buf( m_stmt.getLength() *2 ); std::vector< OString >::size_type vars = 0; - for(OString & str : m_splittedStatement) + for(const OString & str : m_splittedStatement) { // LEM TODO: instead of this manual mucking with SQL // could we use PQexecParams / PQExecPrepared / ...? diff --git a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx index a7fb2f791260..7bf0d4fd625d 100644 --- a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx +++ b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx @@ -212,7 +212,7 @@ void UpdateableResultSet::insertRow( ) buf.append( " ) VALUES ( " ); columns = 0; - for(UpdateableField & i : m_updateableField) + for(const UpdateableField & i : m_updateableField) { if( i.isTouched ) { |