summaryrefslogtreecommitdiff
path: root/starmath/source/parse.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-05-27 11:26:54 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-05-27 11:27:41 +0100
commit501e5b98ad39156cac465a161709ad38b89e3d63 (patch)
tree2356e4b8fd201b705c8cc0862a012db2893eae36 /starmath/source/parse.cxx
parente1b8e1099e3b97875f7d2a0026e2592719508b12 (diff)
Resolves: fdo#77831 use classic token rules for user-defined char (%foo)
Change-Id: Iebae064986ad722d445c8d654e39e338e104f021
Diffstat (limited to 'starmath/source/parse.cxx')
-rw-r--r--starmath/source/parse.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index a1338e97c389..2a3fba1ebb48 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -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;