From 1b4997d7a84d1ea7de6be6099bddcc8c31c0146a Mon Sep 17 00:00:00 2001 From: Hossein Date: Mon, 12 Jul 2021 08:37:34 +0200 Subject: tdf#143305 Remove remaining SID collision in .hrc files There were some SID collisions in these files that should have been avoided: * include/sfx2/sfxsids.hrc * include/svx/svxids.hrc * include/editeng/editids.hrc This patch resolves this problem, filed as tdf#143305 Looking at b66d87086804460c1986df1b832fd6b2ea075a90 (2014-04-01) we read As commit 669ad519902e21e0cb3537fb7e203987f75a4077 (colliding SID_SVX_START based ids, 2013-06-24) suggests, new SID_SVX_START-based SID's shouldn't be added to include/editeng/editids.hrc. However, if it was done, at least add a comment about it to include/svx/svxids.hrc, so it becomes obvious that the two slots have the same ID. Also in include/sfx2/sfxsids.hrc:551 slot IDs from SVX (svxids.hrc) ------------------------------------ These SID_SVX_START entries came from include/svx/svxids.hrc, avoid accidentally colliding entries with include/svx/svxids.hrc and include/editeng/editids.hrc. Only add new SID_SVX_START entries to include/svx/svxids.hrc To make sure no collision is remaining, grep is used: git grep -h "SID_SVX_START[ ]*+" *.hrc | grep -Ev '^\s*\/\/' \ |awk -F\( {'print $2'} | awk -F\) {'print $1'} \ |awk '{gsub(/^ +| +$/,"")}1'|sort|uniq -c|grep " 2" It searches for 'SID_SVX_START +' in .hrc files, removes comments out of it, extracts the parts between paranthesis, trims spaces, sorts and then finds the number of unique occurances and looks for 2. Change-Id: Ife9b12c72ed5141a3404a291489dc1c11f4e967d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118544 Reviewed-by: Noel Grandin Reviewed-by: Mike Kaganski Tested-by: Mike Kaganski (cherry picked from commit 04c7c90fe886c5fcebd52f727ff8b4edb840ad32) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118799 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- include/svx/svxids.hrc | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) (limited to 'include') diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc index ac0373e2ad97..9cd52877bf63 100644 --- a/include/svx/svxids.hrc +++ b/include/svx/svxids.hrc @@ -202,15 +202,7 @@ class SdrAngleItem; #define SID_ATTR_BORDER_INNER TypedWhichId( SID_SVX_START + 23 ) -// CAUTION! Range <24 .. 43> used by EditEngine (!) - -#define SID_ATTR_POSTIT_AUTHOR TypedWhichId( SID_SVX_START + 44 ) -#define SID_ATTR_POSTIT_DATE TypedWhichId( SID_SVX_START + 45 ) -#define SID_ATTR_POSTIT_TEXT TypedWhichId( SID_SVX_START + 46 ) -#define SID_ATTR_POSTIT_ID TypedWhichId( SID_SVX_START + 47 ) -// free - -// CAUTION! Range <48 .. 49> used by EditEngine (!) +// CAUTION! Range <24 .. 49> used by EditEngine (!) #define SID_ATTR_PAGE TypedWhichId( SID_SVX_START + 50 ) #define SID_ATTR_PAGE_SIZE TypedWhichId( SID_SVX_START + 51 ) @@ -228,10 +220,7 @@ class SdrAngleItem; #define SID_ATTR_PAGE_LRSPACE TypedWhichId( SID_SVX_START + 62 ) #define SID_ATTR_PAGE_ULSPACE TypedWhichId( SID_SVX_START + 63 ) -// CAUTION! Range <64 .. 67> used by EditEngine (!) - -#define SID_ATTR_POSTIT_POSITION_X TypedWhichId( SID_SVX_START + 68 ) -#define SID_ATTR_POSTIT_POSITION_Y TypedWhichId( SID_SVX_START + 69 ) +// CAUTION! Range <64 .. 68> used by EditEngine (!) #define SID_RULER_CHANGE_STATE ( SID_SVX_START + 78 ) #define SID_RULER_NULL_OFFSET TypedWhichId( SID_SVX_START + 79 ) @@ -438,7 +427,7 @@ class SdrAngleItem; //#define SID_SIDEBAR ( SID_SVX_START + 336 ) -> sfxsids.hrc -#define SID_ATTR_TEXTCOLUMNS_NUMBER ( SID_SVX_START + 340) +#define SID_ATTR_TEXTCOLUMNS_NUMBER ( SID_SVX_START + 340 ) #define SID_ATTR_TEXTCOLUMNS_SPACING ( SID_SVX_START + 341 ) #define SID_SB_CONNECTIONPOOLING ( SID_SVX_START + 348 ) @@ -882,13 +871,8 @@ class SdrAngleItem; #define SID_INSERT_WJ ( SID_SVX_START + 1059 ) /* insert WJ - Word Joiner */ #define SID_OPTIONS_DATABASES ( SID_SVX_START + 1060 ) #define SID_OPEN_SMARTTAGMENU ( SID_SVX_START + 1061 ) -// (SID_SVX_START + 1062) is in include/sfx2/sfxsids.hrc -#define SID_INSERT_TREECONTROL ( SID_SVX_START + 1063 ) -#define SID_ATTR_VIEWLAYOUT ( SID_SVX_START + 1064 ) -#define SID_ATTR_ZOOMSLIDER ( SID_SVX_START + 1065 ) -#define SID_LANGUAGE_STATUS ( SID_SVX_START + 1067 ) -#define SID_CHAR_DLG_FOR_PARAGRAPH ( SID_SVX_START + 1068 ) -#define SID_SET_DOCUMENT_LANGUAGE ( SID_SVX_START + 1069 ) + +// CAUTION! Range <1062 .. 1069> used by include/sfx2/sfxsids.hrc #define SID_TABLE_MERGE_CELLS ( SID_SVX_START + 1070 ) #define SID_TABLE_SPLIT_CELLS ( SID_SVX_START + 1071 ) @@ -1032,8 +1016,23 @@ class SdrAngleItem; #define SID_MOVE_SHAPE_HANDLE ( SID_SVX_START + 1199 ) +#define SID_ATTR_POSTIT_AUTHOR TypedWhichId( SID_SVX_START + 1200 ) +#define SID_ATTR_POSTIT_DATE TypedWhichId( SID_SVX_START + 1201 ) +#define SID_ATTR_POSTIT_TEXT TypedWhichId( SID_SVX_START + 1202 ) +#define SID_ATTR_POSTIT_ID TypedWhichId( SID_SVX_START + 1203 ) + +#define SID_ATTR_POSTIT_POSITION_X TypedWhichId( SID_SVX_START + 1204 ) +#define SID_ATTR_POSTIT_POSITION_Y TypedWhichId( SID_SVX_START + 1205 ) + +#define SID_INSERT_TREECONTROL ( SID_SVX_START + 1206 ) +#define SID_ATTR_VIEWLAYOUT ( SID_SVX_START + 1207 ) +#define SID_ATTR_ZOOMSLIDER ( SID_SVX_START + 1208 ) +#define SID_LANGUAGE_STATUS ( SID_SVX_START + 1209 ) +#define SID_CHAR_DLG_FOR_PARAGRAPH ( SID_SVX_START + 1210 ) +#define SID_SET_DOCUMENT_LANGUAGE ( SID_SVX_START + 1211 ) + // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id -#define SID_SVX_FIRSTFREE ( SID_SVX_START + 1199 + 1 ) +#define SID_SVX_FIRSTFREE ( SID_SVX_START + 1211 + 1 ) // Overflow check for slot IDs -- cgit