diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-03-15 15:45:15 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-03-15 21:19:17 +0100 |
commit | 1dbed50a6ed73570ca2d8a1e37237205e2394c34 (patch) | |
tree | 345b33998282a517ccc858f5e4b13fb3b92d870f /sfx2/inc/recentdocsview.hxx | |
parent | c0361119dfb5a1accfae9f777844e22846af8ecc (diff) |
tdf#134065, tdf#147998: fix thumbnail generation code
This moves the code drawing thumbnails and overlay icons away from
RecentDocsView to RecentDocsViewItem, where the final size of the
thumbnail is defined, so that no scaling of pre-painted icon would
happen.
This also restores the SFX_FILE_THUMBNAIL_* to state before commit
d43c6fa220524a09c0b24cbb5bc03c4456cd2515, and introduces a new set
of SFX_FILE_OVERLAY_* to be used for the overlay icons. This fixes
the display when RecentDocsThumbnail is disabled.
Change-Id: I5eb4aed5325459ddec7e196300cf6c2f9ddf80b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131610
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sfx2/inc/recentdocsview.hxx')
-rw-r--r-- | sfx2/inc/recentdocsview.hxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sfx2/inc/recentdocsview.hxx b/sfx2/inc/recentdocsview.hxx index 44cda470b7bc..28b1f77e7c27 100644 --- a/sfx2/inc/recentdocsview.hxx +++ b/sfx2/inc/recentdocsview.hxx @@ -17,6 +17,7 @@ #include <com/sun/star/util/URL.hpp> #include <com/sun/star/beans/PropertyValue.hpp> +class INetURLObject; struct ImplSVEvent; namespace com::sun::star::frame { class XDispatch; } @@ -62,10 +63,9 @@ public: RecentDocsView(std::unique_ptr<weld::ScrolledWindow> xWindow, std::unique_ptr<weld::Menu> xMenu); virtual ~RecentDocsView() override; - void insertItem(const OUString &rURL, const OUString &rTitle, const BitmapEx &rThumbnail, sal_uInt16 nId); + void insertItem(const OUString &rURL, const OUString &rTitle, const OUString& rThumbnail, sal_uInt16 nId); static bool typeMatchesExtension(ApplicationType type, std::u16string_view rExt); - static BitmapEx getDefaultThumbnail(const OUString &rURL, bool bCheckEncrypted = true); ApplicationType mnFileTypes; @@ -91,7 +91,7 @@ private: virtual void LoseFocus() override; - bool isAcceptedFile(const OUString &rURL) const; + bool isAcceptedFile(const INetURLObject& rURL) const; DECL_LINK( ExecuteHdl_Impl, void*, void ); |