From f60424b29622033ae02491bda328c304ae1bc05d Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Tue, 30 Apr 2013 10:31:00 +0200 Subject: bnc#816516: Implement easy access to the recent documents. This adds a dropdown to the 'Open' toolbar tool. Change-Id: I5b4aa99476e721c1479152b46bbc79cc0b095318 --- include/sfx2/tbxctrl.hxx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'include/sfx2') diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx index 6c12947a3333..e50527f31086 100644 --- a/include/sfx2/tbxctrl.hxx +++ b/include/sfx2/tbxctrl.hxx @@ -162,7 +162,7 @@ public: #define SFX_DECL_TOOLBOX_CONTROL() \ static SfxToolBoxControl* CreateImpl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx ); \ - static void RegisterControl(sal_uInt16 nSlotId = 0, SfxModule *pMod=NULL) + static void SFX2_DLLPUBLIC RegisterControl(sal_uInt16 nSlotId = 0, SfxModule *pMod=NULL) /* For special ToolBox controls, such as a font selection box or toolbox tear-off floating windows, an appropriate Item-Subclass of SfxTooBoxControl @@ -351,6 +351,23 @@ private: sal_Bool m_bShowMenuImages; }; +/** Toolbox that implements recent files menu for the Open file toolbar button. + +To use that, the appropriate Sfx*Item (like Open, OpenFromCalc, or +OpenFromWriter) has to have SlotType = SfxStringItem, and the appropriate +module initialization has to call RegisterControl(). +*/ +class SfxRecentFilesToolBoxControl : public SfxToolBoxControl +{ +public: + SFX_DECL_TOOLBOX_CONTROL(); + SfxRecentFilesToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox ); + virtual ~SfxRecentFilesToolBoxControl(); + +protected: + virtual SfxPopupWindow* CreatePopupWindow(); +}; + class SfxReloadToolBoxControl_Impl : public SfxToolBoxControl { protected: -- cgit