Bug 73305 - Other: Text fields corrupted by added trailing space
Summary: Other: Text fields corrupted by added trailing space
Status: RESOLVED DUPLICATE of bug 70275
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
Whiteboard: BSA
Depends on:
Reported: 2014-01-05 13:57 UTC by James Murray
Modified: 2014-01-05 17:20 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:

Spreadsheet that demonstrates the added space problem (17.75 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-01-05 13:57 UTC, James Murray

Note You need to log in before you can comment on or make changes to this bug.
Description James Murray 2014-01-05 13:57:04 UTC
Created attachment 91522 [details]
Spreadsheet that demonstrates the added space problem

Problem description: 
Text fields e.g. "Bank" get corrupted when spreadsheet is saved and then re-opened. On re-opening the field contains "Bank " and lookups that depend on that field contents fail.

Steps to reproduce:
1. Open my accounts spreadsheet (ods format)
2. Fix those fields by removing spaces.
3. Save and close spreadsheet
4. Open spreadsheet
5. Examine fields - spaces now added

Current behavior:
A space gets added erroneously.
Same problem in also.

Expected behavior:
Field contents should be preserved.

There also looks to be a second bug.
Sometimes "Bank" == "Bank " and sometimes "Bank" != "Bank "
In the test spreadsheet this comparison is true. In my actual accounts spreadsheet (a superset of the test one) it is returning false.

I'm not going to post the full spreadsheet, but will email to a developer if required.
Operating System: Ubuntu
Version: release
Comment 1 GerardF 2014-01-05 15:49:24 UTC
Cells are formatted with the following Excel built-in number format:
[>0]# ##0,00" ";[<0]-# ##0,00" ";" -"#" ";@ 

Note the extra space after the @

If I open the Style dialog and modify the style removing the trailing space, all works fine.

I do not thing there is a bug here unless this space is added by LibreOffice.
If you have Excel, can you test this:
Create a file with a style using this format (without space) in Excel
Open this file with LibreOffice and check if space is added.

If not this report can be closed.
Comment 2 GerardF 2014-01-05 17:20:12 UTC
After a search, it is the same bug as 70275.

*** This bug has been marked as a duplicate of bug 70275 ***