Bug Hunting Session
Bug 112547 - FILEOPEN: Text on OLE object is not read
Summary: FILEOPEN: Text on OLE object is not read
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: x86 (IA32) All
: medium normal
Assignee: Regina Henschel
URL:
Whiteboard: target:6.0.0 target:5.4.4
Keywords:
: 106262 (view as bug list)
Depends on:
Blocks: OLE-Objects
  Show dependency treegraph
 
Reported: 2017-09-21 10:12 UTC by Regina Henschel
Modified: 2017-12-11 10:28 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Collection of files with OLE objects (76.33 KB, application/x-zip-compressed)
2017-09-21 10:12 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2017-09-21 10:12:22 UTC
Created attachment 136426 [details]
Collection of files with OLE objects

In testing bug 112005 I noticed this problem.
It is possible to add text to a OLE object.
Click on the object, so that it gets green handles.
Press F2 key. Now you are in edit mode.
Type some text.
Click outside to exit edit mode.
Move the OLE object around to make sure, that the text indeed belongs to the OLE.

The text is written in a <loext:p> element as child of the <draw:frame> elements, which holds the connection data to the OLE and the replacement image.
The fix for bug 112005 makes sure, that this <loext:p> element is actually written.

But when you open the file, the text is gone. That is bad user experience, because the user notice the lost text only, if he later on opens the document.

The attached zip-file contains the test files, which I have created for verifying the fix for bug 112005.
Comment 1 Jacques Guilleron 2017-09-21 17:23:46 UTC
Hi Regina,

I reproduce with
LO : 6.0.0.0.alpha0+ Build ID: e0aed1459513be5e08fab9de06848df5dc9d0b5f
CPU threads: 2; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2017-09-20_06:45:25
Locale: fr-FR (fr_FR); Calc: CL
Comment 2 Regina Henschel 2017-09-22 20:55:13 UTC
If the text is in a <text:p> inside the <draw:object> element, then the text is shown. This construction was the original one inherited from AOO, but it is not valid to have a <text:p> element inside the <draw:object> element. When was the <text:p> element moved to the parent <draw:frame> element?
Comment 3 Regina Henschel 2017-10-21 23:15:03 UTC
Will try to fix it.
Comment 4 Regina Henschel 2017-10-22 16:59:58 UTC
This feature has been broken from the beginning, when the patch from https://bz.apache.org/ooo/show_bug.cgi?id=118485 was integrated in LibreOffice sometime 2012.

The import expects, that the paragraph is inside the <draw:object> or <draw:object-ole> element respectivelly. But in contrast to AOO, in LO the paragraph is written one level higher outside of <draw:object> and <draw:object-ole> element.

Because of comment #10 in the linked bug, I do not change the import to read the paragraph from the place LibreOffice writes it, but I change LibreOffice, so that it writes the paragraph into the <draw:object> element.

To test the fix, you need to add text to Math-objects, Chart-objects and true OLE-objects. Save the documents and reload them. After reloading the text should be still there. The text may have several paragraphs and styled characters.
Comment 5 Regina Henschel 2017-10-24 09:51:39 UTC
*** Bug 106262 has been marked as a duplicate of this bug. ***
Comment 6 Commit Notification 2017-11-06 19:21:38 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=21f61ffeb7e72caee98f12cac2dd25fe7ec3a821

tdf#112547 element p to draw:object, import expects it there

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2017-11-06 19:23:05 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b3cfb849b19dc1e40c12586bebd2b76fc41007fa

tdf#112547 sd: add unit test

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2017-11-10 22:35:14 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0958cd79545a21a37642f812937d57164117bffe&h=libreoffice-5-4

tdf#112547 element p to draw:object, import expects it there

It will be available in 5.4.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Xisco Faulí 2017-12-11 08:57:25 UTC
A polite ping to Regina Henschel: is this bug fixed? if so, could you
please close it as RESOLVED FIXED ? Thanks
Comment 10 Regina Henschel 2017-12-11 10:28:18 UTC
It is fixed in Version: 6.1.0.0.alpha0+ (x64)
Build ID: 401a3d2336bf46b38235c498ff86ff675d0de759
CPU threads: 8; OS: Windows 10.0; UI render: GL; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2017-11-28_00:13:08
Locale: de-DE (de_DE); Calc: CL

and in Version: 5.4.4.1 (x64)
Build-ID: da790616461e15a10c95a80eb8ef8ee7b726c114
CPU-Threads: 8; BS: Windows 6.19; UI-Render: GL; 
Gebietsschema: de-DE (de_DE); Calc: CL