Commit graph

502157 commits

Author SHA1 Message Date
Michael Weghorn
ae55831f16 a11y: Make param const to avoid const_cast in caller
Make the `pWindow` param for `ImplFindDlgCtrlWindow`
a const pointer, which removes the need to
`const_cast` when calling the function in
Window::getLegacyNonLayoutAccessibleRelationMemberOf.

Change-Id: I2225f5c4be33060c1e3fddd5e83760e68856585d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177245
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-11-25 13:44:13 +01:00
Caolán McNamara
9f35c2b6cd move SdViewOptions options down to ViewShellBase
ViewShellBase is the SfxViewShell and is the analogue of the equivalent
writer/calc SfxViewShell's, while a DrawViewShell is one of multiple
sd::ViewShells that can exist inside that SfxViewShell

Issue:
* When creating new shell instances, background color is fetched from application configuration.
* When multiple users are active on an Impress document, if one switches to notes view, a new shell is created.
* Background color for the new shell is fetched from app colors.
* If another user has switched to dark mode, the user which just switched to notes view, will see dark mode for their background.

Moving the SdViewOptions options down the ViewShellBase means that
multiple sd::ViewShells hosted within that ViewShellBase share the same
view settings.

Change-Id: Id875260dda89311ab8029ead08b47f80fd14604f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177253
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-25 13:40:31 +01:00
Szymon Kłos
3a00e589ce slideshow: lok: export bounds for animated layers
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Iccc0993fd9736842fc3e9783306d21aabc813e5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173121
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177249
Tested-by: Jenkins
2024-11-25 13:39:25 +01:00
Caolán McNamara
c20db9a219 cid#1607047 Overflowed integer argument
Change-Id: I60c991ba32c85ed872c6086104774259d1ac3b24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177239
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-25 13:30:09 +01:00
Sahil Gautam
81a6c8704f tdf#85976 Use correct labels in 'Handle Duplicate Records' dialog
+ 'Records:' to 'Compare by:'
+ if row is selected in 'Compare:', 'Header:' checkbox should be labeled as
  'Data contains column headers' and vice versa for column

Change-Id: Ic9dfbab9a5636312c40b6945af3abdcd9b190310
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177230
Tested-by: Jenkins
Reviewed-by: Sahil Gautam <sahil.gautam.extern@allotropia.de>
2024-11-25 13:15:57 +01:00
Miklos Vajna
95efd80fca cool#10582 sd lok: insert curve shapes directly
Dispatching .uno:Line in LOK mode inserts a line shape with defaults at
the center of the current slide, but dispatching .uno:Bezier_Unfilled
starts an interactive mode where the preview is not exposed in LOK, so
looks weird.

.uno:Line works because DrawViewShell::FuPermanent() actives the "create
directly" flag for SID_DRAW_LINE.

Fix the problem by doing the same for SID_DRAW_BEZIER_NOFILL in the next
block: we get a curve shape with reasonable defaults with this.

If an interactive curve drawing mode is wanted for LOK in the future,
then that would be handled outside LOK anyway, with taking the already
drawn curve's properties at UNO command dispatch time.

Change-Id: I03feded76578575ecfbd4a0d79c7ca1a31e37093
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177250
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-11-25 12:51:56 +01:00
Caolán McNamara
1c49a6d5aa cid#1607224 Overflowed return value
Change-Id: I297159aec76a497c5082c70adc0c2e45878322a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177240
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-11-25 11:28:56 +01:00
Caolán McNamara
7e1ecd89fb Labels can just use mnemonic-widget to indicate what they label
the more complex label-for/labelled-by only need to get used
when when using something non-standard as a "label"

Change-Id: Ibbe13b868622646e20357703e31cfc26e31fac7a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177238
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-11-25 10:59:29 +01:00
Szymon Kłos
51b2f0a1c7 slideshow: lok: correct z-order
we need to keep the order correct, especially
when we have stacked shapes which are animated
and some are non-animated.

in case:

non-anim
anim
non-anim
anim

don't allow to join non-animated layers into one

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic5d94478b691a80fd62853946ebedec075963f44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173116
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177236
Tested-by: Jenkins
2024-11-25 10:36:38 +01:00
Szymon Kłos
4ffd7c1456 slideshow: fix initVisible value
be sure we don't overwrite the real "visibility"
value when other property is read

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ied2285e8183665b5b48d10d74e1cc052cf8edcbe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173110
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177235
2024-11-25 10:36:31 +01:00
Szymon Kłos
dfb779ff76 lok: slideshow: render animated objects as separate layers
don't merge animated and non-animated objects on single
layer

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I259507e08c95c3662e60f7691646395d1a840465
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173084
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177228
Tested-by: Jenkins
2024-11-25 09:21:54 +01:00
Szymon Kłos
505775873f lok: slideshow: render background as separate layer
we still take color from the JSON

Change-Id: I6b83cc8aaaa3e9127d85ec06589bac7ed4472f71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173083
Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177227
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2024-11-25 09:21:47 +01:00
Miklos Vajna
ff68535068 svx: prefix members of SdrDragMove
See tdf#94879 for motivation.

Change-Id: I4945cec5ee88700360c5a8ff706105dbc7f95f6e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177229
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2024-11-25 09:21:11 +01:00
Balazs Varga
58e255c8e2 Related: tdf#157233 - A11y: fix wrong Issue ID in options_list
DocumentStyleLanguage used the wrong AccessibilityIssueID.

Change-Id: I7bbb9737abc9b36972376e86996e65443014b178
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177040
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2024-11-25 08:52:58 +01:00
Aron Budea
69e881925f tdf#163486 PVS V581 The conditional expressions of the 'if' statements situated
...alongside each other are identical.

Started when a call inbetween was removed in
e50f6c0239.

and
V1053 Calling the 'EnableRTL' virtual function in the constructor
...may lead to unexpected result at runtime.

and
V1051 Consider checking for misprints. It's possible that the
...'nTopPos' should be checked here.

V1028 Possible overflow. Consider casting operands of the...
'nStartCol + 1' operator to the 'sal_Int64' type, not the result.

Change-Id: Ided25ab6dc9e9d4a1c72a1b809de586c7b890ce0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177218
Tested-by: Jenkins
Reviewed-by: Aron Budea <aron.budea@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-25 08:45:52 +01:00
Tomaž Vajngerl
c969795bab pdf: Introduce a IPDFEncryptor and use it in PDFWriterImpl
The idea of IPDFEncryptor is to be the interface to encrypt the
stream/string in the same way, irregardless which PDF encryption
version/revision we are using.

Change-Id: Ie7835384f1be5a44c53985b01c8187323400aa0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176890
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-11-25 08:25:53 +01:00
Bogdan Buzea
a7041bb309 tdf#152299 - Remove unused define(s) from C/C++ files
Change-Id: Id7b5e1675963fd4b65974f4da39dbdccd45af549
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177143
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-25 08:13:33 +01:00
Szymon Kłos
c913af2482 slideshow: extract initial visibility of the animation target
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I35ea503d254f36c8ab7307b157c87d5c2e0a8e1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173050
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177224
Tested-by: Jenkins
2024-11-25 07:21:28 +01:00
Szymon Kłos
8bbc65fa69 Identify layers so can be recognized as animation target
it has to match convertTarget result from unomodel.cxx
which is used on export of animations

Change-Id: I61df0b82681628722516c17c110acd90ce25b881
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172875
Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177223
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2024-11-25 07:21:15 +01:00
Aron Budea
9646eddfa0 tdf#163486 PVS V1023 A pointer without owner is added to the container
...by the 'emplace_back' method.

Change-Id: I76a0a655d5fc5b123cd1018cb010ff9c9625c1d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177226
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Reviewed-by: Aron Budea <aron.budea@collabora.com>
2024-11-25 06:50:14 +01:00
Aron Budea
fbfa2769f2 tdf#163486 PVS V1037 Two or more case-branches perform the same actions
second identical branch was added in
d519cbe892

and
V530 The return value of function 'GetTitle' is required...
to be utilized

the unnecessary GetTitle() call that was duplicated in
d519cbe892 was there since
9ae5a91f79 (initial import)

Change-Id: Ied25faf177184cc1b1ca4a512285232bf966c1e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177209
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Reviewed-by: Aron Budea <aron.budea@collabora.com>
2024-11-25 06:49:03 +01:00
Mike Kaganski
f4253af367 Avoid assigning unused value
Change-Id: Ic6c59500805a8710150f083ff089b2e1c4c36530
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177217
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-11-25 05:33:01 +01:00
Caolán McNamara
737c4e624f Resolves: tdf#164026 explicitly make these insensitive
Change-Id: Ifa399d9bb42bad8e5209f5937052fa9b616f8914
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177215
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-24 20:34:12 +01:00
Caolán McNamara
d3c2fcc3f3 Resolves: tdf#163772 move margin into ValueSet itself
instead of using margin property in .ui where size_request
doesn't take such margins into account, while pref_size does.

Change-Id: I7c557fd63c438515814ad32b9627895c27c13b81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177213
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-24 17:25:26 +01:00
Mike Kaganski
c568149596 No need to create PossibleHyphens for no-hyphenation case
Change-Id: Idd509e40f96373fc29d0f313bcb5c14ee8490f17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177212
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-24 17:19:14 +01:00
Michael Weghorn
2f5acb3545 tdf#130857 qt weld: Notify about Expander state change
Call weld::Expander::signal_expanded when the
QtExpander expanded state changes, e.g. when
its button gets clicked.

In order to do that, introduce a signal in
QtExpander and connect to that in
QtInstanceExpander.

With this in place, a breakpoint in
weld::Expander::signal_expanded now gets
hit as expected when (un)expanding the
expander in the "Set Password" dialog triggered in Writer
using "File" -> "Save As", check "Save with password"
checkbox and press "Save" when using the qt6 VCL
plugin with SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

This implements what was mentioned as still
missing in earlier commit

    Change-Id: I7e3a332c0417b1897ae57d7d4c29609245fb5e19
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Sun Nov 24 01:20:31 2024 +0100

        tdf#130857 qt weld: Add QtInstanceExpander

as

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

Change-Id: I9cd1b2cc99018f84ba930d55399953266119bed0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177199
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-11-24 17:05:02 +01:00
Michael Weghorn
5e4aa64635 tdf#130857 qt weld: Support "Save with password" dialog
Declare support for the "Set Password" dialog that can
be triggered in Writer using "File" -> "Save As", check
"Save with password" checkbox and press "Save" to trigger
the dialog.

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 makes use of QtInstanceExpander added in

    Change-Id: I7e3a332c0417b1897ae57d7d4c29609245fb5e19
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Sun Nov 24 01:20:31 2024 +0100

        tdf#130857 qt weld: Add QtInstanceExpander

Currently, I see a small rendering issue when
opening that dialog and expanding the expander:
The "Enter password to allow editing" and
"Confirm password" label text is a bit cropped.
It's shown fine when manually enlarging the dialog a bit,
however.

Change-Id: I37775fa3a39d621696d2a6aaa49bd11d6cfb9350
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177198
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-11-24 17:04:54 +01:00
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