From 6e6d81e9cfc593d865e409ad22b2307f87a37859 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Tue, 29 May 2012 17:23:51 +0100 Subject: targetted SAL_N_ELEMENTS reversion. Change-Id: I30be93ccaeb1f9fd17cbe9e3ed3165e094810b2e --- vbahelper/source/vbahelper/vbaapplicationbase.cxx | 2 +- vbahelper/source/vbahelper/vbaglobalbase.cxx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'vbahelper/source') diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx index 195ee5e481e9..ecf1e50d2200 100644 --- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx +++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx @@ -339,7 +339,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 = SAL_N_ELEMENTS( aArgsPtrArray ); + int nArg = sizeof( aArgsPtrArray ) / sizeof( aArgsPtrArray[0] ); 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 615c6f53d7e8..8e08ecb5b96f 100644 --- a/vbahelper/source/vbahelper/vbaglobalbase.cxx +++ b/vbahelper/source/vbahelper/vbaglobalbase.cxx @@ -63,7 +63,9 @@ 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, SAL_N_ELEMENTS( aHandlerContextInfo ), NULL ); + mxContext = ::cppu::createComponentContext( + aHandlerContextInfo, + ( sizeof ( aHandlerContextInfo ) / sizeof ( aHandlerContextInfo[0] ) ), NULL ); if ( aSrvMgr.is() ) { try @@ -161,7 +163,7 @@ VbaGlobalsBase::getAvailableServiceNames( ) throw (uno::RuntimeException) // common ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.msforms.UserForm" ) ), }; - static uno::Sequence< rtl::OUString > serviceNames( names, SAL_N_ELEMENTS( names ) ); + static uno::Sequence< rtl::OUString > serviceNames( names, sizeof( names )/ sizeof( names[0] ) ); return serviceNames; } -- cgit