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

Caolán McNamara caolanm at redhat.com
Tue May 24 19:58:23 UTC 2016


 sd/source/ui/slidesorter/model/SlideSorterModel.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c5ab14e2bca0cc4fabd25b27f078a1c38fda4fa7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue May 24 20:44:11 2016 +0100

    Resolves: tdf#100024 CRASH when setting a background image
    
    possibly triggered by changes like...
    
    commit bb3671180eb7327be9ac178e0d8341322f63d72a
    Author: Caolán McNamara <caolanm at redhat.com>
    Date:   Tue May 17 20:38:37 2016 +0100
    
        Related: tdf#99523 NotifyPageEvent ultimately comes from HINT_PAGEORDERCHG...
    
        which is called for removepage, insertpage *and* change page number. e.g.
        ctrl+shift+end and similar *move* the page, in those cases not removing before
        adding results in duplicate pages/slides in the list, causing inconsistencies
        on what gets selected on undo
    
    which made things not get arbitrarily duplicated during page changes
    
    Change-Id: I0acf241947c9688f3512b54cc3d8f6892126495b

diff --git a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
index dae17c5..cd8c2df 100644
--- a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
+++ b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
@@ -557,7 +557,7 @@ void SlideSorterModel::InsertSlide (SdPage* pPage)
     if (nIndex>0)
         if (GetPage(nIndex-1) != GetPageDescriptor(nIndex-1)->GetPage())
             return;
-    if (size_t(nIndex)<maPageDescriptors.size()-1)
+    if (nIndex < static_cast<sal_Int32>(maPageDescriptors.size()) -1)
         if (GetPage(nIndex+1) != GetPageDescriptor(nIndex)->GetPage())
             return;
 


More information about the Libreoffice-commits mailing list