svx/source/gallery2/galobj.cxx | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-)
New commits: commit a8fa7c763e43134bae27b8c0c7c89170bd96a732 Author: Aditya <[email protected]> AuthorDate: Sun Mar 29 03:20:55 2020 +0530 Commit: Tomaž Vajngerl <[email protected]> CommitDate: Sun Mar 29 13:22:09 2020 +0200 tdf#131532:Blurry thumbnails when small shapes added to gallery theme When small shape is added to gallery theme using drag and drop method, their thumbnail is rendered improperly and as a result they are blurry. This change renders the thumbnails normally without getting blurred. Change-Id: Ibba7e93ba09a42b0d1bf4a1a833f3fe17c8557f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91319 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <[email protected]> diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx index b22b3763655f..4adb4fe49dba 100644 --- a/svx/source/gallery2/galobj.cxx +++ b/svx/source/gallery2/galobj.cxx @@ -452,31 +452,9 @@ bool SgaObjectSvDraw::CreateThumb( const FmFormModel& rModel ) aView.ShowSdrPage(const_cast< FmFormPage* >(pPage)); aView.MarkAllObj(); - aThumbBmp = aView.GetMarkedObjBitmapEx(); - - const Size aDiscreteSize(aThumbBmp.GetSizePixel()); - - if(aDiscreteSize.Width() && aDiscreteSize.Height()) - { - sal_uInt32 nTargetSizeX(S_THUMB); - sal_uInt32 nTargetSizeY(S_THUMB); - - if(aDiscreteSize.Width() > aDiscreteSize.Height()) - { - nTargetSizeY = (aDiscreteSize.Height() * nTargetSizeX) / aDiscreteSize.Width(); - } - else - { - nTargetSizeX = (aDiscreteSize.Width() * nTargetSizeY) / aDiscreteSize.Height(); - } - - if(!!aThumbBmp) - { - aThumbBmp.Scale(Size(nTargetSizeX, nTargetSizeY), BmpScaleFlag::BestQuality); - aThumbBmp.Convert(BmpConversion::N8BitColors); - bRet = true; - } - } + aThumbBmp = aView.GetMarkedObjBitmapEx(true); + aGraphic = Graphic(aThumbBmp); + bRet = SgaObject::CreateThumb(aGraphic); } } } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
