diff options
author | Noel <noelgrandin@gmail.com> | 2020-11-04 08:43:46 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-04 13:57:38 +0100 |
commit | c76c4e74810e152fa5a6befe73ce4167b6b98267 (patch) | |
tree | f3f5d59f48eb08ba5077b226c4c8eb56701151bb /sfx2 | |
parent | d1232ee6b5e5cc3c811ef3ad72c83e9bd884bfe3 (diff) |
loplugin:constantparam
Change-Id: Ia2fea86f940d0d2d1dba5ed56660584f3d3fb028
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105280
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/objcont.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index 3159f6d7ac84..fc1ce7cceedd 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -103,20 +103,19 @@ SfxObjectShell::GetPreviewMetaFile( bool bFullContent ) const return xFile; } -BitmapEx SfxObjectShell::GetPreviewBitmap( bool bFullContent, BmpConversion nColorConversion, - BmpScaleFlag nScaleFlag) const +BitmapEx SfxObjectShell::GetPreviewBitmap() const { ScopedVclPtrInstance< VirtualDevice > pDevice; pDevice->SetAntialiasing(AntialiasingFlags::Enable | pDevice->GetAntialiasing()); - if(!CreatePreview_Impl(bFullContent, pDevice, nullptr)) + if(!CreatePreview_Impl(/*bFullContent*/false, pDevice, nullptr)) return BitmapEx(); Size size = pDevice->GetOutputSizePixel(); BitmapEx aBitmap = pDevice->GetBitmapEx( Point(), size); // Scale down the image to the desired size from the 4*size from CreatePreview_Impl(). size = Size( size.Width() / 4, size.Height() / 4 ); - aBitmap.Scale(size, nScaleFlag); + aBitmap.Scale(size, BmpScaleFlag::BestQuality); if (!aBitmap.IsEmpty()) - aBitmap.Convert(nColorConversion); + aBitmap.Convert(BmpConversion::N24Bit); return aBitmap; } |