Kaydet (Commit) 4bc3473b authored tarafından Stephan Bergmann's avatar Stephan Bergmann Kaydeden (comit) Andras Timar

fdo#51954: -1 is small while STRING_NOTFOUND was great

...after String -> rtl::OUString conversion in
a4cbcf2f.

Change-Id: Ieb6dfce8c0cf7d8b5971d187b3b58b754c1cb02f
Signed-off-by: 's avatarAndras Timar <atimar@suse.com>
üst 525d2dab
......@@ -772,13 +772,13 @@ rtl::OUString SimpleParser::GetNextTokenString( ParserMessageList &rErrorList, s
if (nStyle2StartPos == -1 && nStyle3StartPos == -1)
return rtl::OUString(); // no more tokens
if ( nStyle4StartPos < nStyle2StartPos && nStyle4StartPos <= nStyle3StartPos ) // <= to make sure \\ is always handled first
if ( nStyle4StartPos != -1 && nStyle4StartPos < nStyle2StartPos && nStyle4StartPos <= nStyle3StartPos ) // <= to make sure \\ is always handled first
{ // Skip quoted Backslash
nPos = nStyle4StartPos +2;
return GetNextTokenString( rErrorList, rTagStartPos );
}
if ( nStyle2StartPos < nStyle3StartPos )
if ( nStyle2StartPos != -1 && ( nStyle3StartPos == -1 || nStyle2StartPos < nStyle3StartPos ) )
{ // test for $[ ... ] style tokens
sal_Int32 nEndPos = aSource.indexOf(']', nStyle2StartPos);
if (nEndPos == -1)
......
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