diff options
Diffstat (limited to 'dbaccess/source/ui/browser')
-rw-r--r-- | dbaccess/source/ui/browser/dbloader.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/genericcontroller.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/unodatbr.cxx | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/dbaccess/source/ui/browser/dbloader.cxx b/dbaccess/source/ui/browser/dbloader.cxx index 69130da08609..81d9f82b5f04 100644 --- a/dbaccess/source/ui/browser/dbloader.cxx +++ b/dbaccess/source/ui/browser/dbloader.cxx @@ -59,6 +59,7 @@ #include <tools/diagnose_ex.h> #include <tools/urlobj.hxx> #include <vcl/svapp.hxx> +#include <sal/macros.h> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -216,7 +217,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const :: Reference< XController2 > xController; const ::rtl::OUString sComponentURL( aParser.GetMainURL( INetURLObject::DECODE_TO_IURI ) ); - for ( size_t i=0; i < sizeof( aImplementations ) / sizeof( aImplementations[0] ); ++i ) + for ( size_t i=0; i < SAL_N_ELEMENTS( aImplementations ); ++i ) { if ( sComponentURL.equalsAscii( aImplementations[i].pAsciiServiceName ) ) { diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index 70efc10c2b36..0cd38e5609d7 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -51,6 +51,7 @@ #include "UITools.hxx" #include "commontypes.hxx" +#include <sal/macros.h> #include <vcl/waitobj.hxx> #include <tools/urlobj.hxx> #include <svl/urihelper.hxx> @@ -1248,11 +1249,11 @@ namespace "com.sun.star.formula.FormularProperties", "smath", "com.sun.star.chart.ChartDocument", "schart" }; - OSL_ENSURE( ( sizeof( pTransTable ) / sizeof( pTransTable[0] ) ) % 2 == 0, + OSL_ENSURE( ( SAL_N_ELEMENTS( pTransTable ) ) % 2 == 0, "lcl_getModuleHelpModuleName: odd size of translation table!" ); // loop through the table - sal_Int32 nTableEntries = ( sizeof( pTransTable ) / sizeof( pTransTable[0] ) ) / 2; + sal_Int32 nTableEntries = ( SAL_N_ELEMENTS( pTransTable ) ) / 2; const sal_Char** pDocumentService = pTransTable; const sal_Char** pHelpModuleName = pTransTable + 1; for ( sal_Int32 j=0; j<nTableEntries; ++j ) diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index c65055c582fc..9c746e2edf6b 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -1194,7 +1194,7 @@ void SbaTableQueryBrowser::connectExternalDispatches() ID_BROWSER_INSERTCONTENT }; - for ( size_t i=0; i < sizeof( pURLs ) / sizeof( pURLs[0] ); ++i ) + for ( size_t i=0; i < SAL_N_ELEMENTS( pURLs ); ++i ) { URL aURL; aURL.Complete = ::rtl::OUString::createFromAscii( pURLs[i] ); |