Bug 157801 - Direct formatting is applied opening Character properties dialog (Highlighting tab) and pressing OK
Summary: Direct formatting is applied opening Character properties dialog (Highlightin...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:24.2.0
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-17 06:32 UTC by Mike Kaganski
Modified: 2024-04-22 07:14 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2023-10-17 06:32:23 UTC
Open attachment 179731 [details]. Put cursor into yellow area. Open Style Manager, to see that there is some paragraph-level direct formatting (Char Back Color, Char Back Transparent, and Char Shading Value), and no character-level direct formatting.

Now open Character Properties dialog (Format->Character), open Highlighting tab, and immediately press OK - without changing anything.

In versions up to 7.6, it unexpectedly adds a character-level Char Highlight direct formatting. In current master (after commit 614dfb98cd4705b63bf1e525d3d34df9ce950ebb), it also adds Char Back Color, Char Back Transparent, and Char Shading Value as character-level direct formatting.

The expected result of opening the properties dialog, and immediately pressing OK without changing anything (or alternatively, after changing something there and then pressing Reset then OK), is no changes in applied properties at all.

While the change (more direct formatting) after commit 614dfb98cd4705b63bf1e525d3d34df9ce950ebb might be a different issue, the original application of Char Highlight direct formatting is an own bug, possibly related to specifics of implementation of the Area dialog. It has an own logic of storing, applying and resetting of properties (it uses own item sets in m_pResetSet and maSet, with some hacks like "hack to restore color tab page Active preview" in TblDestinationHdl_Impl).

Jim: could you please take a look? Thanks!
Comment 1 Mike Kaganski 2023-10-17 06:41:40 UTC
(In reply to Mike Kaganski from comment #0)
> Put cursor into yellow area. Open Style Manager, to see that there is some
> paragraph-level direct formatting (Char Back Color, Char Back Transparent,
> and Char Shading Value), and no character-level direct formatting.

Sorry, a thinko: instead of "Open Style Manager", it should be "Open Style Inspector".
Comment 2 m_a_riosv 2023-10-17 21:17:26 UTC
Reproducible with:
Version: 7.6.1.2 (X86_64) / LibreOffice Community
Build ID: f5defcebd022c5bc36bbb79be232cb6926d8f674
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded
and
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e9374f74385d7dfe77d1902d3d82af20143bc775
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded
Comment 3 BogdanB 2023-10-18 18:22:43 UTC Comment hidden (obsolete)
Comment 4 Commit Notification 2023-11-03 02:19:18 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/167fb166e4097c4a855c08a70cdf70c19d4d87ac

tdf#157801 Fix direct formatting is applied after pressing OK in the

It will be available in 24.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 5 Jim Raykowski 2023-11-03 02:27:44 UTC
@Mike, thanks for bringing this to my attention and for the review comments. I'm better prepared now for any future problems that should arise with the Background page.