kbrown / rpms / libreoffice

Forked from rpms/libreoffice 2 years ago
Clone

Blame SOURCES/0104-pages-with-equal-Priority-and-Class-getting-dropped.patch

f0633d
From 6a7a73d278c300ac7519d1ec50e5a4495f174f89 Mon Sep 17 00:00:00 2001
f0633d
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
f0633d
Date: Thu, 12 Dec 2013 12:37:43 +0000
f0633d
Subject: [PATCH 104/109] pages with equal Priority and Class getting dropped
f0633d
f0633d
Change-Id: Ib053dc4b6e5fb5f01f48c71a4b295a53c0ec6715
f0633d
(cherry picked from commit 9790588da4b2de455ffc7a2cc69f26539823c3da)
f0633d
(cherry picked from commit be366ad7690b190c5ef4dc42311a4df6b7dcce4b)
f0633d
Reviewed-on: https://gerrit.libreoffice.org/7054
f0633d
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
f0633d
Tested-by: Stephan Bergmann <sbergman@redhat.com>
f0633d
---
f0633d
 sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx | 11 ++++++++---
f0633d
 1 file changed, 8 insertions(+), 3 deletions(-)
f0633d
f0633d
diff --git a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
f0633d
index d02bae1..835787b 100644
f0633d
--- a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
f0633d
+++ b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
f0633d
@@ -40,9 +40,14 @@ public:
f0633d
         bool operator() (const Request& rRequest1, const Request& rRequest2)
f0633d
         {
f0633d
             if (rRequest1.meClass == rRequest2.meClass)
f0633d
-                return (rRequest1.mnPriorityInClass > rRequest2.mnPriorityInClass);
f0633d
-            else
f0633d
-                return (rRequest1.meClass < rRequest2.meClass);
f0633d
+            {
f0633d
+                if (rRequest1.mnPriorityInClass == rRequest2.mnPriorityInClass)
f0633d
+                {
f0633d
+                    return rRequest1.maKey < rRequest2.maKey;
f0633d
+                }
f0633d
+                return rRequest1.mnPriorityInClass > rRequest2.mnPriorityInClass;
f0633d
+            }
f0633d
+            return rRequest1.meClass < rRequest2.meClass;
f0633d
         }
f0633d
     };
f0633d
     /** Request data is compared arbitrarily by their addresses in memory.
f0633d
-- 
f0633d
1.8.4.2
f0633d