Bug 133035

Summary: FILESAVE DOCX OLE Object position not saved if inserted in Word
Product: LibreOffice Reporter: NISZ LibreOffice Team <libreoffice>
Component: WriterAssignee: Attila Bakos (NISZ) <bakos.attilakaroly>
Status: RESOLVED FIXED    
Severity: normal CC: bakos.attilakaroly, nemeth
Priority: medium    
Version: 7.0.0.0.alpha1+   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=131539
Whiteboard: target:7.0.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 112976    
Attachments: Example file from Word
The original file saved by Writer / case A
The original file saved by Writer / case B
The exported files in Word – Case A is wrong, Case B is correct
The exported file from Writer after the patch
Screenshot before and after the export with the patch

Description NISZ LibreOffice Team 2020-05-14 14:48:37 UTC
Created attachment 160821 [details]
Example file from Word

This is a spin off from bug #131539
OLE object saving was fixed there, but only in the case when the object was created in Writer.
If a Word-made OLE object is imported, it has no name by default, and in this case the alignment is not saved.

Steps to reproduce:
    1. Open attached document
    2. A, Save as DOCX, reopen.
    3. B, Right click on the object, select Properties from the menu. Go to Options tab, close the dialog and save as DOCX, reopen.

Actual results:
In the A, case the object alignment is not retained, in the case B it is.

Expected results:
Object alignment is retained in case A.

LibreOffice details:
Version: 7.0.0.0.alpha1+ (x64)
Build ID: 1ed7607454d1492f65c78443cb661d5873face6b
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win; 
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL
Comment 1 NISZ LibreOffice Team 2020-05-14 14:49:09 UTC
Created attachment 160822 [details]
The original file saved by Writer / case A
Comment 2 NISZ LibreOffice Team 2020-05-14 14:49:25 UTC
Created attachment 160823 [details]
The original file saved by Writer / case B
Comment 3 NISZ LibreOffice Team 2020-05-14 14:49:45 UTC
Created attachment 160824 [details]
The exported files in Word – Case A is wrong, Case B is correct
Comment 4 Commit Notification 2020-05-21 09:59:30 UTC
Attila Bakos committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/45fe51bca2ab534cfe1139b734d839728225d6d9

tdf#133035 DOCX export: fix position of unnamed OLE

It will be available in 7.0.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 5 Attila Bakos (NISZ) 2020-05-25 09:58:44 UTC
Created attachment 161254 [details]
The exported file from Writer after the patch
Comment 6 Attila Bakos (NISZ) 2020-05-25 10:00:57 UTC
Created attachment 161255 [details]
Screenshot before and after the export with the patch