basctl/source/basicide/baside2b.cxx        |    8 ++--
 basctl/source/basicide/localizationmgr.cxx |   16 ++++----
 basegfx/source/polygon/b2dpolygontools.cxx |    4 +-
 basegfx/source/polygon/b3dpolygontools.cxx |    2 -
 basegfx/source/tools/unopolypolygon.cxx    |   24 ++++++------
 basic/source/classes/sb.cxx                |    2 -
 basic/source/classes/sbunoobj.cxx          |   16 ++++----
 basic/source/classes/sbxmod.cxx            |    6 +--
 basic/source/runtime/inputbox.cxx          |    4 +-
 basic/source/runtime/methods.cxx           |   56 ++++++++++++++---------------
 basic/source/runtime/methods1.cxx          |    6 +--
 basic/source/sbx/sbxarray.cxx              |    2 -
 basic/source/sbx/sbxcoll.cxx               |    2 -
 basic/source/sbx/sbxobj.cxx                |    2 -
 14 files changed, 75 insertions(+), 75 deletions(-)

New commits:
commit cc9b55e8a8f8b8dbc81d17712cd848b1a6dfb206
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Nov 7 19:12:16 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Nov 8 08:41:06 2024 +0100

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

diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 58ded6c8c3d1..ae9f4d0adeed 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1853,7 +1853,7 @@ std::pair<bool, sal_uInt32> StarBASIC::StoreData( 
SvStream& r ) const
     r.WriteUInt16( static_cast<sal_uInt16>(pModules.size()));
     for( const auto& rpModule: pModules )
     {
-        const auto& [bSuccessModule, nVersionModule] = rpModule->Store(r);
+        const auto [bSuccessModule, nVersionModule] = rpModule->Store(r);
         if( !bSuccessModule )
         {
             return { false, 0 };
diff --git a/basic/source/classes/sbunoobj.cxx 
b/basic/source/classes/sbunoobj.cxx
index 3199340e8b89..521c09e273b5 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -2613,19 +2613,19 @@ SbxVariable* SbUnoObject::Find( const OUString& rName, 
SbxClassType t )
             }
             if( mxUnoAccess->hasProperty( aUName, PropertyConcept::ALL - 
PropertyConcept::DANGEROUS ) )
             {
-                const Property& rProp = mxUnoAccess->
+                const Property aProp = mxUnoAccess->
                     getProperty( aUName, PropertyConcept::ALL - 
PropertyConcept::DANGEROUS );
 
                 // If the property could be void the type had to be set to 
Variant
                 SbxDataType eSbxType;
-                if( rProp.Attributes & PropertyAttribute::MAYBEVOID )
+                if( aProp.Attributes & PropertyAttribute::MAYBEVOID )
                     eSbxType = SbxVARIANT;
                 else
-                    eSbxType = unoToSbxType( rProp.Type.getTypeClass() );
+                    eSbxType = unoToSbxType( aProp.Type.getTypeClass() );
 
-                SbxDataType eRealSbxType = ( ( rProp.Attributes & 
PropertyAttribute::MAYBEVOID ) ? unoToSbxType( rProp.Type.getTypeClass() ) : 
eSbxType );
+                SbxDataType eRealSbxType = ( ( aProp.Attributes & 
PropertyAttribute::MAYBEVOID ) ? unoToSbxType( aProp.Type.getTypeClass() ) : 
eSbxType );
                 // create the property and superimpose it
-                auto pProp = tools::make_ref<SbUnoProperty>( rProp.Name, 
eSbxType, eRealSbxType, rProp, 0, false, ( rProp.Type.getTypeClass() ==  
css::uno::TypeClass_STRUCT  ) );
+                auto pProp = tools::make_ref<SbUnoProperty>( aProp.Name, 
eSbxType, eRealSbxType, aProp, 0, false, ( aProp.Type.getTypeClass() ==  
css::uno::TypeClass_STRUCT  ) );
                 QuickInsert( pProp.get() );
                 pRes = pProp.get();
             }
@@ -2633,12 +2633,12 @@ SbxVariable* SbUnoObject::Find( const OUString& rName, 
SbxClassType t )
                 MethodConcept::ALL - MethodConcept::DANGEROUS ) )
             {
                 // address the method
-                const Reference< XIdlMethod >& rxMethod = mxUnoAccess->
+                const Reference< XIdlMethod > xMethod = mxUnoAccess->
                     getMethod( aUName, MethodConcept::ALL - 
MethodConcept::DANGEROUS );
 
                 // create SbUnoMethod and superimpose it
-                auto xMethRef = tools::make_ref<SbUnoMethod>( 
rxMethod->getName(),
-                    unoToSbxType( rxMethod->getReturnType() ), rxMethod, false 
);
+                auto xMethRef = tools::make_ref<SbUnoMethod>( 
xMethod->getName(),
+                    unoToSbxType( xMethod->getReturnType() ), xMethod, false );
                 QuickInsert( xMethRef.get() );
                 pRes = xMethRef.get();
             }
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 1120207b5906..77eb427e5b49 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -1630,7 +1630,7 @@ std::pair<bool, sal_uInt32> SbModule::StoreData( 
SvStream& rStrm ) const
     bool bFixup = ( pImage && !pImage->ExceedsLegacyLimits() );
     if ( bFixup )
         fixUpMethodStart( true );
-    const auto& [bSuccess, nVersion] = SbxObject::StoreData(rStrm);
+    const auto [bSuccess, nVersion] = SbxObject::StoreData(rStrm);
     if (!bSuccess)
         return { false, 0 };
 
@@ -1761,7 +1761,7 @@ void SbModule::StoreBinaryData( SvStream& rStrm )
     if (!Compile())
         return;
 
-    const auto& [bSuccess, nVersion] = SbxObject::StoreData(rStrm);
+    const auto [bSuccess, nVersion] = SbxObject::StoreData(rStrm);
     if (!bSuccess)
         return;
 
@@ -1913,7 +1913,7 @@ bool SbJScriptModule::LoadData( SvStream& rStrm, 
sal_uInt16 )
 
 std::pair<bool, sal_uInt32> SbJScriptModule::StoreData( SvStream& rStrm ) const
 {
-    const auto& [bSuccess, nVersion] = SbxObject::StoreData(rStrm);
+    const auto [bSuccess, nVersion] = SbxObject::StoreData(rStrm);
     if( !bSuccess )
         return { false, 0 };
 
diff --git a/basic/source/runtime/inputbox.cxx 
b/basic/source/runtime/inputbox.cxx
index 134c1a0759c7..5f55aceb98b3 100644
--- a/basic/source/runtime/inputbox.cxx
+++ b/basic/source/runtime/inputbox.cxx
@@ -118,7 +118,7 @@ void SbRtl_InputBox(StarBASIC *, SbxArray & rPar, bool)
         OUString aTitle;
         OUString aDefault;
         sal_Int32 nX = -1, nY = -1;  // center
-        const OUString& rPrompt = rPar.Get(1)->GetOUString();
+        const OUString aPrompt = rPar.Get(1)->GetOUString();
         if (nArgCount > 2 && !rPar.Get(2)->IsErr())
             aTitle = rPar.Get(2)->GetOUString();
         if (nArgCount > 3 && !rPar.Get(3)->IsErr())
@@ -133,7 +133,7 @@ void SbRtl_InputBox(StarBASIC *, SbxArray & rPar, bool)
             nX = rPar.Get(4)->GetLong();
             nY = rPar.Get(5)->GetLong();
         }
-        SvRTLInputBox aDlg(Application::GetDefDialogParent(), rPrompt, aTitle, 
aDefault, nX, nY);
+        SvRTLInputBox aDlg(Application::GetDefDialogParent(), aPrompt, aTitle, 
aDefault, nX, nY);
         aDlg.run();
         rPar.Get(0)->PutString(aDlg.GetText());
     }
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 597537385c7c..de36b63f4356 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -819,17 +819,17 @@ void SbRtl_InStr(StarBASIC *, SbxArray & rPar, bool)
             bTextMode = rPar.Get(4)->GetInteger();
         }
         sal_Int32 nPos;
-        const OUString& rToken = rPar.Get(nFirstStringPos + 1)->GetOUString();
+        const OUString aToken = rPar.Get(nFirstStringPos + 1)->GetOUString();
 
         // #97545 Always find empty string
-        if( rToken.isEmpty() )
+        if( aToken.isEmpty() )
         {
             nPos = nStartPos;
         }
         else
         {
-            const OUString& rStr1 = rPar.Get(nFirstStringPos)->GetOUString();
-            const sal_Int32 nrStr1Len = rStr1.getLength();
+            const OUString aStr1 = rPar.Get(nFirstStringPos)->GetOUString();
+            const sal_Int32 nrStr1Len = aStr1.getLength();
             if (nStartPos > nrStr1Len)
             {
                 // Start position is greater than the string being searched
@@ -839,20 +839,20 @@ void SbRtl_InStr(StarBASIC *, SbxArray & rPar, bool)
             {
                 if( !bTextMode )
                 {
-                    nPos = rStr1.indexOf( rToken, nStartPos - 1 ) + 1;
+                    nPos = aStr1.indexOf( aToken, nStartPos - 1 ) + 1;
                 }
                 else
                 {
                     // tdf#139840 - case-insensitive operation for non-ASCII 
characters
                     i18nutil::SearchOptions2 aSearchOptions;
-                    aSearchOptions.searchString = rToken;
+                    aSearchOptions.searchString = aToken;
                     aSearchOptions.AlgorithmType2 = 
util::SearchAlgorithms2::ABSOLUTE;
                     aSearchOptions.transliterateFlags |= 
TransliterationFlags::IGNORE_CASE;
                     utl::TextSearch textSearch(aSearchOptions);
 
                     sal_Int32 nStart = nStartPos - 1;
                     sal_Int32 nEnd = nrStr1Len;
-                    nPos = textSearch.SearchForward(rStr1, &nStart, &nEnd) ? 
nStart + 1 : 0;
+                    nPos = textSearch.SearchForward(aStr1, &nStart, &nEnd) ? 
nStart + 1 : 0;
                 }
             }
         }
@@ -1261,19 +1261,19 @@ void SbRtl_Right(StarBASIC *, SbxArray & rPar, bool)
     if (rPar.Count() < 3)
         return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
 
-    const OUString& rStr = rPar.Get(1)->GetOUString();
+    const OUString aStr = rPar.Get(1)->GetOUString();
     int nResultLen = rPar.Get(2)->GetLong();
     if( nResultLen < 0 )
     {
         nResultLen = 0;
         StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
     }
-    int nStrLen = rStr.getLength();
+    int nStrLen = aStr.getLength();
     if ( nResultLen > nStrLen )
     {
         nResultLen = nStrLen;
     }
-    OUString aResultStr = rStr.copy( nStrLen - nResultLen );
+    OUString aResultStr = aStr.copy( nStrLen - nResultLen );
     rPar.Get(0)->PutString(aResultStr);
 }
 
@@ -1413,8 +1413,8 @@ void SbRtl_StrComp(StarBASIC *, SbxArray & rPar, bool)
         rPar.Get(0)->PutEmpty();
         return;
     }
-    const OUString& rStr1 = rPar.Get(1)->GetOUString();
-    const OUString& rStr2 = rPar.Get(2)->GetOUString();
+    const OUString aStr1 = rPar.Get(1)->GetOUString();
+    const OUString aStr2 = rPar.Get(2)->GetOUString();
 
     SbiInstance* pInst = GetSbData()->pInst;
     bool bTextCompare;
@@ -1452,12 +1452,12 @@ void SbRtl_StrComp(StarBASIC *, SbxArray & rPar, bool)
 
         LanguageType eLangType = 
Application::GetSettings().GetLanguageTag().getLanguageType();
         pTransliterationWrapper->loadModuleIfNeeded( eLangType );
-        nRetValue = pTransliterationWrapper->compareString( rStr1, rStr2 );
+        nRetValue = pTransliterationWrapper->compareString( aStr1, aStr2 );
     }
     else
     {
         sal_Int32 aResult;
-        aResult = rStr1.compareTo( rStr2 );
+        aResult = aStr1.compareTo( aStr2 );
         if ( aResult < 0  )
         {
             nRetValue = -1;
@@ -1490,8 +1490,8 @@ void SbRtl_String(StarBASIC *, SbxArray & rPar, bool)
         }
         else
         {
-            const OUString& rStr = rPar.Get(2)->GetOUString();
-            aFiller = rStr[0];
+            const OUString aStr = rPar.Get(2)->GetOUString();
+            aFiller = aStr[0];
         }
         OUStringBuffer aBuf(lCount);
         string::padToLength(aBuf, lCount, aFiller);
@@ -3716,8 +3716,8 @@ void SbRtl_Len(StarBASIC *, SbxArray & rPar, bool)
     }
     else
     {
-        const OUString& rStr = rPar.Get(1)->GetOUString();
-        rPar.Get(0)->PutLong(rStr.getLength());
+        const OUString aStr = rPar.Get(1)->GetOUString();
+        rPar.Get(0)->PutLong(aStr.getLength());
     }
 }
 
@@ -3728,12 +3728,12 @@ void SbRtl_DDEInitiate(StarBASIC *, SbxArray & rPar, 
bool)
     {
         return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
     }
-    const OUString& rApp = rPar.Get(1)->GetOUString();
-    const OUString& rTopic = rPar.Get(2)->GetOUString();
+    const OUString aApp = rPar.Get(1)->GetOUString();
+    const OUString aTopic = rPar.Get(2)->GetOUString();
 
     SbiDdeControl* pDDE = GetSbData()->pInst->GetDdeControl();
     size_t nChannel;
-    ErrCode nDdeErr = pDDE->Initiate( rApp, rTopic, nChannel );
+    ErrCode nDdeErr = pDDE->Initiate( aApp, aTopic, nChannel );
     if( nDdeErr )
     {
         StarBASIC::Error( nDdeErr );
@@ -3787,10 +3787,10 @@ void SbRtl_DDERequest(StarBASIC *, SbxArray & rPar, 
bool)
         return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
     }
     size_t nChannel = rPar.Get(1)->GetInteger();
-    const OUString& rItem = rPar.Get(2)->GetOUString();
+    const OUString aItem = rPar.Get(2)->GetOUString();
     SbiDdeControl* pDDE = GetSbData()->pInst->GetDdeControl();
     OUString aResult;
-    ErrCode nDdeErr = pDDE->Request( nChannel, rItem, aResult );
+    ErrCode nDdeErr = pDDE->Request( nChannel, aItem, aResult );
     if( nDdeErr )
     {
         StarBASIC::Error( nDdeErr );
@@ -3810,9 +3810,9 @@ void SbRtl_DDEExecute(StarBASIC *, SbxArray & rPar, bool)
         return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
     }
     size_t nChannel = rPar.Get(1)->GetInteger();
-    const OUString& rCommand = rPar.Get(2)->GetOUString();
+    const OUString aCommand = rPar.Get(2)->GetOUString();
     SbiDdeControl* pDDE = GetSbData()->pInst->GetDdeControl();
-    ErrCode nDdeErr = pDDE->Execute( nChannel, rCommand );
+    ErrCode nDdeErr = pDDE->Execute( nChannel, aCommand );
     if( nDdeErr )
     {
         StarBASIC::Error( nDdeErr );
@@ -3828,10 +3828,10 @@ void SbRtl_DDEPoke(StarBASIC *, SbxArray & rPar, bool)
         return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
     }
     size_t nChannel = rPar.Get(1)->GetInteger();
-    const OUString& rItem = rPar.Get(2)->GetOUString();
-    const OUString& rData = rPar.Get(3)->GetOUString();
+    const OUString aItem = rPar.Get(2)->GetOUString();
+    const OUString aData = rPar.Get(3)->GetOUString();
     SbiDdeControl* pDDE = GetSbData()->pInst->GetDdeControl();
-    ErrCode nDdeErr = pDDE->Poke( nChannel, rItem, rData );
+    ErrCode nDdeErr = pDDE->Poke( nChannel, aItem, aData );
     if( nDdeErr )
     {
         StarBASIC::Error( nDdeErr );
diff --git a/basic/source/runtime/methods1.cxx 
b/basic/source/runtime/methods1.cxx
index 8787ca4dc430..ffdd1ce661b9 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -881,20 +881,20 @@ static bool lcl_WriteSbxVariable( const SbxVariable& 
rVar, SvStream* pStrm,
     case SbxSTRING:
     case SbxLPSTR:
         {
-            const OUString& rStr = rVar.GetOUString();
+            const OUString aStr = rVar.GetOUString();
             if( !bBinary || bIsArray )
             {
                 if( bIsVariant )
                 {
                     pStrm->WriteUInt16( SbxSTRING );
                 }
-                pStrm->WriteUniOrByteString( rStr, osl_getThreadTextEncoding() 
);
+                pStrm->WriteUniOrByteString( aStr, osl_getThreadTextEncoding() 
);
             }
             else
             {
                 // without any length information! without end-identifier!
                 // What does that mean for Unicode?! Choosing conversion to 
ByteString...
-                OString aByteStr(OUStringToOString(rStr, 
osl_getThreadTextEncoding()));
+                OString aByteStr(OUStringToOString(aStr, 
osl_getThreadTextEncoding()));
                 pStrm->WriteOString( aByteStr );
             }
         }
diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx
index f4025745e3d0..5be00ebf010d 100644
--- a/basic/source/sbx/sbxarray.cxx
+++ b/basic/source/sbx/sbxarray.cxx
@@ -376,7 +376,7 @@ std::pair<bool, sal_uInt32> SbxArray::StoreData( SvStream& 
rStrm ) const
         if (rEntry.mpVar.is() && !(rEntry.mpVar->GetFlags() & 
SbxFlagBits::DontStore))
         {
             rStrm.WriteUInt16( n );
-            const auto& [bSuccess, nVersionModule] = 
rEntry.mpVar->Store(rStrm);
+            const auto [bSuccess, nVersionModule] = rEntry.mpVar->Store(rStrm);
             if (!bSuccess)
                 return { false, 0 };
             else if (nVersionModule > nVersion)
diff --git a/basic/source/sbx/sbxcoll.cxx b/basic/source/sbx/sbxcoll.cxx
index 0bb315c496a8..8b74d79bc194 100644
--- a/basic/source/sbx/sbxcoll.cxx
+++ b/basic/source/sbx/sbxcoll.cxx
@@ -290,7 +290,7 @@ bool SbxStdCollection::LoadData( SvStream& rStrm, 
sal_uInt16 nVer )
 
 std::pair<bool, sal_uInt32> SbxStdCollection::StoreData( SvStream& rStrm ) 
const
 {
-    const auto& [bRes, nVersion] = SbxCollection::StoreData(rStrm);
+    const auto [bRes, nVersion] = SbxCollection::StoreData(rStrm);
     if( bRes )
     {
         write_uInt16_lenPrefixed_uInt8s_FromOUString(rStrm, aElemClass,
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx
index 0217d03ab520..3fc56112e9e8 100644
--- a/basic/source/sbx/sbxobj.cxx
+++ b/basic/source/sbx/sbxobj.cxx
@@ -621,7 +621,7 @@ std::pair<bool, sal_uInt32> SbxObject::StoreData( SvStream& 
rStrm ) const
     rStrm.Seek( nPos );
     rStrm.WriteUInt32( nNew - nPos );
     rStrm.Seek( nNew );
-    const auto& [bSuccess, nVersion] = pMethods->Store( rStrm );
+    const auto [bSuccess, nVersion] = pMethods->Store( rStrm );
     if( !bSuccess )
     {
         return { false, 0 };
commit e4e9d1d8000321c6bcd591989f4ce4b68553cb86
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Nov 7 19:11:52 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Nov 8 08:40:57 2024 +0100

    loplugin:reftotemp in basctl,basegfx
    
    Change-Id: Ifbc294320cd717892544133e976ff776a0fdbd6b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176243
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins

diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index f25915ac1b47..ca5858865cba 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -660,7 +660,7 @@ void EditorWindow::HandleAutoCorrect()
     const sal_uInt32 nLine =  aSel.GetStart().GetPara();
     const sal_Int32 nIndex =  aSel.GetStart().GetIndex();
     OUString aLine( pEditEngine->GetText( nLine ) ); // the line being modified
-    const OUString& sActSubName = GetActualSubName( nLine ); // the actual 
procedure
+    const OUString sActSubName = GetActualSubName( nLine ); // the actual 
procedure
 
     std::vector<HighlightPortion> aPortions;
     aHighlighter.getHighlightPortions( aLine, aPortions );
@@ -931,7 +931,7 @@ void EditorWindow::HandleCodeCompletion()
 
     if( !sVarType.isEmpty() && CodeCompleteOptions::IsAutoCorrectOn() )
     {//correct variable name, if autocorrection on
-        const OUString& sStr = aCodeCompleteCache.GetCorrectCaseVarName( 
sBaseName, GetActualSubName(nLine) );
+        const OUString sStr = aCodeCompleteCache.GetCorrectCaseVarName( 
sBaseName, GetActualSubName(nLine) );
         if( !sStr.isEmpty() )
         {
             TextPaM aStart(nLine, aSel.GetStart().GetIndex() - 
sStr.getLength() );
@@ -2915,11 +2915,11 @@ void CodeCompleteWindow::ResizeAndPositionListBox()
 
     //calculate position
     const tools::Rectangle aVisArea( pParent->GetEditView()->GetStartDocPos(), 
pParent->GetOutputSizePixel() ); //the visible area
-    const Point& aBottomPoint = aVisArea.BottomRight();
+    const Point aBottomPoint = aVisArea.BottomRight();
 
     if( aVisArea.TopRight().getY() + aPos.getY() + aSize.getHeight() > 
aBottomPoint.getY() )
     {//clipped at the bottom: move it up
-        const tools::Long& nParentFontHeight = 
pParent->GetEditEngine()->GetFont().GetFontHeight(); //parent's font (in the 
IDE): needed for height
+        const tools::Long nParentFontHeight = 
pParent->GetEditEngine()->GetFont().GetFontHeight(); //parent's font (in the 
IDE): needed for height
         aPos.AdjustY( -(aSize.getHeight() + nParentFontHeight + nCursorPad) );
     }
 
diff --git a/basctl/source/basicide/localizationmgr.cxx 
b/basctl/source/basicide/localizationmgr.cxx
index 937e4bd511b2..02ff357f40dd 100644
--- a/basctl/source/basicide/localizationmgr.cxx
+++ b/basctl/source/basicide/localizationmgr.cxx
@@ -311,7 +311,7 @@ sal_Int32 
LocalizationMgr::implHandleControlResourceProperties
                         OUString aPureIdStr = implCreatePureResourceId
                             ( aDialogName, aCtrlName, aPropName, 
xStringResourceManager );
 
-                        const Locale& rDefaultLocale = 
xSourceStringResolver->getDefaultLocale();
+                        const Locale aDefaultLocale = 
xSourceStringResolver->getDefaultLocale();
 
                         // Set Id for all locales
                         for (auto& rLocale : aLocaleSeq)
@@ -325,7 +325,7 @@ sal_Int32 
LocalizationMgr::implHandleControlResourceProperties
                             catch(const MissingResourceException&)
                             {
                                 aResStr = 
xSourceStringResolver->resolveStringForLocale
-                                    ( aPureSourceIdStr, rDefaultLocale );
+                                    ( aPureSourceIdStr, aDefaultLocale );
                             }
                             xStringResourceManager->setStringForLocale( 
aPureIdStr, aResStr, rLocale );
                         }
@@ -340,7 +340,7 @@ sal_Int32 
LocalizationMgr::implHandleControlResourceProperties
                     {
                         OUString aPureSourceIdStr = aPropStr.copy( 1 );
 
-                        const Locale& rDefaultLocale = 
xSourceStringResolver->getDefaultLocale();
+                        const Locale aDefaultLocale = 
xSourceStringResolver->getDefaultLocale();
 
                         // Copy Id for all locales
                         for (auto& rLocale : aLocaleSeq)
@@ -354,7 +354,7 @@ sal_Int32 
LocalizationMgr::implHandleControlResourceProperties
                             catch(const MissingResourceException&)
                             {
                                 aResStr = 
xSourceStringResolver->resolveStringForLocale
-                                    ( aPureSourceIdStr, rDefaultLocale );
+                                    ( aPureSourceIdStr, aDefaultLocale );
                             }
                             xStringResourceManager->setStringForLocale( 
aPureSourceIdStr, aResStr, rLocale );
                         }
@@ -505,7 +505,7 @@ sal_Int32 
LocalizationMgr::implHandleControlResourceProperties
                                             + aDot
                                             + aPropName;
 
-                        const Locale& rDefaultLocale = 
xSourceStringResolver->getDefaultLocale();
+                        const Locale aDefaultLocale = 
xSourceStringResolver->getDefaultLocale();
 
                         for (sal_Int32 i = 0; i < nPropStringCount; ++i)
                         {
@@ -528,7 +528,7 @@ sal_Int32 
LocalizationMgr::implHandleControlResourceProperties
                                 catch(const MissingResourceException&)
                                 {
                                     aResStr = 
xSourceStringResolver->resolveStringForLocale
-                                        ( aPureSourceIdStr, rDefaultLocale );
+                                        ( aPureSourceIdStr, aDefaultLocale );
                                 }
                                 xStringResourceManager->setStringForLocale( 
aPureIdStr, aResStr, rLocale );
                             }
@@ -540,7 +540,7 @@ sal_Int32 
LocalizationMgr::implHandleControlResourceProperties
                     // Copy string from source to target resource
                     else if( eMode == COPY_RESOURCES && 
xSourceStringResolver.is() )
                     {
-                        const Locale& rDefaultLocale = 
xSourceStringResolver->getDefaultLocale();
+                        const Locale aDefaultLocale = 
xSourceStringResolver->getDefaultLocale();
 
                         for (auto& aSourceIdStr : aPropStrings)
                         {
@@ -558,7 +558,7 @@ sal_Int32 
LocalizationMgr::implHandleControlResourceProperties
                                 catch(const MissingResourceException&)
                                 {
                                     aResStr = 
xSourceStringResolver->resolveStringForLocale
-                                        ( aPureSourceIdStr, rDefaultLocale );
+                                        ( aPureSourceIdStr, aDefaultLocale );
                                 }
                                 xStringResourceManager->setStringForLocale( 
aPureSourceIdStr, aResStr, rLocale );
                             }
diff --git a/basegfx/source/polygon/b2dpolygontools.cxx 
b/basegfx/source/polygon/b2dpolygontools.cxx
index 564a24e99c8b..0483d13ee9c8 100644
--- a/basegfx/source/polygon/b2dpolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolygontools.cxx
@@ -1131,11 +1131,11 @@ namespace basegfx::utils
             }
 
             // provide callbacks as lambdas
-            const auto& rLineCallback(
+            const auto rLineCallback(
                 nullptr == pLineTarget
                 ? std::function<void(const basegfx::B2DPolygon&)>()
                 : [&pLineTarget](const basegfx::B2DPolygon& rSnippet){ 
pLineTarget->append(rSnippet); });
-            const auto& rGapCallback(
+            const auto rGapCallback(
                 nullptr == pGapTarget
                 ? std::function<void(const basegfx::B2DPolygon&)>()
                 : [&pGapTarget](const basegfx::B2DPolygon& rSnippet){ 
pGapTarget->append(rSnippet); });
diff --git a/basegfx/source/polygon/b3dpolygontools.cxx 
b/basegfx/source/polygon/b3dpolygontools.cxx
index 916ff6f47f3a..2f4ed7f7d691 100644
--- a/basegfx/source/polygon/b3dpolygontools.cxx
+++ b/basegfx/source/polygon/b3dpolygontools.cxx
@@ -104,7 +104,7 @@ namespace basegfx::utils
             }
 
             // provide callback as lambda
-            const auto& rLineCallback(
+            const auto rLineCallback(
                 nullptr == pLineTarget
                 ? std::function<void(const basegfx::B3DPolygon&)>()
                 : [&pLineTarget](const basegfx::B3DPolygon& rSnippet){ 
pLineTarget->append(rSnippet); });
diff --git a/basegfx/source/tools/unopolypolygon.cxx 
b/basegfx/source/tools/unopolypolygon.cxx
index 3f4d273cf8f2..310e5f3e8ce0 100644
--- a/basegfx/source/tools/unopolypolygon.cxx
+++ b/basegfx/source/tools/unopolypolygon.cxx
@@ -204,18 +204,18 @@ namespace basegfx::unotools
         std::unique_lock const guard( m_aMutex );
         modifying();
 
-        const B2DPolyPolygon& rNewPolyPoly(
+        const B2DPolyPolygon aNewPolyPoly(
             unotools::polyPolygonFromPoint2DSequenceSequence( points ) );
 
         if( nPolygonIndex == -1 )
         {
-            maPolyPoly = rNewPolyPoly;
+            maPolyPoly = aNewPolyPoly;
         }
         else
         {
             checkIndex( nPolygonIndex );
 
-            maPolyPoly.insert( nPolygonIndex, rNewPolyPoly );
+            maPolyPoly.insert( nPolygonIndex, aNewPolyPoly );
         }
     }
 
@@ -272,18 +272,18 @@ namespace basegfx::unotools
     {
         std::unique_lock const guard( m_aMutex );
         modifying();
-        const B2DPolyPolygon& rNewPolyPoly(
+        const B2DPolyPolygon aNewPolyPoly(
             unotools::polyPolygonFromBezier2DSequenceSequence( points ) );
 
         if( nPolygonIndex == -1 )
         {
-            maPolyPoly = rNewPolyPoly;
+            maPolyPoly = aNewPolyPoly;
         }
         else
         {
             checkIndex( nPolygonIndex );
 
-            maPolyPoly.insert( nPolygonIndex, rNewPolyPoly );
+            maPolyPoly.insert( nPolygonIndex, aNewPolyPoly );
         }
     }
 
@@ -300,15 +300,15 @@ namespace basegfx::unotools
             throw lang::IndexOutOfBoundsException();
 
         const B2DPoint& rPt( rPoly.getB2DPoint( nPointIndex ) );
-        const B2DPoint& rCtrl0( rPoly.getNextControlPoint(nPointIndex) );
-        const B2DPoint& rCtrl1( rPoly.getPrevControlPoint((nPointIndex + 1) % 
nPointCount) );
+        const B2DPoint aCtrl0( rPoly.getNextControlPoint(nPointIndex) );
+        const B2DPoint aCtrl1( rPoly.getPrevControlPoint((nPointIndex + 1) % 
nPointCount) );
 
         return geometry::RealBezierSegment2D( rPt.getX(),
                                               rPt.getY(),
-                                              rCtrl0.getX(),
-                                              rCtrl0.getY(),
-                                              rCtrl1.getX(),
-                                              rCtrl1.getY() );
+                                              aCtrl0.getX(),
+                                              aCtrl0.getY(),
+                                              aCtrl1.getX(),
+                                              aCtrl1.getY() );
     }
 
     void SAL_CALL UnoPolyPolygon::setBezierSegment( const 
geometry::RealBezierSegment2D& segment,

Reply via email to