https://issues.apache.org/ooo/show_bug.cgi?id=108228

Pedro Giffuni <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
           Assignee|[email protected]              |[email protected]

--- Comment #5 from Pedro Giffuni <[email protected]> ---
The issue is very well explained in the LibreOffice list:
http://lists.freedesktop.org/archives/libreoffice/2010-December/004303.html

"The problem behaviour occurs because the boolean expression "true"
evaluates to -1 rather than +1 in formulas in Writer. So if, for
example, you create a table formula in Writer, (Table->Formula) and
enter something like 1+(2==2), it evaluates to 0 rather than 2. It
turns out the reason for this is buried in sbxdef.hxx, where we have

// The numeric values of TRUE and FALSE
enum SbxBOOL { SbxFALSE = 0, SbxTRUE = -1 };

..."

The proposed fix is in file
sw/source/core/bastyp/calc.cxx function SwSbxValue::MakeDouble

change the comparison in 1763 so that the action happens
when GetType() is equal to either SbxSTRING or SbxBOOL

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to