diff options
Diffstat (limited to 'reportdesign/source')
-rw-r--r-- | reportdesign/source/ui/dlg/GroupsSorting.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx index abf80c764880..afd90c6d54be 100644 --- a/reportdesign/source/ui/dlg/GroupsSorting.cxx +++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx @@ -231,7 +231,7 @@ uno::Sequence<uno::Any> OFieldExpressionControl::fillSelectedGroups() sal_Int32 nCount = xGroups->getCount(); if ( nCount >= 1 ) { - for( long nIndex=FirstSelectedRow(); nIndex >= 0 ; nIndex=NextSelectedRow() ) + for( long nIndex=FirstSelectedRow(); nIndex != SFX_ENDOFSELECTION; nIndex=NextSelectedRow() ) { try { @@ -701,7 +701,7 @@ void OFieldExpressionControl::Command(const CommandEvent& rEvt) { bool bEnable = false; long nIndex = FirstSelectedRow(); - while( nIndex >= 0 && !bEnable ) + while( nIndex != SFX_ENDOFSELECTION && !bEnable ) { if ( m_aGroupPositions[nIndex] != NO_GROUP ) bEnable = true; @@ -734,7 +734,7 @@ void OFieldExpressionControl::DeleteRows() DeactivateCell(); } long nIndex = FirstSelectedRow(); - if (nIndex == -1) + if (nIndex == SFX_ENDOFSELECTION) { nIndex = GetCurRow(); } |