sot/source/sdstor/stgcache.cxx                                |    2 -
 starmath/source/dialog.cxx                                    |    6 ++---
 starmath/source/mathml/mathmlimport.cxx                       |    6 ++---
 starmath/source/view.cxx                                      |    4 +--
 stoc/source/corereflection/crcomp.cxx                         |    8 +++---
 stoc/source/corereflection/criface.cxx                        |    4 +--
 svl/source/numbers/zforlist.cxx                               |    4 +--
 svl/source/numbers/zforscan.cxx                               |    6 ++---
 svx/source/accessibility/AccessibleControlShape.cxx           |    4 +--
 svx/source/annotation/Annotation.cxx                          |   12 +++++-----
 svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx |    6 ++---
 svx/source/dialog/imapwnd.cxx                                 |    4 +--
 svx/source/dialog/optgrid.cxx                                 |    4 +--
 svx/source/dialog/txencbox.cxx                                |   12 +++++-----
 svx/source/sdr/contact/viewcontactofe3d.cxx                   |    4 +--
 svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx          |    6 ++---
 svx/source/sdr/overlay/overlaymanager.cxx                     |    6 ++---
 svx/source/sdr/overlay/overlayobject.cxx                      |    6 ++---
 svx/source/sdr/overlay/overlayobjectlist.cxx                  |    6 ++---
 svx/source/svdraw/svdcrtv.cxx                                 |    6 ++---
 svx/source/svdraw/svdetc.cxx                                  |    8 +++---
 svx/source/svdraw/svdmodel.cxx                                |    2 -
 svx/source/svdraw/svdmrkv.cxx                                 |    4 +--
 svx/source/svdraw/svdobj.cxx                                  |    2 -
 svx/source/svdraw/svdogrp.cxx                                 |    2 -
 svx/source/svdraw/svdtrans.cxx                                |    4 +--
 svx/source/table/svdotable.cxx                                |    4 +--
 svx/source/tbxctrls/fillctrl.cxx                              |    2 -
 svx/source/unodraw/unoprov.cxx                                |    2 -
 29 files changed, 73 insertions(+), 73 deletions(-)

New commits:
commit 8dd533aa2c71e80f50a292b07660fb5021716f38
Author:     Noel Grandin <[email protected]>
AuthorDate: Tue Nov 12 15:12:43 2024 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Tue Nov 12 16:06:35 2024 +0100

    loplugin:reftotemp in svx
    
    Change-Id: Ie5f9a7f0e6903476bd02391a71c1f3d75afaf09f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176483
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/svx/source/accessibility/AccessibleControlShape.cxx 
b/svx/source/accessibility/AccessibleControlShape.cxx
index a98cf6d184fd..1933d9b0b6a4 100644
--- a/svx/source/accessibility/AccessibleControlShape.cxx
+++ b/svx/source/accessibility/AccessibleControlShape.cxx
@@ -583,8 +583,8 @@ OUString AccessibleControlShape::CreateAccessibleName()
     if (sName.isEmpty())
     {
         // check if we can obtain the "Name" resp. "Label" property from the 
model
-        const OUString& rAccNameProperty = lcl_getPreferredAccNameProperty( 
m_xModelPropsMeta );
-        sName = getControlModelStringProperty( rAccNameProperty );
+        const OUString aAccNameProperty = lcl_getPreferredAccNameProperty( 
m_xModelPropsMeta );
+        sName = getControlModelStringProperty( aAccNameProperty );
         if ( !sName.getLength() )
         {   // no -> use the default
             sName = AccessibleShape::CreateAccessibleName();
diff --git a/svx/source/annotation/Annotation.cxx 
b/svx/source/annotation/Annotation.cxx
index 8dfddb57b100..af516a20b535 100644
--- a/svx/source/annotation/Annotation.cxx
+++ b/svx/source/annotation/Annotation.cxx
@@ -45,13 +45,13 @@ OString lcl_LOKGetCommentPayload(CommentNotificationType 
nType, Annotation& rAnn
             aJsonWriter.put("text", rAnnotation.GetText());
             SdrPage const* pPage = rAnnotation.getPage();
             aJsonWriter.put("parthash", pPage ? 
OString::number(pPage->GetUniqueID()) : OString());
-            geometry::RealPoint2D const& rPoint = rAnnotation.GetPosition();
-            geometry::RealSize2D const& rSize = rAnnotation.GetSize();
+            geometry::RealPoint2D const aPoint = rAnnotation.GetPosition();
+            geometry::RealSize2D const aSize = rAnnotation.GetSize();
             tools::Rectangle aRectangle(
-                Point(std::round(o3tl::toTwips(rPoint.X, o3tl::Length::mm)),
-                      std::round(o3tl::toTwips(rPoint.Y, o3tl::Length::mm))),
-                Size(std::round(o3tl::toTwips(rSize.Width, o3tl::Length::mm)),
-                     std::round(o3tl::toTwips(rSize.Height, 
o3tl::Length::mm))));
+                Point(std::round(o3tl::toTwips(aPoint.X, o3tl::Length::mm)),
+                      std::round(o3tl::toTwips(aPoint.Y, o3tl::Length::mm))),
+                Size(std::round(o3tl::toTwips(aSize.Width, o3tl::Length::mm)),
+                     std::round(o3tl::toTwips(aSize.Height, 
o3tl::Length::mm))));
             aJsonWriter.put("rectangle", aRectangle.toString());
         }
     }
diff --git a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx 
b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
index 9414d1acba0e..dcec13c136a0 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
@@ -1129,11 +1129,11 @@ std::shared_ptr<ExpressionNode> const & 
FunctionParser::parseFunction( std::u16s
     // TODO(Q1): Check if a combination of the RTL_UNICODETOTEXT_FLAGS_*
     // gives better conversion robustness here (we might want to map space
     // etc. to ASCII space here)
-    const OString& rAsciiFunction(
+    const OString aAsciiFunction(
         OUStringToOString( rFunction, RTL_TEXTENCODING_ASCII_US ) );
 
-    StringIteratorT aStart( rAsciiFunction.getStr() );
-    StringIteratorT aEnd( rAsciiFunction.getStr()+rAsciiFunction.getLength() );
+    StringIteratorT aStart( aAsciiFunction.getStr() );
+    StringIteratorT aEnd( aAsciiFunction.getStr()+aAsciiFunction.getLength() );
 
     // static parser context, because the actual
     // Spirit parser is also a static object
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index 4b2e947614f8..66a367f0d8bc 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.cxx
@@ -255,8 +255,8 @@ rtl::Reference<SdrObject> IMapWindow::CreateObj( const 
IMapObject* pIMapObj )
             }
             else
             {
-                const tools::Polygon& rPoly = pIMapPolyObj->GetPolygon( false 
);
-                tools::Polygon aDrawPoly( rPoly );
+                const tools::Polygon aPoly = pIMapPolyObj->GetPolygon( false );
+                tools::Polygon aDrawPoly( aPoly );
 
                 // clipped on CanvasPane
                 aDrawPoly.Clip( aClipRect );
diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx
index 2a3a2df6b82b..afdeef1a59a0 100644
--- a/svx/source/dialog/optgrid.cxx
+++ b/svx/source/dialog/optgrid.cxx
@@ -210,7 +210,7 @@ OUString SvxGridTabPage::GetAllStrings()
 
     for (const auto& label : labels)
     {
-        if (const auto& pString = m_xBuilder->weld_label(label))
+        if (const auto pString = m_xBuilder->weld_label(label))
             sAllStrings += pString->get_label() + " ";
     }
 
@@ -220,7 +220,7 @@ OUString SvxGridTabPage::GetAllStrings()
 
     for (const auto& check : checkButton)
     {
-        if (const auto& pString = m_xBuilder->weld_check_button(check))
+        if (const auto pString = m_xBuilder->weld_check_button(check))
             sAllStrings += pString->get_label() + " ";
     }
 
diff --git a/svx/source/dialog/txencbox.cxx b/svx/source/dialog/txencbox.cxx
index f8de81d60ce1..848059a5274d 100644
--- a/svx/source/dialog/txencbox.cxx
+++ b/svx/source/dialog/txencbox.cxx
@@ -218,18 +218,18 @@ void SvxTextEncodingTreeView::InsertTextEncoding( const 
rtl_TextEncoding nEnc,
 
 void SvxTextEncodingBox::InsertTextEncoding( const rtl_TextEncoding nEnc )
 {
-    const OUString& rEntry = SvxTextEncodingTable::GetTextString(nEnc);
-    if (!rEntry.isEmpty())
-        InsertTextEncoding( nEnc, rEntry );
+    const OUString aEntry = SvxTextEncodingTable::GetTextString(nEnc);
+    if (!aEntry.isEmpty())
+        InsertTextEncoding( nEnc, aEntry );
     else
         SAL_WARN( "svx.dialog", "SvxTextEncodingBox::InsertTextEncoding: no 
resource string for text encoding: " << static_cast<sal_Int32>( nEnc ) );
 }
 
 void SvxTextEncodingTreeView::InsertTextEncoding( const rtl_TextEncoding nEnc )
 {
-    const OUString& rEntry = SvxTextEncodingTable::GetTextString(nEnc);
-    if (!rEntry.isEmpty())
-        InsertTextEncoding( nEnc, rEntry );
+    const OUString aEntry = SvxTextEncodingTable::GetTextString(nEnc);
+    if (!aEntry.isEmpty())
+        InsertTextEncoding( nEnc, aEntry );
     else
         SAL_WARN( "svx.dialog", "SvxTextEncodingTreeView::InsertTextEncoding: 
no resource string for text encoding: " << static_cast<sal_Int32>( nEnc ) );
 }
diff --git a/svx/source/sdr/contact/viewcontactofe3d.cxx 
b/svx/source/sdr/contact/viewcontactofe3d.cxx
index dce05840e27e..c824e784616c 100644
--- a/svx/source/sdr/contact/viewcontactofe3d.cxx
+++ b/svx/source/sdr/contact/viewcontactofe3d.cxx
@@ -84,7 +84,7 @@ drawinglayer::primitive2d::Primitive2DContainer 
ViewContactOfE3d::impCreateWithG
         {
             basegfx::B3DVector aLightNormal;
             const double 
fShadowSlant(pVCOfE3DScene->getSdrSceneAttribute().getShadowSlant());
-            const basegfx::B3DRange& rAllContentRange = 
pVCOfE3DScene->getAllContentRange3D();
+            const basegfx::B3DRange aAllContentRange = 
pVCOfE3DScene->getAllContentRange3D();
             drawinglayer::geometry::ViewInformation3D 
aViewInformation3D(pVCOfE3DScene->getViewInformation3D());
 
             
if(!pVCOfE3DScene->getSdrLightingAttribute().getLightVector().empty())
@@ -116,7 +116,7 @@ drawinglayer::primitive2d::Primitive2DContainer 
ViewContactOfE3d::impCreateWithG
                     std::move(aViewInformation3D),
                     aLightNormal,
                     fShadowSlant,
-                    rAllContentRange));
+                    aAllContentRange));
 
             xRetval = drawinglayer::primitive2d::Primitive2DContainer { 
xReference };
         }
diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx 
b/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx
index 4338a6f98fac..9a506c7d182b 100644
--- a/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx
@@ -149,11 +149,11 @@ bool ViewObjectContactOfSdrObj::isPrimitiveVisible(const 
DisplayInfo& rDisplayIn
     // painted on the page where it is anchored)
     // Note that we cannot check the ViewInformation2D ViewPort for this
     // because it is only the part of the page that is currently visible.
-    basegfx::B2IPoint const& 
rAnchor(vcl::unotools::b2IPointFromPoint(getSdrObject().GetAnchorPos()));
-    if (rAnchor.getX() || rAnchor.getY()) // only Writer sets anchor position
+    basegfx::B2IPoint const 
aAnchor(vcl::unotools::b2IPointFromPoint(getSdrObject().GetAnchorPos()));
+    if (aAnchor.getX() || aAnchor.getY()) // only Writer sets anchor position
     {
         if (!rDisplayInfo.GetWriterPageFrame().isEmpty() &&
-            !rDisplayInfo.GetWriterPageFrame().isInside(rAnchor))
+            !rDisplayInfo.GetWriterPageFrame().isInside(aAnchor))
         {
             return false;
         }
diff --git a/svx/source/sdr/overlay/overlaymanager.cxx 
b/svx/source/sdr/overlay/overlaymanager.cxx
index e2552631b094..3e0098eb26cf 100644
--- a/svx/source/sdr/overlay/overlaymanager.cxx
+++ b/svx/source/sdr/overlay/overlaymanager.cxx
@@ -63,9 +63,9 @@ namespace sdr::overlay
 
                 if(rCandidate.isVisible())
                 {
-                    const drawinglayer::primitive2d::Primitive2DContainer& 
rSequence = rCandidate.getOverlayObjectPrimitive2DSequence();
+                    const drawinglayer::primitive2d::Primitive2DContainer 
aSequence = rCandidate.getOverlayObjectPrimitive2DSequence();
 
-                    if(!rSequence.empty())
+                    if(!aSequence.empty())
                     {
                         if(rRange.overlaps(rCandidate.getBaseRange()))
                         {
@@ -85,7 +85,7 @@ namespace sdr::overlay
                                 
rDestinationDevice.SetDrawMode(nOriginalDrawMode | 
DrawModeFlags::SettingsForSelection);
                             }
 
-                            pProcessor->process(rSequence);
+                            pProcessor->process(aSequence);
 
                             if (bIsHighContrastSelection)
                             {
diff --git a/svx/source/sdr/overlay/overlayobject.cxx 
b/svx/source/sdr/overlay/overlayobject.cxx
index 7c54928ecb47..6966f5d0e7a8 100644
--- a/svx/source/sdr/overlay/overlayobject.cxx
+++ b/svx/source/sdr/overlay/overlayobject.cxx
@@ -129,14 +129,14 @@ namespace sdr::overlay
         {
             if(getOverlayManager() && maBaseRange.isEmpty())
             {
-                const drawinglayer::primitive2d::Primitive2DContainer& 
rSequence = getOverlayObjectPrimitive2DSequence();
+                const drawinglayer::primitive2d::Primitive2DContainer 
aSequence = getOverlayObjectPrimitive2DSequence();
 
-                if(!rSequence.empty())
+                if(!aSequence.empty())
                 {
                     const drawinglayer::geometry::ViewInformation2D & 
aViewInformation2D(getOverlayManager()->getCurrentViewInformation2D());
 
                     const_cast< sdr::overlay::OverlayObject* 
>(this)->maBaseRange =
-                        rSequence.getB2DRange(aViewInformation2D);
+                        aSequence.getB2DRange(aViewInformation2D);
                 }
             }
 
diff --git a/svx/source/sdr/overlay/overlayobjectlist.cxx 
b/svx/source/sdr/overlay/overlayobjectlist.cxx
index 32e785d4011a..6cda0e57d078 100644
--- a/svx/source/sdr/overlay/overlayobjectlist.cxx
+++ b/svx/source/sdr/overlay/overlayobjectlist.cxx
@@ -87,11 +87,11 @@ namespace sdr::overlay
                     {
                         if(pCandidate->isHittable())
                         {
-                            const 
drawinglayer::primitive2d::Primitive2DContainer& rSequence = 
pCandidate->getOverlayObjectPrimitive2DSequence();
+                            const 
drawinglayer::primitive2d::Primitive2DContainer aSequence = 
pCandidate->getOverlayObjectPrimitive2DSequence();
 
-                            if(!rSequence.empty())
+                            if(!aSequence.empty())
                             {
-                                aHitTestProcessor2D.process(rSequence);
+                                aHitTestProcessor2D.process(aSequence);
 
                                 if(aHitTestProcessor2D.getHit())
                                 {
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index 04e6f15df2aa..67c6c07f22b0 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -85,10 +85,10 @@ ImplConnectMarkerOverlay::ImplConnectMarkerOverlay(const 
SdrCreateView& rView, S
             for(sal_uInt16 i(0); i < 4; i++)
             {
                 SdrGluePoint aGluePoint(rObject.GetVertexGluePoint(i));
-                const Point& rPosition = aGluePoint.GetAbsolutePos(rObject);
+                const Point aPosition = aGluePoint.GetAbsolutePos(rObject);
 
-                basegfx::B2DPoint aTopLeft(rPosition.X() - 
aHalfLogicSize.Width(), rPosition.Y() - aHalfLogicSize.Height());
-                basegfx::B2DPoint aBottomRight(rPosition.X() + 
aHalfLogicSize.Width(), rPosition.Y() + aHalfLogicSize.Height());
+                basegfx::B2DPoint aTopLeft(aPosition.X() - 
aHalfLogicSize.Width(), aPosition.Y() - aHalfLogicSize.Height());
+                basegfx::B2DPoint aBottomRight(aPosition.X() + 
aHalfLogicSize.Width(), aPosition.Y() + aHalfLogicSize.Height());
 
                 basegfx::B2DPolygon aTempPoly;
                 aTempPoly.append(aTopLeft);
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index 18db17c23310..29f369cbff44 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -300,11 +300,11 @@ std::optional<Color> GetDraftFillColor(const SfxItemSet& 
rSet)
                 {
                     for(sal_uInt32 nX(0); nX < nWidth; nX += nXStep)
                     {
-                        const BitmapColor& rCol2 = pAccess->GetColor(nY, nX);
+                        const BitmapColor aCol2 = pAccess->GetColor(nY, nX);
 
-                        nRt += rCol2.GetRed();
-                        nGn += rCol2.GetGreen();
-                        nBl += rCol2.GetBlue();
+                        nRt += aCol2.GetRed();
+                        nGn += aCol2.GetGreen();
+                        nBl += aCol2.GetBlue();
                         nCount++;
                     }
                 }
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 45bb96a2177b..5d83be0ebe10 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -881,7 +881,7 @@ void SdrModel::ImpSetUIUnit()
     sal_Int32 nMul = 1, nDiv = 1;
     if (eFrom != o3tl::Length::invalid && eTo != o3tl::Length::invalid)
     {
-        const auto& [mul, div] = o3tl::getConversionMulDiv(eFrom, eTo);
+        const auto [mul, div] = o3tl::getConversionMulDiv(eFrom, eTo);
         nMul = mul;
         nDiv = div;
     }
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 057bf20b9c0e..dbf48a690901 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -761,8 +761,8 @@ bool 
SdrMarkView::dumpGluePointsToJSON(boost::property_tree::ptree& rTree)
             {
                 boost::property_tree::ptree node;
                 boost::property_tree::ptree point;
-                const SdrGluePoint& rGP = !VertexObject ? (*pGPL)[i] : 
pObj->GetVertexGluePoint(i);
-                Point rPoint = rGP.GetAbsolutePos(*pObj);
+                const SdrGluePoint aGP = !VertexObject ? (*pGPL)[i] : 
pObj->GetVertexGluePoint(i);
+                Point rPoint = aGP.GetAbsolutePos(*pObj);
                 if (bConvertUnit)
                 {
                     rPoint = o3tl::convert(rPoint, o3tl::Length::mm100, 
o3tl::Length::twip);
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index fb1040eb6b4e..3d37873a52cc 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -2844,7 +2844,7 @@ void SdrObject::SendUserCall(SdrUserCallType eUserCall, 
const tools::Rectangle&
 
 void SdrObject::setUnoShape( const uno::Reference< drawing::XShape >& 
_rxUnoShape )
 {
-    const uno::Reference< uno::XInterface>& xOldUnoShape( maWeakUnoShape );
+    const uno::Reference< uno::XInterface> xOldUnoShape( maWeakUnoShape );
     // the UNO shape would be gutted by the following code; return early
     if ( _rxUnoShape == xOldUnoShape )
     {
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx
index 0fc90678738e..849a0f106053 100644
--- a/svx/source/svdraw/svdogrp.cxx
+++ b/svx/source/svdraw/svdogrp.cxx
@@ -207,7 +207,7 @@ SdrObjList* SdrObjGroup::GetSubList() const
 
 static bool containsOOXData(const css::uno::Any& rVal)
 {
-    const css::uno::Sequence<css::beans::PropertyValue>& propList(rVal.get< 
css::uno::Sequence<css::beans::PropertyValue> >());
+    const css::uno::Sequence<css::beans::PropertyValue> propList(rVal.get< 
css::uno::Sequence<css::beans::PropertyValue> >());
     for (const auto& rProp : propList)
     {
         if(rProp.Name.startsWith("OOX"))
diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx
index 8c7db13b2a75..eb2964dec823 100644
--- a/svx/source/svdraw/svdtrans.cxx
+++ b/svx/source/svdraw/svdtrans.cxx
@@ -573,7 +573,7 @@ tools::Long BigMulDiv(tools::Long nVal, tools::Long nMul, 
tools::Long nDiv)
 
 static FrPair toPair(o3tl::Length eFrom, o3tl::Length eTo)
 {
-    const auto& [nNum, nDen] = o3tl::getConversionMulDiv(eFrom, eTo);
+    const auto [nNum, nDen] = o3tl::getConversionMulDiv(eFrom, eTo);
     return FrPair(nNum, nDen);
 }
 
@@ -653,7 +653,7 @@ void SdrFormatter::Undirty()
     const o3tl::Length eTo = MapToO3tlLength(m_eDstMU, o3tl::Length::invalid);
     if (eFrom != o3tl::Length::invalid && eTo != o3tl::Length::invalid)
     {
-        const auto& [mul, div] = o3tl::getConversionMulDiv(eFrom, eTo);
+        const auto [mul, div] = o3tl::getConversionMulDiv(eFrom, eTo);
         sal_Int64 nMul = mul;
         sal_Int64 nDiv = div;
         short nComma = 0;
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 455d561f283a..974b06c30219 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -2462,7 +2462,7 @@ bool 
SdrTableObj::createTableEdgesJson(boost::property_tree::ptree & rJsonRoot)
         aTableColumns.put("tableOffset", o3tl::toTwips(aRect.Left(), 
o3tl::Length::mm100));
 
         boost::property_tree::ptree aEntries;
-        auto const & aEdges = mpImpl->mpLayouter->getVerticalEdges();
+        auto const aEdges = mpImpl->mpLayouter->getVerticalEdges();
         for (auto & rEdge : aEdges)
         {
             if (rEdge.nIndex == 0)
@@ -2492,7 +2492,7 @@ bool 
SdrTableObj::createTableEdgesJson(boost::property_tree::ptree & rJsonRoot)
         aTableRows.put("tableOffset", o3tl::toTwips(aRect.Top(), 
o3tl::Length::mm100));
 
         boost::property_tree::ptree aEntries;
-        auto const & aEdges = mpImpl->mpLayouter->getHorizontalEdges();
+        auto const aEdges = mpImpl->mpLayouter->getHorizontalEdges();
         for (auto & rEdge : aEdges)
         {
             if (rEdge.nIndex == 0)
diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx
index 23177914578f..79135c3050cb 100644
--- a/svx/source/tbxctrls/fillctrl.cxx
+++ b/svx/source/tbxctrls/fillctrl.cxx
@@ -471,7 +471,7 @@ void SvxFillToolBoxControl::Update()
                         rtl::Reference<XHatchList> xHatchList = new 
XHatchList( u""_ustr, u""_ustr/*TODO?*/ );
                         
xHatchList->Insert(std::make_unique<XHatchEntry>(mpHatchItem->GetHatchValue(), 
aTmpStr));
                         xHatchList->SetDirty( false );
-                        const BitmapEx & aBmp = xHatchList->GetUiBitmap( 0 );
+                        const BitmapEx aBmp = xHatchList->GetUiBitmap( 0 );
 
                         if( !aBmp.IsEmpty() )
                         {
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index 6b88355a88b8..e4de02447d68 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -1659,7 +1659,7 @@ static bool SvxUnoConvertResourceStringToApi(const 
TranslateId* pSourceResIds, c
 
     for (int i = 0; i < nCount; ++i)
     {
-        const OUString & aCompare = SvxResId(pSourceResIds[i]);
+        const OUString aCompare = SvxResId(pSourceResIds[i]);
         if( aShortString == aCompare )
         {
             rString = rString.replaceAt( 0, aShortString.size(), 
pDestResIds[i] );
commit 65caa58206bb64c6fa6e482dbd847af1b3c2c1b0
Author:     Noel Grandin <[email protected]>
AuthorDate: Tue Nov 12 15:12:00 2024 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Tue Nov 12 16:06:24 2024 +0100

    loplugin:reftotemp in sot..svl
    
    Change-Id: I4c15b3443f411e81eaf7ea0e8c98e8728ab4ca02
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176482
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/sot/source/sdstor/stgcache.cxx b/sot/source/sdstor/stgcache.cxx
index 93f7d3090c93..9b0fc316f79a 100644
--- a/sot/source/sdstor/stgcache.cxx
+++ b/sot/source/sdstor/stgcache.cxx
@@ -213,7 +213,7 @@ bool StgCache::Commit()
         std::sort( aToWrite.begin(), aToWrite.end(), StgPage::IsPageGreater );
         for (StgPage* pWr : aToWrite)
         {
-            const rtl::Reference< StgPage > &pPage = pWr;
+            const rtl::Reference< StgPage > pPage = pWr;
             if ( !Write( pPage->GetPage(), pPage->GetData() ) )
                 return false;
         }
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 86bd8f836bb5..7bcaaca98c89 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -222,7 +222,7 @@ OUString SmPrintOptionsTabPage::GetAllStrings()
 
     for (const auto& label : labels)
     {
-        if (const auto& pString = m_xBuilder->weld_label(label))
+        if (const auto pString = m_xBuilder->weld_label(label))
             sAllStrings += pString->get_label() + " ";
     }
 
@@ -231,7 +231,7 @@ OUString SmPrintOptionsTabPage::GetAllStrings()
 
     for (const auto& check : checkButton)
     {
-        if (const auto& pString = m_xBuilder->weld_check_button(check))
+        if (const auto pString = m_xBuilder->weld_check_button(check))
             sAllStrings += pString->get_label() + " ";
     }
 
@@ -239,7 +239,7 @@ OUString SmPrintOptionsTabPage::GetAllStrings()
 
     for (const auto& radio : radioButton)
     {
-        if (const auto& pString = m_xBuilder->weld_radio_button(radio))
+        if (const auto pString = m_xBuilder->weld_radio_button(radio))
             sAllStrings += pString->get_label() + " ";
     }
 
diff --git a/starmath/source/mathml/mathmlimport.cxx 
b/starmath/source/mathml/mathmlimport.cxx
index 0ac32397e099..d3ec8f949977 100644
--- a/starmath/source/mathml/mathmlimport.cxx
+++ b/starmath/source/mathml/mathmlimport.cxx
@@ -497,9 +497,9 @@ void SmXMLImportContext::characters(const OUString& rChars)
     1 or more whitespace characters is replaced with one blank character).
     */
     //collapsing not done yet!
-    const OUString& rChars2 = rChars.trim();
-    if (!rChars2.isEmpty())
-        TCharacters(rChars2 /*.collapse()*/);
+    const OUString aChars2 = rChars.trim();
+    if (!aChars2.isEmpty())
+        TCharacters(aChars2 /*.collapse()*/);
 }
 
 namespace
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 70ed1dbb8cb6..cf56852a69aa 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -2229,12 +2229,12 @@ std::optional<OString> SmViewShell::getLOKPayload(int 
nType, int nViewId) const
 void SmViewShell::SendCaretToLOK() const
 {
     const int nViewId = sal_Int32(GetViewShellId());
-    if (const auto& payload = 
getLOKPayload(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, nViewId))
+    if (const auto payload = 
getLOKPayload(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, nViewId))
     {
         
libreOfficeKitViewCallbackWithViewId(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR,
                                              *payload, nViewId);
     }
-    if (const auto& payload = getLOKPayload(LOK_CALLBACK_TEXT_SELECTION, 
nViewId))
+    if (const auto payload = getLOKPayload(LOK_CALLBACK_TEXT_SELECTION, 
nViewId))
     {
         libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, *payload);
     }
diff --git a/stoc/source/corereflection/crcomp.cxx 
b/stoc/source/corereflection/crcomp.cxx
index b370b00adc4a..83b3aa2844c6 100644
--- a/stoc/source/corereflection/crcomp.cxx
+++ b/stoc/source/corereflection/crcomp.cxx
@@ -222,11 +222,11 @@ sal_Bool CompoundIdlClassImpl::isAssignableFrom( const 
Reference< XIdlClass > &
                 return true;
             else
             {
-                const Sequence< Reference< XIdlClass > > & rSeq = 
xType->getSuperclasses();
-                if (rSeq.hasElements())
+                const Sequence< Reference< XIdlClass > > aSeq = 
xType->getSuperclasses();
+                if (aSeq.hasElements())
                 {
-                    OSL_ENSURE( rSeq.getLength() == 1, "### unexpected len of 
super classes!" );
-                    return isAssignableFrom( rSeq[0] );
+                    OSL_ENSURE( aSeq.getLength() == 1, "### unexpected len of 
super classes!" );
+                    return isAssignableFrom( aSeq[0] );
                 }
             }
         }
diff --git a/stoc/source/corereflection/criface.cxx 
b/stoc/source/corereflection/criface.cxx
index 7b35020fb67f..490c5aaa7bab 100644
--- a/stoc/source/corereflection/criface.cxx
+++ b/stoc/source/corereflection/criface.cxx
@@ -708,8 +708,8 @@ sal_Bool InterfaceIdlClassImpl::isAssignableFrom( const 
Reference< XIdlClass > &
             return true;
         else
         {
-            const Sequence< Reference< XIdlClass > > & rSeq = 
xType->getSuperclasses();
-            if (std::any_of(rSeq.begin(), rSeq.end(),
+            const Sequence< Reference< XIdlClass > > aSeq = 
xType->getSuperclasses();
+            if (std::any_of(aSeq.begin(), aSeq.end(),
                     [this](const Reference<XIdlClass>& rType){ return 
isAssignableFrom(rType); }))
                 return true;
         }
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 7d4143901bd6..5907193a63b3 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -1175,8 +1175,8 @@ sal_uInt32 
SvNFFormatData::ImpGenerateCL(SvNFLanguageData& rCurrentLanguage, con
         // new CL combination
         if (LocaleDataWrapper::areChecksEnabled())
         {
-            const LanguageTag& rLoadedLocale = 
rCurrentLanguage.xLocaleData->getLoadedLanguageTag();
-            if ( !rLoadedLocale.equals( rCurrentLanguage.aLanguageTag ) )
+            const LanguageTag aLoadedLocale = 
rCurrentLanguage.xLocaleData->getLoadedLanguageTag();
+            if ( !aLoadedLocale.equals( rCurrentLanguage.aLanguageTag ) )
             {
                 LocaleDataWrapper::outputCheckMessage( 
rCurrentLanguage.xLocaleData->appendLocaleInfo( 
u"SvNumberFormatter::ImpGenerateCL: locales don't match:" ));
             }
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 909488cf2889..d79f0bb9d35b 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -264,8 +264,8 @@ void ImpSvNumberformatScan::SetDependentKeywords()
     const LocaleDataWrapper* pLocaleData = 
mrCurrentLanguageData.GetLocaleData();
     // #80023# be sure to generate keywords for the loaded Locale, not for the
     // requested Locale, otherwise number format codes might not match
-    const LanguageTag& rLoadedLocale = pLocaleData->getLoadedLanguageTag();
-    LanguageType eLang = rLoadedLocale.getLanguageType( false);
+    const LanguageTag aLoadedLocale = pLocaleData->getLoadedLanguageTag();
+    LanguageType eLang = aLoadedLocale.getLanguageType( false);
 
     bool bL10n = (meKeywordLocalization != KeywordLocalization::EnglishOnly);
     if (bL10n)
@@ -326,7 +326,7 @@ void ImpSvNumberformatScan::SetDependentKeywords()
     sKeyword = sEnglishKeyword;
 
     // Set the uppercase localized General name, e.g. Standard -> STANDARD
-    i18n::NumberFormatCode aFormat = xNFC->getFormatCode( NF_NUMBER_STANDARD, 
rLoadedLocale.getLocale() );
+    i18n::NumberFormatCode aFormat = xNFC->getFormatCode( NF_NUMBER_STANDARD, 
aLoadedLocale.getLocale() );
     sNameStandardFormat = lcl_extractStandardGeneralName( aFormat.Code );
     sKeyword[NF_KEY_GENERAL] = pCharClass->uppercase( sNameStandardFormat );
 

Reply via email to