summaryrefslogtreecommitdiff
path: root/lingucomponent
diff options
context:
space:
mode:
authorKenneth Venken <kenneth.venken@gmail.com>2010-10-15 18:15:35 +0100
committerMichael Meeks <michael.meeks@novell.com>2010-10-15 18:15:35 +0100
commit359030e13cfba00f3151aa77e3ec2d09b788a520 (patch)
tree33a23e33f74df010e6750096d9f90968d0507ed2 /lingucomponent
parentf99ac70389ce3f060ff084c6e70797ad695e9fde (diff)
SAL_N_ELEMENTS changes for components
Diffstat (limited to 'lingucomponent')
-rw-r--r--lingucomponent/source/languageguessing/guesslang.cxx4
-rw-r--r--lingucomponent/source/lingutil/lingutil.cxx4
2 files changed, 5 insertions, 3 deletions
diff --git a/lingucomponent/source/languageguessing/guesslang.cxx b/lingucomponent/source/languageguessing/guesslang.cxx
index bb8099aff..d6b2c3c24 100644
--- a/lingucomponent/source/languageguessing/guesslang.cxx
+++ b/lingucomponent/source/languageguessing/guesslang.cxx
@@ -49,6 +49,8 @@
#include <unotools/localfilehelper.hxx>
#include <osl/thread.h>
+#include <sal/macros.h>
+
using namespace ::rtl;
using namespace ::osl;
using namespace ::cppu;
@@ -172,7 +174,7 @@ void LangGuess_Impl::EnsureInitialized()
{"sa", ""}, {"ta", ""}, {"th", ""},
{"qu", ""}, {"yi", ""}
};
- sal_Int32 nNum = sizeof(aDisable) / sizeof(aDisable[0]);
+ sal_Int32 nNum = SAL_N_ELEMENTS(aDisable);
Sequence< Locale > aDisableSeq( nNum );
Locale *pDisableSeq = aDisableSeq.getArray();
for (sal_Int32 i = 0; i < nNum; ++i)
diff --git a/lingucomponent/source/lingutil/lingutil.cxx b/lingucomponent/source/lingutil/lingutil.cxx
index 273239a35..728a67399 100644
--- a/lingucomponent/source/lingutil/lingutil.cxx
+++ b/lingucomponent/source/lingutil/lingutil.cxx
@@ -60,7 +60,7 @@
#include <lingutil.hxx>
#include <dictmgr.hxx>
-
+#include <sal/macros.h>
using ::com::sun::star::lang::Locale;
@@ -88,7 +88,7 @@ rtl::OString Win_GetShortPathName( const rtl::OUString &rLongPathName )
rtl::OString aRes;
sal_Unicode aShortBuffer[1024] = {0};
- sal_Int32 nShortBufSize = sizeof( aShortBuffer ) / sizeof( aShortBuffer[0] );
+ sal_Int32 nShortBufSize = SAL_N_ELEMENTS( aShortBuffer );
// use the version of 'GetShortPathName' that can deal with Unicode...
sal_Int32 nShortLen = GetShortPathNameW(