Commit graph

8180 commits

Author SHA1 Message Date
Michael Meeks
58249677c3 cool#4250 - add API to set per view options.
Change-Id: I5e3b3b3548ba93b96b33fe682405a2b0b53bbdee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176715
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 8dcb86a4a724f143f7d5cfcc3d1231a7f924cbd9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177445
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2024-11-28 15:09:27 +01:00
Mike Kaganski
fc95e370fd Drop separate instantiation of objects included in AllSettings
Change-Id: If56c0cbf5679bee57f6fe1b364c402d949089b87
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177386
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-27 10:02:49 +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
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
Mike Kaganski
fec1501374 Use specific SvtModuleOptions::Is*Installed for clarity
Change-Id: Ibe64b9fcccf33471d96bb0fb1aa896cb456657f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177069
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-23 09:45:38 +01:00
Caolán McNamara
36c2ce1344 cid#1608081 silence Overflowed array index write
Change-Id: I40d4207eafe46736a122e07c56f6db94cb517697
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177044
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-22 20:34:25 +01:00
Caolán McNamara
7ebcea990c call PathSettings::initialize after utl::Bootstrap::reloadData
and add setting 'BRAND_BASE_DIR' alongside existing 'UserInstallation'
which necessitates moving this block after aAppPath is determined

Done so that PathSettings will use the new locations set in bootstrap
for UserInstallation directory and not the locations detected during
preinit.

So autotext can be found relative to the final UserInstallation dir.

Change-Id: Ib6dadbec85a380475537027a8ce3972e31089711
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175960
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176905
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-21 13:23:24 +01:00
Caolán McNamara
343232190f use bNewFontLists of true to refetch new font lists
which becomes more obviously required since:

commit d85cb38322
CommitDate: Fri Feb 2 22:47:28 2024 +0100

    preload: open and close empty documents of main types in preinit.

because since then SdModule has called GetVirtualRefDevice to create the
long-life virtual device that is used to set the lists of available
fonts before "addfonts" has been called to add extra fonts to the kit
so impress/draw remains unaware of any changes there.

It was actually "true" here before:

commit ab61263300
CommitDate: Wed Apr 13 20:09:54 2022 +0200

    Follow-up fix to Collabora Online "addfont" handling: avoid assertion failure

but its uncertain what assertion is referred to here, perhaps the same
assertion as later fixed by:

commit d1ed24ba34d422128fd48184dbc3b344b5922d3a
CommitDate: Wed Oct 2 16:19:47 2024 +0200

    Get SolarMutex before calling ImplClearAllFontData

Change-Id: Ibc81191ba3b88d9b4def90b6d9662a83295ec9cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176032
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176823
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-20 13:12:06 +01:00
Caolán McNamara
5e3a88a283 switching PageKind without switching EditMode retains current page
i.e. ChangeEditMode doesn't do anything if the EditMode is unchanged
but the PageKind was switched from Notes to Standard. So the same
page of the other mode is still selected. An explicit SwitchPage
is required to change the page from the other mode.

This results in the reported mode of "2", but rendering actually still
rendering as if in "mode 0", so a request to render a 'standard' page
returns an image of the currently still-selected 'notes' page, which
confusingly can be cached and not shown until served as a reply to a
later request of the 'standard' page.

See DrawViewShell::ReadFrameViewData and other places for more
of this pattern.

Change-Id: Ie8aa8f93f45189fd6f9c37c4077fa2b547ca4815
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176084
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-by: Gökay ŞATIR <gokaysatir@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
(cherry picked from commit 95e9c210ef8380b0909c6ba596e3023bafef4083)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176824
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-11-20 12:13:59 +01:00
Miklos Vajna
6c6e4358ae desktop: fix crash in forceSetClipboardForCurrentView()
Crashreport signature:

> Fatal signal received: SIGSEGV code: 1 for address: 0x0
> program/libmergedlo.so
>       (anonymous namespace)::forceSetClipboardForCurrentView(_LibreOfficeKitDocument*)
>               desktop/source/lib/init.cxx:1376 (discriminator 6)
> program/libmergedlo.so
>       rtl::Reference<LOKClipboard>::~Reference()
>               include/rtl/ref.hxx:128
> program/libmergedlo.so
>       com::sun::uno::Reference<com::sun::lang::XComponent>::~Reference()
>               include/com/sun/star/uno/Reference.hxx:113

Sounds like an attempted document load that failed, but we still try to
set the clipboard for the first view during shutdown.

Change-Id: I21e5742ae4fcd4b24daf2888f3d64aae437d4fda
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176812
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-11-20 10:21:46 +01:00
Pranam Lashkari
69817b8a8c LOK: send state of EditDoc for write protection status
Change-Id: I58eb4ab04b4063e382bc6550b5cf08d7806a6c6a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173470
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 3fa8df9e7f46fd7bf988ca96b0454e5c1ee0a153)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176749
Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
Tested-by: Jenkins
2024-11-19 10:47:47 +01:00
Caolán McNamara
a025eef003 cid#1606638 silence Overflowed integer argument
and

cid#1608572 Overflowed integer argument
cid#1607772 Overflowed integer argument
cid#1607196 Overflowed integer argument
cid#1606568 Overflowed return value
cid#1607573 Overflowed return value

Change-Id: I9a701b19026572127399712c3b660094f2a0bd40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176740
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-18 22:24:40 +01:00
Caolán McNamara
ed8514af49 cid#1607905 Data race condition
Change-Id: Idb525a4e19cfbe0c4a493f511be7dadafac0cff5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176465
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-11-17 15:41:46 +01:00
Noel Grandin
40afc6f25a clang-tidy: performance-unnecessary-copy-initialization in desktop
Change-Id: I0e6ce8858fc058403020e2db863730f04cac70db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176392
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-11 15:47:17 +01:00
Mike Kaganski
1180b3473a com::sun::star -> css
Change-Id: I890ec73e30d3cc6b210903ecee29431f3cb5f635
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175979
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-10 10:50:15 +01:00
Caolán McNamara
6e9f865789 cid#1634574 COPY_INSTEAD_OF_MOVE
and

cid#1634579 COPY_INSTEAD_OF_MOVE
cid#1634583 COPY_INSTEAD_OF_MOVE
cid#1634586 COPY_INSTEAD_OF_MOVE

Change-Id: I24f4f0edf90546fe89ebecf0652f27298b5dd2a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176311
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-09 20:21:43 +01:00
Miklos Vajna
12e5082537 cool#9992 lok doc sign, hash extract: initial getCommandValues('Signature')
The trouble with signing via ca/cert/key PEM files is that usually the
CA is not trusted by the received of the signature. 3rd-party services
are available to do generate trusted signatures, but then you need to
share your document with them, which can be also problematic.

A middle-ground here is to sign the hash of the document by a 3rd-party,
something that's supported by e.g.
<https://docs.eideasy.com/electronic-signatures/api-flow-with-file-hashes-pdf.html>
(which itself aggregates a number of providers).

As a first step, add LOK API to get what would be the signature time
during signing -- but instead of actually signing, just return this
information. Once the same is done with the doc hash, this is supposed
to provide the same info than what the reference
<https://github.com/eideasy/eideasy-external-pades-digital-signatures>
app does.

This is only a start: incrementally replace XCertificate with
SignatureContext, which allows aborting the signing right before calling
into NSS, and also later it'll allow injecting the PKCS#7 object we get
from the 3rd-party.

Change-Id: I108564f047fdb4fb796240c7d18a584cd9044313
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176279
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-11-08 21:40:22 +01:00
Noel Grandin
5962006370 loplugin:reftotemp in dbaccess..editeng
Change-Id: I51f5e47fb2fca37928ac58952a6a34b7351ca53c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176277
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-08 19:38:38 +01:00
Noel Grandin
ed0b12f4ea no need to take a copy of the getProcessComponentContext return value
we can just take a "const &".

(found by running clang-tidy with the
performance-unnecessary-copy-initialization warning)

Change-Id: I20fd208c65303da78170b1ac06c638fdf3aa094b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176267
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-08 15:23:52 +01:00
Mike Kaganski
56f3dbffdf Simplify a bit
Change-Id: I618b0f8bcb2e8032ee12367c73e1136685f66b3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176183
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-08 05:34:20 +01:00
codewithvk
d72dcbc4fc sw: add .uno:DeleteContentControl command
This command removes formatting for content controls such as rich text, checkbox, dropdown, picture, and date controls. It deletes only the content control formatting, not the actual content of the section.

Here are some todos:
	- Add test case for delete
	- undo/redo for this uno command

Change-Id: Ib1b3b62ff7d62fd971472eff49a58c5afd786dc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175927
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 5d4ae3db293b0f9c46cbc09d0391806e1ed7b362)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176067
Tested-by: Jenkins
Reviewed-by: vivek javiya <vivek.javiya@collabora.com>
2024-11-07 08:27:11 +01:00
Caolán McNamara
92f5913aef cid#1556442 COPY_INSTEAD_OF_MOVE
and

cid#1607753 COPY_INSTEAD_OF_MOVE
cid#1554790 COPY_INSTEAD_OF_MOVE
cid#1556463 COPY_INSTEAD_OF_MOVE
cid#1554838 COPY_INSTEAD_OF_MOVE
cid#1556231 COPY_INSTEAD_OF_MOVE
cid#1556878 COPY_INSTEAD_OF_MOVE
cid#1554913 COPY_INSTEAD_OF_MOVE
cid#1558064 COPY_INSTEAD_OF_MOVE
cid#1557043 COPY_INSTEAD_OF_MOVE
cid#1556985 COPY_INSTEAD_OF_MOVE
cid#1556766 COPY_INSTEAD_OF_MOVE
cid#1557351 COPY_INSTEAD_OF_MOVE
cid#1554863 COPY_INSTEAD_OF_MOVE
cid#1556764 COPY_INSTEAD_OF_MOVE
cid#1556279 COPY_INSTEAD_OF_MOVE
cid#1555970 COPY_INSTEAD_OF_MOVE
cid#1556942 COPY_INSTEAD_OF_MOVE
cid#1557964 COPY_INSTEAD_OF_MOVE
cid#1555166 COPY_INSTEAD_OF_MOVE
cid#1556496 COPY_INSTEAD_OF_MOVE
cid#1557175 COPY_INSTEAD_OF_MOVE
cid#1558054 COPY_INSTEAD_OF_MOVE
cid#1557392 COPY_INSTEAD_OF_MOVE
cid#1557850 COPY_INSTEAD_OF_MOVE
cid#1555118 COPY_INSTEAD_OF_MOVE
cid#1557131 COPY_INSTEAD_OF_MOVE
cid#1556614 COPY_INSTEAD_OF_MOVE
cid#1609650 COPY_INSTEAD_OF_MOVE
cid#1555114 COPY_INSTEAD_OF_MOVE
cid#1555241 COPY_INSTEAD_OF_MOVE
cid#1555442 COPY_INSTEAD_OF_MOVE
cid#1556473 COPY_INSTEAD_OF_MOVE
cid#1557654 COPY_INSTEAD_OF_MOVE
cid#1554689 COPY_INSTEAD_OF_MOVE
cid#1556316 COPY_INSTEAD_OF_MOVE
cid#1557929 COPY_INSTEAD_OF_MOVE
cid#1554807 COPY_INSTEAD_OF_MOVE
cid#1554858 COPY_INSTEAD_OF_MOVE
cid#1555103 COPY_INSTEAD_OF_MOVE
cid#1555517 COPY_INSTEAD_OF_MOVE
cid#1556424 COPY_INSTEAD_OF_MOVE
cid#1557252 COPY_INSTEAD_OF_MOVE
cid#1557566 COPY_INSTEAD_OF_MOVE
cid#1608020 COPY_INSTEAD_OF_MOVE
cid#1557742 COPY_INSTEAD_OF_MOVE
cid#1555884 COPY_INSTEAD_OF_MOVE
cid#1554809 COPY_INSTEAD_OF_MOVE
cid#1555336 COPY_INSTEAD_OF_MOVE
cid#1555173 COPY_INSTEAD_OF_MOVE
cid#1556067 COPY_INSTEAD_OF_MOVE
cid#1557040 COPY_INSTEAD_OF_MOVE
cid#1556235 COPY_INSTEAD_OF_MOVE
cid#1557366 COPY_INSTEAD_OF_MOVE
cid#1555910 COPY_INSTEAD_OF_MOVE
cid#1556716 COPY_INSTEAD_OF_MOVE
cid#1558022 COPY_INSTEAD_OF_MOVE
cid#1555769 COPY_INSTEAD_OF_MOVE
cid#1555940 COPY_INSTEAD_OF_MOVE
cid#1557077 COPY_INSTEAD_OF_MOVE
cid#1555270 COPY_INSTEAD_OF_MOVE
cid#1555660 COPY_INSTEAD_OF_MOVE
cid#1556302 COPY_INSTEAD_OF_MOVE
cid#1555678 COPY_INSTEAD_OF_MOVE
cid#1556538 COPY_INSTEAD_OF_MOVE
cid#1557689 COPY_INSTEAD_OF_MOVE
cid#1555009 COPY_INSTEAD_OF_MOVE
cid#1555433 COPY_INSTEAD_OF_MOVE
cid#1555671 COPY_INSTEAD_OF_MOVE
cid#1555255 COPY_INSTEAD_OF_MOVE
cid#1557681 COPY_INSTEAD_OF_MOVE
cid#1557512 COPY_INSTEAD_OF_MOVE
cid#1554958 COPY_INSTEAD_OF_MOVE
cid#1555758 COPY_INSTEAD_OF_MOVE
cid#1555597 COPY_INSTEAD_OF_MOVE
cid#1558040 COPY_INSTEAD_OF_MOVE
cid#1556476 COPY_INSTEAD_OF_MOVE
cid#1557646 COPY_INSTEAD_OF_MOVE
cid#1557950 COPY_INSTEAD_OF_MOVE
cid#1557019 COPY_INSTEAD_OF_MOVE
cid#1557885 COPY_INSTEAD_OF_MOVE
cid#1556402 COPY_INSTEAD_OF_MOVE
cid#1557906 COPY_INSTEAD_OF_MOVE
cid#1556619 COPY_INSTEAD_OF_MOVE
cid#1554683 COPY_INSTEAD_OF_MOVE
cid#1556549 COPY_INSTEAD_OF_MOVE
cid#1554747 COPY_INSTEAD_OF_MOVE
cid#1554929 COPY_INSTEAD_OF_MOVE
cid#1555362 COPY_INSTEAD_OF_MOVE
cid#1557053 COPY_INSTEAD_OF_MOVE
cid#1557891 COPY_INSTEAD_OF_MOVE
cid#1555043 COPY_INSTEAD_OF_MOVE
cid#1555107 COPY_INSTEAD_OF_MOVE
cid#1557203 COPY_INSTEAD_OF_MOVE
cid#1556728 COPY_INSTEAD_OF_MOVE
cid#1557773 COPY_INSTEAD_OF_MOVE
cid#1556845 COPY_INSTEAD_OF_MOVE

Change-Id: I001fb67e597b096e992fd8a0cd6f3ec577767c33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176098
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-11-06 13:58:54 +01:00
Caolán McNamara
7d0a5aeeef Don't need to send both text and html
now that the other end can use html

Change-Id: Idb7959b041ebbbd9284007594473019cf603981f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175166
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
(cherry picked from commit 9ed5dd5d1b48b9a17967d85c0fad4994c40caafa)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175998
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-05 13:15:56 +01:00
Skyler Grey
eeb72ef257 feat(lok): Add extra impress export formats
Previously we had the ability to export to various formats, but these
weren't exposed in a way that LOK could request them. We want to
increase the options available for export, so we need to make these
available.

Change-Id: I1c05aeec8de32929481059bcfd02cac05a46788d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174602
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 541272d3eaa322ccdd1b926add031a39faeccf49)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175981
Tested-by: Jenkins
2024-11-04 09:39:18 +01:00
Noel Grandin
5de73f04f3 new loplugin:staticconstexpr
Change-Id: Ida1996dfffa106bf95fd064e8191b8033b4002f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175336
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-04 08:51:00 +01:00
Noel Grandin
11b1557147 convert KernArray from sal_Int32 to double
which allows us to eliminate a bunch of rounding at various layers, and
consequently maintain a lot more precision

Change-Id: I911dedd7c041c1d67396c082e5695346ea689acb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175814
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-31 12:10:52 +01:00
Andras Timar
7742752312 Prevent 'Failed to dispatch .uno:None' message
This was seen when checking grammar checker suggestion.
When I click on the top element of the context menu of
underlined text (e.g. Grammar error), I get

warn:lok:1663798:1663791:desktop/source/lib/init.cxx:283:
lok exception 'Failed to dispatch .uno:None'

This .uno:None was introduced by Tamas Zolnai especially for
LOK: 3616bb68f2
His intention was to add an empty command that does nothing.

Change-Id: I12a9a1e17dcf65cdd78266f44e6201ed3d5fa01f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175102
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit bdb0dd485da24a95b61df6136362ab189803bc27)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175845
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Jenkins
2024-10-31 08:30:11 +01:00
Michael Weghorn
c5b6e3ac56 win a11y: Stop using setting to indicate AT support
No longer use a "Accessibility"/"EnableATToolSupport"
VCL setting to control/report whether support for
assistive technology is (or should be) enabled,
which was primarily used on Windows.

As described in previous commit

    Change-Id: I32624b830d39d08510e4731edd06fd7a77642c50
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Oct 28 21:12:48 2024 +0100

        win a11y: Drop "Enable AT Tool support" from options UI

, that setting got automatically enabled when an assistive
technology was active on Windows, and never got reset to
"false" automatically, so AT support would be enabled
next time LO starts as well.

Instead of persisting this via a setting, enable the
Windows a11y bridge if and when a WM_GETOBJECT message
is received only, see `ImplHandleGetObject` (where this
was already done earlier) and no longer alternatively
start the a11y bridge in Desktop::Main when the mentioned
setting is enabled.

Drop MiscSettings::SetEnableATToolSupport altogether.

Adjust MiscSettings::GetEnableATToolSupport to no longer
read a setting, but return `true` if the AT bridge
has been activated (or a SAL_ACCESSIBILITY_ENABLED
environment variable is set, as was already checked
before).
This already returns `true` when called from
MenuBarManager::FillMenuManager when starting
LO while the NVDA screen reader is running.

With this in place, the a11y bridge on Windows
should now become active whenever an AT requests
information (by sending a WM_GETOBJECT message),
but not otherwise, and restarting LO will result
in the a11y bridge no longer being active unless
AT requests information again.

Change-Id: I42f0059cecd43205690d958a875d3c17ff9a197b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175795
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-30 08:27:28 +01:00
Xisco Fauli
30dee23a76 UnoApiTest: check mxComponent right after loading
Change-Id: Ia834d19a5af999440f7d5847aeeae863daacd952
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175784
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-10-29 13:50:40 +01:00
Caolán McNamara
7bbe74b2be cid#1555789 COPY_INSTEAD_OF_MOVE
and

cid#1556865 COPY_INSTEAD_OF_MOVE
cid#1556871 COPY_INSTEAD_OF_MOVE
cid#1556939 COPY_INSTEAD_OF_MOVE
cid#1556951 COPY_INSTEAD_OF_MOVE
cid#1556964 COPY_INSTEAD_OF_MOVE
cid#1556966 COPY_INSTEAD_OF_MOVE
cid#1556968 COPY_INSTEAD_OF_MOVE
cid#1556971 COPY_INSTEAD_OF_MOVE
cid#1556989 COPY_INSTEAD_OF_MOVE
cid#1557001 COPY_INSTEAD_OF_MOVE
cid#1557011 COPY_INSTEAD_OF_MOVE
cid#1557032 COPY_INSTEAD_OF_MOVE
cid#1557038 COPY_INSTEAD_OF_MOVE
cid#1557041 COPY_INSTEAD_OF_MOVE
cid#1557055 COPY_INSTEAD_OF_MOVE
cid#1557056 COPY_INSTEAD_OF_MOVE
cid#1557057 COPY_INSTEAD_OF_MOVE
cid#1557065 COPY_INSTEAD_OF_MOVE
cid#1557068 COPY_INSTEAD_OF_MOVE
cid#1557087 COPY_INSTEAD_OF_MOVE
cid#1557090 COPY_INSTEAD_OF_MOVE
cid#1557093 COPY_INSTEAD_OF_MOVE
cid#1557113 COPY_INSTEAD_OF_MOVE
cid#1557122 COPY_INSTEAD_OF_MOVE
cid#1557126 COPY_INSTEAD_OF_MOVE
cid#1557145 COPY_INSTEAD_OF_MOVE
cid#1557151 COPY_INSTEAD_OF_MOVE
cid#1557152 COPY_INSTEAD_OF_MOVE
cid#1557197 COPY_INSTEAD_OF_MOVE
cid#1557216 COPY_INSTEAD_OF_MOVE
cid#1557245 COPY_INSTEAD_OF_MOVE
cid#1557272 COPY_INSTEAD_OF_MOVE
cid#1557310 COPY_INSTEAD_OF_MOVE
cid#1557314 COPY_INSTEAD_OF_MOVE
cid#1557318 COPY_INSTEAD_OF_MOVE
cid#1557333 COPY_INSTEAD_OF_MOVE
cid#1557340 COPY_INSTEAD_OF_MOVE
cid#1557358 COPY_INSTEAD_OF_MOVE
cid#1557359 COPY_INSTEAD_OF_MOVE
cid#1557365 COPY_INSTEAD_OF_MOVE
cid#1557367 COPY_INSTEAD_OF_MOVE
cid#1557395 COPY_INSTEAD_OF_MOVE
cid#1557418 COPY_INSTEAD_OF_MOVE
cid#1557488 COPY_INSTEAD_OF_MOVE
cid#1557493 COPY_INSTEAD_OF_MOVE
cid#1557506 COPY_INSTEAD_OF_MOVE
cid#1557514 COPY_INSTEAD_OF_MOVE
cid#1557528 COPY_INSTEAD_OF_MOVE
cid#1557534 COPY_INSTEAD_OF_MOVE
cid#1557537 COPY_INSTEAD_OF_MOVE
cid#1557562 COPY_INSTEAD_OF_MOVE
cid#1557563 COPY_INSTEAD_OF_MOVE
cid#1557592 COPY_INSTEAD_OF_MOVE
cid#1557608 COPY_INSTEAD_OF_MOVE
cid#1557615 COPY_INSTEAD_OF_MOVE
cid#1557619 COPY_INSTEAD_OF_MOVE
cid#1557637 COPY_INSTEAD_OF_MOVE
cid#1557648 COPY_INSTEAD_OF_MOVE
cid#1557712 COPY_INSTEAD_OF_MOVE
cid#1557750 COPY_INSTEAD_OF_MOVE
cid#1557762 COPY_INSTEAD_OF_MOVE
cid#1557765 COPY_INSTEAD_OF_MOVE

Change-Id: I10db1910627e04a26e25836c05ad5c2707abd18b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175696
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-10-27 20:19:12 +01:00
Caolán McNamara
6f1508f4de cid#1555767 COPY_INSTEAD_OF_MOVE
and

cid#1555770 COPY_INSTEAD_OF_MOVE
cid#1555788 COPY_INSTEAD_OF_MOVE
cid#1555789 COPY_INSTEAD_OF_MOVE
cid#1555798 COPY_INSTEAD_OF_MOVE
cid#1555816 COPY_INSTEAD_OF_MOVE
cid#1555822 COPY_INSTEAD_OF_MOVE
cid#1555835 COPY_INSTEAD_OF_MOVE
cid#1555845 COPY_INSTEAD_OF_MOVE
cid#1555859 COPY_INSTEAD_OF_MOVE
cid#1555864 COPY_INSTEAD_OF_MOVE
cid#1555868 COPY_INSTEAD_OF_MOVE
cid#1555892 COPY_INSTEAD_OF_MOVE
cid#1555896 COPY_INSTEAD_OF_MOVE
cid#1555921 COPY_INSTEAD_OF_MOVE
cid#1555932 COPY_INSTEAD_OF_MOVE
cid#1555935 COPY_INSTEAD_OF_MOVE
cid#1555944 COPY_INSTEAD_OF_MOVE
cid#1555952 COPY_INSTEAD_OF_MOVE
cid#1555985 COPY_INSTEAD_OF_MOVE
cid#1556024 COPY_INSTEAD_OF_MOVE
cid#1556038 COPY_INSTEAD_OF_MOVE
cid#1556042 COPY_INSTEAD_OF_MOVE
cid#1556044 COPY_INSTEAD_OF_MOVE
cid#1556060 COPY_INSTEAD_OF_MOVE
cid#1556083 COPY_INSTEAD_OF_MOVE
cid#1556085 COPY_INSTEAD_OF_MOVE
cid#1556090 COPY_INSTEAD_OF_MOVE
cid#1556136 COPY_INSTEAD_OF_MOVE
cid#1556157 COPY_INSTEAD_OF_MOVE
cid#1556159 COPY_INSTEAD_OF_MOVE
cid#1556172 COPY_INSTEAD_OF_MOVE
cid#1556179 COPY_INSTEAD_OF_MOVE
cid#1556187 COPY_INSTEAD_OF_MOVE
cid#1556255 COPY_INSTEAD_OF_MOVE
cid#1556256 COPY_INSTEAD_OF_MOVE
cid#1556266 COPY_INSTEAD_OF_MOVE
cid#1556275 COPY_INSTEAD_OF_MOVE
cid#1556290 COPY_INSTEAD_OF_MOVE
cid#1556294 COPY_INSTEAD_OF_MOVE
cid#1556301 COPY_INSTEAD_OF_MOVE
cid#1556311 COPY_INSTEAD_OF_MOVE
cid#1556318 COPY_INSTEAD_OF_MOVE
cid#1556326 COPY_INSTEAD_OF_MOVE
cid#1556369 COPY_INSTEAD_OF_MOVE
cid#1556374 COPY_INSTEAD_OF_MOVE
cid#1556387 COPY_INSTEAD_OF_MOVE
cid#1556388 COPY_INSTEAD_OF_MOVE
cid#1556417 COPY_INSTEAD_OF_MOVE
cid#1556425 COPY_INSTEAD_OF_MOVE
cid#1556435 COPY_INSTEAD_OF_MOVE
cid#1556495 COPY_INSTEAD_OF_MOVE
cid#1556497 COPY_INSTEAD_OF_MOVE
cid#1556501 COPY_INSTEAD_OF_MOVE
cid#1556503 COPY_INSTEAD_OF_MOVE
cid#1556520 COPY_INSTEAD_OF_MOVE
cid#1556523 COPY_INSTEAD_OF_MOVE
cid#1556562 COPY_INSTEAD_OF_MOVE
cid#1556573 COPY_INSTEAD_OF_MOVE
cid#1556576 COPY_INSTEAD_OF_MOVE
cid#1556598 COPY_INSTEAD_OF_MOVE
cid#1556615 COPY_INSTEAD_OF_MOVE
cid#1556626 COPY_INSTEAD_OF_MOVE
cid#1556671 COPY_INSTEAD_OF_MOVE
cid#1556689 COPY_INSTEAD_OF_MOVE
cid#1556701 COPY_INSTEAD_OF_MOVE
cid#1556713 COPY_INSTEAD_OF_MOVE
cid#1556758 COPY_INSTEAD_OF_MOVE
cid#1556759 COPY_INSTEAD_OF_MOVE
cid#1556788 COPY_INSTEAD_OF_MOVE
cid#1556811 COPY_INSTEAD_OF_MOVE
cid#1556821 COPY_INSTEAD_OF_MOVE
cid#1556824 COPY_INSTEAD_OF_MOVE
cid#1556825 COPY_INSTEAD_OF_MOVE
cid#1556862 COPY_INSTEAD_OF_MOVE

Change-Id: I4925a79688a983bb07252600430039ec0bcb75b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175678
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-10-26 19:25:03 +02:00
Michael Weghorn
2d25e27069 win a11y: Assert creating MSAAService succeeds
Add an assert that creating the MSAAservice/a11 bridge
succeeds in ImplInitAccessBridge on Windows, as this
should never fail unless the LibreOffice installation is broken.

Drop the return values of the ImplInitAccessBridge
and InitAccessBridge functions accordingly and
simplify code calling them.

While at it, also switch to using `#ifdef _WIN32` for
the Windows-specific code in `InitAccessBridge`
instead of having it in the `#else` branch of
`#if defined UNX`, to align this with the `#ifdef _WIN32`
condition for the `ImplInitAccessBridge` declaration,
as that's the function that gets called.

Even if the creation of the service should fail for some
reason, the DeploymentException in ImplInitAccessBridge
is still handled, so unless I'm missing something, this
commit shouldn't cause any harm. The "EnableATToolSupport"
setting would then incorrectly be set to true indicating
that AT support is enabled, but besides being used in
the a11y bridge code itself, that's only used to determine
whether or not to pre-populate menus, so they are
available in the a11y hierarchy before the corresponding
(sub)menu gets activated, s. MenuBarManager::FillMenuManager,
the corresponding commit that originally introduced this,

    commit 08fe2669a0
    Author: Rüdiger Timm <rt@openoffice.org>
    Date:   Fri May 13 06:29:54 2005 +0000

        INTEGRATION: CWS tbe22 (1.25.30); FILE MERGED
        2005/05/04 14:21:00 tbe 1.25.30.1: #i48612# Opening a menu with GOK shows Tips instead of entries (fixed by CD)

and the referenced bug report [1], in particular comment 3 [2]:

> TBE->CD: As discussed, the accessibility hierarchy is built up, but part of the
> information is missing, e.g. Menu::GetItemText()  returns an empty string.
> Also keyboard shortcuts should be available.
> In addition, the File/New menu and the File/Wizards menu are missing.
> All this information is only available, after the corresponding menus have
> been opened by the user.
>
> In OO.o 1.1.x all this was working. The AT tools require, that the whole menu
> hierarchy is available as soon as the menu bar is visible, that means before
> a user has opened a menu.
>
> The whole menu hierarchy must be only provided, if accessiblity is enabled.
> This can be checked by
> BOOL bAccessibilityEnabled =
> Application::GetSettings().GetMiscSettings().GetEnableATToolSupport();

This commit is also in preparation of further simplifying
the handling for that setting.

[1] https://bz.apache.org/ooo/show_bug.cgi?id=48612
[2] https://bz.apache.org/ooo/show_bug.cgi?id=48612#c3

Change-Id: I46149ed215c354d33003513d55defe4920a7c381
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175565
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-25 11:09:35 +02:00
Caolán McNamara
f0c49bd155 cid#1633781 Initialization or destruction ordering is unspecified
and

cid#1633780 Initialization or destruction ordering is unspecified
cid#1633778 Initialization or destruction ordering is unspecified
cid#1633777 Initialization or destruction ordering is unspecified
cid#1633776 Initialization or destruction ordering is unspecified

Change-Id: I8ae7cbede6df2ad747fe57d0ac2800e1b6a31038
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175576
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-10-25 09:22:55 +02:00
Bogdan Buzea
35e2aa6204 tdf#163486: PVS: Identical branches
V1037 Two or more case-branches perform the same actions. Check lines: 717, 733

Change-Id: I57fc125abb8c9a4c9dea197945f45b95b90e41b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175320
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-10-22 12:08:25 +02:00
Caolán McNamara
2bafc7384b cid#1545605 COPY_INSTEAD_OF_MOVE
and

cid#1545841 COPY_INSTEAD_OF_MOVE
cid#1554682 COPY_INSTEAD_OF_MOVE
cid#1554686 COPY_INSTEAD_OF_MOVE
cid#1554715 COPY_INSTEAD_OF_MOVE
cid#1554750 COPY_INSTEAD_OF_MOVE
cid#1554759 COPY_INSTEAD_OF_MOVE
cid#1554770 COPY_INSTEAD_OF_MOVE
cid#1554779 COPY_INSTEAD_OF_MOVE
cid#1554794 COPY_INSTEAD_OF_MOVE
cid#1554800 COPY_INSTEAD_OF_MOVE
cid#1554826 COPY_INSTEAD_OF_MOVE
cid#1554836 COPY_INSTEAD_OF_MOVE
cid#1554862 COPY_INSTEAD_OF_MOVE
cid#1554865 COPY_INSTEAD_OF_MOVE
cid#1554872 COPY_INSTEAD_OF_MOVE
cid#1554883 COPY_INSTEAD_OF_MOVE
cid#1554906 COPY_INSTEAD_OF_MOVE
cid#1554921 COPY_INSTEAD_OF_MOVE
cid#1554926 COPY_INSTEAD_OF_MOVE
cid#1554946 COPY_INSTEAD_OF_MOVE
cid#1554956 COPY_INSTEAD_OF_MOVE
cid#1554970 COPY_INSTEAD_OF_MOVE
cid#1554986 COPY_INSTEAD_OF_MOVE
cid#1554991 COPY_INSTEAD_OF_MOVE
cid#1555013 COPY_INSTEAD_OF_MOVE
cid#1555037 COPY_INSTEAD_OF_MOVE
cid#1555050 COPY_INSTEAD_OF_MOVE
cid#1555057 COPY_INSTEAD_OF_MOVE
cid#1555066 COPY_INSTEAD_OF_MOVE
cid#1555067 COPY_INSTEAD_OF_MOVE
cid#1555083 COPY_INSTEAD_OF_MOVE
cid#1555097 COPY_INSTEAD_OF_MOVE
cid#1555135 COPY_INSTEAD_OF_MOVE
cid#1555140 COPY_INSTEAD_OF_MOVE
cid#1555146 COPY_INSTEAD_OF_MOVE
cid#1555148 COPY_INSTEAD_OF_MOVE
cid#1555149 COPY_INSTEAD_OF_MOVE
cid#1555155 COPY_INSTEAD_OF_MOVE
cid#1555157 COPY_INSTEAD_OF_MOVE
cid#1555168 COPY_INSTEAD_OF_MOVE
cid#1555195 COPY_INSTEAD_OF_MOVE
cid#1555196 COPY_INSTEAD_OF_MOVE
cid#1555237 COPY_INSTEAD_OF_MOVE

Change-Id: I90531c19c28dca77fe99c72efdfc0972c311da98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175377
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-22 11:56:02 +02:00
Noel Grandin
19bc8856c4 move vcl::DeleteOnDeinit to tools
so we can fix a shutdown use-after-free in sot.

Change-Id: I32f83bd94627d72d7bee7ea2ebd6ab77a7f78435
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175335
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-22 08:01:19 +02:00
Michael Weghorn
162ef484df tdf#161625 Use SolarMutex instead of std::mutex in ExtMgrDialog
Instead of using a custom (non-recursive) std::mutex in the
extension manager dialog, hold the (recursive) SolarMutex instead.

As the backtrace in attachment 197155 in tdf#161625 (s.a. below)
shows, a recursive mutex is needed:

dp_gui::ExtMgrDialog::TimeOutHdl (frame 17) locks the mutex, then
dp_gui::ExtMgrDialog::startProgress (frame 6) wants to lock it
again, causing a deadlock.

(Switching ExtMgrDialog::m_aMutex to be a std::recursive_mutex
could be an alternative, but follow the common pattern of holding
the SolarMutex while doing UI stuff instead.)

Somewhat similar commit:

    commit 406a7e9d45
    Date:   Wed Jul 10 12:46:50 2024 +0200

        fix locking in UpdateRequiredDialog

Backtrace of deadlock:

    #0  0x00007f883f6adc70 in ?? () from /usr/lib/libc.so.6
    #1  0x00007f883f6b4b01 in pthread_mutex_lock () from /usr/lib/libc.so.6
    #2  0x00007f87f3ea068e in __gthread_mutex_lock (__mutex=0x5782aab26e48) at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/x86_64-pc-linux-gnu/bits/gthr-default.h:762
    #3  std::mutex::lock (this=0x5782aab26e48) at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/std_mutex.h:113
    #4  std::unique_lock<std::mutex>::lock (this=<optimized out>) at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/unique_lock.h:147
    #5  std::unique_lock<std::mutex>::unique_lock (__m=..., this=<optimized out>) at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/unique_lock.h:73
    #6  dp_gui::ExtMgrDialog::startProgress (this=0x5782aab26de0, _bLockInterface=0x80) at /home/user/libreofficetwo/desktop/source/deployment/gui/dp_gui_dialog2.cxx:779
    #7  0x00007f883b4080a1 in Link<void*, void>::Call (this=0x7f86b0000c08, data=0x80) at include/tools/link.hxx:111
    #8  ImplHandleUserEvent (pSVEvent=pSVEvent@entry=0x7f86b0000c00) at /home/user/libreofficetwo/vcl/source/window/winproc.cxx:2285
    #9  0x00007f883b40616a in ImplWindowFrameProc (_pWindow=0x5782a76df9f0, nEvent=SalEvent::UserEvent, pEvent=0x7f86b0000c00) at /home/user/libreofficetwo/vcl/source/window/winproc.cxx:2849
    #10 0x00007f883b6c711e in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const (this=<optimized out>) at /home/user/libreofficetwo/vcl/source/app/salusereventlist.cxx:119
    #11 SalUserEventList::DispatchUserEvents (this=0x5782a62edb08, bHandleAllCurrentEvents=false) at /home/user/libreofficetwo/vcl/source/app/salusereventlist.cxx:120
    #12 0x00007f8833fb7827 in QtInstance::ImplYield (this=this@entry=0x5782a62edad0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:447
    #13 0x00007f8833fb9e11 in QtInstance::DoYield (this=0x5782a62edad0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:469
    #14 0x00007f883b70fc72 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/user/libreofficetwo/vcl/source/app/svapp.cxx:385
    #15 Application::Yield () at /home/user/libreofficetwo/vcl/source/app/svapp.cxx:473
    #16 0x00007f883b486415 in ProgressBar::SetValue (this=<optimized out>, nNewPercent=<optimized out>) at /home/user/libreofficetwo/vcl/source/control/prgsbar.cxx:199
    #17 0x00007f87f3ea14ca in dp_gui::ExtMgrDialog::TimeOutHdl (this=0x5782aab26de0) at /home/user/libreofficetwo/desktop/source/deployment/gui/dp_gui_dialog2.cxx:976
    #18 0x00007f883b6ff8c7 in Scheduler::CallbackTaskScheduling () at /home/user/libreofficetwo/vcl/source/app/scheduler.cxx:509
    #19 0x00007f8833fd4013 in SalTimer::CallCallback (this=0x5782a77b83d0) at vcl/inc/saltimer.hxx:53
    #20 QtTimer::timeoutActivated (this=0x5782a77b83c0) at vcl/qt6/../qt5/QtTimer.cxx:51
    #21 0x00007f88341a3397 in ?? () from /usr/lib/libQt6Core.so.6
    #22 0x00007f88341ab5e5 in QTimer::timerEvent(QTimerEvent*) () from /usr/lib/libQt6Core.so.6
    #23 0x00007f883418d859 in QObject::event(QEvent*) () from /usr/lib/libQt6Core.so.6
    #24 0x00007f8832efc8cc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt6Widgets.so.6
    #25 0x00007f8834145aa8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt6Core.so.6
    #26 0x00007f88342c7658 in QTimerInfoList::activateTimers() () from /usr/lib/libQt6Core.so.6
    #27 0x00007f88343a9f99 in ?? () from /usr/lib/libQt6Core.so.6
    #28 0x00007f8837877299 in ?? () from /usr/lib/libglib-2.0.so.0
    #29 0x00007f88378d9ec7 in ?? () from /usr/lib/libglib-2.0.so.0
    #30 0x00007f8837876795 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
    #31 0x00007f88343a82bd in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Core.so.6
    #32 0x00007f8833fb789d in QtInstance::ImplYield (this=this@entry=0x5782a62edad0, bWait=<optimized out>, bHandleAllCurrentEvents=<optimized out>) at vcl/qt6/../qt5/QtInstance.cxx:458
    #33 0x00007f8833fb9e11 in QtInstance::DoYield (this=0x5782a62edad0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:469
    #34 0x00007f883b70fc72 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/user/libreofficetwo/vcl/source/app/svapp.cxx:385
    #35 Application::Yield () at /home/user/libreofficetwo/vcl/source/app/svapp.cxx:473
    #36 0x00007f883b70fb90 in Application::Execute () at /home/user/libreofficetwo/vcl/source/app/svapp.cxx:360
    #37 0x00007f883f8e1770 in desktop::Desktop::Main (this=0x7ffc2a5b0d28) at /home/user/libreofficetwo/desktop/source/app/app.cxx:1691
    #38 0x00007f883b717e1e in ImplSVMain () at /home/user/libreofficetwo/vcl/source/app/svmain.cxx:228
    #39 0x00007f883f90ef8a in soffice_main () at /home/user/libreofficetwo/desktop/source/app/sofficemain.cxx:121
    #40 0x000057829d6f683b in sal_main () at /home/user/libreofficetwo/desktop/source/app/main.c:51
    #41 main (argc=<optimized out>, argv=<optimized out>) at /home/user/libreofficetwo/desktop/source/app/main.c:49

Change-Id: I96d746eb1493aaf5b56d50664c9d1817699f21bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175298
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com>
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-10-22 07:17:26 +02:00
Caolán McNamara
23d7910c1e cid#1554844 COPY_INSTEAD_OF_MOVE
and

cid#1554878 COPY_INSTEAD_OF_MOVE
cid#1554907 COPY_INSTEAD_OF_MOVE
cid#1555082 COPY_INSTEAD_OF_MOVE
cid#1555224 COPY_INSTEAD_OF_MOVE
cid#1555301 COPY_INSTEAD_OF_MOVE
cid#1555378 COPY_INSTEAD_OF_MOVE
cid#1555395 COPY_INSTEAD_OF_MOVE
cid#1555452 COPY_INSTEAD_OF_MOVE
cid#1555466 COPY_INSTEAD_OF_MOVE
cid#1555514 COPY_INSTEAD_OF_MOVE
cid#1555566 COPY_INSTEAD_OF_MOVE
cid#1555753 COPY_INSTEAD_OF_MOVE
cid#1555782 COPY_INSTEAD_OF_MOVE
cid#1555825 COPY_INSTEAD_OF_MOVE
cid#1555842 COPY_INSTEAD_OF_MOVE
cid#1555891 COPY_INSTEAD_OF_MOVE
cid#1555917 COPY_INSTEAD_OF_MOVE
cid#1555961 COPY_INSTEAD_OF_MOVE
cid#1556021 COPY_INSTEAD_OF_MOVE
cid#1556055 COPY_INSTEAD_OF_MOVE
cid#1556307 COPY_INSTEAD_OF_MOVE
cid#1556349 COPY_INSTEAD_OF_MOVE
cid#1556436 COPY_INSTEAD_OF_MOVE
cid#1556665 COPY_INSTEAD_OF_MOVE
cid#1556696 COPY_INSTEAD_OF_MOVE
cid#1556718 COPY_INSTEAD_OF_MOVE
cid#1556775 COPY_INSTEAD_OF_MOVE
cid#1556835 COPY_INSTEAD_OF_MOVE
cid#1556877 COPY_INSTEAD_OF_MOVE
cid#1556994 COPY_INSTEAD_OF_MOVE
cid#1557010 COPY_INSTEAD_OF_MOVE
cid#1557074 COPY_INSTEAD_OF_MOVE
cid#1557111 COPY_INSTEAD_OF_MOVE
cid#1557142 COPY_INSTEAD_OF_MOVE
cid#1557163 COPY_INSTEAD_OF_MOVE
cid#1557164 COPY_INSTEAD_OF_MOVE
cid#1557214 COPY_INSTEAD_OF_MOVE
cid#1557254 COPY_INSTEAD_OF_MOVE
cid#1557322 COPY_INSTEAD_OF_MOVE
cid#1557327 COPY_INSTEAD_OF_MOVE
cid#1557492 COPY_INSTEAD_OF_MOVE
cid#1557565 COPY_INSTEAD_OF_MOVE
cid#1557663 COPY_INSTEAD_OF_MOVE
cid#1557798 COPY_INSTEAD_OF_MOVE

Change-Id: I2ae9c184dcc18d44a65437e18c49e16b27f4d81d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174893
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-14 15:28:24 +02:00
Stephan Bergmann
33aa490cd6 Make --disable-emscripten-proxy-to-pthread configurable
...as is convenient for some experiments

Change-Id: I74aedb38ecc0f7b5a0d913799f649dce77dc7bba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174753
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2024-10-10 14:39:24 +02:00
Noel Grandin
0d0f2e7b1f cid#1606611 Data race condition
and
cid#1607663 Data race condition
cid#1606843 Data race condition
cid#1608340 Check of thread-shared field evades lock acquisition

Change-Id: I97b82d4302ead6b96ae19c15502c427952df2ede
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174566
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-07 09:31:09 +02:00
Stephan Bergmann
ea5e3865b4 Hack reordering includes to avoid Windows Yield macro fallout
No idea why my local Windows build started to only now fail with

> [build CXX] desktop/source/app/updater.cxx
> C:\lo\core\include\vcl/svapp.hxx(491): error C2208: 'void': no members defined using this type
> C:\lo\core\include\vcl/svapp.hxx(491): warning C4091: 'static ': ignored on left of 'void' when no variable is declared

or how to potentially address that properly with prewin.h/postwin.h...

Change-Id: I8afbc0c485505ee8ab2cb956c58835bb6a73cab8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174390
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2024-10-02 17:35:48 +02:00
Caolán McNamara
7f09dc4ba9 Get SolarMutex before calling ImplClearAllFontData
to avoid:

vcl/source/app/dbggui.cxx:35: void ImplDbgTestSolarMutex(): Assertion `ImplGetSVData()->mpDefInst->GetYieldMutex()->IsCurrentThread() && "SolarMutex not owned!"' failed.

Change-Id: I6d56bb05e8a89190838c5437043bc61034607d8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174328
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-02 16:10:00 +02:00
Miklos Vajna
d5d7883fde desktop lok: fix crash in getStyles()
Crashreport backtrace:

> program/libmergedlo.so
>       getStyles
>               desktop/source/lib/init.cxx:6411
> program/libmergedlo.so
>       doc_getCommandValues
>               desktop/source/lib/init.cxx:6666

Which is probably a call on an already disposed document. Fix it similar
to how getFonts() does it.

Change-Id: I1744bd04b7ebdea1b69ca121b8cfa47314d67528
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174372
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-10-02 13:09:04 +02:00
Noel Grandin
c77d656806 simplify
Change-Id: I8ff1c3c333b2a44871150da3929501dec00613e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174313
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-01 14:03:12 +02:00
Stephan Bergmann
250f35740d Revert "Fall back to old bootstrap.ini [Win32] section, for backwards compatibility"
This reverts commit ebd3f0971b.
Conflicts:
	desktop/win32/source/loader.cxx
	vcl/win/window/salframe.cxx

Reason for revert:  This fallback functionality was documented as deprecated at
<https://wiki.documentfoundation.org/index.php?title=ReleaseNotes/24.8&oldid=738731>
"fundamental.override.ini", to "be removed in a later version", which is
happening now for LO 25.2.

Change-Id: I40a1800f6a05fc7fd7188917083b269ce6a9f1d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163394
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-09-30 09:44:34 +02:00
Jaume Pujantell
98cd8bac76 sw: add new command to make a response comment root
Adds the option to convert a reply comment into a new top comment
while preserving the parent-child realtions of the other comments
in the thread.

Change-Id: I3cd5e5466fadc2226651d7c244b5139ec2d1f949
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173051
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173870
Reviewed-by: Jaume Pujantell <jaume.pujantell@collabora.com>
Tested-by: Jenkins
2024-09-25 15:43:47 +02:00
Miklos Vajna
4787fd4fc8 cool#9992 lok doc sign: store signing cert in the view
In case signing certificate would be stored in the model (like it
happens on the desktop), then the certificate viewer would show all
signing certs of the currently editing users, which is far from
expected.

At the same time, there is just one NSS database per process, so it's
hard to not have them in the same database.

Fix the problem by storing a reference to the signing key in the view
shell, then we can show only that in xmlsecurity/ in LOK mode, and thing
else.

This is just the sfx2/ side of things, the xmlsecurity/ part still needs
implementing.

Change-Id: Id7a56f28598ec60217c6bac095c2ff350f39bc3b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173837
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2024-09-24 10:55:58 +02:00
Miklos Vajna
90beea9a9a cool#9992 lok doc sign: handle .uno:SignatureCert/Key/Ca view options
The desktop way to sign documents is to manually import a .p12 file into
your Firefox user profile, and then the signing key is available in all
views. The LOK case wants per-view signing certificates, set in a way
similar to the name of the user.

Start implementing this by:

1) Extending initializeForRendering() to have JSON entries for the
   signing cert/key/ca chain.

2) Importing the CA chain as trusted certificates, using a new
   SfxLokHelper::extractCertificates() + test for this.

3) Marking a certificate as trusted is tricky, extract
   SfxLokHelper::addCertificate() from the existing doc_addCertificate()
   to do this.

4) Parsing the signing certificate, but just warn if that fails, still
   need to connect that to the SfxViewShell later.

Change-Id: I00e40b3cdd68dbe8994f28861dc7b0f578189643
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173806
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-09-23 17:49:28 +02:00
Marco Cecchetti
6d159f4dcf lok: sd: slideshow render: some bug fixes
The suggested canvas size need to be passed to createSlideRenderer.
masterPageObjectsVisible -> masterPageObjectsVisibility as on client.
Last json message should be reset on each call to renderNextLayer.
In order to avoid to send empty layer check if the json message has
been set.
After rendering the background layer we need to return or the layer
is never received.

Change-Id: I9a83895d4f3895f3363c1b6a86fac9bd22c9fe87
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173728
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-09-20 22:19:31 +02:00
Miklos Vajna
7bad76c3a5 cool#9992 lok doc sign: extract duplicated code to SfxLokHelper
I want to improve extractCertificate() so it can work on a certificate
chain, but that's easier when this code is not directly in desktop/, but
at some lower level.

This allows covering the code with tests from CppunitTest_sfx2_view in a
follow-up change.

If this code will be needed by some non-LOK area as well, then it can be
moved down further, but let's wait for a second area first.

Change-Id: I6291da0c3e56aed7dca1a8dc1446209044cace92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173691
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2024-09-20 10:19:56 +02:00