[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - formula/source
Eike Rathke
erack at redhat.com
Fri May 27 20:26:26 UTC 2016
formula/source/core/api/token.cxx | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
New commits:
commit 88630f20d1f26d74980e81721cd621b6f309a9ec
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
(cherry picked from commit 3129b75fca1ec38fc79cbc5397b28923fc273ff9)
Reviewed-on: https://gerrit.libreoffice.org/25568
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index b1a1f00..14a671b 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -1437,7 +1437,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