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

Michael Stahl mstahl at redhat.com
Thu Nov 30 12:17:53 UTC 2017


 sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d2d4e0b7ceaa3f635fa0caf2fb549afc530ca4e2
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Oct 16 21:20:57 2017 +0200

    sd: BestFittingCacheComparer must be irreflexive
    
    /usr/include/c++/7/bits/stl_algo.h:4866:
    Error: comparison doesn't meet irreflexive requirements, assert(!(a < a)).
    
    ... when using "Window->New Window" in Impress.
    
    Change-Id: I885a59cf378b7020d549580c2fc1cf121c6a59bd
    (cherry picked from commit d4269c5373cf8ccc0a5631b9d0900227e11e13f1)
    Reviewed-on: https://gerrit.libreoffice.org/45440
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
index 9b7f551e57f0..9cc2ae04ddde 100644
--- a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
@@ -89,10 +89,10 @@ public:
     bool operator()(const ::sd::slidesorter::cache::PageCacheManager::BestFittingPageCaches::value_type& rElement1,
         const ::sd::slidesorter::cache::PageCacheManager::BestFittingPageCaches::value_type& rElement2)
     {
-        if (rElement1.first == maPreferredSize)
-            return true;
-        else if (rElement2.first == maPreferredSize)
+        if (rElement2.first == maPreferredSize)
             return false;
+        else if (rElement1.first == maPreferredSize)
+            return true;
         else
             return (rElement1.first.Width()*rElement1.first.Height()
                 > rElement2.first.Width()*rElement2.first.Height());


More information about the Libreoffice-commits mailing list