summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2013-04-30 10:31:00 +0200
committerJan Holesovsky <kendy@suse.cz>2013-04-30 10:33:15 +0200
commitf60424b29622033ae02491bda328c304ae1bc05d (patch)
tree0bb6ba356685ecefa6d757fd60e4daf9eb1fb4e4 /include
parentf486c562816fc59dc4d341d0a32a65b1e65eeb92 (diff)
bnc#816516: Implement easy access to the recent documents.
This adds a dropdown to the 'Open' toolbar tool. Change-Id: I5b4aa99476e721c1479152b46bbc79cc0b095318
Diffstat (limited to 'include')
-rw-r--r--include/sfx2/tbxctrl.hxx19
1 files changed, 18 insertions, 1 deletions
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: