diff options
author | Kayo Hamid <revol.code@yahoo.com> | 2010-10-09 13:49:07 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-09 13:49:07 -0500 |
commit | a7be30202460cd143cb3815cf31c71ea4b374843 (patch) | |
tree | 001c226e2d014fc66d67fb725032227b98534d71 /starmath/source | |
parent | 66a65ad0cfb7f0fbcd89342dcce8e07ecf515828 (diff) |
Use SAL_N_ELEMENTS macro
Diffstat (limited to 'starmath/source')
-rw-r--r-- | starmath/source/cfgitem.cxx | 4 | ||||
-rw-r--r-- | starmath/source/parse.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx index 2516c100a8a5..fd6592a6fd61 100644 --- a/starmath/source/cfgitem.cxx +++ b/starmath/source/cfgitem.cxx @@ -184,14 +184,14 @@ static Sequence< OUString > lcl_GetPropertyNames( static Sequence< OUString > GetFormatPropertyNames() { - USHORT nCnt = sizeof(aFormatPropNames) / sizeof(aFormatPropNames[0]); + USHORT nCnt = SAL_N_ELEMENTS(aFormatPropNames); return lcl_GetPropertyNames( aFormatPropNames, nCnt ); } static Sequence< OUString > GetOtherPropertyNames() { - USHORT nCnt = sizeof(aMathPropNames) / sizeof(aMathPropNames[0]); + USHORT nCnt = SAL_N_ELEMENTS(aMathPropNames); return lcl_GetPropertyNames( aMathPropNames, nCnt ); } diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx index 89d89ce621c0..839999204ca6 100644 --- a/starmath/source/parse.cxx +++ b/starmath/source/parse.cxx @@ -309,7 +309,7 @@ static const SmTokenTableEntry * GetTokenTableEntry( const String &rName ) const SmTokenTableEntry * pRes = 0; if (rName.Len()) { - INT32 nEntries = sizeof( aTokenTable ) / sizeof( aTokenTable[0] ); + INT32 nEntries = SAL_N_ELEMENTS(aTokenTable); for (INT32 i = 0; i < nEntries; ++i) { if (rName.EqualsIgnoreCaseAscii( aTokenTable[i].pIdent )) |