summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-05-29 10:25:40 -0400
committerKohei Yoshida <kyoshida@novell.com>2011-05-29 10:25:40 -0400
commitb585a9809cfc6b777c0012cf36d9eddba8a14e32 (patch)
treeabf2b650d85cd7a51ba0640fe5610fd08a74de3f /sc/source
parent344edada8083c99f53ca615b5dbe8bc1a847c5f1 (diff)
Doing this will handle empty sub strings correctly.
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/tool/userlist.cxx13
1 files changed, 8 insertions, 5 deletions
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;
}
}