[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - starmath/qa starmath/source
Caolán McNamara
caolanm at redhat.com
Thu May 29 00:56:29 PDT 2014
starmath/qa/cppunit/test_nodetotextvisitors.cxx | 1 +
starmath/source/parse.cxx | 8 +++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 27b6e664a6ac4de9192aaf6f0ee99ff021101d36
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue May 27 11:26:54 2014 +0100
Resolves: fdo#77831 use classic token rules for user-defined char (%foo)
Change-Id: Iebae064986ad722d445c8d654e39e338e104f021
(cherry picked from commit 501e5b98ad39156cac465a161709ad38b89e3d63)
Reviewed-on: https://gerrit.libreoffice.org/9497
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
index 99ae4b2..ef95e8d 100644
--- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx
+++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
@@ -241,6 +241,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()
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 98b579a..e503943 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -382,6 +382,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 |
@@ -651,7 +657,7 @@ void SmParser::NextToken()
m_aBufferString, rnEndPos,
KParseTokens::ANY_LETTER,
aEmptyStr,
- coContFlags,
+ coUserDefinedCharContFlags,
aEmptyStr );
sal_Int32 nTmpStart = rnEndPos + aTmpRes.LeadingWhiteSpace;
More information about the Libreoffice-commits
mailing list