Bug 121216 - EDITOR UI Pattern background color not read back from editor
Summary: EDITOR UI Pattern background color not read back from editor
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.2.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2018-11-06 17:58 UTC by Gabor Kelemen (allotropia)
Modified: 2018-12-18 16:24 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Example ODT file with a shape using pattern, foreground and background color (11.76 KB, application/vnd.oasis.opendocument.text)
2018-11-06 17:58 UTC, Gabor Kelemen (allotropia)
Details
Same example file in DOCX (5.00 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-11-06 17:58 UTC, Gabor Kelemen (allotropia)
Details
Setting "Wide Upward Diagonal" pattern, foreground and background color (22.17 KB, image/png)
2018-11-06 18:00 UTC, Gabor Kelemen (allotropia)
Details
Reopening the Pattern tab, everything is back to default values (29.96 KB, image/png)
2018-11-06 18:00 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2018-11-06 17:58:11 UTC
Created attachment 146370 [details]
Example ODT file with a shape using pattern, foreground and background color

When setting a pattern fill for drawing objects the color settings are not being read back from the editor to the dialog, neither is the pattern itself.

Steps to reproduce:
1, Insert - Shape - Choose something
2, Format - Text box and shape - Area
3, Select a non-default pattern, and select some Foreground and Background color
4, Reopen the Area dialog. 

The Pattern Editor shows the first pattern of the list, not the one that is set
The Foreground and Background Colors are set back to Black and White respectively.
On closing the window the previously set pattern and colors disappear.

Note that this does not affect saving to file; saving to both ODF and OOXML works, only the editor and the dialog does not cooperate.

Version: 6.2.0.0.alpha1+
Build ID: 2cef68a605494bcef0388201b1058c95788c45a8
CPU threads: 4; OS: Windows 6.3; UI render: GL; VCL: win; 
Locale: hu-HU (hu_HU); Calc: CL

This version from bibisect-win32-6.2 is after the fix of bug #121083 - something similar might be going on here too.
Comment 1 Gabor Kelemen (allotropia) 2018-11-06 17:58:35 UTC
Created attachment 146371 [details]
Same example file in DOCX
Comment 2 Gabor Kelemen (allotropia) 2018-11-06 18:00:17 UTC
Created attachment 146372 [details]
Setting "Wide Upward Diagonal" pattern, foreground and background color
Comment 3 Gabor Kelemen (allotropia) 2018-11-06 18:00:58 UTC
Created attachment 146373 [details]
Reopening the Pattern tab, everything is back to default values
Comment 4 Timur 2018-11-07 16:47:38 UTC
Repro 6.2+. libo-master~2018-10-30_22.44.48_LibreOfficeDev_6.2.0.0.alpha1_Win_x86
Comment 5 Aron Budea 2018-11-14 00:10:24 UTC
Bibisected to the commit referenced below using repo bibisect-win32-6.2. Adding Cc: to Jim Raykowski, please take a look.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=4f6e104499625d69d2b37271d0fee52848c0a6d4
author		Jim Raykowski <raykowj@gmail.com>	2018-08-09 20:07:35 -0800
committer	Tamás Zolnai <tamas.zolnai@collabora.com>	2018-10-09 11:30:34 +0200

tdf#111718 Fix interaction between bitmap and pattern settings
Comment 6 Jim Raykowski 2018-11-15 21:31:02 UTC
Hi All,

Can anyone confirm that correct pattern selection happens on reopen if Foreground Color and Background Color are not changed from default Black and White?
Comment 7 Aron Budea 2018-11-15 21:56:05 UTC
(In reply to Jim Raykowski from comment #6)
> Can anyone confirm that correct pattern selection happens on reopen if
> Foreground Color and Background Color are not changed from default Black and
> White?
Hi Jim, thanks for look at the bug! Yes, I can confirm that. Also, as soon as you select a color, the pattern selection is removed, it doesn't change the pattern, but there's a rectangle around the selected pattern, which disappears.
Comment 8 Jim Raykowski 2018-11-16 00:02:30 UTC
Here is a patch for this:
https://gerrit.libreoffice.org/#/c/63456/

Would greatly appreciate testing for correctness.
Comment 9 Commit Notification 2018-11-16 06:45:34 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/b4aa41f305c9f02a245dcab8b046af430a4dd6c9%5E%21

tdf#121216 Fix custom pattern not displayed in area tab page

It will be available in 6.2.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 10 Xisco Faulí 2018-12-18 15:35:18 UTC
A polite ping to Jim Raykowski:
Is this bug fixed? if so, could you please close it as RESOLVED FIXED ? Otherwise, Could you please explain what's missing?
Thanks
Comment 11 Gabor Kelemen (allotropia) 2018-12-18 15:54:17 UTC
Tested with recent bibisect-win32-6.3 the example file works fine. Many thanks!

Version: 6.3.0.0.alpha0+
Build ID: 2b6bd096f5bd9d250e4590d7150190086ad282b2
CPU threads: 4; OS: Windows 6.3; UI render: GL; VCL: win; 
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: threaded