Files
odfstudio/svtools
Michael Weghorn 6a299f8297 svtools: Port SvtLineListBox from ValueSet to weld::TreeView
Use a weld::TreeView inset of the custom ValueSet widget
for the SvtLineListBox that can be used to select a line
style.

Show the name of the line style in a column next to the
icon, which makes this more consistent with the popup used
to set a line style for Calc cells in the "Properties"
sidebar deck, section "Cell Appearance".

Using weld::TreeView also helps to be more consistent with
other platform/toolkit widgets and reduces use of custom
widget logic (implemented in the ValueSet class).

Some notes:

* ValueSet uses a 1-based ID for its items. weld::TreeView
  uses a 0-based index, so adjust places using those
  accordingly.

* Use the weld::TreeView handler for item activation
  (set with weld::TreeView::connect_item_activated) instead
  of the ValueSet selection handler (set with
  ValueSet::SetSelectHdl) and activate single-click activation
  (using the GtkTreeView::activate-on-single-click property
  in the UI file) so that a single click on an item still activates
  it but keyboard navigation using the arrow keys doesn't.

SvtLineListBox gets used e.g. in the control to pick the line style
in Writer's "Format" -> "Page Style" dialog, tab "Borders".

Adjust a UI test accordingly (use TreeView widget, use
new 0-based indices and press the Return key after selection,
to activate selected entry).

Change-Id: I54fb1d2a49774c6c64eda0ad5de7af36c3603cee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205821
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-01 08:53:16 +02:00
..
…
…
…

Tools on the Top of VCL

Common dialogs, file and print dialogs, wizards, vcl filters, lots of helper code.