diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-02 12:19:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-03 16:04:03 +0100 |
commit | a4fbb496ef001d62fce0ad3cdd7a829f99aa182e (patch) | |
tree | 46251b839097ec9486da8da98bacf507ba4692e9 /include/sfx2/shell.hxx | |
parent | aa7f880e8a847686bc4ec2d8ca5f74f39c32abac (diff) |
more TypedWhichId in SfxShell and SfxTabDialog
and remove some unnecessary local copies of pool items
Change-Id: Ifdac8d84658fd4b803267038592d7da370e23a0d
Reviewed-on: https://gerrit.libreoffice.org/49138
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/sfx2/shell.hxx')
-rw-r--r-- | include/sfx2/shell.hxx | 5 |
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 |