[Libreoffice-commits] .: Branch 'libreoffice-3-6' - 2 commits - sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Nov 12 04:05:11 PST 2012


 sc/source/ui/dbgui/tpsort.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 7bb3480f5428c5925e5fa11bfdaf7ded784e2976
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Mon Nov 12 03:07:38 2012 +0100

    only set entries for existing sort entries, related fdo#56958
    
    Change-Id: Ib48606402fb90b259f705badeac294d7c336cb9c
    (cherry picked from commit c45b6496e87fe74570a41821bc5f4fbdb3d3cf8e)
    
    Signed-off-by: David Tardon <dtardon at redhat.com>

diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index c9c7707..38724dd 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -164,7 +164,7 @@ void ScTabPageSortFields::Reset( const SfxItemSet& /* rArgSet */ )
     {
         for ( sal_uInt16 i=0; i<nSortKeyCount; i++ )
         {
-            if ( aSortData.maKeyState[i].bDoSort )
+            if ( i < aSortData.maKeyState.size() && aSortData.maKeyState[i].bDoSort )
             {
                 maSortKeyItems[i].aLbSort.SelectEntryPos( GetFieldSelPos(
                                     aSortData.maKeyState[i].nField ) );
commit fb1d5fbc36ee33a818477413be9ffe2a9e5f6143
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Mon Nov 12 03:08:54 2012 +0100

    make sure that the sort vector is large enough, fdo#56958
    
    Change-Id: I7099e984a8b05ccd3324f3b9231c193e716eaf83
    (cherry picked from commit cd545dcf511daedd548c11159b8c244f272e9cb6)
    
    Signed-off-by: David Tardon <dtardon at redhat.com>

diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 7ebbb47..c9c7707 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -236,6 +236,9 @@ sal_Bool ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet )
         if ( nSortPos[i] == LISTBOX_ENTRY_NOTFOUND ) nSortPos[i] = 0;
     }
 
+    if( nSortKeyCount >= aNewSortData.maKeyState.size() )
+        aNewSortData.maKeyState.resize(nSortKeyCount);
+
     if ( nSortPos[0] > 0 )
     {
         for ( sal_uInt16 i=0; i<nSortKeyCount; i++ )


More information about the Libreoffice-commits mailing list