Bug 128648 - FILESAVE DOCX Linear gradient direction mirrored on saving
Summary: FILESAVE DOCX Linear gradient direction mirrored on saving
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
: 114211 (view as bug list)
Depends on:
Blocks: OOXML-Object-Fill OOXML-Shapes
  Show dependency treegraph
 
Reported: 2019-11-07 12:13 UTC by NISZ LibreOffice Team
Modified: 2023-06-09 15:01 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word (28.54 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-11-07 12:13 UTC, NISZ LibreOffice Team
Details
The original file saved by Writer (17.68 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-11-07 12:13 UTC, NISZ LibreOffice Team
Details
Screenshot of the original document side by side in Word and Writer (125.39 KB, image/png)
2019-11-07 12:14 UTC, NISZ LibreOffice Team
Details
Screenshot of the original and exported document side by side in Word (125.66 KB, image/png)
2019-11-07 12:15 UTC, NISZ LibreOffice Team
Details
fixed unit test document with different length uniformly coloured segments (9.83 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-04-01 13:27 UTC, László Németh
Details
problem with the work-in-progress patch (12.20 KB, image/png)
2020-04-01 13:27 UTC, László Németh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2019-11-07 12:13:04 UTC
Description:
Word has 8 default direction presets for linear gradient direction: 0, 45, 90, 135, 180, 225, 270 and 315 degrees. These are interpreted in clockwise direction from 0 to 360.
LO engine uses the rotation values in counterclockwise direction and imports these values from DOCX with corrections to get the same look as in Word: 
0 -> 270 ; 45 -> 225 ; 90 -> 180 ; 135 -> 135 ; 180 -> 270 ; 225 -> 45; 270 -> 0; 315 -> 315. 

Export to DOCX however is flawed, as the modified values are saved without undoing the corrections, so the gradients appear mirrored in Word.

Steps to Reproduce:
1.	Open attached example document in Writer
2.	Observe that the gradients look the same as in Word
3.	Save the file and reopen in Word


Actual Results:
The gradient directions are mirrored.

Expected Results:
The gradient directions should be the same as in the original file.


Reproducible: Always


User Profile Reset: No



Additional Info:
LibreOffice details:
Version: 6.4.0.0.alpha1+ (x86)
Build ID: f0340d58cc0f2808ce8003099ff2a0495360f267
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win; 
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: CL
Comment 1 NISZ LibreOffice Team 2019-11-07 12:13:31 UTC
Created attachment 155603 [details]
Example file from Word
Comment 2 NISZ LibreOffice Team 2019-11-07 12:13:52 UTC
Created attachment 155604 [details]
The original file saved by Writer
Comment 3 NISZ LibreOffice Team 2019-11-07 12:14:19 UTC
Created attachment 155605 [details]
Screenshot of the original document side by side in Word and Writer
Comment 4 NISZ LibreOffice Team 2019-11-07 12:15:03 UTC
Created attachment 155606 [details]
Screenshot of the original and exported document side by side in Word
Comment 5 Xisco Faulí 2019-11-07 12:48:25 UTC
Reproduced in

Version: 6.4.0.0.alpha1+
Build ID: b19c5d4286f66193173534980d18992682905e26
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded
Comment 6 Xisco Faulí 2019-11-07 12:50:14 UTC
Also reproduced in

Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e

in

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)

the gradient is not even exported to docx.
Comment 7 László Németh 2020-04-01 13:27:04 UTC
Created attachment 159232 [details]
fixed unit test document with different length uniformly coloured segments
Comment 8 László Németh 2020-04-01 13:27:49 UTC
Created attachment 159233 [details]
problem with the work-in-progress patch
Comment 9 NISZ LibreOffice Team 2020-09-03 11:45:56 UTC
Looks just like bug #114211 - but this one is better documented :).
Comment 10 Justin L 2021-01-27 06:03:06 UTC
*** Bug 114211 has been marked as a duplicate of this bug. ***
Comment 11 QA Administrators 2023-01-28 03:25:20 UTC Comment hidden (obsolete)
Comment 12 Gabor Kelemen (allotropia) 2023-04-18 14:10:49 UTC
Still happens in

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: fc6806c4be8585ce0d35a6b581bf8b3dbf858500
CPU threads: 14; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: threaded
Comment 13 Piotr 2023-06-06 18:27:23 UTC
I checked it and indeed there is a bug. My version I checked with:

Version: 7.6.0.0.alpha1+ (x86) / LibreOffice Community
Build ID: 1c98c88a1208f47327ac2f3beaf593521ce9b394
CPU threads: 12; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: pl-PL (pl_PL); UI: en-US
Calc: CL threaded
Comment 14 Regina Henschel 2023-06-06 22:08:46 UTC
I see correct directions in Version: 7.6.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 70fd835b4cf75e386ee115c705241a4059fb68a8
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

Likely fixed by some MCGR patches.
Comment 15 Buovjaga 2023-06-09 15:01:46 UTC
Let's close per the previous comment