diff options
author | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2020-09-06 09:26:47 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-09-10 12:51:51 +0200 |
commit | 3c36d4921cf9d9c4fd33b3e1dd810f7a63d51695 (patch) | |
tree | 77f279630f6ba2e93daeab306df54bb632e68f3e /basic/source | |
parent | tdf#124470: Split export of table autostyles out from collection phase (diff) | |
download | core-3c36d4921cf9d9c4fd33b3e1dd810f7a63d51695.tar.gz core-3c36d4921cf9d9c4fd33b3e1dd810f7a63d51695.zip |
tdf#136032 - abort scan of a string beginning with a hashtag
Abort scan of a string beginning with a hashtag, if a comma is found. Otherwise, the compiler raises a syntax error. If
the string ends with a hashtag too, it will be parsed later checking for
a date literal.
Change-Id: I078a2302f5c65206367a00fbc584ffa7b9ede031
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102099
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 11292d1cc405e7c3b9e1f374cc7581a63a54b994)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101973
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit cc17346d682d85b6c083d76cae2d55dcc022e58f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102120
Diffstat (limited to 'basic/source')
-rw-r--r-- | basic/source/comp/scanner.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx index 7c192b3a0107..7c5a0d7b265d 100644 --- a/basic/source/comp/scanner.cxx +++ b/basic/source/comp/scanner.cxx @@ -251,7 +251,8 @@ bool SbiScanner::NextSym() do { nLineTempIdx++; - } while (nLineTempIdx < aLine.getLength() && !BasicCharClass::isWhitespace(aLine[nLineTempIdx]) && aLine[nLineTempIdx] != '#'); + } while (nLineTempIdx < aLine.getLength() && !BasicCharClass::isWhitespace(aLine[nLineTempIdx]) + && aLine[nLineTempIdx] != '#' && aLine[nLineTempIdx] != ','); // leave it if it is a date literal - it will be handled later if (nLineTempIdx >= aLine.getLength() || aLine[nLineTempIdx] != '#') { |