[Libreoffice-commits] core.git: sc/source

Albert Thuswaldner albert.thuswaldner at gmail.com
Thu Apr 11 05:55:33 PDT 2013


 sc/source/ui/dbgui/tpsort.cxx |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 15e0ef908c9e54527276500cf7a537055c374850
Author: Albert Thuswaldner <albert.thuswaldner at gmail.com>
Date:   Sat Apr 6 21:43:48 2013 +0200

    fdo#51828 - UI: Sort: can use more than 3 criteria once only
    
    Change-Id: I7480e8d606e1eafde45635e36dfafa4232f529cb
    Reviewed-on: https://gerrit.libreoffice.org/3217
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 4c56058..6731e71 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -168,9 +168,19 @@ void ScTabPageSortFields::Reset( const SfxItemSet& /* rArgSet */ )
     // ListBox selection:
     if ( aSortData.maKeyState[0].bDoSort )
     {
+        // Make sure that the all sort keys are reset
+        for ( sal_uInt16 i=nSortKeyCount; i<aSortData.maKeyState.size(); i++ )
+        {
+            maSortKeyCtrl.AddSortKey(i+1);
+            maSortKeyItems[i].m_pLbSort->SetSelectHdl( LINK( this,
+                                 ScTabPageSortFields, SelectHdl ) );
+        }
+        nSortKeyCount = aSortData.maKeyState.size();
+        FillFieldLists(0);
+
         for ( sal_uInt16 i=0; i<nSortKeyCount; i++ )
         {
-            if ( i < aSortData.maKeyState.size() && aSortData.maKeyState[i].bDoSort )
+            if (aSortData.maKeyState[i].bDoSort )
             {
                 maSortKeyItems[i].m_pLbSort->SelectEntryPos( GetFieldSelPos(
                                     aSortData.maKeyState[i].nField ) );
@@ -193,7 +203,6 @@ void ScTabPageSortFields::Reset( const SfxItemSet& /* rArgSet */ )
                 maSortKeyItems[i].DisableField();
             else
                 maSortKeyItems[i].EnableField();
-
     }
     else
     {


More information about the Libreoffice-commits mailing list