cppcanvas/source/mtfrenderer/cachedprimitivebase.cxx |    6 -
 cppcanvas/source/mtfrenderer/implrenderer.cxx        |   12 +--
 cppcanvas/source/mtfrenderer/mtftools.cxx            |   10 +-
 cppcanvas/source/mtfrenderer/textaction.cxx          |   74 +++++++++----------
 cppcanvas/source/mtfrenderer/textlineshelper.cxx     |   14 +--
 cppuhelper/source/tdmgr.cxx                          |   50 ++++++------
 cui/source/options/connpooloptions.cxx               |    4 -
 cui/source/options/dbregister.cxx                    |    2 
 cui/source/options/fontsubs.cxx                      |    4 -
 cui/source/options/optaccessibility.cxx              |    4 -
 cui/source/options/optasian.cxx                      |    4 -
 cui/source/options/optbasic.cxx                      |    4 -
 cui/source/options/optchart.cxx                      |    4 -
 cui/source/options/optcolor.cxx                      |    4 -
 cui/source/options/optctl.cxx                        |    6 -
 cui/source/options/optdeepl.cxx                      |    4 -
 cui/source/options/optdict.cxx                       |    4 -
 cui/source/options/optfltr.cxx                       |    8 +-
 cui/source/options/optgdlg.cxx                       |   16 ++--
 cui/source/options/optgenrl.cxx                      |    2 
 cui/source/options/opthtml.cxx                       |   10 +-
 cui/source/options/optinet2.cxx                      |   10 +-
 cui/source/options/optjava.cxx                       |    6 -
 cui/source/options/optjsearch.cxx                    |    4 -
 cui/source/options/optlanguagetool.cxx               |    6 -
 cui/source/options/optlingu.cxx                      |    2 
 cui/source/options/optopencl.cxx                     |    2 
 cui/source/options/optpath.cxx                       |    2 
 cui/source/options/optsave.cxx                       |    4 -
 cui/source/options/optupdt.cxx                       |    6 -
 cui/source/options/personalization.cxx               |    4 -
 cui/source/tabpages/autocdlg.cxx                     |    8 +-
 cui/source/tabpages/chardlg.cxx                      |    6 -
 cui/source/tabpages/tparea.cxx                       |    2 
 34 files changed, 154 insertions(+), 154 deletions(-)

New commits:
commit 3f691b4a160b2ed1bb503c5b52e925bfa974e1e5
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Nov 8 13:55:25 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Nov 8 17:33:10 2024 +0100

    loplugin:reftotemp in cppcanvas..cui
    
    Change-Id: I6c9ded2252462bcdeee6520bb7b7fa1752aa583b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176276
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins

diff --git a/cppcanvas/source/mtfrenderer/cachedprimitivebase.cxx 
b/cppcanvas/source/mtfrenderer/cachedprimitivebase.cxx
index e5664cabfc1d..99f4f95ecc9a 100644
--- a/cppcanvas/source/mtfrenderer/cachedprimitivebase.cxx
+++ b/cppcanvas/source/mtfrenderer/cachedprimitivebase.cxx
@@ -46,11 +46,11 @@ namespace cppcanvas::internal
             SAL_INFO( "cppcanvas.emf", 
"::cppcanvas::internal::CachedPrimitiveBase::render()" );
             SAL_INFO( "cppcanvas.emf", 
"::cppcanvas::internal::CachedPrimitiveBase: 0x" << std::hex << this );
 
-            const rendering::ViewState& rViewState( mpCanvas->getViewState() );
+            const rendering::ViewState  aViewState( mpCanvas->getViewState() );
             ::basegfx::B2DHomMatrix     aTotalTransform;
 
             ::canvas::tools::getViewStateTransform( aTotalTransform,
-                                                    rViewState );
+                                                    aViewState );
             aTotalTransform *= rTransformation;
 
             // can we use the cached primitive? For that, it must be
@@ -61,7 +61,7 @@ namespace cppcanvas::internal
                 (!mbOnlyRedrawWithSameTransform ||
                  maLastTransformation == aTotalTransform) )
             {
-                if( mxCachedPrimitive->redraw( rViewState ) ==
+                if( mxCachedPrimitive->redraw( aViewState ) ==
                     rendering::RepaintResult::REDRAWN )
                 {
                     // cached repaint succeeded, done.
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx 
b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 4a81fb325682..4a041ee5de5a 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -1588,13 +1588,13 @@ namespace cppcanvas::internal
                         rVDev.Push();
                         rVDev.SetMapMode( rSubstitute.GetPrefMapMode() );
 
-                        const ::Point& rPos( rVDev.LogicToPixel( 
pAct->GetPoint() ) );
-                        const ::Size&  rSize( rVDev.LogicToPixel( 
pAct->GetSize() ) );
+                        const ::Point aPos( rVDev.LogicToPixel( 
pAct->GetPoint() ) );
+                        const ::Size  aSize( rVDev.LogicToPixel( 
pAct->GetSize() ) );
 
-                        rStates.getState().transform.translate( rPos.X(),
-                                                                 rPos.Y() );
-                        rStates.getState().transform.scale( 
static_cast<double>(rSize.Width()) / aMtfSizePix.Width(),
-                                                             
static_cast<double>(rSize.Height()) / aMtfSizePix.Height() );
+                        rStates.getState().transform.translate( aPos.X(),
+                                                                aPos.Y() );
+                        rStates.getState().transform.scale( 
static_cast<double>(aSize.Width()) / aMtfSizePix.Width(),
+                                                             
static_cast<double>(aSize.Height()) / aMtfSizePix.Height() );
 
                         createActions( 
const_cast<GDIMetaFile&>(pAct->GetSubstitute()),
                                        rFactoryParms,
diff --git a/cppcanvas/source/mtfrenderer/mtftools.cxx 
b/cppcanvas/source/mtfrenderer/mtftools.cxx
index b02f35547fc7..dce2973bebca 100644
--- a/cppcanvas/source/mtfrenderer/mtftools.cxx
+++ b/cppcanvas/source/mtfrenderer/mtftools.cxx
@@ -51,7 +51,7 @@ namespace cppcanvas::tools
         ::Size getBaselineOffset( const ::cppcanvas::internal::OutDevState& 
outdevState,
                                   const VirtualDevice&                      
rVDev )
         {
-            const ::FontMetric& aMetric = rVDev.GetFontMetric();
+            const ::FontMetric aMetric = rVDev.GetFontMetric();
 
             // calc offset for text output, the XCanvas always renders
             // baseline offset.
@@ -99,12 +99,12 @@ namespace cppcanvas::tools
             calcLogic2PixelLinearTransform(o_rMatrix, rVDev);
 
             // translate according to curr map mode/pref map mode offset
-            const ::Point  aEmptyPoint;
-            const ::Point& rTranslatedPoint(
+            const ::Point aEmptyPoint;
+            const ::Point aTranslatedPoint(
                 rVDev.LogicToPixel( aEmptyPoint ));
 
-            o_rMatrix.translate(rTranslatedPoint.X(),
-                                rTranslatedPoint.Y());
+            o_rMatrix.translate(aTranslatedPoint.X(),
+                                aTranslatedPoint.Y());
 
             return o_rMatrix;
         }
diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx 
b/cppcanvas/source/mtfrenderer/textaction.cxx
index 8b5d1168b262..120f8b48f0bb 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -438,17 +438,17 @@ namespace cppcanvas::internal
                 ENSURE_OR_THROW( io_rTextLayout.is(),
                                   "createSubsetLayout(): Invalid input layout" 
);
 
-                const rendering::StringContext& rOrigContext( 
io_rTextLayout->getText() );
+                const rendering::StringContext aOrigContext( 
io_rTextLayout->getText() );
 
                 if( rSubset.mnSubsetBegin == 0 &&
-                    rSubset.mnSubsetEnd == rOrigContext.Length )
+                    rSubset.mnSubsetEnd == aOrigContext.Length )
                 {
                     // full range, no need for subsetting
                     return;
                 }
 
                 uno::Reference< rendering::XTextLayout > xTextLayout(
-                    createSubsetLayout( rOrigContext, rSubset, io_rTextLayout 
) );
+                    createSubsetLayout( aOrigContext, rSubset, io_rTextLayout 
) );
 
                 if( xTextLayout.is() )
                 {
@@ -899,27 +899,27 @@ namespace cppcanvas::internal
 
             bool EffectTextAction::operator()( const rendering::RenderState& 
rRenderState, const ::Color& rTextFillColor, bool /*bNormalText*/ ) const
             {
-                const rendering::ViewState& rViewState( 
mpCanvas->getViewState() );
-                const uno::Reference< rendering::XCanvas >& rCanvas( 
mpCanvas->getUNOCanvas() );
+                const rendering::ViewState aViewState( 
mpCanvas->getViewState() );
+                const uno::Reference< rendering::XCanvas > aCanvas( 
mpCanvas->getUNOCanvas() );
 
                 //rhbz#1589029 non-transparent text fill background support
                 if (rTextFillColor != COL_AUTO)
                 {
                     rendering::RenderState aLocalState( rRenderState );
                     aLocalState.DeviceColor = 
vcl::unotools::colorToDoubleSequence(
-                        rTextFillColor, 
rCanvas->getDevice()->getDeviceColorSpace());
-                    auto xTextBounds = queryTextBounds(rCanvas);
+                        rTextFillColor, 
aCanvas->getDevice()->getDeviceColorSpace());
+                    auto xTextBounds = queryTextBounds(aCanvas);
                     // background of text
-                    rCanvas->fillPolyPolygon(xTextBounds, rViewState, 
aLocalState);
+                    aCanvas->fillPolyPolygon(xTextBounds, aViewState, 
aLocalState);
                 }
 
                 // under/over lines
-                rCanvas->fillPolyPolygon( mxTextLines,
-                                          rViewState,
+                aCanvas->fillPolyPolygon( mxTextLines,
+                                          aViewState,
                                           rRenderState );
 
-                rCanvas->drawText( maStringContext, mxFont,
-                                   rViewState,
+                aCanvas->drawText( maStringContext, mxFont,
+                                   aViewState,
                                    rRenderState,
                                    maTextDirection );
 
@@ -1197,9 +1197,9 @@ namespace cppcanvas::internal
 
             sal_Int32 TextArrayAction::getActionCount() const
             {
-                const rendering::StringContext& rOrigContext( 
mxTextLayout->getText() );
+                const rendering::StringContext aOrigContext( 
mxTextLayout->getText() );
 
-                return rOrigContext.Length;
+                return aOrigContext.Length;
             }
 
 
@@ -1367,25 +1367,25 @@ namespace cppcanvas::internal
 
             bool EffectTextArrayAction::operator()( const 
rendering::RenderState& rRenderState, const ::Color& rTextFillColor, bool 
bNormalText) const
             {
-                const rendering::ViewState& rViewState( 
mpCanvas->getViewState() );
-                const uno::Reference< rendering::XCanvas >& rCanvas( 
mpCanvas->getUNOCanvas() );
+                const rendering::ViewState aViewState( 
mpCanvas->getViewState() );
+                const uno::Reference< rendering::XCanvas > aCanvas( 
mpCanvas->getUNOCanvas() );
 
                 //rhbz#1589029 non-transparent text fill background support
                 if (rTextFillColor != COL_AUTO)
                 {
                     rendering::RenderState aLocalState(rRenderState);
                     aLocalState.DeviceColor = 
vcl::unotools::colorToDoubleSequence(
-                        rTextFillColor, 
rCanvas->getDevice()->getDeviceColorSpace());
-                    auto xTextBounds = queryTextBounds(rCanvas);
+                        rTextFillColor, 
aCanvas->getDevice()->getDeviceColorSpace());
+                    auto xTextBounds = queryTextBounds(aCanvas);
                     // background of text
-                    rCanvas->fillPolyPolygon(xTextBounds, rViewState, 
aLocalState);
+                    aCanvas->fillPolyPolygon(xTextBounds, aViewState, 
aLocalState);
                 }
 
                 // under/over lines
                 maTextLinesHelper.render(rRenderState, bNormalText);
 
-                rCanvas->drawTextLayout( mxTextLayout,
-                                         rViewState,
+                aCanvas->drawTextLayout( mxTextLayout,
+                                         aViewState,
                                          rRenderState );
 
                 return true;
@@ -1491,7 +1491,7 @@ namespace cppcanvas::internal
                 // ===================================
 
                 uno::Reference< rendering::XCanvas > xCanvas( 
mpCanvas->getUNOCanvas() );
-                const rendering::ViewState&          rViewState( 
mpCanvas->getViewState() );
+                const rendering::ViewState           aViewState( 
mpCanvas->getViewState() );
 
                 TextLinesHelper aHelper = maTextLinesHelper;
                 aHelper.init(nMaxPos - nMinPos, maTextLineInfo);
@@ -1504,7 +1504,7 @@ namespace cppcanvas::internal
                     EffectTextArrayRenderHelper( xCanvas,
                                                  xTextLayout,
                                                  aHelper,
-                                                 rViewState ),
+                                                 aViewState ),
                     aLocalState,
                     xCanvas,
                     maShadowColor,
@@ -1576,9 +1576,9 @@ namespace cppcanvas::internal
 
             sal_Int32 EffectTextArrayAction::getActionCount() const
             {
-                const rendering::StringContext& rOrigContext( 
mxTextLayout->getText() );
+                const rendering::StringContext aOrigContext( 
mxTextLayout->getText() );
 
-                return rOrigContext.Length;
+                return aOrigContext.Length;
             }
 
 
@@ -1766,15 +1766,15 @@ namespace cppcanvas::internal
 
             bool OutlineAction::operator()( const rendering::RenderState& 
rRenderState, const ::Color& /*rTextFillColor*/, bool /*bNormalText*/ ) const
             {
-                const rendering::ViewState&                 rViewState( 
mpCanvas->getViewState() );
-                const uno::Reference< rendering::XCanvas >& rCanvas( 
mpCanvas->getUNOCanvas() );
+                const rendering::ViewState                  aViewState( 
mpCanvas->getViewState() );
+                const uno::Reference< rendering::XCanvas >  xCanvas( 
mpCanvas->getUNOCanvas() );
 
                 if (mxBackgroundFillPoly.is())
                 {
                     rendering::RenderState aLocalState( rRenderState );
                     aLocalState.DeviceColor = 
vcl::unotools::colorToDoubleSequence(
-                        maBackgroundFillColor, 
rCanvas->getDevice()->getDeviceColorSpace());
-                    rCanvas->fillPolyPolygon(mxBackgroundFillPoly, rViewState, 
aLocalState);
+                        maBackgroundFillColor, 
xCanvas->getDevice()->getDeviceColorSpace());
+                    xCanvas->fillPolyPolygon(mxBackgroundFillPoly, aViewState, 
aLocalState);
                 }
 
                 rendering::StrokeAttributes aStrokeAttributes;
@@ -1791,23 +1791,23 @@ namespace cppcanvas::internal
                 // TODO(P1): implement caching
 
                 // background of text
-                rCanvas->fillPolyPolygon( mxTextPoly,
-                                          rViewState,
+                xCanvas->fillPolyPolygon( mxTextPoly,
+                                          aViewState,
                                           aLocalState );
 
                 // border line of text
-                rCanvas->strokePolyPolygon( mxTextPoly,
-                                            rViewState,
+                xCanvas->strokePolyPolygon( mxTextPoly,
+                                            aViewState,
                                             rRenderState,
                                             aStrokeAttributes );
 
                 // underlines/strikethrough - background
-                rCanvas->fillPolyPolygon( mxTextLines,
-                                          rViewState,
+                xCanvas->fillPolyPolygon( mxTextLines,
+                                          aViewState,
                                           aLocalState );
                 // underlines/strikethrough - border
-                rCanvas->strokePolyPolygon( mxTextLines,
-                                            rViewState,
+                xCanvas->strokePolyPolygon( mxTextLines,
+                                            aViewState,
                                             rRenderState,
                                             aStrokeAttributes );
 
diff --git a/cppcanvas/source/mtfrenderer/textlineshelper.cxx 
b/cppcanvas/source/mtfrenderer/textlineshelper.cxx
index 125c3385afec..21e4083e3d74 100644
--- a/cppcanvas/source/mtfrenderer/textlineshelper.cxx
+++ b/cppcanvas/source/mtfrenderer/textlineshelper.cxx
@@ -84,8 +84,8 @@ void TextLinesHelper::init(double nLineWidth, const 
tools::TextLineInfo& rLineIn
 
 void TextLinesHelper::render(const rendering::RenderState& rRenderState, bool 
bNormalText) const
 {
-    const rendering::ViewState& rViewState(mpCanvas->getViewState());
-    const uno::Reference<rendering::XCanvas>& 
xCanvas(mpCanvas->getUNOCanvas());
+    const rendering::ViewState aViewState(mpCanvas->getViewState());
+    const uno::Reference<rendering::XCanvas> xCanvas(mpCanvas->getUNOCanvas());
     rendering::StrokeAttributes aStrokeAttributes;
     aStrokeAttributes.JoinType = rendering::PathJoinType::ROUND;
 
@@ -98,10 +98,10 @@ void TextLinesHelper::render(const rendering::RenderState& 
rRenderState, bool bN
         if (mbOverlineWaveline)
         {
             aStrokeAttributes.StrokeWidth = mbOverlineWavelineBold ? 2.0 : 1.0;
-            xCanvas->strokePolyPolygon(mxOverline, rViewState, aLocalState, 
aStrokeAttributes);
+            xCanvas->strokePolyPolygon(mxOverline, aViewState, aLocalState, 
aStrokeAttributes);
         }
         else
-            xCanvas->fillPolyPolygon(mxOverline, rViewState, aLocalState);
+            xCanvas->fillPolyPolygon(mxOverline, aViewState, aLocalState);
     }
 
     if (mxUnderline.is())
@@ -112,14 +112,14 @@ void TextLinesHelper::render(const 
rendering::RenderState& rRenderState, bool bN
         if (mbUnderlineWaveline)
         {
             aStrokeAttributes.StrokeWidth = mbUnderlineWavelineBold ? 2.0 : 
1.0;
-            xCanvas->strokePolyPolygon(mxUnderline, rViewState, aLocalState, 
aStrokeAttributes);
+            xCanvas->strokePolyPolygon(mxUnderline, aViewState, aLocalState, 
aStrokeAttributes);
         }
         else
-            xCanvas->fillPolyPolygon(mxUnderline, rViewState, aLocalState);
+            xCanvas->fillPolyPolygon(mxUnderline, aViewState, aLocalState);
     }
 
     if (mxStrikeout.is())
-        xCanvas->fillPolyPolygon(mxStrikeout, rViewState, rRenderState);
+        xCanvas->fillPolyPolygon(mxStrikeout, aViewState, rRenderState);
 }
 }
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/cppuhelper/source/tdmgr.cxx b/cppuhelper/source/tdmgr.cxx
index a5f368f3a45f..76008ad6b354 100644
--- a/cppuhelper/source/tdmgr.cxx
+++ b/cppuhelper/source/tdmgr.cxx
@@ -72,11 +72,11 @@ static typelib_TypeDescription * createCTD(
             typelib_typedescription_register( &pBaseType );
 
         // construct member init array
-        const Sequence<Reference< XTypeDescription > > & rMemberTypes = 
xType->getMemberTypes();
-        const Sequence< OUString > & rMemberNames                     = 
xType->getMemberNames();
+        const Sequence<Reference< XTypeDescription > > aMemberTypes = 
xType->getMemberTypes();
+        const Sequence< OUString > aMemberNames                     = 
xType->getMemberNames();
 
-        sal_Int32 nMembers = rMemberTypes.getLength();
-        OSL_ENSURE( nMembers == rMemberNames.getLength(), "### lens differ!" );
+        sal_Int32 nMembers = aMemberTypes.getLength();
+        OSL_ENSURE( nMembers == aMemberNames.getLength(), "### lens differ!" );
 
         OUString aTypeName( xType->getName() );
 
@@ -87,14 +87,14 @@ static typelib_TypeDescription * createCTD(
         for ( nPos = nMembers; nPos--; )
         {
             typelib_CompoundMember_Init & rInit = pMemberInits[nPos];
-            rInit.eTypeClass = 
static_cast<typelib_TypeClass>(rMemberTypes[nPos]->getTypeClass());
+            rInit.eTypeClass = 
static_cast<typelib_TypeClass>(aMemberTypes[nPos]->getTypeClass());
 
-            OUString aMemberTypeName(rMemberTypes[nPos]->getName());
+            OUString aMemberTypeName(aMemberTypes[nPos]->getName());
             rInit.pTypeName = aMemberTypeName.pData;
             rtl_uString_acquire( rInit.pTypeName );
 
             // string is held by rMemberNames
-            rInit.pMemberName = rMemberNames[nPos].pData;
+            rInit.pMemberName = aMemberNames[nPos].pData;
         }
 
         typelib_typedescription_new(
@@ -128,11 +128,11 @@ static typelib_TypeDescription * createCTD(
             typelib_typedescription_register( &pBaseType );
 
         // construct member init array
-        const Sequence<Reference< XTypeDescription > > & rMemberTypes = 
xType->getMemberTypes();
-        const Sequence< OUString > & rMemberNames                     = 
xType->getMemberNames();
+        const Sequence<Reference< XTypeDescription > > aMemberTypes = 
xType->getMemberTypes();
+        const Sequence< OUString > aMemberNames                     = 
xType->getMemberNames();
 
-        sal_Int32 nMembers = rMemberTypes.getLength();
-        OSL_ENSURE( nMembers == rMemberNames.getLength(), "### lens differ!" );
+        sal_Int32 nMembers = aMemberTypes.getLength();
+        OSL_ENSURE( nMembers == aMemberNames.getLength(), "### lens differ!" );
 
         OUString aTypeName( xType->getName() );
 
@@ -157,14 +157,14 @@ static typelib_TypeDescription * createCTD(
         {
             typelib_StructMember_Init & rInit = pMemberInits[nPos];
             rInit.aBase.eTypeClass
-                = 
static_cast<typelib_TypeClass>(rMemberTypes[nPos]->getTypeClass());
+                = 
static_cast<typelib_TypeClass>(aMemberTypes[nPos]->getTypeClass());
 
-            OUString aMemberTypeName(rMemberTypes[nPos]->getName());
+            OUString aMemberTypeName(aMemberTypes[nPos]->getName());
             rInit.aBase.pTypeName = aMemberTypeName.pData;
             rtl_uString_acquire( rInit.aBase.pTypeName );
 
             // string is held by rMemberNames
-            rInit.aBase.pMemberName = rMemberNames[nPos].pData;
+            rInit.aBase.pMemberName = aMemberNames[nPos].pData;
 
             rInit.bParameterizedType = templateMemberTypes.hasElements()
                 && (templateMemberTypes[nPos]->getTypeClass()
@@ -235,8 +235,8 @@ static typelib_TypeDescription * createCTD(
         Reference< XTypeDescription > xReturnType( xMethod->getReturnType() );
 
         // init all params
-        const Sequence<Reference< XMethodParameter > > & rParams = 
xMethod->getParameters();
-        sal_Int32 nParams = rParams.getLength();
+        const Sequence<Reference< XMethodParameter > > aParams = 
xMethod->getParameters();
+        sal_Int32 nParams = aParams.getLength();
 
         typelib_Parameter_Init * pParamInit = 
static_cast<typelib_Parameter_Init *>(alloca(
             sizeof(typelib_Parameter_Init) * nParams ));
@@ -244,8 +244,8 @@ static typelib_TypeDescription * createCTD(
         sal_Int32 nPos;
         for ( nPos = nParams; nPos--; )
         {
-            const Reference<XMethodParameter>& xParam = rParams[nPos];
-            const Reference< XTypeDescription > & xType  = xParam->getType();
+            const Reference<XMethodParameter>& xParam = aParams[nPos];
+            const Reference< XTypeDescription > xType  = xParam->getType();
             typelib_Parameter_Init & rInit = pParamInit[xParam->getPosition()];
 
             rInit.eTypeClass = 
static_cast<typelib_TypeClass>(xType->getTypeClass());
@@ -260,14 +260,14 @@ static typelib_TypeDescription * createCTD(
         }
 
         // init all exception strings
-        const Sequence<Reference< XTypeDescription > > & rExceptions = 
xMethod->getExceptions();
-        sal_Int32 nExceptions = rExceptions.getLength();
+        const Sequence<Reference< XTypeDescription > > aExceptions = 
xMethod->getExceptions();
+        sal_Int32 nExceptions = aExceptions.getLength();
         rtl_uString ** ppExceptionNames = static_cast<rtl_uString **>(alloca(
             sizeof(rtl_uString *) * nExceptions ));
 
         for ( nPos = nExceptions; nPos--; )
         {
-            OUString aExceptionTypeName(rExceptions[nPos]->getName());
+            OUString aExceptionTypeName(aExceptions[nPos]->getName());
             ppExceptionNames[nPos] = aExceptionTypeName.pData;
             rtl_uString_acquire( ppExceptionNames[nPos] );
         }
@@ -323,8 +323,8 @@ static typelib_TypeDescription * createCTD(
                 aBaseTypes.get());
 
         // construct all member refs
-        const Sequence<Reference< XInterfaceMemberTypeDescription > > & 
rMembers = xType->getMembers();
-        sal_Int32 nMembers = rMembers.getLength();
+        const Sequence<Reference< XInterfaceMemberTypeDescription > > aMembers 
= xType->getMembers();
+        sal_Int32 nMembers = aMembers.getLength();
 
         typelib_TypeDescriptionReference ** ppMemberRefs = 
static_cast<typelib_TypeDescriptionReference **>(alloca(
             sizeof(typelib_TypeDescriptionReference *) * nMembers ));
@@ -334,11 +334,11 @@ static typelib_TypeDescription * createCTD(
         sal_Int32 nPos;
         for ( nPos = nMembers; nPos--; )
         {
-            OUString aMemberTypeName(rMembers[nPos]->getName());
+            OUString aMemberTypeName(aMembers[nPos]->getName());
             ppMemberRefs[nPos] = nullptr;
             typelib_typedescriptionreference_new(
                 ppMemberRefs + nPos,
-                static_cast<typelib_TypeClass>(rMembers[nPos]->getTypeClass()),
+                static_cast<typelib_TypeClass>(aMembers[nPos]->getTypeClass()),
                 aMemberTypeName.pData );
         }
 
diff --git a/cui/source/options/connpooloptions.cxx 
b/cui/source/options/connpooloptions.cxx
index 779adb27218f..557f6cae0fab 100644
--- a/cui/source/options/connpooloptions.cxx
+++ b/cui/source/options/connpooloptions.cxx
@@ -176,7 +176,7 @@ namespace offapp
 
         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() + " ";
         }
 
@@ -184,7 +184,7 @@ namespace offapp
 
         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/cui/source/options/dbregister.cxx 
b/cui/source/options/dbregister.cxx
index 91781be7f0df..b345614fa857 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -133,7 +133,7 @@ OUString DbRegistrationOptionsPage::GetAllStrings()
 {
     OUString sAllStrings;
 
-    if (const auto& pString = m_xBuilder->weld_label(u"label1"_ustr))
+    if (const auto pString = m_xBuilder->weld_label(u"label1"_ustr))
         sAllStrings += pString->get_label() + " ";
 
     return sAllStrings.replaceAll("_", "");
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index 89b217fa8d6e..2f9d44c0b497 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -153,7 +153,7 @@ OUString SvxFontSubstTabPage::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() + " ";
     }
 
@@ -161,7 +161,7 @@ OUString SvxFontSubstTabPage::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/cui/source/options/optaccessibility.cxx 
b/cui/source/options/optaccessibility.cxx
index 69825d26f341..0e0e4bfb8b84 100644
--- a/cui/source/options/optaccessibility.cxx
+++ b/cui/source/options/optaccessibility.cxx
@@ -118,7 +118,7 @@ OUString SvxAccessibilityOptionsTabPage::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() + " ";
     }
 
@@ -127,7 +127,7 @@ OUString SvxAccessibilityOptionsTabPage::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/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx
index c7d219993ae1..e9fc8f0f13da 100644
--- a/cui/source/options/optasian.cxx
+++ b/cui/source/options/optasian.cxx
@@ -149,7 +149,7 @@ OUString SvxAsianLayoutPage::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() + " ";
     }
 
@@ -158,7 +158,7 @@ OUString SvxAsianLayoutPage::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/cui/source/options/optbasic.cxx b/cui/source/options/optbasic.cxx
index d7bd06d94626..3b105f27d16d 100644
--- a/cui/source/options/optbasic.cxx
+++ b/cui/source/options/optbasic.cxx
@@ -60,7 +60,7 @@ OUString SvxBasicIDEOptionsPage::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() + " ";
     }
 
@@ -69,7 +69,7 @@ OUString SvxBasicIDEOptionsPage::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/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index ec5c92c4a1c8..4a457b167770 100644
--- a/cui/source/options/optchart.cxx
+++ b/cui/source/options/optchart.cxx
@@ -159,7 +159,7 @@ OUString SvxDefaultColorOptPage::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() + " ";
     }
 
@@ -167,7 +167,7 @@ OUString SvxDefaultColorOptPage::GetAllStrings()
 
     for (const auto& btn : buttons)
     {
-        if (const auto& pString = m_xBuilder->weld_button(btn))
+        if (const auto pString = m_xBuilder->weld_button(btn))
             sAllStrings += pString->get_label() + " ";
     }
 
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 9f5397411286..e9ef0c7800aa 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -744,7 +744,7 @@ ColorConfigCtrl_Impl::ColorConfigCtrl_Impl(weld::Window* 
pTopLevel, weld::Builde
 
     Link<weld::Toggleable&,void> aCheckLink = LINK(this, ColorConfigCtrl_Impl, 
ClickHdl);
     Link<ColorListBox&,void> aColorLink = LINK(this, ColorConfigCtrl_Impl, 
ColorHdl);
-    Link<weld::Widget&,void> const& aGetFocusLink = LINK(this, 
ColorConfigCtrl_Impl, ControlFocusHdl);
+    Link<weld::Widget&,void> const aGetFocusLink = LINK(this, 
ColorConfigCtrl_Impl, ControlFocusHdl);
     m_xScrollWindow->SetLinks(aCheckLink, aColorLink, aGetFocusLink, 
*m_xVScroll);
 }
 
@@ -887,7 +887,7 @@ OUString SvxColorOptionsTabPage::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() + " ";
     }
 
diff --git a/cui/source/options/optctl.cxx b/cui/source/options/optctl.cxx
index df2cfbd3b538..fca642fdbb38 100644
--- a/cui/source/options/optctl.cxx
+++ b/cui/source/options/optctl.cxx
@@ -65,7 +65,7 @@ OUString SvxCTLOptionsPage::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() + " ";
     }
 
@@ -73,7 +73,7 @@ OUString SvxCTLOptionsPage::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() + " ";
     }
 
@@ -81,7 +81,7 @@ OUString SvxCTLOptionsPage::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/cui/source/options/optdeepl.cxx b/cui/source/options/optdeepl.cxx
index 0028ab22d49e..5b51e556cc85 100644
--- a/cui/source/options/optdeepl.cxx
+++ b/cui/source/options/optdeepl.cxx
@@ -50,11 +50,11 @@ OUString OptDeeplTabPage::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() + " ";
     }
 
-    if (const auto& pString = m_xBuilder->weld_link_button(u"privacy"_ustr))
+    if (const auto pString = m_xBuilder->weld_link_button(u"privacy"_ustr))
         sAllStrings += pString->get_label() + " ";
 
     return sAllStrings.replaceAll("_", "");
diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index f190a587a170..2a3b089c8762 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -674,7 +674,7 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, weld::Entry&, 
rEdt, void)
     OUString rEntry = rEdt.get_text();
 
     sal_Int32 nWordLen = rEntry.getLength();
-    const OUString& rRepString = fixSpace(m_xReplaceED->get_text());
+    const OUString aRepString = fixSpace(m_xReplaceED->get_text());
 
     bool bEnableNewReplace  = false;
     bool bEnableDelete      = false;
@@ -696,7 +696,7 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, weld::Entry&, 
rEdt, void)
                 eCmpRes = cmpDicEntry_Impl( rEntry, aTestStr );
                 if(CDE_DIFFERENT != eCmpRes)
                 {
-                    if(!rRepString.isEmpty())
+                    if(!aRepString.isEmpty())
                         bFirstSelect = true;
                     bDoNothing=true;
                     m_pWordsLB->set_cursor(i);
diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx
index 29d83596ab01..efda65e1ad26 100644
--- a/cui/source/options/optfltr.cxx
+++ b/cui/source/options/optfltr.cxx
@@ -90,7 +90,7 @@ OUString OfaMSFilterTabPage::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() + " ";
     }
 
@@ -99,7 +99,7 @@ OUString OfaMSFilterTabPage::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() + " ";
     }
 
@@ -216,7 +216,7 @@ OUString OfaMSFilterTabPage2::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() + " ";
     }
 
@@ -224,7 +224,7 @@ OUString OfaMSFilterTabPage2::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/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 6550b52fef66..6cfc67c9496b 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -229,7 +229,7 @@ OUString OfaMiscTabPage::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() + " ";
     }
 
@@ -239,11 +239,11 @@ OUString OfaMiscTabPage::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() + " ";
     }
 
-    if (const auto& pString = m_xBuilder->weld_button(u"assocfiles"_ustr))
+    if (const auto pString = m_xBuilder->weld_button(u"assocfiles"_ustr))
         sAllStrings += pString->get_label() + " ";
 
     return sAllStrings.replaceAll("_", "");
@@ -768,7 +768,7 @@ OUString OfaViewTabPage::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() + " ";
     }
 
@@ -777,7 +777,7 @@ OUString OfaViewTabPage::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() + " ";
     }
 
@@ -1014,7 +1014,7 @@ void OfaViewTabPage::Reset( const SfxItemSet* )
         nStyleLB_InitialSelection = 0;
     }
     else {
-        const OUString& selected = SvtMiscOptions::GetIconTheme();
+        const OUString selected = SvtMiscOptions::GetIconTheme();
         const vcl::IconThemeInfo& selectedInfo =
                 vcl::IconThemeInfo::FindIconThemeById(mInstalledIconThemes, 
selected);
         nStyleLB_InitialSelection = 
m_xIconStyleLB->find_text(selectedInfo.GetDisplayName());
@@ -1374,7 +1374,7 @@ OUString OfaLanguagesTabPage::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() + " ";
     }
 
@@ -1383,7 +1383,7 @@ OUString OfaLanguagesTabPage::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/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx
index a9242cc40500..acecb3de9a3a 100644
--- a/cui/source/options/optgenrl.cxx
+++ b/cui/source/options/optgenrl.cxx
@@ -418,7 +418,7 @@ OUString SvxGeneralTabPage::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() + " ";
     }
 
diff --git a/cui/source/options/opthtml.cxx b/cui/source/options/opthtml.cxx
index f8d9619b1faf..619f46c0fc29 100644
--- a/cui/source/options/opthtml.cxx
+++ b/cui/source/options/opthtml.cxx
@@ -60,10 +60,10 @@ OfaHtmlTabPage::OfaHtmlTabPage(weld::Container* pPage, 
weld::DialogController* p
     sal_Int32 nPos;
     if ((nPos = aText.indexOf( aPlaceholder)) != -1)
     {
-        const OUString& rStr = SvtLanguageTable::GetLanguageString( 
LANGUAGE_ENGLISH_US);
-        if (!rStr.isEmpty())
+        const OUString aStr = SvtLanguageTable::GetLanguageString( 
LANGUAGE_ENGLISH_US);
+        if (!aStr.isEmpty())
         {
-            aText = aText.replaceAt( nPos, aPlaceholder.getLength(), rStr);
+            aText = aText.replaceAt( nPos, aPlaceholder.getLength(), aStr);
             m_xNumbersEnglishUSCB->set_label( aText);
         }
     }
@@ -89,7 +89,7 @@ OUString OfaHtmlTabPage::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() + " ";
     }
 
@@ -98,7 +98,7 @@ OUString OfaHtmlTabPage::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/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 3d16985a8c40..d2196cd1b80d 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -316,7 +316,7 @@ OUString SvxProxyTabPage::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() + " ";
     }
 
@@ -843,7 +843,7 @@ OUString SvxSecurityTabPage::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() + " ";
     }
 
@@ -851,7 +851,7 @@ OUString SvxSecurityTabPage::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() + " ";
     }
 
@@ -861,7 +861,7 @@ OUString SvxSecurityTabPage::GetAllStrings()
 
     for (const auto& btn : buttons)
     {
-        if (const auto& pString = m_xBuilder->weld_button(btn))
+        if (const auto pString = m_xBuilder->weld_button(btn))
             sAllStrings += pString->get_label() + " ";
     }
 
@@ -950,7 +950,7 @@ OUString SvxEMailTabPage::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() + " ";
     }
 
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index f8cb0657d393..e0124974ebfa 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -480,7 +480,7 @@ OUString SvxJavaOptionsPage::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() + " ";
     }
 
@@ -488,7 +488,7 @@ OUString SvxJavaOptionsPage::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() + " ";
     }
 
@@ -496,7 +496,7 @@ OUString SvxJavaOptionsPage::GetAllStrings()
 
     for (const auto& btn : buttons)
     {
-        if (const auto& pString = m_xBuilder->weld_button(btn))
+        if (const auto pString = m_xBuilder->weld_button(btn))
             sAllStrings += pString->get_label() + " ";
     }
 
diff --git a/cui/source/options/optjsearch.cxx 
b/cui/source/options/optjsearch.cxx
index 34c4faf149c6..4d9048155c17 100644
--- a/cui/source/options/optjsearch.cxx
+++ b/cui/source/options/optjsearch.cxx
@@ -206,7 +206,7 @@ OUString SvxJSearchOptionsPage::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() + " ";
     }
 
@@ -232,7 +232,7 @@ OUString SvxJSearchOptionsPage::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/cui/source/options/optlanguagetool.cxx 
b/cui/source/options/optlanguagetool.cxx
index 0f3636ebec46..b7f6327324dc 100644
--- a/cui/source/options/optlanguagetool.cxx
+++ b/cui/source/options/optlanguagetool.cxx
@@ -121,7 +121,7 @@ OUString OptLanguageToolTabPage::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() + " ";
     }
 
@@ -129,11 +129,11 @@ OUString OptLanguageToolTabPage::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() + " ";
     }
 
-    if (const auto& pString = m_xBuilder->weld_link_button(u"policy"_ustr))
+    if (const auto pString = m_xBuilder->weld_link_button(u"policy"_ustr))
         sAllStrings += pString->get_label() + " ";
 
     return sAllStrings.replaceAll("_", "");
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 15a0842e386a..c07ab32a1d85 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -893,7 +893,7 @@ OUString SvxLinguTabPage::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() + " ";
     }
 
diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx
index 207f2b924a0c..abc4784e4d7e 100644
--- a/cui/source/options/optopencl.cxx
+++ b/cui/source/options/optopencl.cxx
@@ -59,7 +59,7 @@ OUString SvxOpenCLTabPage::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() + " ";
     }
 
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 949627151b8e..5eb31909fc22 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -220,7 +220,7 @@ std::unique_ptr<SfxTabPage> SvxPathTabPage::Create( 
weld::Container* pPage, weld
 OUString SvxPathTabPage::GetAllStrings()
 {
     OUString sAllStrings;
-    if (const auto& pString = m_xBuilder->weld_label(u"label1"_ustr))
+    if (const auto pString = m_xBuilder->weld_label(u"label1"_ustr))
         sAllStrings += pString->get_label() + " ";
     return sAllStrings.replaceAll("_", "");
 }
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 77397dcefc6b..907ece3e51bd 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -228,7 +228,7 @@ OUString SvxSaveTabPage::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() + " ";
     }
 
@@ -239,7 +239,7 @@ OUString SvxSaveTabPage::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/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx
index 2db1bcb52aaa..21fd59d7f712 100644
--- a/cui/source/options/optupdt.cxx
+++ b/cui/source/options/optupdt.cxx
@@ -250,7 +250,7 @@ OUString SvxOnlineUpdateTabPage::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() + " ";
     }
 
@@ -258,7 +258,7 @@ OUString SvxOnlineUpdateTabPage::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() + " ";
     }
 
@@ -266,7 +266,7 @@ OUString SvxOnlineUpdateTabPage::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/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index a4223d73d7e8..51af4ec8e39c 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -66,11 +66,11 @@ OUString SvxPersonalizationTabPage::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() + " ";
     }
 
-    if (const auto& pString = m_xBuilder->weld_label(u"personas_label"_ustr))
+    if (const auto pString = m_xBuilder->weld_label(u"personas_label"_ustr))
         sAllStrings += pString->get_label() + " ";
 
     return sAllStrings.replaceAll("_", "");
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 393f9f79d872..ba3998445cf5 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -1180,8 +1180,8 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, 
weld::Entry&, rEdt, void)
         }
     }
 
-    const OUString& rShortTxt = m_xShortED->get_text();
-    bool bEnableNew = !rShortTxt.isEmpty() &&
+    const OUString aShortTxt = m_xShortED->get_text();
+    bool bEnableNew = !aShortTxt.isEmpty() &&
                         ( !rRepString.isEmpty() ||
                                 ( bHasSelectionText && bSWriter )) &&
                         ( !bFirstSelIterSet || rRepString !=
@@ -1190,7 +1190,7 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, 
weld::Entry&, rEdt, void)
     {
         for (auto const& elem : aFormatText)
         {
-            if(elem == rShortTxt)
+            if(elem == aShortTxt)
             {
                 bEnableNew = false;
                 break;
@@ -1529,7 +1529,7 @@ IMPL_LINK(OfaAutocorrExceptPage, SelectHdl, 
weld::TreeView&, rBox, void)
 
 IMPL_LINK(OfaAutocorrExceptPage, ModifyHdl, weld::Entry&, rEdt, void)
 {
-    const OUString& sEntry = rEdt.get_text();
+    const OUString sEntry = rEdt.get_text();
     bool bEntryLen = !sEntry.isEmpty();
     if (&rEdt == m_xAbbrevED.get())
     {
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 62ed6940dd38..a8d4f716ca3b 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -867,13 +867,13 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, 
LanguageGroup eLangGrp
     const SfxItemSet* pExampleSet = GetDialogExampleSet();
 
     bool bChanged = true;
-    const OUString& rFontName  = pNameBox->get_active_text();
+    const OUString aFontName  = pNameBox->get_active_text();
     const FontList* pFontList = GetFontList();
     OUString aStyleBoxText = pStyleBox->get_active_text();
     int nEntryPos = pStyleBox->find_text(aStyleBoxText);
     if (nEntryPos >= m_pImpl->m_nExtraEntryPos)
         aStyleBoxText.clear();
-    FontMetric aInfo( pFontList->Get( rFontName, aStyleBoxText ) );
+    FontMetric aInfo( pFontList->Get( aFontName, aStyleBoxText ) );
     SvxFontItem aFontItem( aInfo.GetFamilyType(), aInfo.GetFamilyName(), 
aInfo.GetStyleName(),
                            aInfo.GetPitch(), aInfo.GetCharSet(), nWhich );
     pOld = GetOldItem( rSet, nSlot );
@@ -894,7 +894,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, 
LanguageGroup eLangGrp
          static_cast<const SvxFontItem*>(pItem)->GetFamilyName() != 
aFontItem.GetFamilyName() )
         bChanged = true;
 
-    if ( bChanged && !rFontName.isEmpty() )
+    if ( bChanged && !aFontName.isEmpty() )
     {
         rSet.Put( aFontItem );
         bModified = true;
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 202db8ce8526..dc9b0e4ea542 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -286,7 +286,7 @@ OUString SvxAreaTabPage::GetAllStrings()
 
     for (const auto& toggle : toggleButton)
     {
-        if (const auto& pString = m_xBuilder->weld_toggle_button(toggle))
+        if (const auto pString = m_xBuilder->weld_toggle_button(toggle))
             sAllStrings += pString->get_label() + " ";
     }
 

Reply via email to