Commit graph

501980 commits

Author SHA1 Message Date
Michael Weghorn
ec760b2110 tdf#130857 qt weld: Add QtInstanceExpander
Add a new QtInstanceExpander class that is the
weld::Expander implementation using a native
Qt widget. It uses the custom QtExpander widget
added in

    Change-Id: Id2366834cb542eba613ea087e70f3a812d20fa89
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Sun Nov 24 00:07:44 2024 +0100

        tdf#130857 qt weld: Implement "GtkExpander" equivalent

Extend QtExpander to provide what's needed
to implement the QtInstanceExpander methods.

Let QtInstanceBuilder::weld_expander return an
instance of the new class.

Signal handling still needs to be implemented
(calling `weld::Expander::signal_expanded` when
the expanded state is toggled).

QtInstanceExpander is e.g. needed by the "Set Password"
dialog. ("File" -> "Save As", check "Save with password"
checkbox and press "Save" to trigger the dialog.)

Change-Id: I7e3a332c0417b1897ae57d7d4c29609245fb5e19
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177197
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-24 17:04:48 +01:00
Michael Weghorn
a60ccb091e tdf#130857 qt weld: Support "Safe Mode" dialog
Now that "GtkExpander" support has been implemented,
declare support for the "Safe Mode" dialog that can
be triggered via "Help" -> "Restart in Safe Mode"
and confirming with "Restart".

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

Change-Id: I67ef04356a5147c24442cd3ec84e4bbc644b3a71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177196
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-24 17:04:38 +01:00
Michael Weghorn
62595170ec tdf#130857 openlockedquerybox.ui: Define grid children in order
Switch the order in which the children of the grid in the
.ui file are defined so that the order matches the visual appearance,
which makes sure that tab focus order with the Qt-based VCL plugins is
correct as well in that dialog when using native Qt widgets after
support for that dialog was added in

    Change-Id: If30736e70172c6b25feee0072c952274754aa81e
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Sun Nov 24 00:22:26 2024 +0100

        tdf#130857 qt weld: Support "Document in Use" dialog

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.

Change-Id: Ie18c7b91911fea612167510e9bb098d63e1e9227
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177195
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-11-24 17:04:31 +01:00
Michael Weghorn
a0ca2e6817 tdf#130857 qt weld: Support "Document in Use" dialog
Declare support for the dialog shown when trying to
open a file that's already opened by another user
(or more exactly, for which a lock file suggesting
that it's opened by another user or LO instance
exists).

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

This is the first supported dialog making use of "GtkNotebook"/
QtInstanceNotebook, i.e. of what was implemented in previous commit

Sample steps to see that dialog:

* start Writer, save document as /tmp/test.odt
* kill LibreOffice
* open the lock file ( /tmp/.~lock.test.odt# ) in a text
  editor and change the user name to a dummy one, save.
* start LO with qt6 VCL plugin and try to open the document

Change-Id: If30736e70172c6b25feee0072c952274754aa81e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177194
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-24 17:04:25 +01:00
Michael Weghorn
9ca43e71e2 tdf#130857 qt weld: Implement "GtkExpander" equivalent
Implement support for "GtkExpander" objects in .ui
files. As Qt doesn't seem to have any equivalent, add
a new QtExpander class that subclasses QWidget and
has a button that can be used to toggle visibility
of the widget that is the GtkExpander's [1] content child.

For a visual appearance similar to GtkExpander,
set an icon for the button ("go-down" and "go-next"
from the icon theme, which are arrows like the ones
shown on a GtkExpander, at least with the Breeze
icon theme).

In QtBuilder, implement handling for "GtkExpander"
objects:

* Create an instance of the new QtExpander
  class.

* Identify the content child, which can be distinguished
  from the label child by the fact that the latter
  has a "label" child type set, see also previous
  commit

    Change-Id: I3e308a6642d72b55d0ccc597dac716b236c22d61
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Sat Nov 23 20:54:47 2024 +0100

        tdf#130857 Pass child type to WidgetBuilder::insertObject

* Erase the "visible" property for the content child,
  as otherwise the content widget would be initially
  visible even if the expander is set to not be
  expanded. (QtExpander takes care of this, so
  ignore the property set in the .ui file.)

* For the label child in GtkExpander, simply take
  over its text to QtExpander's button, then mark
  the label for deletion, as it's not needed
  otherwise.

Support for the "Document in Use" dialog that
has a GtkExpander and thuse makes use of this
will be declared in a separate commit.

[1] https://docs.gtk.org/gtk3/class.Expander.html

Change-Id: Id2366834cb542eba613ea087e70f3a812d20fa89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177193
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-11-24 17:04:18 +01:00
Michael Weghorn
7738a10969 tdf#130857 weld: Move Window::set_centered_on_parent to Dialog
weld::Window::set_centered_on_parent only ever gets
called for weld::Dialog instances, so move it to the
weld::Dialog subclass.

For the Qt implementation, no longer trigger an assert because
of the method being unimplemented (doing nothing), as QDialog
opens centered on its parent toplevel by default.
Quoting from the QDialog doc [1]:

> Note that QDialog (and any other widget that has type Qt::Dialog) uses
> the parent widget slightly differently from other classes in Qt. A
> dialog is always a top-level widget, but if it has a parent, its default
> location is centered on top of the parent's top-level widget (if it is
> not top-level itself).

(API for moving a QWidget to a different position like
QWidget::move [2] exists, but would only work on X11/XWayland,
not Wayland.)

[1] https://doc.qt.io/qt-6/qdialog.html#details
[2] https://doc.qt.io/qt-6/qwidget.html#pos-prop

Change-Id: I14d41f91e5297c6e58cb4edb2ee98f19814d45cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177192
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-24 17:04:11 +01:00
Michael Weghorn
a18672dd3e tdf#130857 Pass child type to WidgetBuilder::insertObject
In WidgetBuilder::handleChild, pass the child type
not only to WidgetBuilder::tweakInsertedChild, but
also to WidgetBuilder::handleObject (add a new param
for that) and from there down into the virtual
WidgetBuilder::insertObject, so it can be evaluated
by subclasses when creating new widgets.

While it is not used yet, an upcoming commit will
make use of it in QtBuilder, in order to distinguish
between the two "GtkExpander" children: the label and
the actual content child.

As described in the "GtkExpander as GtkBuildable" doc [1]:

> The GtkExpander implementation of the GtkBuildable interface supports
> placing a child in the label position by specifying “label” as the
> “type” attribute of a <child> element. A normal content child can be
> specified without specifying a <child> type attribute.

[1] https://docs.gtk.org/gtk3/class.Expander.html

Change-Id: I3e308a6642d72b55d0ccc597dac716b236c22d61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177191
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-24 17:04:01 +01:00
Caolán McNamara
6272747e06 cid#1607832 Overflowed constant
Change-Id: Ie0d14ef985bebf4acdb08c460675ebba75f88a8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177166
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-11-24 16:40:18 +01:00
Laurent Balland
190ccb6539 tdf#161930 Copy only once mimetype
mimetype must not be zipped, just stored.
mimetype was correctly stored with the first zip command,
but mimetype was also present in the files list on the second zip command.
This patch remove mimetype from the files list of the second zip command.

Change-Id: Ie66f06103bbad2700eee4986df878b9ebd4c0a09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175930
Tested-by: Jenkins
Reviewed-by: Laurent Balland <laurent.balland@mailo.fr>
2024-11-24 16:33:47 +01:00
Mike Kaganski
b44339c215 Deduplicate calls to hnj_hyphen_hyphenate3
Change-Id: Iecd3cf707fd692a10382f3a6be02c2dd94f02111
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177201
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-24 16:11:30 +01:00
Caolán McNamara
12cad7e619 cid#1607163 silence Overflowed return value
and

cid#1608078 Overflowed return value
cid#1608461 Overflowed return value

Change-Id: Ic5fa20994c5be5d6c09a21c0bd1e3530ae9a6941
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177164
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-24 15:14:59 +01:00
Caolán McNamara
aed4e00c4f UserInstallation may change in kit-mode
So the setting fetched at ctor time for UserInstallation (and
BRAND_BASE_DIR) may no longer be true, so expanding variables based
on those earlier seen values results in unwanted paths.

add XInitialization to SubstitutePathVariables (like done for
PathSettings) to allow reiniting these explicitly once.

Change-Id: Ia930ea71cb09adc91d6d47ee047c44b24222e8a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175961
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 410f6b50eb44276b1d2095c844244ef4d0ddefaa)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177109
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-24 15:14:48 +01:00
Caolán McNamara
53d54929b5 cid#1606852 silence Overflowed constant
Change-Id: I94d75d6c2b69937e5d0f29b498518999b1f49120
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177167
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-11-24 15:14:37 +01:00
Patrick Luby
16b629cf08 tdf#157312 and tdf#163945 Lower Skia flush timer priority on macOS
On macOS, flushing with Skia/Metal is noticeably slower than
with Skia/Raster. So lower the flush timer priority to
TaskPriority::POST_PAINT so that the flush timer runs less
frequently but each pass copies a more up-to-date offscreen
surface.

Unfortunately, lowering the priority causes tdf#163734 to reoccur.
When a dockable window is dragged by its titlebar, a rectangle
may be drawn in its parent window. However, the Skia flush
timer doesn't run until after the mouse button has been
released (probably due to lowering of the Skia flush timer's
priority to fix tdf#163734). So run the parent frame's Skia
flush timer immediately to display the rectangle.

Change-Id: I289eab85a087cb76a751dc6b777342b8dee49e1c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177190
Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
Tested-by: Jenkins
2024-11-24 14:45:24 +01:00
Mike Kaganski
ec775c8ada Deduplicate a bit
Change-Id: I9a19dcc2fbf5297fe391fcd3644843eb51afdb9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177200
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-24 14:44:50 +01:00
Caolán McNamara
b4cb8dd96f cid#1606622 silence Overflowed integer argument
Change-Id: I8a25e19d3de1515a03fe478fa28c1f5eec0963c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177165
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-24 12:52:44 +01:00
Caolán McNamara
948e99fb30 cid#1555216 COPY_INSTEAD_OF_MOVE
and

cid#1555525 COPY_INSTEAD_OF_MOVE
cid#1555562 COPY_INSTEAD_OF_MOVE
cid#1555676 COPY_INSTEAD_OF_MOVE
cid#1556099 COPY_INSTEAD_OF_MOVE
cid#1556527 COPY_INSTEAD_OF_MOVE
cid#1556607 COPY_INSTEAD_OF_MOVE
cid#1557084 COPY_INSTEAD_OF_MOVE
cid#1557141 COPY_INSTEAD_OF_MOVE
cid#1557937 COPY_INSTEAD_OF_MOVE
cid#1556099 COPY_INSTEAD_OF_MOVE
cid#1557774 COPY_INSTEAD_OF_MOVE

Change-Id: Ifd716627d985dd43f4d1a9ce3df151e519fab03a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177163
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-11-24 12:52:17 +01:00
Mike Kaganski
7eaf28b0a2 tdf#164005: also initialize locales in hyphenate()
... which is also used in queryAlternativeSpelling

Change-Id: I7f0bbbc6e598d56156efe1446f422f9674ed6f25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177187
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-24 11:28:23 +01:00
Julien Nabet
b3dd1e92af Revert "tdf#152299 - Remove unused define(s) from C/C++ files"
This reverts commit 16a5ae7c90.

It seems to break public API.

Change-Id: I0ef2c6e975b4cf20b9894ddf33f36444e2230ca4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177168
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-11-24 09:55:40 +01:00
Julien Nabet
3f0da431b3 Revert "tdf#152299 - Remove unused define(s) from C/C++ files"
This reverts commit aee4e18411.

It seems to break stable API.

Change-Id: I64b7b1b5a5f5d53649a6117de34790238313ed23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177170
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2024-11-24 09:55:28 +01:00
Mike Kaganski
d3d176cc65 Simplify a bit
Change-Id: I0b3e02669b326533f4579f57a41a16da53cf8ff4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177188
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-11-24 09:34:12 +01:00
Mohamed Ali
c069f50a9e tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro
Change-Id: I958365b3db058ec809702a5ddde1d153467f21ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177158
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2024-11-24 09:29:59 +01:00
Mike Kaganski
f9cac88fc2 Let ESelection use EPaM for simplification
And drop EPosition, which duplicates EPaM, except for its default
ctor (used in a single place).

Change-Id: I48bb6dafcba84465d61579df0ec71b815945532a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177075
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-11-24 08:12:55 +01:00
Mike Kaganski
7fce875718 Turn SD_MOD macro to a function
Change-Id: I1303e9d48e92ac00eee12af9ed299cdaad2ce009
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177072
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-24 07:43:12 +01:00
Mike Kaganski
2ca32d2905 Turn SW_MOD macro to a function
Change-Id: Ide1f6fd2fc8a80b31353a14e416505a2349cea2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177071
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-24 07:43:07 +01:00
Mike Kaganski
5166efaa64 Turn SC_MOD macro to a function
Change-Id: I5fc11037902bc6200fdaf4749260efe8e658bdce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177070
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-24 07:43:02 +01:00
Mike Kaganski
a1e7302a65 GetAttrOutlineContentVisible may be const
Change-Id: If94b948ddcc2fac9bce254947b78afc1c6f0383e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177078
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-23 20:22:28 +01:00
Jim Raykowski
662c6a6d70 related tdf#157255: add DisableLayerHighlighting expert setting
This allows the layer objects overlay to not be done when the value set
for DisableLayerHighlighting is less than the number of objects in the
layer of the tab which the mouse is hovered over in the layer bar.

Change-Id: Ie49ecb11bfb029ada57824c0acbbd133e1fe83b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176809
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2024-11-23 18:48:17 +01:00
Mike Kaganski
fa706421c9 Avoid new string allocations, when only checking if empty
Change-Id: I35a44dedd27b5c3470ed035e64ec0461d8d0cbdf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177074
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-11-23 16:05:36 +01:00
Mike Kaganski
ee331d51c8 Reduce copying of ScEditEngineDefaulter's SfxItemSet
Change-Id: Ifea96f2cf586b4e5b63761e2f03944dade764430
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177073
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-11-23 16:05:27 +01:00
Bogdan Buzea
d33b24d62f tdf#152299 - Remove unused define(s) from C/C++ files
Change-Id: I9b27cfb715f6cd0a9b6ea21da9cb24fc8d8ec739
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177050
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-11-23 15:18:31 +01:00
Bogdan Buzea
c1a9fa9b2c tdf#152299 - Remove unused define(s) from C/C++ files
Change-Id: I377154880c52685e5b1588221d631c51967c490a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177047
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2024-11-23 15:15:50 +01:00
Bogdan Buzea
d2adf4b1d3 tdf#152299 - Remove unused define(s) from C/C++ files
Change-Id: I93494b4dec546d48b7dced2f1a6c774177c99c86
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176782
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-11-23 15:15:03 +01:00
Bogdan Buzea
23392c3c12 tdf#152299 - Remove unused define(s) from C/C++ files
Change-Id: I0a6d9a12f3e6d84ad4ba665ba16dd05fb6f9786f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177048
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2024-11-23 15:12:28 +01:00
Bogdan Buzea
56b32b808b tdf#152299 - Remove unused define(s) from C/C++ files
Change-Id: I95b7b249082f5c2755ca54a0656912011d2cb116
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176983
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-11-23 15:11:28 +01:00
Bogdan Buzea
9d862186c0 tdf#152299 - Remove unused define(s) from C/C++ files
Change-Id: I161af7b70421a819f5ecb6b95867e6fa142fe3ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177046
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2024-11-23 15:10:47 +01:00
Bogdan Buzea
f66d3e5502 tdf#152299 - Remove unused define(s) from C/C++ files
Change-Id: I183330f8c2e947d6c8dffbcabc7da6c115e08a8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176963
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-11-23 15:00:23 +01:00
Bogdan Buzea
d4bc4d9e9f tdf#152299 - Remove unused define(s) from C/C++ files
Change-Id: I3207e070fba8407fd8475c8d774b3a500cae8e17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176965
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-11-23 14:59:00 +01:00
Bogdan Buzea
2a3e7a751c tdf#152299 - Remove unused define(s) from C/C++ files
Change-Id: If150b8fec5350cb513550711a61923cc1a273a80
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177052
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-11-23 14:56:18 +01:00
Bogdan Buzea
bdb5f278a7 tdf#152299 - Remove unused define(s) from C/C++ files
Change-Id: Id74c10f5965d97bf24b49fc9ee777bf7b0ad251d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177051
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2024-11-23 14:54:15 +01:00
Bogdan Buzea
2914206849 tdf#152299 - Remove unused define(s) from C/C++ files
Change-Id: Ided473c985f8bdca007d3da34f92e42fb5080f54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177099
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-11-23 14:51:25 +01:00
Bogdan Buzea
f57f05e574 tdf#152299 - Remove unused define(s) from C/C++ files
Change-Id: I01cc9d30499783e531777eb17e332490afab4d6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177098
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2024-11-23 14:50:42 +01:00
Simon Chenery
c6fd44d819 tdf#158237 Use C++20 contains() instead of find() and end()
Change-Id: Ib0ed8868b94c1470768a95fb26767cf25fe4bf8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177028
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2024-11-23 14:47:02 +01:00
Bogdan Buzea
3f2d10e2a5 tdf#152299 - Remove unused define(s) from C/C++ files
Change-Id: Id5d1b36ba734c3cf10b83f472ab5afe3a142a464
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177060
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2024-11-23 13:21:49 +01:00
Bogdan Buzea
c4338ba856 tdf#152299 - Remove unused define(s) from C/C++ files
Change-Id: I38b932ab81842b5f209d89ef5229d61e10f3ffd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177097
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2024-11-23 13:20:58 +01:00
Bogdan Buzea
89c431aa99 tdf#152299 - Remove unused define(s) from C/C++ files
Change-Id: I1e460b817dd876977e520251b6a79d9fb9c283d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177100
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-11-23 13:19:32 +01:00
Bogdan Buzea
9579907205 Spelling mistake in code
Change-Id: I9db111c16865a2b7514e62a21a66d5497cda91fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176966
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-11-23 13:17:13 +01:00
Michael Weghorn
df39550839 tdf#130857 qt weld: Hide widget marked for deletion
Add a helper method QtBuilder::deleteObject
that takes care of marking no longer needed
objects for deletion and use it in the 3 places
so far calling QObject::deleteLater themselves.

If the object marked for deletion is a widget,
hide it as well, as it could otherwise still
be "in the way".
This was seen wit the edit (QLineEdit) of the editable
combobox in the "File" -> "Properties" dialog,
"General" tab (in a WIP branch for adding support
for that dialog), where the unnecessary edit was
shown on top of the combobox, hiding the combobox
content + dropdown button.

Change-Id: Ie299b80824c94d40cfac9f7962c9bd4ba95b446d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177057
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-11-23 10:49:13 +01:00
Michael Weghorn
3e65d085ef tdf#130857 qt weld: Call checkbox toggled handler
Change-Id: I0943a2d8e35acea8e1af97bdd151bba65b0af24a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177056
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-11-23 10:49:05 +01:00
Michael Weghorn
f928b97cfa tdf#130857 qt weld: Handle invalid ID in QtInstanceNotebook::get_page
If QtInstanceNotebook::get_page gets called with
and ID that none of the existing pages actually have,
return nullptr early and don't try to QtInstanceContainer
instance for the null widget, which would trigger an
assert when nullptr is passed to the QtInstanceWidget
base class ctor.

Calling QtInstanceNotebook::get_page with an ID for
which no page exists yet is what
SfxTabDialogController::AddTabPage does explicitly
before asserting a page to assert that there isn't
such a page yet.

SalInstanceNotebook::get_page and GtkInstanceNotebook
also have specific handling for that case.

Change-Id: Ib2044fd4c9f986f2252afed5754a6383f940e5e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177055
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-11-23 10:48:59 +01:00