diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-03 17:02:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-05 07:53:31 +0100 |
commit | 51ee91a3ca869be23153a235cbf33d4d20267fce (patch) | |
tree | d55ad43d12f82b2960d893a016f67e4f99ac5dd3 /sw/inc/charfmt.hxx | |
parent | 90db24c33060bcb6db6ef900981c4379cd3074af (diff) |
TypedWhichId in sw(1)
Change-Id: If9330b2ea7e40f4775b1edd9611d35c6ddf31a00
Reviewed-on: https://gerrit.libreoffice.org/49185
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/inc/charfmt.hxx')
-rw-r--r-- | sw/inc/charfmt.hxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/inc/charfmt.hxx b/sw/inc/charfmt.hxx index c6e61d2de1bc..b84d31c780bc 100644 --- a/sw/inc/charfmt.hxx +++ b/sw/inc/charfmt.hxx @@ -44,6 +44,10 @@ namespace CharFormat { SW_DLLPUBLIC extern const SfxItemSet* GetItemSet( const SfxPoolItem& rAttr ); extern const SfxPoolItem* GetItem( const SwTextAttr& rAttr, sal_uInt16 nWhich ); + template<class T> const T* GetItem( const SwTextAttr& rAttr, TypedWhichId<T> nWhich ) + { + return static_cast<const T*>(GetItem(rAttr, sal_uInt16(nWhich))); + } extern bool IsItemIncluded( const sal_uInt16 nWhich, const SwTextAttr *pAttr ); } |