LibreOffice.git
14 months agoBump product version to 6.4.7.2.M1mimo-6.4.7.2.M1
Andras Timar [Thu, 6 May 2021 11:07:00 +0000 (6 13:07 +0200)]
Bump product version to 6.4.7.2.M1

Change-Id: I2a6f38caf2e17eaaad6d32610f0ca0f1a1125323

14 months agotry to use a different timestamp service
Andras Timar [Thu, 11 Feb 2021 07:27:23 +0000 (11 08:27 +0100)]
try to use a different timestamp service

Change-Id: I0fdbe2871d74836d530a69532bf22c17f642c922

14 months ago[cp] HACK: sleep before sign
Andras Timar [Wed, 18 Apr 2018 14:19:00 +0000 (18 07:19 -0700)]
[cp] HACK: sleep before sign

On Windows, with 16x parallel build, build-nocheck target fails,
because it tries to sign a file that is already in use (gengal).

Change-Id: Ic582334f2c02f5e38f49d048fc0425025ffeee41
Reviewed-on: https://gerrit.libreoffice.org/75235
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
14 months agoallow utf-8 in xml names (liborcus) (tdf#141672)
Luboš Luňák [Thu, 29 Apr 2021 18:10:34 +0000 (29 20:10 +0200)]
allow utf-8 in xml names (liborcus) (tdf#141672)

Change-Id: Ib150d55b588a572e4352396f18de2331983b2aae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114892
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
(cherry picked from commit 6b7c2fa65eb68be520ed4135cc245e33fa22e8bf)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114915
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
14 months agoxmlsec: fix signing documents on WNT
Michael Stahl [Wed, 7 Apr 2021 15:00:43 +0000 (7 17:00 +0200)]
xmlsec: fix signing documents on WNT

Duplicate ds:X509Certificate elements cause:
warn:xmlsecurity.comp:9604:3820:xmlsecurity/source/helper/xmlsignaturehelper.cxx:658: X509Data do not form a chain: certificate in cycle:

(regression from 5af5ea893bcb8a8eb472ac11133da10e5a604e66)

Change-Id: I3d319a2f74dbec17b73f1c7bb8f4efe4e335f0ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113746
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit ae08aa8a095832ae2a88eac14f9680ac8d3a13b6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113752
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
(cherry picked from commit 0ab3a264ba8d732cffa42a069c9aa50dab44e99f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113753
Tested-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
14 months agoxmlsecurity: replace OOXMLSecParser implementation
Michael Stahl [Tue, 30 Mar 2021 15:37:31 +0000 (30 17:37 +0200)]
xmlsecurity: replace OOXMLSecParser implementation

This is similar to 12b15be8f4f930a04d8056b9219ac969b42a9784 and following
commits, but OOXMLSecParser has some differences to XSecParser, such as
using a ds:Manifest, and requires a couple extra namespaces.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113381
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit cc1d19f7bbaefa5fb22ebd1344112755068b93c9)

Change-Id: I56e39d9609db8fcad50ca1632ff482c1f0a30ff5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113409
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
14 months agotdf#131031 take MenuBar into account on size change
Armin Le Grand (Allotropia) [Wed, 17 Mar 2021 17:31:59 +0000 (17 18:31 +0100)]
tdf#131031 take MenuBar into account on size change

in GtkSalFrame::SetPosSize when setting local vars for
maGeometry.nWidth/nHeight the implicitely existing gtk
native menu bar has to be taken into account. This can
be done by extracting the values for it and re-apply
to the new values.

Change-Id: Ic0e76ecfd49fab7dbf330f3e26ab4a6ad3267b35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112654
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
(cherry picked from commit cc1690b9752b3fef3d541de0d26b7c7681615767)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112728
Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
14 months agoxmlsecurity: improve handling of multiple X509Data elements
Michael Stahl [Thu, 25 Feb 2021 13:17:48 +0000 (25 14:17 +0100)]
xmlsecurity: improve handling of multiple X509Data elements

Combine everything related to a certificate in a new struct X509Data.

The CertDigest is not actually written in the X509Data element but in
xades:Cert, so try to find the matching entry in
XSecController::setX509CertDigest().

There was a confusing interaction with PGP signatures, where ouGpgKeyID
was used for import, but export wrote the value from ouCertDigest
instead - this needed fixing.

The main point of this is enforcing a constraint from xmldsig-core 4.5.4:

  All certificates appearing in an X509Data element MUST relate to the
  validation key by either containing it or being part of a certification
  chain that terminates in a certificate containing the validation key.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111254
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 9e82509b09f5fe2eb77bcdb8fd193c71923abb67)

xmlsecurity: improve handling of multiple certificates per X509Data

It turns out that an X509Data element can contain an arbitrary number of
each of its child elements.

How exactly certificates of an issuer chain may or should be distributed
across multiple X509Data elements isn't terribly obvious.

One thing that is clear is that any element that refers to or contains
one particular certificate has to be a child of the same X509Data
element, although in no particular order, so try to match the 2 such
elements that the parser supports in XSecController::setX509Data().

Presumably the only way it makes sense to have multiple signing
certificates is if they all contain the same key but are signed by
different CAs. This case isn't handled currently; CheckX509Data() will
complain there's not a single chain and validation of the certificates
will fail.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111500
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 5af5ea893bcb8a8eb472ac11133da10e5a604e66)

xmlsecurity: add EqualDistinguishedNames()

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111545
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 1d3da3486d827dd5e7a3bf1c7a533f5aa9860e42)

xmlsecurity: avoid exception in DigitalSignaturesDialog::getCertificate()

Fallback to PGP if there's no X509 signing certificate because
CheckX509Data() failed prevents the dialog from popping up.

To avoid confusing the user in this situation, the dialog should
show no certificate, which is already the case.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111664
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 90b725675c2964f4a151d802d9afedd8bc2ae1a7)

xmlsecurity: fix crash in DocumentDigitalSignatures::isAuthorTrusted()

If the argument is null.

This function also should use EqualDistinguishedNames().

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111667
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit ca98e505cd69bf95d8ddb9387cf3f8e03ae4577d)

Change-Id: I9633a980b0c18d58dfce24fc59396a833498a77d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111910
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit a1cf770c2d7ca3e153e0b1f01ddcc313bc2bed7f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113058
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
14 months agooox, svx, sw, xmlsecurity: clang-format these files
Miklos Vajna [Tue, 19 May 2020 13:33:44 +0000 (19 15:33 +0200)]
oox, svx, sw, xmlsecurity: clang-format these files

I added these files more or less recently and they have long lines. Use
clang-format to break at a sane column limit.

Change-Id: Id4ef832e4843fc81f4a497385e49ccb835a7197f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94503
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
(cherry picked from commit 868acbd97b58b200731ca25ece4019de734e5726)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113057
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
14 months agoRemove unnecessary if block
Samuel Mehrbrodt [Wed, 29 Apr 2020 05:42:24 +0000 (29 07:42 +0200)]
Remove unnecessary if block

And format code inside

Change-Id: Ied0d98935134bf6f7bc8c929645ad5faac9affa3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93116
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
(cherry picked from commit cf36fe5eb41910c26d58fb25e54ccf2e0ee01365)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113056
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
14 months agoxmlsecurity: ignore elements in ds:Object that aren't signed
Michael Stahl [Fri, 19 Feb 2021 16:56:21 +0000 (19 17:56 +0100)]
xmlsecurity: ignore elements in ds:Object that aren't signed

Change-Id: I2e4411f0907b89e7ad6e0185cee8f12b600515e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111253
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 2bfa00e6bf4b2a310a8b8f5060acec85b5f7a3ce)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111909
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 94ce59dd02fcfcaa1eb4f195b45a9a2edbd58242)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113055
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
14 months agoxmlsecurity: XSecParser confused about multiple timestamps
Michael Stahl [Thu, 18 Feb 2021 18:22:31 +0000 (18 19:22 +0100)]
xmlsecurity: XSecParser confused about multiple timestamps

LO writes timestamp both to dc:date and xades:SigningTime elements.

The parser tries to avoid reading multiple dc:date, preferring the first
one, but doesn't care about multiple xades:SigningTime, for undocumented
reasons.

Ideally something should check all read values for consistency.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111160
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 4ab8d9c09a5873ca0aea56dafa1ab34758d52ef7)

xmlsecurity: remove XSecController::setPropertyId()

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111252
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit d2a345e1163616fe3201ef1d6c758e2e819214e0)

Change-Id: Ic018ee89797a1c8a4f870ae102af48006de930ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111908
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit abe77c4fcb9ea97d9fff07eaea6d8863bcba5b02)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113054
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
14 months agoxmlsecurity: replace XSecParser implementation
Michael Stahl [Fri, 12 Feb 2021 15:42:51 +0000 (12 16:42 +0100)]
xmlsecurity: replace XSecParser implementation

Implement Namespaces in XML and follow xmldsig-core and XAdES schemas.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110833
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 12b15be8f4f930a04d8056b9219ac969b42a9784)

xmlsecurity: move XSecParser state into contexts

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111158
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 59df9e70ce1a7ec797b836bda7f9642912febc53)

xmlsecurity: move XSecParser Reference state into contexts

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111159
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit cfeb89a758b5f0ec406f0d72444e52ed2f47b85e)

Change-Id: I03537b51bb757ecbfa63a826b38de543c70ba032
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111907
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit ad5930e87e788780a255523f106deb1dde5d7b37)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113053
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
14 months agoexpand out some namespace aliases [xmlsecurity/source/helper]
Noel Grandin [Tue, 12 May 2020 14:17:25 +0000 (12 16:17 +0200)]
expand out some namespace aliases [xmlsecurity/source/helper]

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94093
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit 943fbfad668da76f7d0ebd4f4d8cdd67224d2f01)

plus one line in xsecverify.cxx from:

    commit f59d9e7ea09482c2e9e5f52a8d0445e4cebc3df5
    Author:     Noel Grandin <noel.grandin@collabora.co.uk>
    AuthorDate: Fri Apr 3 15:53:49 2020 +0200

    new loplugin:unusedvariableplus

    a particularly aggressive checker, which is why it is off by default

Change-Id: I5fdb554a1b116824843f35645bc1cea3ca91e0f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113052
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
14 months agodefault to CertificateValidity::INVALID
Caolán McNamara [Mon, 8 Feb 2021 17:05:28 +0000 (8 17:05 +0000)]
default to CertificateValidity::INVALID

so if CertGetCertificateChain fails we don't want validity to be
css::security::CertificateValidity::VALID which is what the old default
of 0 equates to

notably

commit 1e0bc66d16aee28ce8bd9582ea32178c63841902
Date:   Thu Nov 5 16:55:26 2009 +0100

    jl137:  #103420# better logging

turned the nss equivalent of SecurityEnvironment_NssImpl::verifyCertificate
from 0 to CertificateValidity::INVALID like this change does

Change-Id: I5350dbc22d1b9b378da2976d3b0abd728f1f4c27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110561
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit edeb164c1d8ab64116afee4e2140403a362a1358)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113051
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
14 months agodo same set error state as ReadAndVerifySignature does
Caolán McNamara [Thu, 11 Mar 2021 20:23:31 +0000 (11 20:23 +0000)]
do same set error state as ReadAndVerifySignature does

this function is nearly exactly the same as ReadAndVerifySignature
except it doesn't set error-state on exception during parse

Change-Id: Ife881f639a11d3185920ca62cc2cd22812fae36d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112366
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112412
(cherry picked from commit 52a23d595b820cab27d76d0e7c129f2757c762d6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113050
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
14 months agoImprove checkExtension
Stephan Bergmann [Tue, 16 Feb 2021 08:30:09 +0000 (16 09:30 +0100)]
Improve checkExtension

Change-Id: Iff416a9c5930ad5903f7ee51a2abbc94d5f40800
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110970
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
(cherry picked from commit f456c4dacf700e064e112ef068ff7edb04239754)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110922
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit f19d95986756412e5d72047656eec17a720c5e57)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113049
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
14 months agoImprove macro checks
Samuel Mehrbrodt [Mon, 18 Jan 2021 14:24:48 +0000 (18 15:24 +0100)]
Improve macro checks

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109552
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
(cherry picked from commit 1dc71daf7fa7204a98c75dac680af664ab9c8edb)

Change-Id: Ie40801df8866b52c1458e020ffa9cba120720af7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110281
Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
14 months agopython3: upgrade to release 3.7.10
Michael Stahl [Wed, 17 Feb 2021 12:56:52 +0000 (17 13:56 +0100)]
python3: upgrade to release 3.7.10

Fixes CVE-2021-3177 plus these less important ones:
CVE-2021-23336 CVE-2020-27619 CVE-2020-14422 CVE-2020-26116
CVE-2019-20907 CVE-2020-8492 CVE-2019-18348

Change-Id: I8e83395bd3e871eb2ed030a03827b7d261c96049
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111069
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
14 months agopostgresql: try to cargo-cult MSBuild arguments
Michael Stahl [Wed, 3 Feb 2021 17:59:41 +0000 (3 18:59 +0100)]
postgresql: try to cargo-cult MSBuild arguments

Extremely unclear to me whether these are useful or necessary,
but the other MSBuild ones have them.

Change-Id: Iacdd1a1e326bd9ae7c918f5b143495f613ff41d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110385
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
(cherry picked from commit bbc5cc71fd1723db8cb5020f83db5cafc0f8a52a)

14 months agoSilence -Werror=maybe-uninitialized
Stephan Bergmann [Wed, 4 Dec 2019 15:51:28 +0000 (4 16:51 +0100)]
Silence -Werror=maybe-uninitialized

...where the members of aRectangle passed into gtv_calc_header_bar_draw_text
(and unconditionally used there, see the definition further up in this file) are
only set for ROW and COLUMN types.  Lets assume that no other types can happen
here?  (This is part of libreofficekit/Executable_gtktiledviewer.mk, see
libreofficekit/README for how to execute it.)

Change-Id: I487be241e564127183751758710140ab24941f63
Reviewed-on: https://gerrit.libreoffice.org/84424
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit 281f3d5c418e50a2858619633ebca290bd626c03)

14 months agoofz#27817 null deref
Caolán McNamara [Tue, 24 Nov 2020 13:06:13 +0000 (24 13:06 +0000)]
ofz#27817 null deref

Change-Id: I16da6f6f78dfd0a4bc17017275a6644d6e4340c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106533
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 48d052a9f1bdbd34e1819b45ab83f51b84911702)

14 months agoofz#26943 detect if FormatOfJustInsertedApo was deleted
Caolán McNamara [Tue, 3 Nov 2020 16:53:55 +0000 (3 16:53 +0000)]
ofz#26943 detect if FormatOfJustInsertedApo was deleted

move FrameDeleteWatch for reuse in the doc filter

Change-Id: I6e53549a837968cb738b5188e8670dd3e38a9c0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105264
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 2a7a62c09582ec24247022a94e929610d141a4c9)

14 months agoofz#26676 null deref
Caolán McNamara [Tue, 27 Oct 2020 10:12:37 +0000 (27 10:12 +0000)]
ofz#26676 null deref

Change-Id: Ic2bd8b49762266ad48263bd68a143b46fb5fd66f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104863
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 9bf58fd45814f10ecf6131aeeec86123a383723f)

14 months agoofz#26619 detect if SwFrameFormat deleted during import
Caolán McNamara [Mon, 26 Oct 2020 20:38:03 +0000 (26 20:38 +0000)]
ofz#26619 detect if SwFrameFormat deleted during import

Change-Id: I5dc778e44dcb670353e83037a5a5d469fa437186
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104853
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 7ae9e8b6ba35dec2c556f6fac4034cd9bb1111a1)

14 months agoofz#26480 validate WW8PLCFpcd is sorted like WW8PLCF does
Caolán McNamara [Sun, 18 Oct 2020 19:36:16 +0000 (18 20:36 +0100)]
ofz#26480 validate WW8PLCFpcd is sorted like WW8PLCF does

Change-Id: I11393c730986585aeea229ebeec6417e4a0578d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104510
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 7f55db80c6fe42c162bbf51404e638a66b6ae9ab)

14 months agoofz#26122 allow NINSIZE input full elements
Caolán McNamara [Sat, 3 Oct 2020 20:56:19 +0000 (3 21:56 +0100)]
ofz#26122 allow NINSIZE input full elements

Change-Id: Ifbde8fc055a91e23db08508a34ce4664d2f1f96f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103906
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit fb0c3f9d8964f8c0f40238559c32d9d73cba6b55)

14 months agoofz#25989 cmap parsing
Caolán McNamara [Tue, 29 Sep 2020 19:59:40 +0000 (29 20:59 +0100)]
ofz#25989 cmap parsing

Change-Id: I048e5d88d5926a4afa75afab18db5ca6354e2454
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103641
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 9a1202edab0cfe95572f12a8c49ef756ead49bf2)

14 months agoofz#20622 oom
Caolán McNamara [Sat, 7 Mar 2020 19:24:42 +0000 (7 19:24 +0000)]
ofz#20622 oom

Change-Id: Id77d90197e98d29787a40966f248dd769c9dac28
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90175
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 1e95c2c17a49349caba1e62b4de3752c5f767f01)

14 months agoofz#20517 null-dereference
Caolán McNamara [Fri, 7 Feb 2020 14:09:57 +0000 (7 14:09 +0000)]
ofz#20517 null-dereference

Change-Id: I443869f848925911ed46e2f547f0dc652b1ff290
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88214
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 08695569fd4fccc1722e7e3c7e0a234699199196)

14 months agoofz#20447 Null-dereference READ
Caolán McNamara [Sat, 1 Feb 2020 11:21:10 +0000 (1 11:21 +0000)]
ofz#20447 Null-dereference READ

Change-Id: I76c1c815ab5aaf4548c886a69989fcabe3de5248
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87802
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit fec7e3422f4d1c5b9382518a11d0bb99b12e41c9)

14 months agoofz#20366 OOM
Caolán McNamara [Tue, 28 Jan 2020 16:43:28 +0000 (28 16:43 +0000)]
ofz#20366 OOM

Change-Id: If658720502739e6ad88c3cf73ac6674e0313a48b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87648
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 090cf1e3bbe0ffaf56f22b152b73578483be2f42)

14 months agoofz#20456 Null-dereference READ
Caolán McNamara [Sat, 1 Feb 2020 12:04:26 +0000 (1 12:04 +0000)]
ofz#20456 Null-dereference READ

this is the first honggfuzz (honggfuzz_asan_libreoffice) report I've seen to date

Change-Id: Iac733aa63c7c94d9454b9c8596340dc2286393c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87803
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 0754e581b0d8569dd08cf26f88678754f249face)

14 months agopostgresql: upgrade to release 13.1
Michael Stahl [Tue, 19 Jan 2021 14:38:05 +0000 (19 15:38 +0100)]
postgresql: upgrade to release 13.1

Fixes CVE-2020-25694, plus a bunch more CVE that don't look relevant.

* --with-krb5 no longer exists, neither does --disable-shared
* remove internal-zlib.patch.1:
  zlib is only used by pg_* tools / contrib/pgcrypto
* remove postgresql-libs-leak.patch:
  some relic from pre-gbuild times, not clear what the point is for
  static libs
* remove postgresql-9.2.1-libreoffice.patch:
  another dmake .mk file relic, and the win32 nmake build system was
  removed
* add postgres-msvc-build.patch.1 to fix Cygwin perl and openssl
* on WNT, libpq.dll is now built, no longer static lib

postgresql: fix mistake in RepositoryExternal.mk

Change-Id: Ic0232a28801b2f604d9f4e33d5621ae3362defaa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109640
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 234833f7823a1424b62c93e145f0cfe2c6b6efd5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109698
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
(cherry picked from commit 1362bf7fa2957d34a7cef18dd95ede22cc42787f)

14 months agocheck-elf-dynamic-objects: allow libgsttag-1.0.so.0
Michael Stahl [Sun, 1 Nov 2020 14:34:52 +0000 (1 15:34 +0100)]
check-elf-dynamic-objects: allow libgsttag-1.0.so.0

It's linked in Fedora 33 and apparently exists in gst-plugins-base
since 1.0.0.

Change-Id: Ifc5d6a6b06e05ef4e250ac26a8588a242f21a034
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105140
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit 4ebb3eae7b4abb7ecc37df73c6f80e3fd2069ed7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109766
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
14 months agonss: fix parallel build race in nsinstall.py
Michael Stahl [Tue, 19 Jan 2021 10:28:41 +0000 (19 11:28 +0100)]
nss: fix parallel build race in nsinstall.py

  File "/home/tdf/lode/jenkins/workspace/android_aarch64/external/nss/nsinstall.py", line 112, in nsinstall
    os.makedirs(args[0])
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/os.py", line 223, in makedirs
    mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '../../../../dist/public/dbm'
../../../coreconf/rules.mk:119: recipe for target '../../../../dist/public/dbm/d' failed

Change-Id: I4273e6d3d5fa520353fff8738823ef281fe237ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109619
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 6f5186a94dcd1989cdd819e35163af0542912559)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109587
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
(cherry picked from commit 01fffa977e28b2a671f195daa3a1aaa4cbe3b258)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109765
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
14 months agotdf#135014 sw: fix crash exporting numbering to DOCX
Michael Stahl [Wed, 13 Jan 2021 10:03:17 +0000 (13 11:03 +0100)]
tdf#135014 sw: fix crash exporting numbering to DOCX

It can happen that the default SwNumRule of a SwList isn't used by
anything directly, but there are other SwNumRule associated with that
SwList and then the DOCX export needs to export it as an abstract
numbering definition.

(regression from 632ee9aae6d5f3cf08b6d6b2789310c20db713b7)

Change-Id: I6b1851980464aaa95bf731a60b7d11ab91cec7b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109303
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit cd1c9f5167e797807d6726219f06190657f58372)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109335
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit e0be320cc790856df4d9a102d15de08aa16217fa)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109336
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
14 months agoopenssl_headers depends on generated opensslconf.h
Stephan Bergmann [Thu, 7 Jan 2021 09:15:51 +0000 (7 10:15 +0100)]
openssl_headers depends on generated opensslconf.h

...at workdir/UnpackedTarball/openssl/include/openssl/opensslconf.h, as can be
seen with failed builds like
<https://ci.libreoffice.org//job/lo_tb_master_mac/35209>:

[...]
> [build PAT] openssl
> [build C  ] UnpackedTarball/mariadb-connector-c/plugins/auth/caching_sha2_pw.c
> [build C  ] UnpackedTarball/mariadb-connector-c/libmariadb/secure/openssl_crypt.c
> [build DEP] LNK:Library/libclucene.dylib
> [build LNK] Library/libclucene.dylib
> In file included from /Users/tdf/lode/jenkins/workspace/lo_tb_master_mac/workdir/UnpackedTarball/mariadb-connector-c/libmariadb/secure/openssl_crypt.c:21:
> /Users/tdf/lode/jenkins/workspace/lo_tb_master_mac/workdir/UnpackedTarball/openssl/include/openssl/evp.h:13:11: fatal error: 'openssl/opensslconf.h' file not found
> # include <openssl/opensslconf.h>
>           ^~~~~~~~~~~~~~~~~~~~~~~
> 1 error generated.

Change-Id: Ied1dcdd0afb6099e9218671c6a06c0edaafc931e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108928
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit 0f7008e91f45cf8e3cee6f372ce012b38a795e26)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108911
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 74b6e9d45a7f97c8723f638a784017be99f3a8c2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109339
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
14 months agopoppler: upgrade to release 21.01.0
Michael Stahl [Wed, 6 Jan 2021 18:30:07 +0000 (6 19:30 +0100)]
poppler: upgrade to release 21.01.0

Fixes CVE-2020-27778, CVE-2020-35702
and changelogs mention lots of fuzzing fixes.

Change-Id: Ib07bdee726905e74afc13a01bbbd53f218121744
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108912
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 48e8b32a9b66722bbb28fc15840b3706a461aeb7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108904
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
(cherry picked from commit fb185106492f5aabac6ab57ae90cd81d51480093)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108949
Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
14 months agoopenssl: add patch to fix CVE-2020-1971
Michael Stahl [Wed, 6 Jan 2021 16:39:19 +0000 (6 17:39 +0100)]
openssl: add patch to fix CVE-2020-1971

Change-Id: Ia756f1fa642eeb6dcadc867cc9730732a73c11b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108884
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
(cherry picked from commit b4c5bd9b330068e8c550e398cf761457ec9b6aa4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108948
Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
14 months ago[API CHANGE] extend css.security.XDocumentDigitalSignatures
brinzing [Thu, 2 Jan 2020 17:12:31 +0000 (2 18:12 +0100)]
[API CHANGE] extend css.security.XDocumentDigitalSignatures

Add support for macro and package signing with a provided certificate
which is already possible for document signing since LO 6.2:

boolean signScriptingContentWithCertificate(
          [in] ::com::sun::star::security::XCertificate xCertificate,
          [in] ::com::sun::star::embed::XStorage xStorage,
          [in] ::com::sun::star::io::XStream xStream);

boolean signPackageWithCertificate(
          [in] ::com::sun::star::security::XCertificate xCertificate,
          [in] ::com::sun::star::embed::XStorage xStorage,
          [in] ::com::sun::star::io::XStream xStream);

Change-Id: I9783cd317a7202691913be186eca95964b1e0ff7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86141
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit 697989d11e25b3eb83e5ca2dad5d71b178abfbc1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107756
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
14 months agoxmlsecurity: reject a few dangerous annotation types during pdf sig verify
Miklos Vajna [Wed, 4 Nov 2020 20:39:04 +0000 (4 21:39 +0100)]
xmlsecurity: reject a few dangerous annotation types during pdf sig verify

(cherry picked from commit f231dacde9df1c4aa5f4e0970535c4f4093364a7)

Conflicts:
xmlsecurity/source/helper/pdfsignaturehelper.cxx

Change-Id: I950b49a6e7181639daf27348ddfa0f36586baa65
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105926
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit fcab45e0e22f4cf46e71856dba7ae5abd6f99bc5)

14 months agofix --disable-pdfium build
Caolán McNamara [Thu, 29 Oct 2020 15:45:01 +0000 (29 15:45 +0000)]
fix --disable-pdfium build

Change-Id: I580972220bc39abe16288fa62c717e4ab25833d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105015
Tested-by: Jenkins
Tested-by: René Engelhard <rene@debian.org>
Reviewed-by: René Engelhard <rene@debian.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit b9e5d5347e5dece693fe56b88570abc07a30a8ba)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107064
Tested-by: Michael Stahl <michael.stahl@cib.de>
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
14 months agoexternal: update pdfium to handle redact annotations
Miklos Vajna [Tue, 21 Jul 2020 19:25:26 +0000 (21 21:25 +0200)]
external: update pdfium to handle redact annotations

external: update pdfium to 4203

(cherry picked from commit 4488be8a9279be0bd0aebd476589a49d2b95da6e)

Update one mention of pdfium-4137.tar.bz2

...left behind by 4488be8a9279be0bd0aebd476589a49d2b95da6e "external: update
pdfium to 4203"

(cherry picked from commit ba4b3d5f7a0fe8d0d985e98897e041d59093d8b0)

external: update pdfium to 4260

(cherry picked from commit f19381e46930bb496e7331754843920933fb4be2)

external: update pdfium to 4306

(cherry picked from commit fe531957e3dcd42927cf15ab31d04473433d81f9)

Conflicts:
include/vcl/pdf/PDFAnnotationSubType.hxx

Change-Id: Ic10cf99fa412f8f0b3475e82d0a1839a7f04bd08
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105913
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
(cherry picked from commit b4f50e78e9cd391964128bd0d1446d4dca110cef)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107063
Tested-by: Michael Stahl <michael.stahl@cib.de>
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
14 months agoxmlsecurity: handle MDP permission during PDF verify
Miklos Vajna [Mon, 19 Oct 2020 14:50:07 +0000 (19 16:50 +0200)]
xmlsecurity: handle MDP permission during PDF verify

(cherry picked from commit 586f6abee92af3cdabdce034b607b9a046ed3946)

Conflicts:
include/vcl/filter/PDFiumLibrary.hxx
vcl/source/pdf/PDFiumLibrary.cxx
xmlsecurity/source/helper/pdfsignaturehelper.cxx

Change-Id: I626fca7c03079fb0374c577dcfe024e7db6ed5b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105785
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 00479937dc071246cc27f33fd6397668448a7ed9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107062
Tested-by: Michael Stahl <michael.stahl@cib.de>
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
14 months agovcl pdf tokenizer: fix handling of dict -> array -> dict tokens
Miklos Vajna [Fri, 16 Oct 2020 16:15:21 +0000 (16 18:15 +0200)]
vcl pdf tokenizer: fix handling of dict -> array -> dict tokens

Needed to be able to parse the /Reference key of signatures.

(cherry picked from commit 056c1284d6a68525002c54bef10834cc135385db)

Conflicts:
vcl/qa/cppunit/filter/ipdf/ipdf.cxx

Change-Id: I6b81089a3f58a2de461ad92ca5a891c284f8686a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105626
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 8f46af565680bef0ff8ca32781e6d813a7446543)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107061
Tested-by: Michael Stahl <michael.stahl@cib.de>
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
14 months agoBetter handling of Java files
Stephan Bergmann [Wed, 25 Nov 2020 08:13:12 +0000 (25 09:13 +0100)]
Better handling of Java files

Change-Id: Ifa662be39ac7d35241ee31956e2556b7ba3b5a02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106558
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit 696739056f37430154d6333b8f7228d1c44d09b3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106520
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit ec5adc39cbea6d754ef68ab3d03fb16066b27e40)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107060
Tested-by: Michael Stahl <michael.stahl@cib.de>
14 months agoCVE-2020-25713 raptor2: malformed input file can lead to a segfault
Caolán McNamara [Mon, 23 Nov 2020 14:33:06 +0000 (23 14:33 +0000)]
CVE-2020-25713 raptor2: malformed input file can lead to a segfault

due to an out of bounds array access in
raptor_xml_writer_start_element_common

use a better fix than the initial suggestion

See:
https: //bugs.mageia.org/show_bug.cgi?id=27605
https: //www.openwall.com/lists/oss-security/2020/11/13/1
Change-Id: Ida4783a61412ffce868eacf81310da338d3e2df1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106249
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Tested-by: Jenkins
(cherry picked from commit 43433f42017014a472a253314a6ac58a6774dced)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107059
Tested-by: Michael Stahl <michael.stahl@cib.de>
14 months agoexternal/liblangtag: Avoid null pointer deref in lt_warning call
Stephan Bergmann [Wed, 27 Nov 2019 09:28:52 +0000 (27 10:28 +0100)]
external/liblangtag: Avoid null pointer deref in lt_warning call

Recent GCC 10 trunk warns (when LO is configured with --enable-optimized):

> In file included from lt-script-db.c:24:
> lt-script-db.c: In function ‘lt_script_db_parse.constprop’:
> lt-messages.h:105:2: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
>   105 |  lt_message_printf(LT_MSG_WARNING, \
>       |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   106 |      LT_MSG_FLAG_NONE, \
>       |      ~~~~~~~~~~~~~~~~~~~
>   107 |      0,   \
>       |      ~~~~~~
>   108 |      __VA_ARGS__)
>       |      ~~~~~~~~~~~~
> lt-script-db.c:137:4: note: in expansion of macro ‘lt_warning’
>   137 |    lt_warning("No subtag node: description = '%s'",
>       |    ^~~~~~~~~~
> lt-script-db.c:137:47: note: format string is defined here
>   137 |    lt_warning("No subtag node: description = '%s'",
>       |                                               ^~

Change-Id: I2924f7aab84f4f2640f277ee5c2689753627ae78
Reviewed-on: https://gerrit.libreoffice.org/83869
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit 047e8ae5d189f030d565b13f97a4d6a45b00e6be)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105557
Tested-by: Michael Stahl <michael.stahl@cib.de>
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
14 months agotdf#137982 m_xFrame is already disposed
Caolán McNamara [Wed, 4 Nov 2020 13:01:53 +0000 (4 13:01 +0000)]
tdf#137982 m_xFrame is already disposed

move the frame cleanup into a helper that listens to see if it got
disposed by the preview itself

Change-Id: I523285268118300f18b0f0f0a10fab7a9cced9c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105221
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit a986db4b2d24669e502e447036851e118cc23036)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105349
Tested-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
14 months agotdf#136983 partial revert NFC ww8 cleanup: remove unused variables
Justin Luth [Mon, 28 Sep 2020 17:21:52 +0000 (28 20:21 +0300)]
tdf#136983 partial revert NFC ww8 cleanup: remove unused variables

This is a partial revert of LO 6.2
commit 2ec0cf500222aef55d02df80154b47fbb92970c9

I can't think of any excuse for how I possibly missed that
xDocProps was being defined/used outside of this clause.
Just plain stupid and blind.

The good news is that the create and modified date still
seem to be getting saved somehow/somewhere. So it isn't
the disaster that it looks like it could have been.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103565
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
(cherry picked from commit 1086654d6e8cc22f1f99195668db3f305437e570)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104495
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 19b8ded3ae18dd4070a3e21d7b980782a27e5547)

Change-Id: I72ef56fa50b9e92e4ce687b132b1919cfae6c1f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104497
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
21 months agobump product version to 6.4.7.2.0+libreoffice-6-4-7mimo-6-4-branch-point
Christian Lohmaier [Wed, 7 Oct 2020 12:25:17 +0000 (7 14:25 +0200)]
bump product version to 6.4.7.2.0+

Change-Id: I45e7d2b3b7683f8892fe2873c17aab833ceba3ce

21 months agotdf#137023 PPTX import: fix unexpected center alignment of shape text, 2nd try
Miklos Vajna [Mon, 5 Oct 2020 19:06:01 +0000 (5 21:06 +0200)]
tdf#137023 PPTX import: fix unexpected center alignment of shape text, 2nd try

Regression from commit 10bb02efd8afd42e633e370480104e2575546d8e
(tdf#129685 PPTX import: fix unexpected centering of shape text,
2020-09-18), now the problem was that some text should be left aligned,
but was centered.

Fix the problem by reverting most of the above commit: XML changes,
changes to SdImportTest::testTdf113198() (manual testing show that this
change is not needed after all) and changes to the
TextBodyPropertiesContext ctor in oox/ (but not the testcase itself).

Fix tdf#113198 again, this time in Shape::createAndInsert(), which is
meant to be closer to what the binary PPT import does.

With this, all cases from tdf#104722, tdf#113198, tdf#129685 and
tdf#137023 are meant to be handled correctly at the same time.

(cherry picked from commit dfa1856cdb4c69985ef1e809d33055427b6fbd76)

Change-Id: Id785252c26fc407cd74c9cfb55624091798d7773
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104006
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104023
(cherry picked from commit bcfe68c96893c39b07c15efd99cd010d6736f560)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103978
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
21 months agoupdate credits
Christian Lohmaier [Wed, 7 Oct 2020 12:07:48 +0000 (7 14:07 +0200)]
update credits

Change-Id: Iaa1726883202c35a3d5ce76893f05de46551e672
(cherry picked from commit 6aa831bf46282d3df8b5f214abed7428bd4bd001)
(cherry picked from commit 99b065ec31d032fc08ab14f66430dac4fef904a5)

21 months agoUpdate git submodules
Christian Lohmaier [Wed, 7 Oct 2020 11:52:25 +0000 (7 13:52 +0200)]
Update git submodules

* Update translations from branch 'libreoffice-6-4-7'
  to 245284b64254723cda02526c8c0ab139b2abbb54
  - update translations for 6.4.7 rc2

    and force-fix errors using pocheck

    Change-Id: I5b70ce184448b11dc7d76b84e5ad200a2d8f8474
    (cherry picked from commit a98a81ee9754921c9e3d306481e5db92514d7435)

21 months agotdf#134351: do not apply autofilter if all entries are selected
Xisco Fauli [Thu, 24 Sep 2020 19:16:05 +0000 (24 21:16 +0200)]
tdf#134351: do not apply autofilter if all entries are selected

Change-Id: I33cdfe07cc53b579bbe16486f302daf7bd3da841
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103352
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103569
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit 0d7bba4df1ebd80fa033116d73cbe8c6d3807d15)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103806
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Michael Weghorn <m.weghorn@posteo.de>
21 months agoRestore the fix for tdf#126830
Maxim Monastirsky [Wed, 30 Sep 2020 06:29:48 +0000 (30 09:29 +0300)]
Restore the fix for tdf#126830

It was lost with 1ae450504cf57457f9702684b1517fda1dd3c481
("drop gtk2 support"), which was based on an older revision
of gtksalmenu.cxx.

In the meantime, the UI for settings icons on was hidden
(see tdf#123265), but this can't be an excuse for carrying
the broken code. The setting is also still available as an
expert config.

Change-Id: Iffc6342bb312230646399f2f85ef0211315f6c8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103660
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
(cherry picked from commit 800baa9c60d8fb7b4ed8cf8ae0ba7b6b68c69c9c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103663
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit fa85f4c9dfdef681dbbcb56845b0c19c6ef1ff52)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103805
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Tested-by: Michael Stahl <michael.stahl@cib.de>
21 months agotdf#132688 diacritics broken in lines with punctuation
Noel Grandin [Thu, 3 Sep 2020 12:40:32 +0000 (3 14:40 +0200)]
tdf#132688 diacritics broken in lines with punctuation

regression from
    commit 4b2d4f3c4a68361a6bc03c9ab110ce9376b14b20
    tdf#119227 fix freeze when copying a large bulleted list

Change-Id: I7d54b19c7a02c717426edce7896caaadf909154e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102000
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
(cherry picked from commit 18e4367c33f327cf09985105bde583cdcc7b2a46)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101972
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 9ec49c6c2dd58eb60ca0ac5e99edee9ee098302a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103581
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit 48cf4c412cc4ddeccf1d21a81b3b4859b6a79459)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103587
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
21 months agoupdate credits
Christian Lohmaier [Wed, 30 Sep 2020 12:44:22 +0000 (30 14:44 +0200)]
update credits

Change-Id: I84bfd619b2f8802bc311eaa221670a9cae904160
(cherry picked from commit fb9b3e68dc4bf88a1a2764cbcd6420dc2a475220)
(cherry picked from commit 71a3f015f2ac45ad4a2625a3b6398f5d75feed40)

21 months agotdf#133358 fix crash in redoing indent
Caolán McNamara [Mon, 28 Sep 2020 13:05:00 +0000 (28 14:05 +0100)]
tdf#133358 fix crash in redoing indent

since...

commit b070202b420129b5edd368420e0e50ec45261d01
Date:   Tue Nov 20 18:26:18 2018 +0100

    sw_redlinehide_4a: SwEditShell::IsMoveLeftMargin(), MoveLeftMargin()

Change-Id: Ie28207747560153020341305015f1693f6ca9f50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103552
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit dc6e005c79b6c23b805dea44cd89fa83ea945f03)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103578
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit c1955f26cb772fc90ca81affcb524ebf1f12f3a3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103649
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
21 months agoRelated: tdf#136985 SfxStringListItem::GetString() crash in empty case
Caolán McNamara [Fri, 25 Sep 2020 14:08:51 +0000 (25 15:08 +0100)]
Related: tdf#136985 SfxStringListItem::GetString() crash in empty case

probably since...

commit a573b8b21688d9681f4fa129ec37cf89954e9d1c
Date:   Sat May 21 16:14:56 2011 -0430

    Replace List for std::vector in SfxStringListItem.

Change-Id: I7060b5693ba08fa5f70cc5cb3ae1b7a4722a31a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103340
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
(cherry picked from commit 7c8f997321e136208e8983ab6ad78cc33891125f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103572
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit 0451222f307e00ce688c564c10f39e894973c91e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103576
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
21 months agoResolves: tdf#133812 Add the 'Result' style again used by the Subtotal tool
Eike Rathke [Sun, 27 Sep 2020 18:37:34 +0000 (27 20:37 +0200)]
Resolves: tdf#133812 Add the 'Result' style again used by the Subtotal tool

Necessary to also adapt the test case that checks for a defined
number of styles.

Regression from

    commit 7b0aed617f1e57335837cf56ef2d222a96f8270d
    CommitDate: Wed Sep 28 11:42:56 2016 +0000

        Remove old cell styles from calc

and

    commit 06f319937187f76ee402d53b3baa78c391c2af19
    CommitDate: Sun Oct 2 13:51:26 2016 +0000

        tdf#90937 Add a set of cell styles to calc

Change-Id: I3e47d8e24d375a64d9056e7a85197b89173c8e41
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103520
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit 930d82550863430c9bef96ac307c3ff2cfefe4d8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103434
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
21 months agofix disable qrcodegen option
Caolán McNamara [Wed, 23 Sep 2020 18:32:33 +0000 (23 19:32 +0100)]
fix disable qrcodegen option

Change-Id: Ic554f01125653022987c70d03c8c9d86fe3f547a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103204
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
21 months agotdf#134782 sw,unotools,officecfg: adapt configuration and UI
Michael Stahl [Wed, 23 Sep 2020 16:51:54 +0000 (23 18:51 +0200)]
tdf#134782 sw,unotools,officecfg: adapt configuration and UI

Store AddParaLineSpacingToTableCells in configuration as
"AddTableLineSpacing", consistently inconsistent like AddTableSpacing
(the <desc> elements are not subject to translation).

Adapt SwCompatibilityOptPage with some ugly hacks to allow 3 different
states (TriState) for the corresponding checkbox that map to false/false,
true/false and true/true.

The checkbox widget doesn't allow to change *to* indeterminate but at
least the status of the document can be displayed this way,
with a non-obvious tweak to optcompatpage.ui to reference "checktri1"
column.

Change-Id: I5f32e05c93b5e16e782cba5d1d055809d9e5e251
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103318
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit 68aec8fd57eda8c05926b7f361dc102772f2c501)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103360
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit 70b2ee8ce4aa081a608bbde4f3125300675934c5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103336
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
21 months agotdf#134782 sw: split AddParaSpacingToTableCells flag in 2
Michael Stahl [Wed, 23 Sep 2020 13:14:08 +0000 (23 15:14 +0200)]
tdf#134782 sw: split AddParaSpacingToTableCells flag in 2

commit 3cccdabf19a99fd3f657985c1822436d7679df2b "extend
AddParaSpacingToTableCells with line spacing" changed how the
ADD_PARA_SPACING_TO_TABLE_CELLS compat flag works, to improve interop
with Word.

This commit splits out the change as a separate new compat flag
ADD_PARA_LINE_SPACING_TO_TABLE_CELLS ("AddParaLineSpacingToTableCells"),
to preserve compatibility with ODT documents that were produced
by LO < 6.4 (via SwXMLImport::SetConfigurationSettings()).

New documents and WW8/RTF/DOCX import have both flags enabled.

The combination false/true is invalid, and treated as equivalent
to false/false.

Change-Id: Ida20df8fe4a8192a714f91da95345f9726fd7d98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103317
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit 38aa699f265c17548769aaa4f20e1ae35d18f202)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103359
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit d731b65d3c6b58ed98ee60488d07e5cba653ede0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103335
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
21 months agobump product version to 6.4.7.1.0+
Xisco Fauli [Wed, 23 Sep 2020 16:27:26 +0000 (23 18:27 +0200)]
bump product version to 6.4.7.1.0+

Change-Id: I3e3756a44f28faf4c6d1ab4f03686c025ef1568a

21 months agoBranch libreoffice-6-4-7
Xisco Fauli [Wed, 23 Sep 2020 16:16:42 +0000 (23 18:16 +0200)]
Branch libreoffice-6-4-7

This is 'libreoffice-6-4-7' - the stable branch for the 6.4.7 release.
Only very safe changes, reviewed by three people are allowed.

If you want to commit more complicated fix for the next 6.4.x release,
please use the 'libreoffice-6-4' branch.

If you want to build something cool, unstable, and risky, use master.

21 months agoadd an explicit --disable-qrcodegen configure option
Caolán McNamara [Mon, 21 Sep 2020 16:02:31 +0000 (21 17:02 +0100)]
add an explicit --disable-qrcodegen configure option

Change-Id: If8e965fa955aecdb9e7011bdddc690de9cad0c4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103120
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103158
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
21 months agoofz#25684 keep ParseCMAP within legal area
Caolán McNamara [Tue, 15 Sep 2020 15:36:17 +0000 (15 16:36 +0100)]
ofz#25684 keep ParseCMAP within legal area

Change-Id: Iee18b5a9390b79efa67414ea2d229d2816c84e18
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102776
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit a014c82522834c972e247a28d8e5f42998ae3c0e)

ofz#25696 OOM

Change-Id: Ia69e9ce1ca0156e960dddb7e0bf98dfd2be2d7cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102846
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit d57b14e3394b081adf0888ed8dcb7b86d66c246c)

ofz#25774 keep ParseCMAP within legal area

Change-Id: Ic68fadd3d63631cbccda76e7679d95bb89452d25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103017
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit f8474367449a1b6b54918d2753e3a36798761839)

Fix crash from broken font CMAP subtable

ParseCMAP crashes on a broken CMAP subtable of a font used by the
bugdoc of tdf#119074, which returns a negative offset (technically
it's large positive offset turning into a wrong negative integer,
which is still out of bounds of the CMAP overall size - you get
the point). This simply ignores that broken subtable, checking for
other existing ones.

Regressed-by: c7482bc2904401e7d975b5721ec861b8589253f9
Change-Id: I95820fe3bb6bd2fe2e0cf9d4c3536abce31fd497
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103033
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 9bf4c5ac49b73cc2a8c89a87ff87238c061a579d)

Missing include

(for std::max, since f8474367449a1b6b54918d2753e3a36798761839 "ofz#25774 keep
ParseCMAP within legal area")

Change-Id: I873c788577e9ec3bd54d9e637d2cf86be7c1f6e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103089
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit 8cc52b05744443c64cf5eb62ebe3098cd964c437)

ofz#25855 overflow in nTmpOffset

we already know nLength is >= 24 so just move the calc to the other term

Change-Id: Ic52f1686ccf81e6b13d7eb7e74dbd9cb51c8ea01

ofz#25868 Timeout, encoding conversion only sane in 0..SAL_MAX_UINT16 range

so ignore points outside that range to avoid ludicrous ranges that aren't
possible in the input encoding

Change-Id: Ifb7b9b389d4a31b8820a7da661249223fe1e110c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103261
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
21 months agoofz#25881 use std::vector with bounds checking accessor
Caolán McNamara [Wed, 23 Sep 2020 11:44:14 +0000 (23 12:44 +0100)]
ofz#25881 use std::vector with bounds checking accessor

Change-Id: Ic557e85bce5f3ebe7224b0aa2192a74969f4fce2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103194
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
21 months agotdf#135942: avoid collecting autostyles during writing them
Mike Kaganski [Thu, 20 Aug 2020 21:15:29 +0000 (21 00:15 +0300)]
tdf#135942: avoid collecting autostyles during writing them

This modifies the container over which iteration is performed.
Additionally, make sure that all nested table autostyles are
collected on the first phase.

Change-Id: I74c0bb1aaacad095226c21e6bf51cc8668133bb3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101096
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit f0286ad82465152b29bba01ab2edeb97291397fa)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101069
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 0273675e7dde577077ccca17571846a0942f2630)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102311
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
21 months agotdf#134112 sw: Test access of text field master object
Oleg Schelykalnov [Fri, 19 Jun 2020 06:37:56 +0000 (19 09:37 +0300)]
tdf#134112 sw: Test access of text field master object

Change-Id: I793528faa6d73f7a97ddd4409ae8a1a3e611cea1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96678
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
21 months agotdf#134157 fix Edit with external tool causes a CPU hit
Tomofumi Yagi [Fri, 18 Sep 2020 07:21:43 +0000 (18 16:21 +0900)]
tdf#134157 fix Edit with external tool causes a CPU hit

Switch Idle to 100ms Timer for fixing the bug

Change-Id: I85a9bdcb173edd28d952d8e91c1b93d748e69206
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102984
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit f110c037114f90d219ac8d149542bf96fe66a2f1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103055
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103130

21 months agotdf#129685 PPTX import: fix unexpected centering of shape text
Miklos Vajna [Fri, 18 Sep 2020 15:53:33 +0000 (18 17:53 +0200)]
tdf#129685 PPTX import: fix unexpected centering of shape text

Regression from commit 89f0af144c18efafe2573801641689a1432c0cae (tdf#113198 set
default shape paragraph alignment.., 2019-11-19), the old bugdoc had this
markup:

<a:bodyPr ... anchor="ctr"/> (centered)

The new bugdoc has 2 shapes with text:

<a:bodyPr .../> (aligned to left)
<a:bodyPr ... anchorCtr="1"/> (should be centered)

"anchor" is about vertical, "anchorCtr" is about horizontal centering of text.

Checking what the binary filter does, it maps horizontal centering to
TextHorizontalAdjust, so fix the original bug differently, by leaving
ParaAdjust alone, and tweaking TextHorizontalAdjust intead: this keeps the old
bugdoc working but fixes the new one.

This caused a number of "change detector" XML-based tests to fail: all of them
are unchanged visually, so the XML files are adapted to the new state.

The tdf#113198 fix itself was fixing a regression from tdf#104722, and that
commit had no testcase, I tested that we don't regress there, manually.

(cherry picked from commit 10bb02efd8afd42e633e370480104e2575546d8e)

Change-Id: I81a7b3e8c76bfbce5c5569d16d5238958ac20f75
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103088
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103110

21 months agotdf#131047: expand search results frame
Xisco Fauli [Mon, 10 Aug 2020 22:21:37 +0000 (11 00:21 +0200)]
tdf#131047: expand search results frame

Change-Id: I883c86658f3aa4ee18d03d8c3aa277000f278abe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100362
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
(cherry picked from commit bc652f68d988a6fd0e2feb51b0e3ccfee31e6693)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100510
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
21 months agotdf#135342: filter list must include extensions
Mike Kaganski [Sun, 16 Aug 2020 15:58:48 +0000 (16 18:58 +0300)]
tdf#135342: filter list must include extensions

Regression after commit a0dcc8f78061d22d925f31ef8d03ca751ad6dc19.
The commit had added extensions to the filter names sent to file
dialog, but kept internal list of filter names aFilterEntryList
without extensions. Then dialog returned the chosen filter's name
in the form it was sent there, i.e. with extension; and that name
couldn't be found in aFilterEntryList.

So let's keep aFilterEntryList synchronized with the UI names in
the dialog.

Change-Id: Ic21d19d1a8d0b7f64ccfb517a7d0ee8ab36fc6a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100821
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 99c6c89deed41457d35c382fc7d6a4cd5191f7d7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100792
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit bbd0d424263a21dd0ffdc42d1201f86e65358f25)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101671
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
22 months agorhbz#1878275 should use value_changed for spinbutton changes
Caolán McNamara [Mon, 14 Sep 2020 13:44:25 +0000 (14 14:44 +0100)]
rhbz#1878275 should use value_changed for spinbutton changes

Change-Id: I8d042eb9c288e9db69a49cb9e097b23cf765aae6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102678
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
22 months agotdf#135682 sw: fix lost selection-all when doc starts with table
Miklos Vajna [Mon, 14 Sep 2020 19:02:31 +0000 (14 21:02 +0200)]
tdf#135682 sw: fix lost selection-all when doc starts with table

Regression from commit c56bf1479cc71d1a2b0639f6383e90c1f7e3655b
(tdf#105330 sw: fix lost cursor on undoing nested table insert,
2019-09-16), the problem was that the change reverted lcl_notifyRow()
back to its original state, because it seemed the conditional
notification is no longer needed. However, this broke the fix for
tdf#37606 (ability to select-all when the doc starts with a table).

Fix the problem by handling the starts-with-table case similar to a
normal table selection, so there is still no need to restore the nested
table visitor code but select-all works nicely with starts-with-table
documents again.

(cherry picked from commit 6f1e02c96b887750f974c187a82ecd6236e6a435)

 Conflicts:
sw/qa/core/crsr/crsr.cxx

Change-Id: Icb823a39432d1774a63a0c633c172bba827ac76d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102706
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
22 months agotdf#135623: modified generation of unique fly name
Vasily Melenchuk [Fri, 11 Sep 2020 11:06:23 +0000 (11 14:06 +0300)]
tdf#135623: modified generation of unique fly name

Modified lcl_GetUniqueFlyName() is right now always marks
current fly format name number as used. Yes, this can
lead to some gaps in numbering is some cases, but meanwhile
guarantee that there will be no duplicates if format name
does not match SdrObject name.

Change-Id: If39ed993614ae1665deba21ae8d5e6bd542fb6e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102460
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit 07a695ec1988ee8b02256cab2e07a1b429ead24b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102636
Reviewed-by: Vasily Melenchuk <vasily.melenchuk@cib.de>
(cherry picked from commit c514e9cfca2901f325644a65ee1b87455a56e7f0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102638
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
22 months agotdf#133327 fix calc loading background color with many cols
Noel Grandin [Sat, 12 Sep 2020 16:21:44 +0000 (12 18:21 +0200)]
tdf#133327 fix calc loading background color with many cols

regression from
    commit 7282014e362a1529a36c88eb308df8ed359c2cfa
    tdf#50916 Makes numbers of columns dynamic.

Change-Id: Ic9e1b31d74b11367a5ad1a82480ffe9467c37ad8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102535
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit 4176beb7ef831152ce92ac3fa31314438635ec2c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102635
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
22 months agoxmlsecurity: pdf incremental updates that are non-commenting are invalid
Miklos Vajna [Fri, 4 Sep 2020 15:17:48 +0000 (4 17:17 +0200)]
xmlsecurity: pdf incremental updates that are non-commenting are invalid

I.e. it's OK to add incremental updates for annotation/commenting
purposes and that doesn't invalite existing signatures. Everything else
does.

(cherry picked from commit 61834cd574568613f0b0a2ee099a60fa5a8d9804)

[ Also disable a pdfium assert on Windows, only on this branch, where it
fails during CppunitTest_xmlsecurity_pdfsigning for reasons unclear to
me. ]

Conflicts:
include/vcl/filter/PDFiumLibrary.hxx
vcl/source/pdf/PDFiumLibrary.cxx

Change-Id: I4607c242b3c6f6b01517b02407e9e7a095e2e069
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102325
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
22 months agoexternal: update pdfium from 3963 to 4137
Miklos Vajna [Tue, 14 Jan 2020 20:34:52 +0000 (14 21:34 +0100)]
external: update pdfium from 3963 to 4137

This is a combination of 6 commits, which brings pdfium to the same
version as libreoffice-7-0.

This is the 1st commit message:

external: update pdfium to 4021

(cherry picked from commit 1cb70721ba00dd6c6958f0a10e39aa5c1866ec96)

This is the commit message #2:

external/pdfium: C++20 comparison operator fix

Missing const leads to overload resolution ambiguity when a synthesized
candidate of operator == for a reversed-argument rewrite conflicts with the
actual operator ==, due to the asymmetric const-ness of the implicit object
parameter and the RHS parameter:

> In file included from workdir/UnpackedTarball/pdfium/core/fxge/cfx_font.cpp:7:
> In file included from workdir/UnpackedTarball/pdfium/core/fxge/cfx_font.h:11:
> llvm/inst/include/c++/v1/vector:1369:27: error: use of overloaded operator '!=' is ambiguous (with operand types 'std::__1::__vector_base<unsigned char, FxAllocAllocator<unsigned char> >::allocator_type' (aka 'FxAllocAllocator<unsigned char>') and 'std::__1::__vector_base<unsigned char, FxAllocAllocator<unsigned char> >::allocator_type')
>     if (__base::__alloc() != __c.__alloc())
>         ~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~
> llvm/inst/include/c++/v1/vector:1359:5: note: in instantiation of member function 'std::__1::vector<unsigned char, FxAllocAllocator<unsigned char> >::__move_assign' requested here
>     __move_assign(__x, integral_constant<bool,
>     ^
> workdir/UnpackedTarball/pdfium/core/fxge/cfx_font.cpp:384:24: note: in instantiation of member function 'std::__1::vector<unsigned char, FxAllocAllocator<unsigned char> >::operator=' requested here
>   m_FontDataAllocation = std::vector<uint8_t, FxAllocAllocator<uint8_t>>(
>                        ^
> workdir/UnpackedTarball/pdfium/core/fxcrt/fx_memory_wrappers.h:74:8: note: candidate function
>   bool operator!=(const FxAllocAllocator& that) { return false; }
>        ^
> workdir/UnpackedTarball/pdfium/core/fxcrt/fx_memory_wrappers.h:73:8: note: candidate function
>   bool operator==(const FxAllocAllocator& that) { return true; }
>        ^
> workdir/UnpackedTarball/pdfium/core/fxcrt/fx_memory_wrappers.h:73:8: note: candidate function (with reversed parameter order)

(cherry picked from commit 6e0461d576d9f386e458f98f3c57f0ba385aacb4)

This is the commit message #3:

pdfium: don't patch out the COMPONENT_BUILD check, define it

So next time we update, no need to adapt a failing patch.

(cherry picked from commit 9b4ab9bda41a818832c721933986c9c6e07a6e6c)

This is the commit message #4:

make update_pch also consider files in <module>/src/**/inc

With --enable-pch=full there's not much difference between a "public"
header in <module>/inc and a private one in <module>/src/somewhere/inc .
And since the script searches recursively, this apparently helps to
find even more headers for lower pch levels.

[ Just the pdfium part. ]

(cherry picked from commit 69e0d871ec1de2260f9213d3113464155eac173c)

Change-Id: I8483d0aa5b4fea5a59107c20a8aa5f1ef694af0a

This is the commit message #5:

external: update pdfium to 4083

(cherry picked from commit 9054c36d4ea3bee25fb9a47a96a0ea2cd07148c3)

This is the commit message #6:

external: update pdfium to 4137

(cherry picked from commit 1ffe59ef31186e36ad0aa7bbcdd32e407ee8d26c)

Change-Id: Ib7c12461e04fa97bf55ee967e8d6c9bcf92fdf4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102373
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
22 months agotdf#135950 crash in format->character with selected text in table
Caolán McNamara [Thu, 10 Sep 2020 09:03:26 +0000 (10 10:03 +0100)]
tdf#135950 crash in format->character with selected text in table

Change-Id: I66e36a638d040d2a38ac234383d6f314a2ff4d88
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102310
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
22 months agotdf#136032 - abort scan of a string beginning with a hashtag
Andreas Heinisch [Sun, 6 Sep 2020 07:26:47 +0000 (6 09:26 +0200)]
tdf#136032 - abort scan of a string beginning with a hashtag

Abort scan of a string beginning with a hashtag, if a comma is found. Otherwise, the compiler raises a syntax error. If
the string ends with a hashtag too, it will be parsed later checking for
a date literal.

Change-Id: I078a2302f5c65206367a00fbc584ffa7b9ede031
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102099
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 11292d1cc405e7c3b9e1f374cc7581a63a54b994)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101973
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit cc17346d682d85b6c083d76cae2d55dcc022e58f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102120

22 months agotdf#124470: Split export of table autostyles out from collection phase
Mike Kaganski [Wed, 5 Aug 2020 08:16:32 +0000 (5 11:16 +0300)]
tdf#124470: Split export of table autostyles out from collection phase

This allows to call collectAutoStyles where required (e.g. when enumerating
used fonts), without side effect of writing table styles XML inside the call,
out of place.

Change-Id: Ida05e373eb8502590c43e2b0e85c3b0c1107c551
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100153
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 35021cd56b3b4e38035804087f215c80085564be)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100221
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100274

22 months agoAlways display highlighted JRE's location
Stephan Bergmann [Mon, 17 Aug 2020 11:06:50 +0000 (17 13:06 +0200)]
Always display highlighted JRE's location

...when opening the Advanced options page and after adding a new JRE via the
"Add..." button, not only after highlighting another JRE line.  (I suspect this
broke with 1aa246a8e8c7d974ab0f7bdfa16cda36cb700e03 "weld SvxJavaOptionsPage"
towards LO 6.4.)

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100860
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit f7fe1e93da753d74485a13d46fe15fb198411932)

Change-Id: I5f9b63e2d33a351eeef09712969b703f1e99ef7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102286
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
22 months agotdf#127932 fix wrong page number in print progress
Juergen Funk [Fri, 4 Sep 2020 08:53:44 +0000 (4 10:53 +0200)]
tdf#127932 fix wrong page number in print progress

- in ctor, reset start pages to non-inflated value after size
  calculation
- update label, _then_ progress in setProgress()

Change-Id: I66576e339de814922512b68167e6c0a9b1025378
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102031
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit 63bf8f042abe3c0f6989f6763d13f5389182b816)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102281
Tested-by: Jenkins
22 months agotdf#108673 XLSX: Don't export invalid sheet references in cell validation
Serge Krot [Fri, 10 Jul 2020 09:09:35 +0000 (10 11:09 +0200)]
tdf#108673 XLSX: Don't export invalid sheet references in cell validation

Change-Id: Id9d88f5e34f3017516f693505df4c3ce82b1890f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98479
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit a3b4831208da615789bd1e2d5660dd130807f504)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102128
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
22 months agoCheck range before accessing Calc sort userlist
Thorsten Behrens [Sun, 6 Sep 2020 15:07:47 +0000 (6 17:07 +0200)]
Check range before accessing Calc sort userlist

Conflicts:
        sc/source/filter/excel/excrecds.cxx

Change-Id: Ib5078dc4ce3f85be9b42320b60ef6fc40b684cb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102140
Tested-by: Jenkins
Tested-by: Serge Krot <Serge.Krot@cib.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102255
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
22 months agotdf#95640 XLSX: import/export of custom sort lists
Serge Krot [Mon, 29 Jun 2020 11:23:34 +0000 (29 13:23 +0200)]
tdf#95640 XLSX: import/export of custom sort lists

Conflicts:
        sc/source/filter/excel/excrecds.cxx
        sc/source/filter/oox/autofilterbuffer.cxx
        sc/source/filter/oox/tablebuffer.cxx

Change-Id: If5ffef39770bf7abd6e75e8de998d4a2b4749a0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97399
Tested-by: Jenkins
Tested-by: Serge Krot <Serge.Krot@cib.de>
Reviewed-by: Serge Krot <Serge.Krot@cib.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102254
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
22 months agopdfium: only init pdfium library once and destroy on LO exit
Tomaž Vajngerl [Sun, 31 May 2020 09:50:20 +0000 (31 11:50 +0200)]
pdfium: only init pdfium library once and destroy on LO exit

With more and more usage of PDFium, it is hard to keep track of
the life-time of the PDFium library, so it can happen that a
FPDF_DestroyLibrary happens when we still have another instance
where PDFium is still use. The result of this is a crash. To
prevent this, just initialize the library once and delete, when
on LO exit.

This can be improved in the future to only keep the library
active when in actual use.

[ Leaving out the vector graphic search bits, the motivation is to just
have this in libreoffice-7-0, so that recent pdf sig verify improvements
can be backported. ]

(cherry picked from commit 067a8a954c8e1d8d6465a4ab5fb61e93f16c26c2)

Conflicts:
vcl/source/graphic/VectorGraphicSearch.cxx

Change-Id: I5c7e5de7f8b97d10efb394c67c7a61b976c8d57c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102317
Tested-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
22 months agoResolves: tdf#136364 treat svSep type with ocUnion as range type
Eike Rathke [Tue, 8 Sep 2020 19:18:30 +0000 (8 21:18 +0200)]
Resolves: tdf#136364 treat svSep type with ocUnion as range type

So for RPN
sv...Ref(ocPush), sv...Ref(ocPush), svSep(ocUnion), sv...Ref(ocPush)
another svSep(ocUnion) instead of svSep(ocSep) is appended.

Regression from

    commit a6032ff5418ad66cc8fec10c636e32b124ee7864
    CommitDate: Thu Oct 11 11:26:37 2018 +0200

        Resolves: tdf#90698 catch list (1;2) of non-references as error

that introduced a conditional check on operands and operators.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102276
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
(cherry picked from commit e00e2be30436b636d93f8852bb6af44972638a7c)

Change-Id: If5da3a781f24f891ff12c4a8f32a2ec92c6b4c8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102279
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
22 months agotdf#134477 add VclMessageType::Other to indicate image-less generic InfoBox
Caolán McNamara [Tue, 8 Sep 2020 10:17:45 +0000 (8 11:17 +0100)]
tdf#134477 add VclMessageType::Other to indicate image-less generic InfoBox

Change-Id: I76e86bf4d82b33771ea2900517712be57ae7f03d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102130
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
22 months agoxmlsecurity: avoid saying OK when the signature is partial
Miklos Vajna [Wed, 2 Sep 2020 10:37:18 +0000 (2 12:37 +0200)]
xmlsecurity: avoid saying OK when the signature is partial

That's reserved for valid signatures (digest match, certificate
validates and the signature covers the whole document).

Also avoid "invalid" in the dialog when the digest matches and the
signature is just incomplete.

This now uses wording which is closer to Acrobat and also uses the same
wording on the infobar and in the dialog.

Change-Id: I26e4781d555b65cf29aa8df2232e286917235dc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101926
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102188
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
22 months agotdf#136323 qt5: Remember accessible object
Michael Weghorn [Mon, 7 Sep 2020 18:08:57 +0000 (7 20:08 +0200)]
tdf#136323 qt5: Remember accessible object

'QAccessibleCache::insert' from the Qt library has a
'Q_ASSERT' checking that the corresponding 'QObject' for
which the 'QAccessibleInterface' provides information
is actually the same as the object passed as a parameter:

    QAccessible::Id QAccessibleCache::insert(QObject *object, QAccessibleInterface *iface) const
    {
        // ...
        QObject *obj = iface->object();
->      Q_ASSERT(object == obj);

However, 'Qt5AccessibleWidget::object' so far was always returning
'nullptr', triggering this assert when using a Qt version
not built with 'QT_NO_DEBUG'.

To fix this, remember and return the object as needed.

Change-Id: I4015b4c37aa8a073b02465df580a7235884e6cf3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102196
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
(cherry picked from commit 4461d49c6cfce22c2c96185b0a1d07bfe9709268)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102126
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
22 months agorhbz#1875377 if sort order is equivalent keep order fontconfig presents
Caolán McNamara [Fri, 4 Sep 2020 18:38:52 +0000 (4 19:38 +0100)]
rhbz#1875377 if sort order is equivalent keep order fontconfig presents

there are two fonts in fedora 32/33 for regular Cantarell

/usr/share/fonts/cantarell/Cantarell-Regular.otf
and
/usr/share/fonts/cantarell/Cantarell-VF.otf

where VF is the Variable Font version. The Cantarell-Regular
ones has a CFF table and export to pdf creates a font subset
that works perfectly fine. The VF one does not have a CFF
table and the fallback case doesn't work for pdf export.

Both have the same version, use a stable sort to retain
their relative order that fontconfig presents so we use
the Cantarell-Regular version we would see if we didn't
sort by version at all.

Change-Id: I750006b980810fc59e0a152d42ae17f29f46e3b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101971
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
22 months agoResolves: tdf#136189 don't try and sort until treeview is filled
Caolán McNamara [Mon, 31 Aug 2020 10:47:49 +0000 (31 11:47 +0100)]
Resolves: tdf#136189 don't try and sort until treeview is filled

Change-Id: Ic5ac71d88bab7627e14220912f4b9c935f2f1f26

and...

Related: tdf#136189 don't assert on unsetting non-existing previous sort column

Change-Id: If2330cc83ace9ec0133b99eec8c2f0be3919013e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101710
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit c52ac477beefc46802148033adbca9edb9970ac1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101967
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
22 months agotdf#136062 Don't use 'Reject (All)/Clear formatting' buttons in Calc
Gabor Kelemen [Mon, 24 Aug 2020 20:18:55 +0000 (24 22:18 +0200)]
tdf#136062 Don't use 'Reject (All)/Clear formatting' buttons in Calc

Since formatting changes are not tracked in Calc

Change-Id: Ib1b50d248f1ba75aad22cd04af86d15cc2813e36
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101293
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
(cherry picked from commit 894fddc5edf5aad6fc6d0e18a6c934bfa7f001e4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101453
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 120e696653a25a2560f8c60b08a6a86fda5c10fc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101965

22 months agoxmlsecurity: fix infobar vs signature dialog inconsistency
Miklos Vajna [Mon, 31 Aug 2020 11:34:17 +0000 (31 13:34 +0200)]
xmlsecurity: fix infobar vs signature dialog inconsistency

The infobar mentioned if a signature is partial, but the dialog just has
a bool UI for signatures. Then present "good, but partial" as "bad".

(cherry picked from commit 3ba1144cb96c710e665ffb3ada26fb6a48a03472)

Change-Id: I698190aa77702000b11d635bd038d9c9a91614ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101844
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
22 months agotdf#127471 Remove font width scaling hack
Samuel Mehrbrodt [Wed, 19 Aug 2020 04:05:46 +0000 (19 06:05 +0200)]
tdf#127471 Remove font width scaling hack

Which causes distorted fonts in certain cases (see bug report).

Fix was suggested by Ilhan Yesil at https://bugs.documentfoundation.org/show_bug.cgi?id=127471#c6

Change-Id: Ie644f56f0835ffad9230f981d2927d6b4c17453d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100970
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 8891a2fc2a4bf86add68691b7ac167a07a8add84)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101960
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>