summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-03-29 10:25:17 +0200
committerNoel Grandin <noel@peralex.com>2016-03-31 11:30:36 +0200
commit6439005484bdf6754b910b1ce025b3fb33b6623f (patch)
tree1a00f48ae11d3da3d928f2d3d68b3e299216328c /vbahelper
parent1aa4df615fa5599d05e9dd5e925b5852676185fa (diff)
use SAL_N_ELEMENTS more widely
found using git grep -n 'sizeof.*/.*sizeof.*[0]' Change-Id: Icd4a6cc1ca8ec8ebd68e1701a02789c74cf0eb2a
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/vbahelper/vbaapplicationbase.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbaglobalbase.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
index b468f8c0e16c..5e0c3ed6a55c 100644
--- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx
+++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
@@ -324,7 +324,7 @@ uno::Any SAL_CALL VbaApplicationBase::Run( const OUString& MacroName, const uno:
// handle the arguments
const uno::Any* aArgsPtrArray[] = { &varg1, &varg2, &varg3, &varg4, &varg5, &varg6, &varg7, &varg8, &varg9, &varg10, &varg11, &varg12, &varg13, &varg14, &varg15, &varg16, &varg17, &varg18, &varg19, &varg20, &varg21, &varg22, &varg23, &varg24, &varg25, &varg26, &varg27, &varg28, &varg29, &varg30 };
- int nArg = sizeof( aArgsPtrArray ) / sizeof( aArgsPtrArray[0] );
+ int nArg = SAL_N_ELEMENTS( aArgsPtrArray );
uno::Sequence< uno::Any > aArgs( nArg );
const uno::Any** pArg = aArgsPtrArray;
diff --git a/vbahelper/source/vbahelper/vbaglobalbase.cxx b/vbahelper/source/vbahelper/vbaglobalbase.cxx
index fd19e4a3cb58..d0a617598d39 100644
--- a/vbahelper/source/vbahelper/vbaglobalbase.cxx
+++ b/vbahelper/source/vbahelper/vbaglobalbase.cxx
@@ -56,7 +56,7 @@ const uno::Reference< uno::XComponentContext >& xContext, const OUString& sDocCt
// some strange behavior
mxContext = ::cppu::createComponentContext(
aHandlerContextInfo,
- ( sizeof ( aHandlerContextInfo ) / sizeof ( aHandlerContextInfo[0] ) ), nullptr );
+ SAL_N_ELEMENTS( aHandlerContextInfo ), nullptr );
if ( aSrvMgr.is() )
{
try