drawinglayer/source/primitive2d/glowprimitive2d.cxx                   |   12 
++--
 drawinglayer/source/primitive2d/shadowprimitive2d.cxx                 |   12 
++--
 drawinglayer/source/primitive2d/textlayoutdevice.cxx                  |   28 
+++++-----
 filter/source/svg/svgwriter.cxx                                       |    4 -
 formula/source/ui/dlg/funcpage.cxx                                    |    2 
 fpicker/source/office/RemoteFilesDialog.cxx                           |    4 -
 framework/source/accelerators/acceleratorcache.cxx                    |    4 -
 framework/source/uielement/toolbarmanager.cxx                         |    2 
 framework/source/xml/acceleratorconfigurationwriter.cxx               |    4 -
 helpcompiler/source/HelpCompiler.cxx                                  |    2 
 i18npool/source/collator/collatorImpl.cxx                             |    4 -
 i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx |    2 
 i18npool/source/nativenumber/nativenumbersupplier.cxx                 |    8 +-
 i18npool/source/transliteration/fullwidthToHalfwidth.cxx              |    6 +-
 i18npool/source/transliteration/halfwidthToFullwidth.cxx              |    6 +-
 i18npool/source/transliteration/transliterationImpl.cxx               |    4 -
 i18npool/source/transliteration/transliteration_body.cxx              |    8 +-
 17 files changed, 56 insertions(+), 56 deletions(-)

New commits:
commit 2f94498419cf8e20937e46aa99f80418fd8d57f6
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon Nov 11 09:56:28 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Nov 11 18:29:07 2024 +0100

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

diff --git a/helpcompiler/source/HelpCompiler.cxx 
b/helpcompiler/source/HelpCompiler.cxx
index 57f3f5bca179..1431395a8b3d 100644
--- a/helpcompiler/source/HelpCompiler.cxx
+++ b/helpcompiler/source/HelpCompiler.cxx
@@ -87,7 +87,7 @@ void HelpCompiler::saveXhpForJar( xmlDocPtr doc, const 
fs::path &filePath )
 #else
     std::string pathSep = "/";
 #endif
-    const std::string& sourceXhpPath = filePath.native_file_string();
+    const std::string sourceXhpPath = filePath.native_file_string();
     std::string zipdirPath = zipdir.native_file_string();
     const std::string srcdirPath( src.native_file_string() );
     // srcdirPath contains trailing /, but we want the file path with / at the 
beginning
diff --git a/i18npool/source/collator/collatorImpl.cxx 
b/i18npool/source/collator/collatorImpl.cxx
index a17d400ac6c1..015d2c34825e 100644
--- a/i18npool/source/collator/collatorImpl.cxx
+++ b/i18npool/source/collator/collatorImpl.cxx
@@ -68,7 +68,7 @@ CollatorImpl::compareString( const OUString& in_str1, const 
OUString& in_str2)
 sal_Int32 SAL_CALL
 CollatorImpl::loadDefaultCollator(const lang::Locale& rLocale, sal_Int32 
collatorOptions)
 {
-    const Sequence< Implementation > &imp = 
mxLocaleData->getCollatorImplementations(rLocale);
+    const Sequence< Implementation > imp = 
mxLocaleData->getCollatorImplementations(rLocale);
     auto pImpl = std::find_if(imp.begin(), imp.end(),
         [](const Implementation& rImp) { return rImp.isDefault; });
     if (pImpl != imp.end())
@@ -105,7 +105,7 @@ Sequence< OUString > SAL_CALL
 CollatorImpl::listCollatorAlgorithms( const lang::Locale& rLocale )
 {
     nLocale = rLocale;
-    const Sequence< Implementation > &imp = 
mxLocaleData->getCollatorImplementations(rLocale);
+    const Sequence< Implementation > imp = 
mxLocaleData->getCollatorImplementations(rLocale);
     Sequence< OUString > list(imp.getLength());
     auto pBegin = list.getArray();
     auto pId = pBegin;
diff --git 
a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx 
b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index 980356b0c4f5..228543d5214b 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -747,7 +747,7 @@ DefaultNumberingProvider::makeNumberingString( const 
Sequence<beans::PropertyVal
                break;
           case TRANSLITERATION:
                try {
-                    const OUString &tmp = OUString::number( number );
+                    const OUString tmp = OUString::number( number );
                     OUString transliteration;
                     getPropertyByName(aProperties, "Transliteration") >>= 
transliteration;
                     if ( !translit )
diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx 
b/i18npool/source/nativenumber/nativenumbersupplier.cxx
index 57e2355e15c0..91e663c1f470 100644
--- a/i18npool/source/nativenumber/nativenumbersupplier.cxx
+++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx
@@ -600,7 +600,7 @@ OUString getNumberText(const Locale& rLocale, const 
OUString& rNumberString,
     }
 
     // Handle also month and day names for NatNum12 date formatting
-    const OUString& rNumberStr = (count == 0) ? rNumberString : 
sBuf.makeStringAndClear();
+    const OUString aNumberStr = (count == 0) ? rNumberString : 
sBuf.makeStringAndClear();
 
     static auto xNumberText
         = 
css::linguistic2::NumberText::create(comphelper::getProcessComponentContext());
@@ -616,14 +616,14 @@ OUString getNumberText(const Locale& rLocale, const 
OUString& rNumberString,
     // of the continuous update of the multiple number names during typing.
     // We fix this by buffering the result of the conversion.
     static std::unordered_map<OUString, std::map<OUString, OUString>> aBuff;
-    auto& rItems = aBuff[rNumberStr];
+    auto& rItems = aBuff[aNumberStr];
     auto& rItem = rItems[numbertext_prefix + aLoc];
     if (rItem.isEmpty())
     {
-        rItem = xNumberText->getNumberText(numbertext_prefix + rNumberStr, 
rLocale);
+        rItem = xNumberText->getNumberText(numbertext_prefix + aNumberStr, 
rLocale);
         // use number at missing number to text conversion
         if (rItem.isEmpty())
-            rItem = rNumberStr;
+            rItem = aNumberStr;
     }
     OUString sResult = rItem;
     if (i != 0 && i < len)
diff --git a/i18npool/source/transliteration/fullwidthToHalfwidth.cxx 
b/i18npool/source/transliteration/fullwidthToHalfwidth.cxx
index 558177128618..bdab67d3314f 100644
--- a/i18npool/source/transliteration/fullwidthToHalfwidth.cxx
+++ b/i18npool/source/transliteration/fullwidthToHalfwidth.cxx
@@ -46,7 +46,7 @@ OUString
 fullwidthToHalfwidth::transliterateImpl( const OUString& inStr, sal_Int32 
startPos, sal_Int32 nCount, Sequence< sal_Int32 >* pOffset )
 {
     // Decomposition: GA --> KA + voice-mark
-    const OUString& newStr = 
i18nutil::widthfolding::decompose_ja_voiced_sound_marks (inStr, startPos, 
nCount, pOffset);
+    const OUString newStr = 
i18nutil::widthfolding::decompose_ja_voiced_sound_marks (inStr, startPos, 
nCount, pOffset);
 
     // One to One mapping
     return transliteration_OneToOne::transliterateImpl( newStr, 0, 
newStr.getLength(), nullptr);
@@ -76,7 +76,7 @@ OUString
 FULLWIDTHKATAKANA_HALFWIDTHKATAKANA::transliterateImpl( const OUString& inStr, 
sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >* pOffset )
 {
     // Decomposition: GA --> KA + voice-mark
-    const OUString& newStr = 
i18nutil::widthfolding::decompose_ja_voiced_sound_marks (inStr, startPos, 
nCount, pOffset);
+    const OUString newStr = 
i18nutil::widthfolding::decompose_ja_voiced_sound_marks (inStr, startPos, 
nCount, pOffset);
 
     // One to One mapping
     return transliteration_OneToOne::transliterateImpl( newStr, 0, 
newStr.getLength(), nullptr);
@@ -106,7 +106,7 @@ OUString
 FULLWIDTH_HALFWIDTH_LIKE_ASC::transliterateImpl( const OUString& inStr, 
sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >* pOffset )
 {
     // Decomposition: GA --> KA + voice-mark
-    const OUString& newStr = 
i18nutil::widthfolding::decompose_ja_voiced_sound_marks (inStr, startPos, 
nCount, pOffset);
+    const OUString newStr = 
i18nutil::widthfolding::decompose_ja_voiced_sound_marks (inStr, startPos, 
nCount, pOffset);
 
     // One to One mapping
     return transliteration_OneToOne::transliterateImpl( newStr, 0, 
newStr.getLength(), nullptr);
diff --git a/i18npool/source/transliteration/halfwidthToFullwidth.cxx 
b/i18npool/source/transliteration/halfwidthToFullwidth.cxx
index 528aa0d87523..ff55701da5c2 100644
--- a/i18npool/source/transliteration/halfwidthToFullwidth.cxx
+++ b/i18npool/source/transliteration/halfwidthToFullwidth.cxx
@@ -38,7 +38,7 @@ OUString
 halfwidthToFullwidth::transliterateImpl( const OUString& inStr, sal_Int32 
startPos, sal_Int32 nCount, Sequence< sal_Int32 >* pOffset )
 {
     // One to One mapping
-    const OUString& newStr = transliteration_OneToOne::transliterateImpl( 
inStr, startPos, nCount, nullptr);
+    const OUString newStr = transliteration_OneToOne::transliterateImpl( 
inStr, startPos, nCount, nullptr);
 
     // Composition: KA + voice-mark --> GA
     return i18nutil::widthfolding::compose_ja_voiced_sound_marks ( newStr, 0, 
newStr.getLength(), pOffset );
@@ -56,7 +56,7 @@ OUString
 HALFWIDTHKATAKANA_FULLWIDTHKATAKANA::transliterateImpl( const OUString& inStr, 
sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >* pOffset )
 {
     // One to One mapping
-    const OUString& newStr = transliteration_OneToOne::transliterateImpl( 
inStr, startPos, nCount, nullptr);
+    const OUString newStr = transliteration_OneToOne::transliterateImpl( 
inStr, startPos, nCount, nullptr);
 
     // Composition: KA + voice-mark --> GA
     return i18nutil::widthfolding::compose_ja_voiced_sound_marks ( newStr, 0, 
newStr.getLength(), pOffset );
@@ -74,7 +74,7 @@ OUString
 HALFWIDTH_FULLWIDTH_LIKE_JIS::transliterateImpl( const OUString& inStr, 
sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >* pOffset )
 {
     // One to One mapping
-    const OUString& newStr = transliteration_OneToOne::transliterateImpl( 
inStr, startPos, nCount, nullptr);
+    const OUString newStr = transliteration_OneToOne::transliterateImpl( 
inStr, startPos, nCount, nullptr);
 
     // Composition: KA + voice-mark --> GA
     return i18nutil::widthfolding::compose_ja_voiced_sound_marks ( newStr, 0, 
newStr.getLength(), pOffset, WIDTHFOLDING_DONT_USE_COMBINED_VU );
diff --git a/i18npool/source/transliteration/transliterationImpl.cxx 
b/i18npool/source/transliteration/transliterationImpl.cxx
index 7caa334eeaa2..0b2f40683a76 100644
--- a/i18npool/source/transliteration/transliterationImpl.cxx
+++ b/i18npool/source/transliteration/transliterationImpl.cxx
@@ -296,7 +296,7 @@ TransliterationImpl::loadModulesByImplNames(const Sequence< 
OUString >& implName
 Sequence<OUString> SAL_CALL
 TransliterationImpl::getAvailableModules( const Locale& rLocale, sal_Int16 
sType )
 {
-    const Sequence<OUString> &translist = 
mxLocaledata->getTransliterations(rLocale);
+    const Sequence<OUString> translist = 
mxLocaledata->getTransliterations(rLocale);
     std::vector<OUString> r;
     r.reserve(translist.getLength());
     Reference<XExtendedTransliteration> body;
@@ -525,7 +525,7 @@ TransliterationImpl::getRange(const Sequence< OUString > 
&inStrs,
     std::vector<OUString> ostr;
     ostr.reserve(nMaxOutputLength);
     for (sal_Int32 j = 0; j < length; j+=2) {
-        const Sequence< OUString >& temp = 
bodyCascade[_numCascade]->transliterateRange(inStrs[j], inStrs[j+1]);
+        const Sequence< OUString > temp = 
bodyCascade[_numCascade]->transliterateRange(inStrs[j], inStrs[j+1]);
 
         for (const auto& rStr : temp) {
             if ( j_tmp++ >= nMaxOutputLength ) throw RuntimeException();
diff --git a/i18npool/source/transliteration/transliteration_body.cxx 
b/i18npool/source/transliteration/transliteration_body.cxx
index 6cca7b51320a..f4679571d510 100644
--- a/i18npool/source/transliteration/transliteration_body.cxx
+++ b/i18npool/source/transliteration/transliteration_body.cxx
@@ -138,7 +138,7 @@ Transliteration_body::transliterateImpl(
             // take care of TOGGLE_CASE transliteration:
             MappingType nTmpMappingType = lcl_getMappingTypeForToggleCase( 
nMappingType, in[i] );
 
-            const i18nutil::Mapping &map = i18nutil::casefolding::getValue( 
in, i, nCount, aLocale, nTmpMappingType );
+            const i18nutil::Mapping map = i18nutil::casefolding::getValue( in, 
i, nCount, aLocale, nTmpMappingType );
             std::fill_n(offsetDataEnd, map.nmap, i + startPos);
             offsetDataEnd += map.nmap;
             std::copy_n(map.map, map.nmap, out + j);
@@ -154,7 +154,7 @@ Transliteration_body::transliterateImpl(
             // take care of TOGGLE_CASE transliteration:
             MappingType nTmpMappingType = lcl_getMappingTypeForToggleCase( 
nMappingType, in[i] );
 
-            const i18nutil::Mapping &map = i18nutil::casefolding::getValue( 
in, i, nCount, aLocale, nTmpMappingType );
+            const i18nutil::Mapping map = i18nutil::casefolding::getValue( in, 
i, nCount, aLocale, nTmpMappingType );
             std::copy_n(map.map, map.nmap, out + j);
             j += map.nmap;
         }
@@ -166,7 +166,7 @@ Transliteration_body::transliterateImpl(
 OUString SAL_CALL
 Transliteration_body::transliterateChar2String( sal_Unicode inChar )
 {
-    const i18nutil::Mapping &map = i18nutil::casefolding::getValue(&inChar, 0, 
1, aLocale, nMappingType);
+    const i18nutil::Mapping map = i18nutil::casefolding::getValue(&inChar, 0, 
1, aLocale, nMappingType);
     rtl_uString* pStr = rtl_uString_alloc(map.nmap);
     sal_Unicode* out = pStr->buffer;
     sal_Int32 i;
@@ -181,7 +181,7 @@ Transliteration_body::transliterateChar2String( sal_Unicode 
inChar )
 sal_Unicode SAL_CALL
 Transliteration_body::transliterateChar2Char( sal_Unicode inChar )
 {
-    const i18nutil::Mapping &map = i18nutil::casefolding::getValue(&inChar, 0, 
1, aLocale, nMappingType);
+    const i18nutil::Mapping map = i18nutil::casefolding::getValue(&inChar, 0, 
1, aLocale, nMappingType);
     if (map.nmap > 1)
         throw MultipleCharsOutputException();
     return map.map[0];
commit ce8816ff95c06ce86dffee90431e6538b676b5e4
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon Nov 11 09:55:02 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Nov 11 18:28:57 2024 +0100

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

diff --git a/drawinglayer/source/primitive2d/glowprimitive2d.cxx 
b/drawinglayer/source/primitive2d/glowprimitive2d.cxx
index 6bf9dea8af83..18fa5224887d 100644
--- a/drawinglayer/source/primitive2d/glowprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/glowprimitive2d.cxx
@@ -182,23 +182,23 @@ void GlowPrimitive2D::create2DDecomposition(
     if (aAlpha.IsEmpty())
         return;
 
-    const Size& rBitmapExSizePixel(aAlpha.GetSizePixel());
+    const Size aBitmapExSizePixel(aAlpha.GetSizePixel());
 
-    if (rBitmapExSizePixel.Width() <= 0 || rBitmapExSizePixel.Height() <= 0)
+    if (aBitmapExSizePixel.Width() <= 0 || aBitmapExSizePixel.Height() <= 0)
         return;
 
     // We may have to take a corrective scaling into account when the
     // MaximumQuadraticPixel limit was used/triggered
     double fScale(1.0);
 
-    if (static_cast<sal_uInt32>(rBitmapExSizePixel.Width()) != 
nDiscreteClippedWidth
-        || static_cast<sal_uInt32>(rBitmapExSizePixel.Height()) != 
nDiscreteClippedHeight)
+    if (static_cast<sal_uInt32>(aBitmapExSizePixel.Width()) != 
nDiscreteClippedWidth
+        || static_cast<sal_uInt32>(aBitmapExSizePixel.Height()) != 
nDiscreteClippedHeight)
     {
         // scale in X and Y should be the same (see fReduceFactor in 
createAlphaMask),
         // so adapt numerically to a single scale value, they are integer 
rounded values
-        const double fScaleX(static_cast<double>(rBitmapExSizePixel.Width())
+        const double fScaleX(static_cast<double>(aBitmapExSizePixel.Width())
                              / static_cast<double>(nDiscreteClippedWidth));
-        const double fScaleY(static_cast<double>(rBitmapExSizePixel.Height())
+        const double fScaleY(static_cast<double>(aBitmapExSizePixel.Height())
                              / static_cast<double>(nDiscreteClippedHeight));
 
         fScale = (fScaleX + fScaleY) * 0.5;
diff --git a/drawinglayer/source/primitive2d/shadowprimitive2d.cxx 
b/drawinglayer/source/primitive2d/shadowprimitive2d.cxx
index 5de34c5440b6..c6a7a2e66707 100644
--- a/drawinglayer/source/primitive2d/shadowprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/shadowprimitive2d.cxx
@@ -224,22 +224,22 @@ void ShadowPrimitive2D::create2DDecomposition(
     if (aAlpha.IsEmpty())
         return;
 
-    const Size& rBitmapExSizePixel(aAlpha.GetSizePixel());
-    if (!(rBitmapExSizePixel.Width() > 0 && rBitmapExSizePixel.Height() > 0))
+    const Size aBitmapExSizePixel(aAlpha.GetSizePixel());
+    if (!(aBitmapExSizePixel.Width() > 0 && aBitmapExSizePixel.Height() > 0))
         return;
 
     // We may have to take a corrective scaling into account when the
     // MaximumQuadraticPixel limit was used/triggered
     double fScale(1.0);
 
-    if (static_cast<sal_uInt32>(rBitmapExSizePixel.Width()) != 
nDiscreteClippedWidth
-        || static_cast<sal_uInt32>(rBitmapExSizePixel.Height()) != 
nDiscreteClippedHeight)
+    if (static_cast<sal_uInt32>(aBitmapExSizePixel.Width()) != 
nDiscreteClippedWidth
+        || static_cast<sal_uInt32>(aBitmapExSizePixel.Height()) != 
nDiscreteClippedHeight)
     {
         // scale in X and Y should be the same (see fReduceFactor in 
createAlphaMask),
         // so adapt numerically to a single scale value, they are integer 
rounded values
-        const double fScaleX(static_cast<double>(rBitmapExSizePixel.Width())
+        const double fScaleX(static_cast<double>(aBitmapExSizePixel.Width())
                              / static_cast<double>(nDiscreteClippedWidth));
-        const double fScaleY(static_cast<double>(rBitmapExSizePixel.Height())
+        const double fScaleY(static_cast<double>(aBitmapExSizePixel.Height())
                              / static_cast<double>(nDiscreteClippedHeight));
 
         fScale = (fScaleX + fScaleY) * 0.5;
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx 
b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index ac51f8a9e458..1061d518d9c1 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -211,36 +211,36 @@ void TextLayouterDevice::setTextColor(const 
basegfx::BColor& rColor)
 
 double TextLayouterDevice::getOverlineOffset() const
 {
-    const ::FontMetric& rMetric = mrDevice.GetFontMetric();
-    double fRet = (rMetric.GetInternalLeading() / 2.0) - rMetric.GetAscent();
+    const ::FontMetric aMetric = mrDevice.GetFontMetric();
+    double fRet = (aMetric.GetInternalLeading() / 2.0) - aMetric.GetAscent();
     return fRet * mnFontScalingFixY;
 }
 
 double TextLayouterDevice::getUnderlineOffset() const
 {
-    const ::FontMetric& rMetric = mrDevice.GetFontMetric();
-    double fRet = rMetric.GetDescent() / 2.0;
+    const ::FontMetric aMetric = mrDevice.GetFontMetric();
+    double fRet = aMetric.GetDescent() / 2.0;
     return fRet * mnFontScalingFixY;
 }
 
 double TextLayouterDevice::getStrikeoutOffset() const
 {
-    const ::FontMetric& rMetric = mrDevice.GetFontMetric();
-    double fRet = (rMetric.GetAscent() - rMetric.GetInternalLeading()) / 3.0;
+    const ::FontMetric aMetric = mrDevice.GetFontMetric();
+    double fRet = (aMetric.GetAscent() - aMetric.GetInternalLeading()) / 3.0;
     return fRet * mnFontScalingFixY;
 }
 
 double TextLayouterDevice::getOverlineHeight() const
 {
-    const ::FontMetric& rMetric = mrDevice.GetFontMetric();
-    double fRet = rMetric.GetInternalLeading() / 2.5;
+    const ::FontMetric aMetric = mrDevice.GetFontMetric();
+    double fRet = aMetric.GetInternalLeading() / 2.5;
     return fRet * mnFontScalingFixY;
 }
 
 double TextLayouterDevice::getUnderlineHeight() const
 {
-    const ::FontMetric& rMetric = mrDevice.GetFontMetric();
-    double fRet = rMetric.GetDescent() / 4.0;
+    const ::FontMetric aMetric = mrDevice.GetFontMetric();
+    double fRet = aMetric.GetDescent() / 4.0;
     return fRet * mnFontScalingFixY;
 }
 
@@ -319,14 +319,14 @@ basegfx::B2DRange 
TextLayouterDevice::getTextBoundRect(const OUString& rText, sa
 
 double TextLayouterDevice::getFontAscent() const
 {
-    const ::FontMetric& rMetric = mrDevice.GetFontMetric();
-    return rMetric.GetAscent() * mnFontScalingFixY;
+    const ::FontMetric aMetric = mrDevice.GetFontMetric();
+    return aMetric.GetAscent() * mnFontScalingFixY;
 }
 
 double TextLayouterDevice::getFontDescent() const
 {
-    const ::FontMetric& rMetric = mrDevice.GetFontMetric();
-    return rMetric.GetDescent() * mnFontScalingFixY;
+    const ::FontMetric aMetric = mrDevice.GetFontMetric();
+    return aMetric.GetDescent() * mnFontScalingFixY;
 }
 
 void TextLayouterDevice::addTextRectActions(const ::tools::Rectangle& 
rRectangle,
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 3b58d330e001..2c19058cd3a4 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -4042,8 +4042,8 @@ void SVGActionWriter::ImplWriteActions( const 
GDIMetaFile& rMtf,
             case MetaActionType::MOVECLIPREGION:
             {
                 const_cast<MetaAction*>(pAction)->Execute( mpVDev );
-                const vcl::Region& rClipRegion = mpVDev->GetActiveClipRegion();
-                ImplWriteClipPath( rClipRegion.GetAsPolyPolygon() );
+                const vcl::Region aClipRegion = mpVDev->GetActiveClipRegion();
+                ImplWriteClipPath( aClipRegion.GetAsPolyPolygon() );
 
                 mbClipAttrChanged = true;
             }
diff --git a/formula/source/ui/dlg/funcpage.cxx 
b/formula/source/ui/dlg/funcpage.cxx
index 9724793928a5..114cce0da52c 100644
--- a/formula/source/ui/dlg/funcpage.cxx
+++ b/formula/source/ui/dlg/funcpage.cxx
@@ -312,7 +312,7 @@ IMPL_LINK_NOARG(FuncPage, SelHelpClickHdl, weld::Button&, 
void)
     {
         if (Help* pHelp = Application::GetHelp())
         {
-            const OUString& sHelpId = pDesc->getHelpId();
+            const OUString sHelpId = pDesc->getHelpId();
             if (!sHelpId.isEmpty())
             {
                 pHelp->Start(sHelpId);
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx 
b/fpicker/source/office/RemoteFilesDialog.cxx
index 50c897f35b48..b4ad4485c17e 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -1064,12 +1064,12 @@ void RemoteFilesDialog::UpdateControls( const OUString& 
rURL )
     m_xTreeView->connect_changed(Link<weld::TreeView&,void>());
 
     // read cached data for this url and fill the tree
-    const ::std::vector< SvtContentEntry >& rFolders = 
m_xFileView->GetContent();
+    const ::std::vector< SvtContentEntry > aContentFolders = 
m_xFileView->GetContent();
     ::std::vector< std::pair< OUString, OUString > > aFolders;
 
     m_xName_ed->ClearEntries();
 
-    for(const auto & rFolder : rFolders)
+    for(const auto & rFolder : aContentFolders)
     {
         //WebDAV folders path ends in '/', so strip it
         OUString aFolderName = rFolder.maURL;
diff --git a/framework/source/accelerators/acceleratorcache.cxx 
b/framework/source/accelerators/acceleratorcache.cxx
index c0b819a2a9e8..8f64ed330e19 100644
--- a/framework/source/accelerators/acceleratorcache.cxx
+++ b/framework/source/accelerators/acceleratorcache.cxx
@@ -111,8 +111,8 @@ void AcceleratorCache::removeKey(const css::awt::KeyEvent& 
aKey)
 
 void AcceleratorCache::removeCommand(const OUString& sCommand)
 {
-    const TKeyList& lKeys = getKeysByCommand(sCommand);
-    for (auto const& lKey : lKeys)
+    const TKeyList aKeys = getKeysByCommand(sCommand);
+    for (auto const& lKey : aKeys)
     {
         removeKey(lKey);
     }
diff --git a/framework/source/uielement/toolbarmanager.cxx 
b/framework/source/uielement/toolbarmanager.cxx
index 0cab884b4017..d6bde87bc940 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -644,7 +644,7 @@ void ToolBarManager::CheckAndUpdateImages()
         m_eSymbolSize = eNewSymbolSize;
     }
 
-    const OUString& sCurrentIconTheme = SvtMiscOptions::GetIconTheme();
+    const OUString sCurrentIconTheme = SvtMiscOptions::GetIconTheme();
     if ( m_sIconTheme != sCurrentIconTheme )
     {
         bRefreshImages = true;
diff --git a/framework/source/xml/acceleratorconfigurationwriter.cxx 
b/framework/source/xml/acceleratorconfigurationwriter.cxx
index 3f8b08a0e678..c36c8b6a1eb7 100644
--- a/framework/source/xml/acceleratorconfigurationwriter.cxx
+++ b/framework/source/xml/acceleratorconfigurationwriter.cxx
@@ -72,8 +72,8 @@ void AcceleratorConfigurationWriter::flush()
     AcceleratorCache::TKeyList                 lKeys = 
m_rContainer.getAllKeys();
     for (auto const& lKey : lKeys)
     {
-        const OUString&    rCommand = m_rContainer.getCommandByKey(lKey);
-        impl_ts_writeKeyCommandPair(lKey, rCommand, xExtendedCFG);
+        const OUString aCommand = m_rContainer.getCommandByKey(lKey);
+        impl_ts_writeKeyCommandPair(lKey, aCommand, xExtendedCFG);
     }
 
     /* TODO write key-command list

Reply via email to