diff options
author | Kenneth Venken <kenneth.venken@gmail.com> | 2010-10-15 18:15:35 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2010-10-15 18:15:35 +0100 |
commit | 394235bba1f7c474c9655f929f4fe27a550aba45 (patch) | |
tree | 266bd52b9f0b82dc5b21c4c7a9d829fb1ff87003 /lingucomponent | |
parent | 7d4ffef8b74cd9ac2959006bac8d5c582b313e61 (diff) |
SAL_N_ELEMENTS changes for components
Diffstat (limited to 'lingucomponent')
-rw-r--r-- | lingucomponent/source/languageguessing/guesslang.cxx | 4 | ||||
-rw-r--r-- | lingucomponent/source/lingutil/lingutil.cxx | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lingucomponent/source/languageguessing/guesslang.cxx b/lingucomponent/source/languageguessing/guesslang.cxx index 1ce4bd493ddf..0efe7eebf200 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 77875a3d049d..de7cdc3f4539 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( |