Bug 72969 - EDITING: speculative: trailing spaces appended to result with cell borders
Summary: EDITING: speculative: trailing spaces appended to result with cell borders
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords: regression
Depends on:
Blocks:
 
Reported: 2013-12-22 13:21 UTC by Raymond DeCampo
Modified: 2017-01-30 18:10 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example spreadsheet as in the bug description (9.00 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-12-22 13:21 UTC, Raymond DeCampo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Raymond DeCampo 2013-12-22 13:21:33 UTC
Created attachment 91124 [details]
Example spreadsheet as in the bug description

Problem description: 

When adding formatting, e.g. borders, to a cell, the string value of the cell is affected.

Steps to reproduce:

See attached spreadsheet.  The first line has no formatting and behaves as expected.  The second line has a border on cell B2 and the value of that cell is affected.

Current behavior:

Cell C2 displays the value "Failed".
If the value of cell B2 is copied and pasted as text the value pasted is "foobar ".

Expected behavior:

Cell C2 displays the value "Passed" like the cell C1.  
If the value of cell B2 is copied and pasted as text the value pasted is "foobar".


Operating System: Ubuntu
Version: 4.1.3.2 release
Comment 1 Raymond DeCampo 2013-12-22 13:23:54 UTC
I forgot to clarify in the original description, the issue began manifesting when I upgraded from Ubuntu 13.04 to 13.10.  I believe the version of LibreOffice for 13.04 is 4.0.2.
Comment 2 Chris Peñalver 2013-12-22 17:07:20 UTC
Raymond DeCampo, thank you for reporting this. Would you please be able to bibisect this problem following https://wiki.documentfoundation.org/QA/HowToBibisect ? This would help tremendously in resolving this bug.
Comment 3 Kohei Yoshida 2014-04-28 22:57:25 UTC
I just tested this using the latest versions of 4.1 and 4.2 (and master), and this no longer happens.

To verify, you need to hit F9 after loading the submitted document because the formula results are initially cached.  Once the cells get recalculated, the reported problem no longer happens.
Comment 4 Chris Peñalver 2014-04-29 11:33:24 UTC
Kohei Yoshida, thanks for taking a look at this. Unfortunately, the issue noted in the Description is reproducible in:
Version: 4.2.3.3
Build ID: 882f8a0a489bc99a9e60c7905a60226254cb6ff0
Microsoft Windows Vista Business x86 6.0.6002 Service Pack 2 Build 6002

As well, F9 does not update the calculation.
Comment 5 Joel Madero 2014-11-06 00:06:40 UTC
There is some confusion about this issue as Kohei couldn't reproduce. Moving to UNCONFIRMED to get fresh eyes on it. Thanks for understanding.
Comment 6 Chris Peñalver 2014-11-06 02:04:45 UTC
The steps noted in the Description https://bugs.freedesktop.org/show_bug.cgi?id=72969#c0 are still confirmed verbatim in MASTER:
Version: 4.4.0.0.alpha1+
Build ID: b7d8a58ff2698ffc6e22943f64aa97c5ea253bd9
TinderBox: Win-x86@42, Branch:master, Time: 2014-11-05_00:40:38
Microsoft Windows Vista Business x86 6.0.6002 Service Pack 2 Build 6002

As I'm a member of LibreOffice QA, I've marked myself the QA contact if you would have any further questions on the scope of this report.
Comment 7 Joel Madero 2014-11-06 02:38:31 UTC
Apologies Christopher - didn't recognize your name :) Thanks for confirming!
Comment 8 QA Administrators 2015-12-20 16:13:39 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2017-01-03 19:48:44 UTC Comment hidden (obsolete)
Comment 10 Raymond DeCampo 2017-01-06 00:21:58 UTC
On Fedora 25, LO build ID 5.2.3.3-11.fc25, I still see the bug as originally described.

Marking with the regression keyword as the bug was not present in version 4.0.2.
Comment 11 Eike Rathke 2017-01-30 18:09:55 UTC
Cell B2 has been stored to file with the result office:string-value="foobar   " i.e. with trailing spaces, which also on Paste Special are preserved, hence the condition B2="foobar" does not match. This has nothing to do with the IF function. Unless B2 is recalculated (F9 on cell, Shift+Ctrl+F9 or recalculate after load through Tools Options) to fix the result value, there's nothing we can do.

If this was a specific bug in an earlier version (I have no idea how this could be even related to cell borders) it got fixed in the mean time. Closing.