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

Noel Grandin noel at peralex.com
Mon Oct 3 15:11:12 UTC 2016


 sd/source/ui/unoidl/UnoDocumentSettings.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 85bd2c1145e23b67aafdfcc9c2ca8d720194fe97
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Oct 3 10:07:41 2016 +0200

    fix bug in DocumentSettings::LoadList when testing result of lastIndexOf
    
    managed to trigger it in a flat ODF test document of mine.
    
    I suspect that this might have something to do with one of the various
    conversions to OUString, the old String APIs might have returned -LARGE_INTEGER
    instead of -1.
    
    code was introduced in commit
        cbcfda9b2079ea4ef83b2a42828408b5f70f7692
        Author: Michael Meeks <michael.meeks at novell.com>
        Date:   Mon Sep 5 17:22:24 2011 +0100
        add XPropertyList enum, factory, and associated cleanup
    
    Change-Id: I39b4715cc12ef6366fe0466786589ef198602a98
    Reviewed-on: https://gerrit.libreoffice.org/29473
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    (cherry picked from commit 9f0096d934fcdec6cd55e32a15fd438f628f894b)
    Reviewed-on: https://gerrit.libreoffice.org/29480
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
index ec108a3..dd9f494 100644
--- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx
+++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
@@ -233,7 +233,7 @@ bool DocumentSettings::LoadList( XPropertyListType t, const OUString &rInPath,
 
     sal_Int32 nSlash = rInPath.lastIndexOf('/');
     OUString aPath, aName;
-    if (nSlash < -1)
+    if (nSlash < 0)
         aName = rInPath;
     else {
         aName = rInPath.copy( nSlash + 1 );


More information about the Libreoffice-commits mailing list