summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-11-16 16:16:22 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-20 09:43:25 +0100
commit0f0049d77a0ee6ae936922213c7290d0bc4fee29 (patch)
tree21ec8c68606453166de7557afa394054907d9c85 /include
parent21e85d591f344958c3ebee9422ba15dbd931f2cc (diff)
TypedWhichId for XATTR* constants
Change-Id: Ie9d637d701b77a549de3b00956f9c74ee8bd08c1 Reviewed-on: https://gerrit.libreoffice.org/44830 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/svl/typedwhich.hxx2
-rw-r--r--include/svx/xdef.hxx148
2 files changed, 100 insertions, 50 deletions
diff --git a/include/svl/typedwhich.hxx b/include/svl/typedwhich.hxx
index 2c2141250d02..cb22d48ebdc3 100644
--- a/include/svl/typedwhich.hxx
+++ b/include/svl/typedwhich.hxx
@@ -19,7 +19,7 @@
template <class T> class TypedWhichId final
{
public:
- constexpr TypedWhichId(sal_uInt16 nWhich)
+ explicit constexpr TypedWhichId(sal_uInt16 nWhich)
: mnWhich(nWhich)
{
}
diff --git a/include/svx/xdef.hxx b/include/svx/xdef.hxx
index 7fd5dbab0096..af2aba56d2ac 100644
--- a/include/svx/xdef.hxx
+++ b/include/svx/xdef.hxx
@@ -21,6 +21,8 @@
#define INCLUDED_SVX_XDEF_HXX
+#include <svl/typedwhich.hxx>
+
/*************************************************************************
|*
|* Adding an attribute: Copy line, above which you want to add something,
@@ -28,65 +30,113 @@
|*
\************************************************************************/
+class SfxMetricItem;
+class XFillAttrSetItem;
+class XFillBackgroundItem;
+class XFillBitmapItem;
+class XFillBmpPosItem;
+class XFillBmpPosOffsetXItem;
+class XFillBmpPosOffsetYItem;
+class XFillBmpSizeLogItem;
+class XFillBmpSizeYItem;
+class XFillBmpStretchItem;
+class XFillBmpTileItem;
+class XFillBmpTileOffsetXItem;
+class XFillBmpTileOffsetYItem;
+class XFillColorItem;
+class XFillFloatTransparenceItem;
+class XFillGradientItem;
+class XFillHatchItem;
+class XFillStyleItem;
+class XFillTransparenceItem;
+class XFormTextAdjustItem;
+class XFormTextDistanceItem;
+class XFormTextHideFormItem;
+class XFormTextMirrorItem;
+class XFormTextOutlineItem;
+class XFormTextShadowColorItem;
+class XFormTextShadowItem;
+class XFormTextShadowTranspItem;
+class XFormTextShadowXValItem;
+class XFormTextShadowYValItem;
+class XFormTextStartItem;
+class XFormTextStyleItem;
+class XGradientStepCountItem;
+class XLineAttrSetItem;
+class XLineCapItem;
+class XLineColorItem;
+class XLineDashItem;
+class XLineEndCenterItem;
+class XLineEndItem;
+class XLineEndWidthItem;
+class XLineJointItem;
+class XLineStartCenterItem;
+class XLineStartItem;
+class XLineStartWidthItem;
+class XLineStyleItem;
+class XLineTransparenceItem;
+class XLineWidthItem;
+class XSecondaryFillColorItem;
+
#define COL_DEFAULT_SHAPE_FILLING 0x729fcf
#define COL_DEFAULT_SHAPE_STROKE 0x3465a4
#define XATTR_START 1000
#define XATTR_LINE_FIRST XATTR_START /* V3: 1000 V2: 1000 */
-#define XATTR_LINESTYLE XATTR_LINE_FIRST
-#define XATTR_LINEDASH (XATTR_LINE_FIRST + 1) /* V3: 1001 V2: 1001 */
-#define XATTR_LINEWIDTH (XATTR_LINE_FIRST + 2) /* V3: 1002 V2: 1002 */
-#define XATTR_LINECOLOR (XATTR_LINE_FIRST + 3) /* V3: 1003 V2: 1003 */
-#define XATTR_LINESTART (XATTR_LINE_FIRST + 4) /* V3: 1004 V2: 1004 */
-#define XATTR_LINEEND (XATTR_LINE_FIRST + 5) /* V3: 1005 V2: 1005 */
-#define XATTR_LINESTARTWIDTH (XATTR_LINE_FIRST + 6) /* V3: 1006 V2: 1006 */
-#define XATTR_LINEENDWIDTH (XATTR_LINE_FIRST + 7) /* V3: 1007 V2: 1007 */
-#define XATTR_LINESTARTCENTER (XATTR_LINE_FIRST + 8) /* V3: 1008 V2: 1008 */
-#define XATTR_LINEENDCENTER (XATTR_LINE_FIRST + 9) /* V3: 1009 V2: 1009 */
-#define XATTR_LINETRANSPARENCE (XATTR_LINE_FIRST + 10) /* V3: 1010 V2: 1010 */
-#define XATTR_LINEJOINT (XATTR_LINE_FIRST + 11) /* V3: 1011 V2: 1011 */
-#define XATTR_LINECAP (XATTR_LINE_FIRST + 12) /* V3: 1012 */
+#define XATTR_LINESTYLE TypedWhichId<XLineStyleItem>(XATTR_LINE_FIRST)
+#define XATTR_LINEDASH TypedWhichId<XLineDashItem>(XATTR_LINE_FIRST + 1) /* V3: 1001 V2: 1001 */
+#define XATTR_LINEWIDTH TypedWhichId<XLineWidthItem>(XATTR_LINE_FIRST + 2) /* V3: 1002 V2: 1002 */
+#define XATTR_LINECOLOR TypedWhichId<XLineColorItem>(XATTR_LINE_FIRST + 3) /* V3: 1003 V2: 1003 */
+#define XATTR_LINESTART TypedWhichId<XLineStartItem>(XATTR_LINE_FIRST + 4) /* V3: 1004 V2: 1004 */
+#define XATTR_LINEEND TypedWhichId<XLineEndItem>(XATTR_LINE_FIRST + 5) /* V3: 1005 V2: 1005 */
+#define XATTR_LINESTARTWIDTH TypedWhichId<XLineStartWidthItem>(XATTR_LINE_FIRST + 6) /* V3: 1006 V2: 1006 */
+#define XATTR_LINEENDWIDTH TypedWhichId<XLineEndWidthItem>(XATTR_LINE_FIRST + 7) /* V3: 1007 V2: 1007 */
+#define XATTR_LINESTARTCENTER TypedWhichId<XLineStartCenterItem>(XATTR_LINE_FIRST + 8) /* V3: 1008 V2: 1008 */
+#define XATTR_LINEENDCENTER TypedWhichId<XLineEndCenterItem>(XATTR_LINE_FIRST + 9) /* V3: 1009 V2: 1009 */
+#define XATTR_LINETRANSPARENCE TypedWhichId<XLineTransparenceItem>(XATTR_LINE_FIRST + 10) /* V3: 1010 V2: 1010 */
+#define XATTR_LINEJOINT TypedWhichId<XLineJointItem>(XATTR_LINE_FIRST + 11) /* V3: 1011 V2: 1011 */
+#define XATTR_LINECAP TypedWhichId<XLineCapItem>(XATTR_LINE_FIRST + 12) /* V3: 1012 */
#define XATTR_LINE_LAST XATTR_LINECAP
-#define XATTRSET_LINE (XATTR_LINE_LAST + 1) /* V3: 1017 V2: 1017 */
+#define XATTRSET_LINE TypedWhichId<XLineAttrSetItem>(XATTR_LINE_LAST + 1) /* V3: 1017 V2: 1017 */
-#define XATTR_FILL_FIRST (XATTRSET_LINE + 1) /* V3: 1018 V2: 1018 */
-#define XATTR_FILLSTYLE XATTR_FILL_FIRST
-#define XATTR_FILLCOLOR (XATTR_FILL_FIRST + 1) /* V3: 1019 V2: 1019 */
-#define XATTR_FILLGRADIENT (XATTR_FILL_FIRST + 2) /* V3: 1020 V2: 1020 */
-#define XATTR_FILLHATCH (XATTR_FILL_FIRST + 3) /* V3: 1021 V2: 1021 */
-#define XATTR_FILLBITMAP (XATTR_FILL_FIRST + 4) /* V3: 1022 V2: 1022 */
-#define XATTR_FILLTRANSPARENCE (XATTR_FILL_FIRST + 5) /* V3: 1023 V2: 1023 */
-#define XATTR_GRADIENTSTEPCOUNT (XATTR_FILL_FIRST + 6) /* V3: 1024 V2: 1024 */
-#define XATTR_FILLBMP_TILE (XATTR_FILL_FIRST + 7) /* V3: 1025 V2: 1025 */
-#define XATTR_FILLBMP_POS (XATTR_FILL_FIRST + 8) /* V3: 1026 V2: 1026 */
-#define XATTR_FILLBMP_SIZEX (XATTR_FILL_FIRST + 9) /* V3: 1027 V2: 1027 */
-#define XATTR_FILLBMP_SIZEY (XATTR_FILL_FIRST + 10) /* V3: 1028 V2: 1028 */
-#define XATTR_FILLFLOATTRANSPARENCE (XATTR_FILL_FIRST + 11) /* V3: 1029 V2: 1029 */
-#define XATTR_SECONDARYFILLCOLOR (XATTR_FILL_FIRST + 12) /* V3: 1030 */
-#define XATTR_FILLBMP_SIZELOG (XATTR_FILL_FIRST + 13) /* V3: 1031 */
-#define XATTR_FILLBMP_TILEOFFSETX (XATTR_FILL_FIRST + 14) /* V3: 1032 */
-#define XATTR_FILLBMP_TILEOFFSETY (XATTR_FILL_FIRST + 15) /* V3: 1033 */
-#define XATTR_FILLBMP_STRETCH (XATTR_FILL_FIRST + 16) /* V3: 1034 */
-#define XATTR_FILLBMP_POSOFFSETX (XATTR_FILL_FIRST + 17) /* V3: 1041 */
-#define XATTR_FILLBMP_POSOFFSETY (XATTR_FILL_FIRST + 18) /* V3: 1042 */
-#define XATTR_FILLBACKGROUND (XATTR_FILL_FIRST + 19) /* V3: 1043 */
-#define XATTR_FILL_LAST XATTR_FILLBACKGROUND
-#define XATTRSET_FILL (XATTR_FILL_LAST + 1) /* V3: 1047 V2: 1030 */
+#define XATTR_FILL_FIRST sal_uInt16(XATTRSET_LINE + 1) /* V3: 1018 V2: 1018 */
+#define XATTR_FILLSTYLE TypedWhichId<XFillStyleItem>(XATTR_FILL_FIRST)
+#define XATTR_FILLCOLOR TypedWhichId<XFillColorItem>(XATTR_FILL_FIRST + 1) /* V3: 1019 V2: 1019 */
+#define XATTR_FILLGRADIENT TypedWhichId<XFillGradientItem>(XATTR_FILL_FIRST + 2) /* V3: 1020 V2: 1020 */
+#define XATTR_FILLHATCH TypedWhichId<XFillHatchItem>(XATTR_FILL_FIRST + 3) /* V3: 1021 V2: 1021 */
+#define XATTR_FILLBITMAP TypedWhichId<XFillBitmapItem>(XATTR_FILL_FIRST + 4) /* V3: 1022 V2: 1022 */
+#define XATTR_FILLTRANSPARENCE TypedWhichId<XFillTransparenceItem>(XATTR_FILL_FIRST + 5) /* V3: 1023 V2: 1023 */
+#define XATTR_GRADIENTSTEPCOUNT TypedWhichId<XGradientStepCountItem>(XATTR_FILL_FIRST + 6) /* V3: 1024 V2: 1024 */
+#define XATTR_FILLBMP_TILE TypedWhichId<XFillBmpTileItem>(XATTR_FILL_FIRST + 7) /* V3: 1025 V2: 1025 */
+#define XATTR_FILLBMP_POS TypedWhichId<XFillBmpPosItem>(XATTR_FILL_FIRST + 8) /* V3: 1026 V2: 1026 */
+#define XATTR_FILLBMP_SIZEX TypedWhichId<SfxMetricItem>(XATTR_FILL_FIRST + 9) /* V3: 1027 V2: 1027 */
+#define XATTR_FILLBMP_SIZEY TypedWhichId<XFillBmpSizeYItem>(XATTR_FILL_FIRST + 10) /* V3: 1028 V2: 1028 */
+#define XATTR_FILLFLOATTRANSPARENCE TypedWhichId<XFillFloatTransparenceItem>(XATTR_FILL_FIRST + 11) /* V3: 1029 V2: 1029 */
+#define XATTR_SECONDARYFILLCOLOR TypedWhichId<XSecondaryFillColorItem>(XATTR_FILL_FIRST + 12) /* V3: 1030 */
+#define XATTR_FILLBMP_SIZELOG TypedWhichId<XFillBmpSizeLogItem>(XATTR_FILL_FIRST + 13) /* V3: 1031 */
+#define XATTR_FILLBMP_TILEOFFSETX TypedWhichId<XFillBmpTileOffsetXItem>(XATTR_FILL_FIRST + 14) /* V3: 1032 */
+#define XATTR_FILLBMP_TILEOFFSETY TypedWhichId<XFillBmpTileOffsetYItem>(XATTR_FILL_FIRST + 15) /* V3: 1033 */
+#define XATTR_FILLBMP_STRETCH TypedWhichId<XFillBmpStretchItem>(XATTR_FILL_FIRST + 16) /* V3: 1034 */
+#define XATTR_FILLBMP_POSOFFSETX TypedWhichId<XFillBmpPosOffsetXItem>(XATTR_FILL_FIRST + 17) /* V3: 1041 */
+#define XATTR_FILLBMP_POSOFFSETY TypedWhichId<XFillBmpPosOffsetYItem>(XATTR_FILL_FIRST + 18) /* V3: 1042 */
+#define XATTR_FILLBACKGROUND TypedWhichId<XFillBackgroundItem>(XATTR_FILL_FIRST + 19) /* V3: 1043 */
+#define XATTR_FILL_LAST sal_uInt16(XATTR_FILLBACKGROUND)
+#define XATTRSET_FILL TypedWhichId<XFillAttrSetItem>(XATTR_FILL_LAST + 1) /* V3: 1047 V2: 1030 */
#define XATTR_TEXT_FIRST (XATTRSET_FILL + 1)
-#define XATTR_FORMTXTSTYLE XATTR_TEXT_FIRST /* V3: 1048 V2: 1031 */
-#define XATTR_FORMTXTADJUST (XATTR_TEXT_FIRST + 1) /* V3: 1049 V2: 1032 */
-#define XATTR_FORMTXTDISTANCE (XATTR_TEXT_FIRST + 2) /* V3: 1050 V2: 1033 */
-#define XATTR_FORMTXTSTART (XATTR_TEXT_FIRST + 3) /* V3: 1051 V2: 1034 */
-#define XATTR_FORMTXTMIRROR (XATTR_TEXT_FIRST + 4) /* V3: 1052 V2: 1035 */
-#define XATTR_FORMTXTOUTLINE (XATTR_TEXT_FIRST + 5) /* V3: 1053 V2: 1036 */
-#define XATTR_FORMTXTSHADOW (XATTR_TEXT_FIRST + 6) /* V3: 1054 V2: 1037 */
-#define XATTR_FORMTXTSHDWCOLOR (XATTR_TEXT_FIRST + 7) /* V3: 1055 V2: 1038 */
-#define XATTR_FORMTXTSHDWXVAL (XATTR_TEXT_FIRST + 8) /* V3: 1056 V2: 1039 */
-#define XATTR_FORMTXTSHDWYVAL (XATTR_TEXT_FIRST + 9) /* V3: 1057 V2: 1040 */
-#define XATTR_FORMTXTHIDEFORM (XATTR_TEXT_FIRST + 10) /* V3: 1059 V2: 1042 */
-#define XATTR_FORMTXTSHDWTRANSP (XATTR_TEXT_FIRST + 11) /* V3: 1060 V2: 1043 */
+#define XATTR_FORMTXTSTYLE TypedWhichId<XFormTextStyleItem>(XATTR_TEXT_FIRST) /* V3: 1048 V2: 1031 */
+#define XATTR_FORMTXTADJUST TypedWhichId<XFormTextAdjustItem>(XATTR_TEXT_FIRST + 1) /* V3: 1049 V2: 1032 */
+#define XATTR_FORMTXTDISTANCE TypedWhichId<XFormTextDistanceItem>(XATTR_TEXT_FIRST + 2) /* V3: 1050 V2: 1033 */
+#define XATTR_FORMTXTSTART TypedWhichId<XFormTextStartItem>(XATTR_TEXT_FIRST + 3) /* V3: 1051 V2: 1034 */
+#define XATTR_FORMTXTMIRROR TypedWhichId<XFormTextMirrorItem>(XATTR_TEXT_FIRST + 4) /* V3: 1052 V2: 1035 */
+#define XATTR_FORMTXTOUTLINE TypedWhichId<XFormTextOutlineItem>(XATTR_TEXT_FIRST + 5) /* V3: 1053 V2: 1036 */
+#define XATTR_FORMTXTSHADOW TypedWhichId<XFormTextShadowItem>(XATTR_TEXT_FIRST + 6) /* V3: 1054 V2: 1037 */
+#define XATTR_FORMTXTSHDWCOLOR TypedWhichId<XFormTextShadowColorItem>(XATTR_TEXT_FIRST + 7) /* V3: 1055 V2: 1038 */
+#define XATTR_FORMTXTSHDWXVAL TypedWhichId<XFormTextShadowXValItem>(XATTR_TEXT_FIRST + 8) /* V3: 1056 V2: 1039 */
+#define XATTR_FORMTXTSHDWYVAL TypedWhichId<XFormTextShadowYValItem>(XATTR_TEXT_FIRST + 9) /* V3: 1057 V2: 1040 */
+#define XATTR_FORMTXTHIDEFORM TypedWhichId<XFormTextHideFormItem>(XATTR_TEXT_FIRST + 10) /* V3: 1059 V2: 1042 */
+#define XATTR_FORMTXTSHDWTRANSP TypedWhichId<XFormTextShadowTranspItem>(XATTR_TEXT_FIRST + 11) /* V3: 1060 V2: 1043 */
#define XATTR_TEXT_LAST XATTR_FORMTXTSHDWTRANSP
#define XATTR_END XATTR_TEXT_LAST