From b585a9809cfc6b777c0012cf36d9eddba8a14e32 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Sun, 29 May 2011 10:25:40 -0400 Subject: Doing this will handle empty sub strings correctly. --- sc/source/core/tool/userlist.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'sc/source') diff --git a/sc/source/core/tool/userlist.cxx b/sc/source/core/tool/userlist.cxx index d5bf672c84c4..8dda6d2a5153 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; } } -- cgit