Bug 142059 - FILEOPEN DOCX Embedded document is not positioned correctly inside OLE object
Summary: FILEOPEN DOCX Embedded document is not positioned correctly inside OLE object
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: implementationError
Depends on:
Blocks: DOCX-OLE-Objects
  Show dependency treegraph
 
Reported: 2021-05-03 13:42 UTC by NISZ LibreOffice Team
Modified: 2023-01-27 17:42 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word (23.71 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-05-03 13:42 UTC, NISZ LibreOffice Team
Details
Screenshot of the original document side by side in Word and Writer (78.32 KB, image/png)
2021-05-03 13:42 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 2021-05-03 13:42:24 UTC
Created attachment 171607 [details]
Example file from Word

Attached document contains an OLE object which was a simple docx file with a bit of lorem ipsum.
In Word the content of the embedding is positioned by default to have the text start at the top left corner of the object (so that the left and top margin is hidden), but in Writer the objects content begins at the top left corner of the page, so that left and top margin is visible, while the bottom and right portion of the text is not.

Steps to reproduce:
1.	Open attached document

Actual results:
The left and top margin of the embedded document is visible, while its text is not entirely.

Expected results:
Only the text of the embedded document is visible like in Word.

LibreOffice details:
Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 77419c6f3aba1fd5b1660795923c22a39bdb1bad
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: en-US (hu_HU); UI: hu-HU
Calc: CL

Also happens in 7.0, 6.0, 5.0, 4.4 but not yet in 4.3
In 4.3 the embedded document opened by double click in a new window and the initial placeholder looked good, since 4.4 the embedded document opens in an embedded dialog, but the initial placeholders content is off by a margin-sized bit.

Additional Information: 
Bibisected to the following range:
https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=93b35682c4458f76f09e10cf934dd51adfb26deb..56c9850145faa9ac04c3f09633e56b6c8c22c6c4 

Of which this commit stands out:

author	Miklos Vajna <vmiklos@collabora.co.uk>	2014-08-27 15:24:37 +0200
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2014-08-27 15:34:41 +0200

DOCX import: fix handling of embedded DOCX files

This would make it an implementation error.
Comment 1 NISZ LibreOffice Team 2021-05-03 13:42:44 UTC
Created attachment 171608 [details]
Screenshot of the original document side by side in Word and Writer
Comment 2 Dieter 2021-05-18 06:38:10 UTC
I confirm it with

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 1675a68526c43c6c6e4dc850ee911f0c1de75c88
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

in comparision with Word 2016