[Libreoffice-commits] core.git: scaddins/source sd/source

Takeshi Abe tabe at fixedpoint.jp
Tue Jul 9 17:25:30 PDT 2013


 scaddins/source/datefunc/datefunc.cxx  |    2 +-
 sd/source/core/sdpage.cxx              |    6 +++---
 sd/source/filter/eppt/eppt.cxx         |    2 +-
 sd/source/filter/html/htmlex.cxx       |    2 +-
 sd/source/ui/table/TableDesignPane.cxx |    4 ++--
 sd/source/ui/unoidl/unoobj.cxx         |    2 +-
 6 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 6a9aa432f53b53310ce56588508d151e15112b16
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Wed Jul 10 09:09:14 2013 +0900

    Mark as const
    
    Change-Id: I7fe1441dc09301604bc7a96fa5d63cfa8ca72874

diff --git a/scaddins/source/datefunc/datefunc.cxx b/scaddins/source/datefunc/datefunc.cxx
index 8f016d6..07dcd84 100644
--- a/scaddins/source/datefunc/datefunc.cxx
+++ b/scaddins/source/datefunc/datefunc.cxx
@@ -532,7 +532,7 @@ sal_Bool IsLeapYear( sal_uInt16 nYear )
 
 sal_uInt16 DaysInMonth( sal_uInt16 nMonth, sal_uInt16 nYear )
 {
-    static sal_uInt16 aDaysInMonth[12] = { 31, 28, 31, 30, 31, 30,
+    static const sal_uInt16 aDaysInMonth[12] = { 31, 28, 31, 30, 31, 30,
                                         31, 31, 30, 31, 30, 31 };
 
     if ( nMonth != 2 )
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 5f70417..b714db9 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -1112,7 +1112,7 @@ LayoutDescriptor::LayoutDescriptor( int nLayout, int k0, int k1, int k2, int k3,
 
 static const LayoutDescriptor& GetLayoutDescriptor( AutoLayout eLayout )
 {
-    static LayoutDescriptor aLayouts[AUTOLAYOUT__END-AUTOLAYOUT__START] =
+    static const LayoutDescriptor aLayouts[AUTOLAYOUT__END-AUTOLAYOUT__START] =
     {
         LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_TEXT ),                                 // AUTOLAYOUT_TITLE
         LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_OUTLINE ),                              // AUTOLAYOUT_ENUM
@@ -2881,7 +2881,7 @@ void SdPage::CalculateHandoutAreas( SdDrawDocument& rModel, AutoLayout eLayout,
 
         const bool bLandscape = aArea.Width() > aArea.Height();
 
-        static sal_uInt16 aOffsets[5][9] =
+        static const sal_uInt16 aOffsets[5][9] =
         {
             { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, // AUTOLAYOUT_HANDOUT9, Portrait, Horizontal order
             { 0, 2, 4, 1, 3, 5, 0, 0, 0 }, // AUTOLAYOUT_HANDOUT3, Landscape, Vertical
@@ -2890,7 +2890,7 @@ void SdPage::CalculateHandoutAreas( SdDrawDocument& rModel, AutoLayout eLayout,
             { 0, 3, 6, 1, 4, 7, 2, 5, 8 }, // AUTOLAYOUT_HANDOUT9, Landscape, Vertical
         };
 
-        sal_uInt16* pOffsets = aOffsets[0];
+        const sal_uInt16* pOffsets = aOffsets[0];
         sal_uInt16  nColCnt = 0, nRowCnt = 0;
         switch ( eLayout )
         {
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index d7eeb5d..4debddf 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -502,7 +502,7 @@ sal_Bool PPTWriter::ImplCreateDocumentSummaryInformation()
     if (xDocProps.is()) {
 
         // no idea what this is...
-        static sal_uInt8 aGuid[ 0x52 ] =
+        static const sal_uInt8 aGuid[ 0x52 ] =
         {
             0x4e, 0x00, 0x00, 0x00,
             '{',0,'D',0,'B',0,'1',0,'A',0,'C',0,'9',0,'6',0,'4',0,'-',0,
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 3bbbf63..adf36cb 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -2735,7 +2735,7 @@ String HtmlExport::CreateImage( const String& aImage, const String& aAltText,
 // =====================================================================
 String HtmlExport::ColorToHTMLString( Color aColor )
 {
-    static char hex[] = "0123456789ABCDEF";
+    static const char hex[] = "0123456789ABCDEF";
     String aStr( "#xxxxxx" );
     aStr.SetChar(1, hex[(aColor.GetRed() >> 4) & 0xf] );
     aStr.SetChar(2, hex[aColor.GetRed()   & 0xf] );
diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx
index 484b467..adeecf6 100644
--- a/sd/source/ui/table/TableDesignPane.cxx
+++ b/sd/source/ui/table/TableDesignPane.cxx
@@ -330,7 +330,7 @@ IMPL_LINK_NOARG(TableDesignPane, implCheckBoxHdl)
 
 void TableDesignPane::ApplyOptions()
 {
-    static sal_uInt16 gParamIds[CB_BANDED_COLUMNS-CB_HEADER_ROW+1] =
+    static const sal_uInt16 gParamIds[CB_BANDED_COLUMNS-CB_HEADER_ROW+1] =
     {
         ID_VAL_USEFIRSTROWSTYLE, ID_VAL_USELASTROWSTYLE, ID_VAL_USEBANDINGROWSTYLE,
         ID_VAL_USEFIRSTCOLUMNSTYLE, ID_VAL_USELASTCOLUMNSTYLE, ID_VAL_USEBANDINGCOLUMNSTYLE
@@ -523,7 +523,7 @@ void TableDesignPane::updateLayout()
 
 void TableDesignPane::updateControls()
 {
-    static sal_Bool gDefaults[CB_BANDED_COLUMNS-CB_HEADER_ROW+1] = { sal_True, sal_False, sal_True, sal_False, sal_False, sal_False };
+    static const sal_Bool gDefaults[CB_BANDED_COLUMNS-CB_HEADER_ROW+1] = { sal_True, sal_False, sal_True, sal_False, sal_False, sal_False };
 
     const bool bHasTable = mxSelectedTable.is();
     const OUString* pPropNames = getPropertyNames();
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index 1b9590b..2444d69 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -258,7 +258,7 @@ static SdTypesCache gImplTypesCache;
     }
     static const SfxItemPropertyMapEntry* lcl_GetEmpty_SdXShapePropertyMap_Impl()
     {
-        static SfxItemPropertyMapEntry aEmpty_SdXShapePropertyMap_Impl[] =
+        static const SfxItemPropertyMapEntry aEmpty_SdXShapePropertyMap_Impl[] =
         {
             { 0,0,0,0,0,0}
         };


More information about the Libreoffice-commits mailing list