[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - sd/source

Caolán McNamara caolanm at redhat.com
Thu May 26 08:20:34 UTC 2016


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

New commits:
commit bcf7e38f4289fb13f0a5823d33f4cfc20f45683a
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
    (cherry picked from commit c5ab14e2bca0cc4fabd25b27f078a1c38fda4fa7)
    Reviewed-on: https://gerrit.libreoffice.org/25435
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
index 444ee3a..0b2082f 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