[Libreoffice-commits] core.git: 2 commits - accessibility/source basctl/source basegfx/source chart2/source comphelper/source connectivity/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Mon Aug 19 17:28:48 UTC 2019


 accessibility/source/extended/accessibletabbar.cxx                |    2 -
 accessibility/source/extended/accessibletabbarpagelist.cxx        |    4 +--
 accessibility/source/standard/accessiblemenubasecomponent.cxx     |    8 +++---
 accessibility/source/standard/vclxaccessiblelist.cxx              |    4 +--
 accessibility/source/standard/vclxaccessiblestatusbar.cxx         |    4 +--
 accessibility/source/standard/vclxaccessibletabcontrol.cxx        |    6 ++---
 basctl/source/accessibility/accessibledialogwindow.cxx            |   10 ++++----
 basctl/source/basicide/bastype3.cxx                               |    4 +--
 basctl/source/basicide/breakpoint.cxx                             |    2 -
 basegfx/source/polygon/b2dpolygonclipper.cxx                      |    2 -
 basegfx/source/polygon/b2dpolygoncutandtouch.cxx                  |    2 -
 basegfx/source/polygon/b2dpolypolygoncutter.cxx                   |    2 -
 basegfx/source/polygon/b2dtrapezoid.cxx                           |    2 -
 basegfx/source/tools/systemdependentdata.cxx                      |    2 -
 chart2/source/controller/uitest/uiobject.cxx                      |    2 -
 chart2/source/model/main/BaseCoordinateSystem.cxx                 |    2 -
 chart2/source/tools/InternalDataProvider.cxx                      |    4 +--
 chart2/source/view/main/ChartView.cxx                             |   12 +++++-----
 comphelper/source/misc/backupfilehelper.cxx                       |    2 -
 comphelper/source/misc/lok.cxx                                    |    2 -
 comphelper/source/property/MasterPropertySet.cxx                  |    2 -
 comphelper/source/property/MasterPropertySetInfo.cxx              |    2 -
 comphelper/source/property/propertycontainerhelper.cxx            |    2 -
 connectivity/source/drivers/evoab2/NDriver.cxx                    |    2 -
 connectivity/source/drivers/file/fcode.cxx                        |    2 -
 connectivity/source/drivers/hsqldb/HDriver.cxx                    |    6 ++---
 connectivity/source/drivers/mork/MDatabaseMetaData.cxx            |    4 +--
 connectivity/source/drivers/postgresql/pq_preparedstatement.cxx   |    4 +--
 connectivity/source/drivers/postgresql/pq_updateableresultset.cxx |    2 -
 29 files changed, 52 insertions(+), 52 deletions(-)

New commits:
commit 9c10e29287740f473fa4f33ac6188b8c8543bfbb
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Aug 19 15:10:37 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Aug 19 19:28:03 2019 +0200

    loplugin:constvars in chart2..connectivity
    
    Change-Id: I35d450b022af870df4e57714363892554a4ae917
    Reviewed-on: https://gerrit.libreoffice.org/77722
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

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 )
         {
commit 16da5e2cc9add87aa44783af270f63de01e7ced4
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Aug 19 15:09:56 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Aug 19 19:27:56 2019 +0200

    loplugin:constvars in accessibility..basegfx
    
    Change-Id: Id6a0b48c3440be394419e87bd7a4f63bd0a1e758
    Reviewed-on: https://gerrit.libreoffice.org/77721
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/accessibility/source/extended/accessibletabbar.cxx b/accessibility/source/extended/accessibletabbar.cxx
index 3cff71779326..cb0a0e8e80e9 100644
--- a/accessibility/source/extended/accessibletabbar.cxx
+++ b/accessibility/source/extended/accessibletabbar.cxx
@@ -173,7 +173,7 @@ namespace accessibility
         AccessibleTabBarBase::disposing();
 
         // dispose all children
-        for (Reference<XAccessible>& i : m_aAccessibleChildren)
+        for (const Reference<XAccessible>& i : m_aAccessibleChildren)
         {
             Reference< XComponent > xComponent( i, UNO_QUERY );
             if ( xComponent.is() )
diff --git a/accessibility/source/extended/accessibletabbarpagelist.cxx b/accessibility/source/extended/accessibletabbarpagelist.cxx
index 2b2252944410..4f12b48422b8 100644
--- a/accessibility/source/extended/accessibletabbarpagelist.cxx
+++ b/accessibility/source/extended/accessibletabbarpagelist.cxx
@@ -58,7 +58,7 @@ namespace accessibility
 
     void AccessibleTabBarPageList::UpdateShowing( bool bShowing )
     {
-        for (Reference<XAccessible>& xChild : m_aAccessibleChildren)
+        for (const Reference<XAccessible>& xChild : m_aAccessibleChildren)
         {
             if ( xChild.is() )
             {
@@ -346,7 +346,7 @@ namespace accessibility
         AccessibleTabBarBase::disposing();
 
         // dispose all children
-        for (Reference<XAccessible>& i : m_aAccessibleChildren)
+        for (const Reference<XAccessible>& i : m_aAccessibleChildren)
         {
             Reference< XComponent > xComponent( i, UNO_QUERY );
             if ( xComponent.is() )
diff --git a/accessibility/source/standard/accessiblemenubasecomponent.cxx b/accessibility/source/standard/accessiblemenubasecomponent.cxx
index 6f0df60870e2..fc1d5764f77d 100644
--- a/accessibility/source/standard/accessiblemenubasecomponent.cxx
+++ b/accessibility/source/standard/accessiblemenubasecomponent.cxx
@@ -227,7 +227,7 @@ void OAccessibleMenuBaseComponent::UpdateFocused( sal_Int32 i, bool bFocused )
 void OAccessibleMenuBaseComponent::UpdateVisible()
 {
     SetVisible( IsVisible() );
-    for (Reference<XAccessible>& xChild : m_aAccessibleChildren)
+    for (const Reference<XAccessible>& xChild : m_aAccessibleChildren)
     {
         if ( xChild.is() )
         {
@@ -456,7 +456,7 @@ bool OAccessibleMenuBaseComponent::IsChildHighlighted()
 {
     bool bChildHighlighted = false;
 
-    for (Reference<XAccessible>& xChild : m_aAccessibleChildren)
+    for (const Reference<XAccessible>& xChild : m_aAccessibleChildren)
     {
         if ( xChild.is() )
         {
@@ -606,7 +606,7 @@ void OAccessibleMenuBaseComponent::ProcessMenuEvent( const VclMenuEvent& rVclMen
                 m_pMenu = nullptr;
 
                 // dispose all menu items
-                for (Reference<XAccessible>& i : m_aAccessibleChildren)
+                for (const Reference<XAccessible>& i : m_aAccessibleChildren)
                 {
                     Reference< XComponent > xComponent( i, UNO_QUERY );
                     if ( xComponent.is() )
@@ -650,7 +650,7 @@ void OAccessibleMenuBaseComponent::disposing()
         m_pMenu = nullptr;
 
         // dispose all menu items
-        for (Reference<XAccessible>& i : m_aAccessibleChildren)
+        for (const Reference<XAccessible>& i : m_aAccessibleChildren)
         {
             Reference< XComponent > xComponent( i, UNO_QUERY );
             if ( xComponent.is() )
diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx b/accessibility/source/standard/vclxaccessiblelist.cxx
index b8f69c9506ef..af8d83ce9fe4 100644
--- a/accessibility/source/standard/vclxaccessiblelist.cxx
+++ b/accessibility/source/standard/vclxaccessiblelist.cxx
@@ -205,7 +205,7 @@ void VCLXAccessibleList::UpdateSelection_Impl_Acc(bool bHasDropDownList)
         {
             sal_Int32 i=0;
             m_nCurSelectedPos = LISTBOX_ENTRY_NOTFOUND;
-            for ( auto& rChild : m_aAccessibleChildren )
+            for ( const auto& rChild : m_aAccessibleChildren )
             {
                 Reference< XAccessible > xHold = rChild;
                 if ( xHold.is() )
@@ -670,7 +670,7 @@ void VCLXAccessibleList::UpdateSelection_Impl(sal_Int32)
         {
             sal_Int32 i=0;
             m_nCurSelectedPos = LISTBOX_ENTRY_NOTFOUND;
-            for ( auto& rChild : m_aAccessibleChildren )
+            for ( const auto& rChild : m_aAccessibleChildren )
             {
                 Reference< XAccessible > xHold = rChild;
                 if ( xHold.is() )
diff --git a/accessibility/source/standard/vclxaccessiblestatusbar.cxx b/accessibility/source/standard/vclxaccessiblestatusbar.cxx
index 97e052253622..6dad3a0e5370 100644
--- a/accessibility/source/standard/vclxaccessiblestatusbar.cxx
+++ b/accessibility/source/standard/vclxaccessiblestatusbar.cxx
@@ -220,7 +220,7 @@ void VCLXAccessibleStatusBar::ProcessWindowEvent( const VclWindowEvent& rVclWind
                 m_pStatusBar = nullptr;
 
                 // dispose all children
-                for (Reference<XAccessible>& i : m_aAccessibleChildren)
+                for (const Reference<XAccessible>& i : m_aAccessibleChildren)
                 {
                     Reference< XComponent > xComponent( i, UNO_QUERY );
                     if ( xComponent.is() )
@@ -250,7 +250,7 @@ void VCLXAccessibleStatusBar::disposing()
         m_pStatusBar = nullptr;
 
         // dispose all children
-        for (Reference<XAccessible>& i : m_aAccessibleChildren)
+        for (const Reference<XAccessible>& i : m_aAccessibleChildren)
         {
             Reference< XComponent > xComponent( i, UNO_QUERY );
             if ( xComponent.is() )
diff --git a/accessibility/source/standard/vclxaccessibletabcontrol.cxx b/accessibility/source/standard/vclxaccessibletabcontrol.cxx
index bed8bb121be1..83a67b6a3571 100644
--- a/accessibility/source/standard/vclxaccessibletabcontrol.cxx
+++ b/accessibility/source/standard/vclxaccessibletabcontrol.cxx
@@ -57,7 +57,7 @@ VCLXAccessibleTabControl::VCLXAccessibleTabControl( VCLXWindow* pVCLXWindow )
 
 void VCLXAccessibleTabControl::UpdateFocused()
 {
-    for (Reference<XAccessible>& xChild : m_aAccessibleChildren)
+    for (const Reference<XAccessible>& xChild : m_aAccessibleChildren)
     {
         if ( xChild.is() )
         {
@@ -234,7 +234,7 @@ void VCLXAccessibleTabControl::ProcessWindowEvent( const VclWindowEvent& rVclWin
                 m_pTabControl = nullptr;
 
                 // dispose all tab pages
-                for (Reference<XAccessible>& i : m_aAccessibleChildren)
+                for (const Reference<XAccessible>& i : m_aAccessibleChildren)
                 {
                     Reference< XComponent > xComponent( i, UNO_QUERY );
                     if ( xComponent.is() )
@@ -314,7 +314,7 @@ void VCLXAccessibleTabControl::disposing()
         m_pTabControl = nullptr;
 
         // dispose all tab pages
-        for (Reference<XAccessible>& i : m_aAccessibleChildren)
+        for (const Reference<XAccessible>& i : m_aAccessibleChildren)
         {
             Reference< XComponent > xComponent( i, UNO_QUERY );
             if ( xComponent.is() )
diff --git a/basctl/source/accessibility/accessibledialogwindow.cxx b/basctl/source/accessibility/accessibledialogwindow.cxx
index 6cd52c2a3132..8c93f667482d 100644
--- a/basctl/source/accessibility/accessibledialogwindow.cxx
+++ b/basctl/source/accessibility/accessibledialogwindow.cxx
@@ -118,7 +118,7 @@ AccessibleDialogWindow::~AccessibleDialogWindow()
 
 void AccessibleDialogWindow::UpdateFocused()
 {
-    for (ChildDescriptor & i : m_aAccessibleChildren)
+    for (const ChildDescriptor & i : m_aAccessibleChildren)
     {
         Reference< XAccessible > xChild( i.rxAccessible );
         if ( xChild.is() )
@@ -135,7 +135,7 @@ void AccessibleDialogWindow::UpdateSelected()
 {
     NotifyAccessibleEvent( AccessibleEventId::SELECTION_CHANGED, Any(), Any() );
 
-    for (ChildDescriptor & i : m_aAccessibleChildren)
+    for (const ChildDescriptor & i : m_aAccessibleChildren)
     {
         Reference< XAccessible > xChild( i.rxAccessible );
         if ( xChild.is() )
@@ -150,7 +150,7 @@ void AccessibleDialogWindow::UpdateSelected()
 
 void AccessibleDialogWindow::UpdateBounds()
 {
-    for (ChildDescriptor & i : m_aAccessibleChildren)
+    for (const ChildDescriptor & i : m_aAccessibleChildren)
     {
         Reference< XAccessible > xChild( i.rxAccessible );
         if ( xChild.is() )
@@ -378,7 +378,7 @@ void AccessibleDialogWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindo
                 m_pDlgEdModel = nullptr;
 
                 // dispose all children
-                for (ChildDescriptor & i : m_aAccessibleChildren)
+                for (const ChildDescriptor & i : m_aAccessibleChildren)
                 {
                     Reference< XComponent > xComponent( i.rxAccessible, UNO_QUERY );
                     if ( xComponent.is() )
@@ -523,7 +523,7 @@ void AccessibleDialogWindow::disposing()
         m_pDlgEdModel = nullptr;
 
         // dispose all children
-        for (ChildDescriptor & i : m_aAccessibleChildren)
+        for (const ChildDescriptor & i : m_aAccessibleChildren)
         {
             Reference< XComponent > xComponent( i.rxAccessible, UNO_QUERY );
             if ( xComponent.is() )
diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx
index e4944bda3f97..8e479a1308f9 100644
--- a/basctl/source/basicide/bastype3.cxx
+++ b/basctl/source/basicide/bastype3.cxx
@@ -295,7 +295,7 @@ SbxVariable* SbTreeListBox::FindVariable(const weld::TreeIter* pEntry)
     {
         std::reverse(aEntries.begin(), aEntries.end());
         bool bDocumentObjects = false;
-        for (auto& pair : aEntries)
+        for (const auto& pair : aEntries)
         {
             Entry* pBE = pair.first;
             assert(pBE && "No data found in entry!");
@@ -497,7 +497,7 @@ EntryDescriptor SbTreeListBox::GetEntryDescriptor(const weld::TreeIter* pEntry)
     if ( !aEntries.empty() )
     {
         std::reverse(aEntries.begin(), aEntries.end());
-        for (auto& pair : aEntries)
+        for (const auto& pair : aEntries)
         {
             Entry* pBE = pair.first;
             assert(pBE && "No data found in entry!");
diff --git a/basctl/source/basicide/breakpoint.cxx b/basctl/source/basicide/breakpoint.cxx
index b70be0594579..0d0347ace228 100644
--- a/basctl/source/basicide/breakpoint.cxx
+++ b/basctl/source/basicide/breakpoint.cxx
@@ -67,7 +67,7 @@ void BreakPointList::SetBreakPointsInBasic(SbModule* pModule)
 {
     pModule->ClearAllBP();
 
-    for (BreakPoint& rBrk : maBreakPoints)
+    for (const BreakPoint& rBrk : maBreakPoints)
     {
         if ( rBrk.bEnabled )
             pModule->SetBP( rBrk.nLine );
diff --git a/basegfx/source/polygon/b2dpolygonclipper.cxx b/basegfx/source/polygon/b2dpolygonclipper.cxx
index d21ce300ee87..9d672b4397c0 100644
--- a/basegfx/source/polygon/b2dpolygonclipper.cxx
+++ b/basegfx/source/polygon/b2dpolygonclipper.cxx
@@ -796,7 +796,7 @@ namespace basegfx
                                 else
                                 {
                                     // the last triangle has not been altered, simply copy to result
-                                    for(basegfx::B2DPoint & i : stack)
+                                    for(const basegfx::B2DPoint & i : stack)
                                         aResult.append(i);
                                 }
                             }
diff --git a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
index 9240f1e36577..0fd59291604e 100644
--- a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
+++ b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
@@ -411,7 +411,7 @@ namespace basegfx
             }
 
             // append remapped tempVector entries for edge to tempPoints for edge
-            for(temporaryPoint & rTempPoint : aTempPointVectorEdge)
+            for(const temporaryPoint & rTempPoint : aTempPointVectorEdge)
             {
                 rTempPointsB.emplace_back(rTempPoint.getPoint(), nIndB, rTempPoint.getCut());
             }
diff --git a/basegfx/source/polygon/b2dpolypolygoncutter.cxx b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
index beb0136912fd..0ea1e8b9b863 100644
--- a/basegfx/source/polygon/b2dpolypolygoncutter.cxx
+++ b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
@@ -1037,7 +1037,7 @@ namespace basegfx
                 B2DPolyPolygonVector aResult;
                 aResult.reserve(aInput.size());
 
-                for(basegfx::B2DPolyPolygon & a : aInput)
+                for(const basegfx::B2DPolyPolygon & a : aInput)
                 {
                     const basegfx::B2DPolyPolygon aCandidate(prepareForPolygonOperation(a));
 
diff --git a/basegfx/source/polygon/b2dtrapezoid.cxx b/basegfx/source/polygon/b2dtrapezoid.cxx
index 3997feed01eb..ec3d037e6aa8 100644
--- a/basegfx/source/polygon/b2dtrapezoid.cxx
+++ b/basegfx/source/polygon/b2dtrapezoid.cxx
@@ -424,7 +424,7 @@ namespace basegfx
                     // there were horizontal edges. These can be excluded, but
                     // cuts with other edges need to be solved and added before
                     // ignoring them
-                    for(TrDeSimpleEdge & rHorEdge : rTrDeSimpleEdges)
+                    for(const TrDeSimpleEdge & rHorEdge : rTrDeSimpleEdges)
                     {
                         // get horizontal edge as candidate; prepare its range and fixed Y
                         const B1DRange aRange(rHorEdge.getStart().getX(), rHorEdge.getEnd().getX());
diff --git a/basegfx/source/tools/systemdependentdata.cxx b/basegfx/source/tools/systemdependentdata.cxx
index 61fa9dfe7826..2c1c173eff96 100644
--- a/basegfx/source/tools/systemdependentdata.cxx
+++ b/basegfx/source/tools/systemdependentdata.cxx
@@ -137,7 +137,7 @@ namespace basegfx
 
     SystemDependentDataHolder::~SystemDependentDataHolder()
     {
-        for(auto& candidate : maSystemDependentReferences)
+        for(const auto& candidate : maSystemDependentReferences)
         {
             basegfx::SystemDependentData_SharedPtr aData(candidate.second.lock());
 


More information about the Libreoffice-commits mailing list