Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Sending for review.

revol_
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index e7b8e8b..c382486 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -95,7 +95,7 @@ void SwAccessibleDocumentBase::SetVisArea()
     }
 }
 
-void SwAccessibleDocumentBase::AddChild( Window *pWin, sal_Bool bFireEvent )
+void SwAccessibleDocumentBase::AddChild( Window *pWin, const sal_Bool bFireEvent )
 {
     SolarMutexGuard aGuard;
 
@@ -145,7 +145,7 @@ sal_Int32 SAL_CALL SwAccessibleDocumentBase::getAccessibleChildCount( void )
 }
 
 uno::Reference< XAccessible> SAL_CALL
-    SwAccessibleDocumentBase::getAccessibleChild( sal_Int32 nIndex )
+    SwAccessibleDocumentBase::getAccessibleChild( const sal_Int32 nIndex )
         throw (uno::RuntimeException,
                 lang::IndexOutOfBoundsException)
 {
@@ -177,13 +177,16 @@ sal_Int32 SAL_CALL SwAccessibleDocumentBase::getAccessibleIndexInParent (void)
 
     uno::Reference < XAccessibleContext > xAcc( mxParent->getAccessibleContext() );
     uno::Reference < XAccessible > xThis( this );
-    sal_Int32 nCount = xAcc->getAccessibleChildCount();
-
-    for( sal_Int32 i=0; i < nCount; i++ )
+    const sal_Int32 nCount = xAcc->getAccessibleChildCount();
+    sal_Int32 i = 0;
+       
+    while(i < nCount)
     {
-        if( xAcc->getAccessibleChild( i ) == xThis )
-            return i;
+           if( xAcc->getAccessibleChild( i ) == xThis )
+                   return i;
+           i++;
     }
+
     return -1L;
 }
 
@@ -336,7 +339,7 @@ SwAccessibleDocument::~SwAccessibleDocument()
         pWin->RemoveChildEventListener( LINK( this, SwAccessibleDocument, WindowChildEventListener 
));
 }
 
-void SwAccessibleDocument::Dispose( sal_Bool bRecursive )
+void SwAccessibleDocument::Dispose( const sal_Bool bRecursive )
 {
     OSL_ENSURE( GetFrm() && GetMap(), "already disposed" );
 
@@ -471,7 +474,7 @@ void SwAccessibleDocument::selectAccessibleChild(
 }
 
 sal_Bool SwAccessibleDocument::isAccessibleChildSelected(
-    sal_Int32 nChildIndex )
+    const sal_Int32 nChildIndex )
     throw ( lang::IndexOutOfBoundsException,
             uno::RuntimeException )
 {
@@ -497,7 +500,7 @@ sal_Int32 SwAccessibleDocument::getSelectedAccessibleChildCount(  )
 }
 
 uno::Reference<XAccessible> SwAccessibleDocument::getSelectedAccessibleChild(
-    sal_Int32 nSelectedChildIndex )
+    const sal_Int32 nSelectedChildIndex )
     throw ( lang::IndexOutOfBoundsException,
             uno::RuntimeException)
 {
@@ -506,7 +509,7 @@ uno::Reference<XAccessible> SwAccessibleDocument::getSelectedAccessibleChild(
 
 // --> OD 2004-11-16 #111714# - index has to be treated as global child index.
 void SwAccessibleDocument::deselectAccessibleChild(
-    sal_Int32 nChildIndex )
+    const sal_Int32 nChildIndex )
     throw ( lang::IndexOutOfBoundsException,
             uno::RuntimeException )
 {

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.