summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2012-09-15 13:34:50 +0200
committerJulien Nabet <serval2412@yahoo.fr>2012-09-15 13:34:50 +0200
commitf2504a0a9ff348784b1533ff3798c1e762c6201c (patch)
tree6b5ddfd09b6bfe4017706813f543ab91f9960893
parenta579ad2c086f1854f7bb6058ec590d1427e72984 (diff)
Fix some "Variables reassigned a value before the old one has been used"
Change-Id: I64eadd8f34e9d60e9d696fa572dc0001532eab02
-rw-r--r--accessibility/source/extended/accessibleiconchoicectrl.cxx23
-rw-r--r--accessibility/source/extended/accessiblelistbox.cxx22
-rw-r--r--accessibility/source/extended/accessiblelistboxentry.cxx10
3 files changed, 25 insertions, 30 deletions
diff --git a/accessibility/source/extended/accessibleiconchoicectrl.cxx b/accessibility/source/extended/accessibleiconchoicectrl.cxx
index e617f42af818..16202db1ad39 100644
--- a/accessibility/source/extended/accessibleiconchoicectrl.cxx
+++ b/accessibility/source/extended/accessibleiconchoicectrl.cxx
@@ -250,10 +250,9 @@ namespace accessibility
ensureAlive();
- sal_Int32 i, nCount = 0;
SvtIconChoiceCtrl* pCtrl = getCtrl();
- nCount = pCtrl->GetEntryCount();
- for ( i = 0; i < nCount; ++i )
+ sal_Int32 nCount = pCtrl->GetEntryCount();
+ for ( sal_Int32 i = 0; i < nCount; ++i )
{
SvxIconChoiceCtrlEntry* pEntry = pCtrl->GetEntry( i );
if ( pCtrl->GetCursor() != pEntry )
@@ -267,10 +266,10 @@ namespace accessibility
ensureAlive();
- sal_Int32 i, nSelCount = 0, nCount = 0;
+ sal_Int32 nSelCount = 0;
SvtIconChoiceCtrl* pCtrl = getCtrl();
- nCount = pCtrl->GetEntryCount();
- for ( i = 0; i < nCount; ++i )
+ sal_Int32 nCount = pCtrl->GetEntryCount();
+ for ( sal_Int32 i = 0; i < nCount; ++i )
{
SvxIconChoiceCtrlEntry* pEntry = pCtrl->GetEntry( i );
if ( pCtrl->GetCursor() == pEntry )
@@ -290,10 +289,10 @@ namespace accessibility
throw IndexOutOfBoundsException();
Reference< XAccessible > xChild;
- sal_Int32 i, nSelCount = 0, nCount = 0;
+ sal_Int32 nSelCount = 0;
SvtIconChoiceCtrl* pCtrl = getCtrl();
- nCount = pCtrl->GetEntryCount();
- for ( i = 0; i < nCount; ++i )
+ sal_Int32 nCount = pCtrl->GetEntryCount();
+ for ( sal_Int32 i = 0; i < nCount; ++i )
{
SvxIconChoiceCtrlEntry* pEntry = pCtrl->GetEntry( i );
if ( pCtrl->GetCursor() == pEntry )
@@ -319,11 +318,11 @@ namespace accessibility
throw IndexOutOfBoundsException();
Reference< XAccessible > xChild;
- sal_Int32 i, nSelCount = 0, nCount = 0;
+ sal_Int32 nSelCount = 0;
SvtIconChoiceCtrl* pCtrl = getCtrl();
- nCount = pCtrl->GetEntryCount();
+ sal_Int32 nCount = pCtrl->GetEntryCount();
bool bFound = false;
- for ( i = 0; i < nCount; ++i )
+ for ( sal_Int32 i = 0; i < nCount; ++i )
{
SvxIconChoiceCtrlEntry* pEntry = pCtrl->GetEntry( i );
if ( pEntry->IsSelected() )
diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx
index e1a410a7de01..d96754d7b18f 100644
--- a/accessibility/source/extended/accessiblelistbox.cxx
+++ b/accessibility/source/extended/accessiblelistbox.cxx
@@ -307,9 +307,8 @@ namespace accessibility
ensureAlive();
- sal_Int32 i, nCount = 0;
- nCount = getListBox()->GetLevelChildCount( NULL );
- for ( i = 0; i < nCount; ++i )
+ sal_Int32 nCount = getListBox()->GetLevelChildCount( NULL );
+ for ( sal_Int32 i = 0; i < nCount; ++i )
{
SvLBoxEntry* pEntry = getListBox()->GetEntry( i );
if ( getListBox()->IsSelected( pEntry ) )
@@ -323,9 +322,8 @@ namespace accessibility
ensureAlive();
- sal_Int32 i, nCount = 0;
- nCount = getListBox()->GetLevelChildCount( NULL );
- for ( i = 0; i < nCount; ++i )
+ sal_Int32 nCount = getListBox()->GetLevelChildCount( NULL );
+ for ( sal_Int32 i = 0; i < nCount; ++i )
{
SvLBoxEntry* pEntry = getListBox()->GetEntry( i );
if ( !getListBox()->IsSelected( pEntry ) )
@@ -339,9 +337,9 @@ namespace accessibility
ensureAlive();
- sal_Int32 i, nSelCount = 0, nCount = 0;
- nCount = getListBox()->GetLevelChildCount( NULL );
- for ( i = 0; i < nCount; ++i )
+ sal_Int32 nSelCount = 0;
+ sal_Int32 nCount = getListBox()->GetLevelChildCount( NULL );
+ for ( sal_Int32 i = 0; i < nCount; ++i )
{
SvLBoxEntry* pEntry = getListBox()->GetEntry( i );
if ( getListBox()->IsSelected( pEntry ) )
@@ -361,9 +359,9 @@ namespace accessibility
throw IndexOutOfBoundsException();
Reference< XAccessible > xChild;
- sal_Int32 i, nSelCount = 0, nCount = 0;
- nCount = getListBox()->GetLevelChildCount( NULL );
- for ( i = 0; i < nCount; ++i )
+ sal_Int32 nSelCount= 0;
+ sal_Int32 nCount = getListBox()->GetLevelChildCount( NULL );
+ for ( sal_Int32 i = 0; i < nCount; ++i )
{
SvLBoxEntry* pEntry = getListBox()->GetEntry( i );
if ( getListBox()->IsSelected( pEntry ) )
diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx
index 36fc170b63ca..3b05336dd3be 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -730,9 +730,8 @@ namespace accessibility
SvLBoxEntry* pParent = getListBox()->GetEntryFromPath( m_aEntryPath );
if ( !pParent )
throw RuntimeException();
- sal_Int32 i, nCount = 0;
- nCount = getListBox()->GetLevelChildCount( pParent );
- for ( i = 0; i < nCount; ++i )
+ sal_Int32 nCount = getListBox()->GetLevelChildCount( pParent );
+ for ( sal_Int32 i = 0; i < nCount; ++i )
{
SvLBoxEntry* pEntry = getListBox()->GetEntry( pParent, i );
if ( getListBox()->IsSelected( pEntry ) )
@@ -750,9 +749,8 @@ namespace accessibility
SvLBoxEntry* pParent = getListBox()->GetEntryFromPath( m_aEntryPath );
if ( !pParent )
throw RuntimeException();
- sal_Int32 i, nCount = 0;
- nCount = getListBox()->GetLevelChildCount( pParent );
- for ( i = 0; i < nCount; ++i )
+ sal_Int32 nCount = getListBox()->GetLevelChildCount( pParent );
+ for ( sal_Int32 i = 0; i < nCount; ++i )
{
SvLBoxEntry* pEntry = getListBox()->GetEntry( pParent, i );
if ( !getListBox()->IsSelected( pEntry ) )