summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorKayo Hamid <revol.code@yahoo.com>2010-10-14 21:14:52 +0100
committerMichael Meeks <michael.meeks@novell.com>2010-10-14 21:15:24 +0100
commitb7c82daa28526c566047e158ab2ace522fc442dc (patch)
treec71f33ee622add8de9013a170a7463ed564ad6e8 /vbahelper
parent1b0c6da1c3bcc6a9c1412d221d029885f9998fa1 (diff)
Switch to use SAL_N_ELEMENTS macro, everywhere
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/vbahelper/vbaapplicationbase.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbaglobalbase.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
index 1320cf046d8b..7daed9e574c1 100644
--- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx
+++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
@@ -352,7 +352,7 @@ uno::Any SAL_CALL VbaApplicationBase::Run( const ::rtl::OUString& MacroName, con
// 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 e64085bd0991..767049396db4 100644
--- a/vbahelper/source/vbahelper/vbaglobalbase.cxx
+++ b/vbahelper/source/vbahelper/vbaglobalbase.cxx
@@ -60,7 +60,7 @@ const uno::Reference< uno::XComponentContext >& xContext, const rtl::OUString& s
};
// don't pass a delegate, this seems to introduce yet another cyclic dependency ( and
// some strange behavior
- mxContext = ::cppu::createComponentContext( aHandlerContextInfo, sizeof( aHandlerContextInfo ) / sizeof( aHandlerContextInfo[0] ), NULL );
+ mxContext = ::cppu::createComponentContext( aHandlerContextInfo, SAL_N_ELEMENTS( aHandlerContextInfo ), NULL );
}
VbaGlobalsBase::~VbaGlobalsBase()
@@ -137,7 +137,7 @@ VbaGlobalsBase::getAvailableServiceNames( ) throw (uno::RuntimeException)
// common
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.msforms.UserForm" ) ),
};
- static uno::Sequence< rtl::OUString > serviceNames( names, sizeof( names )/ sizeof( names[0] ) );
+ static uno::Sequence< rtl::OUString > serviceNames( names, SAL_N_ELEMENTS( names ) );
return serviceNames;
}