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 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() : [&pLineTarget](const basegfx::B2DPolygon& rSnippet){ pLineTarget->append(rSnippet); }); - const auto& rGapCallback( + const auto rGapCallback( nullptr == pGapTarget ? std::function() : [&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() : [&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,