summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svl/source/numbers/zforscan.cxx4
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)