summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-02 11:16:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-03 16:03:48 +0100
commitaa7f880e8a847686bc4ec2d8ca5f74f39c32abac (patch)
treee10fb73e9e0d7320d22f53dada73c3baba8fe2f8 /include
parentbc2ae79f81c8aa081d6340348c70c0440f6e895e (diff)
use more TypedWhichId in SdrObject::GetObjectItem
Change-Id: Iacaffa4bfcca2b594d962985fb9fc93712c4464c Reviewed-on: https://gerrit.libreoffice.org/49137 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/svx/svdobj.hxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index 007283844a7a..36b4b51303a7 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -904,6 +904,10 @@ protected:
void SetObjectItem(const SfxPoolItem& rItem);
void SetObjectItemSet(const SfxItemSet& rSet);
const SfxPoolItem& GetObjectItem(const sal_uInt16 nWhich) const;
+ template<class T> const T& GetObjectItem( TypedWhichId<T> nWhich ) const
+ {
+ return static_cast<const T&>(GetObjectItem(sal_uInt16(nWhich)));
+ }
// get MapUnit the object is using
MapUnit GetObjectMapUnit() const;