[Libreoffice-commits] core.git: vcl/source
Caolán McNamara
caolanm at redhat.com
Fri Jan 20 16:57:12 UTC 2017
vcl/source/control/imgctrl.cxx | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
New commits:
commit 4a149184210c4ec2e0f0fc2cfeeb0787100110be
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jan 20 16:56:19 2017 +0000
drop pointless pointer for reference
Change-Id: Ia2c32bab6825687d4964e7a6abaa137bb48b3a3c
diff --git a/vcl/source/control/imgctrl.cxx b/vcl/source/control/imgctrl.cxx
index 60d7b79..625706f 100644
--- a/vcl/source/control/imgctrl.cxx
+++ b/vcl/source/control/imgctrl.cxx
@@ -77,9 +77,8 @@ void ImageControl::ImplDraw(OutputDevice& rDev, DrawFlags nDrawFlags, const Poin
}
const Image& rImage( GetModeImage() );
- const Image* pImage = &rImage;
const Rectangle aDrawRect( rPos, rSize );
- if ( !*pImage )
+ if (!rImage)
{
OUString sText( GetText() );
if ( sText.isEmpty() )
@@ -95,23 +94,20 @@ void ImageControl::ImplDraw(OutputDevice& rDev, DrawFlags nDrawFlags, const Poin
return;
}
- const Size& rBitmapSize = pImage->GetSizePixel();
+ const Size& rBitmapSize = rImage.GetSizePixel();
switch ( mnScaleMode )
{
case ImageScaleMode::NONE:
{
- rDev.DrawImage( lcl_centerWithin( aDrawRect, rBitmapSize ), *pImage, nStyle );
+ rDev.DrawImage(lcl_centerWithin( aDrawRect, rBitmapSize ), rImage, nStyle);
}
break;
case ImageScaleMode::ISOTROPIC:
{
const Size aPaintSize = lcl_calcPaintSize( aDrawRect, rBitmapSize );
- rDev.DrawImage(
- lcl_centerWithin( aDrawRect, aPaintSize ),
- aPaintSize,
- *pImage, nStyle );
+ rDev.DrawImage(lcl_centerWithin(aDrawRect, aPaintSize), aPaintSize, rImage, nStyle);
}
break;
@@ -120,7 +116,7 @@ void ImageControl::ImplDraw(OutputDevice& rDev, DrawFlags nDrawFlags, const Poin
rDev.DrawImage(
aDrawRect.TopLeft(),
aDrawRect.GetSize(),
- *pImage, nStyle );
+ rImage, nStyle );
}
break;
More information about the Libreoffice-commits
mailing list