summaryrefslogtreecommitdiffstats
path: root/include/editeng/editeng.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-11-10 12:48:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-15 08:24:29 +0100
commit3588a48a82d37f940595570758bc1d1179d18b84 (patch)
treedaa314ae437771157a53f8a5d5043a685f399ac3 /include/editeng/editeng.hxx
parentFix typos (diff)
downloadcore-3588a48a82d37f940595570758bc1d1179d18b84.tar.gz
core-3588a48a82d37f940595570758bc1d1179d18b84.zip
TypedWhichId
use a strong-typedef template to give which IDs a type, which we can carry around to do a (a) little bit more convenience when Get()'ing them and (b) a little bit of enforcement of which PoolItem subclass each ID uses Fix a bug in casting EE_PARA_BULLETSTATE to the wrong subclass in AccessibleEditableTextPara::_correctValues Change-Id: I015ce8b3b0f6d21308af182afa3caf122c877a5b Reviewed-on: https://gerrit.libreoffice.org/44587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/editeng/editeng.hxx')
-rw-r--r--include/editeng/editeng.hxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx
index e7b33cfd5345..4f0be32b9dee 100644
--- a/include/editeng/editeng.hxx
+++ b/include/editeng/editeng.hxx
@@ -28,6 +28,7 @@
#include <com/sun/star/i18n/CharacterIteratorMode.hpp>
#include <svl/style.hxx>
+#include <svl/typedwhich.hxx>
#include <editeng/editdata.hxx>
#include <editeng/editstat.hxx>
#include <editeng/editengdllapi.h>
@@ -319,6 +320,11 @@ public:
bool HasParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ) const;
const SfxPoolItem& GetParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich );
+ template<class T>
+ const T& GetParaAttrib( sal_Int32 nPara, TypedWhichId<T> nWhich )
+ {
+ return static_cast<const T&>(GetParaAttrib(nPara, nWhich.Which()));
+ }
vcl::Font GetStandardFont( sal_Int32 nPara );
SvxFont GetStandardSvxFont( sal_Int32 nPara );