Bug 131540

Summary: FILESAVE DOCX OLE object anchored to page moves on saving
Product: LibreOffice Reporter: NISZ LibreOffice Team <libreoffice>
Component: WriterAssignee: Attila Bakos (NISZ) <bakos.attilakaroly>
Status: VERIFIED FIXED    
Severity: normal CC: bakos.attilakaroly, himajin100000, nemeth
Priority: medium Keywords: filter:docx
Version: 5.1.0.3 release   
Hardware: All   
OS: All   
Whiteboard: target:7.2.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 112976    
Attachments: Example file from Writer
The example file saved as docx
Screenshot of the exported document side by side in Writer and Word
The Sample File Before-, and After Export In Writer 7.1

Description NISZ LibreOffice Team 2020-03-24 15:12:41 UTC
Created attachment 158948 [details]
Example file from Writer

Attached odt file contains two simple embedded OLE objects anchored to page.
When saving to DOCX the positioning and wrap settings of these objects change.

Steps to reproduce:
1.	Open attached odt file
2.	Save as docx and reopen in Writer or Word

Actual results:
Objects change position both jump to the top left corner of the page.

Expected results:
Position unchanged.

LibreOffice details:
Version: 7.0.0.0.alpha0+ (x64)
Build ID: bc898e2c2784e36ad4d4cdf6d962e39069d2c82d
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: GL; VCL: win; 
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: CL

In 5.1 we started to be able to properly export such OLE objects, it looks the same back until then.
Comment 1 Durgapriyanka 2020-03-25 20:50:27 UTC
Thank you for reporting the bug. I cannot reproduce this bug in

Version: 6.4.0.0.alpha1+ (x86)
Build ID: ec7374ff84c71edfbb30d6e4dc5b486b6df7107f
CPU threads: 2; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-11-10_21:37:30
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
	

and in

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 2 NISZ LibreOffice Team 2020-03-26 08:51:36 UTC
Created attachment 159027 [details]
The example file saved as docx
Comment 3 NISZ LibreOffice Team 2020-03-26 08:52:48 UTC
Created attachment 159028 [details]
Screenshot of the exported document side by side in Writer and Word

Sorry, forgot to add the exported docx and the screenshot.
Comment 4 Timur 2020-03-27 08:08:41 UTC
Repro 7.0+ for DOCX, same position in LO and MSO. But MSO cannot open those objects.
Position was better in 5.0 (although saved as character). But files couldn't open.
No repro for DOC.
Comment 5 Attila Bakos (NISZ) 2020-09-09 13:34:55 UTC
Created attachment 165322 [details]
The Sample File Before-, and After Export In Writer 7.1

Now the problem is: why changed the relative position from page to paragraph on export? See the mark in this attachment.
Comment 6 Commit Notification 2021-01-20 11:20:17 UTC
Attila Bakos (NISZ) committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/eedf45f6b18e3466caf72f7ee56856e4aae11cf6

tdf#131540 DOCX export: fix OLE position in v:shape

It will be available in 7.2.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 7 NISZ LibreOffice Team 2021-02-08 11:38:54 UTC
Verified in
Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 44b914b1e2616ca8f70e896e653a46ca93610234
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: threaded