Instead of using a custom ValueSet subclass to
draw images and text next to them for selection
in the line width popup, use a weld::TreeView with
two columns: one for the image, and one for the text.
This is similar to what
commit b185d34642
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Fri Nov 28 14:12:04 2025 +0100
tdf#168120 sc: Switch to weld::TreeView in CellLineStyleControl
did elswhere.
Adjust indices used to account for the fact that
weld::TreeView indices are 0-based while the ValueSet ones
are 1-based.
The special "Last custom value" entry so far was
using two separate images, depending on whether
or not it was enabled/sensitive or not: If it is
disabled, a greyed out variant of the image was used.
With the switch to weld::TreeView, leave that up
to the TreeView by simply enabling/disabling the
corresponding row using weld::TreeView::set_sensitive
for the corresponding row.
Drop the now unused LineWidthValueSet.
This switch to weld::TreeView reduces custom widget
logic and custom drawing and makes this more consistent
with other widgets used elsewhere (e.g. like for the
one mentioned in the commit above, the usual font
is used now as well, and it also aligns the behavior
more with that one.)
The popup for configuring the line thickness that uses
this code can be triggered like this:
* start Writer
* insert a chart using "Insert" -> "Chart..."
* select the chart wall in the chart
* open the "Properties" sidebar deck
* in the "Line" section of that sidebar deck, click on the
"Thickness" button/combobox
Change-Id: I423e80bba9e81a98e80652f6486970d40286362e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211735
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>