summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2013-08-15 22:04:05 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2013-08-15 22:09:58 +0900
commit7ef72aefc6f1bf522e0c3f9f2afda5ff7851e35e (patch)
treeeb51b70e78012113d274e3bedc67b6ebc7101c00
parent03f973ccefd07dbceaa4993206ee4f2f1296d321 (diff)
Mark as const
Change-Id: Ic7ee570935b5d827dc01a483877ea5021da5abea
-rw-r--r--oox/source/drawingml/customshapegeometry.cxx2
-rw-r--r--pyuno/source/loader/pyuno_loader.cxx2
-rw-r--r--registry/source/reflread.cxx4
-rw-r--r--remotebridges/source/unourl_resolver/unourl_resolver.cxx2
-rw-r--r--sal/osl/unx/socket.c16
-rw-r--r--sal/rtl/locale.cxx2
-rw-r--r--sax/source/tools/converter.cxx2
-rw-r--r--sc/source/core/data/colorscale.cxx36
8 files changed, 33 insertions, 33 deletions
diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx
index 6ad190d16a58..6952c06abb8b 100644
--- a/oox/source/drawingml/customshapegeometry.cxx
+++ b/oox/source/drawingml/customshapegeometry.cxx
@@ -61,7 +61,7 @@ struct FormularCommandNameTable
const char* pS;
FormularCommand pE;
};
-static FormularCommandNameTable pFormularCommandNameTable[] =
+static const FormularCommandNameTable pFormularCommandNameTable[] =
{
{ "*/", FC_MULDIV },
{ "+-", FC_PLUSMINUS },
diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx
index 718edc744b46..b9b53657ce04 100644
--- a/pyuno/source/loader/pyuno_loader.cxx
+++ b/pyuno/source/loader/pyuno_loader.cxx
@@ -252,7 +252,7 @@ Reference< XInterface > CreateInstance( const Reference< XComponentContext > & c
}
-static struct cppu::ImplementationEntry g_entries[] =
+static const struct cppu::ImplementationEntry g_entries[] =
{
{
pyuno_loader::CreateInstance, pyuno_loader::getImplementationName,
diff --git a/registry/source/reflread.cxx b/registry/source/reflread.cxx
index 64e1de75460e..8c88e05a7254 100644
--- a/registry/source/reflread.cxx
+++ b/registry/source/reflread.cxx
@@ -33,8 +33,8 @@
#include <cstddef>
-static sal_Char NULL_STRING[1] = { 0 };
-static sal_Unicode NULL_WSTRING[1] = { 0 };
+static const sal_Char NULL_STRING[1] = { 0 };
+static const sal_Unicode NULL_WSTRING[1] = { 0 };
const sal_uInt32 magic = 0x12345678;
const sal_uInt16 minorVersion = 0x0000;
diff --git a/remotebridges/source/unourl_resolver/unourl_resolver.cxx b/remotebridges/source/unourl_resolver/unourl_resolver.cxx
index c8c26b2b29f3..3114b3ee3eef 100644
--- a/remotebridges/source/unourl_resolver/unourl_resolver.cxx
+++ b/remotebridges/source/unourl_resolver/unourl_resolver.cxx
@@ -172,7 +172,7 @@ static Reference< XInterface > SAL_CALL ResolverImpl_create( const Reference< XC
using namespace unourl_resolver;
-static struct ImplementationEntry g_entries[] =
+static const struct ImplementationEntry g_entries[] =
{
{
ResolverImpl_create, resolver_getImplementationName,
diff --git a/sal/osl/unx/socket.c b/sal/osl/unx/socket.c
index d2e928dec7af..1d51f3805d59 100644
--- a/sal/osl/unx/socket.c
+++ b/sal/osl/unx/socket.c
@@ -97,7 +97,7 @@
/*****************************************************************************/
/* map */
-static unsigned long FamilyMap[]= {
+static const unsigned long FamilyMap[]= {
AF_INET, /* osl_Socket_FamilyInet */
AF_IPX, /* osl_Socket_FamilyIpx */
0 /* osl_Socket_FamilyInvalid */
@@ -127,7 +127,7 @@ static oslAddrFamily osl_AddrFamilyFromNative(sal_uInt32 nativeType)
/*****************************************************************************/
/* map */
-static sal_uInt32 ProtocolMap[]= {
+static const sal_uInt32 ProtocolMap[]= {
0, /* osl_Socket_ProtocolIp */
NSPROTO_IPX, /* osl_Socket_ProtocolIpx */
NSPROTO_SPX, /* osl_Socket_ProtocolSpx */
@@ -161,7 +161,7 @@ static oslProtocol osl_ProtocolFromNative(sal_uInt32 nativeType)
/*****************************************************************************/
/* map */
-static sal_uInt32 TypeMap[]= {
+static const sal_uInt32 TypeMap[]= {
SOCK_STREAM, /* osl_Socket_TypeStream */
SOCK_DGRAM, /* osl_Socket_TypeDgram */
SOCK_RAW, /* osl_Socket_TypeRaw */
@@ -195,7 +195,7 @@ static oslSocketType osl_SocketTypeFromNative(sal_uInt32 nativeType)
/*****************************************************************************/
/* map */
-static sal_uInt32 OptionMap[]= {
+static const sal_uInt32 OptionMap[]= {
SO_DEBUG, /* osl_Socket_OptionDebug */
SO_ACCEPTCONN, /* osl_Socket_OptionAcceptConn */
SO_REUSEADDR, /* osl_Socket_OptionReuseAddr */
@@ -240,7 +240,7 @@ static oslSocketOption osl_SocketOptionFromNative(sal_uInt32 nativeType)
/* enum oslSocketOptionLevel */
/*****************************************************************************/
-static sal_uInt32 OptionLevelMap[]= {
+static const sal_uInt32 OptionLevelMap[]= {
SOL_SOCKET, /* osl_Socket_LevelSocket */
IPPROTO_TCP, /* osl_Socket_LevelTcp */
0 /* osl_Socket_LevelInvalid */
@@ -269,7 +269,7 @@ static oslSocketOptionLevel osl_SocketOptionLevelFromNative(sal_uInt32 nativeTyp
/* enum oslSocketMsgFlag */
/*****************************************************************************/
-static sal_uInt32 SocketMsgFlagMap[]= {
+static const sal_uInt32 SocketMsgFlagMap[]= {
0, /* osl_Socket_MsgNormal */
MSG_OOB, /* osl_Socket_MsgOOB */
MSG_PEEK, /* osl_Socket_MsgPeek */
@@ -302,7 +302,7 @@ static oslSocketMsgFlag osl_SocketMsgFlagFromNative(sal_uInt32 nativeType)
/* enum oslSocketDirection */
/*****************************************************************************/
-static sal_uInt32 SocketDirection[]= {
+static const sal_uInt32 SocketDirection[]= {
SD_RECEIVE, /* osl_Socket_DirRead */
SD_SEND, /* osl_Socket_DirWrite */
SD_BOTH, /* osl_Socket_DirReadWrite */
@@ -333,7 +333,7 @@ static oslSocketDirection osl_SocketDirectionFromNative(sal_uInt32 nativeType)
/* enum oslSocketError */
/*****************************************************************************/
-static struct
+static const struct
{
int errcode;
oslSocketError error;
diff --git a/sal/rtl/locale.cxx b/sal/rtl/locale.cxx
index 0c47b95cb3dc..d075eda742f1 100644
--- a/sal/rtl/locale.cxx
+++ b/sal/rtl/locale.cxx
@@ -24,7 +24,7 @@
#include "internal/rtllifecycle.h"
-static sal_Int32 RTL_HASHTABLE_SIZE[] =
+static const sal_Int32 RTL_HASHTABLE_SIZE[] =
{
7, 31, 127, 251, 509, 1021, 2039, 4093
};
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index 6cfe6880856a..ac1d488ba76d 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -496,7 +496,7 @@ bool Converter::convertColor( sal_Int32& rColor, const OUString& rValue )
return true;
}
-static sal_Char aHexTab[] = "0123456789abcdef";
+static const sal_Char aHexTab[] = "0123456789abcdef";
/** convert color to string */
void Converter::convertColor( OUStringBuffer& rBuffer, sal_Int32 nColor )
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index ddc93093d7ff..91f096e4e37f 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -1182,83 +1182,83 @@ ScIconSetMap* ScIconSetFormat::getIconSetMap()
namespace {
-sal_Int32 a3TrafficLights1[] = {
+const sal_Int32 a3TrafficLights1[] = {
BMP_ICON_SET_CIRCLES1_RED, BMP_ICON_SET_CIRCLES1_YELLOW, BMP_ICON_SET_CIRCLES1_GREEN
};
-sal_Int32 a3TrafficLights2[] = {
+const sal_Int32 a3TrafficLights2[] = {
BMP_ICON_SET_TRAFFICLIGHTS_RED, BMP_ICON_SET_TRAFFICLIGHTS_YELLOW, BMP_ICON_SET_TRAFFICLIGHTS_GREEN
};
-sal_Int32 a3Arrows[] = {
+const sal_Int32 a3Arrows[] = {
BMP_ICON_SET_COLORARROWS_DOWN, BMP_ICON_SET_COLORARROWS_SAME, BMP_ICON_SET_COLORARROWS_UP
};
-sal_Int32 a3ArrowsGray[] = {
+const sal_Int32 a3ArrowsGray[] = {
BMP_ICON_SET_GRAYARROWS_DOWN, BMP_ICON_SET_GRAYARROWS_SAME, BMP_ICON_SET_GRAYARROWS_UP
};
-sal_Int32 a3Flags[] = {
+const sal_Int32 a3Flags[] = {
BMP_ICON_SET_FLAGS_RED, BMP_ICON_SET_FLAGS_YELLOW, BMP_ICON_SET_FLAGS_GREEN
};
-sal_Int32 a4Arrows[] = {
+const sal_Int32 a4Arrows[] = {
BMP_ICON_SET_COLORARROWS_DOWN, BMP_ICON_SET_COLORARROWS_SLIGHTLY_DOWN, BMP_ICON_SET_COLORARROWS_SLIGHTLY_UP, BMP_ICON_SET_COLORARROWS_UP
};
-sal_Int32 a4ArrowsGray[] = {
+const sal_Int32 a4ArrowsGray[] = {
BMP_ICON_SET_GRAYARROWS_DOWN, BMP_ICON_SET_GRAYARROWS_SLIGHTLY_DOWN, BMP_ICON_SET_GRAYARROWS_SLIGHTLY_UP, BMP_ICON_SET_GRAYARROWS_UP
};
-sal_Int32 a5Arrows[] = {
+const sal_Int32 a5Arrows[] = {
BMP_ICON_SET_COLORARROWS_DOWN, BMP_ICON_SET_COLORARROWS_SLIGHTLY_DOWN,
BMP_ICON_SET_COLORARROWS_SAME, BMP_ICON_SET_COLORARROWS_SLIGHTLY_UP, BMP_ICON_SET_COLORARROWS_UP
};
-sal_Int32 a5ArrowsGray[] = {
+const sal_Int32 a5ArrowsGray[] = {
BMP_ICON_SET_GRAYARROWS_DOWN, BMP_ICON_SET_GRAYARROWS_SLIGHTLY_DOWN,
BMP_ICON_SET_GRAYARROWS_SAME, BMP_ICON_SET_GRAYARROWS_SLIGHTLY_UP, BMP_ICON_SET_GRAYARROWS_UP
};
-sal_Int32 a4TrafficLights[] = {
+const sal_Int32 a4TrafficLights[] = {
BMP_ICON_SET_CIRCLES1_GRAY, BMP_ICON_SET_CIRCLES1_RED,
BMP_ICON_SET_CIRCLES1_YELLOW, BMP_ICON_SET_CIRCLES1_GREEN
};
-sal_Int32 a5Quarters[] = {
+const sal_Int32 a5Quarters[] = {
BMP_ICON_SET_PIES_EMPTY, BMP_ICON_SET_PIES_ONE_QUARTER, BMP_ICON_SET_PIES_HALF,
BMP_ICON_SET_PIES_THREE_QUARTER, BMP_ICON_SET_PIES_FULL,
};
-sal_Int32 a3Symbols1[] = {
+const sal_Int32 a3Symbols1[] = {
BMP_ICON_SET_SYMBOLS1_CROSS, BMP_ICON_SET_SYMBOLS1_EXCLAMATION_MARK, BMP_ICON_SET_SYMBOLS1_CHECK
};
-sal_Int32 a3Signs[] = {
+const sal_Int32 a3Signs[] = {
BMP_ICON_SET_SHAPES_DIAMOND, BMP_ICON_SET_SHAPES_TRIANGLE, BMP_ICON_SET_SHAPES_CIRCLE
};
-sal_Int32 a4RedToBlack[] = {
+const sal_Int32 a4RedToBlack[] = {
BMP_ICON_SET_CIRCLES2_DARK_GRAY, BMP_ICON_SET_CIRCLES2_LIGHT_GRAY,
BMP_ICON_SET_CIRCLES2_LIGHT_RED, BMP_ICON_SET_CIRCLES2_DARK_RED
};
-sal_Int32 a4Ratings[] = {
+const sal_Int32 a4Ratings[] = {
BMP_ICON_SET_BARS_ONE_QUARTER, BMP_ICON_SET_BARS_HALF,
BMP_ICON_SET_BARS_THREE_QUARTER, BMP_ICON_SET_BARS_FULL
};
-sal_Int32 a5Ratings[] = {
+const sal_Int32 a5Ratings[] = {
BMP_ICON_SET_BARS_EMPTY, BMP_ICON_SET_BARS_ONE_QUARTER, BMP_ICON_SET_BARS_HALF,
BMP_ICON_SET_BARS_THREE_QUARTER, BMP_ICON_SET_BARS_FULL
};
struct ScIconSetBitmapMap {
ScIconSetType eType;
- sal_Int32* nBitmaps;
+ const sal_Int32* nBitmaps;
};
-static ScIconSetBitmapMap aBitmapMap[] = {
+static const ScIconSetBitmapMap aBitmapMap[] = {
{ IconSet_3Arrows, a3Arrows },
{ IconSet_3ArrowsGray, a3ArrowsGray },
{ IconSet_3Flags, a3Flags },