[Libreoffice-commits] core.git: 2 commits - oox/source pyuno/source registry/source remotebridges/source sal/osl sal/rtl sax/source sc/source
Takeshi Abe
tabe at fixedpoint.jp
Thu Aug 15 06:13:14 PDT 2013
oox/source/drawingml/customshapegeometry.cxx | 38 +++++++--------
pyuno/source/loader/pyuno_loader.cxx | 2
registry/source/reflread.cxx | 4 -
remotebridges/source/unourl_resolver/unourl_resolver.cxx | 2
sal/osl/unx/socket.c | 16 +++---
sal/rtl/locale.cxx | 2
sax/source/tools/converter.cxx | 2
sc/source/core/data/colorscale.cxx | 36 +++++++-------
8 files changed, 51 insertions(+), 51 deletions(-)
New commits:
commit 10cbb13f723e4466165aa9ca392cd2d6ccb50748
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Thu Aug 15 22:04:54 2013 +0900
sal_Bool to bool
Change-Id: If1d8a48e115cd7fbaa0032791275b3b49684d748
diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx
index 6952c06..526ea26 100644
--- a/oox/source/drawingml/customshapegeometry.cxx
+++ b/oox/source/drawingml/customshapegeometry.cxx
@@ -223,12 +223,12 @@ OUString GetFormulaParameter( const EnhancedCustomShapeParameter& rParameter )
// ---------------------------------------------------------------------
-static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCustomShapeProperties, const OUString& rValue, sal_Bool bNoSymbols = sal_True )
+static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCustomShapeProperties, const OUString& rValue, bool bNoSymbols = true )
{
com::sun::star::drawing::EnhancedCustomShapeParameter aRet;
if ( !rValue.isEmpty() )
{
- sal_Bool bConstant = sal_True;
+ bool bConstant = true;
sal_Int32 nConstant = -1;
sal_Int32 nIntVal = 0;
@@ -387,7 +387,7 @@ static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCu
break;
default:
- bConstant = sal_False;
+ bConstant = false;
break;
}
if ( bConstant )
@@ -488,7 +488,7 @@ static OUString convertToOOEquation( CustomShapeProperties& rCustomShapeProperti
OUString sParameters[ 3 ];
for ( i = 0; i < nParameters; i++ )
- sParameters[ i ] = GetFormulaParameter( GetAdjCoordinate( rCustomShapeProperties, aTokens[ i + 1 ], sal_False ) );
+ sParameters[ i ] = GetFormulaParameter( GetAdjCoordinate( rCustomShapeProperties, aTokens[ i + 1 ], false ) );
const FormulaCommandHMap::const_iterator aIter( pCommandHashMap->find( aTokens[ 0 ] ) );
if ( aIter != pCommandHashMap->end() )
@@ -654,8 +654,8 @@ public:
AdjPoint2DContext::AdjPoint2DContext( ContextHandler2Helper& rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D )
: ContextHandler2( rParent )
{
- rAdjPoint2D.First = GetAdjCoordinate( rCustomShapeProperties, rAttribs.getString( XML_x ).get(), sal_True );
- rAdjPoint2D.Second = GetAdjCoordinate( rCustomShapeProperties, rAttribs.getString( XML_y ).get(), sal_True );
+ rAdjPoint2D.First = GetAdjCoordinate( rCustomShapeProperties, rAttribs.getString( XML_x ).get(), true );
+ rAdjPoint2D.Second = GetAdjCoordinate( rCustomShapeProperties, rAttribs.getString( XML_y ).get(), true );
}
// ---------------------------------------------------------------------
@@ -683,11 +683,11 @@ XYAdjustHandleContext::XYAdjustHandleContext( ContextHandler2Helper& rParent, co
}
if ( rAttribs.hasAttribute( XML_minX ) )
{
- mrAdjustHandle.min1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minX, aEmptyDefault ), sal_True );
+ mrAdjustHandle.min1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minX, aEmptyDefault ), true );
}
if ( rAttribs.hasAttribute( XML_maxX ) )
{
- mrAdjustHandle.max1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxX, aEmptyDefault ), sal_True );
+ mrAdjustHandle.max1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxX, aEmptyDefault ), true );
}
if ( rAttribs.hasAttribute( XML_gdRefY ) )
{
@@ -695,11 +695,11 @@ XYAdjustHandleContext::XYAdjustHandleContext( ContextHandler2Helper& rParent, co
}
if ( rAttribs.hasAttribute( XML_minY ) )
{
- mrAdjustHandle.min2 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minY, aEmptyDefault ), sal_True );
+ mrAdjustHandle.min2 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minY, aEmptyDefault ), true );
}
if ( rAttribs.hasAttribute( XML_maxY ) )
{
- mrAdjustHandle.max2 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxY, aEmptyDefault ), sal_True );
+ mrAdjustHandle.max2 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxY, aEmptyDefault ), true );
}
}
@@ -735,11 +735,11 @@ PolarAdjustHandleContext::PolarAdjustHandleContext( ContextHandler2Helper& rPare
}
if ( rAttribs.hasAttribute( XML_minR ) )
{
- mrAdjustHandle.min1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minR, aEmptyDefault ), sal_True );
+ mrAdjustHandle.min1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minR, aEmptyDefault ), true );
}
if ( rAttribs.hasAttribute( XML_maxR ) )
{
- mrAdjustHandle.max1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxR, aEmptyDefault ), sal_True );
+ mrAdjustHandle.max1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxR, aEmptyDefault ), true );
}
if ( rAttribs.hasAttribute( XML_gdRefAng ) )
{
@@ -1079,8 +1079,8 @@ ContextHandlerRef Path2DContext::onCreateContext( sal_Int32 aElementToken,
EnhancedCustomShapeParameterPair aScale;
EnhancedCustomShapeParameterPair aAngles;
- aScale.First = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_wR ).get(), sal_True );
- aScale.Second = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_hR ).get(), sal_True );
+ aScale.First = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_wR ).get(), true );
+ aScale.Second = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_hR ).get(), true );
CustomShapeGuide aGuide;
sal_Int32 nArcNum = mrCustomShapeProperties.getArcNum();
@@ -1212,10 +1212,10 @@ ContextHandlerRef CustomShapeGeometryContext::onCreateContext( sal_Int32 aElemen
case A_TOKEN( rect ): // CT_GeomRectList geometry rect list
{
GeomRect aGeomRect;
- aGeomRect.l = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_l ).get(), sal_True );
- aGeomRect.t = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_t ).get(), sal_True );
- aGeomRect.r = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_r ).get(), sal_True );
- aGeomRect.b = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_b ).get(), sal_True );
+ aGeomRect.l = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_l ).get(), true );
+ aGeomRect.t = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_t ).get(), true );
+ aGeomRect.r = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_r ).get(), true );
+ aGeomRect.b = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_b ).get(), true );
mrCustomShapeProperties.getTextRect() = aGeomRect;
}
break;
commit 7ef72aefc6f1bf522e0c3f9f2afda5ff7851e35e
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Thu Aug 15 22:04:05 2013 +0900
Mark as const
Change-Id: Ic7ee570935b5d827dc01a483877ea5021da5abea
diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx
index 6ad190d..6952c06 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 718edc7..b9b5365 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 64e1de7..8c88e05 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 c8c26b2..3114b3e 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 d2e928d..1d51f38 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 0c47b95..d075eda 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 6cfe688..ac1d488 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 ddc9309..91f096e 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 },
More information about the Libreoffice-commits
mailing list