loplugin:reftotemp in basctl,basegfx

Change-Id: Ifbc294320cd717892544133e976ff776a0fdbd6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176243
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
This commit is contained in:
Noel Grandin 2024-11-07 19:11:52 +02:00
parent aae76f4df1
commit e4e9d1d800
5 changed files with 27 additions and 27 deletions

View file

@ -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) );
}

View file

@ -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 );
}

View file

@ -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); });

View file

@ -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); });

View file

@ -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,