summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/control
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-05-31 12:36:21 +0100
committerMichael Meeks <michael.meeks@suse.com>2012-05-31 13:09:03 +0100
commita0bbb2a1af40e42d02f0f7567580475b3c39e50b (patch)
tree8f57661f9012d1c7eed81531c2da4601b4773bf6 /dbaccess/source/ui/control
parent5fc3273bdbf424d7b15504e05bc8b2460a2668ff (diff)
targetted SAL_N_ELEMENTS reversion.
Change-Id: I181c5b5dd24836ff0398aa5ed03915c2c7c55183
Diffstat (limited to 'dbaccess/source/ui/control')
-rw-r--r--dbaccess/source/ui/control/FieldDescControl.cxx18
1 files changed, 9 insertions, 9 deletions
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)
{