summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
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/querydesign/SelectionBrowseBox.cxx
parent5fc3273bdbf424d7b15504e05bc8b2460a2668ff (diff)
targetted SAL_N_ELEMENTS reversion.
Change-Id: I181c5b5dd24836ff0398aa5ed03915c2c7c55183
Diffstat (limited to 'dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx')
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx9
1 files changed, 5 insertions, 4 deletions
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]);
}