Bug 135254 - FILEOPEN DOCX Grouped shapes have slightly different height/width
Summary: FILEOPEN DOCX Grouped shapes have slightly different height/width
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
: 150255 (view as bug list)
Depends on:
Blocks: DOCX-Grouped-Shapes
  Show dependency treegraph
 
Reported: 2020-07-29 07:25 UTC by NISZ LibreOffice Team
Modified: 2025-03-09 03:10 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word with two grouped shapes (21.85 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-07-29 07:25 UTC, NISZ LibreOffice Team
Details
Screenshot of the magenta shapes properties side by side in Word and Writer (117.68 KB, image/png)
2020-07-29 07:25 UTC, NISZ LibreOffice Team
Details
Screenshot of the white shapes properties side by side in Word and Writer (98.84 KB, image/png)
2020-07-29 07:26 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-07-29 07:25:19 UTC
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

Actual results:
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).

Expected results:
Both shapes have the same size as in Word.

LibreOffice details:
Version: 7.1.0.0.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
Calc: CL

Also happens in:
Verzió: 6.0.0.3
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

Version: 5.0.0.5
Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b
Locale: hu-HU (hu_HU)

Verzió: 4.2.0.4
Build az.: 05dceb5d363845f2cf968344d7adab8dcfb2ba71

In older versions the grouped shapes were not even imported.
Comment 1 NISZ LibreOffice Team 2020-07-29 07:25:49 UTC
Created attachment 163719 [details]
Screenshot of the magenta shapes properties side by side in Word and Writer
Comment 2 NISZ LibreOffice Team 2020-07-29 07:26:12 UTC
Created attachment 163720 [details]
Screenshot of the white shapes properties side by side in Word and Writer
Comment 3 Xisco Faulí 2020-07-30 11:07:04 UTC
Reproduced in

Version: 7.1.0.0.alpha0+
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
Calc: threaded
Comment 4 Regina Henschel 2021-07-11 20:42:56 UTC
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.
Comment 5 Gabor Kelemen (allotropia) 2023-03-09 21:57:30 UTC
*** Bug 150255 has been marked as a duplicate of this bug. ***
Comment 6 QA Administrators 2025-03-09 03:10:58 UTC
Dear NISZ LibreOffice Team,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug