29#include <com/sun/star/frame/XDispatch.hpp>
30#include <sfx2/strings.hrc>
31#include <bitmaps.hlst>
35#include <officecfg/Office/Common.hxx>
50 aFont.SetFontHeight(aFont.GetFontHeight() * 1.3);
66 , maWelcomeLine1(
SfxResId(STR_WELCOME_LINE1))
67 , maWelcomeLine2(
SfxResId(STR_WELCOME_LINE2))
68 , mpLoadRecentFile(nullptr)
69 , m_nExecuteHdlId(nullptr)
101 if (rExt ==
u"odt" || rExt ==
u"fodt" || rExt ==
u"doc" || rExt ==
u"docx" ||
102 rExt ==
u"rtf" || rExt ==
u"txt" || rExt ==
u"odm" || rExt ==
u"otm")
106 else if (rExt ==
u"ods" || rExt ==
u"fods" || rExt ==
u"xls" || rExt ==
u"xlsx")
110 else if (rExt ==
u"odp" || rExt ==
u"fodp" || rExt ==
u"pps" || rExt ==
u"ppt" ||
115 else if (rExt ==
u"odg" || rExt ==
u"fodg")
119 else if (rExt ==
u"odb")
123 else if (rExt ==
u"odf")
148 const OUString& rThumbnail,
bool isReadOnly,
bool isPinned,
151 AppendItem(std::make_unique<RecentDocsViewItem>(*
this, rURL, rTitle, rThumbnail,
nId,
160 for (
size_t i = 0;
i < aHistoryList.size();
i++ )
172 const OUString aTitle = aURLObj.
GetBase();
190 for (
size_t i = 0;
i < aHistoryList.size();
i++ )
262 SetMessageFont(rRenderContext);
270 const int nX = (rSize.
Width() - rImgSize.
Width())/2;
271 int nY = (rSize.
Height() - 3 * nTextHeight - rImgSize.
Height())/2;
272 Point aImgPoint(nX, nY);
275 nY = nY + rImgSize.
Height();
278 DrawTextFlags::Center);
281 DrawTextFlags::MultiLine | DrawTextFlags::WordBreak | DrawTextFlags::Center);
283 rRenderContext.
Pop();
313 m_nExecuteHdlId =
nullptr;
326 if (pLoadRecentFile->
pView)
333 delete pLoadRecentFile;
static unsigned int GetDisplayBuiltInScreen()
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
static void RemoveUserEvent(ImplSVEvent *nUserEvent)
static tools::Rectangle GetScreenPosSizePixel(unsigned int nScreen)
const Size & GetSizePixel() const
OUString getExtension(sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true, DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
sal_uInt16 GetClicks() const
const Point & GetPosPixel() const
const vcl::Font & GetFont() const
void DrawBitmapEx(const Point &rDestPt, const BitmapEx &rBitmapEx)
void SetFont(const vcl::Font &rNewFont)
void SetTextColor(const Color &rColor)
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
tools::Long GetTextHeight() const
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, std::vector< tools::Rectangle > *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
void OpenDocument()
Called when the user clicks a document - it will open it.
static BitmapEx GetApplicationLogo(tools::Long nWidth)
loads the application logo as used in the impress slideshow pause screen
constexpr tools::Long Height() const
constexpr tools::Long Width() const
virtual void MouseButtonUp(const MouseEvent &)
void setHighlight(bool state)
Class to display thumbnails with their names below their respective icons.
void CalculateItemPositions(bool bScrollBarUsed=false)
void deselectItems()
deselect all current selected items.
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
size_t ImplGetItem(const Point &rPoint) const
Color maHighlightColor
Color of the highlight (background) of the hovered item.
void AppendItem(std::unique_ptr< ThumbnailViewItem > pItem)
double mfHighlightTransparence
Transparence of the highlight.
Color maHighlightTextColor
Color of the text for the highlighted item.
void setItemDimensions(tools::Long ItemWidth, tools::Long ThumbnailHeight, tools::Long DisplayHeight, int itemPadding)
virtual void LoseFocus() override
Color maTextColor
Text color.
void setItemMaxTextLength(sal_uInt32 nLength)
std::vector< std::unique_ptr< ThumbnailViewItem > > mItemList
Color maFillColor
Background color of the thumbnail view widget.
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
static bool fileExists(const OUString &rBaseURL)
void clearUnavailableFiles()
void setFilter(ApplicationType aFilter)
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
sfx2::LoadRecentFile * mpLoadRecentFile
virtual void OnItemDblClicked(ThumbnailViewItem *pItem) override
void PostLoadRecentUsedFile(LoadRecentFile *pLoadRecentFile)
ApplicationType mnFileTypes
void insertItem(const OUString &rURL, const OUString &rTitle, const OUString &rThumbnail, bool isReadOnly, bool isPinned, sal_uInt16 nId)
tools::Long mnItemMaxSize
virtual ~RecentDocsView() override
virtual void LoseFocus() override
static bool typeMatchesExtension(ApplicationType type, std::u16string_view rExt)
BitmapEx maWelcomeImage
Image that appears when there is no recent document.
virtual void Reload() override
Update the information in the view.
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
ImplSVEvent * m_nExecuteHdlId
void DispatchedLoadRecentUsedFile()
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
bool isAcceptedFile(const INetURLObject &rURL) const
size_t mnLastMouseDownItem
RecentDocsView(std::unique_ptr< weld::ScrolledWindow > xWindow, std::unique_ptr< weld::Menu > xMenu)
virtual void Clear() override
#define LINK(Instance, Class, Member)
void DeleteItem(EHistoryType eHistory, const OUString &sURL)
std::vector< HistoryItem > GetList(EHistoryType eHistory)
IMPL_LINK(SvDDEObject, ImplGetDDEData, const DdeData *, pData, void)
constexpr tools::Long gnTextHeight
constexpr tools::Long gnItemPadding
OUString SfxResId(TranslateId aId)
css::uno::Sequence< css::beans::PropertyValue > aArgSeq
css::uno::Reference< css::frame::XDispatch > xDispatch
css::util::URL aTargetURL
#define THUMBNAILVIEW_ITEM_NOTFOUND