Bug 44575 - libvisio: carriage return in text box is transformed into space
Summary: libvisio: carriage return in text box is transformed into space
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
Master old -3.6
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Fridrich Strba
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-08 06:12 UTC by Bruno Girin
Modified: 2013-03-22 11:59 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bruno Girin 2012-01-08 06:12:18 UTC
When entering several paragraphs of text separate by a carriage return in a Visio text box and importing that document in Libre Office Draw, all carriage returns are transformed into space thus losing the paragraph breaks.

Steps to reproduce:
1. Create a Visio file a text box.
2. Enter several paragraphs of text in the text box, using carriage returns to separate paragraphs.
3. Open the file using Libre Office Draw

Expected behaviour:
The text box should show the text the same was as Visio does with paragraph breaks in the same places.

Actual behaviour:
All carriage returns have been transformed into spaces thus removing paragraph breaks.

In the following example file, all text boxes have a carriage return just before the words "Lorem ipsum": https://bugs.freedesktop.org/attachment.cgi?id=55284
Comment 1 Fridrich Strba 2012-01-11 02:52:33 UTC
This one is actually more complicated then it sounds :)
The libwpg's API that libvisio shares was designed with SVG as target in its mind primarily. There, the text formating is very limited, and it was designed for text that does not wrap and stays on one line.
With the Visio file-format, we extended this until the point where we could without breaking the ABI/API. The proper way would be to send tabs, line-breaks and similar elements not as a part of the text stream, but as separate elements.
I started to rewrite the libwpg's API (in libwpg git master) to allow the text boxes inside graphic document with the same rich formating as in writer text boxes. This will be in libwpg 0.3.x and in libvisio 0.1.x. Only not sure when that will be.
Comment 2 Fridrich Strba 2013-03-22 11:59:39 UTC
This one is fixed in LibreOffice 4.0