Commit graph

502114 commits

Author SHA1 Message Date
Caolán McNamara
e854f1d7a0 m_pDocShell seen as null in SwXTextDocument::getPostIts
#2  SwView::GetPostItMgr (this=<error reading variable: Cannot access memory at address 0xc8>) at sw/inc/view.hxx:659
 #3  SwXTextDocument::getPostIts(tools::JsonWriter&) () at sw/source/uibase/uno/unotxdoc.cxx:3351
 #4  0x00007f6238ac7cc8 in getPostIts (pThis=0x36aa6cb0) at /opt/rh/devtoolset-12/root/usr/include/c++/12/ext/atomicity.h:111
 #5  doc_getCommandValues () at desktop/source/lib/init.cxx:6739
 #6  0x00000000005863e0 in lok::Document::getCommandValues (pCommand=<optimized out>, this=<optimized out>)
    at /home/collabora/jenkins/workspace/package_cool_24.04_rpm/rpmbuild/BUILD/coolwsd-24.04.9.2snapshot/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx:492
 #7  ChildSession::getCommandValues(StringVector const&) () at kit/ChildSession.cpp:1180

Change-Id: Ib2a3c2e7eb1a108ad969588f6c313cade145e8ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176600
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit c0542a438d91051bcdab1f5bc19ee46c90bd91a7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177517
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-29 11:33:57 +01:00
Caolán McNamara
0090640f88 cid#1635775 Use of auto that causes a copy
looks like a stray line I think

Change-Id: I065a35d6e161c37d832e308f7ed1ce239e4e2bbf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177516
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-29 11:11:54 +01:00
Noel Grandin
b7c6bc0bda tdf#164046 style searching improvement breaks Impress layout
regression from
    commit 6c2f827697
    Author: Noel Grandin <noel.grandin@collabora.co.uk>
    Date:   Sun Oct 20 15:07:41 2024 +0200
    improve style searching in SvXMLStylesContext

Two problems - the original code was searching by DisplayName,
not Name, so add another index for DisplayName,
and the prefix matching was not properly matching.

Change-Id: Ifd43bdb89d33067954298115c8700b87c7f93050
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177488
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-29 11:04:50 +01:00
Christian Lohmaier
e627686deb Update git submodules
* Update helpcontent2 from branch 'master'
  to dc50ebde81a0e9266806878b69de81da422ec39c
  - Revert "enable help for Tagalog (tl)"
    
    This reverts commit 3d37519d37c1ac9e5d30b45f1cd922c73107d4d1.
    
    Reason for revert: apparently not all files have been added for master
    
    Change-Id: Ia0979a8abca4aa598563598276c9a9c0e0518a33
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/177515
    Tested-by: Jenkins
    Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2024-11-29 09:34:14 +01:00
Weblate
80d4ce197f android-viewer translated using Weblate
Interlingua currently translated at 75.8% (88 of 116 strings)

Change-Id: I6f6529872aa3c3cf3553eacebe280195fa5f0699
Co-authored-by: Weblate <noreply@documentfoundation.org>
Co-authored-by: eduver <hmcb2080@gmail.com>
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/ia/
Translation: android-viewer/android-strings
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177478
Tested-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-29 07:41:38 +01:00
Szymon Kłos
70d054a3da lok: jsdialog: enable font name box after save
When we save - we block UI. In the lok we disable that for
some cases like in commit e005690e9c
lok: avoid sending jsdialog messages during background save.

But we also use save file to generate previews of shapes what happens
on eg. resize in Online. Then we trigger disable and enable cycle
for frames - and we end with FontNameBox enabled!

That was causing the JSDialog combobox still being locked - because
frame unlock was using direct VCL API, not weld:: one in the
InterimItemWindow. Let's fix that with proper StateChanged handling.

So now it is functional. But still I think there is some error in the
logic - as after save we should beg the "before save" state of control
not "always enabled". But it's different problem.

Change-Id: Ia8e5c8c864156271b5f68d482234e83eb57b0deb
(cherry picked from commit cbe229ec219e56ce1bb5dd9598f9052a98504249)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177489
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2024-11-29 06:47:19 +01:00
Simon Chenery
678f732d9c tdf#158237 Use C++20 contains() instead of find() and end()
Change-Id: I596245603c0945438a940465122cb4c3e6954e81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177140
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
2024-11-29 01:37:10 +01:00
Oliver Specht
40436e1dfd tdf#146553 Enable additonal functions in editable section while in r/o mode
Insert/Edit table, insert lists, insert AutoText
automatic spell checking

Change-Id: Iccef3965316dc6079ea56a0283023c5a658512cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165031
Tested-by: Jenkins
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-11-29 01:15:51 +01:00
Olivier Hallot
b440a03b30 Update git submodules
* Update helpcontent2 from branch 'master'
  to aa5fa6c008064ee28c01354b1f40920b2de83b2c
  - Mute L10N in Navigator context help page
    
    Change-Id: I5211d028909ca140fbe2d9eed6fa57cbf57b84c5
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/177510
    Tested-by: Jenkins
    Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2024-11-29 00:49:02 +01:00
Michael Weghorn
d818942317 sc a11y: Make 2 members non-mutable
... and use a non-const pointer when iterating instead.

Change-Id: I165b0ce907cadacc76562bff974ff913a3a711da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177480
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-11-28 23:11:22 +01:00
Jonathan Clark
7e4f4a0ccd tdf#163913 Implement font-relative margins
This change adds loext:margin-left and loext:margin-right, which
implement margins that support font-relative units.

See tdf#36709 for additional details.

Change-Id: I31b0dd2b6f98cb5b02fd4dca3608db6fdee4054c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177473
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-11-28 22:10:05 +01:00
Manish
c73e52d295 tdf#143148: Replace include guards with #pragma once in XpmReader.hxx
Change-Id: I2708f103cb9e63294cd2ee056dc490c734285a31
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177487
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-11-28 20:58:22 +01:00
Caolán McNamara
b944488aad crash seen in export of forum-mso-en-2962.doc to rtf and reimport
Change-Id: I3813d8ebcb1e678ece2e3c3554bb0ddb7b546b34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177490
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-28 20:32:58 +01:00
Christian Lohmaier
4c9b1291e9 Update git submodules
* Update helpcontent2 from branch 'master'
  to 3d37519d37c1ac9e5d30b45f1cd922c73107d4d1
  - enable help for Tagalog (tl)
    
    Change-Id: I0e35015d4d2526ea0d09404140a1ee73ce658350
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/175653
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
    Tested-by: Jenkins
2024-11-28 18:46:23 +01:00
Andrea Gelmini
2fd5fc442b Fix typo
Change-Id: I8ac3024a3865a5e2e45d9eca70f1ca5e067971c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177495
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2024-11-28 16:33:07 +01:00
Caolán McNamara
7489c032a3 cid#1607902 Overflowed constant
Change-Id: Id43616644bc8495a6a5944de099ddfc29016bbe8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177484
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-11-28 15:46:04 +01:00
Caolán McNamara
cb5c088c00 clarify that nNum is reused for two different things
so the first use of nNum is dead after scope

no logic change intended

Change-Id: I81a51531418b32a09f5b9dba1131bc65ac71df3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177483
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-28 15:26:53 +01:00
Caolán McNamara
6b85f012ff we can deindent this and make it conditional
given that we return early on the opposite condition

no logic change intended, git diff -w is your friend

Change-Id: I37b7db3a1d092ffbe0ef41561982555f6b6d3bae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177482
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-11-28 15:26:48 +01:00
Caolán McNamara
ea24f23562 return early if bUseChkStr is true
no logic change intended

Change-Id: Ie1b4d15af35b01c9f490db7eb33c9493775ab9b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177481
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-28 15:26:42 +01:00
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
Marco Cecchetti
75a241e7c7 lok: getSlideShowInfo: interactions: check that properties are available
Not all properties are available for all kind of shapes.
In this case Visible is not available for a SvxFrameShape.

Change-Id: I7811ab6cd04d782f8758fbee449bbc5bc421fd51
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177470
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-11-28 13:17:14 +01:00
László Németh
32398232e9 tdf#164074 sw inline heading: add up/down outline moving
Move inline headings with their outline tree in
Navigator, clicking on the Move Heading Up/Down icons.

Instead of changing CompareSwOutlineNodes, which breaks
the code at other places, add a new SwOutlineNodesInline
and CompareSwOutlineNodesInline to sort inline headings
(put in Inline Heading frames) with normal headings only
for MoveOutlinePara and other part of Navigator's
outline moving.

Reordering chapters and sections using the Navigator was
limited for normal (root) headings, but not for headings
in text frames and tables.

Recent implementation of inline headings use text frames
with Inline Heading frame style, anchored as characters
to their paragraphs. Now these inline headings are movable
with the Navigator, with their outline tree, i.e. the paragraph
where the inline heading anchored as character, the following
paragraphs without inline heading, or the following subsections.

Note: selecting the inline headings is possible by the Navigator
content tree or or by clicking inside the text of the inline
heading in the document.

Note: according to the fix for tdf#143569, multiple headings
in the same text frame or table are ordered alphabetically in
the Navigator. This doesn't effect the inline headings, where
there is only a single heading in an Inline Heading text frame.

Follow-up to commit 7a35f3dc74
"tdf#48459 sw inline heading: apply it on the selected words",
commit d87cf67f8f
"tdf#131728 sw inline heading: fix missing/broken DOCX export"
and commit a1dcbd1d1c
"tdf48459 sw inline heading: add Inline Heading frame style".

Change-Id: I7618aa1d4e1ddc20512d81c9a2babfa660053cbf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177438
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
2024-11-28 12:39:47 +01:00
Andrea Gelmini
60047110c1 Fix typos
Change-Id: I60eaa9de20577ef7c7930c3ade23851c91ea3260
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177475
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2024-11-28 12:38:02 +01:00
Stephan Bergmann
3c9a4e222a loplugin:fakebool
Change-Id: I41d767833eb3dbc4264c1d6b63b7ddb71e422472
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177469
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2024-11-28 12:23:35 +01:00
Stephan Bergmann
83a06bf09e loplugin:reftotemp
Change-Id: I6ec03b1c3238a9c222444078b3d9b5ccb40d81d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177468
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-11-28 12:23:10 +01:00
Mike Kaganski
7ccde3fecf Simplify a bit
The creation of own TransferableDataHelper was needed when the code
was introduced initially, taking a reference to XTransferable; now,
when it already takes a helper, it's no more needed.

Change-Id: I4c42327ab9b964c61572be13a4a89b44efc8d343
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177466
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-28 12:16:54 +01:00
Mike Kaganski
c8fb044028 This is likely the correct object to use here
In commit 5e6def1bd4 (Redesign for XTransferable,
2001-01-19), a code was introduced, that used two different pPickObj variables.
Later, in commit 507aced21a (INTEGRATION: CWS
sdwarningsbegone (1.68.10); FILE MERGED, 2006-12-12), the name conflict was
fixed; but that fix changed the object used here, from the nearest, that was
just initialized in the current scope, to the one that was optionally assigned
early in the function, depending on a variable not used in current scope. I
assume that that was an overlook; so fix it now.

I don't have a failure case, just found it by code reading, so this could be
wrong, and need be reverted, hopefully with an explanation.

Change-Id: Ib95bc450b78f64e1ac468e9676f32395ddaf0870
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177464
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-11-28 12:16:47 +01:00
Mike Kaganski
cb53c054dd Use correct object
A potential dereference of nullptr was introduced as renaming overlook
in commit 507aced21a (INTEGRATION: CWS
sdwarningsbegone (1.68.10); FILE MERGED, 2006-12-12).

Change-Id: I4cf787e3ec3e1819040368d17279cae4db391bc7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177461
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-11-28 12:16:41 +01:00
Mike Kaganski
c70fa22d14 Return from functions, instead of using out arguments
Change-Id: Ie57bf41790800cc3bc83e0785a9063643d700c1f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177458
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-11-28 12:16:28 +01:00
Michael Weghorn
27c95bb445 svx: Simplify "Go to Page" dialog, let SpinButton do its job
Set the allowed range using weld::SpinButton::set_range
so that weld::SpinButton makes sure that a value within
the correct range is set, instead of having a custom
handler called when the text of the spinbutton changes
that effectively does the same thing (+ manually setting
cursor to the end of the edit, but sticking to the toolkit
default there instead makes sense to me for consistency).

Adjust the test case to no longer type invalid input
for the page number ("3a"), as SalInstanceSpinButton
doesn't parse the number then, but would set the value to
the minimum (here: 1) instead.
(If a different behavior were intended here, that
should be implemented in SalInstanceSpinButton or
the underlying VCL widgets to be consistent
across dialogs.)

In GotoPageDlg::GetPageSelection, use weld::SpinButton::get_value
to get the integer value right away, instead of
getting the text and converting that into an
integer manually.

All that custom handling provided an interesting test case
while implementing support for that dialog using native
Qt widgets, see commits up to

    commit 70825e677f
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Nov 28 00:30:10 2024 +0100

        tdf#130857 qt weld: Notify about spinbox combined value+text change

, but apart from that (which is done now), I think
that a more standard approach makes more sense.

Change-Id: I06492b6629a4210c6325d50467da8e195daa4c94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177463
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-28 11:57:33 +01:00
Xisco Fauli
94081225aa PVS: V612 An unconditional 'break' within a loop.
Change-Id: I512969e1583f780b54c035f6a3c3c3e14e783016
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177472
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-11-28 11:47:37 +01:00
Caolán McNamara
e805281f6f don't need to check for null twice
since:

commit 1ae71d8f09
CommitDate: Fri Dec 16 20:18:04 2022 +0000

    Revert "fix math export/import in docx/rtf"

tidy up here, and possibly

commit ef53355355
CommitDate: Wed Jan 4 13:49:58 2023 +0000

    Rudimentary support for dynamic_cast on UNO proxy objects

is also relevant

Change-Id: I27548c5071df4f3231a49a1ee47fa72d0a93148c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177471
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-28 11:33:46 +01:00
Michael Weghorn
ff3d9ab6ec tdf#130857 qt weld: Drop unused header
Change-Id: I93571abf7f056f51039672d03a7bcfc1d6bb6dea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177465
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-28 10:45:08 +01:00
Caolán McNamara
50fec9db06 crashtesting: unbalanced rtf {} on inability to export a math object
Seen in export of forum-mso-en-11772.docx to rtf and reimport

so rtf cannot be imported, a problem probably since:

commit c14355592c
CommitDate: Tue Dec 31 18:02:07 2013 +0100

    Related: fdo#66440 RTF export: handle NULL component in FlyFrameOLEMath()

A problem with casting the uno proxy obj probably got fixed with:

commit ef53355355
CommitDate: Wed Jan 4 13:49:58 2023 +0000

    Rudimentary support for dynamic_cast on UNO proxy objects

At least now converting the original test case to rtf doesn't crash for
me on export, and now uses "if (pBase)" to keep balanced and at least
output a preview image if not the math text content.

Change-Id: Ib428ab89fac6f36f1fa8e3bd7b3b01cd0a889d7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177442
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-28 09:57:05 +01:00
Tomaž Vajngerl
dee760e92c comphelper: put each Crypto impl. in own file - minimize ifdefs
This puts NSS and OpenSSL implementations into own classes and
adds an interface to make this possible. The implementation is
now determined in Library_comphelper.

Change-Id: I4918f19bca0adfd2f9180fb418d1bd57bb83982d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177383
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-11-28 09:50:08 +01:00
Xisco Fauli
4908455dc5 PVS: V612 An unconditional 'return' within a loop
Change-Id: Id7f54dd27a33cb4979e4d2594002ace25e65b34f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177441
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-11-28 09:29:05 +01:00
Mike Kaganski
211389c2d3 Flatten
Change-Id: I68a38cd7b2bf2dd966b357d81b6831790a229392
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177457
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-11-28 09:14:10 +01:00
Mike Kaganski
8bb3778952 Only sort if had a chance to add something
Change-Id: I54ec1368ab64d422de13217e877076a3ee41de94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177456
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-11-28 09:14:03 +01:00
Michael Weghorn
70825e677f tdf#130857 qt weld: Notify about spinbox combined value+text change
While QtInstanceEntry generally takes care of handling signals
for the spinbox's QLineEdit, this doesn't work when the value
is changed as a result of setting a new spinbox value (e.g.
by using the spinbox buttons), as the QLineEdit signals are blocked
then, see QAbstractSpinBoxPrivate::updateEdit in qtbase [1].
Therefore, connect the QDoubleSpinBox::textChanged signal
to the slot that calls signal_changed() instead to ensure
it gets called nonetheless, and disconnect from the other signal.

While at it, also add a SolarMutexGuard when calling the
signal.

This fixes the issue noticed with the "Go to Page"
dialog mentioned in previous commit

    Change-Id: I1f24cf3925e945ae78a9f1646535e08736cd8786

    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Nov 27 23:53:58 2024 +0100

        tdf#130857 qt weld: Support "Go to Page" dialog

as:

> One issue seen with the dialog is that by using the
> up arrow of the spinbox to increase the value, it
> is currently possible to increase the value
> beyond the maximum value (last page number),
> while this is not the case when typing a number
> into the box manually.
>
> This is because the GotoPageDlg::PageModifiedHdl
> handler currently only gets called for the
> latter case, not the former one, despite
>
>     Change-Id: Ie19bc852f4ceed0fa79565302975376db7126ea4
>     Author: Michael Weghorn <m.weghorn@posteo.de>
>     Date:   Wed Nov 27 22:53:55 2024 +0100
>
>         tdf#130857 qt weld: Also notify about programmatic text changes
>
> and will be addressed in a separate commit.

[1] https://code.qt.io/cgit/qt/qtbase.git/tree/src/widgets/widgets/qabstractspinbox.cpp?id=ced47a590aeb85953a16eaf362887f14c2815c45#n1790

Change-Id: Ifba9a0877442f9e84f0103d8aab202ae3583c5cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177451
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-28 08:38:26 +01:00
Michael Weghorn
d765cdc515 tdf#130857 qt weld: Support "Go to Page" dialog
Declare support for the "Edit" -> "Go to Page" dialog
available in e.g. Writer.

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.

One issue seen with the dialog is that by using the
up arrow of the spinbox to increase the value, it
is currently possible to increase the value
beyond the maximum value (last page number),
while this is not the case when typing a number
into the box manually.

This is because the GotoPageDlg::PageModifiedHdl
handler currently only gets called for the
latter case, not the former one, despite

    Change-Id: Ie19bc852f4ceed0fa79565302975376db7126ea4
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Nov 27 22:53:55 2024 +0100

        tdf#130857 qt weld: Also notify about programmatic text changes

and will be addressed in a separate commit.

Change-Id: I1f24cf3925e945ae78a9f1646535e08736cd8786
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177450
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-28 08:38:17 +01:00
Michael Weghorn
12fb40fd7b tdf#130857 qt weld: Let SpinButton derive from Entry
As weld::SpinButton derives from weld::Entry,
also let QtInstanceSpinButton derive from
QtInstanceEntry, instead of duplicating code
by reimplementing all of the weld::Entry methods
anew.

As the QtDoubleSpinBox derived from QDoubleSpinBox
itself is not a subclass of QLineEdit, it cannot
itself be passed down as the widget to the
QtInstanceEntry ctor.
Pass the spin box's QLineEdit instead. Make it
available by adding a new QtDoubleSpinBox::lineEdit
method which overrides the base class method of the same
name that is protected.

With this in place, QtInstanceSpinButton is now
the only QtInstanceWidget subclass where the
widget passed down to QtInstanceWidget is not
the same as passed by QtInstanceBuilder in
the QtInstanceSpinButton ctor, i.e.
QtInstanceWidget::getQWidget does not return
the QtDoubleSpinBox, but it's line edit.
Therefore, make QtInstanceWidget::getQWidget
virtual and override it in QtInstanceSpinButton
to return the spin box.

Drop the QtInstanceSpinButton methods of all
methods already implemented in QtInstanceEntry.

Change-Id: Ide2e1fe91216a5ec7f90a4f72ae34e3f63f624d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177449
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-28 08:38:10 +01:00
Michael Weghorn
68203597e1 tdf#130857 qt weld: Handle special value -1 for cursor pos
Implement special handling for cursor position value
of -1 according to the comment above weld::Entry::set_position
in include/vcl/weld.hxx:

    // nCursorPos can be -1 to set to the end

Change-Id: I078d2123f391cf1fcab6f40d26309e2a2eb2315f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177448
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-11-28 08:38:02 +01:00
Michael Weghorn
83ec1e7230 tdf#130857 qt weld: Also notify about programmatic text changes
Connect to the QLineEdit::textChanged [1] signal instead
of QLineEdit::textEdited [2].

As the doc of the latter says:

> Unlike textChanged(), this signal is not emitted when the text is
> changed programmatically, for example, by calling setText().

Programmatic changes are of interest, however, e.g.
GotoPageDlg::GotoPageDlg connects to the changed signal
of the weld::SpinButton and expects to be notified
when the text is changed by using the spin button
buttons to change the value (and thus the text).

[1] https://doc.qt.io/qt-6/qlineedit.html#textChanged
[2] https://doc.qt.io/qt-6/qlineedit.html#textEdited

Change-Id: Ie19bc852f4ceed0fa79565302975376db7126ea4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177447
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-28 08:37:56 +01:00
Michael Weghorn
df32eb6023 tdf#130857 qt weld: Call spinbutton value changed handler
Change-Id: I435ed112469b58cec191badaf98e7f019381707b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177446
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-11-28 08:37:49 +01:00
Mike Kaganski
669c839a61 Simplify ScSubTotalParam
Change-Id: I4c1840e377711ad065c3042bddacb2028481b88d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177433
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-28 05:36:59 +01:00
Justin Luth
2310b7c854 tdf#126533 vml gradient export: fix radial color swapping
This fixes my 24.8 regression 6dd6891a3d
related tdf#126533 tdf#159824 VML: don't export: negative angles

So far I really haven't touched radial gradient code,
but the above patch swapped the colors around for linear/axials,
and (while the import for radials is probably wrong)
that also changed round-tripped radials - swapping colors each time.

Note that on the unit test, the initial focus is 100,
so on the first import the colors are NOT swapped.
But since we don't write a focus, re-imports will start swapping.

See FillModel::pushToPropMap in oox/source/vml/vmlformatting.cxx

make CppunitTest_sw_ooxmlexport21 \
    CPPUNIT_TEST_NAME=testTdf126533_pageGradient

Change-Id: I469fe7fba520e338df90e2eb0d8bdf96709d2ecc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177452
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2024-11-28 02:35:47 +01:00
Rafael Lima
ec958b578b tdf#164069 Make line in Find sidebar respect dark mode
Change-Id: Ie75cb0a581447e7f247be6b6d2bf1860ec74c8eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177415
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
2024-11-28 01:41:55 +01:00
Michael Weghorn
fe7fe79fee tdf#130857 qt weld: Implement spinbutton cursor/sel methods
Implement QtInstanceSpinButton methods related to
the text cursor and selection.

The QDoubleSpinBox base class QAbstractSpinBox
has a method QAbstractSpinBox::lineEdit [1]
that provides access to the spin box's QLineEdit.
However, that method is protected, and can therefore
not be accessed from QtInstanceBuilder.
Therefore, add corresponding methods to
QtDoubleSpinBox and forward calls to the line edit
from there.

The methods implemented in this commit are
very similar to the corresponding ones in
QtInstanceEntry (which however has has direct access to
the QLineEdit).

[1] https://doc.qt.io/qt-6/qabstractspinbox.html#lineEdit

Change-Id: Ib5d2b55478f88618ed58adc2353824c59015a039
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177436
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-27 23:29:09 +01:00
Michael Weghorn
6ab6dcf920 tdf#130857 qt weld: Introduce custom QDoubleSpinBox subclass
Introduce a new QtDoubleSpinBox subclass for the
stock QDoubleSpinBox and use it for the native Qt
weld::SpinButton implementation.

Initially, the new subclass doesn't add any
additional functionality, but that will be
added in future commits to provide functionality
needed to implement more of the QtInstanceSpinButton
methods.

Change-Id: Icebbf6485172b065d6a6d2c1c8ef87be9d3d244e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177435
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-27 23:29:00 +01:00
Michael Weghorn
24b5ec3184 tdf#130857 gotopagedialog.ui: Resave with glade 3.40
This is the .ui file for the "Edit" -> "Go to page"
dialog in Writer.

This luckily also moves the "page_value" GtkAdjustment
to the top of the file, which (at least for now, in
order to support that dialog) avoids the need to
extend QtBuilder to implement handling of GtkAdjustments
that are referenced in the .ui file before they are
defined.

(If it's still needed in the future, extracting
some of the current logic from VclBuilder into
the BuilderBase or WidgetBuilder base classes for
reuse also by QtBuilder might be an idea.)

Change-Id: Ic03acc1d514d412cd609543754829a370a5678e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177434
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-27 23:28:54 +01:00