[Libreoffice-commits] core.git: sfx2/source
Heiko Tietze (via logerrit)
logerrit at kemper.freedesktop.org
Tue Aug 6 07:26:57 UTC 2019
sfx2/source/control/recentdocsview.cxx | 13 +++++++++++++
1 file changed, 13 insertions(+)
New commits:
commit d43c6fa220524a09c0b24cbb5bc03c4456cd2515
Author: Heiko Tietze <tietze.heiko at gmail.com>
AuthorDate: Mon Jul 29 12:03:19 2019 +0200
Commit: Heiko Tietze <heiko.tietze at documentfoundation.org>
CommitDate: Tue Aug 6 09:26:08 2019 +0200
Resolves: tdf#125756 - MIME type icons on start center's thumbnails
Change-Id: If3cee18e7b143c641a884dc81059816b42b6f975
Reviewed-on: https://gerrit.libreoffice.org/76537
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze at documentfoundation.org>
diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx
index 46314a428ab2..96dbd90b1fb3 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -44,6 +44,7 @@
#include <com/sun/star/frame/XFrame.hpp>
#include <sfx2/strings.hrc>
#include <bitmaps.hlst>
+#include <vcl/virdev.hxx>
#include <officecfg/Office/Common.hxx>
@@ -239,6 +240,7 @@ void RecentDocsView::Reload()
OUString aURL;
OUString aTitle;
BitmapEx aThumbnail;
+ BitmapEx aModule;
for ( const auto& rProp : rRecentEntry )
{
@@ -263,6 +265,17 @@ void RecentDocsView::Reload()
}
}
+ aModule = getDefaultThumbnail(aURL);
+ if (!aModule.IsEmpty() && !aThumbnail.IsEmpty()) {
+ ScopedVclPtr<VirtualDevice> m_pVirDev(VclPtr<VirtualDevice>::Create());
+ Size aSize(aThumbnail.GetSizePixel());
+ m_pVirDev->SetOutputSizePixel(aSize);
+ m_pVirDev->DrawBitmapEx(Point(), aThumbnail);
+ m_pVirDev->DrawBitmapEx(Point(aSize.Width()-50,aSize.Height()-50), Size(40,40), aModule);
+ aThumbnail = m_pVirDev->GetBitmapEx(Point(), aSize);
+ m_pVirDev.disposeAndClear();
+ }
+
if(!aURL.isEmpty())
{
INetURLObject aURLObj( aURL );
More information about the Libreoffice-commits
mailing list