[Libreoffice-commits] core.git: sw/source

Caolán McNamara caolanm at redhat.com
Thu Feb 23 20:27:39 UTC 2017


 sw/source/core/doc/docbm.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 5d6b5bb57bb82a0dc480ca2ea17da5396f598af7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 16 11:18:41 2017 +0000

    assert on export of ooo59665-1.sxw to odt
    
    rSecondStart.nContent in this case has no m_pIndexReg
    
    just move on with our lives wrt this sorting
    
    Change-Id: I9642c5d345dabd02f3feea83bc2ffbf3f7adb082
    Reviewed-on: https://gerrit.libreoffice.org/34336
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index dccb6ff..0192bbb 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -84,9 +84,11 @@ namespace
         {
             return rFirstStart.nNode < rSecondStart.nNode;
         }
-        if (rFirstStart.nContent != 0 || rSecondStart.nContent != 0)
+        const sal_Int32 nFirstContent = rFirstStart.nContent.GetIndex();
+        const sal_Int32 nSecondContent = rSecondStart.nContent.GetIndex();
+        if (nFirstContent != 0 || nSecondContent != 0)
         {
-            return rFirstStart.nContent < rSecondStart.nContent;
+            return nFirstContent < nSecondContent;
         }
         auto *const pCRFirst (dynamic_cast<::sw::mark::CrossRefBookmark const*>(rpFirst.get()));
         auto *const pCRSecond(dynamic_cast<::sw::mark::CrossRefBookmark const*>(rpSecond.get()));


More information about the Libreoffice-commits mailing list