Bug 75702 - FILEOPEN: line-break ignored
Summary: FILEOPEN: line-break ignored
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Spreadsheet (show other bugs)
Version: 4.2.1.1 release
Hardware: Other Windows (All)
: medium enhancement
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-03 10:44 UTC by sylvain
Modified: 2015-01-04 12:01 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
A1 cell with two lines (1.92 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-03-03 10:44 UTC, sylvain
Details
Sample file with line break added. (9.31 KB, application/xml)
2014-03-03 23:12 UTC, m.a.riosv
Details
Cell with a line-break in Writer (8.33 KB, application/vnd.oasis.opendocument.text)
2014-03-04 08:37 UTC, sylvain
Details

Description sylvain 2014-03-03 10:44:04 UTC
Created attachment 95016 [details]
A1 cell with two lines

Problem description: 
<text:line-break/> are ignored in cells.

Steps to reproduce:
1. Generate a file with a line break or open the attached file

Current behavior:
All line breaks are removed, leaving only one line of text. On save the new lines are gone from the file.

Expected behavior:
The cell should display one line above the other.

Operating System: Windows 7
Version: 4.2.1.1 release
Comment 1 sylvain 2014-03-03 10:51:16 UTC
The file opens and saves fine in OpenOffice 3.2.
In LibreOffice 3.6.2.1 the single line is hidden. I.e. If the file content was line1<line-break/>line2 then the cell content is line1line2\n but only the second empty line is displayed unless the row height is grown.
Comment 2 m.a.riosv 2014-03-03 23:12:12 UTC
Created attachment 95063 [details]
Sample file with line break added.

Hi sylvain, thanks for reporting.

Your file open without line break in 4.1.6 4.2.1 4.2.2

But adding a line break, save, open in any of this version with line break.
find attached the new file.
Comment 3 sylvain 2014-03-04 08:33:03 UTC
Hi,
  sorry if I wasn't clear, the bug is ignoring the XML element <text:line-break/>. Not the UI feature of line break which in Calc insert a new <text:p>.
But this could be connected as in Writer inserting a line break in in the UI creates an actual <text:line-break/> element.
Comment 4 sylvain 2014-03-04 08:36:02 UTC
Sorry hit save before finishing my last sentence ;
But this could be connected as in Writer inserting a line break in a table cell from the UI creates an actual <text:line-break/> element. I've attached a sample.
Comment 5 sylvain 2014-03-04 08:37:10 UTC
Created attachment 95074 [details]
Cell with a line-break in Writer
Comment 6 m.a.riosv 2014-03-04 22:32:41 UTC
I have not found if it might be available in ods files as part of cell text.
Comment 7 sylvain 2014-03-17 10:15:20 UTC
The XML syntax is the same for all document types, see 9.1.1 in OpenDocument-v1.2-os-part1 and also 6.1.1 Paragraph Elements Content/Basic Text Content/General : "The paragraph elements <text:p> and <text:h> and their *descendant elements* contain the text content of *any* document." IMHO this clearly says that <text:line-break/> (just as <text:s/> and <text:span>) should be supported everywhere by LibreOffice and not just in Writer. All the more since multi-line UI is already supported in Calc.
Comment 8 foss 2015-01-04 12:01:51 UTC
OSX behaves identical thus OS > All.

Not sure if this should or should not be working. Setting to Enhancement and NEW.

We need a dev to chime in on this if this enhancement request makes sense or not.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.