Kaydet (Commit) 953b282d authored tarafından Wang Lei's avatar Wang Lei

#i119943 - Underline "_" can not work with ";" in format code, the semicolon…

#i119943 -  Underline "_" can not work with ";" in format code, the semicolon will always be regarded as separator 

Patch by: Zhang Lu
Review by: Wang Lei
üst 6ffd516e
......@@ -1134,6 +1134,18 @@ LanguageType SvNumberformat::ImpGetLanguageType( const String& rString,
LANGUAGE_DONTKNOW;
}
sal_Bool IsSingleSymbol(String& rString, xub_StrLen nPos){
sal_Bool ret = sal_False;
while(nPos > 0){
if(rString.GetChar(nPos) == '*' || rString.GetChar(nPos) == '\\' || rString.GetChar(nPos) == '_'){
ret = !ret;
nPos--;
}
else
return ret;
}
return ret;
}
short SvNumberformat::ImpNextSymbol(String& rString,
xub_StrLen& nPos,
......@@ -1285,8 +1297,10 @@ short SvNumberformat::ImpNextSymbol(String& rString,
break;
case SsGetString:
{
if (cToken == ';')
if (cToken == ';' && !IsSingleSymbol(rString, nPos-2))
{
eState = SsStop;
}
else
sSymbol += cToken;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment