[Libreoffice-commits] core.git: formula/source
Eike Rathke
erack at redhat.com
Fri May 27 19:59:16 UTC 2016
formula/source/core/api/token.cxx | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
New commits:
commit 3129b75fca1ec38fc79cbc5397b28923fc273ff9
Author: Eike Rathke <erack at redhat.com>
Date: Fri May 27 21:49:00 2016 +0200
strip 0 argument only if not part of an expression, tdf#70806
Change-Id: Ia1f986a594194a1c564d815bbe2faa987eea971a
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index e79b526..beec153 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -1386,7 +1386,16 @@ FormulaTokenArray * FormulaTokenArray::RewriteMissing( const MissingConvention &
{
// Omit only a literal 0 value, nothing else.
if (pOcds[ i ] == nFn && pCur->GetOpCode() == ocPush && pCur->GetDouble() == 0.0)
- bAdd = false;
+ {
+ // No other expression, between separators.
+ FormulaToken* p = PeekPrevNoSpaces();
+ if (p && p->GetOpCode() == ocSep)
+ {
+ p = PeekNextNoSpaces();
+ if (p && p->GetOpCode() == ocSep)
+ bAdd = false;
+ }
+ }
}
}
switch ( pCur->GetOpCode() )
More information about the Libreoffice-commits
mailing list