summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorKenneth Venken <kenneth.venken@gmail.com>2010-12-03 13:59:47 +0000
committerNoel Power <noel.power@novell.com>2010-12-03 13:59:47 +0000
commit39fc2df3c1d8e8bc8b689e2d21c193bc4886bf8c (patch)
treec663b430fd156eab527bbc3efa3def2b85b8ede2 /extensions
parent0bdef7cec695042a2259c327fc4ea84c74babd0f (diff)
more Sal n elements
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/nsplugin/source/so_main.cxx4
-rw-r--r--extensions/source/propctrlr/formmetadata.cxx4
-rw-r--r--extensions/source/update/check/updatecheck.cxx5
-rw-r--r--extensions/source/update/check/updatecheckconfig.cxx3
4 files changed, 9 insertions, 7 deletions
diff --git a/extensions/source/nsplugin/source/so_main.cxx b/extensions/source/nsplugin/source/so_main.cxx
index 76381fab9c61..f2f6c131d610 100644
--- a/extensions/source/nsplugin/source/so_main.cxx
+++ b/extensions/source/nsplugin/source/so_main.cxx
@@ -66,6 +66,7 @@
#include "nsp_func.hxx"
#include "sal/main.h"
+#include <sal/macros.h>
#include "rtl/process.h"
#include "rtl/bootstrap.hxx"
@@ -85,7 +86,6 @@
#include "com/sun/star/bridge/XUnoUrlResolver.hpp"
#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
-#define ARLEN(x) sizeof (x) / sizeof *(x)
using namespace ::rtl;
using namespace ::osl;
@@ -389,7 +389,7 @@ Reference< lang::XMultiServiceFactory > SAL_CALL start_office(NSP_PIPE_FD read_f
oslProcessError rc = osl_executeProcess(
aOfficePath.pData,
ar_args,
- ARLEN( ar_args ),
+ SAL_N_ELEMENTS( ar_args ),
osl_Process_DETACHED,
sec.getHandle(),
0, // => current working dir
diff --git a/extensions/source/propctrlr/formmetadata.cxx b/extensions/source/propctrlr/formmetadata.cxx
index d4790a44350b..a5b26feaf9ca 100644
--- a/extensions/source/propctrlr/formmetadata.cxx
+++ b/extensions/source/propctrlr/formmetadata.cxx
@@ -36,7 +36,7 @@
#include <svtools/localresaccess.hxx>
#include <tools/debug.hxx>
#include <cppuhelper/extract.hxx>
-
+#include <sal/macros.h>
#include <algorithm>
#include <functional>
@@ -360,7 +360,7 @@ namespace pcr
};
s_pPropertyInfos = aPropertyInfos;
- s_nCount = sizeof(aPropertyInfos) / sizeof(OPropertyInfoImpl);
+ s_nCount = SAL_N_ELEMENTS(aPropertyInfos);
// sort
::std::sort( s_pPropertyInfos, s_pPropertyInfos + s_nCount, PropertyInfoLessByName() );
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx
index ccfcda6157cb..5e42f7f0fa00 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -49,6 +49,7 @@
#include <osl/process.h>
#include <osl/module.hxx>
#include <osl/file.hxx>
+#include <sal/macros.h>
#ifdef WNT
#ifdef _MSC_VER
@@ -577,7 +578,7 @@ UpdateCheckThread::run()
// Increase next by 15, 60, .. minutes
static const sal_Int32 nRetryInterval[] = { 900, 3600, 14400, 86400 };
- if( n < sizeof(nRetryInterval) / sizeof(sal_Int32) )
+ if( n < SAL_N_ELEMENTS(nRetryInterval) )
++n;
tv.Seconds = nRetryInterval[n-1];
@@ -689,7 +690,7 @@ DownloadThread::run()
// Increase next by 1, 5, 15, 60, .. minutes
static const sal_Int16 nRetryInterval[] = { 60, 300, 900, 3600 };
- if( n < sizeof(nRetryInterval) / sizeof(sal_Int16) )
+ if( n < SAL_N_ELEMENTS(nRetryInterval) )
++n;
tv.Seconds = nRetryInterval[n-1];
diff --git a/extensions/source/update/check/updatecheckconfig.cxx b/extensions/source/update/check/updatecheckconfig.cxx
index f897eb668b3e..854638c26e52 100644
--- a/extensions/source/update/check/updatecheckconfig.cxx
+++ b/extensions/source/update/check/updatecheckconfig.cxx
@@ -39,6 +39,7 @@
#include <osl/security.hxx>
#include <osl/time.h>
#include <osl/file.hxx>
+#include <sal/macros.h>
#ifdef WNT
#ifdef _MSC_VER
@@ -91,7 +92,7 @@ static const sal_Char * const aUpdateEntryProperties[] = {
OLD_VERSION
};
-static const sal_uInt32 nUpdateEntryProperties = sizeof(aUpdateEntryProperties) / sizeof(sal_Char *);
+static const sal_uInt32 nUpdateEntryProperties = SAL_N_ELEMENTS(aUpdateEntryProperties);
//------------------------------------------------------------------------------