summaryrefslogtreecommitdiff
path: root/scaddins/source/datefunc/datefunc.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'scaddins/source/datefunc/datefunc.cxx')
-rw-r--r--scaddins/source/datefunc/datefunc.cxx6
1 files changed, 2 insertions, 4 deletions
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()
{