[Libreoffice-commits] .: Branch 'libreoffice-3-4' - toolkit/source

Petr Mladek pmladek at kemper.freedesktop.org
Mon Oct 24 06:53:51 PDT 2011


 toolkit/source/controls/stdtabcontroller.cxx |   13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

New commits:
commit ee26becc4a5690840fd3181b71d293340853b58e
Author: julien2412 <serval2412 at yahoo.fr>
Date:   Mon Oct 24 14:46:13 2011 +0200

    activation order crashes address database (fdo#41022)
    
    Signed-off-by: Petr Mladek <pmladek at suse.cz>

diff --git a/toolkit/source/controls/stdtabcontroller.cxx b/toolkit/source/controls/stdtabcontroller.cxx
index d5c2f06..2fecd4d 100644
--- a/toolkit/source/controls/stdtabcontroller.cxx
+++ b/toolkit/source/controls/stdtabcontroller.cxx
@@ -262,6 +262,7 @@ void StdTabController::autoTabOrder(  ) throw(RuntimeException)
     sal_uInt32 nCtrls = aCompSeq.getLength();
     Reference< XWindow > * pComponents = aCompSeq.getArray();
 
+    // insert sort algorithm
     ComponentEntryList aCtrls;
     size_t n;
     for ( n = 0; n < nCtrls; n++ )
@@ -277,15 +278,9 @@ void StdTabController::autoTabOrder(  ) throw(RuntimeException)
         for ( nPos = 0; nPos < aCtrls.size(); nPos++ )
         {
             ComponentEntry* pEntry = aCtrls[ nPos ];
-            if ( pEntry->aPos.Y() >= pE->aPos.Y() )
-            {
-                while ( pEntry && ( pEntry->aPos.Y() == pE->aPos.Y() )
-                                && ( pEntry->aPos.X() < pE->aPos.X() ) )
-                {
-                    pEntry = aCtrls[ ++nPos ];
-                }
-                break;
-            }
+            if ( ( pEntry->aPos.Y() > pE->aPos.Y() ) ||
+                 ( ( pEntry->aPos.Y() == pE->aPos.Y() ) && ( pEntry->aPos.X() > pE->aPos.X() ) ) )
+                    break;
         }
         if ( nPos < aCtrls.size() ) {
             ComponentEntryList::iterator it = aCtrls.begin();


More information about the Libreoffice-commits mailing list