summaryrefslogtreecommitdiff
path: root/include/editeng/eeitem.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/eeitem.hxx
parenta8f31d5120c2ae9109d316db73b5adf9cb26c892 (diff)
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/eeitem.hxx')
-rw-r--r--include/editeng/eeitem.hxx31
1 files changed, 20 insertions, 11 deletions
diff --git a/include/editeng/eeitem.hxx b/include/editeng/eeitem.hxx
index 19393957e6bf..afc0eb8cd715 100644
--- a/include/editeng/eeitem.hxx
+++ b/include/editeng/eeitem.hxx
@@ -21,6 +21,15 @@
#define INCLUDED_EDITENG_EEITEM_HXX
#include <svl/solar.hrc>
+#include <svl/typedwhich.hxx>
+
+class SvxForbiddenRuleItem;
+class SvxFrameDirectionItem;
+class SvxHangingPunctuationItem;
+class SfxBoolItem;
+class SfxInt16Item;
+class SvxLRSpaceItem;
+class SvxScriptSpaceItem;
/*
* NOTE: Changes in this file will probably require
@@ -32,18 +41,18 @@
// Paragraph attributes:
#define EE_PARA_START (EE_ITEMS_START+0)
-#define EE_PARA_WRITINGDIR (EE_ITEMS_START+0)
+#define EE_PARA_WRITINGDIR TypedWhichId<SvxFrameDirectionItem>(EE_ITEMS_START+0)
#define EE_PARA_XMLATTRIBS (EE_ITEMS_START+1)
-#define EE_PARA_HANGINGPUNCTUATION (EE_ITEMS_START+2)
-#define EE_PARA_FORBIDDENRULES (EE_ITEMS_START+3)
-#define EE_PARA_ASIANCJKSPACING (EE_ITEMS_START+4)
-#define EE_PARA_NUMBULLET (EE_ITEMS_START+5)
-#define EE_PARA_HYPHENATE (EE_ITEMS_START+6)
-#define EE_PARA_BULLETSTATE (EE_ITEMS_START+7)
-#define EE_PARA_OUTLLRSPACE (EE_ITEMS_START+8)
-#define EE_PARA_OUTLLEVEL (EE_ITEMS_START+9)
-#define EE_PARA_BULLET (EE_ITEMS_START+10)
-#define EE_PARA_LRSPACE (EE_ITEMS_START+11)
+#define EE_PARA_HANGINGPUNCTUATION TypedWhichId<SvxHangingPunctuationItem>(EE_ITEMS_START+2)
+#define EE_PARA_FORBIDDENRULES TypedWhichId<SvxForbiddenRuleItem>(EE_ITEMS_START+3)
+#define EE_PARA_ASIANCJKSPACING TypedWhichId<SvxScriptSpaceItem>(EE_ITEMS_START+4)
+#define EE_PARA_NUMBULLET TypedWhichId<SvxNumBulletItem>(EE_ITEMS_START+5)
+#define EE_PARA_HYPHENATE TypedWhichId<SfxBoolItem>(EE_ITEMS_START+6)
+#define EE_PARA_BULLETSTATE TypedWhichId<SfxBoolItem>(EE_ITEMS_START+7)
+#define EE_PARA_OUTLLRSPACE TypedWhichId<SvxLRSpaceItem>(EE_ITEMS_START+8)
+#define EE_PARA_OUTLLEVEL TypedWhichId<SfxInt16Item>(EE_ITEMS_START+9)
+#define EE_PARA_BULLET TypedWhichId<SvxBulletItem>(EE_ITEMS_START+10)
+#define EE_PARA_LRSPACE TypedWhichId<SvxLRSpaceItem>(EE_ITEMS_START+11)
#define EE_PARA_ULSPACE (EE_ITEMS_START+12)
#define EE_PARA_SBL (EE_ITEMS_START+13)
#define EE_PARA_JUST (EE_ITEMS_START+14)