[Libreoffice-commits] core.git: sw/inc sw/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Wed Apr 10 08:45:06 UTC 2019


 sw/inc/hintids.hxx                              |   24 ++++++++++++------------
 sw/source/core/bastyp/init.cxx                  |   24 ++++++++++++------------
 sw/source/core/doc/DocumentStylePoolManager.cxx |    2 +-
 3 files changed, 25 insertions(+), 25 deletions(-)

New commits:
commit c602bbaa89784681025ae487ad230ed0e86e9acb
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Apr 10 09:22:07 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Apr 10 10:44:39 2019 +0200

    constify some which range arrays
    
    Change-Id: I1c94090c4846e232bd6bb9c86a0c94b750ccbf5c
    Reviewed-on: https://gerrit.libreoffice.org/70499
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx
index a52c6f40a59d..609c705b1c20 100644
--- a/sw/inc/hintids.hxx
+++ b/sw/inc/hintids.hxx
@@ -420,29 +420,29 @@ sal_Unicode GetCharOfTextAttr( const SwTextAttr& rAttr );
 // all Sets defined in init.cxx
 
 // AttrSet-Range for the 3 Break-Attribute
-extern sal_uInt16 aBreakSetRange[];
+extern sal_uInt16 const aBreakSetRange[];
 // AttrSet-Range for TextFormatColl
-extern sal_uInt16 aTextFormatCollSetRange[];
+extern sal_uInt16 const aTextFormatCollSetRange[];
 // AttrSet-Range for GrfFormatColl
-extern sal_uInt16 aGrfFormatCollSetRange[];
+extern sal_uInt16 const aGrfFormatCollSetRange[];
 // AttrSet-Range for TextNode
-SW_DLLPUBLIC extern sal_uInt16 aTextNodeSetRange[];
+SW_DLLPUBLIC extern sal_uInt16 const aTextNodeSetRange[];
 // AttrSet-Range for NoTextNode
-extern sal_uInt16 aNoTextNodeSetRange[];
+extern sal_uInt16 const aNoTextNodeSetRange[];
 // AttrSet-Range for SwTable
-extern sal_uInt16 aTableSetRange[];
+extern sal_uInt16 const aTableSetRange[];
 // AttrSet-Range for SwTableLine
-extern sal_uInt16 aTableLineSetRange[];
+extern sal_uInt16 const aTableLineSetRange[];
 // AttrSet-Range for SwTableBox
-extern sal_uInt16 aTableBoxSetRange[];
+extern sal_uInt16 const aTableBoxSetRange[];
 // AttrSet-Range for SwFrameFormat
-SW_DLLPUBLIC extern sal_uInt16 aFrameFormatSetRange[];
+SW_DLLPUBLIC extern sal_uInt16 const aFrameFormatSetRange[];
 // AttrSet-Range for SwCharFormat
-extern sal_uInt16 aCharFormatSetRange[];
+extern sal_uInt16 const aCharFormatSetRange[];
 // AttrSet-Range for the autostyles
-extern sal_uInt16 aCharAutoFormatSetRange[];
+extern sal_uInt16 const aCharAutoFormatSetRange[];
 // AttrSet-Range for SwPageDescFormat
-extern sal_uInt16 aPgFrameFormatSetRange[];
+extern sal_uInt16 const aPgFrameFormatSetRange[];
 
 // check if ID is InRange of AttrSet-Ids
 bool IsInRange( const sal_uInt16* pRange, const sal_uInt16 nId );
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index 3986bab90e51..4245a2284878 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -134,7 +134,7 @@ using namespace ::com::sun::star;
 // some ranges for sets in collections/ nodes
 
 // AttrSet range for the 2 break attributes
-sal_uInt16 aBreakSetRange[] = {
+sal_uInt16 const aBreakSetRange[] = {
     RES_PAGEDESC, RES_BREAK,
     0
 };
@@ -142,7 +142,7 @@ sal_uInt16 aBreakSetRange[] = {
 // AttrSet range for TextFormatColl
 // list attributes ( RES_PARATR_LIST_BEGIN - RES_PARATR_LIST_END ) are not
 // included in the paragraph style's itemset.
-sal_uInt16 aTextFormatCollSetRange[] = {
+sal_uInt16 const aTextFormatCollSetRange[] = {
     RES_FRMATR_BEGIN, RES_FRMATR_END-1,
     RES_CHRATR_BEGIN, RES_CHRATR_END-1,
     RES_PARATR_BEGIN, RES_PARATR_END-1,
@@ -155,7 +155,7 @@ sal_uInt16 aTextFormatCollSetRange[] = {
 };
 
 // AttrSet range for GrfFormatColl
-sal_uInt16 aGrfFormatCollSetRange[] = {
+sal_uInt16 const aGrfFormatCollSetRange[] = {
     RES_FRMATR_BEGIN, RES_FRMATR_END-1,
     RES_GRFATR_BEGIN, RES_GRFATR_END-1,
     RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
@@ -163,7 +163,7 @@ sal_uInt16 aGrfFormatCollSetRange[] = {
 };
 
 // AttrSet range for TextNode
-sal_uInt16 aTextNodeSetRange[] = {
+sal_uInt16 const aTextNodeSetRange[] = {
     RES_FRMATR_BEGIN, RES_FRMATR_END-1,
     RES_CHRATR_BEGIN, RES_CHRATR_END-1,
     RES_PARATR_BEGIN, RES_PARATR_END-1,
@@ -177,14 +177,14 @@ sal_uInt16 aTextNodeSetRange[] = {
 };
 
 // AttrSet range for NoTextNode
-sal_uInt16 aNoTextNodeSetRange[] = {
+sal_uInt16 const aNoTextNodeSetRange[] = {
     RES_FRMATR_BEGIN, RES_FRMATR_END-1,
     RES_GRFATR_BEGIN, RES_GRFATR_END-1,
     RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
     0
 };
 
-sal_uInt16 aTableSetRange[] = {
+sal_uInt16 const aTableSetRange[] = {
     RES_FILL_ORDER,     RES_FRM_SIZE,
     RES_LR_SPACE,       RES_BREAK,
     RES_BACKGROUND,     RES_SHADOW,
@@ -200,7 +200,7 @@ sal_uInt16 aTableSetRange[] = {
     0
 };
 
-sal_uInt16 aTableLineSetRange[] = {
+sal_uInt16 const aTableLineSetRange[] = {
     RES_FILL_ORDER,     RES_FRM_SIZE,
     RES_LR_SPACE,       RES_UL_SPACE,
     RES_BACKGROUND,     RES_SHADOW,
@@ -212,7 +212,7 @@ sal_uInt16 aTableLineSetRange[] = {
     0
 };
 
-sal_uInt16 aTableBoxSetRange[] = {
+sal_uInt16 const aTableBoxSetRange[] = {
     RES_FILL_ORDER,     RES_FRM_SIZE,
     RES_LR_SPACE,       RES_UL_SPACE,
     RES_BACKGROUND,     RES_SHADOW,
@@ -226,7 +226,7 @@ sal_uInt16 aTableBoxSetRange[] = {
 };
 
 // AttrSet range for SwFrameFormat
-sal_uInt16 aFrameFormatSetRange[] = {
+sal_uInt16 const aFrameFormatSetRange[] = {
     RES_FRMATR_BEGIN, RES_FRMATR_END-1,
     RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
 
@@ -237,14 +237,14 @@ sal_uInt16 aFrameFormatSetRange[] = {
 };
 
 // AttrSet range for SwCharFormat
-sal_uInt16 aCharFormatSetRange[] = {
+sal_uInt16 const aCharFormatSetRange[] = {
     RES_CHRATR_BEGIN, RES_CHRATR_END-1,
     RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
     0
 };
 
 // AttrSet range for character autostyles
-sal_uInt16 aCharAutoFormatSetRange[] = {
+sal_uInt16 const aCharAutoFormatSetRange[] = {
     RES_CHRATR_BEGIN, RES_CHRATR_END-1,
     RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER,
     RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
@@ -252,7 +252,7 @@ sal_uInt16 aCharAutoFormatSetRange[] = {
 };
 
 // AttrSet range for SwPageDescFormat
-sal_uInt16 aPgFrameFormatSetRange[] = {
+sal_uInt16 const aPgFrameFormatSetRange[] = {
     RES_FRMATR_BEGIN, RES_FRMATR_END-1,
     RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
     0
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx
index 19c09209e1bf..097f8479239e 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -1403,7 +1403,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId )
     SwFormatsBase* pArray[ 2 ];
     sal_uInt16 nArrCnt = 1;
     const char* pRCId = nullptr;
-    sal_uInt16* pWhichRange = nullptr;
+    sal_uInt16 const * pWhichRange = nullptr;
 
     switch( nId & (COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID) )
     {


More information about the Libreoffice-commits mailing list