Blob Blame History Raw
From 6a7a73d278c300ac7519d1ec50e5a4495f174f89 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Thu, 12 Dec 2013 12:37:43 +0000
Subject: [PATCH 104/109] pages with equal Priority and Class getting dropped

Change-Id: Ib053dc4b6e5fb5f01f48c71a4b295a53c0ec6715
(cherry picked from commit 9790588da4b2de455ffc7a2cc69f26539823c3da)
(cherry picked from commit be366ad7690b190c5ef4dc42311a4df6b7dcce4b)
Reviewed-on: https://gerrit.libreoffice.org/7054
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
---
 sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
index d02bae1..835787b 100644
--- a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
@@ -40,9 +40,14 @@ public:
         bool operator() (const Request& rRequest1, const Request& rRequest2)
         {
             if (rRequest1.meClass == rRequest2.meClass)
-                return (rRequest1.mnPriorityInClass > rRequest2.mnPriorityInClass);
-            else
-                return (rRequest1.meClass < rRequest2.meClass);
+            {
+                if (rRequest1.mnPriorityInClass == rRequest2.mnPriorityInClass)
+                {
+                    return rRequest1.maKey < rRequest2.maKey;
+                }
+                return rRequest1.mnPriorityInClass > rRequest2.mnPriorityInClass;
+            }
+            return rRequest1.meClass < rRequest2.meClass;
         }
     };
     /** Request data is compared arbitrarily by their addresses in memory.
-- 
1.8.4.2