Commit Graph
100 Commits
Author SHA1 Message Date
Michael Weghorn 44c4acdc3b rust_uno: Don't delete Cargo.lock on clean
Since

    commit 64510d3c8e
    Date:   Mon Feb 2 13:08:15 2026 +0100

        rust_uno : Cargo.lock must be in the git repository

, Cargo.lock is under version control and no longer
generated during the build.

Therefore, also no longer delete it on

    make rust_uno.clean

(Mentioned also as a problem by Christian Lohmaier
in the Gerrit change for the above commit, see [1].)

[1] https://gerrit.libreoffice.org/c/core/+/198541/comments/3ca5a9a2_4be61700

Change-Id: I6583e1ba246b8f73f12f0ee72d1b37eb6ba874f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208781
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-29 16:27:12 +02:00
Michael Weghorn 6f8dd9ef68 sd: Drop unused factory in PresenterPaneFactory::CreatePane
Change-Id: I0364efe16ec41f1f73de023c0d0528e2eb421102
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208760
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-29 09:04:51 +02:00
Michael Weghorn fe4b140c7a sd: Return more specific type in PresenterPaneFactory::CreatePane
Return an rtl::Reference<PresenterPaneBase> instead of one for the
AbstractResource base class only.

Change-Id: I744bc3870917abf8928fbc85b0b2cdd7f5c72ef3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208759
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-29 09:04:46 +02:00
Michael Weghorn 13f1bff560 sd: Drop obsolete check for factory in PresenterSlidePreview ctor
The SlideRenderer is no longer created using that factory since

    commit af60b4cb84
    Date:   Sat Jun 14 14:08:13 2025 +0200

        no need for SlideRenderer to be an UNO service anymore

, so also drop the corresponding check whether the factory exists.

Change-Id: Ied2325534a28aa1484dbd4d3de63479360e200da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208758
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-29 09:04:40 +02:00
Michael Weghorn a8e8ff5dcc sd: Move some presenter console helper classes to Library_sdui
These classes are only used by the presenter console
implementation in sd/source/console/, so move the
classes there as well, which implies moving them
from Library_sd to Library_sdui and no longer having
to have PresenterHelper.hxx in an sd-wide internal
include directory and there is no more need for
PresenterHelper to be SD_DLLPUBLIC.

In other words: Make clear these are implementation
details of the presenter console, and not used
elsewhere.

Change-Id: Ica2a516215344360f647c121b5f0942a67f54ea3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208744
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-28 23:36:25 +02:00
Michael Weghorn 1f1ba33a82 tdf#172275 tdf#172831 vcl: Drop obsolete "sfxlo-OptionalBox" workaround
This workaround was introduced in

    commit f9eea76438
    Date:   Mon Aug 10 15:55:50 2020 +0100

        tdf#135495 builder file format has annoyingly escaped into user config

, but is no longer needed now that obsolete .ui files for
the Notebookbar are no longer read from the user profile since

    Change-Id: I35ab9f4254050262e18470befd03c921cce92c76
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Jul 27 13:46:40 2026 +0200

        tdf#172275 tdf#172831 vcl: Stop loading customized NotebookBar .ui file

(The discussion in tdf#135495 already mentioned
problems with the previous Notebookbar customization
approach relying on modified .ui files and how
a better solution should be found. Potential alternatives
are discussed in the context of tdf#172275 now.)

Change-Id: I76b7ec75a453ff654acbccba687e046f17be485b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208675
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-28 23:21:05 +02:00
Michael Weghorn eeeaa9057d tdf#172275 tdf#172831 vcl: Stop loading customized NotebookBar .ui file
Commit

    commit 7312d7d3c9
    Date:   Wed May 20 15:28:42 2026 +0200

        Relates tdf#166641 - Add category labels to Writer's Tabbed Notebookbar

        * gla11y-conform
        * consistent IDs (gd*/lb* and btn*/bx*)
        * consistent layout with grids
        * defined spacing of 3px
        * defined margins of 6px
        * category labels
        * redundant Insert sections from Home and Forms from Tools removed
        * customization of Notebookbars removed since the new position
        of commands is not properly found

had dropped the possibility to customize the NotebookBar
via a "Notebookbars" tab in the the "Tools" -> "Customize..." dialog.

This was creating modified .ui files for the NotebookBar
in the user configuration/profile directory, and if such were
present, they would be loaded instead of the standard .ui file.

Now that creating such files is no longer supported, also
drop the logic to load such files from the user profile.

This will also allow dropping various old workarounds
in the VclBuilder implementation again.

The approach used for NotebookBar customization so
far had multiple problems because it
relied on internal implementation details of how
LibreOffice's UI is created from .ui files using
weld::Builder/VclBuilder, which is an internal implementation
detail and subject to change, not something anything should rely
on to work across multiple LO versions.
Keeping this somewhat working already required multiple
workarounds in the past, e.g.

    commit f14a738fa8c5579c2ef8cb8387b771e94ea5bdfe
    Date:   Mon Aug 10 15:55:50 2020 +0100

        tdf#135495 builder file format has annoyingly escaped into user config

Any later changes to Notebookbar .ui files would simply be
ignored, so later updates to the LibreOffice-provided NotebookBar
would no longer be applied. Also, e.g. an update in translated
strings would result in localization no longer working for the
"outdated" copy in the user configuration, see tdf#172831
(in particular comments 30, 32 and 33).

There's even no guarantee that such .ui files
still work at all with the current Builder logic. I.e.
trying to use my existing (a couple of years old, automatically
migrated from earlier LO versions in the past) user profile on
Debian testing with a current master debug build would result in
this assertion being triggered:

    soffice.bin: /home/michi/development/git/libreoffice/vcl/source/window/window2.cxx:1628: virtual bool vcl::Window::set_property(const OUString &, const OUString &): Assertion `rKey == "margin-start" && "margin-left deprecated in favor of margin-start"' failed.

Change-Id: I35ab9f4254050262e18470befd03c921cce92c76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208674
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2026-07-28 23:20:58 +02:00
Michael Weghorn 3aad0eac0e tdf#172275 tdf#172831 cui: Drop unused CustomNotebookbarGenerator
This class is unused now after

    Change-Id: If15d1519cea179596bd72aaf5354d01f89ccb9e7
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Jul 27 13:38:37 2026 +0200

        tdf#172275 tdf#172831 cui: Drop unused SvxConfigPage::m_s{App,File}Name

Drop it.

Change-Id: Ic670d1db42f2262ee67d87b84819bf0aab8d9c30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208673
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-28 23:20:51 +02:00
Michael Weghorn 38f1a7768c tdf#172275 tdf#172831 cui: Drop unused SvxConfigPage::m_s{App,File}Name
The getters for these members are no longer used since

    Change-Id: I45bcbdcbf89d8f50b18512cde81d7af26e52a2a2
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Jul 27 13:12:52 2026 +0200

        tdf#172275 tdf#172831 Drop unused SvxNotebookbarConfigPage

and the members are not used inside the class (except for assigning
a value to them) either, so drop them.

Change-Id: If15d1519cea179596bd72aaf5354d01f89ccb9e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208672
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-28 23:20:44 +02:00
Michael Weghorn 6864d76c2a tdf#172275 tdf#172831 Drop unused CustomNotebookbarGenerator::get*UIPath
These are unused now after

    Change-Id: I3a07781df97cec9bc4f449aaee758dc73fa97157
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Jul 27 13:31:37 2026 +0200

        tdf#172275 tdf#172831 Drop more unused CustomNotebookbarGenerator methods

Change-Id: Ia2fe4b814d15be96cd68b3b425c6deed16a664a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208671
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-28 23:20:37 +02:00
Michael Weghorn 97b205db7a tdf#172275 tdf#172831 Drop more unused CustomNotebookbarGenerator methods
These methods are no longer needed after

    Change-Id: I45bcbdcbf89d8f50b18512cde81d7af26e52a2a2
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Jul 27 13:12:52 2026 +0200

        tdf#172275 tdf#172831 Drop unused SvxNotebookbarConfigPage

Change-Id: I3a07781df97cec9bc4f449aaee758dc73fa97157
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208670
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-28 23:20:28 +02:00
Michael Weghorn dd24135865 tdf#172275 tdf#172831 Drop unused CustomNotebookbarGenerator methods
CustomNotebookbarGenerator::modifyCustomizedUIFile is unused now
after

    Change-Id: I45bcbdcbf89d8f50b18512cde81d7af26e52a2a2
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Jul 27 13:12:52 2026 +0200

        tdf#172275 tdf#172831 Drop unused SvxNotebookbarConfigPage

. Drop it, and also the then also unused
CustomNotebookbarGenerator::getSystemPath and static
local helper functions.

Change-Id: Ia231effca982405e5e8b88af1c6e6805de7bd770
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208669
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-28 23:20:14 +02:00
Michael Weghorn 968bc97a37 tdf#172275 tdf#172831 Drop unused SvxNotebookbarConfigPage
SvxNotebookbarConfigPage is unused since

    commit 7312d7d3c9
    Date:   Wed May 20 15:28:42 2026 +0200

        Relates tdf#166641 - Add category labels to Writer's Tabbed Notebookbar

        * gla11y-conform
        * consistent IDs (gd*/lb* and btn*/bx*)
        * consistent layout with grids
        * defined spacing of 3px
        * defined margins of 6px
        * category labels
        * redundant Insert sections from Home and Forms from Tools removed
        * customization of Notebookbars removed since the new position
        of commands is not properly found

and its ctor was dropped in

    commit 00aebb5e88
    Date:   Fri Jun 26 18:55:24 2026 +0200

        loplugin:unusedmethods

. Drop the class altogether, along with the code
commented out since the above commit that would
have used it.

Change-Id: I45bcbdcbf89d8f50b18512cde81d7af26e52a2a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208668
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-28 23:20:07 +02:00
Michael Weghorn b6c6d25dc2 sfx2: Drop obsolete LibreOfficeKit checks in SfxNotebookBar
The comphelper::LibreOfficeKit::isActive() case in
SfxNotebookBar was only relevant for Collabora Online,
see e.g.

    commit 6bf428d354
    Date:   Sat Nov 4 12:05:16 2023 +0100

        lok: notebookbar: handle multiple sessions

That one isn't using this repo anymore, so drop these
now obsolete checks.

Change-Id: I3d364b17aa77eeb0b416b7de1f8db34bef6e86ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208657
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-28 23:20:00 +02:00
Michael Weghorn d9606662e5 sfx2: Drop duplicate LOK check in SfxNotebookBar::StateMethod
Since

    commit 8754a75d98
    Date:   Tue Jun 2 14:47:57 2026 +0200

        vcl: drop WeldedTabbedNotebookbar

, the if block that this code is in is only entered for the
`!bIsLOK" case`, so there is no need to check that inside
of the block again.

Drop the duplicate check.

Change-Id: If0f769ca4204b5219be3d4434f04651352410f2a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208656
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-28 23:19:41 +02:00
Michael Weghorn 24ce1d9341 sfx2: Avoid duplicate string concatenation in SfxNotebookBar::StateMethod
Local variable `sNewFile` already holds the string
concatenated from `rUIFile` and `sFile`, so reuse
that one instead of having `aBuf` as another local
variable with the same value.

Make a few local vars const to make clear that
the values are indeed the same and the vars
can't have changed in the meantime.

Change-Id: I8eae7912eae037c94c095886eded2b0fea65df93
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208655
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-28 23:19:33 +02:00
Michael Weghorn 434f2f3616 tdf#130857 Define widgets in Calc "Solver" dialog in order
Switch the order in which the widgets in the .ui file
are defined so that the order better matches the visual appearance
and logical order, which makes sure that tab focus order with the
Qt-based VCL plugins is correct as well when using native Qt
widgets (SAL_VCL_QT_USE_WELDED_WIDGETS=1), where
focus order is (by default) based on widget creation order.

See

    commit 02692566ad
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Oct 24 17:43:35 2024 +0200

        tdf#130857 optnewdictionarydialog.ui: Define focusable widgets in order

for more background.

The dialog can e.g. be triggered like this:

* start Calc
* insert following values into the spreadsheet:
    * A1: "1"
    * A3: "=A1"
* "Tools" -> "Solver..."

The Python script mentioned in the commit message of

    commit 327679b2fb
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jul 8 15:50:59 2026 +0200

        tdf#130857 Define widgets in Calc "General" options page in order

was used to reorder the GtkGrid children automatically.

Change-Id: I2b510d55c1129c6d3dcbb5bcbaabbc1cf1f46af5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208597
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-28 09:59:43 +02:00
Michael Weghorn ec213ab97f tdf#130857 qt weld: Support Calc "Solving Result" dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can e.g. be triggered like this:

* start Calc
* insert following values into the spreadsheet:
    * A1: "1"
    * A3: "=A1"
* "Tools" -> "Solver..."
* in the "Solver" dialog, set the following values:
    * Target cell: "$A$3"
    * Optmize result to: "Value of 10"
    * By changing cells: "$A$1"
* press the "Solve" button

Change-Id: I926ab1f521ba3a4c91ca0aee224925b65c4eb80b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208596
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-28 09:59:34 +02:00
Michael Weghorn 089447d6a0 tdf#130857 qt weld: Support Calc "Solving..." dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can e.g. be triggered like this:

* apply this local change to run the dialog synchronously:

    diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx
    index d499332eaf2e..1f9c91e81675 100644
    --- a/sc/source/ui/miscdlgs/optsolver.cxx
    +++ b/sc/source/ui/miscdlgs/optsolver.cxx
    @@ -940,7 +940,7 @@ bool ScOptSolverDlg::CallSolver()       // return true -> close dialog after cal
         else
             xProgress->HideTimeLimit();

    -    weld::DialogController::runAsync(xProgress, [](sal_Int32 /*nResult*/){});
    +    xProgress->run();

         // try to make sure the progress dialog is painted before continuing
         Application::Reschedule(true);

* start Calc
* insert following values into the spreadsheet:
    * A1: "1"
    * A3: "=A1"
* "Tools" -> "Solver..."
* in the "Solver" dialog, set the following values:
    * Target cell: "$A$3"
    * Optmize result to: "Value of 10"
    * By changing cells: "$A$1"
* press the "Solve" button

Change-Id: I528f4128706f9168f86c00d2b670d73b828d265b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208595
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-28 09:59:26 +02:00
Michael Weghorn 1097f14da8 tdf#130857 qt weld: Support Calc "No Solution" dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can e.g. be triggered like this:

* start Calc
* insert following values into the spreadsheet:
    * A1: 1
    * A2: 2
    * A3: 3
* "Tools" -> "Solver..."
* in the "Solver" dialog, set the following values:
    * Target cell: "$A$1"
    * By changing cells: "$A$1:$A$3"
* press the "Solve" button

Change-Id: Ic370d4e2f7d39b232fd10b2027a5ac15f7ef6767
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208594
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-28 09:59:19 +02:00
Michael Weghorn 430c487572 tdf#130857 sc: Don't set mnemonic character without mnemonic widget
In Calc's "Solver" dialog, don't set a mnemonic
character by enabling the GtkLabel::use-underline
property and using "_" to indicate the mnemonic
character in the label's text if there is no
mnemonic label.

The purpose of the mnemonic character is to be
able to move focus to the mnemonic widget using
Alt+<character>, but since there is no such
widget, there is no need for a mnemonic character
either.

For the qt6 vcl plugin with native widgets in use
(SAL_VCL_QT_USE_WELDED_WIDGETS=1), setting a mnemonic
character without a mnemonic widget would result
in the text being shown as literal
"&Cell reference", "&Operator" and "V&alue".

The dialog can be triggered like this:

* start Calc
* "Tools" -> "Solver..."

Change-Id: Id3ea1ee7e921a1258a15fd3c9a8d9f7e24a02bfd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208593
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-28 09:59:12 +02:00
Michael Weghorn 60960cbc06 tdf#130857 qt weld: Support Calc "Solver" dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can be triggered like this:

* start Calc
* "Tools" -> "Solver..."

Change-Id: I72462350b92d9802a4c0f487c81c6b0e69bff105
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208592
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-28 09:59:05 +02:00
Michael Weghorn eecc06522e tdf#130857 Define widgets in Calc "Goal Seek" dialog in order
Switch the order in which the widgets in the .ui file
are defined so that the order better matches the visual appearance
and logical order, which makes sure that tab focus order with the
Qt-based VCL plugins is correct as well when using native Qt
widgets (SAL_VCL_QT_USE_WELDED_WIDGETS=1), where
focus order is (by default) based on widget creation order.

See

    commit 02692566ad
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Oct 24 17:43:35 2024 +0200

        tdf#130857 optnewdictionarydialog.ui: Define focusable widgets in order

for more background.

The dialog can be triggered like this:

* start Calc
* "Tools" -> "Goals Seek..."

The Python script mentioned in the commit message of

    commit 327679b2fb
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jul 8 15:50:59 2026 +0200

        tdf#130857 Define widgets in Calc "General" options page in order

was used to reorder the GtkGrid children automatically.

Change-Id: I8473e34bd5e9a417e87622b9620bfaa802ee7f12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208591
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-28 09:58:58 +02:00
Michael Weghorn 6f380fb1dc tdf#130857 qt weld: Support Calc "Goal Seek" dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can be triggered like this:

* start Calc
* "Tools" -> "Goals Seek..."

Change-Id: I33f8e7dc3042a536b3635d5a2c635b464ce4e7eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208590
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-28 09:58:51 +02:00
Michael Weghorn 322359e36e sc: Resave goalseekdlg.ui with glade 3.40
The dialog can be triggered like this:

* start Calc
* "Tools" -> "Goals Seek..."

Change-Id: I12424abb279753b13e6b296bbb671033920c5624
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208589
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-28 06:45:05 +02:00
Michael Weghorn 210054797e tdf#130857 qt weld: Support AutoCorrect options "Options" page
This means that native Qt widgets are used for this tab page
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The tab page can be triggered like this:

* start Calc
* "Tools" -> "AutoCorrect Options..."
* switch to the "Options" tab page

Without this commit, the page content would be missing
for this tab page.

Change-Id: I8c34a8bfc409358b1c3032a692e89d571c76f899
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208588
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-28 06:44:58 +02:00
Michael Weghorn d032dcb377 tdf#130857 qt weld: Support Calc "Insert Calculated Field" dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can be triggered like this:

* 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"

Change-Id: Idbdb30be3fbcb031e5a0f0afb2ddf5b3064f3778
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208573
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-27 20:21:48 +02:00
Michael Weghorn 7427ad7fc6 weld: Drop duplicate weld:: namespace specifier
These method implementations are already inside of a

     namespace weld
     {
         ...
     }

block, so no need to specify the namespace again.

Change-Id: I36cfcf629f1018439b410921d38fbaf80847f43b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208572
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-27 20:21:41 +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
Michael Weghorn dbe7f551d3 sc: Merge ScPivotCalcFieldDlg::Init into ctor
Change-Id: I8147477d76c84090fe4bcc48fd35c838e6e8c8c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208570
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-27 20:21:25 +02:00
Michael Weghorn 5768d97d37 tdf#130857 qt weld: Work around Qt Wayland bug QTBUG-148561
Add a workaround for QTBUG-148561 [1]
("Wayland: QApplication::activeWindow returns previously active window
in QApplication::focusChanged callback"):
If there is a focus widget, manually check whether
it is in the window in
QtInstanceWindow::has_toplevel_focus.

Only fall back to calling QApplication::activeWindow
and checking whether is the own window otherwise.

This fixes/works around the issue mentioned for Calc's
"Advanced Filter" dialog on Wayland in previous commit

    Change-Id: I0ae83f509ea54fbc50fe596edb5ce3e46a5d1cc4
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Fri Jul 24 13:19:32 2026 +0200

        tdf#130857 qt weld: Support Calc "Advanced Filter" dialog

:

> The dialog works fine in a quick test with Qt's xcb
> QPA plugin on Linux (i.e. either in an X11 session or
> forced in a Wayland session using QT_QPA_PLATFORM=xcb).
>
> On native Wayland, there is an issue that pressing the
> "Shrink" button and then trying to select a cell area
> in the document by clicking into the document and
> moving the mouse pointer while pressing it doesn't work.
>
> From a first analysis, this is because in
>
>     void ScSpecialFilterDlg::RefInputHdl()
>     {
>         if (!m_xDialog->has_toplevel_focus())
>             return;
>
>     // ...
>     else if (m_bRefInputMode)
>     {
>         m_pRefInputEdit = nullptr;
>         m_bRefInputMode = false;
>     }
> }
>
> , the call to QtInstanceWindow::has_toplevel_focus
> at the beginning incorrectly returns true, indicating the
> dialog still has toplevel focus after clicking into the
> document window, resulting in
> ScSpecialFilterDlg::m_bRefInputMode getting set to false,
> so ScSpecialFilterDlg::IsRefInputMode will then return
> false and selecting a cell area is not enabled.
>
> As far as I can see, this is a Qt Wayland bug,
> newly reported upstream as QTBUG-148561 [1].
> An upcoming commit will introduce a workaround.
>
> [1] https://qt-project.atlassian.net/browse/QTBUG-148561

[1] https://qt-project.atlassian.net/browse/QTBUG-148561

Change-Id: I56bfb7e9a022d991006e0dfa5ec14f1cc5987c52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208569
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-27 20:21:18 +02:00
Michael Weghorn 1e1d94e929 tdf#130857 qt weld: Support Calc "Advanced Filter" dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can be triggered like this:

* start Calc
* "Data" -> "More Filters" -> "Advanced Filter..."

The dialog works fine in a quick test with Qt's xcb
QPA plugin on Linux (i.e. either in an X11 session or
forced in a Wayland session using QT_QPA_PLATFORM=xcb).

On native Wayland, there is an issue that pressing the
"Shrink" button and then trying to select a cell area
in the document by clicking into the document and
moving the mouse pointer while pressing it doesn't work.

From a first analysis, this is because in

    void ScSpecialFilterDlg::RefInputHdl()
    {
        if (!m_xDialog->has_toplevel_focus())
            return;

    // ...
    else if (m_bRefInputMode)
    {
        m_pRefInputEdit = nullptr;
        m_bRefInputMode = false;
    }
}

, the call to QtInstanceWindow::has_toplevel_focus
at the beginning incorrectly returns true, indicating the
dialog still has toplevel focus after clicking into the
document window, resulting in
ScSpecialFilterDlg::m_bRefInputMode getting set to false,
so ScSpecialFilterDlg::IsRefInputMode will then return
false and selecting a cell area is not enabled.

As far as I can see, this is a Qt Wayland bug,
newly reported upstream as QTBUG-148561 [1].
An upcoming commit will introduce a workaround.

[1] https://qt-project.atlassian.net/browse/QTBUG-148561

Change-Id: I0ae83f509ea54fbc50fe596edb5ce3e46a5d1cc4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208568
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-27 20:21:11 +02:00
Michael Weghorn 954fd472f2 sc: Pass ScSpecialFilterDlg's SfxBindings param by ref
It's always non-null.

Change-Id: Ic5c06a2240a2eba43f780f220d7121cd35bf3c1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208567
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-27 20:21:04 +02:00
Michael Weghorn 76b8b85f6e sc: Add missing weld includes in filtdlg.hxx
This addresses various errors like

    filtdlg.hxx:89:23: No member named 'ComboBox' in namespace 'weld'

shown in Qt Creator.
(They probably didn't result in build failures
due to anything including that header already
including the necessary includes before this one,
but that shouldn't be necessary.)

Change-Id: Ia92da0a4b2a29435fc2daf907d509cf684967b7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208566
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-27 20:20:58 +02:00
Michael Weghorn 1d76d4cab0 sc: Prefix ScSpecialFilterDlg members with "m_"
Add the usual "m_" naming prefix for those
ScSpecialFilterDlg members that don't have it yet,
to distinguish them from local variables.

Change-Id: I6b9d59b2f5742380383fb2686af8e44e83c1d9a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208565
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-27 20:20:51 +02:00
Michael Weghorn 6dfa5fdfbe sc: Resave advancedfilterdialog.ui with glade 3.40
The dialog can be triggered like this:

* start Calc
* "Data" -> "More Filters" -> "Advanced Filter..."

Change-Id: Ie2520314aa89da9cf40ba0a5857e1ca5c5ee3716
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208564
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-27 20:20:41 +02:00
Michael Weghorn 6a200d70fb tdf#130857 Define widgets in Calc "Standard Filter" dialog in order
Switch the order in which the widgets in the .ui file
are defined so that the order better matches the visual appearance
and logical order, which makes sure that tab focus order with the
Qt-based VCL plugins is correct as well when using native Qt
widgets (SAL_VCL_QT_USE_WELDED_WIDGETS=1), where
focus order is (by default) based on widget creation order.

See

    commit 02692566ad
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Oct 24 17:43:35 2024 +0200

        tdf#130857 optnewdictionarydialog.ui: Define focusable widgets in order

for more background.

The dialog can be triggered like this:

* start Calc
* "Data" -> "More Filters" -> "Standard Filter..."

The Python script mentioned in the commit message of

    commit 327679b2fb
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jul 8 15:50:59 2026 +0200

        tdf#130857 Define widgets in Calc "General" options page in order

was used to reorder the GtkGrid children automatically.

Change-Id: I50fb6a05b3b235122a0ba65732d98a7c32ee78a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208563
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-27 20:20:33 +02:00
Michael Weghorn aa8adf91fe tdf#130857 qt weld: Support Calc "Standard Filter" dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can be triggered like this:

* start Calc
* "Data" -> "More Filters" -> "Standard Filter..."

Change-Id: I5343f2d06e05cf8e78c6c7056619f0c53dca73ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208562
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-27 20:20:25 +02:00
Michael Weghorn d041260606 tdf#130857 sc: Connect signal handlers after inserting/removing dummy entry
Only connect signal handlers after having determined
and set the preferred width of the combobox based
on a dummy entry that is inserted, then removed again
after determining the width required for its text.

This prevents a crash seen with the qt6 vcl plugin
and native Qt widgets (for which support will be declared
in an upcoming commit) when starting the "Standard Filter"
dialog due to the removal of the dummy
entry emitting the signal that the currently active
entry has changed, and the handler trying to access
a vector element that is only inserted later in
ScFilterDlg::Init.

    /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/debug/vector:523:
    In function:
        reference std::vector<weld::ComboBox *>::operator[](size_type) [_Tp =
        weld::ComboBox *, _Allocator = std::allocator<weld::ComboBox *>]

    Error: attempt to subscript container with out-of-bounds index 0, but
    container only holds 0 elements.

    Objects involved in the operation:
        sequence "this" @ 0x562b299ef400 {
          type = std::debug::vector<weld::ComboBox*, std::allocator<weld::ComboBox*> >;
        }

An alternative solution could be to block signals
when calling weld::ComboBox::clear.

The dialog can be triggered like this:

* start Calc
* "Data" -> "More Filters" -> "Standard Filter..."

Backtrace:

    1 __pthread_kill_implementation pthread_kill.c 44 0x7f19f2aa11dc
    2 __pthread_kill_internal pthread_kill.c 89 0x7f19f2aa129f
    3 __GI_raise raise.c 26 0x7f19f2a4a842
    4 __GI_abort abort.c 77 0x7f19f2a324b2
    5 __gnu_debug::_Error_formatter::_M_error() const gdb 0x7f19f26acc81
    6 std::vector<weld::ComboBox *>::operator[] vector 523 0x7f199b297823
    7 ScFilterDlg::UpdateValueList filtdlg.cxx 487 0x7f199b28ff99
    8 ScFilterDlg::LbSelectHdl filtdlg.cxx 967 0x7f199b2946a2
    9 ScFilterDlg::LinkStubLbSelectHdl filtdlg.cxx 853 0x7f199b28f71d
    10 Link<weld::ComboBox&, void>::Call link.hxx 105 0x7f19dfc86191
    11 weld::ComboBox::signal_changed ComboBox.hxx 71 0x7f19dfc85da8
    12 QtInstanceComboBox::signalChanged QtInstanceComboBox.cxx 431 0x7f19dfc7a26d
    13 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 0x7f19dfc865b1
    14 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 0x7f19dfc864e9
    15 QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtInstanceComboBox:: *)()>::call(void (QtInstanceComboBox:: *)(), QtInstanceComboBox *, void * *) qobjectdefs_impl.h 127 0x7f19dfc8641b
    16 QtPrivate::FunctionPointer<void (QtInstanceComboBox:: *)()>::call<QtPrivate::List<>, void>(void (QtInstanceComboBox:: *)(), QtInstanceComboBox *, void * *) qobjectdefs_impl.h 175 0x7f19dfc8639d
    17 QtPrivate::QCallableObject<void (QtInstanceComboBox:: *)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void * *, bool *) qobjectdefs_impl.h 546 0x7f19dfc862c6
    18 QtPrivate::QSlotObjectBase::call qobjectdefs_impl.h 462 0x7f19deaefbf2
    19 doActivate<false> qobject.cpp 4406 0x7f19ded261ac
    20 QMetaObject::activate qobject.cpp 4467 0x7f19ded1c153
    21 QMetaObject::activate<void, QString> qobjectdefs.h 320 0x7f19dcc8840b
    22 QComboBox::currentTextChanged moc_qcombobox.cpp 374 0x7f19dce468b1
    23 QComboBoxPrivate::updateCurrentText qcombobox.cpp 3203 0x7f19dce43d1d
    24 QComboBoxPrivate::emitCurrentIndexChanged qcombobox.cpp 1696 0x7f19dce43ffe
    25 QComboBoxPrivate::setCurrentIndex qcombobox.cpp 2473 0x7f19dce3f05b
    26 QComboBoxPrivate::rowsRemoved qcombobox.cpp 1427 0x7f19dce441ef
    27 QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, QtPrivate::List<QModelIndex const&, int, int>, void, void (QComboBoxPrivate:: *)(QModelIndex const&, int, int)>::call(void (QComboBoxPrivate:: *)(QModelIndex const&, int, int), QComboBoxPrivate *, void * *)::{lambda()#1}::operator()() const qobjectdefs_impl.h 128 0x7f19dce5dca2
    28 QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, QtPrivate::List<QModelIndex const&, int, int>, void, void (QComboBoxPrivate:: *)(QModelIndex const&, int, int)>::call(void (QComboBoxPrivate:: *)(QModelIndex const&, int, int), QComboBoxPrivate *, void * *)::{lambda()#1}>(void * *, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, QtPrivate::List<QModelIndex const&, int, int>, void, void (QComboBoxPrivate:: *)(QModelIndex const&, int, int)>::call(void (QComboBoxPrivate:: *)(QModelIndex const&, int, int), QComboBoxPrivate *, void * *)::{lambda()#1}&&) qobjectdefs_impl.h 66 0x7f19dce5dbfd
    29 QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, QtPrivate::List<QModelIndex const&, int, int>, void, void (QComboBoxPrivate:: *)(QModelIndex const&, int, int)>::call qobjectdefs_impl.h 127 0x7f19dce5dbb7
    30 QtPrivate::FunctionPointer<void (QComboBoxPrivate:: *)(QModelIndex const&, int, int)>::call<QtPrivate::List<QModelIndex const&, int, int>, void> qobjectdefs_impl.h 175 0x7f19dce5db21
    31 QtPrivate::QPrivateSlotObject<void (QComboBoxPrivate:: *)(QModelIndex const&, int, int), QtPrivate::List<QModelIndex const&, int, int>, void>::impl qobject_p.h 273 0x7f19dce5da50
    32 QtPrivate::QSlotObjectBase::call qobjectdefs_impl.h 462 0x7f19deaefbf2
    33 doActivate<false> qobject.cpp 4406 0x7f19ded261ac
    34 QMetaObject::activate qobject.cpp 4467 0x7f19ded1c153
    35 QMetaObject::activate<void, QModelIndex, int, int, QAbstractItemModel::QPrivateSignal> qobjectdefs.h 320 0x7f19df1cfbd5
    36 QAbstractItemModel::rowsRemoved moc_qabstractitemmodel.cpp 700 0x7f19df1c403a
    37 QAbstractItemModel::endRemoveRows qabstractitemmodel.cpp 3036 0x7f19df1c3fb6
    38 QSortFilterProxyModelPrivate::remove_proxy_interval qsortfilterproxymodel.cpp 822 0x7f19df26f570
    39 QSortFilterProxyModelPrivate::remove_source_items qsortfilterproxymodel.cpp 789 0x7f19df26f3e9
    40 QSortFilterProxyModelPrivate::source_items_about_to_be_removed qsortfilterproxymodel.cpp 1092 0x7f19df2712f0
    41 QSortFilterProxyModelPrivate::_q_sourceRowsAboutToBeRemoved qsortfilterproxymodel.cpp 1817 0x7f19df274721
    42 QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, QtPrivate::List<QModelIndex const&, int, int>, void, void (QSortFilterProxyModelPrivate:: *)(QModelIndex const&, int, int)>::call(void (QSortFilterProxyModelPrivate:: *)(QModelIndex const&, int, int), QSortFilterProxyModelPrivate *, void * *)::{lambda()#1}::operator()() const qobjectdefs_impl.h 128 0x7f19df2b9822
    43 QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, QtPrivate::List<QModelIndex const&, int, int>, void, void (QSortFilterProxyModelPrivate:: *)(QModelIndex const&, int, int)>::call(void (QSortFilterProxyModelPrivate:: *)(QModelIndex const&, int, int), QSortFilterProxyModelPrivate *, void * *)::{lambda()#1}>(void * *, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, QtPrivate::List<QModelIndex const&, int, int>, void, void (QSortFilterProxyModelPrivate:: *)(QModelIndex const&, int, int)>::call(void (QSortFilterProxyModelPrivate:: *)(QModelIndex const&, int, int), QSortFilterProxyModelPrivate *, void * *)::{lambda()#1}&&) qobjectdefs_impl.h 66 0x7f19df2b977d
    44 QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, QtPrivate::List<QModelIndex const&, int, int>, void, void (QSortFilterProxyModelPrivate:: *)(QModelIndex const&, int, int)>::call qobjectdefs_impl.h 127 0x7f19df2b9737
    45 QtPrivate::FunctionPointer<void (QSortFilterProxyModelPrivate:: *)(QModelIndex const&, int, int)>::call<QtPrivate::List<QModelIndex const&, int, int>, void> qobjectdefs_impl.h 175 0x7f19df2b96a1
    46 QtPrivate::QPrivateSlotObject<void (QSortFilterProxyModelPrivate:: *)(QModelIndex const&, int, int), QtPrivate::List<QModelIndex const&, int, int>, void>::impl qobject_p.h 273 0x7f19df2b95d0
    47 QtPrivate::QSlotObjectBase::call qobjectdefs_impl.h 462 0x7f19deaefbf2
    48 doActivate<false> qobject.cpp 4406 0x7f19ded261ac
    49 QMetaObject::activate qobject.cpp 4467 0x7f19ded1c153
    50 QMetaObject::activate<void, QModelIndex, int, int, QAbstractItemModel::QPrivateSignal> qobjectdefs.h 320 0x7f19df1cfbd5
    51 QAbstractItemModel::rowsAboutToBeRemoved moc_qabstractitemmodel.cpp 694 0x7f19df1c3f0a
    52 QAbstractItemModel::beginRemoveRows qabstractitemmodel.cpp 3019 0x7f19df1c3e7b
    53 QStandardItemModelPrivate::rowsAboutToBeRemoved qstandarditemmodel.cpp 602 0x7f19de080845
    54 QStandardItem::removeRows qstandarditemmodel.cpp 1762 0x7f19de081d5e
    55 QStandardItemModel::removeRows qstandarditemmodel.cpp 3002 0x7f19de084dbb
    56 QSortFilterProxyModel::removeRows qsortfilterproxymodel.cpp 2491 0x7f19df277853
    57 QComboBox::clear qcombobox.cpp 3215 0x7f19dce49a6c
    58 QtInstanceComboBox::clear()::$_0::operator()() const QtInstanceComboBox.cxx 103 0x7f19dfc7fcbc
    59 std::__invoke_impl<void, QtInstanceComboBox::clear()::$_0&>(std::__invoke_other, QtInstanceComboBox::clear()::$_0&) invoke.h 63 0x7f19dfc7fc95
    60 std::__invoke_r<void, QtInstanceComboBox::clear()::$_0&>(QtInstanceComboBox::clear()::$_0&) invoke.h 113 0x7f19dfc7fc45
    61 std::_Function_handler<void(), QtInstanceComboBox::clear()::$_0>::_M_invoke std_function.h 292 0x7f19dfc7fb6d
    62 std::function<void()>::operator() std_function.h 593 0x7f19dfc326fe
    63 QtInstance::RunInMainThread QtInstance.cxx 216 0x7f19dfc29e8f
    64 QtInstanceComboBox::clear QtInstanceComboBox.cxx 103 0x7f19dfc7b1fb
    65 ScFilterDlg::Init filtdlg.cxx 189 0x7f199b28d307
    66 ScFilterDlg::ScFilterDlg filtdlg.cxx 124 0x7f199b28c7ff
    67 std::_Construct<ScFilterDlg, SfxBindings *, SfxChildWindow *&, weld::Window *&, ScViewData&, SfxItemSet&> stl_construct.h 133 0x7f199bbaa206
    68 std::allocator_traits<std::allocator<void>>::construct<ScFilterDlg, SfxBindings *, SfxChildWindow *&, weld::Window *&, ScViewData&, SfxItemSet&> alloc_traits.h 805 0x7f199bba9e2a
    69 std::_Sp_counted_ptr_inplace<ScFilterDlg, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<SfxBindings *, SfxChildWindow *&, weld::Window *&, ScViewData&, SfxItemSet&> shared_ptr_base.h 606 0x7f199bba9e2a
    70 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<ScFilterDlg, std::allocator<void>, SfxBindings *, SfxChildWindow *&, weld::Window *&, ScViewData&, SfxItemSet&> shared_ptr_base.h 970 0x7f199bba9b8f
    71 std::__shared_ptr<ScFilterDlg, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>, SfxBindings *, SfxChildWindow *&, weld::Window *&, ScViewData&, SfxItemSet&> shared_ptr_base.h 1719 0x7f199bba9ab6
    72 std::shared_ptr<ScFilterDlg>::shared_ptr<std::allocator<void>, SfxBindings *, SfxChildWindow *&, weld::Window *&, ScViewData&, SfxItemSet&> shared_ptr.h 463 0x7f199bba9a20
    73 std::make_shared<ScFilterDlg, SfxBindings *, SfxChildWindow *&, weld::Window *&, ScViewData&, SfxItemSet&> shared_ptr.h 1007 0x7f199bb97a5f
    74 ScTabViewShell::CreateRefDialogController tabvwshc.cxx 376 0x7f199bb93b0c
    75 ScFilterDlgWrapper::ScFilterDlgWrapper reffact.cxx 103 0x7f199badd335
    76 std::make_unique<ScFilterDlgWrapper, vcl::Window *&, unsigned short&, SfxBindings&, SfxChildWinInfo&> unique_ptr.h 1103 0x7f199bae03b6
    77 ScFilterDlgWrapper::CreateImpl reffact.cxx 41 0x7f199bada1c4
    78 SfxChildWindow::CreateChildWindow childwin.cxx 244 0x7f19ee8c1a32
    79 SfxWorkWindow::CreateChildWin_Impl workwin.cxx 1367 0x7f19ee95abea
    80 SfxWorkWindow::ToggleChildWindow_Impl workwin.cxx 1850 0x7f19ee95cf83
    81 SfxWorkWindow::SetChildWindow_Impl workwin.cxx 1948 0x7f19ee95d7eb
    82 SfxViewFrame::SetChildWindow viewfrm.cxx 3780 0x7f19ef049957
    83 ScModule::SetRefDialog scmod.cxx 1610 0x7f199b18ea81
    84 ScCellShell::ExecuteDB cellsh2.cxx 657 0x7f199b9668ab
    85 SfxStubScCellShellExecuteDB scslots.hxx 7929 0x7f199b93bd45
    86 SfxDispatcher::Call_Impl dispatch.cxx 258 0x7f19ee9c5b2e
    87 SfxDispatcher::Execute_ dispatch.cxx 757 0x7f19ee9ca1f6
    88 SfxBindings::Execute_Impl bindings.cxx 1047 0x7f19ee9b20ae
    89 SfxDispatchController_Impl::dispatch unoctitm.cxx 737 0x7f19eea8e2bd
    90 SfxOfficeDispatch::dispatch unoctitm.cxx 256 0x7f19eea8cd74
    91 framework::(anonymous namespace)::AsyncMenuExecute menubarmanager.cxx 793 0x7f19eff551a4
    92 Link<void *, void>::Call link.hxx 105 0x7f19e8caaf41
    93 ImplHandleUserEvent winproc.cxx 2314 0x7f19e8ca6881
    94 ImplWindowFrameProc winproc.cxx 2869 0x7f19e8ca37b5
    95 SalFrame::CallCallback salframe.hxx 309 0x7f19dfc0b00c
    96 QtInstance::ProcessEvent QtInstance.cxx 564 0x7f19dfc2ccef
    97 SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const salusereventlist.cxx 119 0x7f19e927d4ed
    98 SalUserEventList::DispatchUserEvents salusereventlist.cxx 120 0x7f19e927d3c4
    99 QtInstance::ImplYield QtInstance.cxx 458 0x7f19dfc29651
    100 QtInstance::DoYield QtInstance.cxx 480 0x7f19dfc2c8b1
    101 InnerYield svapp.cxx 389 0x7f19e9346746
    102 Application::Yield svapp.cxx 502 0x7f19e9345fcf
    103 Application::Execute svapp.cxx 364 0x7f19e9345db0
    104 desktop::Desktop::Main app.cxx 1679 0x7f19f2d1f0f5
    105 ImplSVMainRun svmain.cxx 234 0x7f19e936f92c
    106 SalInstance::SVMainRun salinst.hxx 108 0x7f19dfc34dd1
    107 ImplSVMain svmain.cxx 221 0x7f19e936ee52
    108 SVMain svmain.cxx 252 0x7f19e93709e9
    109 soffice_main sofficemain.cxx 122 0x7f19f2d9916a
    110 sal_main main.c 51 0x562aefa2f9fd
    111 main main.c 49 0x562aefa2f9d7

Change-Id: I05b44d370d08c075314c2cce4011a1efad730dab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208561
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-27 17:02:59 +02:00
Michael Weghorn a85bae573e sc: Resave standardfilterdialog.ui with glade 3.40
The dialog can be triggered like this:

* start Calc
* "Data" -> "More Filters" -> "Standard Filter..."

Change-Id: If4dd7eb5ca1c0fbc7717fbb6837636cc564b105c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208560
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-25 23:45:33 +02:00
Michael Weghorn 522da67c33 tdf#130857 qt weld: Support Calc "Define Label Range" dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can be triggered like this:

* start Calc
* "Sheet" -> "Named Ranges and Expressions" -> "Labels..."

Change-Id: I87f009618d8c3514eff6b64d7c67fbc0b9a033d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208559
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-25 23:45:26 +02:00
Michael Weghorn 4ab6ad8177 sc: Resave namerangesdialog.ui with glade 3.40
The dialog can be triggered like this:

* start Calc
* "Sheet" -> "Named Ranges and Expressions" -> "Labels..."

Change-Id: Ifdfdb9843c018433c0daba0312aeaf6c02497d83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208558
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-25 23:45:19 +02:00
Michael Weghorn 39ee2274d1 tdf#130857 qt weld: Support Calc "Create Names" dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can be triggered like this:

* start Calc
* "Sheet" -> "Named Ranges and Expressions" -> "Create..."

Change-Id: I568e4d27cbd1363d43e842b350880096d1ff4417
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208557
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-25 23:45:12 +02:00
Michael Weghorn a7e943f974 sc: Resave createnamesdialog.ui with glade 3.40
The dialog can be triggered like this:

* start Calc
* "Sheet" -> "Named Ranges and Expressions" -> "Create..."

Change-Id: Ib8604aa14db7a5add775a2541897980b494e6e0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208556
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-25 23:45:04 +02:00
Michael Weghorn 207e01e51f tdf#130857 qt weld: Support Calc "Random Number Generator" dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can be triggered like this:

* start Calc
* select cells A1:A10
* "Sheet" -> "Fill Cells" -> "Fill Random Number..."

Change-Id: Ic56ae0ff509c364d454fae57c7cf83b02982d595
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208555
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-25 23:44:55 +02:00
Michael Weghorn bf6644b99a sc: Resave randomnumbergenerator.ui with glade 3.40
The dialog can be triggered like this:

* start Calc
* select cells A1:A10
* "Sheet" -> "Fill Cells" -> "Fill Random Number..."

Change-Id: I5923152bc2f22a8bfa9b7854f516456744bcc6cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208554
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-25 21:41:09 +02:00
Michael Weghorn fb4fd0332f tdf#130857 qt weld: Support Calc "Fill Series" dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can be triggered like this:

* start Calc
* select cells A1:A10
* "Sheet" -> "Fill Cells" -> "Fill Series..."

Change-Id: I81db46feff9c41d1e90dd817c33e7b3063ee9bcd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208553
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-25 21:41:01 +02:00
Michael Weghorn e177011b30 sc: Resave filldlg.ui with glade 3.40
The dialog can be triggered like this:

* start Calc
* select cells A1:A10
* "Sheet" -> "Fill Cells" -> "Fill Series..."

Change-Id: Ia7a92373d0f010621fd084fa52d8f7afef715892
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208552
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-25 21:40:53 +02:00
Michael Weghorn 580a9f2226 tdf#130857 qt weld: Support Calc "External Data" dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can be triggered like this:

* start Calc
* "Sheet" -> "External Links..."

Change-Id: I7c6058f2f00d98e88817c8a699566e7fc5e7ab6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208551
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-25 21:40:45 +02:00
Michael Weghorn b5319618d8 sc: Resave externaldata.ui with glade 3.40
The dialog can be triggered like this:

* start Calc
* "Sheet" -> "External Links..."

Change-Id: Id13d69ef241166a1b04b2b85b2eeb6c6abe3c865
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208550
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-25 21:40:36 +02:00
Michael Weghorn dd852da09c tdf#130857 qt weld: Support chart "Stepped Lines" dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can be triggered like this:

* start Calc
* "Insert" -> "Chart..."
* for "Choose a Chart Type", choose "Line"
* for "Line type", select "Stepped"
* press the "Properties..." button

Change-Id: Ica91da7a7ad1f06d09b9f0b6a46d1047c5444429
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208549
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-25 21:40:29 +02:00
Michael Weghorn 2474789f2d chart: Resave steppedlinesdlg.ui with glade 3.40
The dialog can be triggered like this:

* start Calc
* "Insert" -> "Chart..."
* for "Choose a Chart Type", choose "Line"
* for "Line type", select "Stepped"
* press the "Properties..." button

Change-Id: I0bbef11445f7cf184e46b955dd32fcd8fbb474f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208548
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-25 11:07:17 +02:00
Michael Weghorn b29aa904ce cui: Drop OfaTreeOptionsDialog::showDialog comment duplicating code
This comment just repeats the mapping that the code
underneath it implements.
Drop it, to deduplicate this.

Change-Id: I60497fbd52b057986f76b88cef82d4a991927c7b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208600
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-25 10:41:22 +02:00
Michael Weghorn 794f03b084 cui: Make OfaTreeOptionsDialog::showDialog param const
This vector can be passed by const reference. Also use
an "r" prefix; this is not a pointer.

Change-Id: I5c96a3701a24096a045c58a99d81ad6b49145c4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208599
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-25 10:41:15 +02:00
Michael Weghorn 27e98cdbe8 tdf#119931 tdf#130857 chart a11y: Set mnemonic widget in "Smooth Lines" dlg
Set the mnemonic widget, which e.g. makes the Orca screen
reader announce what the combo box is about ("Line Type")
when it receives focus with the gtk3 or qt6 vcl plugins on Linux.

For qt6 and the use of native Qt widgets
(SAL_VCL_QT_USE_WELDED_WIDGETS=1) this also fixes
that the labels text was previously shown as a literal
"Line &Type".

Change-Id: I2e699a10bdec27663b38a92d4091e647a6b7c49e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208497
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-25 10:40:46 +02:00
Michael Weghorn 7cc058ccb9 tdf#130857 qt weld: Support chart "Smooth Lines" dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can be triggered like this:

* start Calc
* "Insert" -> "Chart..."
* for "Choose a Chart Type", choose "Line"
* for "Line type", select "Smooth"
* press the "Properties..." button

Change-Id: I15685601f9cab81bd15e591b9c7864adae65864d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208496
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-25 10:40:38 +02:00
Michael Weghorn 301180557e chart2: Resave smoothlinesdlg.ui with glade 3.40
The dialog can be triggered like this:

* start Calc
* "Insert" -> "Chart..."
* for "Choose a Chart Type", choose "Line"
* for "Line type", select "Smooth"
* press the "Properties..." button

Change-Id: I4bad77d57fb6f33dea653ad48f6dd0e32a8085c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208495
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-25 10:37:14 +02:00
Michael Weghorn f8d3a5e370 tdf#130857 qt weld: Support chart "Data Ranges" dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can be triggered like this:

* start Calc
* "Insert" -> "Chart"
* confirm with "Finish"
* with chart still selected, press the context menu key
  (or click with right mouse button) to open the context menu
* select the "Data Ranges..." context menu entry

This depends on previous commit

    Change-Id: Ia368a919c497d51c4560536995e90f60e3b85768
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jul 22 17:20:59 2026 +0200

        tdf#130857 chart2: Don't modify dialog modality while it's shown

for the dialog modality/main window sensitivity to work
as expected. (See the commit message of that commit
for more details.)

Change-Id: I53cbd9061ef473deba2124f17976f24b11c1712a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208494
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-25 10:37:05 +02:00
Michael Weghorn c4f1f42cd5 tdf#130857 chart2: Don't modify dialog modality while it's shown
RangeSelectionListenerParent::enableRangeChoosing both sets the
dialog's visibility and modality. So far, it was first setting
the modality and then the visibility.

However, changing the modality while the dialog is shown
doesn't work as expected when using the qt6 vcl plugin
with native Qt widgets with upcoming commit

    Change-Id: I53cbd9061ef473deba2124f17976f24b11c1712a
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jul 22 17:27:01 2026 +0200

        tdf#130857 qt weld: Support chart "Data Ranges" dialog

in place and would result in an inability to select the
data area as the main window would remain insensitive/disabled
for the following case:

* start Calc
* "Insert" -> "Chart"
* confirm with "Finish"
* with chart still selected, press the context menu key
  (or click with right mouse button) to open the context menu
* select the "Data Ranges..." context menu entry
* in the "Data Range" tab, press the "Select data range" button
* try to click into the document and drag to make a selection

The native Qt implementation wouldn't require changing
modality back and forth, but gtk3 and the gen vcl plugin
would show the same problem as described above when not
setting the dialog to non-modal in the case it gets hidden.

Make all of them work by setting the modality, but always
doing that while the dialog is hidden (not shown), i.e.
either before showing it or after hiding it.

Change-Id: Ia368a919c497d51c4560536995e90f60e3b85768
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208493
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-25 10:36:55 +02:00
Michael Weghorn 117b0073a0 sc: Merge ScSimpleRefDlg::Init into ctor, drop obsolete comment
It's not 100% clear what the

    // in order to keep the Strings with the FixedTexts in the resource:

comment was referring to, but it's most likely obsolete,
as nothing here is related to string resources.
(The wording of "FixedTexts" and "resource" also
sounds like terminology specific to the pre-weld era.)

Change-Id: I2e0ae770fdfc039a75ef01b633b7d0506ec9a929
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208491
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-25 10:36:47 +02:00
Michael Weghorn 52386e2580 sc: Pass ScSimpleRefDlg SfxBindings param by ref
Change-Id: Ib18dec2c9ddb5eef670066c96e48e7a6ff4b60b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208490
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-25 10:36:38 +02:00
Michael Weghorn 29bfcf7b9c tdf#130857 qt weld: Support Calc "Data range" dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can be triggered like this:

* start Calc
* "Insert" -> "Chart"
* confirm with "Finish"
* with chart still selected, press the context menu key
  (or click with right mouse button) to open the context menu
* select the "Data Ranges..." context menu entry
* in the "Data Range" tab, press the "Select data range" button

Change-Id: If6373fb69ae7cb4315c0c4e267dcc7912d5015fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208489
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-25 10:36:31 +02:00
Michael Weghorn 8e2c695169 sc: Resave simplerefdialog.ui with glade 3.40
The dialog can be triggered like this:

* start Calc
* "Insert" -> "Chart"
* confirm with "Finish"
* with chart still selected, press the context menu key
  (or click with right mouse button) to open the context menu
* select the "Data Ranges..." context menu entry
* in the "Data Range" tab, press the "Select data range" button

Change-Id: I44b0dfd7a4ec9500affbf8fbad9b126dc3fc5c06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208488
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-25 10:35:39 +02:00
Michael Weghorn dcf718a979 chart2: Resave tp_DataSource.ui with glade 3.40
This is used for the "Data Series" tab page of the
the dialog that can be triggered like this:

* start Calc
* "Insert" -> "Chart"
* confirm with "Finish"
* with chart still selected, press the context menu key
  (or click with right mouse button) to open the context menu
* select the "Data Ranges..." context menu entry

Change-Id: I15ebfe1eac3a83f5e0a2ee03d0548c8bc0e499f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208487
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-25 10:35:31 +02:00
Michael Weghorn b7e59e97dc chart2: Resave tp_RangeChooser.ui with glade 3.40
This is used for the "Data Range" tab page of the
the dialog that can be triggered like this:

* start Calc
* "Insert" -> "Chart"
* confirm with "Finish"
* with chart still selected, press the context menu key
  (or click with right mouse button) to open the context menu
* select the "Data Ranges..." context menu entry

Change-Id: Ia5f78fdf141eeb0e35cfe5dab990d73e991fe885
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208486
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-25 10:35:21 +02:00
Michael Weghorn bac2361e07 chart2: Resave datarangedialog.ui with glade 3.40
The dialog can be triggered like this:

* start Calc
* "Insert" -> "Chart"
* confirm with "Finish"
* with chart still selected, press the context menu key
  (or click with right mouse button) to open the context menu
* select the "Data Ranges..." context menu entry

Change-Id: I339bbd6d64344eeb33449fc829f06fe9041e0282
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208485
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-25 10:34:57 +02:00
Michael Weghorn 74e0522fc5 tdf#130857 qt weld: Support Calc "Highlight cells..." dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can be triggered like this:

* start Calc
* "Format" -> "Conditional" -> "Condition" -< "Greater than..."

Change-Id: I75435cdd86796b0dc8abaf7510004a2afea0de75
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208478
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-25 10:34:49 +02:00
Michael Weghorn 086c17a7f1 tdf#130857 Set new weld::Frame text without relying on internal label child
Use weld::Frame::set_label directly to set the new text
label for the frame in the Calc "Highlight cells..." dialog
instead of relying on the internal label child.

For the Qt implementation in QtInstanceFrame, there is
no separate label child, but its QGroupBox handles the
title directly.

The dialog can be triggered like this:

* start Calc
* "Format" -> "Conditional" -> "Condition" -< "Greater than..."

Change-Id: I1698902ff88976bd12a4fa9e6116724f36f0dd98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208477
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-25 10:34:41 +02:00
Michael Weghorn e9ce9e622b tdf#130857 Define widgets in Calc "Edit Print Ranges" dialog in order
Switch the order in which the widgets in the .ui file
are defined so that the order better matches the visual appearance
and logical order, which makes sure that tab focus order with the
Qt-based VCL plugins is correct as well when using native Qt
widgets (SAL_VCL_QT_USE_WELDED_WIDGETS=1), where
focus order is (by default) based on widget creation order.

See

    commit 02692566ad
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Oct 24 17:43:35 2024 +0200

        tdf#130857 optnewdictionarydialog.ui: Define focusable widgets in order

for more background.

The dialog can be triggered like this:

* start Calc
* "Format" -> "Print Ranges" -> "Edit..."

The Python script mentioned in the commit message of

    commit 327679b2fb
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jul 8 15:50:59 2026 +0200

        tdf#130857 Define widgets in Calc "General" options page in order

was used to reorder the GtkGrid children automatically.

Change-Id: I1e0e2d396bec89d93d109f239f76aaceca5c33da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208476
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-25 10:34:32 +02:00
Michael Weghorn cd192daf67 tdf#130857 qt weld: Support Calc "Edit Print Ranges" dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can be triggered like this:

* start Calc
* "Format" -> "Print Ranges" -> "Edit..."

Change-Id: I10fcd9c326a047cf4abd34369f02be1847d77ae1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208475
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-25 10:34:23 +02:00
Michael Weghorn a881b303b3 tdf#130857 formula: Only use selection indices if selection exists
The bool return value of weld::TextWidget::get_selection_bounds
indicates whether a text selection actually exists.

Only use the start and end indices from the out params
if that is the case and otherwise return a default-constructed
Selection object (i.e. one using start and end indices of 0).

Otherwise, this would result in an assertion due to the use of
invalid string indices as seen with the qt6 vcl plugin and native
widgets enabled (SAL_VCL_QT_USE_WELDED_WIDGETS=1) for the following
scenario with upcoming commit

    Change-Id: I10fcd9c326a047cf4abd34369f02be1847d77ae1
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jul 22 14:20:53 2026 +0200

        tdf#130857 qt weld: Support Calc "Edit Print Ranges" dialog

in place:

* start Calc
* "Format" -> "Print Ranges" -> "Edit..."
* click on the "Shrink" button in the "Print Range" section
* click anywhere in the sheet

Assertion:

    soffice.bin: /home/michi/development/git/libreoffice/sal/rtl/strtmpl.hxx:1059: void rtl::str::newReplaceStrAt(rtl_tString **, rtl_tString *, sal_Int32, sal_Int32, rtl_tString *) [rtl_tString = _rtl_uString]: Assertion `nIndex >= 0 && nIndex <= pStr->length' failed.

This is because QtInstanceEntry::get_selection_bounds
sets the indices to -1 if no selection exists.

Change-Id: Ifc8fd6f6a6d676fe26364da9077cb10acb439a5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208474
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-25 10:34:14 +02:00
Michael Weghorn 2c6f49415d sc: Resave printareasdialog.ui with glade 3.40
The dialog can be triggered like this:

* start Calc
* "Format" -> "Print Ranges" -> "Edit..."

Change-Id: Ib59e9447fe64b162d0689baf44ae6f89deb9499e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208473
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-25 10:34:05 +02:00
Michael Weghorn 35f5fd4164 tdf#130857 qt weld: Support Calc "Paste Names" dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can be triggered like this:

* start Calc
* "Insert" -> "Named Range or Expression..."

In order for entries to be listed there, they can
first be added via "Sheet" -> "Named Ranges and Expressions"
-> "Define...".

Change-Id: Ib7fe33450a215256b0752ea9279157b76fb36b8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208472
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-25 10:33:56 +02:00
Michael Weghorn 2b8d0cd7f7 tdf#130857 qt weld: Support Writer "Frame Style" dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can be triggered like this:

* start Writer
* open the "Styles" sidebar deck
* press the "Frame Styles" button at the top of the sidebar deck
* right-click on an existing style (e.g. "Frame") to open the context menu
* select "Edit Style..." context menu entry

Change-Id: If148077155edd6f2bc80c81b2cf292f8ed037107
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208464
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-25 10:33:33 +02:00
Michael Weghorn 0bebfb032b tdf#130857 Define widgets in numbering options page in order
Switch the order in which the widgets in the .ui file
are defined so that the order better matches the visual appearance
and logical order, which makes sure that tab focus order with the
Qt-based VCL plugins is correct as well when using native Qt
widgets (SAL_VCL_QT_USE_WELDED_WIDGETS=1), where
focus order is (by default) based on widget creation order.

See

    commit 02692566ad
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Oct 24 17:43:35 2024 +0200

        tdf#130857 optnewdictionarydialog.ui: Define focusable widgets in order

for more background.

The page can be triggered like this:

* start Writer
* open the "Styles" sidebar deck
* press the "List Styles" button at the top of the sidebar deck
* right-click on an existing bullet style to open the context menu
* select "Edit Style..." context menu entry
* switch to the "Customize" tab

The Python script mentioned in the commit message of

    commit 327679b2fb
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jul 8 15:50:59 2026 +0200

        tdf#130857 Define widgets in Calc "General" options page in order

was used to reorder the GtkGrid children automatically.

Change-Id: I0010eb3af1272342f2f40e8f3b0952b676a22618
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208462
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-25 10:33:22 +02:00
Michael Weghorn 80ca79174e sc: Resave insertname.ui with glade 3.40
The dialog can be triggered like this:

* start Calc
* "Insert" -> "Named Range or Expression..."

Change-Id: I8218b642ffa310d038bf0a40bbc49c9c70832bd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208471
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2026-07-25 07:44:54 +02:00
Michael Weghorn c33e4faeb2 tdf#130857 qt weld: Support dummy combobox for Writer "List Style" dialog
This is the combobox mentioned in previous commit

    Change-Id: If88bbbb853b92d29dab41a48aaf81e406a52c151
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jul 22 11:35:21 2026 +0200

        tdf#130857 qt weld: Support Writer "List Style" dialog

as follows:

> The "Customize" tab handled in the
> "customize" case in SwTemplateDlgController::PageCreated
> uses an additional UI file "modules/swriter/ui/comboboxfragment.ui"
> for a combobox that is not actually (supposed to be) shown.
> That one will be handled in a separate commit, as it would
> result in an empty window being created without further
> changes.
> (The reason why that combobox is used seems to be simply that
> FillCharStyleListBox requires a weld::ComboBox& param;
> then the combobox entries are added to a different list
> and the combobox itself is discarded/ignored in
> SwTemplateDlgController::PageCreated. Having a non-native
> combobox (i.e. a vcl/SalInstance... implementation for that
> case doesn't cause any issues.)

Now that previous commit

    Change-Id: Ibb216647749416ac62674a35f6f88193def13937
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jul 22 11:50:57 2026 +0200

        tdf#130857 sw: Place dummy combobox into an (invisible) dialog

addressed the issues of an unnecessary window being shown and
the combobox (and its parent widget) not being freed anymore,
declare support for using native Qt widgets for that UI file as well.

Change-Id: Ib176be098fa5530b736c32c48594cb75ae9304b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208461
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-24 15:24:00 +02:00
Michael Weghorn d73a8b653e tdf#130857 sw: Place dummy combobox into an (invisible) dialog
Quoting from earlier commit

    Change-Id: If88bbbb853b92d29dab41a48aaf81e406a52c151
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jul 22 11:35:21 2026 +0200

        tdf#130857 qt weld: Support Writer "List Style" dialog

:

> The "Customize" tab handled in the
> "customize" case in SwTemplateDlgController::PageCreated
> uses an additional UI file "modules/swriter/ui/comboboxfragment.ui"
> for a combobox that is not actually (supposed to be) shown.
> That one will be handled in a separate commit, as it would
> result in an empty window being created without further
> changes.
> (The reason why that combobox is used seems to be simply that
> FillCharStyleListBox requires a weld::ComboBox& param;
> then the combobox entries are added to a different list
> and the combobox itself is discarded/ignored in
> SwTemplateDlgController::PageCreated. Having a non-native
> combobox (i.e. a vcl/SalInstance... implementation for that
> case doesn't cause any issues.)

Extend the UI file for that dummy combobox to
put the combobox into a dialog that doesn't get shown,
and set the actual dialog for its parent.

Since the new dialog is not visible/shown, this prevents
the above problem when declaring support for using
native Qt widgets for that dialog.

Simply setting the GtkBox to not visible like

    diff --git a/sw/uiconfig/swriter/ui/comboboxfragment.ui b/sw/uiconfig/swriter/ui/comboboxfragment.ui
    index e8551ae7d3ae..5659a3f589f5 100644
    --- a/sw/uiconfig/swriter/ui/comboboxfragment.ui
    +++ b/sw/uiconfig/swriter/ui/comboboxfragment.ui
    @@ -3,7 +3,6 @@
     <interface domain="sw">
       <requires lib="gtk+" version="3.24"/>
       <object class="GtkBox">
    -    <property name="visible">True</property>
         <property name="can-focus">False</property>
         <property name="orientation">vertical</property>
         <child>

would also prevent the useless top-level from showing
up.
However, in that case, that widget would be leaked, since
it is created on the stack and never deleted again.
Having it inside the SwTemplateDlgController's widget
hierarchy ensures that it will be deleted along with the
QDialog used for that SwTemplateDlgController.

Behavior could be observed e.g. in GammaRay [1]
with upcoming commit

    Change-Id: Ib176be098fa5530b736c32c48594cb75ae9304b0
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jul 22 11:57:25 2026 +0200

        tdf#130857 qt weld: Support dummy combobox for Writer "List Style" dialog

in place.

[1] https://github.com/KDAB/GammaRay

Change-Id: Ibb216647749416ac62674a35f6f88193def13937
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208460
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-24 15:23:52 +02:00
Michael Weghorn 325a7e00f9 tdf#130857 qt weld: Support Writer "List Style" dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can be triggered like this:

* start Writer
* open the "Styles" sidebar deck
* press the "List Styles" button at the top of the sidebar deck
* right-click on an existing bullet style to open the context menu
* select "Edit Style..." context menu entry

The "Customize" tab handled in the
"customize" case in SwTemplateDlgController::PageCreated
uses an additional UI file "modules/swriter/ui/comboboxfragment.ui"
for a combobox that is not actually (supposed to be) shown.
That one will be handled in a separate commit, as it would
result in an empty window being created without further
changes.
(The reason why that combobox is used seems to be simply that
FillCharStyleListBox requires a weld::ComboBox& param;
then the combobox entries are added to a different list
and the combobox itself is discarded/ignored in
SwTemplateDlgController::PageCreated. Having a non-native
combobox (i.e. a vcl/SalInstance... implementation for that
case doesn't cause any issues.)

Change-Id: If88bbbb853b92d29dab41a48aaf81e406a52c151
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208459
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-24 15:23:43 +02:00
Michael Weghorn faa48de3f8 tdf#130857 qt weld: Also signal about resize event of treeview viewport
Earlier commit

    Change-Id: Ib42c40ddf858d6e7b930a2b51620ff9f51440141
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jul 22 10:02:09 2026 +0200

        tdf#130857 qt weld: Signal about QtInstanceWidget size change

implemented signalling about widget size changes.

For QtInstanceTreeView, additionally handle resize
events of its viewport and signal about those changes
as well.

This is required for the case where code connects a
handler to that signal using weld::Widget::connect_size_allocate
and the handler calls weld::TreeView::visible_foreach which
relies on the viewport already having been resized to the new
size, not only its QTreeView parent.

This addresses the remaining issue mentioned in previous
commit

    Change-Id: Ie19766c7436f6d3f8a55e5df2c1e8c824f8c3f06
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jul 22 10:38:20 2026 +0200

        tdf#130857 qt weld: Signal when treeview is scrolled

        Call weld::TreeView::signal_visible_range_changed
        when the treeview is scrolled vertically, i.e. the value of
        its vertical scrollbar changes, which results in other
        entries being visible in the viewport.

        This addresses a part of the issue mentioned in previous
        commit

            Change-Id: Iae7edecbdc7280473bb7370e8a3bb4c677a53fc8
            Author: Michael Weghorn <m.weghorn@posteo.de>
            Date:   Wed Jul 22 10:32:46 2026 +0200

                tdf#130857 qt weld: Support Calc "Manage Names" dialog

                This means that native Qt widgets are used for this dialog
                now when using the qt5 or qt6 VCL plugin and starting LO with
                environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

                The dialog can be triggered like this:

                * start Calc
                * select cells A1:B4
                * "Sheet" -> "Named Ranges and Expressions" -> "Manage..."

                Some logic to update the data for the entries in
                the dialog (that can be added using "Sheet"
                -> "Named Ranges and Expressions" -> "Define...")
                is not yet triggered, so the "Range or formula expression" column
                isn't filled with data as needed yet when there are multiple
                entries. This will be addressed in an upcoming commit.

        Now, the "Range or formula expression" column is
        filled for all currently visible entries when
        scrolling.
        One remaining problem (that will be addressed in a separate
        commit) is that the column is not yet filled for all
        existing entries when the dialog shows, but before
        any scrolling has happened.

An alternative solution could be to call
weld::TreeView::signal_visible_range_changed
to directly indicate that the visible range has
changed instead of signalling about the size change.
The GTK implementation however only calls that signal
when the scrolling position changed, so adhere to
that logic in the Qt implementation as well for now.

Change-Id: I82aeeef41d74a1ef89d09c64ea579586dcf77442
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208458
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-24 15:23:34 +02:00
Michael Weghorn 3eb90085d8 tdf#130857 qt weld: Signal when treeview is scrolled
Call weld::TreeView::signal_visible_range_changed
when the treeview is scrolled vertically, i.e. the value of
its vertical scrollbar changes, which results in other
entries being visible in the viewport.

This addresses a part of the issue mentioned in previous
commit

    Change-Id: Iae7edecbdc7280473bb7370e8a3bb4c677a53fc8
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jul 22 10:32:46 2026 +0200

        tdf#130857 qt weld: Support Calc "Manage Names" dialog

        This means that native Qt widgets are used for this dialog
        now when using the qt5 or qt6 VCL plugin and starting LO with
        environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

        The dialog can be triggered like this:

        * start Calc
        * select cells A1:B4
        * "Sheet" -> "Named Ranges and Expressions" -> "Manage..."

        Some logic to update the data for the entries in
        the dialog (that can be added using "Sheet"
        -> "Named Ranges and Expressions" -> "Define...")
        is not yet triggered, so the "Range or formula expression" column
        isn't filled with data as needed yet when there are multiple
        entries. This will be addressed in an upcoming commit.

Now, the "Range or formula expression" column is
filled for all currently visible entries when
scrolling.
One remaining problem (that will be addressed in a separate
commit) is that the column is not yet filled for all
existing entries when the dialog shows, but before
any scrolling has happened.

Change-Id: Ie19766c7436f6d3f8a55e5df2c1e8c824f8c3f06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208457
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-24 15:23:24 +02:00
Michael Weghorn 29a2f924d9 tdf#130857 qt weld: Support Calc "Manage Names" dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can be triggered like this:

* start Calc
* select cells A1:B4
* "Sheet" -> "Named Ranges and Expressions" -> "Manage..."

Some logic to update the data for the entries in
the dialog (that can be added using "Sheet"
-> "Named Ranges and Expressions" -> "Define...")
is not yet triggered, so the "Range or formula expression" column
isn't filled with data as needed yet when there are multiple
entries. This will be addressed in an upcoming commit.

Change-Id: Iae7edecbdc7280473bb7370e8a3bb4c677a53fc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208456
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-24 14:36:09 +02:00
Michael Weghorn 4c3006f720 tdf#130857 qt weld: Implement QtInstanceTreeView::visible_foreach
Implement QtInstanceTreeView::visible_foreach that calls
a function for visible treeview entries, starting with the
first visible one, and stopping either when the function
returns true or when there are no more visible entries.

The first visible entry is the one at coordinates (0,0).
From that one, continue iterating over following entries
until one has a y coordinate that doesn't fit into the
current viewport size any more.

This will be needed to support the
Calc dialog to manage named ranges
("Sheet" -> "Named Ranges and Expressions"
-> "Manage...") in an upcoming commit.

Change-Id: If68efe39b9f98b09e27ff0155ba71103ae5c8ad2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208455
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-24 14:35:58 +02:00
Michael Weghorn e893f9966c tdf#130857 qt weld: Signal about QtInstanceWidget size change
So far, only QtInstanceDrawingArea was calling
weld::Widget::signal_size_allocate in case of a
QEvent::Resize event. However, since this is a
weld::Widget method, it should be called by all
weld::Widget implementations.

Therefore, move the logic to call that handler
down to the QtInstanceWidget base class and leave
only additional logic in QtInstanceDrawingArea.

One case for which this will be relevant is the
Calc dialog to manage named ranges
("Sheet" -> "Named Ranges and Expressions"
-> "Manage...") which connects to the signal
in order to fill in the relevant information for
all currently visible entries, see the call to

    m_xTreeView->connect_size_allocate(LINK(this, ScRangeManagerTable, SizeAllocHdl));

in the ScRangeManagerTable ctor.

This is one step towards supporting that dialog.

Change-Id: Ib42c40ddf858d6e7b930a2b51620ff9f51440141
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208454
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-24 14:35:48 +02:00
Michael Weghorn b0818120ae weld: Make weld::Widget::m_aSizeAllocateHdl private
Use the existing weld::Widget::signal_size_allocate
method to call the handler from subclasses.

Change-Id: I8494195ec7a7a5a063f423889252b46d36607620
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208453
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-24 14:35:38 +02:00
Michael Weghorn 68357033f3 tdf#130857 sc: Drop unused/orphan GtkTreeViewColumn in managenamesdialog.ui
This tree view column is not actually used. Drop it. Otherwise,
it would trigger this assertion when using the qt6 vcl plugin
with native Qt widgets (SAL_VCL_QT_USE_WELDED_WIDGETS=1) in
a local WIP branch that enables support for that dialog:

    soffice.bin: /home/michi/development/git/libreoffice/vcl/qt6/../qt5/QtBuilder.cxx:425: virtual QObject *QtBuilder::insertObject(QObject *, const OUString &, std::string_view, const OUString &, stringmap &, stringmap &, stringmap &): Assertion `pTreeView && "Tree view column doesn't have a tree view parent"' failed.

The dialog can be triggered like this:

* start Calc
* select cells A1:B4
* "Sheet" -> "Named Ranges and Expressions" -> "Define..."
* enter "myname" for the name and press the "Add" button
* "Sheet" -> "Name Ranges and Expressions" -> "Manage..."

Change-Id: Ia7534a9d6053522ea851d1ef2dd9c88ea3276448
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208429
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-24 14:35:27 +02:00
Michael Weghorn 856737ac78 tdf#130857 qt weld: Support Calc "Define Name" dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can be triggered like this:

* start Calc
* select cells A1:B4
* "Sheet" -> "Named Ranges and Expressions" -> "Define..."

Change-Id: I068ddfd1c77b7f84e6fa2d929233f2a6a36d2b15
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208428
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-24 14:35:17 +02:00
Michael Weghorn 7645470408 tdf#130857 Define widgets in Calc "Sparkline Properties" dialog in order
Switch the order in which the widgets in the .ui file
are defined so that the order better matches the visual appearance
and logical order, which makes sure that tab focus order with the
Qt-based VCL plugins is correct as well when using native Qt
widgets (SAL_VCL_QT_USE_WELDED_WIDGETS=1), where
focus order is (by default) based on widget creation order.

See

    commit 02692566ad
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Oct 24 17:43:35 2024 +0200

        tdf#130857 optnewdictionarydialog.ui: Define focusable widgets in order

for more background.

The dialog can be triggered like this:

* start Calc
* "Insert" -> "Sparkline..."

The Python script mentioned in the commit message of

    commit 327679b2fb
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jul 8 15:50:59 2026 +0200

        tdf#130857 Define widgets in Calc "General" options page in order

was used to reorder the GtkGrid children automatically.

Change-Id: Ie287eb6dbbccb78d6188d199b6c794277d535325
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208427
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-24 14:35:07 +02:00
Michael Weghorn 80c47fa530 tdf#130857 qt weld: Support Calc "Sparkline Properties" dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can be triggered like this:

* start Calc
* "Insert" -> "Sparkline..."

Change-Id: I8e2eccfb0cbbf6f07e55ecdff9f0cf05b91147c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208426
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-24 14:34:54 +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
Michael Weghorn bdb27b21bf sc: Pass ScTabViewShell::CreateRefDialogController's SfxBindings param by ref
... instead of by pointer. This makes clear it's always non-null.

Methods/Constructors called from within
ScTabViewShell::CreateRefDialogController
could be adjusted in a similar way in
the future.

Change-Id: If32a02ccef02d7e74927991c7e96b288d3b80390
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208402
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-23 23:22:21 +02:00
Michael Weghorn 5430322773 tdf#130857 qt weld: Don't always show window when setting state
When setting the window state to normal, maximized, minimized
or fullscreen in QtInstanceWindow::set_window_state,
only set the corresponding window states, but don't call
QWidget::showNormal, QWidget::showMaximized, etc.

The latter would set the window state and in addition
set the widget to visible, which
weld::Window::set_window_state is not supposed to
do.

This resulted in the problem that after starting various
Calc dialogs (with previously saved window state) and then
closing them again wouldn't result in the Calc window
becoming fully usable again, as the SfxDialogController's
Close Method wasn't called.

This could be reproduced e.g. like this:

* start Calc
* "Data" -> "Statistics" -> "Sampling..."
* maximize the dialog
* close the dialog
* start the dialog again
* close the dialog again

When the dialog gets started, the window state would be
restored/set like this and implicitly set the window/dialog
to visible:

    1   QtInstanceWindow::set_window_state(vcl::WindowData const&)::$_0::operator()() const                                                                                               QtInstanceWindow.cxx   139  0x7fc1fd354a95
    2   std::__invoke_impl<void, QtInstanceWindow::set_window_state(vcl::WindowData const&)::$_0&>(std::__invoke_other, QtInstanceWindow::set_window_state(vcl::WindowData const&)::$_0&) invoke.h               63   0x7fc1fd3548a5
    3   std::__invoke_r<void, QtInstanceWindow::set_window_state(vcl::WindowData const&)::$_0&>(QtInstanceWindow::set_window_state(vcl::WindowData const&)::$_0&)                         invoke.h               113  0x7fc1fd354865
    4   std::_Function_handler<void(), QtInstanceWindow::set_window_state(vcl::WindowData const&)::$_0>::_M_invoke                                                                        std_function.h         292  0x7fc1fd35474d
    5   std::function<void()>::operator()                                                                                                                                                 std_function.h         593  0x7fc1fd23117e
    6   QtInstance::RunInMainThread                                                                                                                                                       QtInstance.cxx         216  0x7fc1fd22890f
    7   QtInstanceWindow::set_window_state                                                                                                                                                QtInstanceWindow.cxx   120  0x7fc1fd351e64
    8   SfxModelessDialogController::Initialize                                                                                                                                           basedlgs.cxx           72   0x7fc20c0d8ee2
    9   ScTabViewShell::CreateRefDialogController                                                                                                                                         tabvwshc.cxx           454  0x7fc1c4594310
    10  ChildControllerWrapper<(short)26171>::ChildControllerWrapper                                                                                                                      ChildWindowWrapper.hxx 34   0x7fc1c3b7cf42
    11  std::make_unique<ChildControllerWrapper<(short)26171>, vcl::Window *&, unsigned short&, SfxBindings&, SfxChildWinInfo&>                                                           unique_ptr.h           1103 0x7fc1c3b7ccc6
    12  ChildControllerWrapper<(short)26171>::CreateImpl                                                                                                                                  ChildWindowWrapper.hxx 44   0x7fc1c3b7cc34
    13  SfxChildWindow::CreateChildWindow                                                                                                                                                 childwin.cxx           244  0x7fc20bec1a32
    14  SfxWorkWindow::CreateChildWin_Impl                                                                                                                                                workwin.cxx            1367 0x7fc20bf5abea
    15  SfxWorkWindow::ToggleChildWindow_Impl                                                                                                                                             workwin.cxx            1850 0x7fc20bf5cf83
    16  SfxWorkWindow::SetChildWindow_Impl                                                                                                                                                workwin.cxx            1948 0x7fc20bf5d7eb
    17  SfxViewFrame::SetChildWindow                                                                                                                                                      viewfrm.cxx            3780 0x7fc20c649957
    18  ScModule::SetRefDialog                                                                                                                                                            scmod.cxx              1610 0x7fc1c3b8eac1
    19  ScCellShell::ExecuteEdit                                                                                                                                                          cellsh1.cxx            1047 0x7fc1c4341a8c
    20  SfxStubScCellShellExecuteEdit                                                                                                                                                     scslots.hxx            7919 0x7fc1c4336365
    ... <More>

Due to the dialog already having been set to visible,
the call to weld::Widget::get_visible in
SfxWorkWindow::ShowChildren_Impl would then return true,
so weld::DialogController::runAsync would not be called,
and therefore the function to run when the dialog closes
would not be set, which would have taken care of calling
SfxDialogController::Close:

    if (!pCli->xController->getDialog()->get_visible())
    {
        auto xController = pCli->xController;
        weld::DialogController::runAsync(xController,
            [=](sal_Int32 nResult){
                if (nResult == nCloseResponseToJustHide)
                    return;
                xController->Close();
            });
    }

Backtrace:

    1  QtInstanceWidget::get_visible                                       QtInstanceWidget.cxx 76   0x7fc1fd33d70d
->  2  SfxWorkWindow::ShowChildren_Impl                                    workwin.cxx          1004 0x7fc20bf55310
    3  SfxWorkWindow::ToggleChildWindow_Impl                               workwin.cxx          1860 0x7fc20bf5cfac
    4  SfxWorkWindow::SetChildWindow_Impl                                  workwin.cxx          1948 0x7fc20bf5d7eb
    5  SfxViewFrame::SetChildWindow                                        viewfrm.cxx          3780 0x7fc20c649957
    6  ScModule::SetRefDialog                                              scmod.cxx            1610 0x7fc1c3b8eac1
    7  ScCellShell::ExecuteEdit                                            cellsh1.cxx          1047 0x7fc1c4341a8c
    8  SfxStubScCellShellExecuteEdit                                       scslots.hxx          7919 0x7fc1c4336365
    9  SfxDispatcher::Call_Impl                                            dispatch.cxx         258  0x7fc20bfc5b2e
    10 SfxDispatcher::Execute_                                             dispatch.cxx         757  0x7fc20bfca1f6
    11 SfxBindings::Execute_Impl                                           bindings.cxx         1047 0x7fc20bfb20ae
    12 SfxDispatchController_Impl::dispatch                                unoctitm.cxx         737  0x7fc20c08e2bd
    13 SfxOfficeDispatch::dispatch                                         unoctitm.cxx         256  0x7fc20c08cd74
    14 framework::(anonymous namespace)::AsyncMenuExecute                  menubarmanager.cxx   793  0x7fc20d5551a4
    15 Link<void *, void>::Call                                            link.hxx             105  0x7fc2062aaf01
    16 ImplHandleUserEvent                                                 winproc.cxx          2314 0x7fc2062a6841
    17 ImplWindowFrameProc                                                 winproc.cxx          2869 0x7fc2062a3775
    18 SalFrame::CallCallback                                              salframe.hxx         309  0x7fc1fd209a8c
    19 QtInstance::ProcessEvent                                            QtInstance.cxx       564  0x7fc1fd22b76f
    20 SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const salusereventlist.cxx 119  0x7fc20687d48d
    21 SalUserEventList::DispatchUserEvents                                salusereventlist.cxx 120  0x7fc20687d364
    22 QtInstance::ImplYield                                               QtInstance.cxx       458  0x7fc1fd2280d1
    23 QtInstance::DoYield                                                 QtInstance.cxx       480  0x7fc1fd22b331
    24 InnerYield                                                          svapp.cxx            389  0x7fc2069466e6
    25 Application::Yield                                                  svapp.cxx            502  0x7fc206945f6f
    26 Application::Execute                                                svapp.cxx            364  0x7fc206945d50
    27 desktop::Desktop::Main                                              app.cxx              1679 0x7fc21031f0f5
    28 ImplSVMainRun                                                       svmain.cxx           234  0x7fc20696f8cc
    29 SalInstance::SVMainRun                                              salinst.hxx          108  0x7fc1fd233851
    30 ImplSVMain                                                          svmain.cxx           221  0x7fc20696edf2
    31 SVMain                                                              svmain.cxx           252  0x7fc206970989
    32 soffice_main                                                        sofficemain.cxx      122  0x7fc21039916a
    33 sal_main                                                            main.c               51   0x564fe704c9fd
    34 main                                                                main.c               49   0x564fe704c9d7

Change-Id: Ic3860a83572126244ea625c5e4c97eeebcf8e4b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208399
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-23 23:22:13 +02:00
Michael Weghorn 5f725594d8 tdf#130857 qt weld: Set state mask in QtInstanceWindow::get_window_state
In QtInstanceWindow::get_window_state, set the
state mask of the returned WindowData to the
requested one.
(See also how the gtk and vcl implementation
explicitly set a mask for the returned WindowData.)

Otherwise, WindowState::NONE is used, indicating that
no state information is available.
That would e.g. prevent attempting to restore the size
of dialogs in Calc, e.g. when triggering the
"Data" -> "Statistics" -> "Sampling..." dialog multiple
times.
E.g. when triggering it, maximizing it, then closing it,
triggering it again, it would no longer be maximized
on reopen.

There is still another problem when restoring
the state, but that will be addressed separately in
upcoming commit

    Change-Id: Ic3860a83572126244ea625c5e4c97eeebcf8e4b3
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Tue Jul 21 15:41:23 2026 +0200

        tdf#130857 qt weld: Don't always show window when setting state

Change-Id: I36d7df2c895c0621ae7dcca5e92fbbc0fcd5a3ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208398
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-23 23:22:05 +02:00
Michael Weghorn e588b58d5c sc: Pass ChildControllerWrapper's SfxBindings param by ref
This also allows to drop a null check in
ChildControllerWrapper::getTabViewShell.

Change-Id: Idc86b64f8f2f9752bc1f5c8004eeee3b7df77d0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208397
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-23 23:21:57 +02:00
Michael Weghorn 2dbe94054f sfx2: Pass SfxWorkWindow::{Create,Remove}ChildWin_Impl param by ref
This makes clear it's always non-null and therefore
safe to dereference.

Change-Id: I4d371720bab174a5d656da714cf8229ab3e66380
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208390
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-23 23:21:49 +02:00
Michael Weghorn ab163614b2 sfx2: Switch SfxDockingWindow::m_pBindings to reference
... and rename accordingly.
This makes clear it's always non-null.

Change-Id: Idbb24dc0d36a9152d1d638b6e6ee62a00ec9eae0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208388
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-23 23:21:42 +02:00
Michael Weghorn a81cc28ba6 sfx2: Pass SfxDockingWindow's SfxBindings param by ref
With the refactoring from previous commits in place, it's
clear that all callers pass a non-null SfxBindings*
param.
Switch the param to a reference, to make that clear
and prepare for further refactoring.

Change-Id: Id9f1487dba4b84860f9afa52ff9ffb4dd7b1d2c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208387
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-23 23:21:34 +02:00
Michael Weghorn b8cee3464f svx: Pass SvxColorDockingWindow's SfxBindings param by ref
This allows to drop two null checks in the ctor.

Change-Id: If5f33523eb8693de9c4bc4b4f481cc798a65766e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208386
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-23 23:21:26 +02:00
Michael Weghorn a7403afe1b svx: Pass NavigatorFrame's SfxBindings param by ref
Change-Id: I0773f5ce87db4c9ff7c56ab6f041a5bca51e91d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208385
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-23 23:21:18 +02:00
Michael Weghorn 5069e4a573 svx: Pass FmFilterNavigatorWin's SfxBindings param by ref
Change-Id: I5b28ed9271e8445015cb48824f705f21b4156f87
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208384
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-23 23:21:09 +02:00