diff options
author | Heiko Tietze <tietze.heiko@gmail.com> | 2019-07-29 12:03:19 +0200 |
---|---|---|
committer | Heiko Tietze <heiko.tietze@documentfoundation.org> | 2019-08-06 09:26:08 +0200 |
commit | d43c6fa220524a09c0b24cbb5bc03c4456cd2515 (patch) | |
tree | 0e67a4393b30b2ca5185a30511ce5a7a275364da /sfx2 | |
parent | 600025475630c59c53a9086ba6d95124416725b3 (diff) |
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@documentfoundation.org>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/control/recentdocsview.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
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 ); |