summaryrefslogtreecommitdiff
path: root/include/sfx2/shell.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'include/sfx2/shell.hxx')
-rw-r--r--include/sfx2/shell.hxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/sfx2/shell.hxx b/include/sfx2/shell.hxx
index e51738e32549..55e15f0e8655 100644
--- a/include/sfx2/shell.hxx
+++ b/include/sfx2/shell.hxx
@@ -24,6 +24,7 @@
#include <rtl/ustring.hxx>
#include <sal/config.h>
#include <sal/types.h>
+#include <svl/typedwhich.hxx>
#include <sfx2/dllapi.h>
#include <sfx2/sfxuno.hxx>
#include <svl/SfxBroadcaster.hxx>
@@ -424,6 +425,10 @@ public:
<SfxShell::RemoveItem(sal_uInt16)>
*/
const SfxPoolItem* GetItem( sal_uInt16 nSlotId ) const;
+ template<class T> const T* GetItem( TypedWhichId<T> nWhich ) const
+ {
+ return static_cast<const T*>(GetItem(sal_uInt16(nWhich)));
+ }
/**
With this method, any objects of subclasses of <SfxPoolItem> can be made