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

Stephan Bergmann sbergman at redhat.com
Thu Jan 21 00:18:25 PST 2016


 sdext/source/pdfimport/tree/pdfiprocessor.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 436a003bcfc98aeb2bc8f1d6b0f552cc67e908f0
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 19 10:41:08 2016 +0100

    Ensure irreflexivity of std::stable_sort predicate
    
    GCC 6 libstdc++ checks for that in debug mode now
    
    Change-Id: I879b1b5eb9b54ad19749e561c55333b0a084c699
    (cherry picked from commit 72865662208e1c053c8a48b4751e234cf3a312da)
    Reviewed-on: https://gerrit.libreoffice.org/21635
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
index 59b48ea..80d5cee 100644
--- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx
+++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
@@ -636,6 +636,10 @@ void PDFIProcessor::endIndicator()
 
 static bool lr_tb_sort( Element* pLeft, Element* pRight )
 {
+    // Ensure irreflexivity (which could be compromised if h or w is negative):
+    if (pLeft == pRight)
+        return false;
+
     // first: top-bottom sorting
 
     // Note: allow for 10% overlap on text lines since text lines are usually


More information about the Libreoffice-commits mailing list