diff options
author | Michael Meeks <michael.meeks@suse.com> | 2012-05-31 12:36:21 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-05-31 13:09:03 +0100 |
commit | a0bbb2a1af40e42d02f0f7567580475b3c39e50b (patch) | |
tree | 8f57661f9012d1c7eed81531c2da4601b4773bf6 /dbaccess/source/ui | |
parent | 5fc3273bdbf424d7b15504e05bc8b2460a2668ff (diff) |
targetted SAL_N_ELEMENTS reversion.
Change-Id: I181c5b5dd24836ff0398aa5ed03915c2c7c55183
Diffstat (limited to 'dbaccess/source/ui')
22 files changed, 37 insertions, 41 deletions
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index cf12780f8713..e16f45f957d9 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -1228,7 +1228,7 @@ IMPL_LINK(OAppDetailPageHelper, OnDropdownClickHdl, ToolBox*, /*pToolBox*/) , SID_DB_APP_VIEW_DOCINFO_PREVIEW }; - for(size_t i=0; i < SAL_N_ELEMENTS(pActions);++i) + for(size_t i=0; i < sizeof(pActions)/sizeof(pActions[0]);++i) { aMenu->CheckItem(pActions[i],m_aMenu->IsItemChecked(pActions[i])); } diff --git a/dbaccess/source/ui/app/AppIconControl.cxx b/dbaccess/source/ui/app/AppIconControl.cxx index 189cb19e22b4..657154922292 100644 --- a/dbaccess/source/ui/app/AppIconControl.cxx +++ b/dbaccess/source/ui/app/AppIconControl.cxx @@ -60,7 +60,7 @@ OApplicationIconControl::OApplicationIconControl(Window* _pParent) { RID_STR_FORMS_CONTAINER, E_FORM, IMG_FORMFOLDER_TREE_L }, { RID_STR_REPORTS_CONTAINER, E_REPORT, IMG_REPORTFOLDER_TREE_L } }; - for ( size_t i=0; i < SAL_N_ELEMENTS(aCategories); ++i) + for ( size_t i=0; i < sizeof(aCategories)/sizeof(aCategories[0]); ++i) { SvxIconChoiceCtrlEntry* pEntry = InsertEntry( String( ModuleRes( aCategories[i].nLabelResId ) ) , diff --git a/dbaccess/source/ui/app/AppTitleWindow.cxx b/dbaccess/source/ui/app/AppTitleWindow.cxx index 99db7f39e327..a9fee272763e 100644 --- a/dbaccess/source/ui/app/AppTitleWindow.cxx +++ b/dbaccess/source/ui/app/AppTitleWindow.cxx @@ -51,7 +51,7 @@ OTitleWindow::OTitleWindow(Window* _pParent,sal_uInt16 _nTitleId,WinBits _nBits, ImplInitSettings( sal_True, sal_True, sal_True ); Window* pWindows [] = { &m_aSpace1, &m_aSpace2, &m_aTitle }; - for (size_t i=0; i < SAL_N_ELEMENTS(pWindows); ++i) + for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i) pWindows[i]->Show(); } // ----------------------------------------------------------------------------- @@ -164,7 +164,7 @@ void OTitleWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_B Window* pWindows [] = { &m_aSpace1, &m_aSpace2, &m_aTitle}; - for (size_t i=0; i < SAL_N_ELEMENTS(pWindows); ++i) + for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i) { Font aFont = pWindows[i]->GetFont(); aFont.SetWeight(WEIGHT_BOLD); diff --git a/dbaccess/source/ui/browser/dbloader.cxx b/dbaccess/source/ui/browser/dbloader.cxx index 0caddb29b98c..7df8471d18c4 100644 --- a/dbaccess/source/ui/browser/dbloader.cxx +++ b/dbaccess/source/ui/browser/dbloader.cxx @@ -58,7 +58,6 @@ #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 +215,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 < SAL_N_ELEMENTS( aImplementations ); ++i ) + for ( size_t i=0; i < sizeof( aImplementations ) / sizeof( aImplementations[0] ); ++i ) { if ( sComponentURL.equalsAscii( aImplementations[i].pAsciiServiceName ) ) { diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index d05d8903e562..4283d7eed180 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -50,7 +50,6 @@ #include "UITools.hxx" #include "commontypes.hxx" -#include <sal/macros.h> #include <vcl/waitobj.hxx> #include <svl/urihelper.hxx> #include "datasourceconnector.hxx" @@ -1255,11 +1254,11 @@ namespace "com.sun.star.formula.FormularProperties", "smath", "com.sun.star.chart.ChartDocument", "schart" }; - OSL_ENSURE( ( SAL_N_ELEMENTS( pTransTable ) ) % 2 == 0, + OSL_ENSURE( ( sizeof( pTransTable ) / sizeof( pTransTable[0] ) ) % 2 == 0, "lcl_getModuleHelpModuleName: odd size of translation table!" ); // loop through the table - sal_Int32 nTableEntries = ( SAL_N_ELEMENTS( pTransTable ) ) / 2; + sal_Int32 nTableEntries = ( sizeof( pTransTable ) / sizeof( pTransTable[0] ) ) / 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 8ec842068115..9db7af8bbba6 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -1329,7 +1329,7 @@ void SbaTableQueryBrowser::connectExternalDispatches() ID_BROWSER_INSERTCONTENT }; - for ( size_t i=0; i < SAL_N_ELEMENTS( pURLs ); ++i ) + for ( size_t i=0; i < sizeof( pURLs ) / sizeof( pURLs[0] ); ++i ) { URL aURL; aURL.Complete = ::rtl::OUString::createFromAscii( pURLs[i] ); diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index 4b300ba6c6b9..94534b11649b 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -344,7 +344,7 @@ void OFieldDescControl::CheckScrollBars() // horizontal : long lMaxXPosition = 0; Control* ppAggregates[] = { pRequired, pNumType, pAutoIncrement, pDefault, pTextLen, pLength, pScale, pFormat, m_pColumnName, m_pType,m_pAutoIncrementValue}; - for (sal_uInt16 i=0; i < SAL_N_ELEMENTS(ppAggregates); ++i) + for (sal_uInt16 i=0; i<sizeof(ppAggregates)/sizeof(ppAggregates[0]); ++i) getMaxXPosition(ppAggregates[i],lMaxXPosition); if (m_pHorzScroll) @@ -459,9 +459,9 @@ void OFieldDescControl::ScrollAllAggregates() , pTextLenText, pLengthText , pScaleText, m_pColumnNameText , m_pTypeText, m_pAutoIncrementValueText}; - OSL_ENSURE(SAL_N_ELEMENTS(ppAggregates) == SAL_N_ELEMENTS(ppAggregatesText),"Lists are not identical!"); + OSL_ENSURE(sizeof(ppAggregates)/sizeof(ppAggregates[0]) == sizeof(ppAggregatesText)/sizeof(ppAggregatesText[0]),"Lists are not identical!"); - for (sal_uInt16 i=0; i < SAL_N_ELEMENTS(ppAggregates); ++i) + for (sal_uInt16 i=0; i<sizeof(ppAggregates)/sizeof(ppAggregates[0]); ++i) ScrollAggregate(ppAggregatesText[i],ppAggregates[i],NULL,nDeltaX, nDeltaY); ScrollAggregate(pFormatText,pFormatSample,pFormat,nDeltaX, nDeltaY); @@ -473,7 +473,7 @@ sal_uInt16 OFieldDescControl::CountActiveAggregates() const { Control* ppAggregates[] = { pRequired, pNumType, pAutoIncrement, pDefault, pTextLen, pLength, pScale, pFormat, m_pColumnName, m_pType,m_pAutoIncrementValue}; sal_uInt16 nVisibleAggregates = 0; - for (sal_uInt16 i=0; i < SAL_N_ELEMENTS(ppAggregates); ++i) + for (sal_uInt16 i=0; i<sizeof(ppAggregates)/sizeof(ppAggregates[0]); ++i) if (ppAggregates[i]) ++nVisibleAggregates; return nVisibleAggregates; @@ -483,7 +483,7 @@ sal_Int32 OFieldDescControl::GetMaxControlHeight() const { Size aHeight; Control* ppAggregates[] = { pRequired, pNumType, pAutoIncrement, pDefault, pTextLen, pLength, pScale, pFormat, m_pColumnName, m_pType,m_pAutoIncrementValue}; - for (sal_uInt16 i=0; i < SAL_N_ELEMENTS(ppAggregates); ++i) + for (sal_uInt16 i=0; i<sizeof(ppAggregates)/sizeof(ppAggregates[0]); ++i) { if ( ppAggregates[i] ) { @@ -514,9 +514,9 @@ void OFieldDescControl::SetReadOnly( sal_Bool bReadOnly ) , m_pTypeText, m_pAutoIncrementValueText , pFormatText}; - OSL_ENSURE(SAL_N_ELEMENTS(ppAggregates) == SAL_N_ELEMENTS(ppAggregatesText),"Lists are not identical!"); + OSL_ENSURE(sizeof(ppAggregates)/sizeof(ppAggregates[0]) == sizeof(ppAggregatesText)/sizeof(ppAggregatesText[0]),"Lists are not identical!"); - for (sal_uInt16 i=0; i < SAL_N_ELEMENTS(ppAggregates); ++i) + for (sal_uInt16 i=0; i<sizeof(ppAggregates)/sizeof(ppAggregates[0]); ++i) { if ( ppAggregatesText[i] ) ppAggregatesText[i]->Enable( !bReadOnly ); @@ -808,7 +808,7 @@ void OFieldDescControl::ArrangeAggregates() }; long nMaxWidth = 0; - for (size_t i=0; i < SAL_N_ELEMENTS(adAggregates); i++) + for (size_t i=0; i<sizeof(adAggregates)/sizeof(adAggregates[0]); i++) { if (adAggregates[i].pctrlTextControl) { @@ -821,7 +821,7 @@ void OFieldDescControl::ArrangeAggregates() // And go ... int nCurrentControlPos = 0; Control* pZOrderPredecessor = NULL; - for (size_t i=0; i < SAL_N_ELEMENTS(adAggregates); i++) + for (size_t i=0; i<sizeof(adAggregates)/sizeof(adAggregates[0]); i++) { if (adAggregates[i].pctrlInputControl) { diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx index 2a1dcd57db53..979697c2599d 100644 --- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx @@ -191,7 +191,7 @@ namespace dbaui //{ // String sDisplayName = m_pCollection->getTypeDisplayName(m_eType); // FixedText* ppTextControls[] ={&m_aFT_Connection}; - // for (size_t i = 0; i < SAL_N_ELEMENTS(ppTextControls); ++i) + // for (size_t i = 0; i < sizeof(ppTextControls)/sizeof(ppTextControls[0]); ++i) // { // ppTextControls[i]->SetText(sDisplayName); // } diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index ce492daca84e..5ea8e37f50a9 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx @@ -889,7 +889,7 @@ DBG_NAME(OFinalDBPageSetup) Point aPos(m_aFTFinalHeader.GetPosPixel()); Size aStart(m_aFTFinalHeader.GetSizePixel()); aPos.Y() += aStart.Height() + nUnrelatedHeight; - sal_Int32 nCount = SAL_N_ELEMENTS(pWindows); + sal_Int32 nCount = sizeof(pWindows) / sizeof(pWindows[0]); for (sal_Int32 i=0; i < nCount; ++i) { aPos.X() = pWindows[i].first->GetPosPixel().X(); diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx index 58f0038b0f85..3c19ad990eee 100644 --- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx @@ -145,7 +145,7 @@ DBG_NAME(OTextConnectionHelper) { 0, NULL } }; - for ( size_t section=0; section < SAL_N_ELEMENTS( aSections ) - 1; ++section ) + for ( size_t section=0; section < sizeof( aSections ) / sizeof( aSections[0] ) - 1; ++section ) { if ( ( m_nAvailableSections & aSections[section].nFlag ) != 0 ) { diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx index 11a8098afe2d..54f02d65d1ee 100644 --- a/dbaccess/source/ui/dlg/dbadmin.cxx +++ b/dbaccess/source/ui/dlg/dbadmin.cxx @@ -465,7 +465,7 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp {0,0} }; - OSL_ENSURE(SAL_N_ELEMENTS(aItemInfos) == DSID_LAST_ITEM_ID,"Invalid Ids!"); + OSL_ENSURE(sizeof(aItemInfos)/sizeof(aItemInfos[0]) == DSID_LAST_ITEM_ID,"Invalid Ids!"); _rpPool = new SfxItemPool(String::CreateFromAscii("DSAItemPool"), DSID_FIRST_ITEM_ID, DSID_LAST_ITEM_ID, aItemInfos, _rppDefaults); _rpPool->FreezeIdRanges(); diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx index 140344030785..007b7b1b5ad3 100644 --- a/dbaccess/source/ui/dlg/detailpages.cxx +++ b/dbaccess/source/ui/dlg/detailpages.cxx @@ -110,7 +110,7 @@ namespace dbaui m_pAutoIncrementLabel, m_pAutoIncrement, m_pAutoRetrievingLabel, m_pAutoRetrieving }; - sal_Int32 nCount = SAL_N_ELEMENTS(pWindows); + sal_Int32 nCount = sizeof(pWindows) / sizeof(pWindows[0]); for (sal_Int32 i=1; i < nCount; ++i) { if ( pWindows[i] ) @@ -363,7 +363,7 @@ namespace dbaui ,m_pOptionsLabel,m_pOptions,&m_aUseCatalog }; - sal_Int32 nCount = SAL_N_ELEMENTS(pWindows); + sal_Int32 nCount = sizeof(pWindows) / sizeof(pWindows[0]); for (sal_Int32 i=1; i < nCount; ++i) pWindows[i]->SetZOrder(pWindows[i-1], WINDOW_ZORDER_BEHIND); } @@ -544,7 +544,7 @@ namespace dbaui &m_aFTDriverClass, &m_aEDDriverClass,&m_aTestJavaDriver, m_pCharsetLabel, m_pCharset}; - sal_Int32 nCount = SAL_N_ELEMENTS(pWindows); + sal_Int32 nCount = sizeof(pWindows) / sizeof(pWindows[0]); for (sal_Int32 i=1; i < nCount; ++i) pWindows[i]->SetZOrder(pWindows[i-1], WINDOW_ZORDER_BEHIND); @@ -677,7 +677,7 @@ namespace dbaui Window* pWindows[] = { &m_aMySQLSettings, &m_aSeparator2, &m_aUserNameLabel, &m_aUserName, &m_aPasswordRequired, m_pCharsetLabel, m_pCharset}; - sal_Int32 nCount = SAL_N_ELEMENTS(pWindows); + sal_Int32 nCount = sizeof(pWindows) / sizeof(pWindows[0]); for (sal_Int32 i=1; i < nCount; ++i) pWindows[i]->SetZOrder(pWindows[i-1], WINDOW_ZORDER_BEHIND); diff --git a/dbaccess/source/ui/dlg/dsselect.cxx b/dbaccess/source/ui/dlg/dsselect.cxx index baee01c37736..e3009ae7514b 100644 --- a/dbaccess/source/ui/dlg/dsselect.cxx +++ b/dbaccess/source/ui/dlg/dsselect.cxx @@ -33,7 +33,6 @@ #include <vcl/msgbox.hxx> #include "localresaccess.hxx" #include <tools/rcid.h> -#include <sal/macros.h> #include <com/sun/star/sdbcx/XCreateCatalog.hpp> #include <com/sun/star/beans/XPropertySet.hpp> diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index 6433aa01bd34..1887206d359e 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -128,7 +128,7 @@ namespace dbaui &m_aTypePostLabel }; const long nOffset = m_aRB_OpenDocument.GetPosPixel().Y() - m_aRB_CreateDatabase.GetPosPixel().Y(); - for ( size_t i=0; i < SAL_N_ELEMENTS( pWindowsToMove ); ++i ) + for ( size_t i=0; i < sizeof( pWindowsToMove ) / sizeof( pWindowsToMove[0] ); ++i ) { Point aPos( pWindowsToMove[i]->GetPosPixel() ); aPos.Y() -= nOffset; diff --git a/dbaccess/source/ui/inc/dbadmin.hxx b/dbaccess/source/ui/inc/dbadmin.hxx index 841bcfabbc2c..60a82630050a 100644 --- a/dbaccess/source/ui/inc/dbadmin.hxx +++ b/dbaccess/source/ui/inc/dbadmin.hxx @@ -29,7 +29,6 @@ #ifndef _DBAUI_DBADMIN_HXX_ #define _DBAUI_DBADMIN_HXX_ -#include <sal/macros.h> #include <sfx2/tabdlg.hxx> #include "dsntypes.hxx" #include "IItemSetHelper.hxx" diff --git a/dbaccess/source/ui/inc/moduledbu.hxx b/dbaccess/source/ui/inc/moduledbu.hxx index 4297cdef693a..9211a90d9100 100644 --- a/dbaccess/source/ui/inc/moduledbu.hxx +++ b/dbaccess/source/ui/inc/moduledbu.hxx @@ -31,7 +31,6 @@ #include <osl/mutex.hxx> #include <tools/resid.hxx> -#include <sal/macros.h> class ResMgr; diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx index 4850a32a2814..c58af20caf73 100644 --- a/dbaccess/source/ui/misc/DExport.cxx +++ b/dbaccess/source/ui/misc/DExport.cxx @@ -361,7 +361,7 @@ void ODatabaseExport::insertValueIntoColumn() ,NumberFormat::NUMBER ,NumberFormat::LOGICAL }; - for (size_t i = 0; i < SAL_N_ELEMENTS(nFormats); ++i) + for (size_t i = 0; i < sizeof(nFormats)/sizeof(nFormats[0]); ++i) { try { diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index ed2f8717ec7c..cc5409441d91 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -1033,7 +1033,7 @@ sal_Bool callColumnFormatDialog(Window* _pParent, delete pFormatDescriptor; SfxItemPool::Free(pPool); - for (sal_uInt16 i=0; i < SAL_N_ELEMENTS(pDefaults); ++i) + for (sal_uInt16 i=0; i<sizeof(pDefaults)/sizeof(pDefaults[0]); ++i) delete pDefaults[i]; return bRet; diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx index 36dacbc1810a..752fbf76139a 100644 --- a/dbaccess/source/ui/misc/WCopyTable.cxx +++ b/dbaccess/source/ui/misc/WCopyTable.cxx @@ -167,7 +167,7 @@ void ObjectCopySource::copyUISettingsTo( const Reference< XPropertySet >& _rxObj const ::rtl::OUString aCopyProperties[] = { PROPERTY_FONT, PROPERTY_ROW_HEIGHT, PROPERTY_TEXTCOLOR,PROPERTY_TEXTLINECOLOR,PROPERTY_TEXTEMPHASIS,PROPERTY_TEXTRELIEF }; - for ( size_t i=0; i < SAL_N_ELEMENTS( aCopyProperties ); ++i ) + for ( size_t i=0; i < sizeof( aCopyProperties ) / sizeof( aCopyProperties[0] ); ++i ) { if ( m_xObjectPSI->hasPropertyByName( aCopyProperties[i] ) ) _rxObject->setPropertyValue( aCopyProperties[i], m_xObject->getPropertyValue( aCopyProperties[i] ) ); @@ -194,7 +194,7 @@ void ObjectCopySource::copyFilterAndSortingTo( const Reference< XConnection >& _ sStatement += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" WHERE 0=1")); - for ( i=0; i < SAL_N_ELEMENTS( aProperties ); ++i ) + for ( i=0; i < sizeof( aProperties ) / sizeof( aProperties[0] ); ++i ) { if ( m_xObjectPSI->hasPropertyByName( aProperties[i].first ) ) { diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index a6eb6aa43dc4..8a0b39e589be 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -203,7 +203,7 @@ void OSelectionBrowseBox::initialize() String sGroup = m_aFunctionStrings.GetToken(comphelper::string::getTokenCount(m_aFunctionStrings, ';') - 1); m_aFunctionStrings = m_aFunctionStrings.GetToken(0); - for (size_t i = 0; i < SAL_N_ELEMENTS(eFunctions); ++i) + for (size_t i = 0; i < sizeof (eFunctions) / sizeof (eFunctions[0]); ++i) { m_aFunctionStrings += String(RTL_CONSTASCII_USTRINGPARAM(";")); m_aFunctionStrings += rtl::OStringToOUString(rContext.getIntlKeywordAscii(eFunctions[i]), @@ -354,7 +354,8 @@ void OSelectionBrowseBox::Init() Size aHeight; const Control* pControls[] = { m_pTextCell,m_pVisibleCell,m_pTableCell,m_pFieldCell }; - for(sal_Size i= 0; i < SAL_N_ELEMENTS(pControls);++i) + + for (sal_Size_t i = 0; i < sizeof (pControls) / sizeof (pControls[0]); ++i) { const Size aTemp( pControls[i]->GetOptimalSize(WINDOWSIZE_PREFERRED) ); if ( aTemp.Height() > aHeight.Height() ) @@ -2180,7 +2181,7 @@ sal_Int32 OSelectionBrowseBox::GetNoneVisibleRows() const { sal_Int32 nErg(0); // only the first 11 row are interesting - sal_Int32 nSize = SAL_N_ELEMENTS(nVisibleRowMask); + sal_Int32 nSize = sizeof(nVisibleRowMask) / sizeof(nVisibleRowMask[0]); for(sal_Int32 i=0;i<nSize;i++) { if(!m_bVisibleRow[i]) @@ -2192,7 +2193,7 @@ sal_Int32 OSelectionBrowseBox::GetNoneVisibleRows() const void OSelectionBrowseBox::SetNoneVisbleRow(long nRows) { // only the first 11 row are interesting - sal_Int32 nSize = SAL_N_ELEMENTS(nVisibleRowMask); + sal_Int32 nSize = sizeof(nVisibleRowMask) / sizeof(nVisibleRowMask[0]); for(sal_Int32 i=0;i< nSize;i++) m_bVisibleRow[i] = !(nRows & nVisibleRowMask[i]); } diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index 49a01c53bc54..bd9037b0326c 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -301,7 +301,7 @@ void OTableEditorCtrl::InitCellController() Size aHeight; const Control* pControls[] = { pTypeCell,pDescrCell,pNameCell,pHelpTextCell}; - for(sal_Size i= 0; i < SAL_N_ELEMENTS(pControls);++i) + for(sal_Size i= 0; i < sizeof(pControls) / sizeof(pControls[0]);++i) { const Size aTemp( pControls[i]->GetOptimalSize(WINDOWSIZE_PREFERRED) ); if ( aTemp.Height() > aHeight.Height() ) diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx index 3933353b1c06..fbeda28fd36b 100644 --- a/dbaccess/source/ui/uno/copytablewizard.cxx +++ b/dbaccess/source/ui/uno/copytablewizard.cxx @@ -750,7 +750,7 @@ void CopyTableWizard::impl_checkForUnsupportedSettings_throw( const Reference< X const ::rtl::OUString aSettings[] = { PROPERTY_FILTER, PROPERTY_ORDER, PROPERTY_HAVING_CLAUSE, PROPERTY_GROUP_BY }; - for ( size_t i=0; i < SAL_N_ELEMENTS( aSettings ); ++i ) + for ( size_t i=0; i < sizeof( aSettings ) / sizeof( aSettings[0] ); ++i ) { if ( lcl_hasNonEmptyStringValue_throw( _rxSourceDescriptor, xPSI, aSettings[i] ) ) { |