Bug 137596 - FILESAVE FILEOPEN Text in embedded Draw objects is lost when reading a FODT
Summary: FILESAVE FILEOPEN Text in embedded Draw objects is lost when reading a FODT
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-19 13:03 UTC by woundorf
Modified: 2020-12-30 11:18 UTC (History)
1 user (show)

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 woundorf 2020-10-19 13:03:15 UTC
Description:
With recent versions of LibreOffice (since 6.4.7.* at least), if you save a Flat ODT with an embedded Draw object that contains a shape with text, then this text is not loaded when this file is opened later. The text is not even loaded with older versions of LibreOffice, although the text is in the file. See steps to reproduce and actual and expected results for an example that will be easier to understand.

More details:

- The text is actually in the XML, it's just that LibreOffice doesn't read it. Then, if you modify the file and save it, then the text is lost.
- This happens only with fodt, with normal odt it works well.
- If a text box is used instead of a shape, there is no problem.
- This happens when saving the file with LibreOffice 6.4 and later (tried with 6.4 and 7.0). A file saved with these versions of LibreOffice will open without text even in previous versions of LibreOffice. However if the file is saved with LibreOffice 6.3 or previous, it opens well in all versions.

When saved with LibreOffice 6.4 or later, the automatic style for the shape (named "gr1" for the first shape) contains the following child element:

<style:paragraph-properties style:writing-mode="lr-tb"/>

When this is present in the automatic style of a shape, the text is not read by any version of LibreOffice. If this is removed with a text editor, then the text is correctly read by all versions of LibreOffice. This child element is not created with older versions of LibreOffice. This tag also appears in automatic styles of text boxes, but in that case there is no problem.

Steps to Reproduce:
1. Open LibreOffice Writer
2. Insert > Object > OLE object…
3. LibreOffice <version> Drawing
4. Draw a rectangle
5. Write some text in it
6. Click outside of the drawing area to return to the text document
7. Save the document as fodt
8. Close the document
9. Open it again

Actual Results:
The rectangle is shown without text. If you double click to edit it, the text is not there.

Expected Results:
It should be like when it was saved, showing a rectangle with text.


Reproducible: Always


User Profile Reset: No



Additional Info:
Versió: 6.4.7.2
ID de la construcció: 6.4.7.2-1.fc32
Fils de CPU: 8; SO: Linux 5.8; Renderitzador de la IU: per defecte; VCL: gtk3; 
Configuració local: ca-ES (ca_AD.UTF-8); Llengua de la IU: ca-ES
Calc: threaded

This is the specific version in the computer from which I am writing the bug report, but I can reproduce the bug also in other Windows, Mac and Linux machines and with other versions. Enabling or disabling OpenGL does not change the behaviour.
Comment 1 raal 2020-12-30 00:24:03 UTC
I can not confirm with Version: 7.2.0.0.alpha0+
Build ID: 2577d9ecea199ca2c10d852cf279053a1b22faf7
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

Seems to be fixed in dev version. Please could you test with dev version?
http://dev-builds.libreoffice.org/daily/master/
Thank you
Comment 2 woundorf 2020-12-30 10:13:47 UTC
I have tried in the dev version and yes, it's fixed. Thanks!