diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-11-11 22:06:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-11-12 11:15:36 +0100 |
commit | 33c2a79f141cd20078f82dba5a9292dd6046df6e (patch) | |
tree | 389679e9164b6abe7c67996133ff15f5cc61ad0d | |
parent | e23be78a6a98c3eb4bef0d598369238ee1ec0cf5 (diff) |
clang-tidy: performance-unnecessary-copy-initialization in vcl
Change-Id: Idb09d0d256601fb3b9e822404b2f57f41d04d713
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176443
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
26 files changed, 40 insertions, 40 deletions
diff --git a/vcl/headless/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx index 6a56e343df70..1550f3cd898f 100644 --- a/vcl/headless/CairoCommon.cxx +++ b/vcl/headless/CairoCommon.cxx @@ -1214,7 +1214,7 @@ bool CairoCommon::drawPolyLine(const basegfx::B2DHomMatrix& rObjectToDevice, // MM01 checked/verified for Cairo for (sal_uInt32 a(0); a < aPolyPolygonLine.count(); a++) { - const basegfx::B2DPolygon aPolyLine(aPolyPolygonLine.getB2DPolygon(a)); + const basegfx::B2DPolygon& aPolyLine(aPolyPolygonLine.getB2DPolygon(a)); if (!bNoJoin) { diff --git a/vcl/qt5/QtFilePicker.cxx b/vcl/qt5/QtFilePicker.cxx index 369e26054698..9ab02ccc35cc 100644 --- a/vcl/qt5/QtFilePicker.cxx +++ b/vcl/qt5/QtFilePicker.cxx @@ -386,7 +386,7 @@ void SAL_CALL QtFilePicker::appendFilterGroup(const OUString& rGroupTitle, const sal_uInt16 length = filters.getLength(); for (sal_uInt16 i = 0; i < length; ++i) { - beans::StringPair aPair = filters[i]; + const beans::StringPair& aPair = filters[i]; appendFilter(aPair.First, aPair.Second); } } diff --git a/vcl/qt5/QtGraphics_GDI.cxx b/vcl/qt5/QtGraphics_GDI.cxx index bbfde8e1f22e..c49d82c53e0d 100644 --- a/vcl/qt5/QtGraphics_GDI.cxx +++ b/vcl/qt5/QtGraphics_GDI.cxx @@ -383,7 +383,7 @@ bool QtGraphicsBackend::drawPolyLine(const basegfx::B2DHomMatrix& rObjectToDevic // but this NEEDS to be checked/verified for (sal_uInt32 a(0); a < aPolyPolygonLine.count(); a++) { - const basegfx::B2DPolygon aPolyLine(aPolyPolygonLine.getB2DPolygon(a)); + const basegfx::B2DPolygon& aPolyLine(aPolyPolygonLine.getB2DPolygon(a)); AddPolygonToPath(aPath, aPolyLine, aPolyLine.isClosed(), !getAntiAlias(), true); } diff --git a/vcl/source/bitmap/BitmapDisabledImageFilter.cxx b/vcl/source/bitmap/BitmapDisabledImageFilter.cxx index 396d0e0a2af7..829ddb7c01fa 100644 --- a/vcl/source/bitmap/BitmapDisabledImageFilter.cxx +++ b/vcl/source/bitmap/BitmapDisabledImageFilter.cxx @@ -26,7 +26,7 @@ BitmapEx BitmapDisabledImageFilter::execute(BitmapEx const& rBitmapEx) const Bitmap aGrey(aSize, ePixelFormat, pPal); BitmapScopedWriteAccess pGrey(aGrey); - Bitmap aReadBitmap(rBitmapEx.GetBitmap()); + const Bitmap& aReadBitmap(rBitmapEx.GetBitmap()); BitmapScopedReadAccess pRead(aReadBitmap); if (pRead && pGrey) { diff --git a/vcl/source/bitmap/BitmapFilterStackBlur.cxx b/vcl/source/bitmap/BitmapFilterStackBlur.cxx index 09a44cafb59c..59aadf971485 100644 --- a/vcl/source/bitmap/BitmapFilterStackBlur.cxx +++ b/vcl/source/bitmap/BitmapFilterStackBlur.cxx @@ -603,7 +603,7 @@ BitmapFilterStackBlur::~BitmapFilterStackBlur() {} BitmapEx BitmapFilterStackBlur::execute(BitmapEx const& rBitmapEx) const { - Bitmap aBitmap = rBitmapEx.GetBitmap(); + const Bitmap& aBitmap = rBitmapEx.GetBitmap(); Bitmap result = filter(aBitmap); return BitmapEx(result, rBitmapEx.GetAlphaMask()); } diff --git a/vcl/source/bitmap/BitmapLightenFilter.cxx b/vcl/source/bitmap/BitmapLightenFilter.cxx index a5c4f71e6388..19db81dab40d 100644 --- a/vcl/source/bitmap/BitmapLightenFilter.cxx +++ b/vcl/source/bitmap/BitmapLightenFilter.cxx @@ -17,7 +17,7 @@ BitmapEx BitmapLightenFilter::execute(BitmapEx const& rBitmapEx) const { const Size aSize(rBitmapEx.GetSizePixel()); - Bitmap aBitmap(rBitmapEx.GetBitmap()); + const Bitmap& aBitmap(rBitmapEx.GetBitmap()); Bitmap aDarkBitmap(aSize, vcl::PixelFormat::N24_BPP); BitmapScopedReadAccess pRead(aBitmap); diff --git a/vcl/source/bitmap/BitmapMaskToAlphaFilter.cxx b/vcl/source/bitmap/BitmapMaskToAlphaFilter.cxx index acae8f516edf..648394e178f3 100644 --- a/vcl/source/bitmap/BitmapMaskToAlphaFilter.cxx +++ b/vcl/source/bitmap/BitmapMaskToAlphaFilter.cxx @@ -20,7 +20,7 @@ BitmapEx BitmapMaskToAlphaFilter::execute(BitmapEx const& rBitmapEx) const { const Size aSize(rBitmapEx.GetSizePixel()); - Bitmap aBitmap(rBitmapEx.GetBitmap()); + const Bitmap& aBitmap(rBitmapEx.GetBitmap()); Bitmap aOutBitmap(aSize, vcl::PixelFormat::N8_BPP, &Bitmap::GetGreyPalette(256)); BitmapScopedReadAccess pRead(aBitmap); diff --git a/vcl/source/bitmap/BitmapShadowFilter.cxx b/vcl/source/bitmap/BitmapShadowFilter.cxx index 00174fd67ec1..fd5c7ea45783 100644 --- a/vcl/source/bitmap/BitmapShadowFilter.cxx +++ b/vcl/source/bitmap/BitmapShadowFilter.cxx @@ -14,7 +14,7 @@ BitmapEx BitmapShadowFilter::execute(BitmapEx const& rBitmapEx) const { - BitmapEx aBitmapEx(rBitmapEx); + const BitmapEx& aBitmapEx(rBitmapEx); BitmapScopedWriteAccess pWriteAccess(const_cast<Bitmap&>(aBitmapEx.GetBitmap())); if (!pWriteAccess) diff --git a/vcl/source/bitmap/BitmapTools.cxx b/vcl/source/bitmap/BitmapTools.cxx index 01a8ff3385d7..e55575e8b934 100644 --- a/vcl/source/bitmap/BitmapTools.cxx +++ b/vcl/source/bitmap/BitmapTools.cxx @@ -289,8 +289,8 @@ BitmapEx CreateFromData( RawBitmap&& rawBitmap ) void fillWithData(sal_uInt8* pData, BitmapEx const& rBitmapEx) { - Bitmap aBitmap = rBitmapEx.GetBitmap(); - AlphaMask aAlphaMask = rBitmapEx.GetAlphaMask(); + const Bitmap& aBitmap = rBitmapEx.GetBitmap(); + const AlphaMask& aAlphaMask = rBitmapEx.GetAlphaMask(); BitmapScopedReadAccess aReadAccessBitmap(aBitmap); BitmapScopedReadAccess aReadAccessAlpha(aAlphaMask); @@ -413,7 +413,7 @@ BitmapEx CanvasTransformBitmap( const BitmapEx& rBitmap, return BitmapEx(); const Size aBmpSize( rBitmap.GetSizePixel() ); - Bitmap aSrcBitmap( rBitmap.GetBitmap() ); + const Bitmap& aSrcBitmap( rBitmap.GetBitmap() ); Bitmap aSrcAlpha; // differentiate mask and alpha channel (on-off @@ -731,7 +731,7 @@ static bool readAlpha( BitmapReadAccess const * pAlphaReadAcc, tools::Long nY, c **/ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, unsigned char*& data, bool& bHasAlpha, tools::Long& rnWidth, tools::Long& rnHeight ) { - AlphaMask aAlpha = aBmpEx.GetAlphaMask(); + const AlphaMask& aAlpha = aBmpEx.GetAlphaMask(); BitmapScopedReadAccess pBitmapReadAcc( aBitmap ); BitmapScopedReadAccess pAlphaReadAcc; @@ -1022,7 +1022,7 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un uno::Sequence< sal_Int8 > CanvasExtractBitmapData(BitmapEx const & rBitmapEx, const geometry::IntegerRectangle2D& rect) { - Bitmap aBitmap( rBitmapEx.GetBitmap() ); + const Bitmap& aBitmap( rBitmapEx.GetBitmap() ); Bitmap aAlpha( rBitmapEx.GetAlphaMask().GetBitmap() ); BitmapScopedReadAccess pReadAccess( aBitmap ); @@ -1107,7 +1107,7 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un if(!rBitmapEx.IsAlpha()) { - Bitmap aBitmap(rBitmapEx.GetBitmap()); + const Bitmap& aBitmap(rBitmapEx.GetBitmap()); if(8 == aBitmap.GetSizePixel().Width() && 8 == aBitmap.GetSizePixel().Height()) { @@ -1220,7 +1220,7 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un bool convertBitmap32To24Plus8(BitmapEx const & rInput, BitmapEx & rResult) { - Bitmap aBitmap(rInput.GetBitmap()); + const Bitmap& aBitmap(rInput.GetBitmap()); if (aBitmap.getPixelFormat() != vcl::PixelFormat::N32_BPP) return false; diff --git a/vcl/source/filter/eps/eps.cxx b/vcl/source/filter/eps/eps.cxx index 22131a80a03e..ccd62939fd56 100644 --- a/vcl/source/filter/eps/eps.cxx +++ b/vcl/source/filter/eps/eps.cxx @@ -819,7 +819,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) Bitmap aBitmap( aBitmapEx.GetBitmap() ); if ( mbGrayScale ) aBitmap.Convert( BmpConversion::N8BitGreys ); - AlphaMask aMask( aBitmapEx.GetAlphaMask() ); + const AlphaMask& aMask( aBitmapEx.GetAlphaMask() ); Point aPoint( static_cast<const MetaBmpExAction*>(pMA)->GetPoint() ); Size aSize( rVDev.PixelToLogic( aBitmap.GetSizePixel() ) ); ImplBmp( &aBitmap, &aMask, aPoint, aSize.Width(), aSize.Height() ); @@ -832,7 +832,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) Bitmap aBitmap( aBitmapEx.GetBitmap() ); if ( mbGrayScale ) aBitmap.Convert( BmpConversion::N8BitGreys ); - AlphaMask aMask( aBitmapEx.GetAlphaMask() ); + const AlphaMask& aMask( aBitmapEx.GetAlphaMask() ); Point aPoint = static_cast<const MetaBmpExScaleAction*>(pMA)->GetPoint(); Size aSize( static_cast<const MetaBmpExScaleAction*>(pMA)->GetSize() ); ImplBmp( &aBitmap, &aMask, aPoint, aSize.Width(), aSize.Height() ); @@ -898,7 +898,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) if ( aWallpaper.IsBitmap() ) { BitmapEx aBitmapEx = aWallpaper.GetBitmap(); - Bitmap aBitmap( aBitmapEx.GetBitmap() ); + const Bitmap& aBitmap( aBitmapEx.GetBitmap() ); if ( aBitmapEx.IsAlpha() ) { if ( aWallpaper.IsGradient() ) @@ -907,7 +907,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) // gradient action } - AlphaMask aMask( aBitmapEx.GetAlphaMask() ); + const AlphaMask& aMask( aBitmapEx.GetAlphaMask() ); ImplBmp( &aBitmap, &aMask, Point( aRect.Left(), aRect.Top() ), aRect.GetWidth(), aRect.GetHeight() ); } else diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index cab6032d187c..c265c16866af 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -1545,7 +1545,7 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, std::u16string_vi rOStm.SetVersion( nVersion ); // #i119735# just use GetGDIMetaFile, it will create a buffered version of contained bitmap now automatically - GDIMetaFile aMTF(aGraphic.GetGDIMetaFile()); + const GDIMetaFile& aMTF(aGraphic.GetGDIMetaFile()); SvmWriter aWriter( rOStm ); aWriter.Write( aMTF ); diff --git a/vcl/source/filter/svm/SvmWriter.cxx b/vcl/source/filter/svm/SvmWriter.cxx index ca0832dc2d63..0720d4b27f9c 100644 --- a/vcl/source/filter/svm/SvmWriter.cxx +++ b/vcl/source/filter/svm/SvmWriter.cxx @@ -1380,7 +1380,7 @@ void SvmWriter::FloatTransparentHandler(const MetaFloatTransparentAction* pActio VersionCompatWrite aCompat(mrStream, bSVG ? 2 : 1); SvmWriter aWriter(mrStream); - GDIMetaFile aMtf = pAction->GetGDIMetaFile(); + const GDIMetaFile& aMtf = pAction->GetGDIMetaFile(); aWriter.Write(aMtf); TypeSerializer aSerializer(mrStream); aSerializer.writePoint(pAction->GetPoint()); @@ -1415,7 +1415,7 @@ void SvmWriter::EPSHandler(const MetaEPSAction* pAction) aSerializer.writeSize(pAction->GetSize()); SvmWriter aWriter(mrStream); - GDIMetaFile aMtf = pAction->GetSubstitute(); + const GDIMetaFile& aMtf = pAction->GetSubstitute(); aWriter.Write(aMtf); } diff --git a/vcl/source/filter/webp/writer.cxx b/vcl/source/filter/webp/writer.cxx index da20e2dcc18e..cd63cd2d2786 100644 --- a/vcl/source/filter/webp/writer.cxx +++ b/vcl/source/filter/webp/writer.cxx @@ -92,7 +92,7 @@ static bool writeWebp(SvStream& rStream, const BitmapEx& bitmapEx, bool lossless // Apparently libwebp needs the entire image data at once in WebPPicture, // so allocate it and copy there. - Bitmap bitmap(bitmapEx.GetBitmap()); + const Bitmap& bitmap(bitmapEx.GetBitmap()); AlphaMask bitmapAlpha; if (bitmapEx.IsAlpha()) bitmapAlpha = bitmapEx.GetAlphaMask(); diff --git a/vcl/source/gdi/TypeSerializer.cxx b/vcl/source/gdi/TypeSerializer.cxx index 4a0a0bfba118..6c1ae34e9de2 100644 --- a/vcl/source/gdi/TypeSerializer.cxx +++ b/vcl/source/gdi/TypeSerializer.cxx @@ -354,7 +354,7 @@ void TypeSerializer::writeGraphic(const Graphic& rGraphic) case GraphicType::Bitmap: { - auto pVectorGraphicData = aGraphic.getVectorGraphicData(); + const auto& pVectorGraphicData = aGraphic.getVectorGraphicData(); if (pVectorGraphicData) { // stream out Vector Graphic defining data (length, byte array and evtl. path) diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index 06b033709941..534a72350f21 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -200,7 +200,7 @@ Graphic::Graphic(const Image& rImage) // FIXME: should really defer the BitmapEx load. : mxImpGraphic(new ImpGraphic(rImage.GetBitmapEx())) { - OUString aStock = rImage.GetStock(); + const OUString& aStock = rImage.GetStock(); if (aStock.getLength()) mxImpGraphic->setOriginURL("private:graphicrepository/" + aStock); } diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index de1b0492bd28..347dd5dc651b 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -676,7 +676,7 @@ const GDIMetaFile& ImpGraphic::getGDIMetaFile() const if (1 == aSequence.size()) { // try to cast to MetafileAccessor implementation - const css::uno::Reference< css::graphic::XPrimitive2D > xReference(aSequence[0]); + const css::uno::Reference< css::graphic::XPrimitive2D >& xReference(aSequence[0]); auto pUnoPrimitive = static_cast< const drawinglayer::primitive2d::UnoPrimitive2D* >(xReference.get()); if (pUnoPrimitive) { diff --git a/vcl/source/gdi/mtfxmldump.cxx b/vcl/source/gdi/mtfxmldump.cxx index 3bd60f8ef11f..dee6bb098e5e 100644 --- a/vcl/source/gdi/mtfxmldump.cxx +++ b/vcl/source/gdi/mtfxmldump.cxx @@ -594,7 +594,7 @@ OString toHexString(const std::vector<unsigned char>& a) void writeBitmapContentChecksum(tools::XmlWriter& rWriter, Bitmap const& rBitmap) { - Bitmap aBitmap(rBitmap); + const Bitmap& aBitmap(rBitmap); comphelper::Hash aHashEngine(comphelper::HashType::SHA1); BitmapScopedReadAccess pReadAccess(aBitmap); @@ -659,7 +659,7 @@ void MetafileXmlDump::dump(const GDIMetaFile& rMetaFile, SvStream& rStream) void MetafileXmlDump::writeXml(const GDIMetaFile& rMetaFile, tools::XmlWriter& rWriter) { - MapMode aMtfMapMode = rMetaFile.GetPrefMapMode(); + const MapMode& aMtfMapMode = rMetaFile.GetPrefMapMode(); rWriter.attribute("mapunit", convertMapUnitToString(aMtfMapMode.GetMapUnit())); writePoint(rWriter, aMtfMapMode.GetOrigin()); rWriter.attribute("scalex", convertFractionToString(aMtfMapMode.GetScaleX())); diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index a06dbdb291d5..5c556d3bc726 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -497,7 +497,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa xVDev->EnableMapMode( false ); AlphaMask aAlpha(xVDev->GetBitmap(Point(), xVDev->GetOutputSizePixel())); - AlphaMask aPaintAlpha(aPaint.GetAlphaMask()); + const AlphaMask& aPaintAlpha(aPaint.GetAlphaMask()); // The alpha mask is inverted from what is // expected so invert it again. To test this // code, export to PDF the transparent shapes, diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index ce3e3786a450..9833aa125771 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -203,7 +203,7 @@ void Printer::DrawDeviceBitmapEx( const Point& rDestPt, const Size& rDestSize, } else { - Bitmap aBmp( rBmpEx.GetBitmap() ); + const Bitmap& aBmp( rBmpEx.GetBitmap() ); ImplPrintTransparent( aBmp, rDestPt, rDestSize, rSrcPtPixel, rSrcSizePixel ); } } @@ -842,7 +842,7 @@ Printer::Printer( const JobSetup& rJobSetup ) { ImplInitData(); const ImplJobSetup& rConstData = rJobSetup.ImplGetConstData(); - OUString aDriver = rConstData.GetDriver(); + const OUString& aDriver = rConstData.GetDriver(); SalPrinterQueueInfo* pInfo = ImplGetQueueInfo( rConstData.GetPrinterName(), &aDriver ); if ( pInfo ) @@ -1086,7 +1086,7 @@ bool Printer::SetPrinterProps( const Printer* pPrinter ) } // Construct new printer - OUString aDriver = pPrinter->GetDriverName(); + const OUString& aDriver = pPrinter->GetDriverName(); SalPrinterQueueInfo* pInfo = ImplGetQueueInfo( pPrinter->GetName(), &aDriver ); if ( pInfo ) { diff --git a/vcl/source/graphic/UnoGraphic.cxx b/vcl/source/graphic/UnoGraphic.cxx index b91d6ad9de09..e6d2b6b8f905 100644 --- a/vcl/source/graphic/UnoGraphic.cxx +++ b/vcl/source/graphic/UnoGraphic.cxx @@ -232,7 +232,7 @@ uno::Reference< graphic::XGraphic > SAL_CALL Graphic::applyDuotone( ::Graphic aReturnGraphic; BitmapEx aBitmapEx( aGraphic.GetBitmapEx() ); - AlphaMask aMask( aBitmapEx.GetAlphaMask() ); + const AlphaMask& aMask( aBitmapEx.GetAlphaMask() ); BitmapEx aTmpBmpEx(aBitmapEx.GetBitmap()); BitmapFilter::Filter(aTmpBmpEx, diff --git a/vcl/source/outdev/background.cxx b/vcl/source/outdev/background.cxx index 7c07367a82b4..d73cb786682d 100644 --- a/vcl/source/outdev/background.cxx +++ b/vcl/source/outdev/background.cxx @@ -55,7 +55,7 @@ void OutputDevice::SetBackground( const Wallpaper& rBackground ) } else if( rBackground.IsBitmap()) { - BitmapEx bitmap = rBackground.GetBitmap(); + const BitmapEx& bitmap = rBackground.GetBitmap(); if( bitmap.IsAlpha()) mpAlphaVDev->SetBackground( Wallpaper( BitmapEx( bitmap.GetAlphaMask().GetBitmap() ) ) ); else diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx index c98f84823c67..a1e965f3a177 100644 --- a/vcl/source/outdev/transparent.cxx +++ b/vcl/source/outdev/transparent.cxx @@ -663,7 +663,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, xVDev->EnableMapMode(false); AlphaMask aAlpha(xVDev->GetBitmap(aPoint, xVDev->GetOutputSizePixel())); - AlphaMask aPaintAlpha(aPaint.GetAlphaMask()); + const AlphaMask& aPaintAlpha(aPaint.GetAlphaMask()); // The alpha mask is inverted from what // is expected so invert it again aAlpha.Invert(); // convert to alpha @@ -700,7 +700,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, xVDev->EnableMapMode( false ); AlphaMask aAlpha(xVDev->GetBitmap(Point(), xVDev->GetOutputSizePixel())); - AlphaMask aPaintAlpha(aPaint.GetAlphaMask()); + const AlphaMask& aPaintAlpha(aPaint.GetAlphaMask()); // The alpha mask is inverted from what // is expected so invert it again aAlpha.Invert(); // convert to alpha diff --git a/vcl/source/window/NotebookBarAddonsMerger.cxx b/vcl/source/window/NotebookBarAddonsMerger.cxx index b7027d9d468f..df744aeca84b 100644 --- a/vcl/source/window/NotebookBarAddonsMerger.cxx +++ b/vcl/source/window/NotebookBarAddonsMerger.cxx @@ -156,7 +156,7 @@ void MergeNotebookBarMenuAddons(Menu* pPopupMenu, sal_Int16 nItemId, const OUStr AddonNotebookBarItem aAddonNotebookBarItem; Image sImage; MenuItemBits nBits = MenuItemBits::ICON; - const css::uno::Sequence<css::beans::PropertyValue> pExtension = aExtension[nSecIdx]; + const css::uno::Sequence<css::beans::PropertyValue>& pExtension = aExtension[nSecIdx]; GetAddonNotebookBarItem(pExtension, aAddonNotebookBarItem); diff --git a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx index 3dcc32a4c88e..446a2a217a6f 100644 --- a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx @@ -966,7 +966,7 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute() Sequence < OUString > aPathSeq = getFiles(); if( aPathSeq.getLength() == 1 ) { - OUString sFileName = aPathSeq[0]; + const OUString& sFileName = aPathSeq[0]; if (::utl::UCBContentHelper::Exists(sFileName)) { INetURLObject aFileObj(sFileName); diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 70d595ef3dba..8ae81f64da1b 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -4917,7 +4917,7 @@ namespace { Image aImage(rImage); - OUString sStock(aImage.GetStock()); + const OUString& sStock(aImage.GetStock()); if (!sStock.isEmpty()) return load_icon_by_name(sStock); diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 0f89a68c1156..d5094cd9fea6 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -1404,7 +1404,7 @@ public: rDev.DrawBitmap(aBelow, aGrey); aBelow.Move(aGrey.GetSizePixel().Width(),0); - BitmapEx aGreyMask(aSrc); + const BitmapEx& aGreyMask(aSrc); rDev.DrawBitmapEx(aBelow, aGreyMask); aLocation.Move(aSrc.GetSizePixel().Width()*6,0); |