Bug 135235 - FILEOPEN DOCX Shape sizes relative to page is imported with rounding errors
Summary: FILEOPEN DOCX Shape sizes relative to page is imported with rounding errors
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: bibisectRequest, filter:docx
Depends on:
Blocks: OOXML-Shapes
  Show dependency treegraph
 
Reported: 2020-07-28 13:59 UTC by NISZ LibreOffice Team
Modified: 2022-11-29 20:50 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word (21.27 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-07-28 13:59 UTC, NISZ LibreOffice Team
Details
Screenshot of the shape 34 side by side in Word and Writer (212.82 KB, image/png)
2020-07-28 13:59 UTC, NISZ LibreOffice Team
Details
Screenshot of the shape 35 side by side in Word and Writer (229.09 KB, image/png)
2020-07-28 13:59 UTC, NISZ LibreOffice Team
Details
Screenshot of the shape 36 side by side in Word and Writer (206.42 KB, image/png)
2020-07-28 14:00 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-28 13:59:13 UTC
Created attachment 163694 [details]
Example file from Word

Attached document is a slightly simplified version of the Word2010 Title page template “Austin”.
It consists of several shapes whose size is set as a percentage value relative to the page size. Word conveniently shows this on its UI as absolute value too.
When imported to Writer these sizes are converted to an absolute value, with a slight rounding error:
The shape “Téglalap 34” (background with brownish gradient): 
Width 19.95 cm -> 20.43 cm (+0.48 cm)
Height 28.22 cm -> 28.70 cm (+0.48 cm)
The shape “Téglalap 35” (Blue textbox):
Width 7.77 cm -> 7.96 cm (+0.19 cm)
Height 8.91 cm >  9.06 cm (+ 0.15cm)
The shape “Téglalap 36” (tall white behind the blue and white text boxes)
Width 8.4 cm -> 8.56 cm (+0.16 cm)
Height 20.79 cm -> 21.10 cm (+0.31 cm)

Steps to reproduce:
    1. Open attached document

Actual results:
Shape sizes are slightly larger than in Word.

Expected results:
Shape sizes should be the same 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

(I’m not sure about this buildversion string, this is a fresh nightly from yesterday or so)

Also 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)

Version: 4.4.0.3
Build ID: de093506bcdc5fafd9023ee680b8c60e3e0645d7
Locale: hu_HU

In:
Version: 4.3.0.4
Build ID: 62ad5818884a2fc2e5780dd45466868d41009ec0

The textbox-less shape 36 had correct size values, the shapes with textbox were  imported as frames (with correct sizes)
Comment 1 NISZ LibreOffice Team 2020-07-28 13:59:30 UTC
Created attachment 163695 [details]
Screenshot of the shape 34 side by side in Word and Writer
Comment 2 NISZ LibreOffice Team 2020-07-28 13:59:46 UTC
Created attachment 163696 [details]
Screenshot of the shape 35 side by side in Word and Writer
Comment 3 NISZ LibreOffice Team 2020-07-28 14:00:01 UTC
Created attachment 163697 [details]
Screenshot of the shape 36 side by side in Word and Writer
Comment 4 Dieter 2020-08-05 06:48:54 UTC
I confirm it with

Version: 7.0.0.0.beta2 (x64)
Build ID: 1c213561a365b5666167321de68c9977500c9612
CPU threads: 4; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

in comparison with Word 2016

There are a lot of similar bug reports from your team, so I hope you've checked for duplicates.
Comment 5 Dieter 2022-11-29 20:50:59 UTC
Little improvement in valueas, but still not good in

Version: 7.4.3.2 (x64) / LibreOffice Community
Build ID: 1048a8393ae2eeec98dff31b5c133c5f1d08b890
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

The shape “Téglalap 34” (background with brownish gradient): 
Width 19.95 cm -> 20.27 cm (+0.32 cm)
Height 28.22 cm -> 28.54 cm (+0.32 cm)

The shape “Téglalap 35” (Blue textbox):
Width 7.77 cm -> 7.9 cm (+0.13 cm)
Height 8.91 cm >  9.01 cm (+ 0.10 cm)

The shape “Téglalap 36” (tall white behind the blue and white text boxes)
Width 8.4 cm -> 8.49 cm (+0.09 cm)
Height 20.79 cm -> 20.98 cm (+0.18 cm)