summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-19 15:10:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-19 19:28:03 +0200
commit9c10e29287740f473fa4f33ac6188b8c8543bfbb (patch)
treec46ec88b5fe6156ac8a3dc27632b71a4a691938b /chart2
parent16da5e2cc9add87aa44783af270f63de01e7ced4 (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>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/uitest/uiobject.cxx2
-rw-r--r--chart2/source/model/main/BaseCoordinateSystem.cxx2
-rw-r--r--chart2/source/tools/InternalDataProvider.cxx4
-rw-r--r--chart2/source/view/main/ChartView.cxx12
4 files changed, 10 insertions, 10 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;