diff options
author | Kenneth Venken <kenneth.venken@gmail.com> | 2010-12-03 13:59:12 +0000 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2010-12-03 13:59:12 +0000 |
commit | f8e081876fa321cbf6072472ef5b5ee0aa050260 (patch) | |
tree | d5ed7d15a5116d3aa23833fd8e8e2aa03889cd1d /scaddins/source | |
parent | e057b44e97769763c7284ac784081706c8d76b92 (diff) |
more Sal n elements
Diffstat (limited to 'scaddins/source')
-rw-r--r-- | scaddins/source/analysis/analysis.cxx | 3 | ||||
-rw-r--r-- | scaddins/source/analysis/analysishelper.cxx | 5 | ||||
-rw-r--r-- | scaddins/source/datefunc/datefunc.cxx | 6 |
3 files changed, 6 insertions, 8 deletions
diff --git a/scaddins/source/analysis/analysis.cxx b/scaddins/source/analysis/analysis.cxx index ea52bdfee002..758324346a21 100644 --- a/scaddins/source/analysis/analysis.cxx +++ b/scaddins/source/analysis/analysis.cxx @@ -32,6 +32,7 @@ #include <osl/diagnose.h> #include <rtl/ustrbuf.hxx> #include <rtl/math.hxx> +#include <sal/macros.h> #include <string.h> #include <tools/resmgr.hxx> @@ -510,7 +511,7 @@ STRING SAL_CALL AnalysisAddIn::getDisplayCategoryName( const STRING& aProgrammat static const sal_Char* pLang[] = { "de", "en" }; static const sal_Char* pCoun[] = { "DE", "US" }; -static const sal_uInt32 nNumOfLoc = sizeof( pLang ) / sizeof( sal_Char* ); +static const sal_uInt32 nNumOfLoc = SAL_N_ELEMENTS(pLang); void AnalysisAddIn::InitDefLocales( void ) diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx index 4f0711678a03..c2e61f567157 100644 --- a/scaddins/source/analysis/analysishelper.cxx +++ b/scaddins/source/analysis/analysishelper.cxx @@ -32,6 +32,7 @@ #include <stdio.h> #include <tools/resary.hxx> #include <rtl/math.hxx> +#include <sal/macros.h> #include "analysishelper.hxx" #include "analysis.hrc" @@ -1413,9 +1414,7 @@ sal_uInt16 FuncData::GetStrIndex( sal_uInt16 nParamNum ) const FuncDataList::FuncDataList( ResMgr& rResMgr ) { - const sal_uInt32 nNum = sizeof( pFuncDatas ) / sizeof( FuncDataBase ); - - for( sal_uInt16 n = 0 ; n < nNum ; n++ ) + for( sal_uInt16 n = 0 ; n < SAL_N_ELEMENTS(pFuncDatas) ; n++ ) Append( new FuncData( pFuncDatas[ n ], rResMgr ) ); } diff --git a/scaddins/source/datefunc/datefunc.cxx b/scaddins/source/datefunc/datefunc.cxx index fb2d6b2e82f8..68f26f3b81de 100644 --- a/scaddins/source/datefunc/datefunc.cxx +++ b/scaddins/source/datefunc/datefunc.cxx @@ -178,9 +178,7 @@ sal_uInt16 ScaFuncData::GetStrIndex( sal_uInt16 nParam ) const ScaFuncDataList::ScaFuncDataList( ResMgr& rResMgr ) : nLast( 0xFFFFFFFF ) { - const sal_uInt32 nCnt = sizeof( pFuncDataArr ) / sizeof( ScaFuncDataBase ); - - for( sal_uInt16 nIndex = 0; nIndex < nCnt; nIndex++ ) + for( sal_uInt16 nIndex = 0; nIndex < SAL_N_ELEMENTS(pFuncDataArr); nIndex++ ) Append( new ScaFuncData( pFuncDataArr[ nIndex ], rResMgr ) ); } @@ -323,7 +321,7 @@ ScaDateAddIn::~ScaDateAddIn() static const sal_Char* pLang[] = { "de", "en" }; static const sal_Char* pCoun[] = { "DE", "US" }; -static const sal_uInt32 nNumOfLoc = sizeof( pLang ) / sizeof( sal_Char* ); +static const sal_uInt32 nNumOfLoc = SAL_N_ELEMENTS( pLang ); void ScaDateAddIn::InitDefLocales() { |