Bug Hunting Session
Bug 56270 - FILESAVE: ODT file’s OLE objects are lost when you export to DOCX format
Summary: FILESAVE: ODT file’s OLE objects are lost when you export to DOCX format
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.0.alpha0+ Master
Hardware: Other All
: high critical
Assignee: Michael Stahl (CIB)
URL:
Whiteboard: target:5.2.0 target:5.1.2 target:5.0.6
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-22 04:07 UTC by ape
Modified: 2016-10-25 19:08 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
the test file (354.28 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2012-10-22 04:07 UTC, ape
Details
bt with debug symbols (19.78 KB, text/plain)
2015-12-29 14:03 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ape 2012-10-22 04:07:51 UTC
Created attachment 68896 [details]
the test file

1. Open the attached file.
2. Save its as FODT file.
3. Reload FODT file and save its.
4. The FODT file save as ODT.
5. Reload the ODT file.
6. Save its as new DOCX file.
7. Reload the new DOCX file.
Attached file contained some MSO-2003/XP formulas. These formulas (steps 2, 3, 4) were converted to OLE-objects "formula." Such formulas are lost when re-exporting to DOCX.
Comment 1 ape 2012-10-22 21:07:32 UTC
Addition to the description.
 a. The error description is written for LibreOffice-3.5.7.
 b. LibreOffice_3.6.x.x and LibO-dev_3.7.0.0 lose the formulas already in the third step, when exporting to FODT.
 --
Regression. Error status is changed (increased).
Comment 2 Petr Mladek 2012-10-25 09:46:22 UTC
Hint: You need to rename the attached file to proekt_MU.fodt. LO is not able to load it correctly with the .txt suffix.

Hmm, I am not able to reproduce the regression with LO-3.6.3.2 build. I still see formulas in the document after the 3rd step.

The rest was broken even before => old bug => can't block the release => lowering the severity a bit.

I think that Lubos worked on formula export/import issues. I hope that he could look at this one as well.

BTW: proekt_MU is really a good test case. I think there were reported more import/export bugs with it.
Comment 3 ape 2012-10-25 13:49:20 UTC
(In reply to comment #2)
> Hmm, I am not able to reproduce the regression with LO-3.6.3.2 build. I
> still see formulas in the document after the 3rd step.
> 
> I think that Lubos worked on formula export/import issues. I hope that he
> could look at this one as well.
--
Petr,
 a) it is possible that the first 3 steps - it's a mistake LibO_Win_x86 only (see bug 55437)
 b) if the convert OLE-formula (MCO-2003) in the formulas when opening DOCX-file, both errors will be fixed.
Comment 4 ape 2012-10-29 05:27:57 UTC
Hmm,
Import’s error already fixed in versions for Windows. But OLE objects of any types will be lost when you export this ODT file in DOCX format.
Comment 5 QA Administrators 2015-04-19 03:21:24 UTC Comment hidden (obsolete)
Comment 6 Buovjaga 2015-06-16 10:27:00 UTC
(In reply to ape from comment #0)
> Created attachment 68896 [details]
> the test file
> 
> 1. Open the attached file.
> 2. Save its as FODT file.
> 3. Reload FODT file and save its.
> 4. The FODT file save as ODT.
> 5. Reload the ODT file.
> 6. Save its as new DOCX file.
> 7. Reload the new DOCX file.
> Attached file contained some MSO-2003/XP formulas. These formulas (steps 2,
> 3, 4) were converted to OLE-objects "formula." Such formulas are lost when
> re-exporting to DOCX.

When I try to save the attachment as FODT I get
Error saving the document proekt_MU:
Write Error.
The file could not be written.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+
Build ID: 80ec99db4325a439a8a3f1d420d0a80f8bf9c439
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-06-16_00:00:20
Locale: fi-FI (fi_FI)
Comment 7 Julien Nabet 2015-12-29 14:03:04 UTC
Created attachment 121613 [details]
bt with debug symbols

I had a crash when trying to save in fodt.
Comment 8 Commit Notification 2016-02-12 17:59:18 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

sfx2: related tdf#56270: loss of embedded objects imported from DOCX

It will be available in 5.2.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 9 Michael Stahl (CIB) 2016-02-12 21:42:59 UTC
* there was a bug that the last 20 (depending on configuration)
  embedded Math objects were lost on Flat ODT export - fixed on master

* 213 MathType3 embedded objects survive the steps from the description
  with a current master build all the way to DOCX again
  (i haven't checked the object's content is preserved exactly,
   just that it's not empty)

* exception: there is an empty Math object 12 on page 4, after the text
  "Уровень операционных расходов (подконтрольные расходы) определяемый при установлении тарифов на очередной долгосрочный период регулирования, рассчитывается по формуле:"
  this also happens when opening the bugdoc in Word 2010 so it's
  working as intended.

=> FIXED
Comment 10 Commit Notification 2016-02-16 11:35:57 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=83f6dca40ff36697b426458962fa09564e5551bb&h=libreoffice-5-1

sfx2: related tdf#56270: loss of embedded objects imported from DOCX

It will be available in 5.1.2.

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 11 Commit Notification 2016-02-18 09:30:25 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b21bb8d7b3808eee06320b634e11e3a4ab217839&h=libreoffice-5-0

sfx2: related tdf#56270: loss of embedded objects imported from DOCX

It will be available in 5.0.6.

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.