summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-11-12 21:03:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-11-13 07:44:10 +0100
commit83b62f2f6675c68d6b22f3f23f20243c1fd906a3 (patch)
treee718a3fae0f90f435bddafac830408609e50f2f7 /vcl
parenta34d9e36193821fdbc8fb7d6b3527daf076b2069 (diff)
loplugin:reftotemp in vcl
Change-Id: Ia5b0fd303f5a3b2c4c119f431517cc063070f4a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176501 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/qa/cppunit/PDFiumLibraryTest.cxx28
-rw-r--r--vcl/qa/cppunit/drawmode.cxx8
-rw-r--r--vcl/qa/cppunit/gen/gen.cxx4
-rw-r--r--vcl/qa/cppunit/outdev.cxx16
-rw-r--r--vcl/qt5/QtGraphics_Controls.cxx6
-rw-r--r--vcl/qt5/QtGraphics_Text.cxx4
-rw-r--r--vcl/source/app/salvtables.cxx6
-rw-r--r--vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx10
-rw-r--r--vcl/source/bitmap/bitmap.cxx8
-rw-r--r--vcl/source/control/imgctrl.cxx6
-rw-r--r--vcl/source/control/imivctl1.cxx4
-rw-r--r--vcl/source/filter/egif/egif.cxx8
-rw-r--r--vcl/source/filter/etiff/etiff.cxx8
-rw-r--r--vcl/source/filter/ipdf/pdfread.cxx20
-rw-r--r--vcl/source/fontsubset/cff.cxx2
-rw-r--r--vcl/source/gdi/CommonSalLayout.cxx10
-rw-r--r--vcl/source/gdi/FileDefinitionWidgetDraw.cxx19
-rw-r--r--vcl/source/gdi/WidgetDefinitionReader.cxx6
-rw-r--r--vcl/source/gdi/gdimtf.cxx6
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx6
-rw-r--r--vcl/source/outdev/map.cxx46
-rw-r--r--vcl/source/outdev/mask.cxx4
-rw-r--r--vcl/source/treelist/svtabbx.cxx14
-rw-r--r--vcl/source/window/syswin.cxx10
-rw-r--r--vcl/source/window/window.cxx4
-rw-r--r--vcl/unx/generic/app/wmadaptor.cxx66
-rw-r--r--vcl/unx/generic/gdi/freetypetextrender.cxx8
-rw-r--r--vcl/unx/generic/window/salframe.cxx6
29 files changed, 172 insertions, 173 deletions
diff --git a/vcl/qa/cppunit/PDFiumLibraryTest.cxx b/vcl/qa/cppunit/PDFiumLibraryTest.cxx
index df65a6450ca0..a15fb52a37e2 100644
--- a/vcl/qa/cppunit/PDFiumLibraryTest.cxx
+++ b/vcl/qa/cppunit/PDFiumLibraryTest.cxx
@@ -341,8 +341,8 @@ CPPUNIT_TEST_FIXTURE(PDFiumLibraryTest, testAnnotationsDifferentTypes)
CPPUNIT_ASSERT_EQUAL(0, pAnnotation->getObjectCount());
OUString aContentsString = pAnnotation->getString(vcl::pdf::constDictionaryKeyContents);
CPPUNIT_ASSERT_EQUAL(u"Inline Note"_ustr, aContentsString);
- auto const& rLineGeometry = pAnnotation->getLineGeometry();
- CPPUNIT_ASSERT_EQUAL(true, rLineGeometry.empty());
+ auto const aLineGeometry = pAnnotation->getLineGeometry();
+ CPPUNIT_ASSERT_EQUAL(true, aLineGeometry.empty());
}
{
@@ -353,12 +353,12 @@ CPPUNIT_TEST_FIXTURE(PDFiumLibraryTest, testAnnotationsDifferentTypes)
OUString aContentsString = pAnnotation->getString(vcl::pdf::constDictionaryKeyContents);
CPPUNIT_ASSERT_EQUAL(u"Freehand Text"_ustr, aContentsString);
CPPUNIT_ASSERT_EQUAL(size_t(1), pAnnotation->getInkStrokes().size());
- auto const& aInkStrokes = pAnnotation->getInkStrokes();
+ auto const aInkStrokes = pAnnotation->getInkStrokes();
auto const& aPoints = aInkStrokes[0];
CPPUNIT_ASSERT_EQUAL(size_t(74), aPoints.size());
CPPUNIT_ASSERT_DOUBLES_EQUAL(2.0f, pAnnotation->getBorderWidth(), 1E-2);
- auto const& rLineGeometry = pAnnotation->getLineGeometry();
- CPPUNIT_ASSERT_EQUAL(true, rLineGeometry.empty());
+ auto const aLineGeometry = pAnnotation->getLineGeometry();
+ CPPUNIT_ASSERT_EQUAL(true, aLineGeometry.empty());
}
{
@@ -368,8 +368,8 @@ CPPUNIT_TEST_FIXTURE(PDFiumLibraryTest, testAnnotationsDifferentTypes)
CPPUNIT_ASSERT_EQUAL(0, pAnnotation->getObjectCount());
OUString aContentsString = pAnnotation->getString(vcl::pdf::constDictionaryKeyContents);
CPPUNIT_ASSERT_EQUAL(u"Line Text"_ustr, aContentsString);
- auto const& rLineGeometry = pAnnotation->getLineGeometry();
- CPPUNIT_ASSERT_EQUAL(false, rLineGeometry.empty());
+ auto const aLineGeometry = pAnnotation->getLineGeometry();
+ CPPUNIT_ASSERT_EQUAL(false, aLineGeometry.empty());
}
{
@@ -380,11 +380,11 @@ CPPUNIT_TEST_FIXTURE(PDFiumLibraryTest, testAnnotationsDifferentTypes)
CPPUNIT_ASSERT_EQUAL(true, pAnnotation->hasKey("Vertices"_ostr));
OUString aContentsString = pAnnotation->getString(vcl::pdf::constDictionaryKeyContents);
CPPUNIT_ASSERT_EQUAL(u"Polygon Text"_ustr, aContentsString);
- auto const& aVertices = pAnnotation->getVertices();
+ auto const aVertices = pAnnotation->getVertices();
CPPUNIT_ASSERT_EQUAL(size_t(3), aVertices.size());
CPPUNIT_ASSERT_DOUBLES_EQUAL(2.0f, pAnnotation->getBorderWidth(), 1E-2);
- auto const& rLineGeometry = pAnnotation->getLineGeometry();
- CPPUNIT_ASSERT_EQUAL(true, rLineGeometry.empty());
+ auto const aLineGeometry = pAnnotation->getLineGeometry();
+ CPPUNIT_ASSERT_EQUAL(true, aLineGeometry.empty());
}
{
@@ -394,8 +394,8 @@ CPPUNIT_TEST_FIXTURE(PDFiumLibraryTest, testAnnotationsDifferentTypes)
CPPUNIT_ASSERT_EQUAL(0, pAnnotation->getObjectCount());
OUString aContentsString = pAnnotation->getString(vcl::pdf::constDictionaryKeyContents);
CPPUNIT_ASSERT_EQUAL(u"Ellipse Text"_ustr, aContentsString);
- auto const& rLineGeometry = pAnnotation->getLineGeometry();
- CPPUNIT_ASSERT_EQUAL(true, rLineGeometry.empty());
+ auto const aLineGeometry = pAnnotation->getLineGeometry();
+ CPPUNIT_ASSERT_EQUAL(true, aLineGeometry.empty());
}
{
@@ -407,8 +407,8 @@ CPPUNIT_TEST_FIXTURE(PDFiumLibraryTest, testAnnotationsDifferentTypes)
CPPUNIT_ASSERT_EQUAL(u"Rectangle Text"_ustr, aContentsString);
CPPUNIT_ASSERT_EQUAL(Color(0xFF, 0xE0, 0x00), pAnnotation->getColor());
CPPUNIT_ASSERT_EQUAL(false, pAnnotation->hasKey(vcl::pdf::constDictionaryKeyInteriorColor));
- auto const& rLineGeometry = pAnnotation->getLineGeometry();
- CPPUNIT_ASSERT_EQUAL(true, rLineGeometry.empty());
+ auto const aLineGeometry = pAnnotation->getLineGeometry();
+ CPPUNIT_ASSERT_EQUAL(true, aLineGeometry.empty());
}
}
diff --git a/vcl/qa/cppunit/drawmode.cxx b/vcl/qa/cppunit/drawmode.cxx
index 3dce4a7af636..762816f7e801 100644
--- a/vcl/qa/cppunit/drawmode.cxx
+++ b/vcl/qa/cppunit/drawmode.cxx
@@ -342,8 +342,8 @@ void VclDrawModeTest::testDrawModeBitmapEx()
Bitmap aResultBitmap(aResultBitmapEx.GetBitmap());
BitmapScopedReadAccess pReadAccess(aResultBitmap);
- const BitmapColor& rColor = pReadAccess->GetColor(0, 0);
- CPPUNIT_ASSERT_EQUAL(BitmapColor(0x26, 0x26, 0x26), rColor);
+ const BitmapColor aColor = pReadAccess->GetColor(0, 0);
+ CPPUNIT_ASSERT_EQUAL(BitmapColor(0x26, 0x26, 0x26), aColor);
}
// any other operation other than DrawModeFlags::GrayBitmap is a noop
@@ -352,8 +352,8 @@ void VclDrawModeTest::testDrawModeBitmapEx()
Bitmap aResultBitmap(aResultBitmapEx.GetBitmap());
BitmapScopedReadAccess pReadAccess(aResultBitmap);
- const BitmapColor& rColor = pReadAccess->GetColor(0, 0);
- CPPUNIT_ASSERT_EQUAL(BitmapColor(COL_RED), rColor);
+ const BitmapColor aColor = pReadAccess->GetColor(0, 0);
+ CPPUNIT_ASSERT_EQUAL(BitmapColor(COL_RED), aColor);
}
}
diff --git a/vcl/qa/cppunit/gen/gen.cxx b/vcl/qa/cppunit/gen/gen.cxx
index 6690111ac630..600541d22c00 100644
--- a/vcl/qa/cppunit/gen/gen.cxx
+++ b/vcl/qa/cppunit/gen/gen.cxx
@@ -44,8 +44,8 @@ CPPUNIT_TEST_FIXTURE(GenTest, testTdf121120)
{
Bitmap aBitmap = load("tdf121120.png");
BitmapScopedReadAccess pAccess(aBitmap);
- const Size& rSize = aBitmap.GetSizePixel();
- Color aColor(pAccess->GetPixel(rSize.getHeight() / 2, rSize.getWidth() / 2));
+ const Size aSize = aBitmap.GetSizePixel();
+ Color aColor(pAccess->GetPixel(aSize.getHeight() / 2, aSize.getWidth() / 2));
// Without the accompanying fix in place, this test would have failed with 'Expected: 255;
// Actual : 1'. I.e. center of the preview (which has the background color) was ~black, not
// white.
diff --git a/vcl/qa/cppunit/outdev.cxx b/vcl/qa/cppunit/outdev.cxx
index 9fc9ec533a2a..67489665ebbb 100644
--- a/vcl/qa/cppunit/outdev.cxx
+++ b/vcl/qa/cppunit/outdev.cxx
@@ -206,8 +206,8 @@ CPPUNIT_TEST_FIXTURE(VclOutdevTest, testDrawBlackBitmap)
// test to see if the color is black
Bitmap aBlackBmp(pVDev->GetBitmap(Point(0, 0), Size(10, 10)));
BitmapScopedReadAccess pReadAccess(aBlackBmp);
- const BitmapColor& rColor = pReadAccess->GetColor(0, 0);
- CPPUNIT_ASSERT_EQUAL(BitmapColor(COL_BLACK), rColor);
+ const BitmapColor aColor = pReadAccess->GetColor(0, 0);
+ CPPUNIT_ASSERT_EQUAL(BitmapColor(COL_BLACK), aColor);
}
CPPUNIT_TEST_FIXTURE(VclOutdevTest, testDrawWhiteBitmap)
@@ -250,8 +250,8 @@ CPPUNIT_TEST_FIXTURE(VclOutdevTest, testDrawWhiteBitmap)
// test to see if the color is white
Bitmap aWhiteBmp(pVDev->GetBitmap(Point(0, 0), Size(10, 10)));
BitmapScopedReadAccess pReadAccess(aWhiteBmp);
- const BitmapColor& rColor = pReadAccess->GetColor(0, 0);
- CPPUNIT_ASSERT_EQUAL(BitmapColor(COL_WHITE), rColor);
+ const BitmapColor aColor = pReadAccess->GetColor(0, 0);
+ CPPUNIT_ASSERT_EQUAL(BitmapColor(COL_WHITE), aColor);
}
CPPUNIT_TEST_FIXTURE(VclOutdevTest, testDrawBitmap)
@@ -321,8 +321,8 @@ CPPUNIT_TEST_FIXTURE(VclOutdevTest, testDrawGrayBitmap)
// check to ensure that the bitmap is red
{
BitmapScopedReadAccess pReadAccess(aBmp);
- const BitmapColor& rColor = pReadAccess->GetColor(0, 0);
- CPPUNIT_ASSERT_EQUAL(BitmapColor(COL_RED), rColor);
+ const BitmapColor aColor = pReadAccess->GetColor(0, 0);
+ CPPUNIT_ASSERT_EQUAL(BitmapColor(COL_RED), aColor);
}
ScopedVclPtrInstance<VirtualDevice> pVDev;
@@ -334,8 +334,8 @@ CPPUNIT_TEST_FIXTURE(VclOutdevTest, testDrawGrayBitmap)
Bitmap aVDevBmp(pVDev->GetBitmap(Point(), Size(1, 1)));
{
BitmapScopedReadAccess pReadAccess(aVDevBmp);
- const BitmapColor& rColor = pReadAccess->GetColor(0, 0);
- CPPUNIT_ASSERT_EQUAL(BitmapColor(0x26, 0x26, 0x26), rColor);
+ const BitmapColor aColor = pReadAccess->GetColor(0, 0);
+ CPPUNIT_ASSERT_EQUAL(BitmapColor(0x26, 0x26, 0x26), aColor);
}
}
diff --git a/vcl/qt5/QtGraphics_Controls.cxx b/vcl/qt5/QtGraphics_Controls.cxx
index ab905b687432..01af6926b053 100644
--- a/vcl/qt5/QtGraphics_Controls.cxx
+++ b/vcl/qt5/QtGraphics_Controls.cxx
@@ -161,7 +161,7 @@ inline QRect QtGraphics_Controls::subElementRect(QStyle::SubElement element,
void QtGraphics_Controls::draw(QStyle::ControlElement element, QStyleOption& rOption, QImage* image,
const Color& rBackgroundColor, QStyle::State const state, QRect rect)
{
- const QRect& targetRect = !rect.isNull() ? rect : image->rect();
+ const QRect targetRect = !rect.isNull() ? rect : image->rect();
rOption.state |= state;
rOption.rect = downscale(targetRect);
@@ -176,7 +176,7 @@ void QtGraphics_Controls::draw(QStyle::PrimitiveElement element, QStyleOption& r
QImage* image, const Color& rBackgroundColor,
QStyle::State const state, QRect rect)
{
- const QRect& targetRect = !rect.isNull() ? rect : image->rect();
+ const QRect targetRect = !rect.isNull() ? rect : image->rect();
rOption.state |= state;
rOption.rect = downscale(targetRect);
@@ -191,7 +191,7 @@ void QtGraphics_Controls::draw(QStyle::ComplexControl element, QStyleOptionCompl
QImage* image, const Color& rBackgroundColor,
QStyle::State const state)
{
- const QRect& targetRect = image->rect();
+ const QRect targetRect = image->rect();
rOption.state |= state;
rOption.rect = downscale(targetRect);
diff --git a/vcl/qt5/QtGraphics_Text.cxx b/vcl/qt5/QtGraphics_Text.cxx
index 55613a625a3b..dedcbb7c4bd7 100644
--- a/vcl/qt5/QtGraphics_Text.cxx
+++ b/vcl/qt5/QtGraphics_Text.cxx
@@ -108,8 +108,8 @@ void QtGraphics::GetDevFontList(vcl::font::PhysicalFontCollection* pPFC)
// inform FreetypeManager about this font provided by the PsPrint subsystem
FontAttributes aFA = pFont->m_aFontAttributes;
aFA.IncreaseQualityBy(4096);
- const OString& rFileName = rMgr.getFontFileSysPath(nFontId);
- rFontManager.AddFontFile(rFileName, nFaceNum, nVariantNum, nFontId, aFA);
+ const OString aFileName = rMgr.getFontFileSysPath(nFontId);
+ rFontManager.AddFontFile(aFileName, nFaceNum, nVariantNum, nFontId, aFA);
}
if (bUseFontconfig)
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 4f3ba515d13a..77d856b60a66 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -2220,11 +2220,11 @@ IMPL_LINK_NOARG(SalInstanceAssistant, UpdateRoadmap_Hdl, Timer*, void)
int nPos = 0;
for (size_t i = 0; i < m_aAddedPages.size(); ++i)
{
- const OUString& rLabel = m_aAddedPages[i]->GetText();
+ const OUString aLabel = m_aAddedPages[i]->GetText();
bool bSensitive = m_aAddedPages[i]->IsEnabled();
- if (rLabel.isEmpty())
+ if (aLabel.isEmpty())
continue;
- m_xWizard->InsertRoadmapItem(nPos++, rLabel, m_aIds[i], bSensitive);
+ m_xWizard->InsertRoadmapItem(nPos++, aLabel, m_aIds[i], bSensitive);
}
m_xWizard->SelectRoadmapItemByID(m_aIds[get_current_page()], false);
diff --git a/vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx b/vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx
index 11b0b456e35c..240c1753b988 100644
--- a/vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx
+++ b/vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx
@@ -107,11 +107,11 @@ template <typename MorphologyOp> struct Value<MorphologyOp, 0>
void apply(const BitmapScopedReadAccess& pReadAccess, sal_Int32 x, sal_Int32 y,
sal_uInt8* /*pHint*/ = nullptr)
{
- const auto& rSource = pReadAccess->GetColor(y, x);
- aResult = Color(ColorAlpha, MorphologyOp::apply(rSource.GetAlpha(), aResult.GetAlpha()),
- MorphologyOp::apply(rSource.GetRed(), aResult.GetRed()),
- MorphologyOp::apply(rSource.GetGreen(), aResult.GetGreen()),
- MorphologyOp::apply(rSource.GetBlue(), aResult.GetBlue()));
+ const auto aSource = pReadAccess->GetColor(y, x);
+ aResult = Color(ColorAlpha, MorphologyOp::apply(aSource.GetAlpha(), aResult.GetAlpha()),
+ MorphologyOp::apply(aSource.GetRed(), aResult.GetRed()),
+ MorphologyOp::apply(aSource.GetGreen(), aResult.GetGreen()),
+ MorphologyOp::apply(aSource.GetBlue(), aResult.GetBlue()));
}
void copy(BitmapScopedWriteAccess& pWriteAccess, sal_Int32 x, sal_Int32 y,
diff --git a/vcl/source/bitmap/bitmap.cxx b/vcl/source/bitmap/bitmap.cxx
index 33f44d967e81..187541328753 100644
--- a/vcl/source/bitmap/bitmap.cxx
+++ b/vcl/source/bitmap/bitmap.cxx
@@ -1360,10 +1360,10 @@ static void shiftColors(sal_Int32* pColorArray, const BitmapScopedReadAccess& pR
Scanline pScanlineRead = pReadAcc->GetScanline(0); // Why always 0?
for (tools::Long n = 0; n < pReadAcc->Width(); ++n)
{
- const BitmapColor& rColor = pReadAcc->GetColorFromData(pScanlineRead, n);
- *pColorArray++ = static_cast<sal_Int32>(rColor.GetBlue()) << 12;
- *pColorArray++ = static_cast<sal_Int32>(rColor.GetGreen()) << 12;
- *pColorArray++ = static_cast<sal_Int32>(rColor.GetRed()) << 12;
+ const BitmapColor aColor = pReadAcc->GetColorFromData(pScanlineRead, n);
+ *pColorArray++ = static_cast<sal_Int32>(aColor.GetBlue()) << 12;
+ *pColorArray++ = static_cast<sal_Int32>(aColor.GetGreen()) << 12;
+ *pColorArray++ = static_cast<sal_Int32>(aColor.GetRed()) << 12;
}
}
diff --git a/vcl/source/control/imgctrl.cxx b/vcl/source/control/imgctrl.cxx
index 414824b29d82..5e7c95dab374 100644
--- a/vcl/source/control/imgctrl.cxx
+++ b/vcl/source/control/imgctrl.cxx
@@ -89,19 +89,19 @@ void ImageControl::ImplDraw(OutputDevice& rDev, const Point& rPos, const Size& r
return;
}
- const Size& rBitmapSize = rImage.GetSizePixel();
+ const Size aBitmapSize = rImage.GetSizePixel();
switch ( mnScaleMode )
{
case ImageScaleMode::NONE:
{
- rDev.DrawImage(lcl_centerWithin( aDrawRect, rBitmapSize ), rImage, nStyle);
+ rDev.DrawImage(lcl_centerWithin( aDrawRect, aBitmapSize ), rImage, nStyle);
}
break;
case ImageScaleMode::ISOTROPIC:
{
- const Size aPaintSize = lcl_calcPaintSize( aDrawRect, rBitmapSize );
+ const Size aPaintSize = lcl_calcPaintSize( aDrawRect, aBitmapSize );
rDev.DrawImage(lcl_centerWithin(aDrawRect, aPaintSize), aPaintSize, rImage, nStyle);
}
break;
diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx
index c2c12162dfdc..55ac31cc0bbb 100644
--- a/vcl/source/control/imivctl1.cxx
+++ b/vcl/source/control/imivctl1.cxx
@@ -807,8 +807,8 @@ void SvxIconChoiceCtrl_Impl::Resize()
pImpCursor->Clear();
pGridMap->OutputSizeChanged();
- const Size& rSize = pView->GetOutputSizePixel();
- PositionScrollBars( rSize.Width(), rSize.Height() );
+ const Size aSize = pView->GetOutputSizePixel();
+ PositionScrollBars( aSize.Width(), aSize.Height() );
// The scrollbars are shown/hidden asynchronously, so derived classes can
// do an Arrange during Resize, without the scrollbars suddenly turning
// on and off again.
diff --git a/vcl/source/filter/egif/egif.cxx b/vcl/source/filter/egif/egif.cxx
index 8b57bac7aa1e..a8a12e674ea6 100644
--- a/vcl/source/filter/egif/egif.cxx
+++ b/vcl/source/filter/egif/egif.cxx
@@ -118,20 +118,20 @@ bool GIFWriter::WriteGIF(const Graphic& rGraphic, FilterConfigItem* pFilterConfi
if( rGraphic.IsAnimated() )
{
- const Animation& rAnimation = rGraphic.GetAnimation();
+ const Animation aAnimation = rGraphic.GetAnimation();
WriteSignature( true );
if ( bStatus )
{
- WriteGlobalHeader( rAnimation.GetDisplaySizePixel() );
+ WriteGlobalHeader( aAnimation.GetDisplaySizePixel() );
if( bStatus )
{
- WriteLoopExtension( rAnimation );
+ WriteLoopExtension( aAnimation );
if( bStatus )
- WriteAnimation( rAnimation );
+ WriteAnimation( aAnimation );
}
}
}
diff --git a/vcl/source/filter/etiff/etiff.cxx b/vcl/source/filter/etiff/etiff.cxx
index a6e07c49b32e..f9b4c4409e1d 100644
--- a/vcl/source/filter/etiff/etiff.cxx
+++ b/vcl/source/filter/etiff/etiff.cxx
@@ -359,10 +359,10 @@ void TIFFWriter::ImplWriteBody()
Scanline pScanline = mpAcc->GetScanline( y );
for ( x = 0; x < mnWidth; x++ )
{
- const BitmapColor& rColor = mpAcc->GetPixelFromData( pScanline, x );
- Compress( rColor.GetRed() );
- Compress( rColor.GetGreen() );
- Compress( rColor.GetBlue() );
+ const BitmapColor aColor = mpAcc->GetPixelFromData( pScanline, x );
+ Compress( aColor.GetRed() );
+ Compress( aColor.GetGreen() );
+ Compress( aColor.GetBlue() );
}
}
}
diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx
index 6b39f8d789b9..584497a9cb77 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -195,12 +195,12 @@ findAnnotations(const std::unique_ptr<vcl::pdf::PDFiumPage>& pPage, basegfx::B2D
if (eSubtype == vcl::pdf::PDFAnnotationSubType::Polygon)
{
- auto const& rVertices = pAnnotation->getVertices();
- if (!rVertices.empty())
+ auto const aVertices = pAnnotation->getVertices();
+ if (!aVertices.empty())
{
auto pMarker = std::make_shared<vcl::pdf::PDFAnnotationMarkerPolygon>();
rPDFGraphicAnnotation.mpMarker = pMarker;
- for (auto const& rVertex : rVertices)
+ for (auto const& rVertex : aVertices)
{
auto aPoint = convertFromPDFInternalToHMM(rVertex, aPageSize);
pMarker->maPolygon.append(aPoint);
@@ -229,12 +229,12 @@ findAnnotations(const std::unique_ptr<vcl::pdf::PDFiumPage>& pPage, basegfx::B2D
}
else if (eSubtype == vcl::pdf::PDFAnnotationSubType::Ink)
{
- auto const& rStrokesList = pAnnotation->getInkStrokes();
- if (!rStrokesList.empty())
+ auto const aStrokesList = pAnnotation->getInkStrokes();
+ if (!aStrokesList.empty())
{
auto pMarker = std::make_shared<vcl::pdf::PDFAnnotationMarkerInk>();
rPDFGraphicAnnotation.mpMarker = pMarker;
- for (auto const& rStrokes : rStrokesList)
+ for (auto const& rStrokes : aStrokesList)
{
basegfx::B2DPolygon aPolygon;
for (auto const& rVertex : rStrokes)
@@ -286,16 +286,16 @@ findAnnotations(const std::unique_ptr<vcl::pdf::PDFiumPage>& pPage, basegfx::B2D
}
else if (eSubtype == vcl::pdf::PDFAnnotationSubType::Line)
{
- auto const& rLineGeometry = pAnnotation->getLineGeometry();
- if (!rLineGeometry.empty())
+ auto const aLineGeometry = pAnnotation->getLineGeometry();
+ if (!aLineGeometry.empty())
{
auto pMarker = std::make_shared<vcl::pdf::PDFAnnotationMarkerLine>();
rPDFGraphicAnnotation.mpMarker = pMarker;
- auto aPoint1 = convertFromPDFInternalToHMM(rLineGeometry[0], aPageSize);
+ auto aPoint1 = convertFromPDFInternalToHMM(aLineGeometry[0], aPageSize);
pMarker->maLineStart = aPoint1;
- auto aPoint2 = convertFromPDFInternalToHMM(rLineGeometry[1], aPageSize);
+ auto aPoint2 = convertFromPDFInternalToHMM(aLineGeometry[1], aPageSize);
pMarker->maLineEnd = aPoint2;
float fWidth = pAnnotation->getBorderWidth();
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 384556458b4d..595bca4d4f5d 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -2277,7 +2277,7 @@ void CffSubsetterContext::convertCharStrings(const sal_GlyphId* pGlyphIds, int n
if (!bCheckDuplicates)
{
- const auto& it
+ const auto it
= std::find_if(rCharStrings.begin(), rCharStrings.end(),
[&](const CharString& c) { return c.nCffGlyphId == nCffGlyphId; });
if (it != rCharStrings.end())
diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx
index 26347233d65f..732c799e003b 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -1027,23 +1027,23 @@ bool GenericSalLayout::HasFontKashidaPositions() const { return m_bHasFontKashid
bool GenericSalLayout::IsKashidaPosValid(int nCharPos, int nNextCharPos) const
{
// Search for glyph items corresponding to nCharPos and nNextCharPos.
- auto const& rGlyph = std::find_if(m_GlyphItems.begin(), m_GlyphItems.end(),
+ auto const aGlyph = std::find_if(m_GlyphItems.begin(), m_GlyphItems.end(),
[&](const GlyphItem& g) { return g.charPos() == nCharPos; });
- auto const& rNextGlyph = std::find_if(m_GlyphItems.begin(), m_GlyphItems.end(),
+ auto const aNextGlyph = std::find_if(m_GlyphItems.begin(), m_GlyphItems.end(),
[&](const GlyphItem& g) { return g.charPos() == nNextCharPos; });
// If either is not found then a ligature is created at this position, we
// can’t insert Kashida here.
- if (rGlyph == m_GlyphItems.end() || rNextGlyph == m_GlyphItems.end())
+ if (aGlyph == m_GlyphItems.end() || aNextGlyph == m_GlyphItems.end())
return false;
// If the either character is not supported by this layout, return false so
// that fallback layouts would be checked for it.
- if (rGlyph->glyphId() == 0 || rNextGlyph->glyphId() == 0)
+ if (aGlyph->glyphId() == 0 || aNextGlyph->glyphId() == 0)
return false;
// Lastly check if this position is kashida-safe.
- return rNextGlyph->IsSafeToInsertKashida();
+ return aNextGlyph->IsSafeToInsertKashida();
}
void GenericSalLayout::drawSalLayout(void* pSurface, const basegfx::BColor& rTextColor, bool bAntiAliased) const
diff --git a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
index e3a09aa7c4ca..fe226bd63598 100644
--- a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
+++ b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
@@ -564,10 +564,10 @@ bool FileDefinitionWidgetDraw::resolveDefinition(ControlType eType, ControlPart
tools::Long nHeight)
{
bool bOK = false;
- auto const& pPart = m_pWidgetDefinition->getDefinition(eType, ePart);
+ auto const pPart = m_pWidgetDefinition->getDefinition(eType, ePart);
if (pPart)
{
- auto const& aStates = pPart->getStates(eType, ePart, eState, rValue);
+ auto const aStates = pPart->getStates(eType, ePart, eState, rValue);
if (!aStates.empty())
{
// use last defined state
@@ -793,20 +793,19 @@ bool FileDefinitionWidgetDraw::getNativeControlRegion(
{
case ControlType::Spinbox:
{
- auto const& pButtonUpPart
+ auto const pButtonUpPart
= m_pWidgetDefinition->getDefinition(eType, ControlPart::ButtonUp);
if (!pButtonUpPart)
return false;
Size aButtonSizeUp(pButtonUpPart->mnWidth, pButtonUpPart->mnHeight);
- auto const& pButtonDownPart
+ auto const pButtonDownPart
= m_pWidgetDefinition->getDefinition(eType, ControlPart::ButtonDown);
if (!pButtonDownPart)
return false;
Size aButtonSizeDown(pButtonDownPart->mnWidth, pButtonDownPart->mnHeight);
- auto const& pEntirePart
- = m_pWidgetDefinition->getDefinition(eType, ControlPart::Entire);
+ auto const pEntirePart = m_pWidgetDefinition->getDefinition(eType, ControlPart::Entire);
OString sOrientation = pEntirePart->msOrientation;
@@ -893,7 +892,7 @@ bool FileDefinitionWidgetDraw::getNativeControlRegion(
case ControlType::Checkbox:
case ControlType::Radiobutton:
{
- auto const& pPart = m_pWidgetDefinition->getDefinition(eType, ControlPart::Entire);
+ auto const pPart = m_pWidgetDefinition->getDefinition(eType, ControlPart::Entire);
if (!pPart)
return false;
@@ -903,7 +902,7 @@ bool FileDefinitionWidgetDraw::getNativeControlRegion(
}
case ControlType::TabItem:
{
- auto const& pPart = m_pWidgetDefinition->getDefinition(eType, ControlPart::Entire);
+ auto const pPart = m_pWidgetDefinition->getDefinition(eType, ControlPart::Entire);
if (!pPart)
return false;
@@ -923,7 +922,7 @@ bool FileDefinitionWidgetDraw::getNativeControlRegion(
{
sal_Int32 nHeight = rBoundingControlRegion.GetHeight();
- auto const& pPart = m_pWidgetDefinition->getDefinition(eType, ControlPart::Entire);
+ auto const pPart = m_pWidgetDefinition->getDefinition(eType, ControlPart::Entire);
if (pPart)
nHeight = std::max(nHeight, pPart->mnHeight);
@@ -954,7 +953,7 @@ bool FileDefinitionWidgetDraw::getNativeControlRegion(
case ControlType::Combobox:
case ControlType::Listbox:
{
- auto const& pPart = m_pWidgetDefinition->getDefinition(eType, ControlPart::ButtonDown);
+ auto const pPart = m_pWidgetDefinition->getDefinition(eType, ControlPart::ButtonDown);
Size aComboButtonSize(pPart->mnWidth, pPart->mnHeight);
if (ePart == ControlPart::ButtonDown)
diff --git a/vcl/source/gdi/WidgetDefinitionReader.cxx b/vcl/source/gdi/WidgetDefinitionReader.cxx
index 16c588883262..428cbad77838 100644
--- a/vcl/source/gdi/WidgetDefinitionReader.cxx
+++ b/vcl/source/gdi/WidgetDefinitionReader.cxx
@@ -176,10 +176,10 @@ bool getControlTypeForXmlString(std::string_view rString, ControlType& reType)
{ "tooltip", ControlType::Tooltip },
};
- auto const& rIterator = aPartMap.find(rString);
- if (rIterator != aPartMap.end())
+ auto const aIterator = aPartMap.find(rString);
+ if (aIterator != aPartMap.end())
{
- reType = rIterator->second;
+ reType = aIterator->second;
return true;
}
return false;
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index bde951e0fd67..9f0da0bc821d 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -514,11 +514,11 @@ void GDIMetaFile::Play(OutputDevice& rOut, const Point& rPos,
// because one would still get round-off errors (the
// round-trip error for LogicToPixel( PixelToLogic() ) was the
// reason for having pixel offset in the first place).
- const Size& rOldOffset(rOut.GetPixelOffset());
- const Size aEmptySize;
+ const Size aOldOffset(rOut.GetPixelOffset());
+ const Size aEmptySize;
rOut.SetPixelOffset(aEmptySize);
aDrawMap.SetOrigin(rOut.PixelToLogic(rOut.LogicToPixel(rPos), aDrawMap));
- rOut.SetPixelOffset(rOldOffset);
+ rOut.SetPixelOffset(aOldOffset);
rOut.Push();
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 571f00ff2eab..e202cce65b47 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -6950,7 +6950,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
{
for (const auto& rSubset : m_aSubsets[pFace].m_aSubsets)
{
- const auto& it = rSubset.m_aMapping.find(nGlyphId);
+ const auto it = rSubset.m_aMapping.find(nGlyphId);
if (it != rSubset.m_aMapping.cend() && it->second.codes() != aCodeUnits)
{
bUseActualText = true;
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index 5c556d3bc726..06bdee0ce538 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -179,11 +179,11 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz
// from trying conversion & stores before...
if ( !aBitmapEx.IsAlpha() )
{
- const auto& rCacheEntry=m_aPDFBmpCache.find(
+ const auto aCacheEntry=m_aPDFBmpCache.find(
aBitmapEx.GetChecksum());
- if ( rCacheEntry != m_aPDFBmpCache.end() )
+ if ( aCacheEntry != m_aPDFBmpCache.end() )
{
- m_rOuterFace.DrawJPGBitmap( *rCacheEntry->second, true, aSizePixel,
+ m_rOuterFace.DrawJPGBitmap( *aCacheEntry->second, true, aSizePixel,
tools::Rectangle( aPoint, aSize ), aAlphaMask, i_Graphic );
return;
}
diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx
index 5f6f7cfc7268..487088bd6014 100644
--- a/vcl/source/outdev/map.cxx
+++ b/vcl/source/outdev/map.cxx
@@ -781,7 +781,7 @@ void OutputDevice::SetRelativeMapMode( const MapMode& rNewMapMode )
{
const auto eFrom = MapToO3tlLength(eOld, o3tl::Length::in);
const auto eTo = MapToO3tlLength(eNew, o3tl::Length::in);
- const auto& [mul, div] = o3tl::getConversionMulDiv(eFrom, eTo);
+ const auto [mul, div] = o3tl::getConversionMulDiv(eFrom, eTo);
Fraction aF(div, mul);
// a?F = a?F * aF
@@ -996,8 +996,8 @@ tools::PolyPolygon OutputDevice::LogicToPixel( const tools::PolyPolygon& rLogicP
basegfx::B2DPolyPolygon OutputDevice::LogicToPixel( const basegfx::B2DPolyPolygon& rLogicPolyPoly ) const
{
basegfx::B2DPolyPolygon aTransformedPoly = rLogicPolyPoly;
- const basegfx::B2DHomMatrix& rTransformationMatrix = GetViewTransformation();
- aTransformedPoly.transform( rTransformationMatrix );
+ const basegfx::B2DHomMatrix aTransformationMatrix = GetViewTransformation();
+ aTransformedPoly.transform( aTransformationMatrix );
return aTransformedPoly;
}
@@ -1131,8 +1131,8 @@ basegfx::B2DPolyPolygon OutputDevice::LogicToPixel( const basegfx::B2DPolyPolygo
const MapMode& rMapMode ) const
{
basegfx::B2DPolyPolygon aTransformedPoly = rLogicPolyPoly;
- const basegfx::B2DHomMatrix& rTransformationMatrix = GetViewTransformation( rMapMode );
- aTransformedPoly.transform( rTransformationMatrix );
+ const basegfx::B2DHomMatrix aTransformationMatrix = GetViewTransformation( rMapMode );
+ aTransformedPoly.transform( aTransformationMatrix );
return aTransformedPoly;
}
@@ -1241,16 +1241,16 @@ tools::PolyPolygon OutputDevice::PixelToLogic( const tools::PolyPolygon& rDevice
basegfx::B2DPolyPolygon OutputDevice::PixelToLogic( const basegfx::B2DPolyPolygon& rPixelPolyPoly ) const
{
basegfx::B2DPolyPolygon aTransformedPoly = rPixelPolyPoly;
- const basegfx::B2DHomMatrix& rTransformationMatrix = GetInverseViewTransformation();
- aTransformedPoly.transform( rTransformationMatrix );
+ const basegfx::B2DHomMatrix aTransformationMatrix = GetInverseViewTransformation();
+ aTransformedPoly.transform( aTransformationMatrix );
return aTransformedPoly;
}
basegfx::B2DRectangle OutputDevice::PixelToLogic(const basegfx::B2DRectangle& rDeviceRect) const
{
basegfx::B2DRectangle aTransformedRect = rDeviceRect;
- const basegfx::B2DHomMatrix& rTransformationMatrix = GetInverseViewTransformation();
- aTransformedRect.transform(rTransformationMatrix);
+ const basegfx::B2DHomMatrix aTransformationMatrix = GetInverseViewTransformation();
+ aTransformedRect.transform(aTransformationMatrix);
return aTransformedRect;
}
@@ -1388,8 +1388,8 @@ basegfx::B2DPolygon OutputDevice::PixelToLogic( const basegfx::B2DPolygon& rPixe
const MapMode& rMapMode ) const
{
basegfx::B2DPolygon aTransformedPoly = rPixelPoly;
- const basegfx::B2DHomMatrix& rTransformationMatrix = GetInverseViewTransformation( rMapMode );
- aTransformedPoly.transform( rTransformationMatrix );
+ const basegfx::B2DHomMatrix aTransformationMatrix = GetInverseViewTransformation( rMapMode );
+ aTransformedPoly.transform( aTransformationMatrix );
return aTransformedPoly;
}
@@ -1397,8 +1397,8 @@ basegfx::B2DPolyPolygon OutputDevice::PixelToLogic( const basegfx::B2DPolyPolygo
const MapMode& rMapMode ) const
{
basegfx::B2DPolyPolygon aTransformedPoly = rPixelPolyPoly;
- const basegfx::B2DHomMatrix& rTransformationMatrix = GetInverseViewTransformation( rMapMode );
- aTransformedPoly.transform( rTransformationMatrix );
+ const basegfx::B2DHomMatrix aTransformationMatrix = GetInverseViewTransformation( rMapMode );
+ aTransformedPoly.transform( aTransformationMatrix );
return aTransformedPoly;
}
@@ -1598,7 +1598,7 @@ static tools::Long fn3(const tools::Long n1, const o3tl::Length eFrom, const o3t
const auto nResult = o3tl::convert(n1, eFrom, eTo, bOverflow);
if (bOverflow)
{
- const auto& [n2, n3] = o3tl::getConversionMulDiv(eFrom, eTo);
+ const auto [n2, n3] = o3tl::getConversionMulDiv(eFrom, eTo);
BigInt a4 = n1;
a4 *= n2;
@@ -1681,12 +1681,12 @@ Point OutputDevice::LogicToLogic( const Point& rPtSource,
if (rMapModeSource.IsSimple() && rMapModeDest.IsSimple())
{
- const auto& [eFrom, eTo] = getCorrectedUnit(eUnitSource, eUnitDest);
+ const auto [eFrom, eTo] = getCorrectedUnit(eUnitSource, eUnitDest);
return Point(fn3(rPtSource.X(), eFrom, eTo), fn3(rPtSource.Y(), eFrom, eTo));
}
else
{
- const auto& [aMapResSource, aMapResDest] = ENTER4( rMapModeSource, rMapModeDest );
+ const auto [aMapResSource, aMapResDest] = ENTER4( rMapModeSource, rMapModeDest );
return Point( fn5( rPtSource.X() + aMapResSource.mnMapOfsX,
aMapResSource.mnMapScNumX, aMapResDest.mnMapScDenomX,
@@ -1712,12 +1712,12 @@ Size OutputDevice::LogicToLogic( const Size& rSzSource,
if (rMapModeSource.IsSimple() && rMapModeDest.IsSimple())
{
- const auto& [eFrom, eTo] = getCorrectedUnit(eUnitSource, eUnitDest);
+ const auto [eFrom, eTo] = getCorrectedUnit(eUnitSource, eUnitDest);
return Size(fn3(rSzSource.Width(), eFrom, eTo), fn3(rSzSource.Height(), eFrom, eTo));
}
else
{
- const auto& [aMapResSource, aMapResDest] = ENTER4( rMapModeSource, rMapModeDest );
+ const auto [aMapResSource, aMapResDest] = ENTER4( rMapModeSource, rMapModeDest );
return Size( fn5( rSzSource.Width(),
aMapResSource.mnMapScNumX, aMapResDest.mnMapScDenomX,
@@ -1759,7 +1759,7 @@ basegfx::B2DHomMatrix OutputDevice::LogicToLogic(const MapMode& rMapModeSource,
if (rMapModeSource.IsSimple() && rMapModeDest.IsSimple())
{
- const auto& [eFrom, eTo] = getCorrectedUnit(eUnitSource, eUnitDest);
+ const auto [eFrom, eTo] = getCorrectedUnit(eUnitSource, eUnitDest);
const double fScaleFactor(eFrom == o3tl::Length::invalid || eTo == o3tl::Length::invalid
? std::numeric_limits<double>::quiet_NaN()
: o3tl::convert(1.0, eFrom, eTo));
@@ -1768,7 +1768,7 @@ basegfx::B2DHomMatrix OutputDevice::LogicToLogic(const MapMode& rMapModeSource,
}
else
{
- const auto& [aMapResSource, aMapResDest] = ENTER4(rMapModeSource, rMapModeDest);
+ const auto [aMapResSource, aMapResDest] = ENTER4(rMapModeSource, rMapModeDest);
const double fScaleFactorX((double(aMapResSource.mnMapScNumX) * double(aMapResDest.mnMapScDenomX)) / (double(aMapResSource.mnMapScDenomX) * double(aMapResDest.mnMapScNumX)));
const double fScaleFactorY((double(aMapResSource.mnMapScNumY) * double(aMapResDest.mnMapScDenomY)) / (double(aMapResSource.mnMapScDenomY) * double(aMapResDest.mnMapScNumY)));
@@ -1799,7 +1799,7 @@ tools::Rectangle OutputDevice::LogicToLogic( const tools::Rectangle& rRectSource
if (rMapModeSource.IsSimple() && rMapModeDest.IsSimple())
{
- const auto& [eFrom, eTo] = getCorrectedUnit(eUnitSource, eUnitDest);
+ const auto [eFrom, eTo] = getCorrectedUnit(eUnitSource, eUnitDest);
auto left = fn3(rRectSource.Left(), eFrom, eTo);
auto top = fn3(rRectSource.Top(), eFrom, eTo);
@@ -1812,7 +1812,7 @@ tools::Rectangle OutputDevice::LogicToLogic( const tools::Rectangle& rRectSource
}
else
{
- const auto& [aMapResSource, aMapResDest] = ENTER4( rMapModeSource, rMapModeDest );
+ const auto [aMapResSource, aMapResDest] = ENTER4( rMapModeSource, rMapModeDest );
auto left = fn5( rRectSource.Left() + aMapResSource.mnMapOfsX,
aMapResSource.mnMapScNumX, aMapResDest.mnMapScDenomX,
@@ -1852,7 +1852,7 @@ tools::Long OutputDevice::LogicToLogic( tools::Long nLongSource,
return nLongSource;
verifyUnitSourceDest( eUnitSource, eUnitDest );
- const auto& [eFrom, eTo] = getCorrectedUnit(eUnitSource, eUnitDest);
+ const auto [eFrom, eTo] = getCorrectedUnit(eUnitSource, eUnitDest);
return fn3(nLongSource, eFrom, eTo);
}
diff --git a/vcl/source/outdev/mask.cxx b/vcl/source/outdev/mask.cxx
index 004b248785b5..9a7b57c6b3bb 100644
--- a/vcl/source/outdev/mask.cxx
+++ b/vcl/source/outdev/mask.cxx
@@ -145,7 +145,7 @@ void OutputDevice::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
if( !mpAlphaVDev )
return;
- const Bitmap& rAlphaMask( rMask.CreateMask( rMaskColor ) );
+ const Bitmap aAlphaMask( rMask.CreateMask( rMaskColor ) );
// #i25167# Restrict mask painting to _opaque_ areas
// of the mask, otherwise we spoil areas where no
@@ -156,7 +156,7 @@ void OutputDevice::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
rDestSize,
rSrcPtPixel,
rSrcSizePixel,
- BitmapEx( rAlphaMask, rMask ) );
+ BitmapEx( aAlphaMask, rMask ) );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx
index 7968635362ad..b4d15cde9aaf 100644
--- a/vcl/source/treelist/svtabbx.cxx
+++ b/vcl/source/treelist/svtabbx.cxx
@@ -104,17 +104,17 @@ static void lcl_DumpEntryAndSiblings(tools::JsonWriter& rJsonWriter,
const SvLBoxContextBmp* pBmpItem = dynamic_cast<const SvLBoxContextBmp*>(&rItem);
if (pBmpItem)
{
- const OUString& rCollapsed = pBmpItem->GetBitmap1().GetStock();
- const OUString& rExpanded = pBmpItem->GetBitmap2().GetStock();
+ const OUString aCollapsed = pBmpItem->GetBitmap1().GetStock();
+ const OUString aExpanded = pBmpItem->GetBitmap2().GetStock();
// send identifier only, we will use svg icon
- if (!o3tl::trim(rCollapsed).empty() || !o3tl::trim(rExpanded).empty())
+ if (!o3tl::trim(aCollapsed).empty() || !o3tl::trim(aExpanded).empty())
{
auto aColumn = rJsonWriter.startStruct();
- if (!o3tl::trim(rCollapsed).empty())
- rJsonWriter.put("collapsed", rCollapsed);
- if (!o3tl::trim(rExpanded).empty())
- rJsonWriter.put("expanded", rExpanded);
+ if (!o3tl::trim(aCollapsed).empty())
+ rJsonWriter.put("collapsed", aCollapsed);
+ if (!o3tl::trim(aExpanded).empty())
+ rJsonWriter.put("expanded", aExpanded);
}
// custom bitmap - send png
else
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index ced6d530fc88..dddbe7741dea 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -732,15 +732,15 @@ void SystemWindow::SetWindowState(const vcl::WindowData& rData)
tools::Long nY = rData.y();
tools::Long nWidth = rData.width();
tools::Long nHeight = rData.height();
- const SalFrameGeometry& rGeom = pWindow->mpWindowImpl->mpFrame->GetGeometry();
+ const SalFrameGeometry aGeom = pWindow->mpWindowImpl->mpFrame->GetGeometry();
if( nX < 0 )
nX = 0;
- if( nX + nWidth > static_cast<tools::Long>(rGeom.width()) )
- nX = rGeom.width() - nWidth;
+ if( nX + nWidth > static_cast<tools::Long>(aGeom.width()) )
+ nX = aGeom.width() - nWidth;
if( nY < 0 )
nY = 0;
- if( nY + nHeight > static_cast<tools::Long>(rGeom.height()) )
- nY = rGeom.height() - nHeight;
+ if( nY + nHeight > static_cast<tools::Long>(aGeom.height()) )
+ nY = aGeom.height() - nHeight;
setPosSizePixel( nX, nY, nWidth, nHeight, nPosSize );
}
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index bf8a84eeebfd..06e3e4db76cb 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -2736,8 +2736,8 @@ void Window::setPosSizePixel( tools::Long nX, tools::Long nY,
OutputDevice *pParentOutDev = pWinParent->GetOutDev();
if( pParentOutDev->HasMirroredGraphics() )
{
- const SalFrameGeometry& aSysGeometry = mpWindowImpl->mpFrame->GetUnmirroredGeometry();
- const SalFrameGeometry& aParentSysGeometry =
+ const SalFrameGeometry aSysGeometry = mpWindowImpl->mpFrame->GetUnmirroredGeometry();
+ const SalFrameGeometry aParentSysGeometry =
pWinParent->mpWindowImpl->mpFrame->GetUnmirroredGeometry();
tools::Long myWidth = nOldWidth;
if( !myWidth )
diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx
index d6a95dfc8583..6de1fbd2e8e7 100644
--- a/vcl/unx/generic/app/wmadaptor.cxx
+++ b/vcl/unx/generic/app/wmadaptor.cxx
@@ -1138,15 +1138,15 @@ void NetWMAdaptor::setNetWMState( X11SalFrame* pFrame ) const
nCurrent = 0;
}
AbsoluteScreenPixelRectangle aPosSize = m_aWMWorkAreas[nCurrent];
- const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() );
- aPosSize = AbsoluteScreenPixelRectangle( AbsoluteScreenPixelPoint( aPosSize.Left() + rGeom.leftDecoration(),
- aPosSize.Top() + rGeom.topDecoration() ),
+ const SalFrameGeometry aGeom( pFrame->GetUnmirroredGeometry() );
+ aPosSize = AbsoluteScreenPixelRectangle( AbsoluteScreenPixelPoint( aPosSize.Left() + aGeom.leftDecoration(),
+ aPosSize.Top() + aGeom.topDecoration() ),
AbsoluteScreenPixelSize( aPosSize.GetWidth()
- - rGeom.leftDecoration()
- - rGeom.rightDecoration(),
+ - aGeom.leftDecoration()
+ - aGeom.rightDecoration(),
aPosSize.GetHeight()
- - rGeom.topDecoration()
- - rGeom.bottomDecoration() )
+ - aGeom.topDecoration()
+ - aGeom.bottomDecoration() )
);
pFrame->SetPosSize( aPosSize );
@@ -1226,15 +1226,15 @@ void GnomeWMAdaptor::setGnomeWMState( X11SalFrame* pFrame ) const
nCurrent = 0;
}
AbsoluteScreenPixelRectangle aPosSize = m_aWMWorkAreas[nCurrent];
- const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() );
- aPosSize = AbsoluteScreenPixelRectangle( AbsoluteScreenPixelPoint( aPosSize.Left() + rGeom.leftDecoration(),
- aPosSize.Top() + rGeom.topDecoration() ),
+ const SalFrameGeometry aGeom( pFrame->GetUnmirroredGeometry() );
+ aPosSize = AbsoluteScreenPixelRectangle( AbsoluteScreenPixelPoint( aPosSize.Left() + aGeom.leftDecoration(),
+ aPosSize.Top() + aGeom.topDecoration() ),
AbsoluteScreenPixelSize( aPosSize.GetWidth()
- - rGeom.leftDecoration()
- - rGeom.rightDecoration(),
+ - aGeom.leftDecoration()
+ - aGeom.rightDecoration(),
aPosSize.GetHeight()
- - rGeom.topDecoration()
- - rGeom.bottomDecoration() )
+ - aGeom.topDecoration()
+ - aGeom.bottomDecoration() )
);
pFrame->SetPosSize( aPosSize );
@@ -1423,7 +1423,7 @@ void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVert
pFrame->mbMaximizedVert = bVertical;
pFrame->mbMaximizedHorz = bHorizontal;
- const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() );
+ const SalFrameGeometry aGeom( pFrame->GetUnmirroredGeometry() );
// discard pending configure notifies for this frame
XSync( m_pDisplay, False );
@@ -1442,10 +1442,10 @@ void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVert
if( bHorizontal || bVertical )
{
AbsoluteScreenPixelSize aScreenSize( m_pSalDisplay->GetScreenSize( pFrame->GetScreenNumber() ) );
- AbsoluteScreenPixelPoint aTL( rGeom.leftDecoration(), rGeom.topDecoration() );
+ AbsoluteScreenPixelPoint aTL( aGeom.leftDecoration(), aGeom.topDecoration() );
if( m_pSalDisplay->IsXinerama() )
{
- AbsoluteScreenPixelPoint aMed( aTL.X() + rGeom.width()/2, aTL.Y() + rGeom.height()/2 );
+ AbsoluteScreenPixelPoint aMed( aTL.X() + aGeom.width()/2, aTL.Y() + aGeom.height()/2 );
const std::vector< AbsoluteScreenPixelRectangle >& rScreens = m_pSalDisplay->GetXineramaScreens();
for(const auto & rScreen : rScreens)
if( rScreen.Contains( aMed ) )
@@ -1456,12 +1456,12 @@ void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVert
}
}
AbsoluteScreenPixelRectangle aTarget( aTL,
- AbsoluteScreenPixelSize( aScreenSize.Width() - rGeom.leftDecoration() - rGeom.topDecoration(),
- aScreenSize.Height() - rGeom.topDecoration() - rGeom.bottomDecoration() )
+ AbsoluteScreenPixelSize( aScreenSize.Width() - aGeom.leftDecoration() - aGeom.topDecoration(),
+ aScreenSize.Height() - aGeom.topDecoration() - aGeom.bottomDecoration() )
);
const AbsoluteScreenPixelRectangle aReferenceGeometry = !pFrame->maRestorePosSize.IsEmpty() ?
- pFrame->maRestorePosSize : AbsoluteScreenPixelRectangle(rGeom.posSize());
+ pFrame->maRestorePosSize : AbsoluteScreenPixelRectangle(aGeom.posSize());
if( ! bHorizontal )
{
aTarget.SetSize({ aReferenceGeometry.GetWidth(), aTarget.GetHeight() });
@@ -1473,7 +1473,7 @@ void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVert
aTarget.SetTop(aReferenceGeometry.Top());
}
- AbsoluteScreenPixelRectangle aRestore(rGeom.posSize());
+ AbsoluteScreenPixelRectangle aRestore(aGeom.posSize());
if( pFrame->bMapped_ )
{
XSetInputFocus( m_pDisplay,
@@ -1502,8 +1502,8 @@ void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVert
{
pFrame->SetPosSize( pFrame->maRestorePosSize );
pFrame->maRestorePosSize = AbsoluteScreenPixelRectangle();
- pFrame->nWidth_ = rGeom.width();
- pFrame->nHeight_ = rGeom.height();
+ pFrame->nWidth_ = aGeom.width();
+ pFrame->nHeight_ = aGeom.height();
}
}
@@ -1565,9 +1565,9 @@ void NetWMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bV
pFrame->maRestorePosSize = AbsoluteScreenPixelRectangle();
else if( pFrame->maRestorePosSize.IsEmpty() )
{
- const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() );
+ const SalFrameGeometry aGeom( pFrame->GetUnmirroredGeometry() );
pFrame->maRestorePosSize =
- AbsoluteScreenPixelRectangle( AbsoluteScreenPixelPoint( rGeom.x(), rGeom.y() ), AbsoluteScreenPixelSize( rGeom.width(), rGeom.height() ) );
+ AbsoluteScreenPixelRectangle( AbsoluteScreenPixelPoint( aGeom.x(), aGeom.y() ), AbsoluteScreenPixelSize( aGeom.width(), aGeom.height() ) );
}
}
else
@@ -1619,9 +1619,9 @@ void GnomeWMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool
pFrame->maRestorePosSize = AbsoluteScreenPixelRectangle();
else if( pFrame->maRestorePosSize.IsEmpty() )
{
- const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() );
+ const SalFrameGeometry aGeom( pFrame->GetUnmirroredGeometry() );
pFrame->maRestorePosSize =
- AbsoluteScreenPixelRectangle( AbsoluteScreenPixelPoint( rGeom.x(), rGeom.y() ), AbsoluteScreenPixelSize( rGeom.width(), rGeom.height() ) );
+ AbsoluteScreenPixelRectangle( AbsoluteScreenPixelPoint( aGeom.x(), aGeom.y() ), AbsoluteScreenPixelSize( aGeom.width(), aGeom.height() ) );
}
}
else
@@ -1800,12 +1800,12 @@ int NetWMAdaptor::handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEv
pFrame->maRestorePosSize = AbsoluteScreenPixelRectangle();
else
{
- const SalFrameGeometry& rGeom = pFrame->GetUnmirroredGeometry();
+ const SalFrameGeometry aGeom = pFrame->GetUnmirroredGeometry();
// the current geometry may already be changed by the corresponding
// ConfigureNotify, but this cannot be helped
pFrame->maRestorePosSize =
- AbsoluteScreenPixelRectangle( AbsoluteScreenPixelPoint( rGeom.x(), rGeom.y() ),
- AbsoluteScreenPixelSize( rGeom.width(), rGeom.height() ) );
+ AbsoluteScreenPixelRectangle( AbsoluteScreenPixelPoint( aGeom.x(), aGeom.y() ),
+ AbsoluteScreenPixelSize( aGeom.width(), aGeom.height() ) );
}
}
else if( pEvent->atom == m_aWMAtoms[ NET_WM_DESKTOP ] )
@@ -1863,12 +1863,12 @@ int GnomeWMAdaptor::handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* p
pFrame->maRestorePosSize = AbsoluteScreenPixelRectangle();
else
{
- const SalFrameGeometry& rGeom = pFrame->GetUnmirroredGeometry();
+ const SalFrameGeometry aGeom = pFrame->GetUnmirroredGeometry();
// the current geometry may already be changed by the corresponding
// ConfigureNotify, but this cannot be helped
pFrame->maRestorePosSize =
- AbsoluteScreenPixelRectangle( AbsoluteScreenPixelPoint( rGeom.x(), rGeom.y() ),
- AbsoluteScreenPixelSize( rGeom.width(), rGeom.height() ) );
+ AbsoluteScreenPixelRectangle( AbsoluteScreenPixelPoint( aGeom.x(), aGeom.y() ),
+ AbsoluteScreenPixelSize( aGeom.width(), aGeom.height() ) );
}
}
else if( pEvent->atom == m_aWMAtoms[ NET_WM_DESKTOP ] )
diff --git a/vcl/unx/generic/gdi/freetypetextrender.cxx b/vcl/unx/generic/gdi/freetypetextrender.cxx
index b524a45ee73b..e5d3f3067dce 100644
--- a/vcl/unx/generic/gdi/freetypetextrender.cxx
+++ b/vcl/unx/generic/gdi/freetypetextrender.cxx
@@ -119,8 +119,8 @@ bool FreeTypeTextRenderImpl::AddTempDevFont(vcl::font::PhysicalFontCollection* p
int nFaceNum = rMgr.getFontFaceNumber(nFontId);
int nVariantNum = rMgr.getFontFaceVariation(nFontId);
- const OString& rFileName = rMgr.getFontFileSysPath(nFontId);
- rFreetypeManager.AddFontFile(rFileName, nFaceNum, nVariantNum, nFontId, aDFA);
+ const OString aFileName = rMgr.getFontFileSysPath(nFontId);
+ rFreetypeManager.AddFontFile(aFileName, nFaceNum, nVariantNum, nFontId, aDFA);
}
// announce new font to device's font list
@@ -154,8 +154,8 @@ void FreeTypeTextRenderImpl::GetDevFontList(vcl::font::PhysicalFontCollection* p
// inform FreetypeManager about this font provided by the PsPrint subsystem
FontAttributes aDFA = pFont->m_aFontAttributes;
aDFA.IncreaseQualityBy(4096);
- const OString& rFileName = rMgr.getFontFileSysPath(nFontId);
- rFreetypeManager.AddFontFile(rFileName, nFaceNum, nVariantNum, nFontId, aDFA);
+ const OString aFileName = rMgr.getFontFileSysPath(nFontId);
+ rFreetypeManager.AddFontFile(aFileName, nFaceNum, nVariantNum, nFontId, aDFA);
}
// announce glyphcache fonts
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index c18c74244cfd..a784061af6f0 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -445,9 +445,9 @@ void X11SalFrame::Init( SalFrameStyleFlags nSalFrameStyle, SalX11Screen nXScreen
{
// set a document position and size
// the first frame gets positioned by the window manager
- const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() );
- x = rGeom.x();
- y = rGeom.y();
+ const SalFrameGeometry aGeom( pFrame->GetUnmirroredGeometry() );
+ x = aGeom.x();
+ y = aGeom.y();
if( x+static_cast<int>(w)+40 <= static_cast<int>(aScreenSize.Width()) &&
y+static_cast<int>(h)+40 <= static_cast<int>(aScreenSize.Height())
)