Bug 132483 - FILEOPEN DOCX OLE object aligned to page opens in shifted position
Summary: FILEOPEN DOCX OLE object aligned to page opens in shifted position
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Attila Bakos (NISZ)
URL:
Whiteboard: target:7.1.0 target:7.0.2
Keywords:
Depends on:
Blocks: DOCX-OLE-Objects
  Show dependency treegraph
 
Reported: 2020-04-28 09:09 UTC by NISZ LibreOffice Team
Modified: 2020-09-15 08:24 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Writer (20.69 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-04-28 09:09 UTC, NISZ LibreOffice Team
Details
Screenshot of the original document side by side in Word and Writer (104.50 KB, image/png)
2020-04-28 09:09 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2020-04-28 09:09:32 UTC
Created attachment 160016 [details]
Example file from Writer

When an OLE object is anchored relative to the page in Word it is imported incorrectly in Writer, much more to the right and bottom of the page than originally.

Also the same happens if - after bug #131539 is solved - an OLE object is saved by Writer and reloaded.

Steps to reproduce:
    1. Insert an XLSX file as OLE object in Word
    2. Change its wrapping to Square in the Format Object dialog
    3. In the Advanced – Layout dialog set its horizontal positioning to Absolute (I used 9 cm) and right of page and its vertical positioning (I used 5 cm) to under page.
    4. Save as DOCX and open it in Writer

Actual results:
The object is opened shifted more towards the bottom and the right side of the page than in Word.

Expected results:
Same positioning as in Word

LibreOffice details:
Version: 7.0.0.0.alpha0+ (x64)
Build ID: 60fcd4427231e8c48cd3bf8307e280fd3a13a84f
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win; 
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: CL
Comment 1 NISZ LibreOffice Team 2020-04-28 09:09:59 UTC
Created attachment 160017 [details]
Screenshot of the original document side by side in Word and Writer
Comment 2 Dieter 2020-05-03 04:46:42 UTC
I confirm it with

Version: 7.0.0.0.alpha0+ (x64)Build ID: 8c8b3a4f83f67882b284ddc3b3fe10d3fe6dedf4CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win; Locale: de-DE (de_DE); UI-Language: en-GBCalc: CL

Additional information: If you change horizontal position form "Paragraph text area" to "Left page border" in writer it looks as expected.
Comment 3 Commit Notification 2020-07-13 13:48:12 UTC
Bakos Attila committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/54031e6a2912ebe723b4423b5d737c13c9bb03c5

tdf#132483: DOCX import: fix OLE anchoring position

It will be available in 7.1.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 4 Xisco Faulí 2020-09-15 08:22:40 UTC
Verified in

Version: 7.1.0.0.alpha0+
Build ID: 6f1e02c96b887750f974c187a82ecd6236e6a435
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

@Attila Bakos, thanks for fixing this issue!!
Comment 5 Commit Notification 2020-09-15 08:24:03 UTC
Bakos Attila committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

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

tdf#132483: DOCX import: fix OLE anchoring position

It will be available in 7.0.2.

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.