[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - include/svx

Hossein (via logerrit) logerrit at kemper.freedesktop.org
Tue Jul 13 12:33:27 UTC 2021


 include/svx/svxids.hrc |   43 +++++++++++++++++++++----------------------
 1 file changed, 21 insertions(+), 22 deletions(-)

New commits:
commit 1b4997d7a84d1ea7de6be6099bddcc8c31c0146a
Author:     Hossein <hossein at libreoffice.org>
AuthorDate: Mon Jul 12 08:37:34 2021 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Jul 13 14:32:51 2021 +0200

    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 <noel.grandin at collabora.co.uk>
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    Tested-by: Mike Kaganski <mike.kaganski at collabora.com>
    (cherry picked from commit 04c7c90fe886c5fcebd52f727ff8b4edb840ad32)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118799
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

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<SvxBoxInfoItem>( SID_SVX_START + 23 )
 
-// CAUTION! Range <24 .. 43> used by EditEngine (!)
-
-#define SID_ATTR_POSTIT_AUTHOR                          TypedWhichId<SvxPostItAuthorItem>( SID_SVX_START + 44 )
-#define SID_ATTR_POSTIT_DATE                            TypedWhichId<SvxPostItDateItem>( SID_SVX_START + 45 )
-#define SID_ATTR_POSTIT_TEXT                            TypedWhichId<SvxPostItTextItem>( SID_SVX_START + 46 )
-#define SID_ATTR_POSTIT_ID                              TypedWhichId<SvxPostItIdItem>( SID_SVX_START + 47 )
-// free
-
-// CAUTION! Range <48 .. 49> used by EditEngine (!)
+// CAUTION! Range <24 .. 49> used by EditEngine (!)
 
 #define SID_ATTR_PAGE                                   TypedWhichId<SvxPageItem>( SID_SVX_START + 50 )
 #define SID_ATTR_PAGE_SIZE                              TypedWhichId<SvxSizeItem>( SID_SVX_START + 51 )
@@ -228,10 +220,7 @@ class SdrAngleItem;
 #define SID_ATTR_PAGE_LRSPACE                           TypedWhichId<SvxLongLRSpaceItem>( SID_SVX_START + 62 )
 #define SID_ATTR_PAGE_ULSPACE                           TypedWhichId<SvxLongULSpaceItem>( SID_SVX_START + 63 )
 
-// CAUTION! Range <64 .. 67> used by EditEngine (!)
-
-#define SID_ATTR_POSTIT_POSITION_X                      TypedWhichId<SfxInt32Item>( SID_SVX_START + 68 )
-#define SID_ATTR_POSTIT_POSITION_Y                      TypedWhichId<SfxInt32Item>( 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<SfxPointItem>( 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<SvxPostItAuthorItem>( SID_SVX_START + 1200 )
+#define SID_ATTR_POSTIT_DATE                            TypedWhichId<SvxPostItDateItem>( SID_SVX_START + 1201 )
+#define SID_ATTR_POSTIT_TEXT                            TypedWhichId<SvxPostItTextItem>( SID_SVX_START + 1202 )
+#define SID_ATTR_POSTIT_ID                              TypedWhichId<SvxPostItIdItem>( SID_SVX_START + 1203 )
+
+#define SID_ATTR_POSTIT_POSITION_X                      TypedWhichId<SfxInt32Item>( SID_SVX_START + 1204 )
+#define SID_ATTR_POSTIT_POSITION_Y                      TypedWhichId<SfxInt32Item>( 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


More information about the Libreoffice-commits mailing list