diff options
author | Eike Rathke <erack@redhat.com> | 2013-04-19 00:47:57 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-04-19 00:50:11 +0200 |
commit | fa72fc3eddbfabb82193452a4ba993b11d1584da (patch) | |
tree | 934bf27d5c52d7aaac5b37a72e3f0426db201491 /svl | |
parent | b9e6bd790f99b9018ea0a594cca8efcb1709c5e7 (diff) |
OUString::startsWith() is not equivalent to String::Match()
String::Match() wasn't quite right at that place either, but..
Change-Id: I1aed325340f5f36973ef2da8fd48af3283c0b79b
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/numbers/zforscan.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx index 43a4bbc5e3a5..a0d44dbb6472 100644 --- a/svl/source/numbers/zforscan.cxx +++ b/svl/source/numbers/zforscan.cxx @@ -481,9 +481,9 @@ Color* ImpSvNumberformatScan::GetColor(OUString& sStr) if (i >= NF_MAX_DEFAULT_COLORS) { const OUString& rColorWord = rKeyword[NF_KEY_COLOR]; - sal_Int32 nPos = sString.startsWith(rColorWord); - if (nPos > 0) + if (sString.startsWith(rColorWord)) { + sal_Int32 nPos = rColorWord.getLength(); sStr = sStr.copy(nPos); sStr = comphelper::string::strip(sStr, ' '); if (bConvertMode) |