[Libreoffice-commits] .: sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Sun May 29 07:27:14 PDT 2011
sc/source/core/tool/userlist.cxx | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
New commits:
commit d919e109a2e622bf402729162938088962d2cb9c
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Sun May 29 10:25:40 2011 -0400
Doing this will handle empty sub strings correctly.
diff --git a/sc/source/core/tool/userlist.cxx b/sc/source/core/tool/userlist.cxx
index ebef40a..7b7b1de 100644
--- a/sc/source/core/tool/userlist.cxx
+++ b/sc/source/core/tool/userlist.cxx
@@ -79,12 +79,15 @@ void ScUserListData::InitTokens()
nLen = 0;
bFirst = false;
}
- if (*p == cSep && nLen)
+ if (*p == cSep)
{
- OUString aSub(p0, nLen);
- String aUpStr = aSub;
- ScGlobal::pCharClass->toUpper(aUpStr);
- maSubStrings.push_back(new SubStr(aSub, aUpStr));
+ if (nLen)
+ {
+ OUString aSub(p0, nLen);
+ String aUpStr = aSub;
+ ScGlobal::pCharClass->toUpper(aUpStr);
+ maSubStrings.push_back(new SubStr(aSub, aUpStr));
+ }
bFirst = true;
}
}
More information about the Libreoffice-commits
mailing list