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
This commit is contained in:
Noel Grandin 2024-11-11 22:06:41 +02:00
parent e23be78a6a
commit 33c2a79f14
26 changed files with 40 additions and 40 deletions

View File

@ -1214,7 +1214,7 @@ bool CairoCommon::drawPolyLine(const basegfx::B2DHomMatrix& rObjectToDevice,
// MM01 checked/verified for Cairo // MM01 checked/verified for Cairo
for (sal_uInt32 a(0); a < aPolyPolygonLine.count(); a++) 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) if (!bNoJoin)
{ {

View File

@ -386,7 +386,7 @@ void SAL_CALL QtFilePicker::appendFilterGroup(const OUString& rGroupTitle,
const sal_uInt16 length = filters.getLength(); const sal_uInt16 length = filters.getLength();
for (sal_uInt16 i = 0; i < length; ++i) for (sal_uInt16 i = 0; i < length; ++i)
{ {
beans::StringPair aPair = filters[i]; const beans::StringPair& aPair = filters[i];
appendFilter(aPair.First, aPair.Second); appendFilter(aPair.First, aPair.Second);
} }
} }

View File

@ -383,7 +383,7 @@ bool QtGraphicsBackend::drawPolyLine(const basegfx::B2DHomMatrix& rObjectToDevic
// but this NEEDS to be checked/verified // but this NEEDS to be checked/verified
for (sal_uInt32 a(0); a < aPolyPolygonLine.count(); a++) 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); AddPolygonToPath(aPath, aPolyLine, aPolyLine.isClosed(), !getAntiAlias(), true);
} }

View File

@ -26,7 +26,7 @@ BitmapEx BitmapDisabledImageFilter::execute(BitmapEx const& rBitmapEx) const
Bitmap aGrey(aSize, ePixelFormat, pPal); Bitmap aGrey(aSize, ePixelFormat, pPal);
BitmapScopedWriteAccess pGrey(aGrey); BitmapScopedWriteAccess pGrey(aGrey);
Bitmap aReadBitmap(rBitmapEx.GetBitmap()); const Bitmap& aReadBitmap(rBitmapEx.GetBitmap());
BitmapScopedReadAccess pRead(aReadBitmap); BitmapScopedReadAccess pRead(aReadBitmap);
if (pRead && pGrey) if (pRead && pGrey)
{ {

View File

@ -603,7 +603,7 @@ BitmapFilterStackBlur::~BitmapFilterStackBlur() {}
BitmapEx BitmapFilterStackBlur::execute(BitmapEx const& rBitmapEx) const BitmapEx BitmapFilterStackBlur::execute(BitmapEx const& rBitmapEx) const
{ {
Bitmap aBitmap = rBitmapEx.GetBitmap(); const Bitmap& aBitmap = rBitmapEx.GetBitmap();
Bitmap result = filter(aBitmap); Bitmap result = filter(aBitmap);
return BitmapEx(result, rBitmapEx.GetAlphaMask()); return BitmapEx(result, rBitmapEx.GetAlphaMask());
} }

View File

@ -17,7 +17,7 @@ BitmapEx BitmapLightenFilter::execute(BitmapEx const& rBitmapEx) const
{ {
const Size aSize(rBitmapEx.GetSizePixel()); const Size aSize(rBitmapEx.GetSizePixel());
Bitmap aBitmap(rBitmapEx.GetBitmap()); const Bitmap& aBitmap(rBitmapEx.GetBitmap());
Bitmap aDarkBitmap(aSize, vcl::PixelFormat::N24_BPP); Bitmap aDarkBitmap(aSize, vcl::PixelFormat::N24_BPP);
BitmapScopedReadAccess pRead(aBitmap); BitmapScopedReadAccess pRead(aBitmap);

View File

@ -20,7 +20,7 @@ BitmapEx BitmapMaskToAlphaFilter::execute(BitmapEx const& rBitmapEx) const
{ {
const Size aSize(rBitmapEx.GetSizePixel()); const Size aSize(rBitmapEx.GetSizePixel());
Bitmap aBitmap(rBitmapEx.GetBitmap()); const Bitmap& aBitmap(rBitmapEx.GetBitmap());
Bitmap aOutBitmap(aSize, vcl::PixelFormat::N8_BPP, &Bitmap::GetGreyPalette(256)); Bitmap aOutBitmap(aSize, vcl::PixelFormat::N8_BPP, &Bitmap::GetGreyPalette(256));
BitmapScopedReadAccess pRead(aBitmap); BitmapScopedReadAccess pRead(aBitmap);

View File

@ -14,7 +14,7 @@
BitmapEx BitmapShadowFilter::execute(BitmapEx const& rBitmapEx) const BitmapEx BitmapShadowFilter::execute(BitmapEx const& rBitmapEx) const
{ {
BitmapEx aBitmapEx(rBitmapEx); const BitmapEx& aBitmapEx(rBitmapEx);
BitmapScopedWriteAccess pWriteAccess(const_cast<Bitmap&>(aBitmapEx.GetBitmap())); BitmapScopedWriteAccess pWriteAccess(const_cast<Bitmap&>(aBitmapEx.GetBitmap()));
if (!pWriteAccess) if (!pWriteAccess)

View File

@ -289,8 +289,8 @@ BitmapEx CreateFromData( RawBitmap&& rawBitmap )
void fillWithData(sal_uInt8* pData, BitmapEx const& rBitmapEx) void fillWithData(sal_uInt8* pData, BitmapEx const& rBitmapEx)
{ {
Bitmap aBitmap = rBitmapEx.GetBitmap(); const Bitmap& aBitmap = rBitmapEx.GetBitmap();
AlphaMask aAlphaMask = rBitmapEx.GetAlphaMask(); const AlphaMask& aAlphaMask = rBitmapEx.GetAlphaMask();
BitmapScopedReadAccess aReadAccessBitmap(aBitmap); BitmapScopedReadAccess aReadAccessBitmap(aBitmap);
BitmapScopedReadAccess aReadAccessAlpha(aAlphaMask); BitmapScopedReadAccess aReadAccessAlpha(aAlphaMask);
@ -413,7 +413,7 @@ BitmapEx CanvasTransformBitmap( const BitmapEx& rBitmap,
return BitmapEx(); return BitmapEx();
const Size aBmpSize( rBitmap.GetSizePixel() ); const Size aBmpSize( rBitmap.GetSizePixel() );
Bitmap aSrcBitmap( rBitmap.GetBitmap() ); const Bitmap& aSrcBitmap( rBitmap.GetBitmap() );
Bitmap aSrcAlpha; Bitmap aSrcAlpha;
// differentiate mask and alpha channel (on-off // 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 ) 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 pBitmapReadAcc( aBitmap );
BitmapScopedReadAccess pAlphaReadAcc; 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) 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() ); Bitmap aAlpha( rBitmapEx.GetAlphaMask().GetBitmap() );
BitmapScopedReadAccess pReadAccess( aBitmap ); BitmapScopedReadAccess pReadAccess( aBitmap );
@ -1107,7 +1107,7 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un
if(!rBitmapEx.IsAlpha()) if(!rBitmapEx.IsAlpha())
{ {
Bitmap aBitmap(rBitmapEx.GetBitmap()); const Bitmap& aBitmap(rBitmapEx.GetBitmap());
if(8 == aBitmap.GetSizePixel().Width() && 8 == aBitmap.GetSizePixel().Height()) 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) bool convertBitmap32To24Plus8(BitmapEx const & rInput, BitmapEx & rResult)
{ {
Bitmap aBitmap(rInput.GetBitmap()); const Bitmap& aBitmap(rInput.GetBitmap());
if (aBitmap.getPixelFormat() != vcl::PixelFormat::N32_BPP) if (aBitmap.getPixelFormat() != vcl::PixelFormat::N32_BPP)
return false; return false;

View File

@ -819,7 +819,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
Bitmap aBitmap( aBitmapEx.GetBitmap() ); Bitmap aBitmap( aBitmapEx.GetBitmap() );
if ( mbGrayScale ) if ( mbGrayScale )
aBitmap.Convert( BmpConversion::N8BitGreys ); aBitmap.Convert( BmpConversion::N8BitGreys );
AlphaMask aMask( aBitmapEx.GetAlphaMask() ); const AlphaMask& aMask( aBitmapEx.GetAlphaMask() );
Point aPoint( static_cast<const MetaBmpExAction*>(pMA)->GetPoint() ); Point aPoint( static_cast<const MetaBmpExAction*>(pMA)->GetPoint() );
Size aSize( rVDev.PixelToLogic( aBitmap.GetSizePixel() ) ); Size aSize( rVDev.PixelToLogic( aBitmap.GetSizePixel() ) );
ImplBmp( &aBitmap, &aMask, aPoint, aSize.Width(), aSize.Height() ); ImplBmp( &aBitmap, &aMask, aPoint, aSize.Width(), aSize.Height() );
@ -832,7 +832,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
Bitmap aBitmap( aBitmapEx.GetBitmap() ); Bitmap aBitmap( aBitmapEx.GetBitmap() );
if ( mbGrayScale ) if ( mbGrayScale )
aBitmap.Convert( BmpConversion::N8BitGreys ); aBitmap.Convert( BmpConversion::N8BitGreys );
AlphaMask aMask( aBitmapEx.GetAlphaMask() ); const AlphaMask& aMask( aBitmapEx.GetAlphaMask() );
Point aPoint = static_cast<const MetaBmpExScaleAction*>(pMA)->GetPoint(); Point aPoint = static_cast<const MetaBmpExScaleAction*>(pMA)->GetPoint();
Size aSize( static_cast<const MetaBmpExScaleAction*>(pMA)->GetSize() ); Size aSize( static_cast<const MetaBmpExScaleAction*>(pMA)->GetSize() );
ImplBmp( &aBitmap, &aMask, aPoint, aSize.Width(), aSize.Height() ); ImplBmp( &aBitmap, &aMask, aPoint, aSize.Width(), aSize.Height() );
@ -898,7 +898,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
if ( aWallpaper.IsBitmap() ) if ( aWallpaper.IsBitmap() )
{ {
BitmapEx aBitmapEx = aWallpaper.GetBitmap(); BitmapEx aBitmapEx = aWallpaper.GetBitmap();
Bitmap aBitmap( aBitmapEx.GetBitmap() ); const Bitmap& aBitmap( aBitmapEx.GetBitmap() );
if ( aBitmapEx.IsAlpha() ) if ( aBitmapEx.IsAlpha() )
{ {
if ( aWallpaper.IsGradient() ) if ( aWallpaper.IsGradient() )
@ -907,7 +907,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
// gradient action // gradient action
} }
AlphaMask aMask( aBitmapEx.GetAlphaMask() ); const AlphaMask& aMask( aBitmapEx.GetAlphaMask() );
ImplBmp( &aBitmap, &aMask, Point( aRect.Left(), aRect.Top() ), aRect.GetWidth(), aRect.GetHeight() ); ImplBmp( &aBitmap, &aMask, Point( aRect.Left(), aRect.Top() ), aRect.GetWidth(), aRect.GetHeight() );
} }
else else

View File

@ -1545,7 +1545,7 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, std::u16string_vi
rOStm.SetVersion( nVersion ); rOStm.SetVersion( nVersion );
// #i119735# just use GetGDIMetaFile, it will create a buffered version of contained bitmap now automatically // #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 ); SvmWriter aWriter( rOStm );
aWriter.Write( aMTF ); aWriter.Write( aMTF );

View File

@ -1380,7 +1380,7 @@ void SvmWriter::FloatTransparentHandler(const MetaFloatTransparentAction* pActio
VersionCompatWrite aCompat(mrStream, bSVG ? 2 : 1); VersionCompatWrite aCompat(mrStream, bSVG ? 2 : 1);
SvmWriter aWriter(mrStream); SvmWriter aWriter(mrStream);
GDIMetaFile aMtf = pAction->GetGDIMetaFile(); const GDIMetaFile& aMtf = pAction->GetGDIMetaFile();
aWriter.Write(aMtf); aWriter.Write(aMtf);
TypeSerializer aSerializer(mrStream); TypeSerializer aSerializer(mrStream);
aSerializer.writePoint(pAction->GetPoint()); aSerializer.writePoint(pAction->GetPoint());
@ -1415,7 +1415,7 @@ void SvmWriter::EPSHandler(const MetaEPSAction* pAction)
aSerializer.writeSize(pAction->GetSize()); aSerializer.writeSize(pAction->GetSize());
SvmWriter aWriter(mrStream); SvmWriter aWriter(mrStream);
GDIMetaFile aMtf = pAction->GetSubstitute(); const GDIMetaFile& aMtf = pAction->GetSubstitute();
aWriter.Write(aMtf); aWriter.Write(aMtf);
} }

View File

@ -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, // Apparently libwebp needs the entire image data at once in WebPPicture,
// so allocate it and copy there. // so allocate it and copy there.
Bitmap bitmap(bitmapEx.GetBitmap()); const Bitmap& bitmap(bitmapEx.GetBitmap());
AlphaMask bitmapAlpha; AlphaMask bitmapAlpha;
if (bitmapEx.IsAlpha()) if (bitmapEx.IsAlpha())
bitmapAlpha = bitmapEx.GetAlphaMask(); bitmapAlpha = bitmapEx.GetAlphaMask();

View File

@ -354,7 +354,7 @@ void TypeSerializer::writeGraphic(const Graphic& rGraphic)
case GraphicType::Bitmap: case GraphicType::Bitmap:
{ {
auto pVectorGraphicData = aGraphic.getVectorGraphicData(); const auto& pVectorGraphicData = aGraphic.getVectorGraphicData();
if (pVectorGraphicData) if (pVectorGraphicData)
{ {
// stream out Vector Graphic defining data (length, byte array and evtl. path) // stream out Vector Graphic defining data (length, byte array and evtl. path)

View File

@ -200,7 +200,7 @@ Graphic::Graphic(const Image& rImage)
// FIXME: should really defer the BitmapEx load. // FIXME: should really defer the BitmapEx load.
: mxImpGraphic(new ImpGraphic(rImage.GetBitmapEx())) : mxImpGraphic(new ImpGraphic(rImage.GetBitmapEx()))
{ {
OUString aStock = rImage.GetStock(); const OUString& aStock = rImage.GetStock();
if (aStock.getLength()) if (aStock.getLength())
mxImpGraphic->setOriginURL("private:graphicrepository/" + aStock); mxImpGraphic->setOriginURL("private:graphicrepository/" + aStock);
} }

View File

@ -676,7 +676,7 @@ const GDIMetaFile& ImpGraphic::getGDIMetaFile() const
if (1 == aSequence.size()) if (1 == aSequence.size())
{ {
// try to cast to MetafileAccessor implementation // 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()); auto pUnoPrimitive = static_cast< const drawinglayer::primitive2d::UnoPrimitive2D* >(xReference.get());
if (pUnoPrimitive) if (pUnoPrimitive)
{ {

View File

@ -594,7 +594,7 @@ OString toHexString(const std::vector<unsigned char>& a)
void writeBitmapContentChecksum(tools::XmlWriter& rWriter, Bitmap const& rBitmap) void writeBitmapContentChecksum(tools::XmlWriter& rWriter, Bitmap const& rBitmap)
{ {
Bitmap aBitmap(rBitmap); const Bitmap& aBitmap(rBitmap);
comphelper::Hash aHashEngine(comphelper::HashType::SHA1); comphelper::Hash aHashEngine(comphelper::HashType::SHA1);
BitmapScopedReadAccess pReadAccess(aBitmap); BitmapScopedReadAccess pReadAccess(aBitmap);
@ -659,7 +659,7 @@ void MetafileXmlDump::dump(const GDIMetaFile& rMetaFile, SvStream& rStream)
void MetafileXmlDump::writeXml(const GDIMetaFile& rMetaFile, tools::XmlWriter& rWriter) void MetafileXmlDump::writeXml(const GDIMetaFile& rMetaFile, tools::XmlWriter& rWriter)
{ {
MapMode aMtfMapMode = rMetaFile.GetPrefMapMode(); const MapMode& aMtfMapMode = rMetaFile.GetPrefMapMode();
rWriter.attribute("mapunit", convertMapUnitToString(aMtfMapMode.GetMapUnit())); rWriter.attribute("mapunit", convertMapUnitToString(aMtfMapMode.GetMapUnit()));
writePoint(rWriter, aMtfMapMode.GetOrigin()); writePoint(rWriter, aMtfMapMode.GetOrigin());
rWriter.attribute("scalex", convertFractionToString(aMtfMapMode.GetScaleX())); rWriter.attribute("scalex", convertFractionToString(aMtfMapMode.GetScaleX()));

View File

@ -497,7 +497,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
xVDev->EnableMapMode( false ); xVDev->EnableMapMode( false );
AlphaMask aAlpha(xVDev->GetBitmap(Point(), xVDev->GetOutputSizePixel())); AlphaMask aAlpha(xVDev->GetBitmap(Point(), xVDev->GetOutputSizePixel()));
AlphaMask aPaintAlpha(aPaint.GetAlphaMask()); const AlphaMask& aPaintAlpha(aPaint.GetAlphaMask());
// The alpha mask is inverted from what is // The alpha mask is inverted from what is
// expected so invert it again. To test this // expected so invert it again. To test this
// code, export to PDF the transparent shapes, // code, export to PDF the transparent shapes,

View File

@ -203,7 +203,7 @@ void Printer::DrawDeviceBitmapEx( const Point& rDestPt, const Size& rDestSize,
} }
else else
{ {
Bitmap aBmp( rBmpEx.GetBitmap() ); const Bitmap& aBmp( rBmpEx.GetBitmap() );
ImplPrintTransparent( aBmp, rDestPt, rDestSize, rSrcPtPixel, rSrcSizePixel ); ImplPrintTransparent( aBmp, rDestPt, rDestSize, rSrcPtPixel, rSrcSizePixel );
} }
} }
@ -842,7 +842,7 @@ Printer::Printer( const JobSetup& rJobSetup )
{ {
ImplInitData(); ImplInitData();
const ImplJobSetup& rConstData = rJobSetup.ImplGetConstData(); const ImplJobSetup& rConstData = rJobSetup.ImplGetConstData();
OUString aDriver = rConstData.GetDriver(); const OUString& aDriver = rConstData.GetDriver();
SalPrinterQueueInfo* pInfo = ImplGetQueueInfo( rConstData.GetPrinterName(), SalPrinterQueueInfo* pInfo = ImplGetQueueInfo( rConstData.GetPrinterName(),
&aDriver ); &aDriver );
if ( pInfo ) if ( pInfo )
@ -1086,7 +1086,7 @@ bool Printer::SetPrinterProps( const Printer* pPrinter )
} }
// Construct new printer // Construct new printer
OUString aDriver = pPrinter->GetDriverName(); const OUString& aDriver = pPrinter->GetDriverName();
SalPrinterQueueInfo* pInfo = ImplGetQueueInfo( pPrinter->GetName(), &aDriver ); SalPrinterQueueInfo* pInfo = ImplGetQueueInfo( pPrinter->GetName(), &aDriver );
if ( pInfo ) if ( pInfo )
{ {

View File

@ -232,7 +232,7 @@ uno::Reference< graphic::XGraphic > SAL_CALL Graphic::applyDuotone(
::Graphic aReturnGraphic; ::Graphic aReturnGraphic;
BitmapEx aBitmapEx( aGraphic.GetBitmapEx() ); BitmapEx aBitmapEx( aGraphic.GetBitmapEx() );
AlphaMask aMask( aBitmapEx.GetAlphaMask() ); const AlphaMask& aMask( aBitmapEx.GetAlphaMask() );
BitmapEx aTmpBmpEx(aBitmapEx.GetBitmap()); BitmapEx aTmpBmpEx(aBitmapEx.GetBitmap());
BitmapFilter::Filter(aTmpBmpEx, BitmapFilter::Filter(aTmpBmpEx,

View File

@ -55,7 +55,7 @@ void OutputDevice::SetBackground( const Wallpaper& rBackground )
} }
else if( rBackground.IsBitmap()) else if( rBackground.IsBitmap())
{ {
BitmapEx bitmap = rBackground.GetBitmap(); const BitmapEx& bitmap = rBackground.GetBitmap();
if( bitmap.IsAlpha()) if( bitmap.IsAlpha())
mpAlphaVDev->SetBackground( Wallpaper( BitmapEx( bitmap.GetAlphaMask().GetBitmap() ) ) ); mpAlphaVDev->SetBackground( Wallpaper( BitmapEx( bitmap.GetAlphaMask().GetBitmap() ) ) );
else else

View File

@ -663,7 +663,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
xVDev->EnableMapMode(false); xVDev->EnableMapMode(false);
AlphaMask aAlpha(xVDev->GetBitmap(aPoint, xVDev->GetOutputSizePixel())); AlphaMask aAlpha(xVDev->GetBitmap(aPoint, xVDev->GetOutputSizePixel()));
AlphaMask aPaintAlpha(aPaint.GetAlphaMask()); const AlphaMask& aPaintAlpha(aPaint.GetAlphaMask());
// The alpha mask is inverted from what // The alpha mask is inverted from what
// is expected so invert it again // is expected so invert it again
aAlpha.Invert(); // convert to alpha aAlpha.Invert(); // convert to alpha
@ -700,7 +700,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
xVDev->EnableMapMode( false ); xVDev->EnableMapMode( false );
AlphaMask aAlpha(xVDev->GetBitmap(Point(), xVDev->GetOutputSizePixel())); AlphaMask aAlpha(xVDev->GetBitmap(Point(), xVDev->GetOutputSizePixel()));
AlphaMask aPaintAlpha(aPaint.GetAlphaMask()); const AlphaMask& aPaintAlpha(aPaint.GetAlphaMask());
// The alpha mask is inverted from what // The alpha mask is inverted from what
// is expected so invert it again // is expected so invert it again
aAlpha.Invert(); // convert to alpha aAlpha.Invert(); // convert to alpha

View File

@ -156,7 +156,7 @@ void MergeNotebookBarMenuAddons(Menu* pPopupMenu, sal_Int16 nItemId, const OUStr
AddonNotebookBarItem aAddonNotebookBarItem; AddonNotebookBarItem aAddonNotebookBarItem;
Image sImage; Image sImage;
MenuItemBits nBits = MenuItemBits::ICON; 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); GetAddonNotebookBarItem(pExtension, aAddonNotebookBarItem);

View File

@ -966,7 +966,7 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute()
Sequence < OUString > aPathSeq = getFiles(); Sequence < OUString > aPathSeq = getFiles();
if( aPathSeq.getLength() == 1 ) if( aPathSeq.getLength() == 1 )
{ {
OUString sFileName = aPathSeq[0]; const OUString& sFileName = aPathSeq[0];
if (::utl::UCBContentHelper::Exists(sFileName)) if (::utl::UCBContentHelper::Exists(sFileName))
{ {
INetURLObject aFileObj(sFileName); INetURLObject aFileObj(sFileName);

View File

@ -4917,7 +4917,7 @@ namespace
{ {
Image aImage(rImage); Image aImage(rImage);
OUString sStock(aImage.GetStock()); const OUString& sStock(aImage.GetStock());
if (!sStock.isEmpty()) if (!sStock.isEmpty())
return load_icon_by_name(sStock); return load_icon_by_name(sStock);

View File

@ -1404,7 +1404,7 @@ public:
rDev.DrawBitmap(aBelow, aGrey); rDev.DrawBitmap(aBelow, aGrey);
aBelow.Move(aGrey.GetSizePixel().Width(),0); aBelow.Move(aGrey.GetSizePixel().Width(),0);
BitmapEx aGreyMask(aSrc); const BitmapEx& aGreyMask(aSrc);
rDev.DrawBitmapEx(aBelow, aGreyMask); rDev.DrawBitmapEx(aBelow, aGreyMask);
aLocation.Move(aSrc.GetSizePixel().Width()*6,0); aLocation.Move(aSrc.GetSizePixel().Width()*6,0);