[Libreoffice-commits] core.git: svx/source
Aditya (via logerrit)
logerrit at kemper.freedesktop.org
Sun Mar 29 11:22:47 UTC 2020
svx/source/gallery2/galobj.cxx | 28 +++-------------------------
1 file changed, 3 insertions(+), 25 deletions(-)
New commits:
commit a8fa7c763e43134bae27b8c0c7c89170bd96a732
Author: Aditya <adityasahu1511 at gmail.com>
AuthorDate: Sun Mar 29 03:20:55 2020 +0530
Commit: Tomaž Vajngerl <quikee at gmail.com>
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 <quikee at gmail.com>
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);
}
}
}
More information about the Libreoffice-commits
mailing list