Switch the param for the signal and handlers used when
the selection in a weld::TreeView changes from weld::TreeView&
to the base class, weld::ItemView&.
This is in preparation of moving the logic to the weld::ItemView
base class in an upcoming commit.
Handler implementations that require a weld::TreeView
instance can use the one that the signal is connected
to, e.g. use the class member directly inside of the
implementation instead of using the param (as is done
in most of the places anyway).
Change-Id: I0bbf8fe1dbd95906a5224155d48d832bcd144532
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203366
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Rename methods and field related to signalling activation
of a weld::TreeView row to use the same names as the equivalent
ones for signalling activation of an entry in weld::IconView:
* weld::TreeView::m_aRowActivatedHdl -> weld::TreeView::m_aItemActivatedHdl
* weld::TreeView::signal_row_activated -> weld::TreeView::signal_item_activated
* weld::TreeView::connect_row_activated -> weld::TreeView::connect_item_activated
This is in preparation of deduplicating the weld::TreeView
and weld::IconView implementations for these by moving them
to the common weld::ItemView base class in an upcoming commit.
Change-Id: I4ca4dec1295c57cea574b68fd41b89c12144c4f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203350
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This is basically the weld::TreeView version of earlier
commit
Change-Id: I8ca62ac32108f01e2055d5ef9301de22eb5b1931
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Wed Apr 8 12:35:25 2026 +0200
weld: Pass activated item in IconView::signal_item_activated
applying an equivalent change for weld::IconView instead
of weld::TreeView. See that commit for more details/background.
For weld::TreeView, the weld::TreeIter refers to
a full row (and columns are handled separately
by a column index in the weld::TreeView API).
As for the above commit:
Initially, leave the logic of the existing signal handlers/callbackes
(in dialog implementations) unchanged. At least some of them
will be simplified in upcoming commits to use the
newly passed weld::TreeIter param directly instead of
determining the current/activated row a different
way.
Change-Id: Ie6a962702d4f7f069b2f7b77a22a78722b2a6408
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203331
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Use ObjectBrowser::m_xRightMembersView directly instead of
the weld::TreeView& param passed to the handler.
That is the weld::TreeView that the handler is connected to.
This also prepares for adjusting weld::TreeView::m_aRowActivatedHdl
to pass the weld::TreeIter of the activated entry instead of just
the TreeView itself.
Change-Id: I0f35df5b6af80910f2d6cce7e606ba82c7eeb8b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203292
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Use the correct term. E.g., Unicode charset has different encodings
like UTF-8 and UTF-16, and we mean encoding here.
Change-Id: I65e90b31cda6e39fdb1584b492e6e0b9821865a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200285
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
GtkAlignment was deprecated in GTK 3.14 [1].
Drop it. Instead, set the margins directly on the child
widget.
See also
commit 3a4b929aeb
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Tue Feb 17 12:45:56 2026 +0100
tdf#130857 sw: Drop deprecated GtkAlignment in indexentry.ui
for some more background.
(`git show --ignore-space-change` can be used to see the
"actual changes" more easily.)
[1] https://docs.gtk.org/gtk3/class.Alignment.html
Change-Id: I7aeb5230273287572e75268b97acb0a5c1baece2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199728
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
There is no expander for these two, it looks like the offending
GtkTreeView in each was copied from the earlier GtkTreeView in the file
and then the copy had expanders toggled off, but enable-tree-lines left
enabled.
Change-Id: I46abf39b3a3c7f93122f6f2a7c4adf3f05434eb0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199559
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Move the class out of weld.hxx into its own header and source
file, in order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.
Change-Id: Ic47dac553fc065c5c9cddbf31e33012314dbe43d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199073
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.
Change-Id: I5b23b02151c75bb49831a2bbf8d515eb0b54415e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199068
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.
Change-Id: I86edb8abe2178862269f2fc2a1629fb682a6a752
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198790
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.
Change-Id: Ia2dd3c9168a179ec7e44efeec309b591f6c85a03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198619
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.
Change-Id: I56cea12845bc906a8b7aff13abe033e9723b85c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198614
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
this was skipped in previous runs, since it contains some code behind #if
After inspecting these, it seems like the removals should not cause trouble.
Change-Id: If1e3e3c7c0fc14ed6e8b51174a0e7f1220fdbc8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197496
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
these were skipped in previous runs, since they contain some code behind #if
After inspecting these, it seems like the removals should not cause trouble.
This also shaves off some 140M input
Change-Id: Ie1f57174dd6fec3ba5b0b91eb0688acdc1a8143d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197494
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
See this previous commit for more background:
Change-Id: I9386e100f83b9bdb832b50f1056305b81c23e351
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Tue Jan 20 19:52:12 2026 +0100
tdf#130857 Simplify various weld::TreeIter equality checks
Change-Id: I483dc42cd8c3f9c92b1719f1ba247cfc367b16e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197691
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
All of these places check whether ther result of
weld::TreeView::iter_compare is 0, i.e. whether the iters
are equal.
Simplify this by using weld::TreeIter::equal instead.
For the case where iters are not equal, this is also
more efficient (because there is no need to find out
which of the entries pointed to by the iterators comes
earlier), at least with the default implementation
introduced in previous commit
Change-Id: Id098f85608f4f747c8f0bd4dd2eef01f0aba358d
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Tue Jan 20 19:04:59 2026 +0100
tdf#130857: weld:: Add default TreeView::iter_compare impl
Change-Id: I9386e100f83b9bdb832b50f1056305b81c23e351
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197687
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Found after running bin/find-unneeded-includes --headersfwd include/vcl/[q-w]*
This shaves off about 100M input
Change-Id: Ib4d0af44b383d34d856a9797fe70a974b359402f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196398
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
The dialog using this .ui file can be triggered like this:
* start Writer
* "Tools" -> "Macros" -> "Organize Macros" -> "Basic"
* press the "Organizer..." button
* switch to the "Libraries" tab
* press "New" button, type any name and confirm with "OK"
* with the newly created library selected, press the
"Export" button
Change-Id: Ib1e39038674253552dbdd09b7d364b6b2e495add
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197278
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
The dialog using this .ui file can be triggered as
follows in Writer:
* "Tools" -> "Macros" -> "Organize Macros" -> "Basic"
* press the "Organizer..." button
Change-Id: I353edfa7e8276a13afa8a3cc676970adcdd8bf5c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197275
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Don't use the GtkFrame's internal label child
to get/set the frame's label, but use the weld::Frame
methods directly.
This also prepares for supporting the use of native
widgets with that dialog, where QtInstanceFrame
doesn't have a separate widget for the label, but
its QGroupBox handles the label itself.
Change-Id: I4659d35112d055f31190a19a52b62215c18a6adb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197274
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Drop the unpublished service
"com.sun.star.drawing.AccessibleShape"
because it's unused. (The IDL file only documents some
internal implementation details of the a11y classes
implementing the service.)
A search in Google and on Ask [1] didn't give
any results that would suggest this unpublished service
could be relevant for third party code.
(Instances of the service couldn't be created by external
code anyway.)
[1] https://ask.libreoffice.org/
Change-Id: Ib9cc4143bb5e5f32a149bda63d6ac6b72c1a099f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197116
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Found after running bin/find-unneeded-includes --headersfwd include/vcl/[A-Z]*
This shaves off about 100M input, not bad for such a small amount
of files checked
This time --headersfwd skips files that contain #if defs,
in hope of not breaking builds that are not checked by CI
(...except for include/vcl/BitmapTools.hxx - this was cleaned accidentally,
due to a bug in the bin/find-unneeded-includes script that is fixed
by the previous commit 930ff2b830
- but let's keep this anyway, it seems fine)
Change-Id: Ia8e49d94f6adb3cdbedbc40ffa56dbf846c9b6e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196235
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
Move the class out of weld.hxx into its own header and source
file, in order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.
Change-Id: I27033905fe8be1c3646c8cf08799c9bf53eeb471
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196448
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Move the class out of weld.hxx into its own header and source
file, in order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.
Change-Id: I6555d2343ec9b01d7915cd52508c0db4c8704509
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196445
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Move the class out of weld.hxx into its own header and source
file, in order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.
Change-Id: I05a3ae87147fedfa39f4acd8c3f744fd88a83e5e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196442
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Move the class out of weld.hxx into its own header and source
file, in order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.
Change-Id: Ib2fe4a6b5e34ad8ae2194ba85249ca25ed16e9d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196435
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
This is similar to
commit 82edaf048b
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Sun Dec 21 01:36:30 2025 +0100
weld: Return std::unique_ptr in weld::ItemView::get_selected
, but now for weld::TreeView::get_dest_row_at_pos.
See the above-mentioned commit for more background.
Change-Id: I53834d637e558e9ee3be341f653dbaed73082ebe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196405
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Instead of having an out param and a bool return value,
return a std::unique_ptr and create the weld::TreeIter
inside of the method implementation instead of having
to do so in the caller.
This is similar to
commit 82edaf048b
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Sun Dec 21 01:36:30 2025 +0100
weld: Return std::unique_ptr in weld::ItemView::get_selected
that simplified weld::ItemView API.
Change-Id: I7ede7f51f76b35fdeec45c3373a19a3808429b38
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196391
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
By now, this class member is only used in one method.
Use a local variable instead.
Change-Id: Ic2f096aaef9c34d7f697b6ca0a204780db69a28d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196390
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This is similar to
commit 82edaf048b
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Sun Dec 21 01:36:30 2025 +0100
weld: Return std::unique_ptr in weld::ItemView::get_selected
, but now for weld::ItemView::get_cursor.
See the above-mentioned commit for more background.
Change-Id: I6a8d8daa3dd3326c2716c0c0b4e4cb424f73ecb8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196389
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
So far, the method had a weld:::TreeView* out param
and a bool return value, which indicated whether
or not a selected item actually exists (and was
set in the passed TreeIter).
Drop the method param and instead return a
std::unique_ptr<weld::TreeIter>. If it doesn't
own a pointer, there is no selection (i.e. the
case previously indicated by a `false` return
value). If it owns a weld::TreeIter, then
that one points to the (first) selected item.
This simplifies using this as it is no longer
necessary to separately create weld::TreeIter to
pass as an out param first, e.g.
std::unique_ptr<weld::TreeIter> pEntry = rMyIconView.make_iterator());
if (rMyIconView.get_selected(xEntry.get()))
{
// do sth
}
now turns into
if (std::unique_ptr<weld::TreeIter> xEntry = rMyIconView->get_selected())
{
// do sth
}
Adjust all callers accordingly.
It might be worth looking into doing something
similar for other methods (e.g.
weld::ItemView::get_iter_first) as well.
Change-Id: I83146fc8d68a92d50eed9bd635bf91b1450ce495
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196039
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This call sets m_xBasicBoxIter to the currently selected
entry, but it's not used here after that, and m_xBasicBoxIter
is reassigned a different value first before it's used elsewhere.
Therefore, drop this unnecessary call altogether.
Change-Id: I301b259a3edfce4af7deccdc8db9c4728d502801
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196055
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>