diff options
author | Albert Thuswaldner <albert.thuswaldner@gmail.com> | 2013-04-06 21:43:48 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-04-11 12:55:12 +0000 |
commit | 15e0ef908c9e54527276500cf7a537055c374850 (patch) | |
tree | 3828c5e8bdbd4691f41eb00a60f1b36fff526451 | |
parent | 0b2d290600f545e929820432f12a88b206c1d19b (diff) |
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@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sc/source/ui/dbgui/tpsort.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 4c56058da302..6731e7195cb6 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 { |