The SvtViewOptions class is used to store the state
of windows/dialogs.
So far, SvtViewOptions::SetWindowState and
SvtViewOptions::GetWindowState are string-based
and the callers are responsible for (de)serializing
the vcl::WindowData to/from string.
This will be changed to become the responsibility
of SvtViewOptions in an upcoming commit.
Since unotools is below vcl in the module
dependency chain, it cannot make use of vcl,
i.e. vcl::WindowData couldn't be used there.
Therefore, move SvtViewOptions from unotools
to svtools, which is above vcl in the module
dependencies.
(svtools/README.md summarizes the purpose of the
module as "Tools on the Top of VCL", which seems
an appropriate place for helper code to manage
the state/options for dialogs, tab pages,...)
Change-Id: If849224c35c7ac895659ddb7c17e6d17061d61a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208124
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Switch the weld::Entry and weld::TextView handlers
that are called when the text changes due to user
interaction to pass a weld::TextWidget& param
instead of a weld::Entry& and weld::TextView&
one respectively.
Adjust related methods across the code base accordingly.
This unifies the behavior for both of these
weld::TextWidget subclasses and prepares for
deduplicating the logic and moving it to the
common base class in an upcoming commit.
That will also ensure they stay in sync.
(Change also motivated by the fact that their behavior was
differing before
Change-Id: I03d2a13cd84d53d806eb9e363f49c4b6be28d938
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Thu Jul 9 13:08:58 2026 +0200
tdf#130857 weld: Don't signal about programmatic TextView text change
.)
Change-Id: I5572fc88caf577fae9a23a39f1ec4f2179935a99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207936
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Rename weld::TreeView::connect_column_clicked
and weld::TreeView::signal_column_clicked to make
clear that they are not about a click anywhere in a
column, but about the column *header* being clicked.
The GTK 4 doc for the corresponding
GtkTreeViewColumn::clicked signal [1] by which the API
was apparently inspired is clear about this:
> Emitted when the column’s header has been clicked.
[1] https://docs.gtk.org/gtk4/signal.TreeViewColumn.clicked.html
Change-Id: I0b4b337b5ca938bb1526d9857ed2b0b244daf23c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207591
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
In the past, weld.hxx used to contain the class
definitions for weld::Widget and all subclasses.
By now, weld::Widget and almost all subclasses have
been moved to separate headers, to make it easier
to keep the overview and to avoid having to
recompile ~all UI code when one class changes.
By now, only weld::Button is left in weld.hxx.
Rename the header to Button.hxx.
Drop weld.hxx includes and instead add Button.hxx
includes (or weld::Button forward declarations) where
weld::Button is used.
(Don't simply replace all weld.hxx includes with
Button.hxx ones, since many of them were for the
use of other widgets that have since been moved
to their own headers.)
Add further includes where needed now that the
(direct or transitive) includes of weld.hxx were removed.
Change-Id: I8ea6201446a418d5e38b46337059dcd517ee29d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205937
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
In the past, weld.hxx used to contain the class
definitions for weld::Widget and all subclasses,
as well as a few helpers.
By now, weld::Widget and almost all subclasses have
been moved to separate headers, to make it easier
to keep the overview and to avoid having to
recompile ~all UI code when anything in weld.hxx
changes.
Move the weld::toId and weld::fromId helpers from
weld.hxx to weldutils.hxx, in preparation of getting
rid of weld.hxx altogether in an upcomcing commit.
Change-Id: I408fe20a74ff104cbfe07bde3105317a1922ff61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205936
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.
Add missing includes/forward declarations in places
previously depending on transitive includes that
are now dropped.
Change-Id: I3215b358e0fa45ffce08756218c386e1a4d7ebc6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205928
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: I52a953858a997f8549d12fa3d6ed23cc1fb236c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205904
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: I91bae842e5b18a83db45de12150c21f75e537fb9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205900
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.
Adjust includes in files that were implicitly depending
on transitive includes that are no longer present because
the more specific include/weld/Container.hxx is included
further down now instead of include/weld/weld.hxx.
Change-Id: I04e6bb72ce446b746dfdf88b45c7df9d0ccda473
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205899
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: Ide86f35543468a88288a068cc9f89eaf381ac52f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205763
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: I6d9323c56bca95734a1b60daa60085547f212a66
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205485
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: I2eb564b2483b052f01d4af55fd4feb00b5ed6031
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205472
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: If7cb4403f1861c465f44a1cae4065b0bf8dfad48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205323
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
In addition to the weld::TreeIter and the new text,
also pass the column index of the cell that was edited
in the callback that gets called when a cell was edited.
This will allow callbacks to take that into account as
well when deciding whether to accept or reject the
editor operation.
One case that will make use of this in an upcoming
commit is Math's MatrixCreatorDialog, which currently
implements its own logic based on mouse clicks to
(try to) identify the column that is edited.
That is relatively complicated and won't work in the
case of keyboard-only interaction.
For the vcl implementation, this makes use of the
SvLBoxItem available in the callback since
Change-Id: Iad2866d8fcc710d82f4f0dc0661a3b1f0bebaeab
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Fri Apr 24 13:17:15 2026 +0200
vcl: Also pass the item in treeview callback when entry edited
to retrieve the column index of the modified
item/cell.
For GTK, GtkInstanceTreeView::signal_cell_toggled
already contains similar logic.
For Qt, the column index is available via the
QModelIndex.
Change-Id: I36fa296d72ef2ff853da03037151cc060634d2a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204305
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Use the existing typedef instead of having multiple
versions that are all the same.
Change-Id: I7bc99a641ce5e7aa8237968b8b88fa4835917cd8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204288
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Switch the param for the signal and handlers used when
the selection in a weld::IconView changes from weld::IconView&
to the base class, weld::ItemView&.
This is in preparation of moving the logic to the weld::ItemView
base class in an upcoming commit.
This is the IconView equivalent of previous commit
Change-Id: I0bbf8fe1dbd95906a5224155d48d832bcd144532
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Thu Apr 9 13:45:18 2026 +0200
weld: Switch TreeView selection changed signal param to ItemView
Change-Id: I87fad3a129128d4387adfdd75d18e93f05af5e84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203367
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
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>
So far, the IconView::signal_item_activated was called
with the weld::IconView itself as a parameter, i.e.
the information what item was selected wasn't directly
passed to the signal handlers.
Change that to pass a weld::TreeIter param referring to the
activated item instead of the IconView itself.
The information what item was activated is relevant
and this way, there is no need to determine it some
other way in the handlers (e.g. by using the first
selected entry).
This also aligns this more with what UI toolkits
like GTK and Qt provide.
For GTK, the GtkIconView::item-activated signal [1]
has the path of the activated entry.
For Qt, the QAbstractItemView::activated signal [2]
has the QModelIndex of the activated item.
For the vcl implementation in SalInstanceIconView::DoubleClickHdl,
use the cursor/current item.
In LOKTrigger::trigger_item_activated, use the currently selected
entry (retrieved via weld::IconView::get_selected), because the
only caller in jsdialog::ExecuteAction uses weld::IconView::select
first to select an entry before triggering the signal.
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.
[1] https://docs.gtk.org/gtk3/signal.IconView.item-activated.html
[2] https://doc.qt.io/qt-6/qabstractitemview.html#activated
Change-Id: I8ca62ac32108f01e2055d5ef9301de22eb5b1931
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203317
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: 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: I47ea75ca8aedc7409a262fc72afcfbc0accef4ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199050
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
This UI file is used by the "Create New Folder"
dialog that can be triggered like this:
* in "Tools" -> "Options" -> "LibreOfficeDev"
-> "General", enable "Use LibreOfficeDev open/save dialogs".
* "File" -> "Save As"
* press the "Create New Folder" button at the top right
of the dialog
Change-Id: I3047ed1a146c4957182fd27d8e2921addde48594
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198873
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Resave with latest glade version, but manually revert some
changes to properties that might have side effects.
This is the UI file for the custom LO file dialog
that can be enabled in "Tools" -> "Options" -> "LibreOfficeDev"
-> "General" -> "Use LibreOfficeDev open/save dialogs".
Change-Id: I67cfce31b7706b7a58bc8deec2790aa8ae894623
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198871
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: I86edb8abe2178862269f2fc2a1629fb682a6a752
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198790
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Its only difference from its base is getResult, which also tries
to use IFileOpenDialog::GetSelectedItems/GetResults, which is OK
for folder picker.
Change-Id: I6acbcb64a2de4025dcac8022b26355d6444f5082
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198044
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
1. Avoid explicitly specifying COM_QUERY in calls to QueryInterface
(it is implied from the name).
2. Drop redundant ctor and set() that duplicate QueryInterface.
3. Allow ThrowIfFailed without a message.
Change-Id: I75b545e534efb7e57da131dfd40a2a49d204efac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198033
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Found after running bin/find-unneeded-includes --headersfwd include/vcl/[d-g]*
This shaves off about 150M input
Change-Id: I2b15257451d4b392dca3e5d07f4a443ee653b04c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196395
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
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: Ie54aef229609f131d3d53874c9390339566880f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196947
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: 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: 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::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>
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: Ifbd413fc8dcfe5e453a0fef8a04f3c396af4c836
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195781
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: I933b5ec749036bc02c7de7bc3528e6cd4a6e0fb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195779
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This is in preparation of moving code out of weld.hxx
to separate headers/source files, in order to make it
easier to keep an overview and to avoid having to
recompile ~all UI code when anything changes.
Also move weldutils.cxx to a new vcl/source/weld
directory.
Change-Id: Ia75b42f21e560dd248307282a522f186a64cd742
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195777
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>