summaryrefslogtreecommitdiff
path: root/include/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-02 08:48:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-02 11:12:01 +0100
commitcc45c96770def8fb3cc8c6d6c3d385c592806ae9 (patch)
treeb08ac3aa5b5f7a640ebc96877524ca909e9ab867 /include/svx
parent87115c67c3d83fb4bdccc3c03f7a79c44b22bf2c (diff)
use TypedWhichId in BaseProperties::GetItem
Change-Id: Ic359d33d92928f5baa89cd98debe1a6a9d6a52f3 Reviewed-on: https://gerrit.libreoffice.org/49128 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/svx')
-rw-r--r--include/svx/sdr/properties/properties.hxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/svx/sdr/properties/properties.hxx b/include/svx/sdr/properties/properties.hxx
index 7755f4fbc3fb..ef6cccb3103d 100644
--- a/include/svx/sdr/properties/properties.hxx
+++ b/include/svx/sdr/properties/properties.hxx
@@ -26,6 +26,7 @@
#include <sal/types.h>
#include <svx/svxdllapi.h>
+#include <svl/typedwhich.hxx>
class SdrObject;
class SfxItemSet;
@@ -164,6 +165,10 @@ namespace sdr
// Just a convenient shortcut for GetObjectItemSet().Get(nWhich).
const SfxPoolItem& GetItem(const sal_uInt16 nWhich) const;
+ template<class T> const T& GetItem(TypedWhichId<T> nWhich) const
+ {
+ return static_cast<const T&>(GetItem(sal_uInt16(nWhich)));
+ }
// support for convenient broadcasting. Used from SetMergedItemAndBroadcast(),
// ClearItemAndBroadcast() and SetItemSetAndBroadcast(), see above.