[Libreoffice-bugs] [Bug 121105] New: the current() function is confused if used twice in a formula

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Nov 1 20:48:39 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=121105

            Bug ID: 121105
           Summary: the current() function is confused if used twice in a
                    formula
           Product: LibreOffice
           Version: 5.2.7.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: jiri at boha.cz

Description:
The CURRENT() function seems to be broken if used twice in a formula.
Say I want to use STYLE() to apply a "red" style for numbers between 3 and 4,
and "green" otherwise:

=A1+STYLE(IF(OR(CURRENT() > 4, CURRENT() <3),"green","red"))

I always get the "green" style.

I will attach a test spreadsheet.
Reproducible on 6.0.4.2 in openSUSE and 5.2.7.2 in Debian.

Steps to Reproduce:
1. open calc
2. in B2 enter =A1+STYLE(IF(OR(CURRENT() > 4, CURRENT() <3),"green","red"))
3. copy B2 to B2..B5
4. enter 1 2 3 4 5 in A1 A5 A3 A4 A5
5. define a "red" style with a red background and a "green" style with a green
background


Actual Results:
B1..B5 are all green

Expected Results:
B3 and B4 should be red


Reproducible: Always


User Profile Reset: No



Additional Info:

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20181101/0e2ea923/attachment.html>


More information about the Libreoffice-bugs mailing list