summaryrefslogtreecommitdiffstats
path: root/dbaccess/source/ext
diff options
context:
space:
mode:
authorKayo Hamid <revol.code@yahoo.com>2010-10-09 22:17:25 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2010-10-09 22:17:25 -0500
commitd7f4b5a0fc1033b314b59e8b20efc6a06b1f8049 (patch)
tree7e50a26a7c8197db131c99af0723445de61f0c2d /dbaccess/source/ext
parentSome base commented code cleanup (diff)
downloadcore-d7f4b5a0fc1033b314b59e8b20efc6a06b1f8049.tar.gz
core-d7f4b5a0fc1033b314b59e8b20efc6a06b1f8049.zip
Use SAL_N_ELEMENTS macro
Diffstat (limited to 'dbaccess/source/ext')
-rw-r--r--dbaccess/source/ext/macromigration/dbmm_types.hxx1
-rw-r--r--dbaccess/source/ext/macromigration/migrationengine.cxx4
2 files changed, 3 insertions, 2 deletions
diff --git a/dbaccess/source/ext/macromigration/dbmm_types.hxx b/dbaccess/source/ext/macromigration/dbmm_types.hxx
index 49f5de86a98b..99639cd13417 100644
--- a/dbaccess/source/ext/macromigration/dbmm_types.hxx
+++ b/dbaccess/source/ext/macromigration/dbmm_types.hxx
@@ -29,6 +29,7 @@
#define DBACCESS_DBMM_TYPES_HXX
#include <tools/string.hxx>
+#include <sal/macros.h>
//........................................................................
namespace dbmm
diff --git a/dbaccess/source/ext/macromigration/migrationengine.cxx b/dbaccess/source/ext/macromigration/migrationengine.cxx
index 5dd3129452fd..7f5b7ab4241f 100644
--- a/dbaccess/source/ext/macromigration/migrationengine.cxx
+++ b/dbaccess/source/ext/macromigration/migrationengine.cxx
@@ -241,7 +241,7 @@ namespace dbmm
LanguageMapping( "Python", ePython ), // TODO: is this correct?
LanguageMapping( "Basic", eBasic )
};
- for ( size_t i=0; i < sizeof( aLanguageMapping ) / sizeof( aLanguageMapping[0] ); ++i )
+ for ( size_t i=0; i < SAL_N_ELEMENTS( aLanguageMapping ); ++i )
{
if ( _rLanguage.equalsAscii( aLanguageMapping[i].pAsciiLanguage ) )
{
@@ -1305,7 +1305,7 @@ namespace dbmm
ScriptType aKnownStorageBasedTypes[] = {
eBeanShell, eJavaScript, ePython, eJava
};
- for ( size_t i=0; i<sizeof( aKnownStorageBasedTypes ) / sizeof( aKnownStorageBasedTypes[0] ); ++i )
+ for ( size_t i=0; i< SAL_N_ELEMENTS( aKnownStorageBasedTypes ); ++i )
aElementNames.erase( lcl_getScriptsSubStorageName( aKnownStorageBasedTypes[i] ) );
if ( !aElementNames.empty() )