Bug 126363 - FILESAVE DOCX Rounding error when saving line shape width
Summary: FILESAVE DOCX Rounding error when saving line shape width
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Balázs Regényi
URL:
Whiteboard: target:7.0.0
Keywords:
Depends on:
Blocks: OOXML-Shapes
  Show dependency treegraph
 
Reported: 2019-07-12 10:48 UTC by NISZ LibreOffice Team
Modified: 2021-03-05 10:21 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word (27.16 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-07-12 10:49 UTC, NISZ LibreOffice Team
Details
The original file saved by Writer (14.77 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-07-12 10:50 UTC, NISZ LibreOffice Team
Details
Screenshot of the original document side by side in Word (68.53 KB, image/png)
2019-07-12 10:50 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 2019-07-12 10:48:47 UTC
Description:
In Word it is possible to set preset widths for line objects: 0.25, 0.5, 0.75, 1.0 etc.  points.
After a roundtrip in Writer these are off by 0.01 points, which causes Word to not recognize them as the preset values.


Steps to Reproduce:
1.	Insert a shape in Word
2.	Go to Drawing tools -> Shape styles -> Outline and set some predefined width
3.	Save the file, open in Writer, resave.
4.	In the Word shape properties side bar under Shape Format -> Line -> Width you can see the value is off by 0.01 points: 1/4 -> 0.26, 1/2 -> 0.5, 3/4 -> 0.74,  1 -> 0.99, 1.5 -> 1.5, 2.25 -> 2.24, 3 -> 3.01, 4.5 -> 4.51, 6 -> 6.01


Actual Results:
Most values are off 0.01 points

Expected Results:
No rounding errors.


Reproducible: Always


User Profile Reset: No



Additional Info:
LibreOffice details:
Version: 6.4.0.0.alpha0+ (x86)
Build ID: 49422a469646ad8be43ba828ca24c2484c26b9e8
CPU threads: 4; OS: Windows 6.3; UI render: GL; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-07-08_00:50:19
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: CL
Comment 1 NISZ LibreOffice Team 2019-07-12 10:49:45 UTC
Created attachment 152740 [details]
Example file from Word
Comment 2 NISZ LibreOffice Team 2019-07-12 10:50:04 UTC
Created attachment 152741 [details]
The original file saved by Writer
Comment 3 NISZ LibreOffice Team 2019-07-12 10:50:22 UTC
Created attachment 152742 [details]
Screenshot of the original document side by side in Word
Comment 4 Dieter 2019-07-15 18:33:49 UTC
I confirm it with

Version: 6.4.0.0.alpha0+ (x64)
Build ID: 2f2f4767089512c34514896bc37823f9310e9dd4
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-07-10_02:13:57
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded
Comment 5 Commit Notification 2020-05-20 15:02:18 UTC
Regényi Balázs committed a patch related to this issue.
It has been pushed to "master":

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

tdf#126363 DOCX shape round-trip: keep original line width

It will be available in 7.0.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 6 Dieter 2021-03-05 10:21:54 UTC
Verified with

Version: 7.1.1.2 (x64) / LibreOffice Community
Build ID: fe0b08f4af1bacafe4c7ecc87ce55bb426164676
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

Regényi, thanks for fixing it.