Kaydet (Commit) 501e5b98 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: fdo#77831 use classic token rules for user-defined char (%foo)

Change-Id: Iebae064986ad722d445c8d654e39e338e104f021
üst e1b8e109
......@@ -232,6 +232,7 @@ void Test::SimpleOperators()
parseandparseagain("llint a", "Double curved integral");
parseandparseagain("lllint a", "Triple curved integral");
parseandparseagain("prod from {i=1} to {n} {(i+1)}", "Product with range");
ParseAndCheck("%Ux2135", "%Ux2135", "fdo#77831");
}
void Test::SimpleAttributes()
......
......@@ -375,6 +375,12 @@ const sal_Int32 coContFlags =
(coStartFlags & ~KParseTokens::IGNORE_LEADING_WS)
| KParseTokens::TWO_DOUBLE_QUOTES_BREAK_STRING;
// user-defined char continuing characters may be any alphanumeric or dot.
const sal_Int32 coUserDefinedCharContFlags =
((KParseTokens::ANY_LETTER_OR_NUMBER | KParseTokens::IGNORE_LEADING_WS | KParseTokens::ASC_DOT)
& ~KParseTokens::IGNORE_LEADING_WS)
| KParseTokens::TWO_DOUBLE_QUOTES_BREAK_STRING;
// First character for numbers, may be any numeric or dot
const sal_Int32 coNumStartFlags =
KParseTokens::ASC_DIGIT |
......@@ -644,7 +650,7 @@ void SmParser::NextToken()
m_aBufferString, rnEndPos,
KParseTokens::ANY_LETTER,
aEmptyStr,
coContFlags,
coUserDefinedCharContFlags,
aEmptyStr );
sal_Int32 nTmpStart = rnEndPos + aTmpRes.LeadingWhiteSpace;
......
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