1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #ifndef INCLUDED_SFX2_RECENTDOCSVIEW_HXX
11 #define INCLUDED_SFX2_RECENTDOCSVIEW_HXX
13 #include <sfx2/thumbnailview.hxx>
14 #include <sfx2/recentdocsviewitem.hxx>
15 #include <vcl/image.hxx>
17 #include <com/sun/star/frame/XFrame.hpp>
18 #include <com/sun/star/frame/XDispatchProvider.hpp>
19 #include <com/sun/star/frame/XDispatch.hpp>
23 ::com::sun::star::util::URL aTargetURL
;
24 ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
> aArgSeq
;
25 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XDispatch
> xDispatch
;
33 TYPE_IMPRESS
= 1 << 2,
35 TYPE_DATABASE
= 1 << 4,
41 class SFX2_DLLPUBLIC RecentDocsView
: protected ::comphelper::OBaseMutex
,
45 RecentDocsView( Window
* pParent
);
46 virtual ~RecentDocsView();
48 void insertItem(const OUString
&rURL
, const OUString
&rTitle
, sal_uInt16 nId
);
49 void loadRecentDocs();
51 void SetThumbnailSize(long thumbnailSize
);
52 long GetThumbnailSize() const;
54 static bool typeMatchesExtension(ApplicationType type
, const OUString
&rExt
);
55 static BitmapEx
getDefaultThumbnail(const OUString
&rURL
);
59 DECL_STATIC_LINK( RecentDocsView
, ExecuteHdl_Impl
, LoadRecentFile
* );
62 virtual void MouseButtonDown( const MouseEvent
& rMEvt
);
63 virtual void OnItemDblClicked(ThumbnailViewItem
*pItem
);
64 void OpenItem( const ThumbnailViewItem
*pItem
);
65 virtual void Paint( const Rectangle
& rRect
);
67 bool isAcceptedFile(const OUString
&rURL
) const;
72 long mnItemMaxTextLength
;
75 OUString maWelcomeLine1
;
76 OUString maWelcomeLine2
;
79 #endif // INCLUDED_SFX2_RECENTDOCSVIEW_HXX
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */