9515 Commits
Author SHA1 Message Date
Heiko Tietze c8679f314a Introduce EntryMessageType::Info
Used as pure information for successful font replacement

Change-Id: I4cd92561b58eacce960430007987935a26a657bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211148
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
2026-09-19 08:58:21 +02:00
Michael Weghorn 6a023bacb9 Return std::unique_ptr in Application::CreateMessageDialog
The caller of Application::CreateMessageDialog owns the
returned message dialog.

So far, it was returned by a plain weld::MessageDialog*.

Return a unique_ptr instead, to make clear the ownership
semantics. (Also adjust SalInstance::CreateMessageDialog
accordingly, which is called by Application::CreateMessageDialog
and implements the actual logic to create a message dialog.)

Adjust callers where needed.
Most callers were already using a smart pointer for the
returned message dialog anyway.

Change-Id: I7c06bb24b611bd67f5af89800adb13bf22dcc6fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211013
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-16 10:35:19 +02:00
Andrea Gelmini 1406e27b4c Fix typos
Change-Id: Ife5bb699c12cc02575ab9313b2a70d85c75e61b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210577
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-10 20:37:30 +02:00
Michael Weghorn 607489c9cc vcl cups: Rename GetPPDAttribs::m_aParameter to make clear it's printer
Rename the member to GetPPDAttribs::m_sPrinterName to make
clear that this is the name of the printer/CUPS destination.

Also don't prefix the param passed to the ctor with "m_"
("m_pParameter"), as that one is not a class member.

Change-Id: Id89532b64061e7bb074c867ca769d4447dead106
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210431
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-02 21:01:44 +02:00
Andrea Gelmini 0974df2160 Fix typos
Change-Id: Icd5b8ad9f175c85ac1d8df644679fab945c0de0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210373
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-02 15:33:22 +02:00
Andrea Gelmini 833593f846 Fix typos
Change-Id: I57a06c530d525b9d5b5ea0ad08cf61ae6790b965

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209759
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 15:41:51 +02:00
Andrea Gelmini cf0a1268e3 Fix typos
Change-Id: Ib8964b0b98005da480826cfdd2c64bd68c88575c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209460
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-22 10:15:11 +02:00
Xisco Fauli 16bd87e0f4 tdf#168821: Revert "Set StyleSettings::DisableColor value in GTK"
This reverts commit d2bf91d959.

Change-Id: I9bf6b4cc182a44d57b9167beeaacc23ba92fe3af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208680
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-27 21:24:28 +02:00
Michael Weghorn 94df4ecce4 tdf#130857 weld: Block signals in ComboBox::set_entry_text
As is the case for other weld methods modifying the widget
state, signals about a change of the combobox entry text
are not supposed to be emitted when the change happens
programatically and not by manual user interaction.

Therefore, disable notify events in weld::ComboBox::set_entry_text
by renaming the actual toolkit-specific implementations to
do_set_entry_text and making the weld::ComboBox::set_entry_text
base class method block signals while calling
the virtual methods.

This aligns the behavior of the Qt implementation
with the other ones. For example, the GtkInstanceComboBox
implementation is already blocking the corresponding GTK
signals.

This fixes an issue seen with the qt6 VCL when
support for native Qt widgets is enabled
(SAL_VCL_QT_USE_WELDED_WIDGETS=1)
for the following scenario:

* start Calc
* insert "1" into all of the cells A1:A3
* select A1:A3
* "Data" -> "Pivot Table" -> "Insert or Edit..."
* in the "Select Source" dialog, press OK to confirm "Current Selection"
* in the "Pivot Table Layout" dialog, drag and drop "1" from
  "Available Fields" to "Column Fields"
* press OK
* "Data" -> "Pivot Table" -> "Calculated Field"

(Support for using native Qt widgets will be
enabled in an upcoming commit, now that this issue
is fixed.)

Without this change in place, the "Add" button
would be missing its label, due it being set
to an empty string like this when a dummy entry
is set in the combobox (see frame 50 in the below backtrace):

Backtrace:

    1 QtInstanceButton::set_label QtInstanceButton.cxx 32 0x7fffe4c7350c
    2 ScPivotCalcFieldDlg::CalcFieldNameSelected PivotCalcFieldDialog.cxx 583 0x7fff872b453a
    3 ScPivotCalcFieldDlg::LinkStubCalcFieldNameSelected PivotCalcFieldDialog.cxx 547 0x7fff872b026d
    4 Link<weld::ComboBox&, void>::Call link.hxx 105 0x7fffe4c87f81
    5 weld::ComboBox::signal_changed ComboBox.hxx 71 0x7fffe4c87b98
    6 QtInstanceComboBox::signalChanged QtInstanceComboBox.cxx 431 0x7fffe4c7c05d
    7 QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtInstanceComboBox:: *)()>::call(void (QtInstanceComboBox:: *)(), QtInstanceComboBox *, void * *)::{lambda()#1}::operator()() const qobjectdefs_impl.h 128 0x7fffe4c883a1
    8 QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtInstanceComboBox:: *)()>::call(void (QtInstanceComboBox:: *)(), QtInstanceComboBox *, void * *)::{lambda()#1}>(void * *, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtInstanceComboBox:: *)()>::call(void (QtInstanceComboBox:: *)(), QtInstanceComboBox *, void * *)::{lambda()#1}&&) qobjectdefs_impl.h 66 0x7fffe4c882d9
    9 QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtInstanceComboBox:: *)()>::call(void (QtInstanceComboBox:: *)(), QtInstanceComboBox *, void * *) qobjectdefs_impl.h 127 0x7fffe4c8820b
    10 QtPrivate::FunctionPointer<void (QtInstanceComboBox:: *)()>::call<QtPrivate::List<>, void>(void (QtInstanceComboBox:: *)(), QtInstanceComboBox *, void * *) qobjectdefs_impl.h 175 0x7fffe4c8818d
    11 QtPrivate::QCallableObject<void (QtInstanceComboBox:: *)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void * *, bool *) qobjectdefs_impl.h 546 0x7fffe4c880b6
    12 QtPrivate::QSlotObjectBase::call qobjectdefs_impl.h 462 0x7fffe3aefbf2
    13 doActivate<false> qobject.cpp 4406 0x7fffe3d2691c
    14 QMetaObject::activate qobject.cpp 4467 0x7fffe3d1c8c3
    15 QMetaObject::activate<void, QString> qobjectdefs.h 320 0x7fffe1c8842b
    16 QComboBox::editTextChanged moc_qcombobox.cpp 338 0x7fffe1e46cae
    17 QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<QString const&>, void, void (QComboBox:: *)(QString const&)>::call(void (QComboBox:: *)(QString const&), QComboBox *, void * *)::{lambda()#1}::operator()() const qobjectdefs_impl.h 128 0x7fffe1e579f8
    18 QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<QString const&>, void, void (QComboBox:: *)(QString const&)>::call(void (QComboBox:: *)(QString const&), QComboBox *, void * *)::{lambda()#1}>(void * *, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<QString const&>, void, void (QComboBox:: *)(QString const&)>::call(void (QComboBox:: *)(QString const&), QComboBox *, void * *)::{lambda()#1}&&) qobjectdefs_impl.h 66 0x7fffe1e5796d
    19 QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<QString const&>, void, void (QComboBox:: *)(QString const&)>::call qobjectdefs_impl.h 127 0x7fffe1e57927
    20 QtPrivate::FunctionPointer<void (QComboBox:: *)(QString const&)>::call<QtPrivate::List<QString const&>, void> qobjectdefs_impl.h 175 0x7fffe1e57891
    21 QtPrivate::QCallableObject<void (QComboBox:: *)(QString const&), QtPrivate::List<QString const&>, void>::impl qobjectdefs_impl.h 546 0x7fffe1e577bb
    22 QtPrivate::QSlotObjectBase::call qobjectdefs_impl.h 462 0x7fffe3aefbf2
    23 doActivate<false> qobject.cpp 4406 0x7fffe3d2691c
    24 QMetaObject::activate qobject.cpp 4467 0x7fffe3d1c8c3
    25 QMetaObject::activate<void, QString> qobjectdefs.h 320 0x7fffe1c8842b
    26 QLineEdit::textChanged moc_qlineedit.cpp 333 0x7fffe1ee36ce
    27 QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<QString const&>, void, void (QLineEdit:: *)(QString const&)>::call(void (QLineEdit:: *)(QString const&), QLineEdit *, void * *)::{lambda()#1}::operator()() const qobjectdefs_impl.h 128 0x7fffe1ef1bf8
    28 QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<QString const&>, void, void (QLineEdit:: *)(QString const&)>::call(void (QLineEdit:: *)(QString const&), QLineEdit *, void * *)::{lambda()#1}>(void * *, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<QString const&>, void, void (QLineEdit:: *)(QString const&)>::call(void (QLineEdit:: *)(QString const&), QLineEdit *, void * *)::{lambda()#1}&&) qobjectdefs_impl.h 66 0x7fffe1ef1b6d
    29 QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<QString const&>, void, void (QLineEdit:: *)(QString const&)>::call qobjectdefs_impl.h 127 0x7fffe1ef1b27
    30 QtPrivate::FunctionPointer<void (QLineEdit:: *)(QString const&)>::call<QtPrivate::List<QString const&>, void> qobjectdefs_impl.h 175 0x7fffe1ef1a91
    31 QtPrivate::QCallableObject<void (QLineEdit:: *)(QString const&), QtPrivate::List<QString const&>, void>::impl qobjectdefs_impl.h 546 0x7fffe1ef19bb
    32 QtPrivate::QSlotObjectBase::call qobjectdefs_impl.h 462 0x7fffe3aefbf2
    33 doActivate<false> qobject.cpp 4406 0x7fffe3d2691c
    34 QMetaObject::activate qobject.cpp 4467 0x7fffe3d1c8c3
    35 QMetaObject::activate<void, QString> qobjectdefs.h 320 0x7fffe1c8842b
    36 QWidgetLineControl::textChanged moc_qwidgetlinecontrol_p.cpp 211 0x7fffe1efa5f1
    37 QWidgetLineControl::finishChange qwidgetlinecontrol.cpp 716 0x7fffe1ef7ce6
    38 QWidgetLineControl::internalSetText qwidgetlinecontrol.cpp 752 0x7fffe1ef944b
    39 QWidgetLineControl::setText qwidgetlinecontrol_p.h 221 0x7fffe1ee64c8
    40 QLineEditPrivate::setText qlineedit_p.cpp 265 0x7fffe1eeba7a
    41 QLineEdit::setText qlineedit.cpp 292 0x7fffe1edbd6e
    42 QComboBox::setEditText qcombobox.cpp 3243 0x7fffe1e47433
    43 QtInstanceComboBox::set_entry_text(rtl::OUString const&)::$_0::operator()() const QtInstanceComboBox.cxx 233 0x7fffe4c84c66
    44 std::__invoke_impl<void, QtInstanceComboBox::set_entry_text(rtl::OUString const&)::$_0&>(std::__invoke_other, QtInstanceComboBox::set_entry_text(rtl::OUString const&)::$_0&) invoke.h 63 0x7fffe4c84c15
    45 std::__invoke_r<void, QtInstanceComboBox::set_entry_text(rtl::OUString const&)::$_0&>(QtInstanceComboBox::set_entry_text(rtl::OUString const&)::$_0&) invoke.h 113 0x7fffe4c84bc5
    46 std::_Function_handler<void(), QtInstanceComboBox::set_entry_text(rtl::OUString const&)::$_0>::_M_invoke std_function.h 292 0x7fffe4c84add
    47 std::function<void()>::operator() std_function.h 593 0x7fffe4c3446e
    48 QtInstance::RunInMainThread QtInstance.cxx 216 0x7fffe4c2bbef
    49 QtInstanceComboBox::set_entry_text QtInstanceComboBox.cxx 233 0x7fffe4c7e87a
->  50 ScPivotCalcFieldDlg::AddDummyNewField PivotCalcFieldDialog.cxx 182 0x7fff872b08f7
    51 ScPivotCalcFieldDlg::ScPivotCalcFieldDlg PivotCalcFieldDialog.cxx 81 0x7fff872afca8
    52 std::_Construct<ScPivotCalcFieldDlg, weld::Window *&, ScViewData&, ScDPObject const *&> stl_construct.h 133 0x7fff6ef40f43
    53 std::allocator_traits<std::allocator<void>>::construct<ScPivotCalcFieldDlg, weld::Window *&, ScViewData&, ScDPObject const *&> alloc_traits.h 805 0x7fff6ef40b85
    54 std::_Sp_counted_ptr_inplace<ScPivotCalcFieldDlg, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<weld::Window *&, ScViewData&, ScDPObject const *&> shared_ptr_base.h 606 0x7fff6ef40b85
    55 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<ScPivotCalcFieldDlg, std::allocator<void>, weld::Window *&, ScViewData&, ScDPObject const *&> shared_ptr_base.h 970 0x7fff6ef4090f
    56 std::__shared_ptr<ScPivotCalcFieldDlg, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>, weld::Window *&, ScViewData&, ScDPObject const *&> shared_ptr_base.h 1719 0x7fff6ef4083c
    57 std::shared_ptr<ScPivotCalcFieldDlg>::shared_ptr<std::allocator<void>, weld::Window *&, ScViewData&, ScDPObject const *&> shared_ptr.h 463 0x7fff6ef407ba
    58 std::make_shared<ScPivotCalcFieldDlg, weld::Window *&, ScViewData&, ScDPObject const *&> shared_ptr.h 1007 0x7fff6ef40749
    59 vcl::AbstractDialogImpl_BASE<AbstractScPivotCalcFieldDlg, ScPivotCalcFieldDlg, std::shared_ptr, true>::make_dialog<weld::Window *&, ScViewData&, ScDPObject const *&> abstdlgimpl.hxx 63 0x7fff6ef406c0
    60 AbstractDialogImpl_BASE<weld::Window *&, ScViewData&, ScDPObject const *&> abstdlgimpl.hxx 42 0x7fff6ef40417
    61 AbstractDialogImpl_BASE scdlgfact.cxx 546 0x7fff6ef21995
    62 VclPtr<(anonymous namespace)::AbstractScPivotCalcFieldDlg_Impl>::Create<weld::Window *&, ScViewData&, ScDPObject const *&> vclptr.hxx 153 0x7fff6ef15d98
    63 ScAbstractDialogFactory_Impl::CreateScPivotCalcFieldDlg scdlgfact.cxx 553 0x7fff6ef15cdd
    64 ScPivotShell::Execute pivotsh.cxx 89 0x7fff87aa613b
    65 SfxStubScPivotShellExecute scslots.hxx 5362 0x7fff87aa5fc5
    66 SfxDispatcher::Call_Impl dispatch.cxx 258 0x7ffff37c5b2e
    67 SfxDispatcher::Execute_ dispatch.cxx 757 0x7ffff37ca1f6
    68 SfxBindings::Execute_Impl bindings.cxx 1047 0x7ffff37b20ae
    69 SfxDispatchController_Impl::dispatch unoctitm.cxx 737 0x7ffff388e2bd
    70 SfxOfficeDispatch::dispatch unoctitm.cxx 256 0x7ffff388cd74
    71 framework::(anonymous namespace)::AsyncMenuExecute menubarmanager.cxx 793 0x7ffff4d551a4
    72 Link<void *, void>::Call link.hxx 105 0x7fffedaaaf41
    73 ImplHandleUserEvent winproc.cxx 2314 0x7fffedaa6881
    74 ImplWindowFrameProc winproc.cxx 2869 0x7fffedaa37b5
    75 SalFrame::CallCallback salframe.hxx 309 0x7fffe4c0cc3c
    76 QtInstance::ProcessEvent QtInstance.cxx 564 0x7fffe4c2ea4f
    77 SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const salusereventlist.cxx 119 0x7fffee07d4ed
    78 SalUserEventList::DispatchUserEvents salusereventlist.cxx 120 0x7fffee07d3c4
    79 QtInstance::ImplYield QtInstance.cxx 458 0x7fffe4c2b3b1
    80 QtInstance::DoYield QtInstance.cxx 480 0x7fffe4c2e611
    81 InnerYield svapp.cxx 389 0x7fffee146746
    82 Application::Yield svapp.cxx 502 0x7fffee145fcf
    83 Application::Execute svapp.cxx 364 0x7fffee145db0
    84 desktop::Desktop::Main app.cxx 1679 0x7ffff7b1f0f5
    85 ImplSVMainRun svmain.cxx 234 0x7fffee16f92c
    86 SalInstance::SVMainRun salinst.hxx 108 0x7fffe4c36b41
    87 ImplSVMain svmain.cxx 221 0x7fffee16ee52
    88 SVMain svmain.cxx 252 0x7fffee1709e9
    89 soffice_main sofficemain.cxx 122 0x7ffff7b9916a
    90 sal_main main.c 51 0x5555555559fd
    91 main main.c 49 0x5555555559d7

Change-Id: Id396e1bcb6e87b8b864257b167f534eb45895d99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208571
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-27 20:21:33 +02:00
Khaled Hosny fe8cb4fee7 vcl: Drop unreachable GenericFontFace::GetHbTable
PhysicalFontFace::GetHbTable() is called only through the callback that
PhysicalFontFace::GetHbFace() installs with hb_face_create_for_tables(),
but GenericFontFace overrides GetHbFace() and creates the face from the
font file instead, so this override was never called (and would have
dereferenced a null face if it were called before GetHbFace()).

Change-Id: Ic6f3cd57b5c2556a2d2cdb5f3a58f7d59633750c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208634
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
2026-07-27 01:40:29 +02:00
Khaled Hosny 6e6bf902f0 vcl: Rename the Freetype* font code to Generic*
We no longer use FreeType, and this code is also not platform-specific,
so Generic seems like a good fit.

    FreetypeFontFace       -> GenericFontFace
    FreetypeFont           -> GenericFont
    FreetypeFontList       -> GenericFontList
    FreeTypeTextRenderImpl -> GenericTextRenderImpl

Change-Id: I31547a25167684985fed8b21fdfba61371352528
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208578
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-24 23:44:46 +02:00
Khaled Hosny f9fac37352 vcl: Drop direct FreeType use
Nothing really uses FreeType internally anymore (externals like Cairo or
Skia create their FT_Face’s themselves and don’t use ours).

We now load the hb_blob_t from file directly as HarfBuzz already uses
mmap, so FreetypeFontFile is gone now as well.

Change-Id: I90c532e47b658cdb55d7b13d7d788ecef8680942
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208542
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-24 17:08:55 +02:00
Khaled Hosny 199adf1343 vcl: Use HarfBuzz to get font variations on Linux
Read a named instance’s variation coordinates with HarfBuzz in
FreetypeFontFace::GetVariations() instead of FreeType.

This is our last direct use of FreeType, so we can now drop it entirely.

Change-Id: Ia41c7622c45c923208bd028254fe4163b56fe210
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208541
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
2026-07-24 17:03:03 +02:00
Khaled Hosny 73c8a0e52b vcl: Use HarfBuzz to get the font metric
One less source of cross-platform discrepancies.

Change-Id: I19c14e4cde61c5618704b412e569b293c78be7e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208537
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-24 17:02:55 +02:00
Khaled Hosny 931625d10e vcl: Use HarfBuzz to get glyph outlines
One less source of cross-platform discrepancies. Also HarfBuzz is likely
to be more up to date with additions to OpenType spec, so we can get new
features faster.

Change-Id: Icf2e6ad982ca6b7cfd2de574153d48da4dbb7e69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208536
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-24 17:02:46 +02:00
Michael Weghorn 3b2a02c7c6 vcl: Have empty default SalFrame::SimulateKeyPress implementation
Have a default implementation that does nothing, instead
of having a purely virtual method that 4 subclasses
override to do nothing (except for possibly emitting
a warning) themselves.

Change-Id: I5059838ad1e2c933e18af77d9e93e106a4cac9c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208425
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-24 14:34:39 +02:00
Khaled Hosny 341656c9e5 vcl: Rename freetype_glyphcache.cxx to FreetypeFont.cxx
It holds only FreetypeFont now.

Change-Id: I2f9f689c45be5f0e831043fe981b494676975cb5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208531
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
2026-07-24 11:29:02 +02:00
Khaled Hosny ea5d20690d vcl: Move FreetypeFontFace into its own file
Move FreetypeFontFile and FreetypeFontFace out of
freetype_glyphcache.hxx/.cxx into FreetypeFontFace.hxx/.cxx.

Change-Id: I4eccfa0759340d1da33267bc5e360c1626678de4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208530
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-24 11:28:55 +02:00
Khaled Hosny f83373cd8b vcl: Rename glyphcache.cxx to FreetypeFontList.cxx
It holds FreetypeFontList. Move the rest of the FreetypeFontList
methods, and the FT_Library and antialiasing-priority statics, into it
from freetype_glyphcache.cxx.

Change-Id: Iac44e612306a280fb55a2f4fa5caa66973489a01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208529
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-24 11:28:47 +02:00
Khaled Hosny 169e5daed0 vcl: Rename psp::PrintFontManager to FontConfigManager
“psp” stands for PostScript print, there is no PostScript and the class
has nothing to do with printing.

Change-Id: I45ceb4b5deb5ae9cbb731158a5f84f0d716c6036
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208527
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-24 11:28:39 +02:00
Khaled Hosny d4df38023e vcl: Keep the Linux fonts in one list, not three
The same fonts were held three times over: PrintFontManager enumerated
them from fontconfig, FreeTypeTextRenderImpl existed only to copy that
into FreetypeManager’s own map of the same fields, and the faces built
from it went into the PhysicalFontCollection. We now merge the first two
into one FreetypeFontList and leave PrintFontManager as the only the
fontconfig font manager.

Change-Id: Ib7beca98d1ef12bfae54d1dab438f5fbf51dbf9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208526
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
2026-07-24 03:19:30 +02:00
Khaled Hosny b09366a8cf vcl: Merge FreetypeFontInstance and FreetypeFont
FreetypeFontInstance was a LogicalFontInstance whose only job was to own
a FreetypeFont and forward to it, while FreetypeFont held a reference
back to the instance to reach the font select pattern. Make FreetypeFont
the LogicalFontInstance, similar to CoreTextFont and QtFont already are.

Change-Id: If07df1a2d706f27b7364457f6288e8db372b7769
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208524
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-24 02:58:19 +02:00
Khaled Hosny 2ab60d29e3 vcl: Merge FreetypeFontInfo into FreetypeFontFace
FreetypeFontInfo and FreetypeFontFace were both “an unscaled font face”.
The split is pointless, so lets keep one face similar to CoreTextFontFace.

Change-Id: I71ffaae69a76930778c06fe3ea4d0fcf71103509
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208523
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
2026-07-24 02:58:11 +02:00
Khaled Hosny c88d615db8 vcl: Consolidate the Linux font code under vcl/unx/generic/font
The FreeType/fontconfig font backend was spread over three directories
mostly for historical reasons. Lets clean this up and consolidate it
under one directory.

helper.cxx holds the psp path helpers, so it goes to print/ next to the
rest of the printing code.

Change-Id: I67d20e3e4bdf71d978a79e672bb31d3dd1460595
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208522
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-24 02:58:02 +02:00
Khaled Hosny 8c56dcbac4 vcl: Simplify getLangBoost()
Move it to its only caller.

Change-Id: I079a0113b37eca7d48001a936b7de36ab98f3ef7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208520
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
2026-07-24 02:57:47 +02:00
Khaled Hosny d39ad02a46 vcl: remove unused psheader.ps file
Change-Id: I926164282b7b59ae28f9f510df928626024c8946
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208518
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
2026-07-24 02:57:33 +02:00
Michael Weghorn 4e81fbaa3f vcl: Directly return vcl::WindowData in SalFrame::GetWindowState
So far, SalFrame::GetWindowState had a bool return value
and a vcl::WindowData* out param.

The comment said:

    // if this returns false the structure is uninitialised

However, all implementations always return true.
All callers pass the pointer to a newly default-constructed
vcl::WindowData.

Instead, drop the (always true) bool return value and out param
and instead directly return the vcl::WindowData as the methods
return value.

For macOS, add a new vcl::WindowData member to the
RuninmainResult union, so this can be used as a return
value with OSX_SALDATA_RUNINMAIN_UNION in
AquaSalFrame::GetWindowState.

Change-Id: Icc55685cae9991a93fea43963273753d8aa2420f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208169
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-19 19:30:22 +02:00
Michael Weghorn 370524907c vcl: Pass SalFrame::SetWindowState param by const ref
... instead of by pointer.
This makes clear it's non-null and allows to
drop some corresponding null checks.

Change-Id: I3e6c85c555ebcc0d949628e10fce891bc1c83fd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208162
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-19 19:30:11 +02:00
Michael Weghorn 2c047172e5 vcl: Stop passing X11 window ID for GNOME session manager inhibition
Just pass 0 for the parameter that used to be for an X11 window ID
in the past, but is not actually needed (and there's no equivalent
for Wayland) and ignored in current versions of GNOME anyway.

The documentation of the DBus method [1] says for
the parameter:

> An ignored parameter, which exists only to make this API
> backwards-compatible with older versions of GNOME

Related gnome-session commit [2]:

    commit 4458144dadf44d320f54b332a414813c0fea9e44
    Author: Adrian Vovk <adrianvovk@gmail.com>
    Date:   Thu Jun 26 21:26:28 2025 -0400

        inhibitor: Drop toplevel_xid

        Completely unused, including the DBus API (searched Debian & GitHub)

[1] https://gnome.pages.gitlab.gnome.org/gnome-session/re04.html#gdbus-method-org-gnome-SessionManager.Inhibit
[2] https://gitlab.gnome.org/GNOME/gnome-session/-/commit/4458144dadf44d320f54b332a414813c0fea9e44

Change-Id: I9393e94a3c957eb318e82d631e889c9b327d98b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208139
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-15 17:58:37 +02:00
Michael Weghorn 2da5323873 vcl: Use Size return value for Salframe::GetClientSize instead of 2 out params
return the size instead of using 2 tools::Long& out
params for the width and height.

Change-Id: Ib5cefb504ee27b6aac977a2f9534c29bc53db72d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208067
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-15 14:47:32 +02:00
Michael Weghorn c8c367b31a Use vcl::WindowData instead of string for window state in more places
vcl::WindowData is used to manage/store various state
information for windows. It can be (de)serialized to/from string.

So far, both the weld::Window API to get/set window state
as well as the SvtViewOptions API were based on the string
representation.

Switch those and various related places to using vcl::WindowData
instead to use a stronger/more specific type than just OUString
in various places across the code base.

Do the string (de)serialization where necessary, but otherwise
prefer to use vcl::WindowData directly.

Calling weld::Window::set_window_state with a WindowData
param that doesn't indicate that anything should be set
(i.e. whose mask is vcl::WindowDataMask::NONE) should
have no effect, so drop extra checks that were previously
checking whether the string representation was empty
and skipping the call to weld::Window::set_window_state in
that case.

No change in user-observable behavior intended or
seen in a quick test.

Change-Id: I5bc4caeb49d0ab2bbc4fa597a5ef19d86d3aac2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208125
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-15 14:45:49 +02:00
Khaled Hosny 4dd1d69e85 tdf#172647: Prefer the typographic family name from FontConfig
LocalizedElementFromPattern reversed FontConfig’s name order to match
the legacy R/B/I/BI-compatible family before the typographic one,
splitting a family's extended style (widths, optical sizes, ...) into
separate families the way Windows’s GDI does.

This was because we only supported weight and italic styles. We are
fixing this now.

This reverts part of:

commit 0b5e88bc88
Author: Khaled Hosny <khaled@libreoffice.org>
Date:   Thu Aug 3 13:44:43 2023 +0000

    tdf#114192: Speed up populating font list when FontConfig is used

Change-Id: I9c37744e961c7184669ca9eaf89143e707b78d09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207331
Tested-by: Khaled Hosny <khaled@libreoffice.org>
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-14 00:14:21 +02:00
Michael Weghorn f1f6a505a0 weld: Pass weld::TextWidget& in text change callback/handler
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>
2026-07-10 18:17:27 +02:00
Michael Weghorn 597d2f85af tdf#130857 gtk weld: Consider expander image col in TreeView::do_insert
In GtkInstanceTreeView::insert_row, called by
GtkInstanceTreeView::do_insert (and other places, but these
don't pass an icon/virtual device), insert the image/icon
into the special "expander image column" if that one exists,
and only try another pixbuf column otherwise.

This matches what the vcl and Qt weld implementations
already do and will be needed by upcoming commit

    Change-Id: I9727a508cd18ad48814a054432c376b5ca3d6038
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jul 8 11:32:02 2026 +0200

        tdf#130857 cui: Put pixbuf + text in same column in Chart "Default Colors" page

to keep showing the color images for the gtk3 vcl plugin.

Change-Id: I5c3a29790f593f07c04f23deb8bc993a893a00db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207764
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-09 18:12:26 +02:00
Neil Roberts 64df8d7617 tdf#172670 TreeView: Make iter_n_children return 0 with children on demand
On at least the GTK and gen plugins, iter_n_children was returning 1
when the node has children on demand but then iter_children will return
false in order to ignore the dummy node. This was causing an infinite
recursion when iter_previous is called and the previous node has
on-demand children because that uses the result of iter_n_children to
determine if the node has children and then uses iter_children to move
to a child node without checking the return value. That meant the
iterator wouldn’t move and it would keep searching from the same place
forever.

This patch fixes it by making iter_n_children non-virtual and making it
bail out early with 0 if the node has children on demand. Otherwise it
will ask the backend via a virtual function which has been renamed to
do_iter_n_children so that it is similar to how do_iter_children works.

Change-Id: Ie9a3d5d51c9eae0789048fa5240441663642595d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207589
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-08 09:48:49 +02:00
Michael Weghorn 2dca1c0f02 weld: Rename TreeView *_column_clicked methods to *_column_header_clicked
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>
2026-07-03 22:26:00 +02:00
Michael Weghorn 798b5e5204 tdf#130857 gtk weld: Don't interpret toggle renderer by itself as expander col
The ui-rules-enforcer check newly introduded in earlier commit

    commit e6b2af1cf8
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Fri Jun 19 08:58:59 2026 +0200

        tdf#130857 ui-rules-enforcer: Check that special toggle renderer not by itself

was used to identify cases where the first GtkTreeViewColumn
in a GtkTreeView in a .ui file only contained a
single GtkCellRendererToggle and no other renderers.

Quoting from the commit message:

> If the special toggle renderer is used in the first
> column, the next "real" renderer still uses column index 0
> in the weld API.
> That makes sense if the renderer is actually
> in the first column still, but is rather
> non-obvious/confusing if that's not the case.
> (The GtkInstanceTreeView ctor currently unconditionally
> considers a GtkCellRendererToggle to be a special
> expander column when it is the first renderer in
> the first column, regardless of whether more
> renderers are there or not.)

> Ensure that the special toggle renderer
> is not in a column by itself, but accompanied
> by at least another renderer by adding a corresponding
> check to the ui-rules-enforcer.
>
> Since the special toggle button is to toggle an
> entry on/off, it also makes sense if it is in the
> same column as the icon or text that it enables/disables.
> If the purpose is to be for a whole row and the check
> button should be in its own column, then it would in my opinion
> make more sense to also use a regular column index of 0 instead
> of the "expander toggle column" feature. Allowing to do that
> would require more rework (as it would break the
> current assumption/logic in the GtkInstanceTreeView ctor
> as described above). If there are any cases where it
> makes sense to have the renderer in its own column
> by itself, supporting that use case with a column
> index of 0 (instead of the current -1) should be easier to
> implement in the future once all cases where different columns
> don't make sense have been handled first. (Then, the logic
> in the GtkInstanceTreeView ctor can be adjusted without
> breaking those.)

All occurences that this new rule has found were
already addressed, i.e. there is currently no
case where the first column contains only a GtkCellRendererToggle.

Prepare for/take the next step: Allowing to use a colum only
containing a single GtkCellRendererToggle again, but then accessing
it using a regular column index of 0 instead of the special
column index of -1, as already outlined as a potential way forward
in that earlier commit.
(This way, column index 0 will be used for the first column,
column index 1 will be used for the second column, etc. which
is reasonably straightforward and doesn't break the
corresponding assumption in the qt weld implementation
any more).

To do so, adjust the logic in the GtkInstanceTreeView
ctor to only enable the special toggle column feature if
a GtkCellRendererToggle is the first renderer in the
first column *and* it is followed by another cell renderer
for the actual content (that is accessible by column index 0
in the weld API).
This also matches what is already checked for the special
pixbuf "expander" column, see the

    else if (GTK_IS_CELL_RENDERER_PIXBUF(pCellRenderer))

just below the modified line.

Drop the new ui-rules-enforcer rule introduced by the above-mentioned
e6b2af1cf8 again as
a first column only containing a toggle button is now
valid with the new semantics.

Extend the weld::TreeView::enable_toggle_buttons
doc a bit to make clear the requirements on the
definition in the .ui file.

This will be used in upcoming commits to simplify/streamline
existing UI like the one in the Java options page
(SvxJavaOptionsPage) where the .ui file
(cui/uiconfig/ui/optadvancedpage.ui) contains
two toggle renderers in the first column, but only
one of them is actually used and the implementation
in SvxJavaOptionsPage only makes use of column indices
-1 (for the special toggle column), 1 (for the "Vendor"
column) and 2 (for the "Version" column) and the
other renderer is not used in practice.
Presumably, the special toggle button feature was only
used because using it was mandatory in the past to be
able to use radio buttons at all.
That is no longer the case since

    Change-Id: I098feb474162d61c5452c3496293a420118e2f4f
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jun 24 15:42:40 2026 +0200

        tdf#130857 weld: Have separate method to set treeview toggle button type

, so move forward with the intention to make the whole
mapping between cell renderers in the .ui file, columns
in the .ui file and column indices in the weld API
more straightforward/less confusing
(e.g. by being able to drop renderers in the .ui file
that have no actual equivalent in the implementation
of the UI using the treeview).

Change-Id: Ic5bbe4ab71ba255ba16bb0a9176ee4c3a8827fe8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207254
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-25 18:24:25 +02:00
Michael Weghorn 5198bdfcb4 gtk weld: Merge nested 'else if { if (...) { ... } }'
Change-Id: Id622d872b92481310aa247a5ee2727ffc5f55675
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207253
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-25 18:24:15 +02:00
Michael Weghorn fd2c3e6184 gtk weld: Drop duplicate line of code
The line above already does exactly the same.

Change-Id: Icaa10b43be938a04ee90fd896bbfa242718326c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207252
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-25 18:24:08 +02:00
Michael Weghorn 14cfde3c60 tdf#130857 weld: Have separate method to set treeview toggle button type
So far, weld::TreeView::enable_toggle_buttons was doing
two things:

* enable a special "toggle button column" to be accessed
  with a special column index of -1 in the weld::TreeView
  API (as documented)

* switch the type of *all* toggle buttons used in all cells/columns
  of the TreeView to the type passed as a parameter
  (not only set the type of the toggle buttons for the
  special toggle button column at index -1)

Untangle these 2 things by splitting this to two methods:

* weld::TreeView::enable_toggle_buttons now only enables
  the special toggle button column at index -1.

* The new weld::TreeView::set_toggle_button_type sets
  the type of all toggle buttons used in the table.

This makes the API clearer and will allow using one of the
two without necessarily also using the other, which will
allow further simplification/improvements in upcoming
commits.

It could also make it easier to support only setting
the type of single columns to use radio buttons in the
future (i.e. have one column using radio buttons and
another one using check buttons in the same table), but
that would require further rework in the underlying
toolkit-specific implementations (in particular the vcl one).

One case where mixing the two things together results
in non-optimal behavior is the "Assign Styles" dialog
with the vcl implementation:

While the special toggle column with index -1 isn't
actually used, the SwAddStylesDlg_Impl ctor still
calls weld::TreeView::enable_toggle_buttons, presumably
only to enable the use of radio buttons for the actually
used toggle columns at the end.
As a consequence, the style names in the first column
are indented for no good reason (but only to leave space
for drawing the toggle buttons for the special toggle
button column that was enabled without actually being
needed).
This will be adjusted in an upcoming commit.

Initially, just replace all callers of
weld::TreeView::enable_toggle_buttons passing
weld::ColumnToggleType::Radio for the type with
calls to both methods, to keep the existing behavior
and be able to further look into further improvements
separately.

Change-Id: I098feb474162d61c5452c3496293a420118e2f4f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207250
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-25 18:23:52 +02:00
Michael Weghorn 35e2a8f8c6 tdf#130857 weld: Add default param for TreeView::enable_toggle_buttons
Most callers use weld::ColumnToggleType::Check
and only a few use weld::ColumnToggleType::Radio.

Add a default param of weld::ColumnToggleType::Check
and drop the explicit param for callers passing this.

This prepares for moving setting the toggle button
type to a separate method in an upcoming commit to
clarify what it actually does.
(It doesn't only set the toggle button type of the
special "expander toggle column" enabled by
weld::TreeView::enable_toggle_buttons, but of *all*
toggle buttons used in any of the cells of the
whole table.)

Change-Id: I65edb7cd5f79c59222c1c415f118b8adbdec0271
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207249
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-25 18:23:42 +02:00
Julien Nabet 3fceaee085 -Werror,-Wimplicit-fallthrough in vcl
/home/julien/lo/libo_perf/vcl/unx/generic/dtrans/bmp.cxx:123:9: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
  123 |         default:
      |         ^
/home/julien/lo/libo_perf/vcl/unx/generic/dtrans/bmp.cxx:123:9: note: insert '[[fallthrough]];' to silence this warning
  123 |         default:
      |         ^
      |         [[fallthrough]];
/home/julien/lo/libo_perf/vcl/unx/generic/dtrans/bmp.cxx:123:9: note: insert 'break;' to avoid fall-through
  123 |         default:
      |         ^
      |         break;
1 error generated.

when with don't use enable-debug.
So we need #ifdef NDEBUG/#endif to not have "unreachable code" error.

Change-Id: I15b8b2af79d13de0140522d4537f85951b2c55d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207195
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-06-23 21:51:30 +02:00
Michael Weghorn 15cfa7b987 tdf#130857 weld: Block signals in TreeView::set_toggle
As is the case in other weld methods, signals about
the change of the toggle status for entries in weld::TreeView
are not supposed to be emitted when the change happens
programatically and not by manual user interaction.

Therefore, disable notify events in weld::TreeView::set_toggle
by renaming the actual toolkit-specific implementations to
do_set_toggle and making the weld::TreeView::set_toggle
base class method block signals while calling
the virtual methods.

See also e.g. weld::TreeView::insert which
uses the same approach.

This aligns the behavior of the Qt implementation
with the other ones. For example, the vcl/SalInstanceTreeView
implementation only calls weld::TreeView::signal_toggled
from SalInstanceTreeView::ToggleHdl. That one is set
via SvLBoxButtonData::SetLink in the SalInstanceTreeView ctor.
The link is called in SvLBoxButtonData::CallLink, called from
SvLBoxButton::ClickHdl, which only gets called in response
to either mouse or keyboard events.

This fixes a nullptr deref seen with the qt6 VCL
plugin and env var SAL_VCL_QT_USE_WELDED_WIDGETS=1
for the following scenario:

* start Writer
* insert an Image via "Insert" -> "Image"
* with image selected, open context menu
* activate the "Insert Caption" context menu
  entry
* in the "Insert Caption" dialog, press the
  "Auto..." button

Crash/Backtrace without this commit in place:

    Thread 1 received signal SIGSEGV, Segmentation fault.
    rtl::OUString::isEmpty (this=0x18) at include/rtl/ustring.hxx:831
    831             return pData->length == 0;
    (rr) bt
    #0  rtl::OUString::isEmpty (this=0x18) at include/rtl/ustring.hxx:831
    #1  0x00007fd2dba98d4b in SwCaptionOptPage::UpdateEntry (this=0x55e123635a80, nSelEntry=0) at /home/michi/development/git/libreoffice/sw/source/ui/config/optload.cxx:1238
    #2  0x00007fd2dba9e0aa in SwCaptionOptPage::ToggleEntryHdl (this=0x55e123635a80, rRowCol={...}) at /home/michi/development/git/libreoffice/sw/source/ui/config/optload.cxx:1347
    #3  0x00007fd2dba9601d in SwCaptionOptPage::LinkStubToggleEntryHdl (instance=0x55e123635a80, data={...}) at /home/michi/development/git/libreoffice/sw/source/ui/config/optload.cxx:1345
    #4  0x00007fd37d724a91 in Link<std::pair<weld::TreeIter const&, int> const&, void>::Call (this=0x55e11e257910, data={...}) at include/tools/link.hxx:105
    #5  0x00007fd37d71d2f1 in weld::TreeView::signal_toggled (this=0x55e11e2578e8, rIterCol={...}) at include/vcl/weld/TreeView.hxx:109
    #6  0x00007fd37d7052dd in QtInstanceTreeView::handleDataChanged (this=0x55e11e2576c0, rTopLeft=..., rBottomRight=..., rRoles=...) at vcl/qt6/../qt5/QtInstanceTreeView.cxx:981
    #7  0x00007fd37d72529a in QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, QtPrivate::List<QModelIndex const&, QModelIndex const&, QList<int> const&>, void, void (QtInstanceTreeView::*)(QModelIndex const&, QModelIndex const&, QList<int> const&)>::call(void (QtInstanceTreeView::*)(QModelIndex const&, QModelIndex const&, QList<int> const&), QtInstanceTreeView*, void**)::{lambda()#1}::operator()() const (this=0x7ffdc7bcb6b0)
        at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:128
    #8  0x00007fd37d7251a9 in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, QtPrivate::List<QModelIndex const&, QModelIndex const&, QList<int> const&>, void, void (QtInstanceTreeView::*)(QModelIndex const&, QModelIndex const&, QList<int> const&)>::call(void (QtInstanceTreeView::*)(QModelIndex const&, QModelIndex const&, QList<int> const&), QtInstanceTreeView*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, QtPrivate::List<QModelIndex const&, QModelIndex const&, QList<int> const&>, void, void (QtInstanceTreeView::*)(QModelIndex const&, QModelIndex const&, QList<int> const&)>::call(void (QtInstanceTreeView::*)(QModelIndex const&, QModelIndex const&, QList<int> const&), QtInstanceTreeView*, void**)::{lambda()#1}&&) (args=0x7ffdc7bcbaa0, fn=...)
        at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:66
    #9  0x00007fd37d7250e3 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, QtPrivate::List<QModelIndex const&, QModelIndex const&, QList<int> const&>, void, void (QtInstanceTreeView::*)(QModelIndex const&, QModelIndex const&, QList<int> const&)>::call
        (f=(void (QtInstanceTreeView::*)(QtInstanceTreeView * const, const QModelIndex &, const QModelIndex &, const QList<int> &)) 0x7fd37d705170 <QtInstanceTreeView::handleDataChanged(QModelIndex const&, QModelIndex const&, QList<int> const&)>, o=0x55e11e2576c0, arg=0x7ffdc7bcbaa0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
    #10 0x00007fd37d72505d in QtPrivate::FunctionPointer<void (QtInstanceTreeView::*)(QModelIndex const&, QModelIndex const&, QList<int> const&)>::call<QtPrivate::List<QModelIndex const&, QModelIndex const&, QList<int> const&>, void>
        (f=(void (QtInstanceTreeView::*)(QtInstanceTreeView * const, const QModelIndex &, const QModelIndex &, const QList<int> &)) 0x7fd37d705170 <QtInstanceTreeView::handleDataChanged(QModelIndex const&, QModelIndex const&, QList<int> const&)>, o=0x55e11e2576c0, arg=0x7ffdc7bcbaa0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:175
    #11 0x00007fd37d724f86 in QtPrivate::QCallableObject<void (QtInstanceTreeView::*)(QModelIndex const&, QModelIndex const&, QList<int> const&), QtPrivate::List<QModelIndex const&, QModelIndex const&, QList<int> const&>, void>::impl
        (which=1, this_=0x55e1283a4630, r=0x55e11e2576c0, a=0x7ffdc7bcbaa0, ret=0x0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:546
    #12 0x00007fd37c4ee572 in QtPrivate::QSlotObjectBase::call (this=0x55e1283a4630, r=0x55e11e2576c0, a=0x7ffdc7bcbaa0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:462
    #13 0x00007fd37c724c6c in doActivate<false> (sender=0x55e127fd8030, signal_index=3, argv=0x7ffdc7bcbaa0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4386
    #14 0x00007fd37c71af23 in QMetaObject::activate (sender=0x55e127fd8030, m=0x7fd37d100d10 <QAbstractItemModel::staticMetaObject>, local_signal_index=0, argv=0x7ffdc7bcbaa0)
        at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4447
    #15 0x00007fd37cbc76fe in QMetaObject::activate<void, QModelIndex, QModelIndex, QList<int> > (sender=0x55e127fd8030, mo=0x7fd37d100d10 <QAbstractItemModel::staticMetaObject>, local_signal_index=0, ret=0x0, args=..., args=..., args=...)
        at qtbase/src/corelib/kernel/qobjectdefs.h:320
    #16 0x00007fd37cbc27c0 in QAbstractItemModel::dataChanged (this=0x55e127fd8030, _t1=..., _t2=..., _t3=...) at qtbase/src/corelib/Core_autogen/include/moc_qabstractitemmodel.cpp:658
    #17 0x00007fd37cc6a184 in QSortFilterProxyModelPrivate::_q_sourceDataChanged (this=0x55e1285d77a0, source_top_left=..., source_bottom_right=..., roles=...)
        at /home/michi/development/git/qt5/qtbase/src/corelib/itemmodels/qsortfilterproxymodel.cpp:1627
    #18 0x00007fd37ccaf63e in QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, QtPrivate::List<QModelIndex const&, QModelIndex const&, QList<int> const&>, void, void (QSortFilterProxyModelPrivate::*)(QModelIndex const&, QModelIndex const&, QList<int> const&)>::call(void (QSortFilterProxyModelPrivate::*)(QModelIndex const&, QModelIndex const&, QList<int> const&), QSortFilterProxyModelPrivate*, void**)::{lambda()#1}::operator()() const
        (this=0x7ffdc7bcbff0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:128
    #19 0x00007fd37ccaf59d in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, QtPrivate::List<QModelIndex const&, QModelIndex const&, QList<int> const&>, void, void (QSortFilterProxyModelPrivate::*)(QModelIndex const&, QModelIndex const&, QList<int> const&)>::call(void (QSortFilterProxyModelPrivate::*)(QModelIndex const&, QModelIndex const&, QList<int> const&), QSortFilterProxyModelPrivate*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, QtPrivate::List<QModelIndex const&, QModelIndex const&, QList<int> const&>, void, void (QSortFilterProxyModelPrivate::*)(QModelIndex const&, QModelIndex const&, QList<int> const&)>::call(void (QSortFilterProxyModelPrivate::*)(QModelIndex const&, QModelIndex const&, QList<int> const&), QSortFilterProxyModelPrivate*, void**)::{lambda()#1}&&)
        (args=0x7ffdc7bcc3f0, fn=...) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:66
    #20 0x00007fd37ccaf557 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, QtPrivate::List<QModelIndex const&, QModelIndex const&, QList<int> const&>, void, void (QSortFilterProxyModelPrivate::*)(QModelIndex const&, QModelIndex const&, QList<int> const&)>::call
        (f=(void (QSortFilterProxyModelPrivate::*)(QSortFilterProxyModelPrivate * const, const QModelIndex &, const QModelIndex &, const QList<int> &)) 0x7fd37cc691f0 <QSortFilterProxyModelPrivate::_q_sourceDataChanged(QModelIndex const&, QModelIndex const&, QList<int> const&)>, o=0x55e1285d77a0, arg=0x7ffdc7bcc3f0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
    #21 0x00007fd37ccaf4c1 in QtPrivate::FunctionPointer<void (QSortFilterProxyModelPrivate::*)(QModelIndex const&, QModelIndex const&, QList<int> const&)>::call<QtPrivate::List<QModelIndex const&, QModelIndex const&, QList<int> const&>, void>
        (f=(void (QSortFilterProxyModelPrivate::*)(QSortFilterProxyModelPrivate * const, const QModelIndex &, const QModelIndex &, const QList<int> &)) 0x7fd37cc691f0 <QSortFilterProxyModelPrivate::_q_sourceDataChanged(QModelIndex const&, QModelIndex const&, QList<int> const&)>, o=0x55e1285d77a0, arg=0x7ffdc7bcc3f0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:175
    #22 0x00007fd37ccaf3f0 in QtPrivate::QPrivateSlotObject<void (QSortFilterProxyModelPrivate::*)(QModelIndex const&, QModelIndex const&, QList<int> const&), QtPrivate::List<QModelIndex const&, QModelIndex const&, QList<int> const&>, void>::impl (which=1, this_=0x55e127fd8a30, r=0x55e127fd8030, a=0x7ffdc7bcc3f0, ret=0x0) at qtbase/src/corelib/kernel/qobject_p.h:273
    #23 0x00007fd37c4ee572 in QtPrivate::QSlotObjectBase::call (this=0x55e127fd8a30, r=0x55e127fd8030, a=0x7ffdc7bcc3f0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:462
    #24 0x00007fd37c724c6c in doActivate<false> (sender=0x55e127fd75c0, signal_index=3, argv=0x7ffdc7bcc3f0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4386
    #25 0x00007fd37c71af23 in QMetaObject::activate (sender=0x55e127fd75c0, m=0x7fd37d100d10 <QAbstractItemModel::staticMetaObject>, local_signal_index=0, argv=0x7ffdc7bcc3f0)
        at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4447
    #26 0x00007fd37cbc76fe in QMetaObject::activate<void, QModelIndex, QModelIndex, QList<int> > (sender=0x55e127fd75c0, mo=0x7fd37d100d10 <QAbstractItemModel::staticMetaObject>, local_signal_index=0, ret=0x0, args=..., args=..., args=...)
        at qtbase/src/corelib/kernel/qobjectdefs.h:320
    #27 0x00007fd37cbc27c0 in QAbstractItemModel::dataChanged (this=0x55e127fd75c0, _t1=..., _t2=..., _t3=...) at qtbase/src/corelib/Core_autogen/include/moc_qabstractitemmodel.cpp:658
    #28 0x00007fd37ba75cdd in QStandardItemModelPrivate::itemChanged (this=0x55e127fd8430, item=0x55e128008f00, roles=...) at /home/michi/development/git/qt5/qtbase/src/gui/itemmodels/qstandarditemmodel.cpp:568
    #29 0x00007fd37ba78c11 in QStandardItem::setData (this=0x55e128008f00, value=..., role=10) at /home/michi/development/git/qt5/qtbase/src/gui/itemmodels/qstandarditemmodel.cpp:909
    #30 0x00007fd37ba791dd in QStandardItem::setCheckable (this=0x55e128008f00, checkable=true) at /home/michi/development/git/qt5/qtbase/src/gui/itemmodels/qstandarditemmodel.cpp:1345
    #31 0x00007fd37d712230 in QtInstanceTreeView::set_toggle(weld::TreeIter const&, TriState, int)::$_0::operator()() const (this=0x55e128009370) at vcl/qt6/../qt5/QtInstanceTreeView.cxx:364
    #32 0x00007fd37d7121a5 in std::__invoke_impl<void, QtInstanceTreeView::set_toggle(weld::TreeIter const&, TriState, int)::$_0&>(std::__invoke_other, QtInstanceTreeView::set_toggle(weld::TreeIter const&, TriState, int)::$_0&) (__f=...)
        at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/invoke.h:63
    #33 0x00007fd37d712165 in std::__invoke_r<void, QtInstanceTreeView::set_toggle(weld::TreeIter const&, TriState, int)::$_0&>(QtInstanceTreeView::set_toggle(weld::TreeIter const&, TriState, int)::$_0&) (__fn=...)
        at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/invoke.h:113
    #34 0x00007fd37d71203d in std::_Function_handler<void(), QtInstanceTreeView::set_toggle(weld::TreeIter const&, TriState, int)::$_0>::_M_invoke (__functor=...)
        at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/std_function.h:292
    #35 0x00007fd37d62b07e in std::function<void()>::operator() (this=0x7ffdc7bcc838) at /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/std_function.h:593
    #36 0x00007fd37d62282f in QtInstance::RunInMainThread (this=0x55e11e0d3580, func=...) at vcl/qt6/../qt5/QtInstance.cxx:216
    #37 0x00007fd37d708783 in QtInstanceTreeView::set_toggle (this=0x55e11e2576c0, rIter=..., eState=TRISTATE_FALSE, nCol=-1) at vcl/qt6/../qt5/QtInstanceTreeView.cxx:362
    #38 0x00007fd386df11c3 in weld::TreeView::set_toggle (this=0x55e11e2578e8, row=0, eState=TRISTATE_FALSE, col=-1) at /home/michi/development/git/libreoffice/vcl/source/weld/TreeView.cxx:37
    #39 0x00007fd2dba97561 in SwCaptionOptPage::Reset (this=0x55e123635a80, rSet=0x7ffdc7bccec0) at /home/michi/development/git/libreoffice/sw/source/ui/config/optload.cxx:1100
    #40 0x00007fd38c0d8c50 in SfxSingleTabDialogController::SetTabPage (this=0x7ffdc7bcce68, xTabPage=std::unique_ptr<SfxTabPage> = {...}) at /home/michi/development/git/libreoffice/sfx2/source/dialog/basedlgs.cxx:269
    #41 0x00007fd2dba930fd in SwCaptionOptDlg::SwCaptionOptDlg (this=0x7ffdc7bcce68, pParent=0x55e1282eefa0, rSet=SfxItemSet of pool 0x55e11fee13b0 with parent 0x0 and Which ranges: [(1, 165), (1000, 1253), (4021, 4081)])
        at /home/michi/development/git/libreoffice/sw/source/ui/config/optload.cxx:857
    #42 0x00007fd2dbc1e524 in SwCaptionDialog::CaptionHdl (this=0x55e12817af00) at /home/michi/development/git/libreoffice/sw/source/ui/frmdlg/cption.cxx:376
    #43 0x00007fd2dbc1cc1d in SwCaptionDialog::LinkStubCaptionHdl (instance=0x55e12817af00, data=...) at /home/michi/development/git/libreoffice/sw/source/ui/frmdlg/cption.cxx:373
    #44 0x00007fd37d66c901 in Link<weld::Button&, void>::Call (this=0x55e128105858, data=...) at include/tools/link.hxx:105
    #45 0x00007fd37d66be5c in weld::Button::signal_clicked (this=0x55e128105850) at include/vcl/weld/Button.hxx:37
    #46 0x00007fd37d669b7d in QtInstanceButton::buttonClicked (this=0x55e1281056b0) at vcl/qt6/../qt5/QtInstanceButton.cxx:114
    #47 0x00007fd37d66cd21 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtInstanceButton::*)()>::call(void (QtInstanceButton::*)(), QtInstanceButton*, void**)::{lambda()#1}::operator()() const (this=0x7ffdc7bcd0b0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:128
    #48 0x00007fd37d66cc59 in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtInstanceButton::*)()>::call(void (QtInstanceButton::*)(), QtInstanceButton*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtInstanceButton::*)()>::call(void (QtInstanceButton::*)(), QtInstanceButton*, void**)::{lambda()#1}&&)
        (args=0x7ffdc7bcd490, fn=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:66
    #49 0x00007fd37d66cb8b in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtInstanceButton::*)()>::call(void (QtInstanceButton::*)(), QtInstanceButton*, void**)
        (f=(void (QtInstanceButton::*)(QtInstanceButton * const)) 0x7fd37d669b40 <QtInstanceButton::buttonClicked()>, o=0x55e1281056b0, arg=0x7ffdc7bcd490) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
    #50 0x00007fd37d66cb0d in QtPrivate::FunctionPointer<void (QtInstanceButton::*)()>::call<QtPrivate::List<>, void>(void (QtInstanceButton::*)(), QtInstanceButton*, void**)
        (f=(void (QtInstanceButton::*)(QtInstanceButton * const)) 0x7fd37d669b40 <QtInstanceButton::buttonClicked()>, o=0x55e1281056b0, arg=0x7ffdc7bcd490) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:175
    #51 0x00007fd37d66ca36 in QtPrivate::QCallableObject<void (QtInstanceButton::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
        (which=1, this_=0x55e1285a0ac0, r=0x55e1281056b0, a=0x7ffdc7bcd490, ret=0x0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:546
    #52 0x00007fd37c4ee572 in QtPrivate::QSlotObjectBase::call (this=0x55e1285a0ac0, r=0x55e1281056b0, a=0x7ffdc7bcd490) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:462
    #53 0x00007fd37c724c6c in doActivate<false> (sender=0x55e1283c55e0, signal_index=9, argv=0x7ffdc7bcd490) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4386
    #54 0x00007fd37c71af23 in QMetaObject::activate (sender=0x55e1283c55e0, m=0x7fd37b190f60 <QAbstractButton::staticMetaObject>, local_signal_index=2, argv=0x7ffdc7bcd490)
        at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4447
    #55 0x00007fd37a5a7bcb in QMetaObject::activate<void, bool> (sender=0x55e1283c55e0, mo=0x7fd37b190f60 <QAbstractButton::staticMetaObject>, local_signal_index=2, ret=0x0, args=@0x7ffdc7bcd4d7: false)
        at qtbase/src/corelib/kernel/qobjectdefs.h:320
    #56 0x00007fd37a803742 in QAbstractButton::clicked (this=0x55e1283c55e0, _t1=false) at qtbase/src/widgets/Widgets_autogen/include/moc_qabstractbutton.cpp:254
    #57 0x00007fd37a803657 in QAbstractButtonPrivate::emitClicked (this=0x55e128483d30) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qabstractbutton.cpp:382
    #58 0x00007fd37a8034af in QAbstractButtonPrivate::click (this=0x55e128483d30) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qabstractbutton.cpp:375
    #59 0x00007fd37a8049df in QAbstractButton::mouseReleaseEvent (this=0x55e1283c55e0, e=0x7ffdc7bce8a0) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qabstractbutton.cpp:984
    #60 0x00007fd37a673eed in QWidget::event (this=0x55e1283c55e0, event=0x7ffdc7bce8a0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:8993
    #61 0x00007fd37a8047fc in QAbstractButton::event (this=0x55e1283c55e0, e=0x7ffdc7bce8a0) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qabstractbutton.cpp:941
    #62 0x00007fd37a988051 in QPushButton::event (this=0x55e1283c55e0, e=0x7ffdc7bce8a0) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qpushbutton.cpp:697
    #63 0x00007fd37a5b2db0 in QApplicationPrivate::notify_helper (this=0x55e11e0d3900, receiver=0x55e1283c55e0, e=0x7ffdc7bce8a0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3264
    #64 0x00007fd37a5b4a4c in QApplication::notify (this=0x55e11e0792f0, receiver=0x55e1283c55e0, e=0x7ffdc7bce8a0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2744
    #65 0x00007fd37c63e8b9 in QCoreApplication::notifyInternal2 (receiver=0x55e1283c55e0, event=0x7ffdc7bce8a0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1117
    #66 0x00007fd37c63f5b9 in QCoreApplication::sendSpontaneousEvent (receiver=0x55e1283c55e0, event=0x7ffdc7bce8a0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1576
    #67 0x00007fd37a5b36d3 in QApplicationPrivate::sendMouseEvent
        (receiver=0x55e1283c55e0, event=0x7ffdc7bce8a0, alienWidget=0x55e1283c55e0, nativeWidget=0x55e124371270, buttonDown=0x7fd37b1cd6b0 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false)
        at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2343
    #68 0x00007fd37a6b373d in QWidgetWindow::handleMouseEvent (this=0x55e125710bd0, event=0x7ffdc7bcf998) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:696
    #69 0x00007fd37a6b1da7 in QWidgetWindow::event (this=0x55e125710bd0, event=0x7ffdc7bcf998) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:301
    #70 0x00007fd37a5b2db0 in QApplicationPrivate::notify_helper (this=0x55e11e0d3900, receiver=0x55e125710bd0, e=0x7ffdc7bcf998) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3264
    #71 0x00007fd37a5b6caf in QApplication::notify (this=0x55e11e0792f0, receiver=0x55e125710bd0, e=0x7ffdc7bcf998) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3214
    #72 0x00007fd37c63e8b9 in QCoreApplication::notifyInternal2 (receiver=0x55e125710bd0, event=0x7ffdc7bcf998) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1117
    #73 0x00007fd37c63f5b9 in QCoreApplication::sendSpontaneousEvent (receiver=0x55e125710bd0, event=0x7ffdc7bcf998) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1576
    #74 0x00007fd37b477f07 in QGuiApplicationPrivate::processMouseEvent (e=0x55e1281f8d90) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2513
    #75 0x00007fd37b477041 in QGuiApplicationPrivate::processWindowSystemEvent (e=0x55e1281f8d90) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2237
    #76 0x00007fd37b565bcd in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1112
    #77 0x00007fd37bdc179b in userEventSourceDispatch (source=0x55e11e0ed250) at /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:39
    #78 0x00007fd38150f68e in g_main_dispatch (context=context@entry=0x7fd370000fd0) at ../../../glib/gmain.c:3591
    #79 0x00007fd381512a1f in g_main_context_dispatch_unlocked (context=0x7fd370000fd0) at ../../../glib/gmain.c:4451
    #80 g_main_context_iterate_unlocked (context=context@entry=0x7fd370000fd0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:4516
    #81 0x00007fd3815131b0 in g_main_context_iteration (context=0x7fd370000fd0, may_block=1) at ../../../glib/gmain.c:4582
    #82 0x00007fd37ccd3c9b in QEventDispatcherGlib::processEvents (this=0x55e11e079ad0, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:402
    #83 0x00007fd37bdc1598 in QPAEventDispatcherGlib::processEvents (this=0x55e11e079ad0, flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:90
    #84 0x00007fd37d622092 in QtInstance::ImplYield (this=0x55e11e0d3580, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:467
    #85 0x00007fd37d625251 in QtInstance::DoYield (this=0x55e11e0d3580, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:478
    #86 0x00007fd386a28a26 in InnerYield (i_bWait=true, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:389
    #87 0x00007fd386a282af in Application::Yield () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:502
    #88 0x00007fd386a28090 in Application::Execute () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:364
    #89 0x00007fd39011f0f5 in desktop::Desktop::Main (this=0x7ffdc7bd1b40) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1679
    #90 0x00007fd386a51c0c in ImplSVMainRun () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:234
    #91 0x00007fd37d62d751 in SalInstance::SVMainRun (this=0x55e11e0d3590) at vcl/inc/salinst.hxx:108
    #92 0x00007fd386a51132 in ImplSVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:221
    #93 0x00007fd386a52cc9 in SVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:252
    #94 0x00007fd39019916a in soffice_main () at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:122
    #95 0x000055e0e26279fd in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51
    #96 0x000055e0e26279d7 in main (argc=2, argv=0x7ffdc7bd1d48) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49

Change-Id: Idc24e1eacdb512ec288476712a53fd5dc606f246
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207156
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-23 11:49:50 +02:00
Michael Weghorn ea3d884876 gtk weld: Only use first toggle col for special expander toggle col
If both, the special toggle and the special pixbuf
expander renderers (to be accessed with column index -1
in the weld API) are used, the toggle one should be first.

Existing cases where that was not the case were changed
accordingly and a check for the UI rules enforcer was
introduced in previous commit

    Change-Id: I1f7c8c6456ed2e8ba4d8018d69fb12b40204536a
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Jun 18 17:25:19 2026 +0200

        ui-rules-enforcer: Check special treeview expander column order

(See that commit for more details.)

Therefore, no longer handle the second renderer
in a special way any more if it is a toggle column
following a pixbuf column in the gtk implementation.

(No change in behavior expected.)

Change-Id: I481deb5d4bef2835e4ce1f49116cbc6bffc61983
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207029
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-22 07:48:21 +02:00
Michael Weghorn af488e86dc gtk: Merge {GtkInstanceTreeView::,}get_height_rows
Merge the static helper function into the only caller.

Change-Id: If095f9e378c1868a403d7716944895f93432b527
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206274
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-10 09:46:56 +02:00
Michael Weghorn a8f7a771fd weld: Drop weld::IconView::connect_get_image
This used to be used for jsdialog, but the logic is now
unused, see previous commit

    Change-Id: Ie06dadfcc096e5efc742d7bdf8c6d0239c8c45b9
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Jun 4 16:51:30 2026 +0200

        vcl weld: Drop IconView::maDumpImageHdl + related logic

that dropped the only caller of weld::IconView::m_aGetPropertyTreeElemHdl
that is set by weld::IconView::connect_get_image.

Drop the method and member and the only caller in
StylesPreviewWindow_Base, as well as logic only
used by that one.

Further cleanup can happen in upcoming commits.

Change-Id: I919c65b36429b0100141040d2539776398942b66
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206005
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-05 07:59:46 +02:00
Michael Weghorn a8f1fa9240 weld: Drop unused methods in toolkit-specific weld::Widget subclasses
All of these used to override purely virtual methods
in the corresponding abstract weld::Widget subclasses
that were dropped in

    commit 6f81bce807
    Date:   Wed Jun 3 12:34:28 2026 +0200

        loplugin:unusedmethods

Since they have no meaning/use by themselves, drop them
as well.
(Should they become relevant again in the future, these
implementations can be brought back then,
along with the purely virtual methods in their
abstract base classes.)

Change-Id: I3926016119828d10af125a397ef36c48ec518fe5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205999
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-05 07:59:25 +02:00
Michael Weghorn 686e746e85 vcl/weld: Drop unused nLOKWindowId param for CreateInterimBuilder
This param was only used by the JSInstanceBuilder implementation,
but that one was dropped in

    commit 8a91868e21
    Date:   Tue Jun 2 14:53:19 2026 +0200

        drop JSDialog machinery

in the meantime, so drop the param altogether.

Further cleanup will follow in an upcoming commit.

Change-Id: Iec0a3db8c1777b5520693b29978c837dc490f7c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205950
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-05 07:58:44 +02:00
Michael Weghorn f26084217a weld: Move weld::Button to own header/Rename weld.hxx
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
2026-06-05 07:58:07 +02:00
Michael Weghorn 8b5a46a0e0 weld: Move weld::toId and weld::fromId to weldutils.hxx
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>
2026-06-04 14:37:13 +02:00