[Libreoffice-commits] core.git: 2 commits - editeng/source extensions/source forms/source framework/source

Takeshi Abe tabe at fixedpoint.jp
Fri Jul 26 18:09:12 PDT 2013


 editeng/source/items/borderline.cxx                         |    4 -
 editeng/source/items/itemtype.cxx                           |    2 
 editeng/source/uno/unofield.cxx                             |   33 +++++-------
 extensions/source/bibliography/bibload.cxx                  |    2 
 extensions/source/propctrlr/formcomponenthandler.cxx        |    4 -
 forms/source/misc/limitedformats.cxx                        |    4 -
 framework/source/fwe/classes/imagewrapper.cxx               |    4 -
 framework/source/fwe/classes/rootactiontriggercontainer.cxx |    4 -
 8 files changed, 26 insertions(+), 31 deletions(-)

New commits:
commit 826be413d6f3242ee5c5672ca0f1f2f8ac6b417a
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Sat Jul 27 10:05:44 2013 +0900

    Mark as const/static
    
    Change-Id: I9000ea607e1df140ac18d59f7c4d4abd999c71d1

diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx
index 70ff353..47bb613 100644
--- a/editeng/source/items/borderline.cxx
+++ b/editeng/source/items/borderline.cxx
@@ -426,7 +426,7 @@ void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sa
 
     if ( nStyle == DOUBLE )
     {
-        static SvxBorderStyle aDoubleStyles[] =
+        static const SvxBorderStyle aDoubleStyles[] =
         {
             DOUBLE,
             THINTHICK_SMALLGAP,
@@ -437,7 +437,7 @@ void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sa
             THICKTHIN_LARGEGAP
         };
 
-        size_t const len = SAL_N_ELEMENTS(aDoubleStyles);
+        static size_t const len = SAL_N_ELEMENTS(aDoubleStyles);
         long nWidth = 0;
         SvxBorderStyle nTestStyle(NONE);
         for (size_t i = 0; i < len && nWidth == 0; ++i)
diff --git a/editeng/source/items/itemtype.cxx b/editeng/source/items/itemtype.cxx
index 58506af..519471c 100644
--- a/editeng/source/items/itemtype.cxx
+++ b/editeng/source/items/itemtype.cxx
@@ -143,7 +143,7 @@ XubString GetColorString( const Color& rCol )
         RGB_COLORDATA( rCol.GetRed(), rCol.GetGreen(), rCol.GetBlue() );
     sal_uInt16 nColor = 0;
 
-    static ColorData aColAry[] = {
+    static const ColorData aColAry[] = {
         COL_BLACK, COL_BLUE, COL_GREEN, COL_CYAN,
         COL_RED, COL_MAGENTA, COL_BROWN, COL_GRAY,
         COL_LIGHTGRAY, COL_LIGHTBLUE, COL_LIGHTGREEN, COL_LIGHTCYAN,
diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx
index e2c87be..aef8c65 100644
--- a/editeng/source/uno/unofield.cxx
+++ b/editeng/source/uno/unofield.cxx
@@ -69,7 +69,7 @@ public:
 
 const SfxItemPropertySet* ImplGetFieldItemPropertySet( sal_Int32 mnId )
 {
-    static SfxItemPropertyMapEntry aExDateTimeFieldPropertyMap_Impl[] =
+    static const SfxItemPropertyMapEntry aExDateTimeFieldPropertyMap_Impl[] =
     {
         { MAP_CHAR_LEN(UNO_TC_PROP_DATE_TIME), WID_DATE,  &::getCppuType((const util::DateTime*)0), 0, 0 },
         { MAP_CHAR_LEN(UNO_TC_PROP_IS_FIXED),  WID_BOOL1, &::getBooleanCppuType(),                  0, 0 },
@@ -77,16 +77,16 @@ const SfxItemPropertySet* ImplGetFieldItemPropertySet( sal_Int32 mnId )
         { MAP_CHAR_LEN(UNO_TC_PROP_NUMFORMAT), WID_INT32, &::getCppuType((const sal_Int32*)0),      0, 0 },
         {0,0,0,0,0,0}
     };
-    static SfxItemPropertySet aExDateTimeFieldPropertySet_Impl(aExDateTimeFieldPropertyMap_Impl);
+    static const SfxItemPropertySet aExDateTimeFieldPropertySet_Impl(aExDateTimeFieldPropertyMap_Impl);
 
-    static SfxItemPropertyMapEntry aDateTimeFieldPropertyMap_Impl[] =
+    static const SfxItemPropertyMapEntry aDateTimeFieldPropertyMap_Impl[] =
     {
         { MAP_CHAR_LEN(UNO_TC_PROP_IS_DATE), WID_BOOL2, &::getBooleanCppuType(), 0, 0 },
         {0,0,0,0,0,0}
     };
-    static SfxItemPropertySet aDateTimeFieldPropertySet_Impl(aDateTimeFieldPropertyMap_Impl);
+    static const SfxItemPropertySet aDateTimeFieldPropertySet_Impl(aDateTimeFieldPropertyMap_Impl);
 
-    static SfxItemPropertyMapEntry aUrlFieldPropertyMap_Impl[] =
+    static const SfxItemPropertyMapEntry aUrlFieldPropertyMap_Impl[] =
     {
 
         { MAP_CHAR_LEN(UNO_TC_PROP_URL_FORMAT),         WID_INT16,   &::getCppuType((const sal_Int16*)0), 0, 0 },
@@ -95,24 +95,24 @@ const SfxItemPropertySet* ImplGetFieldItemPropertySet( sal_Int32 mnId )
         { MAP_CHAR_LEN(UNO_TC_PROP_URL),                WID_STRING3, &::getCppuType((const OUString*)0),  0, 0 },
         {0,0,0,0,0,0}
     };
-    static SfxItemPropertySet aUrlFieldPropertySet_Impl(aUrlFieldPropertyMap_Impl);
+    static const SfxItemPropertySet aUrlFieldPropertySet_Impl(aUrlFieldPropertyMap_Impl);
 
-    static SfxItemPropertyMapEntry aEmptyPropertyMap_Impl[] =
+    static const SfxItemPropertyMapEntry aEmptyPropertyMap_Impl[] =
     {
         {0,0,0,0,0,0}
     };
-    static SfxItemPropertySet aEmptyPropertySet_Impl(aEmptyPropertyMap_Impl);
+    static const SfxItemPropertySet aEmptyPropertySet_Impl(aEmptyPropertyMap_Impl);
 
-    static SfxItemPropertyMapEntry aExtFileFieldPropertyMap_Impl[] =
+    static const SfxItemPropertyMapEntry aExtFileFieldPropertyMap_Impl[] =
     {
         { MAP_CHAR_LEN(UNO_TC_PROP_IS_FIXED),             WID_BOOL1,   &::getBooleanCppuType(),             0, 0 },
         { MAP_CHAR_LEN(UNO_TC_PROP_FILE_FORMAT),          WID_INT16,   &::getCppuType((const sal_Int16*)0), 0, 0 },
         { MAP_CHAR_LEN(UNO_TC_PROP_CURRENT_PRESENTATION), WID_STRING1, &::getCppuType((const OUString*)0),  0, 0 },
         {0,0,0,0,0,0}
     };
-    static SfxItemPropertySet aExtFileFieldPropertySet_Impl(aExtFileFieldPropertyMap_Impl);
+    static const SfxItemPropertySet aExtFileFieldPropertySet_Impl(aExtFileFieldPropertyMap_Impl);
 
-    static SfxItemPropertyMapEntry aAuthorFieldPropertyMap_Impl[] =
+    static const SfxItemPropertyMapEntry aAuthorFieldPropertyMap_Impl[] =
     {
         { MAP_CHAR_LEN(UNO_TC_PROP_IS_FIXED),             WID_BOOL1,  &::getBooleanCppuType(),             0, 0 },
         { MAP_CHAR_LEN(UNO_TC_PROP_CURRENT_PRESENTATION), WID_STRING1,&::getCppuType((const OUString*)0),  0, 0 },
@@ -121,14 +121,14 @@ const SfxItemPropertySet* ImplGetFieldItemPropertySet( sal_Int32 mnId )
         { MAP_CHAR_LEN(UNO_TC_PROP_AUTHOR_FULLNAME),      WID_BOOL2,  &::getBooleanCppuType(),             0, 0 },
         {0,0,0,0,0,0}
     };
-    static SfxItemPropertySet aAuthorFieldPropertySet_Impl(aAuthorFieldPropertyMap_Impl);
+    static const SfxItemPropertySet aAuthorFieldPropertySet_Impl(aAuthorFieldPropertyMap_Impl);
 
-    static SfxItemPropertyMapEntry aMeasureFieldPropertyMap_Impl[] =
+    static const SfxItemPropertyMapEntry aMeasureFieldPropertyMap_Impl[] =
     {
         { MAP_CHAR_LEN(UNO_TC_PROP_MEASURE_KIND), WID_INT16,  &::getCppuType((const sal_Int16*)0), 0, 0 },
         {0,0,0,0,0,0}
     };
-    static SfxItemPropertySet aMeasureFieldPropertySet_Impl(aMeasureFieldPropertyMap_Impl);
+    static const SfxItemPropertySet aMeasureFieldPropertySet_Impl(aMeasureFieldPropertyMap_Impl);
 
     switch( mnId )
     {
diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx
index 29b7f6c..9d6c6e7 100644
--- a/extensions/source/bibliography/bibload.cxx
+++ b/extensions/source/bibliography/bibload.cxx
@@ -579,7 +579,7 @@ sal_Bool BibliographyLoader::hasElements(void) throw ( RuntimeException )
 Reference< XPropertySetInfo >  BibliographyLoader::getPropertySetInfo(void) throw
                                             ( RuntimeException )
 {
-    static SfxItemPropertyMapEntry aBibProps_Impl[] =
+    static const SfxItemPropertyMapEntry aBibProps_Impl[] =
     {
         { MAP_CHAR_LEN("BibliographyDataFieldNames"), 0, &::getCppuType((Sequence<PropertyValue>*)0), PropertyAttribute::READONLY, 0},
         {0,0,0,0,0,0}
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index b324eda..d3d670a 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -181,7 +181,7 @@ namespace pcr
         sal_Int32   nPropNameLength;
     };
 
-    static LanguageDependentProp aLanguageDependentProp[] =
+    static const LanguageDependentProp aLanguageDependentProp[] =
     {
         { "Text",            4 },
         { "Label",           5 },
@@ -198,7 +198,7 @@ namespace pcr
         {
             bool bRet = false;
 
-            LanguageDependentProp* pLangDepProp = aLanguageDependentProp;
+            const LanguageDependentProp* pLangDepProp = aLanguageDependentProp;
             while( pLangDepProp->pPropName != 0 )
             {
                 if( aName.equalsAsciiL( pLangDepProp->pPropName, pLangDepProp->nPropNameLength ))
diff --git a/forms/source/misc/limitedformats.cxx b/forms/source/misc/limitedformats.cxx
index 7054db2..ab13dc7 100644
--- a/forms/source/misc/limitedformats.cxx
+++ b/forms/source/misc/limitedformats.cxx
@@ -90,7 +90,7 @@ namespace frm
         {
             case FormComponentType::TIMEFIELD:
             {
-                static FormatEntry s_aFormats[] = {
+                static const FormatEntry s_aFormats[] = {
                     { "HH:MM", -1, ltEnglishUS },
                     { "HH:MM:SS", -1, ltEnglishUS },
                     { "HH:MM AM/PM", -1, ltEnglishUS },
@@ -103,7 +103,7 @@ namespace frm
             }
             case FormComponentType::DATEFIELD:
             {
-                static FormatEntry s_aFormats[] = {
+                static const FormatEntry s_aFormats[] = {
                     { "T-M-JJ", -1, ltGerman },
                     { "TT-MM-JJ", -1, ltGerman },
                     { "TT-MM-JJJJ", -1, ltGerman },
diff --git a/framework/source/fwe/classes/imagewrapper.cxx b/framework/source/fwe/classes/imagewrapper.cxx
index ac42ab5..42b2586 100644
--- a/framework/source/fwe/classes/imagewrapper.cxx
+++ b/framework/source/fwe/classes/imagewrapper.cxx
@@ -35,8 +35,8 @@ namespace framework
 
 static Sequence< sal_Int8 > impl_getStaticIdentifier()
 {
-    static sal_uInt8 pGUID[16] = { 0x46, 0xAD, 0x69, 0xFB, 0xA7, 0xBE, 0x44, 0x83, 0xB2, 0xA7, 0xB3, 0xEC, 0x59, 0x4A, 0xB7, 0x00 };
-    static ::com::sun::star::uno::Sequence< sal_Int8 > seqID((sal_Int8*)pGUID,16) ;
+    static const sal_uInt8 pGUID[16] = { 0x46, 0xAD, 0x69, 0xFB, 0xA7, 0xBE, 0x44, 0x83, 0xB2, 0xA7, 0xB3, 0xEC, 0x59, 0x4A, 0xB7, 0x00 };
+    static ::com::sun::star::uno::Sequence< sal_Int8 > seqID((const sal_Int8*)pGUID,16) ;
     return seqID ;
 }
 
diff --git a/framework/source/fwe/classes/rootactiontriggercontainer.cxx b/framework/source/fwe/classes/rootactiontriggercontainer.cxx
index 6f67b8a..96869c6 100644
--- a/framework/source/fwe/classes/rootactiontriggercontainer.cxx
+++ b/framework/source/fwe/classes/rootactiontriggercontainer.cxx
@@ -41,8 +41,8 @@ namespace framework
 
 static Sequence< sal_Int8 > impl_getStaticIdentifier()
 {
-    static sal_uInt8 pGUID[16] = { 0x17, 0x0F, 0xA2, 0xC9, 0xCA, 0x50, 0x4A, 0xD3, 0xA6, 0x3B, 0x39, 0x99, 0xC5, 0x96, 0x43, 0x27 };
-    static ::com::sun::star::uno::Sequence< sal_Int8 > seqID((sal_Int8*)pGUID,16) ;
+    static const sal_uInt8 pGUID[16] = { 0x17, 0x0F, 0xA2, 0xC9, 0xCA, 0x50, 0x4A, 0xD3, 0xA6, 0x3B, 0x39, 0x99, 0xC5, 0x96, 0x43, 0x27 };
+    static ::com::sun::star::uno::Sequence< sal_Int8 > seqID((const sal_Int8*)pGUID,16) ;
     return seqID ;
 }
 
commit d976a9d3eea065f116d7ee17731fa68a9ea1b5c1
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Sat Jul 27 10:05:02 2013 +0900

    Drop unused inline function
    
    Change-Id: Ibc0d19861cf86cfdbef48010dd4099768e7ee767

diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx
index 86a039b..e2c87be 100644
--- a/editeng/source/uno/unofield.cxx
+++ b/editeng/source/uno/unofield.cxx
@@ -52,11 +52,6 @@ using namespace ::com::sun::star;
 #define WID_STRING2 6
 #define WID_STRING3 7
 
-inline bool isValidFieldId(sal_Int32 nId)
-{
-    return nId >= 0;
-}
-
 class SvxUnoFieldData_Impl
 {
 public:


More information about the Libreoffice-commits mailing list