[Libreoffice-bugs] [Bug 111675] IFS() and SWITCH() should short-cut evaluation like IF() and CHOOSE()

2022-03-14 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111675

--- Comment #28 from Commit Notification 
 ---
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9d5ec2c9d0bf8765fc75c17a0e6fdcb2583335d0

tdf#111675: sc_logical_functions: Add unittest

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 111675] IFS() and SWITCH() should short-cut evaluation like IF() and CHOOSE()

2022-03-14 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111675

--- Comment #27 from Commit Notification 
 ---
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/91ca6a8eded939373e78ecf6091b3598936f2c08

Related: tdf#111675 Clear global error for arguments if possible

It will be available in 7.3.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 111675] IFS() and SWITCH() should short-cut evaluation like IF() and CHOOSE()

2022-03-14 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111675

--- Comment #26 from Commit Notification 
 ---
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/69bf8f5e6dc43adde087403531641f2bd064a22c

Related: tdf#111675 Replace Pop() with PopError() where relevant

It will be available in 7.3.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 111675] IFS() and SWITCH() should short-cut evaluation like IF() and CHOOSE()

2022-03-14 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111675

Commit Notification  changed:

   What|Removed |Added

 Whiteboard|target:7.4.0|target:7.4.0 target:7.3.3

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 111675] IFS() and SWITCH() should short-cut evaluation like IF() and CHOOSE()

2022-03-12 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111675

--- Comment #25 from Eike Rathke  ---
This fixes only the error inheritance of subsequent evaluated arguments as
mentioned in comment 22.
Pending review for 7-3
https://gerrit.libreoffice.org/c/core/+/131362
https://gerrit.libreoffice.org/c/core/+/131363

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 111675] IFS() and SWITCH() should short-cut evaluation like IF() and CHOOSE()

2022-03-12 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111675

--- Comment #24 from Commit Notification 
 ---
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/efb713febeaaf3e4b17886d405d46845d4a0e676

Related: tdf#111675 Clear global error for arguments if possible

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 111675] IFS() and SWITCH() should short-cut evaluation like IF() and CHOOSE()

2022-03-12 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111675

--- Comment #23 from Commit Notification 
 ---
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/84720c09ef30e79c56936026c3992240b4ae010b

Related: tdf#111675 Replace Pop() with PopError() where relevant

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 111675] IFS() and SWITCH() should short-cut evaluation like IF() and CHOOSE()

2022-03-12 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111675

Commit Notification  changed:

   What|Removed |Added

 Whiteboard||target:7.4.0

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 111675] IFS() and SWITCH() should short-cut evaluation like IF() and CHOOSE()

2022-03-11 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111675

--- Comment #22 from Eike Rathke  ---
Best forget about CURRENT() and STYLE() in all this context, they're just
symptoms. Better suited examples are of comment 13

=IFS(0;1/0;1;TRUE())
=SWITCH(1;0;1/0;1;TRUE())

return #DIV/0!

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 111675] IFS() and SWITCH() should short-cut evaluation like IF() and CHOOSE()

2022-03-11 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111675

--- Comment #21 from Eike Rathke  ---
The problem with CURRENT() within IFS() or SWITCH() is that *all* arguments are
evaluated before calling the function, it doesn't behave as someone might
expect (i.e. executed only if the corresponding jump condition evaluates to
TRUE as this is not implemented as jump code branches). Apart from that many
assumptions what CURRENT() would do are simply wrong..

If implementation was done with short-cut evaluation jump code branches then an
expression like
=23+IFS(FALSE();CURRENT()*2;FALSE();CURRENT()*3;TRUE();CURRENT()*4)
would yield 115 same as
=23+IF(FALSE();CURRENT()*2;IF(FALSE();CURRENT()*3;CURRENT()*4))
does, but currently it yields 27 because for the last condition the CURRENT()
has the value 1 of the preceding parameter's TRUE() argument.

Doing this with jump code branches would eliminate unnecessary calculations,
with the side effect that using STYLE() in conditional branches would actually
apply the desired style and not the last encountered during evaluation of
arguments. Apart from that using STYLE() is bad style and conditional
formatting should be used instead..

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 111675] IFS() and SWITCH() should short-cut evaluation like IF() and CHOOSE()

2022-03-10 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111675

--- Comment #20 from Mike Kaganski  ---
By the way, instead of trying to make CURRENT work with other functions in a
way one or another user might expect in a specific situation, IMO a better
would be to implement LET function (bug 137543), which would allow to define a
variable to a specific value, and reuse it as many times in different places in
that formula as required.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 111675] IFS() and SWITCH() should short-cut evaluation like IF() and CHOOSE()

2022-03-10 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111675

--- Comment #19 from Mike Kaganski  ---
(In reply to Andreas Heinisch from comment #18)
> The problem here ist that the calculations within the IFS function (for
> instance the DIV) are evaluated before the actual IFS function itself.
> Hence, any further calculation leads to a DIV to ZERO error, because if
> there is an error, no further calculations are made.

I do not see this to be *directly* related to the original problem:

(In reply to Michael from comment #9)
> If you look on my example attached
> (https://bugs.documentfoundation.org/attachment.cgi?id=135441), the IFS
> formula in B5 is: 
> 
> =B2+STYLE(IFS(CURRENT()B3;"Rot"))

Additionally, I do not see how could "IFS() and SWITCH() should short-cut
evaluation like IF() and CHOOSE()" title (change by Eike from 2018-03-12) be
directly related here for the initially stated problem ("UI: Functions IFS does
not work together with function CURRENT").

While it might be reasonable to add short-circuiting to the IFS and SWITCH, I
do not see how that could avoid evaluating the "unneeded" branches in the
presence of CURRENT (or, more specifically, how could it avoid changing CURRENT
value "unexpectedly"), which necessarily evaluates what was put to stack last
before this invocation of CURRENT, and thus must take either the next or the
previous *Value N* argument value - whichever direction the evaluation uses,
but definitely not what user would naively expect (that it would use something
from the distant past in the formula), independent of the short-circuiting that
CHOOSE might do.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 111675] IFS() and SWITCH() should short-cut evaluation like IF() and CHOOSE()

2021-04-15 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111675

--- Comment #18 from Andreas Heinisch  ---
The problem here ist that the calculations within the IFS function (for
instance the DIV) are evaluated before the actual IFS function itself. Hence,
any further calculation leads to a DIV to ZERO error, because if there is an
error, no further calculations are made.

So this example leads to this error:
=IFS(0,1/0,1,TRUE())

This example works:
=IFS(0,1/0,1,"test")

So I think the only possibility to get this to work, is to change the generated
compilation steps for this function.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 111675] IFS() and SWITCH() should short-cut evaluation like IF() and CHOOSE()

2020-10-02 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111675

--- Comment #17 from Vincent  ---
Might find it here: master/sc/source/core/data/funcdesc.cxx

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 111675] IFS() and SWITCH() should short-cut evaluation like IF() and CHOOSE()

2020-10-02 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111675

--- Comment #16 from Vincent  ---
Hi,

First try to solve a bug. I'm trying to find where those functions are defined
in the source code. Somebody already look for it ?
Thanks

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 111675] IFS() and SWITCH() should short-cut evaluation like IF() and CHOOSE()

2020-09-30 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111675

Eike Rathke  changed:

   What|Removed |Added

 CC||vincent.glach...@gmail.com

--- Comment #15 from Eike Rathke  ---
*** Bug 137135 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 111675] IFS() and SWITCH() should short-cut evaluation like IF() and CHOOSE()

2020-01-06 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111675

himajin100...@gmail.com changed:

   What|Removed |Added

   See Also||https://bugs.documentfounda
   ||tion.org/show_bug.cgi?id=12
   ||9681

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 111675] IFS() and SWITCH() should short-cut evaluation like IF() and CHOOSE()

2019-12-27 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111675

--- Comment #14 from b.  ---
@So: u're right, bug, evaluating things that shouldn't ... 
while that's wrong OP question not solveable ...

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 111675] IFS() and SWITCH() should short-cut evaluation like IF() and CHOOSE()

2019-12-22 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111675

--- Comment #13 from So  ---
Still in 6.4.0 RC1. Both
=IFS(0,1/0,1,TRUE())
=SWITCH(1,0,1/0,1,TRUE())
return #DIV/0!

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 111675] IFS() and SWITCH() should short-cut evaluation like IF() and CHOOSE()

2019-03-12 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111675

--- Comment #12 from QA Administrators  ---
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today,
LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed
bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this
bug report. During that time, it's possible that the bug has been fixed, or the
details of the problem have changed. We'd really appreciate your help in
getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice
from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information
from Help - About LibreOffice.

If the bug is NOT present, please set the bug's Status field to
RESOLVED-WORKSFORME and leave a comment that includes the information from Help
- About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular
meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a
REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your
bug pertains to a feature added after 3.3) from
http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat:
https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

[Libreoffice-bugs] [Bug 111675] IFS() and SWITCH() should short-cut evaluation like IF() and CHOOSE()

2018-03-12 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111675

Eike Rathke  changed:

   What|Removed |Added

   Hardware|x86-64 (AMD64)  |All
Version|5.3.3.2 release |5.2 all versions
 OS|Linux (All) |All

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 111675] IFS() and SWITCH() should short-cut evaluation like IF() and CHOOSE()

2018-03-12 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111675

--- Comment #11 from Eike Rathke  ---
*** Bug 113595 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 111675] IFS() and SWITCH() should short-cut evaluation like IF() and CHOOSE()

2018-03-12 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111675

Eike Rathke  changed:

   What|Removed |Added

 Status|REOPENED|NEW
Summary|UI: Functions IFS does not  |IFS() and SWITCH() should
   |work together with function |short-cut evaluation like
   |CURRENT |IF() and CHOOSE()

--- Comment #10 from Eike Rathke  ---
I'm repeating myself:
"IFS() evaluates conditions until it finds a matching one, sprinkling CURRENT()
all over makes it depend on internal behaviour what arguments will be evaluated
first, which currently may be all before IFS() is called and in future may be
only the ones until one is matched."
and
"Using CURRENT() multiple times at the same function level within one
expression means relying on internal implementation details. One should not. It
may change without notice."

> =B2+STYLE(IFS(CURRENT()B3;"Rot"))
> 
> And my question is: For B3 constantly being e.g. "4", how could a value of
> "4" for B2 lead to the condition "CURRENT()>B3" being selected by IFS() ??? 
Because here the state of CURRENT is not what you think it is. For the first
CURRENT()B3 it is "Gelb"
that was just pushed on the stack, and a string is greater than a numeric
value.

Anyway, I'll keep this and close bug 113595 instead, they have the same reason.

IFS() and SWITCH() currently evaluate all parameters' arguments in order
encountered from left to right for IFS() and right to left for SWITCH() and
return the result matching for the condition(s). They do not short-cut
evaluation like IF() and CHOOSE() do. Hence for a function that has side
effects like STYLE() all styles are applied and the last one evaluated wins.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs