[Libreoffice-commits] core.git: formula/source
Eike Rathke (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jul 28 09:43:06 UTC 2021
formula/source/core/api/FormulaCompiler.cxx | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 6eb9fde88af245a00247fca8a592ed08ee4b8bbe
Author: Eike Rathke <erack at redhat.com>
AuthorDate: Wed Jul 28 02:00:53 2021 +0200
Commit: Eike Rathke <erack at redhat.com>
CommitDate: Wed Jul 28 11:42:30 2021 +0200
ODFF: eliminate spaces between function name and initial opening parenthesis
Same as for OOXML, they are disallowed in ODFF as well.
Change-Id: Iff78a901838092a3ee32221fdaadd28ee50f7646
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119577
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack at redhat.com>
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index 3907c1ac8314..be5ce09d132f 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -2290,11 +2290,18 @@ const FormulaToken* FormulaCompiler::CreateStringFromToken( OUStringBuffer& rBuf
bWriteSpaces = false;
}
}
- else if (mxSymbols->isOOXML())
+ if (bWriteSpaces)
{
+ // ODF v1.3 OpenFormula 5.14 Whitespace states "whitespace shall
+ // not separate a function name from its initial opening
+ // parenthesis".
+ //
// ECMA-376-1:2016 18.17.2 Syntax states "that no space characters
// shall separate a function-name from the left parenthesis (()
// that follows it." and Excel even chokes on it.
+ //
+ // Suppress/remove it in any case also in UI, it will not be
+ // preserved.
const FormulaToken* p = maArrIterator.PeekPrevNoSpaces();
if (p && p->IsFunction())
{
More information about the Libreoffice-commits
mailing list