Kaydet (Commit) 9f0096d9 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Michael Meeks

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
    cbcfda9b
    Author: Michael Meeks <michael.meeks@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/29473Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
üst bd631f93
...@@ -233,7 +233,7 @@ bool DocumentSettings::LoadList( XPropertyListType t, const OUString &rInPath, ...@@ -233,7 +233,7 @@ bool DocumentSettings::LoadList( XPropertyListType t, const OUString &rInPath,
sal_Int32 nSlash = rInPath.lastIndexOf('/'); sal_Int32 nSlash = rInPath.lastIndexOf('/');
OUString aPath, aName; OUString aPath, aName;
if (nSlash < -1) if (nSlash < 0)
aName = rInPath; aName = rInPath;
else { else {
aName = rInPath.copy( nSlash + 1 ); aName = rInPath.copy( nSlash + 1 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment