Created attachment 163718 [details]
Example file from Word with two grouped shapes
Attached document is a minimized version of the Word 2010 title page template Transcendent.
It has two rectangle shapes which are grouped, the magenta one being exactly the page size.
When opened in Writer the magenta shape is slightly smaller than in Word, and the white shape is a bit smaller and wider too.
Steps to reproduce:
1. Open attached file
Magenta shape has 27.94 cm height instead of 29,7 cm (1,76 cm smaller).
White shape has 25.69 cm height instead of 27.31 cm (1,62 cm smaller) and 19.43 cm width instead of 18.9 cm (0.53 cm wider).
Both shapes have the same size as in Word.
Version: 126.96.36.199.alpha0+ (x64)
Build ID: <buildversion>
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: en-US (hu_HU); UI: en-US
Also happens in:
Build az.: 64a0f66915f38c6217de274f0aa8e15618924765
CPU szálak: 4; OS: Windows 6.3; Felületmegjelenítés: alapértelmezett;
Területi beállítások: hu-HU (hu_HU); Calc: CL
Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b
Locale: hu-HU (hu_HU)
Build az.: 05dceb5d363845f2cf968344d7adab8dcfb2ba71
In older versions the grouped shapes were not even imported.
Created attachment 163719 [details]
Screenshot of the magenta shapes properties side by side in Word and Writer
Created attachment 163720 [details]
Screenshot of the white shapes properties side by side in Word and Writer
Build ID: bc44e0acef79a2c0d4f0504023be21bd78451214
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
The corresponding attributes in ODF are style:rel-height and style:rel-width.
LibreOffice has it implemented for a Frame. That has a UI to set it. It is written to file as direct attribute of the <draw:frame> element.
LibreOffice can interpret these attributes for some kind of shapes as attributes of the <style:graphic-properties> element of a style. It works for a TextBox. That is a <draw:frame> element and from point of view of ODF not different to a Frame. It works too for legacy rectangle and oval and for polygons, but the shapes will be a little bit too large. LibreOffice has no UI to set it in these cases, but the attributes are available via API.
LibreOffice cannot interpret these attributes for custom shapes. Therefore it fails with the example document.
So a short-term solution could be, to import a shape as Frame in Writer, if it has a rectangular geometry, no shape rotation, no text rotation, and no special effects like shadow or glow.
And long-term solution would be to implement these attributes for custom shapes too, correct the size, and bring the attributes to UI.
A workaround could be to recalculate the shape size on import depending on the actual page size.
*** Bug 150255 has been marked as a duplicate of this bug. ***