Commit graph

498044 commits

Author SHA1 Message Date
Stephan Bergmann
499141ecf2 Restrict SAL_RET_MAYBENULL to LIBO_INTERNAL_ONLY
...at least for now, as long as it is not needed in any published UNO include
files

Change-Id: I25a1697e1b9ffa5afce0e29cc64be66bf2ebbc57
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170637
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-07-17 21:39:22 +02:00
Caolán McNamara
88d10b3344 cid#1606633 Overflowed constant
in the end, it doesn't make sense to allow either of these to be 0

Change-Id: Ie07620c9a168876abd7532a6f52bc7ebd12b83c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170638
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-17 21:38:59 +02:00
Patrick Luby
ee76e5041c tdf#162062 only apply fix for tdf#161833 if there is a palette
Change-Id: I50d13ed336110eb5e65e99dd5d4a6c6defe6bc50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170627
Tested-by: Jenkins
Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
2024-07-17 21:36:48 +02:00
Vasily Melenchuk
0c6642ed3a vcl: support for Windows ITaskbarList3 interface
And a demo implementation for these features as a taskbar window
will become red once LO is displaying any error message.

Change-Id: Ifc04026c699059da2e457de2c69e7363e756109c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166740
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-07-17 21:05:15 +02:00
Moritz Duge
a7327e95ce xmlsecurity: Add UItest (save GPG encrypted ODF)
Change-Id: I09dd13334e0d3da5f6004312bae69b5c77120434
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167904
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-07-17 21:02:52 +02:00
Caolán McNamara
d82fffff53 cid#1555302 Different smart pointers managing same raw pointer
ScUndoWrapper::ForgetWrappedUndo resets the std::unique_ptr
and deletes the owned pointer, that's not what we want to happen here.

looks to have gone wrong in:

commit 9767537e22
AuthorDate: Tue Jan 17 10:11:31 2017 +0200

    new loplugin: useuniqueptr: sc part 2

Change-Id: Ib4a7d615bc2e354f76b044b5b5e5d2f17dbebf0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170632
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-07-17 20:52:22 +02:00
Caolán McNamara
5bc5c936e1 cid#1606961 Overflowed array index read
using a constexpr sal_uInt16 for the eMax limit, and dropping
o3tl::narrowing might be enough to clear this bogus warning

Change-Id: I6f7fd468333b39d597eccacf37e6a64926dfc015
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170635
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-17 20:44:13 +02:00
Caolán McNamara
6449247af9 cid#1606549 Dereference null return value
Change-Id: Ic9c25d9b4ac3d8e368848cb9bbc42f5076bc321f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170631
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-17 20:43:30 +02:00
Ilmari Lauhakangas
4058ca814a tdf#158803 related: remove unnecessary comments
Change-Id: I25093100db0473bb907036b4f80e1bbc440cfb8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170639
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-07-17 19:39:56 +02:00
Mike Kaganski
68a96f7473 Use IsRunningUnitTest / IsRunningUITest consistently
The functions are moved to o3tl as inline functions.

Change-Id: Ief7d7e292ef15e055ad04ab5707e5e6a2a05b916
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170636
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-07-17 19:15:31 +02:00
Caolán McNamara
2a20a894b0 cid#1608071 Out-of-bounds access
Change-Id: Ia258bb10c015150f3ff8f978e975a033e981aa92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170633
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-17 18:25:54 +02:00
Mike Kaganski
69586e8381 UI tests: use a dedicated desktop on Windows
Similar to commit 1f24d35033 (cppunittester:
use a dedicated desktop on Windows, 2023-07-09), this change allows to run
UI tests on Windows without them interferring with what you are doing.

The code testing LIBO_TEST_DEFAULT_DESKTOP environment variable to avoid
the separate desktop, and creating it, is extracted to a new function in
systools.

Change-Id: I6df3cb4ae581ae289e49b47d3135d01f632fbd95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170615
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-07-17 18:13:19 +02:00
Jonathan Clark
aa938fe03c tdf#150621 Changed Korean word counting to use words
Previously, Writer counted characters for all CJK languages, rather than
words. This is the correct behavior for Chinese and Japanese, which make
extensive use of ideographs. However, it is not correct for Korean.

This change adjusts the Writer word count algorithm to count Korean
words, rather than Korean characters.

Change-Id: I6e77136867baca1a7b51248886ee5fd7073ad364
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170621
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-07-17 15:45:41 +02:00
Justin Luth
c9a96f2724 NFC tdf#134204: ensure style modify signaled if parent changed
If the parent changed, we have no idea how many properties might
be involved. Therefore, there is no way that anything could
legitimately say that we haven't actually changed/don't need to notify.

This is a No Functional Change.
bContinue was never set to false when bNewParent.
bNewParent and pNewChgSet are mutually exclusive,
and the only other time bContinue was changed was if pNewChgSet.

So this patch is just a simplification.
It more clearly shows that the notify should always happen,
and is helpful to demonstrate logic changes in the following patches.

Change-Id: Iabef5ba305c80d68655a0c880301ab32ffc90792
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169896
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2024-07-17 15:33:22 +02:00
Noel Grandin
69e7000ed4 Simplify checking for "running under unit/ui test"
In various places, the code checks if we are running as a unit test or a
UI test. This code grew organically, and is most re-using environment
variables that were designed for narrower purposes.

Rather than being clever, just add two new explicit and simple
environment variables in the natural place (the command that runs them),
and check for those variables in the code.

Change-Id: Icce0997914fa0be30a5ac1f29bd870bdb5893a8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170618
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-07-17 15:21:57 +02:00
Christian Lohmaier
c1b00424f1 fix raptor build when using system-icu
Change-Id: I1671e5872deb583c1c0395ab49ab33b171d0e086
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170620
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2024-07-17 15:03:14 +02:00
Caolán McNamara
de4be29599 Resolves: tdf#158753 GtkAssistant loses current page on hide+show
gtk_assistant_unmap ...
{
    ...
    priv->current_page  = NULL;
    ...
}

gtk_assistant_map
{
    page_num = 0;
    ...
    set_current_page (assistant, page_num)
    ...
}

It doesn't automatically restore itself to the page it was on
when it was hidden, so do that explicitly.

Change-Id: If23b255193c4a65b286e036c8796d9d8a2ffcb5e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170611
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-07-17 15:03:08 +02:00
RMZeroFour
5aeb53c4b0 tdf#137525 Update ColumnValueSet (and others) to use push/pop
This patch updates the ColumnValueSet and some other parts of the
drawing code to use the Push/Pop functions of RenderContext.

Change-Id: I3fbdee9afa167facb45242bc8bad9a35758b3c0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165587
Reviewed-by: Hossein <hossein@libreoffice.org>
Tested-by: Jenkins
2024-07-17 15:01:12 +02:00
Michael Stahl
0fb25ce9ff package: don't check case insensitive duplicates for ZIP package
Turns out there's a TexMaths extension that contains files with names
differing only in case.

https://ask.libreoffice.org/t/zipexception-when-installing-an-extension/108256

There isn't a separate ZipPackage mode for OXT so just don't check in
the ZIP mode.

Change-Id: I7680c93f5f24ac566a59b131b36d855bd85100b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170616
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-07-17 14:11:38 +02:00
Andrea Gelmini
2f4d06747b Remove exec bits on rtf file
Change-Id: Ic975ecb00db43fadb3134a592e9d6fe5cd0f847b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170578
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2024-07-17 13:54:17 +02:00
Andrea Gelmini
33b80794ce Fix typo
Change-Id: I38bd197f3531b0caa4ae08ce617f0b79e66c183a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170577
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2024-07-17 13:53:44 +02:00
Noel Grandin
b7b1013fa7 fix skia crash (tdf#160646 related)
while testing the document attached to this bug I get a repeatable
skia crash (only skia is in native mode, not software rendering).

This reveals that there a couple of data structures that need to
be cleaned up while holding the SolarMutex.

Change-Id: I3ff460a4febf1ffcb27ad904224e1594ead4aa3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170612
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-07-17 12:49:36 +02:00
Michael Weghorn
97b827aa61 android: Port from deprecated "archivesBaseName"
Port from deprecated Gradle API that is planned to
be removed in Gradle 9.0, as was warned about in the
build output previously:

    > Configure project :
    Script '/home/michi/development/git/libreoffice-WORKTREE-android/android/source/liboSettings.gradle': line 22
    The org.gradle.api.plugins.BasePluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.7/userguide/upgrading_version_8.html#base_convention_deprecation
            at liboSettings_bbauwf0uak693a4tmdwwty192$_run_closure3.doCall$original(/home/michi/development/git/libreoffice-WORKTREE-android/android/source/liboSettings.gradle:22)
            (Run with --stacktrace to get the full stack trace of this deprecation warning.)
            at liboSettings_bbauwf0uak693a4tmdwwty192.run(/home/michi/development/git/libreoffice-WORKTREE-android/android/source/liboSettings.gradle:20)
            (Run with --stacktrace to get the full stack trace of this deprecation warning.)
    Script '/home/michi/development/git/libreoffice-WORKTREE-android/android/source/liboSettings.gradle': line 22
    The BasePluginExtension.archivesBaseName property has been deprecated. This is scheduled to be removed in Gradle 9.0. Please use the archivesName property instead. For more information, please refer to https://docs.gradle.org/8.7/dsl/org.gradle.api.plugins.BasePluginExtension.html#org.gradle.api.plugins.BasePluginExtension:archivesName in the Gradle documentation.
            at liboSettings_bbauwf0uak693a4tmdwwty192$_run_closure3.doCall$original(/home/michi/development/git/libreoffice-WORKTREE-android/android/source/liboSettings.gradle:22)
            (Run with --stacktrace to get the full stack trace of this deprecation warning.)

As described in the upgrading guide [1], use the "base"
configuration block in build.gradle instead.

[1] https://docs.gradle.org/8.7/userguide/upgrading_version_8.html#base_convention_deprecation

Change-Id: I358569a72b508efd31d2872d5009ac4f060398d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170610
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-07-17 12:14:37 +02:00
Michael Weghorn
89fd1a2ada android: Show all gradle warnings
Set the gradle property to show individual warnings during the
build. Without this, the build output showed:

> Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
>
> You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
>
> For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

Now, it shows the individual issues that need to be addressed:

> > Configure project :
> Script '/home/michi/development/git/libreoffice-WORKTREE-android/android/source/liboSettings.gradle': line 22
> The org.gradle.api.plugins.BasePluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.7/userguide/upgrading_version_8.html#base_convention_deprecation
>         at liboSettings_bbauwf0uak693a4tmdwwty192$_run_closure3.doCall$original(/home/michi/development/git/libreoffice-WORKTREE-android/android/source/liboSettings.gradle:22)
>         (Run with --stacktrace to get the full stack trace of this deprecation warning.)
>         at liboSettings_bbauwf0uak693a4tmdwwty192.run(/home/michi/development/git/libreoffice-WORKTREE-android/android/source/liboSettings.gradle:20)
>         (Run with --stacktrace to get the full stack trace of this deprecation warning.)
> Script '/home/michi/development/git/libreoffice-WORKTREE-android/android/source/liboSettings.gradle': line 22
> The BasePluginExtension.archivesBaseName property has been deprecated. This is scheduled to be removed in Gradle 9.0. Please use the archivesName property instead. For more information, please refer to https://docs.gradle.org/8.7/dsl/org.gradle.api.plugins.BasePluginExtension.html#org.gradle.api.plugins.BasePluginExtension:archivesName in the Gradle documentation.
>         at liboSettings_bbauwf0uak693a4tmdwwty192$_run_closure3.doCall$original(/home/michi/development/git/libreoffice-WORKTREE-android/android/source/liboSettings.gradle:22)
>         (Run with --stacktrace to get the full stack trace of this deprecation warning.)

Actually addressing them still needs to be done separately.

Change-Id: Ib749e9e21d3d5f5893c348a5070a1e994a395c6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170609
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-17 12:14:29 +02:00
Michael Weghorn
27f1851eb2 android: Set minSdkVersion without "="
Addresses this warning shown in Android Studio:

> Do not use assignment with the minSdkVersion property (remove the '=')

Change-Id: I2d9e7037f7fb6e4d1625a8625a1b3820fb6e205f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170607
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-17 12:14:20 +02:00
Michael Weghorn
053d9feec4 android: Handle cursor keys
In Android Viewer, forward the left/right/up/down keys
as such by adding the corresponding mapping to
`LOKitTileProvider#getKeyCode`.

This allows navigating through the document using those
keys e.g. on a hardware keyboard.

This addresses this comment from a Google Play Review:

> Editing, the cursor doesn't respond to the cursor keys

Change-Id: I688e5d0cc1db4f9315f9c9cb2139c22117a210e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170605
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-17 12:13:33 +02:00
Michael Weghorn
a360543249 android: Update Android Gradle Plugin to 8.5.1
... and gradle to 8.7, as suggested by Android Studio.

Change-Id: I572c1e0d62a477278fd63e613610d8d422d14a05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170601
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-07-17 12:13:25 +02:00
Miklos Vajna
8af3bab06e Related: cool#9504 sw: don't invalidate num rules when pasting into bullets
Open the bugdoc, navigate to the last para of the first page, enable
bullets for that paragraph, paste a one-liner plain text string, observe
a 274 ms hang.

Commit dc3e022866 (cool#9504 sw: don't
invalidate num rules when pasting into a non-num paragraph, 2024-07-15)
already fixed a not needed invalidation when pasting plain text at a
non-list paragraph, but here the insert point is part of a list, so we
still invalidate.

Improve this further to also not invalidate when we paste a paragraph
which is part of a list, but the numbering type is a bullet, which again
doesn't need an invalidation.

If the invalidation still happens, then the LOK case still calcs the
entire layout in one go, that's not yet fixed here.

Change-Id: I97c92aebb67ba8ca66b5820943dc1550d62bb467
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170606
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2024-07-17 11:51:28 +02:00
Stephan Bergmann
a24a534ad0 Missing gb_Library_use_libraries,embindtest
...which went unnoticed for this Emscripten-only library due to the static
nature of the Emscripten build, but is probably better to do properly anyway

Change-Id: Ie0e0b463057fbc60e17741f362a129f784f7154d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170603
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-07-17 11:04:26 +02:00
Attila Szűcs
84d63cfccf Sw: extract/transform document structure 2
inserting a ContentControl, now generate a unique ID for it...
search the lowest possible non used (non negative) number

added a GetType() function for SwXContentControl that get it from
SwContentControl, and used it for extract and transform.

Added some support for all other types.. some are not really usable
yet.

Fixed a problem when setting checkbox check, did not changed its
content.

If content is set to “”. It now set as placeholder,
and reset its content to the initial placeholder value, like:
“Choose an item” or  “Click here to enter text”
(work for checkbox, and picture CntentControl.)

Change-Id: I0fc696f73734bdfb9ac5b8fdc6891168b8d4ed5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170600
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-07-17 10:52:38 +02:00
Caolán McNamara
ddcc9515bc Resolves: tdf#161989 unset gtk emphasis defaults to light
Change-Id: Id347671ed7f9b1b36c29578566c4a82e9181aeb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170594
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-17 09:23:08 +02:00
Andrea Gelmini
bee938aaa2 Fix typo
Change-Id: I702043c566f79a81c6b40b7062cd1a83dcdaf652
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170575
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
Tested-by: Jenkins
2024-07-17 07:49:14 +02:00
Michael Weghorn
8495e77f4d tdf#155447 gtk3 a11y: Use GtkBuilder ID as accessible ID
Set the GtkBuilder ID (the ID set in the .ui file)
as the accessible ID of the GtkWidget for welded
widgets in the gtk3 VCL plugin.

For non-welded widgets, that would happen
in `atk_object_wrapper_new`, similar to how

    Change-Id: I2281d15c38a229410469c29a14fdc4221aeb3e1e
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Tue Jul 16 13:57:41 2024 +0200

        tdf#155447 qt a11y: Report accessible ID

implements it for the qt6 VCL plugin.

However, since native widgets are now used
almost everywhere for the gtk3 VCL plugin,
the implementation in `atk_object_wrapper_new`
does not take effect for most of the UI, including the
spell checking dialog mentioned in tdf#155447.
This commit makes sure an accessible ID is set for
such cases as well.

Using the GtkBuilder ID is also mentioned
in the `atk_object_set_accessible_id` doc [1]:

> Sets the accessible ID of the accessible. This is not meant to be
> presented to the user, but to be an ID which is stable over application
> development. Typically, this is the gtkbuilder ID. Such an ID will be
> available for instance to identify a given well-known accessible object
> for tailored screen reading, or for automatic regression testing.

GTK 4 currently doesn't have API to set an accessible ID.

[1] https://docs.gtk.org/atk/method.Object.set_accessible_id.html

Change-Id: I6061888f38aa40a0d3c4e680b7daa1649d5954e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170586
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-17 06:25:13 +02:00
Michael Weghorn
c64b823b74 tdf#155447 qt a11y: Report accessible ID
For Qt >= 6.8, report the accessible ID provided by
`XAccessibleContext2::getAccessibleId` when
`QtAccessibleWidget::text` gets called with param
`QAccessible::Identifier`, as introduced in
qtbase commit [1]:

    commit 9ec1de2528b871099d416d15592fcc5ef9242a64
    Author: Jens Trillmann <jens.trillmann@governikus.de>
    Date:   Wed Mar 13 14:00:38 2024 +0100

        Add Identifier role to QAccessible and use it in OS interfaces

        * Unify the default identifier creation for QAccessibleInterface on
          all platforms to be the same as the previous identifier on Linux.
          This may change some identifiers on Windows.

        [ChangeLog][QAccessible][QAccessibleInterface] Add possibility to
        add unique identifier to QAccessibleInterface to give a11y elements
        consistent identifiers.

        Task-number: QTBUG-123361
        Change-Id: I8c42956a4c497e71909d71dcb27bc87433937b69
        Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>

`VCLXAccessibleComponent::getAccessibleId` returns the ID
of the corresponding `vcl::Window` which equals to the GtkBuilder ID
set in the .ui file, e.g. "SpellingDialog" for the spelling dialog
(see `cui/uiconfig/ui/spellingdialog.ui`).

This could be used for reliable identification by ATs, e.g.
to identify the spelling dialog and specific widgets in it
(see tdf#155447) or for automated tests.

[1] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=9ec1de2528b871099d416d15592fcc5ef9242a64

Change-Id: I2281d15c38a229410469c29a14fdc4221aeb3e1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170583
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-07-17 06:25:06 +02:00
Michael Weghorn
5b9dec4caa tdf#155447 qt a11y: Don't report "Unknown" for unsupported props
Return an empty string instead of "Unknown" for
unsupported properties/text types in
`QtAccessibleWidget::text`. Explicitly returning
a non-empty string can be misleading, and e.g.
also prevents the default calculation of an
accessible ID that Qt does internally when an
empty string is returned for `QAccessible::Identifier`
which was introduced into qtbase in [1]

    commit 9ec1de2528b871099d416d15592fcc5ef9242a64
    Author: Jens Trillmann <jens.trillmann@governikus.de>
    Date:   Wed Mar 13 14:00:38 2024 +0100

        Add Identifier role to QAccessible and use it in OS interfaces

        * Unify the default identifier creation for QAccessibleInterface on
          all platforms to be the same as the previous identifier on Linux.
          This may change some identifiers on Windows.

        [ChangeLog][QAccessible][QAccessibleInterface] Add possibility to
        add unique identifier to QAccessibleInterface to give a11y elements
        consistent identifiers.

        Task-number: QTBUG-123361
        Change-Id: I8c42956a4c497e71909d71dcb27bc87433937b69
        Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>

[1] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=9ec1de2528b871099d416d15592fcc5ef9242a64

Change-Id: I5eb5bd7adbc998a74a25f3c6c9ef373bd8faf1c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170582
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-17 06:24:59 +02:00
Patrick Luby
0d1b6f9ffb Enable building with Xcode 16.0 beta 3 on macOS 15.0 public beta
Change-Id: Ia6d7fc9d8ec4e047d63a5ceb973ada997f3bf2a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170595
Tested-by: Jenkins
Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
2024-07-17 04:37:14 +02:00
Xisco Fauli
27e8099a74 tdf#42893: sw_autocorrect: Add unittest
Change-Id: I9a01eafea95e121f98153f43691bdb87fbb19e69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170573
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-07-16 23:39:04 +02:00
Xisco Fauli
f8c89be7f1 tdf#158051: sw_autocorrect: Add unittest
Change-Id: Ibde8357f37176b826683771924912ac31e31098d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169719
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-07-16 23:28:11 +02:00
Xisco Fauli
5f68f3b4d8 CppunitTest_sw_autocorrect: split into different tests
It seems CI fails on Windows sometimes.
See https://gerrit.libreoffice.org/c/core/+/170573

Change-Id: I3e48d2656f31451e07a8bd52e98c793fa409f4c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170591
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-07-16 22:05:18 +02:00
Armin Le Grand (Collabora)
d1c6eeba13 CairoSDPR: Direct support for RGBA Gradients (II)
This step wil now use the new primitive
PolyPolygonRGBAGradientPrimitive2D inside the
CairoSDPR/CairoPixelProcessor2D to directly
render gradients as RGBA, without painting
RGB (content) and A (alpha) separate and mixing
the results.
Note that this is only possible for gradients
which use the same graphical definition, see the
method 'sameDefinitionThanAlpha' and it's usages
in the code.

Change-Id: I6c46a211ea26d3e4b7bb39c7f2aaff09ec38dec5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170584
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Tested-by: Jenkins
2024-07-16 21:15:02 +02:00
Mike Kaganski
f7c9ecf3d7 Use IsRunningUnitTest / IsRunningUITest in vclplug_win, too
Change-Id: I2ae0236b13ea7e562e7c585bf308c2ef7e09176a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170589
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-07-16 19:26:24 +02:00
Noel Grandin
b40ecb9bff tdf#158397 freeze hovering mouse above animating gif
Improve the hit-test machinery so we don't need to rerender the graphic
when moving the mouse over it

Change-Id: Ide088296aa9c2be1348b8908194f47378454ae40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170587
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-07-16 18:15:33 +02:00
Miklos Vajna
09da7fd9ce tdf#162002 DOCX import, font embed: only discard subset fonts with few glyphs
Commit a9f3c11375 (tdf#162002 DOCX import:
ignore subsetted embedded fonts for editing, 2024-07-12) decided to
ignore all subsetted fonts for editing, improve this a little so we only
ignore subsetted fonts when they can't even provide an English alphabet
in any form (lowercase, uppercase).

This avoids the possible problem that a font is marked as subsetted but
it's good enough in practice and we would still throw it away for
editing.

Change-Id: I0bc0e14ffc0c039f029220991bd16d9e3254f059
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170570
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2024-07-16 17:21:05 +02:00
Noel Grandin
828b26bdc2 use generic clipboard when running UI tests
rather than the system clipboard, which makes no sense, since then the
tests interfere with each other

Change-Id: I911e88f5547dfc4f3558b9ed3ef670cef4903420
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170574
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-07-16 16:03:08 +02:00
Michael Stahl
efae4fc42d package: add additional consistency checks for local file header
Check it contains same as central directory header, also check data
descriptor if available.  Also check there are no gaps or overlaps.

This causes 3 fuzzer generated test documents to fail to load; adapt
tests.

Change-Id: If5813652f3bd03e90fdf95eb97e1e1523455b2b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170571
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-07-16 15:57:43 +02:00
Caolán McNamara
2f81046033 cid#1554709 COPY_INSTEAD_OF_MOVE
and

cid#1554745 COPY_INSTEAD_OF_MOVE
cid#1554758 COPY_INSTEAD_OF_MOVE
cid#1554766 COPY_INSTEAD_OF_MOVE
cid#1554771 COPY_INSTEAD_OF_MOVE
cid#1554787 COPY_INSTEAD_OF_MOVE
cid#1554802 COPY_INSTEAD_OF_MOVE
cid#1554820 COPY_INSTEAD_OF_MOVE
cid#1554828 COPY_INSTEAD_OF_MOVE
cid#1554829 COPY_INSTEAD_OF_MOVE
cid#1554832 COPY_INSTEAD_OF_MOVE
cid#1554842 COPY_INSTEAD_OF_MOVE
cid#1554885 COPY_INSTEAD_OF_MOVE

Change-Id: I43ec20250a04dc087f3d7fdeafc75f0c1dd0de25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170542
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-16 15:13:41 +02:00
Justin Luth
671290e805 Revert "tdf#159013 writerfilter: link to the correct first-page header"
This reverts commit 25.2 358ac0da827f908ce312c6d392a3d9102f36428e.
which was backported to 24.8

Although this patch made the situation "better than it was"
for most cases, it will inevitably make some documents worse.

Ultimately, this approach is wrong.
See tdf#158977's 158977_linkNonEmptyFirst.docx.

We can't only copy from the styles that "express" a H/F
(and UNO doesn't let us copy from styles that hide it).

A COPY appropach would need to ALWAYS import every header/footer
into a dedicated "header/footer repository" page style,
and every page style would need to copy its "expressed"
headers/footers from the repository to its page style.

That would mean our copy procedure would need to be very robust,
and all of this is way too big for a bug-fixer like me to consider.
I don't want to be the one on the hook expected to fix it properly.

Change-Id: I2af4a03a219daabf186473839ba444ff9797ec2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170530
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2024-07-16 13:48:19 +02:00
Armin Le Grand (Collabora)
a073b61339 CairoSDPR: Direct support for RGBA Gradients (I)
Detect where created when a RGBA gradient could be
used directly and create a primitive representing
that, a PolyPolygonRGBAGradientPrimitive2D.
That primitive decomposes to what was created before,
so no primitive renderer has to be touched, all will
work as before.
NOTE: That helper primitive just holds references to
what would be created anyways, so one depth step
added but not really any additional data.
This is the 1st step for direct support, the 2nd is
to then detect and use that primitive in SDPR
implementations directly.

Change-Id: I4f247636ce58a8a1fd1e0df32dabed0d6cc10d0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170527
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-07-16 13:10:10 +02:00
Stephan Bergmann
f10d51709d Embind: Implement UNO interface attributes as JS accessor properties
Change-Id: I39b1f5676b2e5ba6071b39bf031c10d9c85f1ad1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170566
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-07-16 12:48:49 +02:00
Stephan Bergmann
e8e6a5f795 Add test code for UNO attributes implemented in JS
Change-Id: I74f5ef53e7850ab783ae4cd94525a55c63512bd3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170544
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-07-16 12:48:40 +02:00