Bug 75650 - Formulas with boolean result change cell format while other formulas keep it
Summary: Formulas with boolean result change cell format while other formulas keep it
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:6.0.0 target:5.3.6 target:5.4....
Keywords: regression
: 100220 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-03-01 20:05 UTC by pavelz
Modified: 2017-07-30 19:26 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Boolean formula to numeric, cell format not updated (19.96 KB, image/png)
2016-06-10 00:20 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pavelz 2014-03-01 20:05:08 UTC
Create new spreadsheet.

In cell A1 enter value: 1
In cell A2 enter value: 2
In cell A3 enter formula: =IF(A1>A2)
In cell A3 as a result of formula appears boolean value: FALSE

Now delete A3 value (DEL key) and enter formula: =MAX(A1:A2)*1000
In cell A3 as a result of new formula appears boolean value: TRUE while expected result is 2000

Formulas with other than boolean result (e.g. MAX statement) should change format to standard, if it was set to boolean.
Comment 1 pavelz 2014-03-01 20:11:45 UTC
The problem is not with text values, i.e. when the result of formula is text value, then it is displayed correctly even if cell format is boolean.
Comment 2 A (Andy) 2014-03-08 10:21:29 UTC
reproducible with LO 4.2.1.1 (Win 8.1)
Comment 3 m.a.riosv 2014-05-17 22:25:36 UTC
Seems no longer reproducible.
Works for me with:
Win7x64Ultimate
Version: 4.2.4.2 Build ID: 63150712c6d317d27ce2db16eb94c2f3d7b699f8
Version: 4.2.5.0.0+ Build ID: da62ab5783e548c5785b3950c03d078b1f3e849d
   TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2014-05-16_08:13:28

I think we can change the status to worksforme, as 4.2.4.2 is the last released.
http://downloadarchive.documentfoundation.org/libreoffice/old/?C=M;O=D

Please if you are not agree, or you can reproduce the issue in this new versions, reopen it.
Comment 4 pavelz 2014-05-19 12:20:20 UTC
For me still reproducible in LO 4.2.4.2 (Ubuntu)
Comment 5 Aron Budea 2016-06-10 00:20:30 UTC
Created attachment 125583 [details]
Boolean formula to numeric, cell format not updated

The reason why it could not be reproduced is the "Now delete A3 value (DEL key) and enter formula" step. If the text is copied from a neutral source, like this bug report, you will see the formatting updated to number.

The formula in A3 either has to be changed for the issue to show:
1. via Input line,
2. by deleting A3, and pasting "=MAX(A1:A2)*1000" that was copied from Calc itself (another field),
3. by deleting A3, and writing "=MAX(A1:A2)*1000" manually.

Attaching a screenshot where:
-A3 has "=IF(A1>A2)", B3 has "=MAX(A1:A2)*1000"
-A4-A7 had "=IF(A1>A2)" initially

-A4 is updated by copying B3's Input line over its Input line
-A5 is updated by pressing Delete, and pasting B3's Input line
-A6 is updated by pressing Delete, and entering the formula manually
-A7 is updated by pressing Delete, and pasting the formula copied from this bug report

Result: A4-A6 shows TRUE, A7 shows 2000.
Expected: A4-A7 should show 2000.

Confirmed in 4.1.0.4 and 5.2.0.0.beta2.
Not confirmed in 4.0.0.3 => regression
Comment 6 Aron Budea 2016-06-10 00:22:38 UTC
*** Bug 100220 has been marked as a duplicate of this bug. ***
Comment 7 Commit Notification 2017-07-17 09:45:09 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1c1783864a356a4394f80dec28db939f4cf572cd

Resolves: tdf#75650 reset boolean number format to General for new formula

It will be available in 6.0.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2017-07-21 04:25:24 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c967cebeab0d5b343bd33d3a6f758aeaa40258f8&h=libreoffice-5-3

Resolves: tdf#75650 reset boolean number format to General for new formula

It will be available in 5.3.6.

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

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2017-07-21 04:26:47 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6622ea7365fbf1b425e5f90667dd7e6466fd0293&h=libreoffice-5-4

Resolves: tdf#75650 reset boolean number format to General for new formula

It will be available in 5.4.1.

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

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2017-07-21 09:32:52 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=245540b8df803bbe526157d010073dfa1e19b4f0&h=libreoffice-5-4-0

Resolves: tdf#75650 reset boolean number format to General for new formula

It will be available in 5.4.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2017-07-30 19:26:53 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ff4399939b1719233676ff9cc10ee1470dc6b567&h=libreoffice-5-3-5

Resolves: tdf#75650 reset boolean number format to General for new formula

It will be available in 5.3.5.

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

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