LibreOffice.git
20 months agotdf#136983 partial revert NFC ww8 cleanup: remove unused variableslibreoffice-6-4
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 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)

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

* Update translations from branch 'libreoffice-6-4'
  to a98a81ee9754921c9e3d306481e5db92514d7435
  - update translations for 6.4.7 rc2

    and force-fix errors using pocheck

    Change-Id: I5b70ce184448b11dc7d76b84e5ad200a2d8f8474

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

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>
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>
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)

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>
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>
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>
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/+/103433
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
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/+/103272
Tested-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
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>
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>
21 months agobump product version to 6.4.8.0.0+
Xisco Fauli [Wed, 23 Sep 2020 16:20:00 +0000 (23 18:20 +0200)]
bump product version to 6.4.8.0.0+

Change-Id: Idc8c72fe55f1c0c1211dc8c125d33ab9b6a74f86

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>
22 months agotdf#136423 make SwXDrawPage::group work with a single shape
Samuel Mehrbrodt [Tue, 1 Sep 2020 10:51:09 +0000 (1 12:51 +0200)]
tdf#136423 make SwXDrawPage::group work with a single shape

No reason this should not work (and the implementation in Draw/Impress/Calc
also works this way)

Change-Id: Ic5bc7420e9025b45ed848dccf68b112c0c6c2cd5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101842
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
(cherry picked from commit 3eb5318ed9ae8cf02804fbdc584a5f4b046db0ae)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101956
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
22 months agotdf#135056 sw_redlinehide: when moving sections to undo nodes-array,
Michael Stahl [Mon, 31 Aug 2020 15:57:26 +0000 (31 17:57 +0200)]
tdf#135056 sw_redlinehide: when moving sections to undo nodes-array,

... delete frames with utmost prejudice - the code that was checking
for empty frames or cells was going into infinite loop because
first the *outer* section is moved to the undo nodes array, then when
the *inner* (index header) section is moved, its section node's
m_pStartOfSection points to the section node that is already in
undo nodes array and so SwNodes::GoPrevSection() goes very wrong
and CheckNodesRange() is called with positions in 2 different arrays.

(regression from a60dd9ef1361c5925803acaa5292e99277d1faf3)

Change-Id: I5682ebc2081ffc7dc49a9c43e613f72c26e93673
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101755
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit 1d6e919046ed353a9d9d86bb9f0332da2e9dea4d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101683
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
22 months agotdf#130862 Remove wrong size values from individual buttons; use HIG spacing
Adolfo Jayme Barrientos [Thu, 23 Jul 2020 11:30:04 +0000 (23 06:30 -0500)]
tdf#130862 Remove wrong size values from individual buttons; use HIG spacing

Change-Id: I2dd1a796d94aa33d4dcbf676d0f66d6d256969bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99294
Tested-by: Jenkins
Reviewed-by: Andreas Kainz <kainz.a@gmail.com>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
22 months agotdf#135661 sw: fix Undo of text deletion of SdrObject
Michael Stahl [Mon, 31 Aug 2020 13:24:48 +0000 (31 15:24 +0200)]
tdf#135661 sw: fix Undo of text deletion of SdrObject

This creates a non-working SwXShape without m_pFormat initialised:

0  SwXShape::SwXShape(com::sun::star::uno::Reference<com::sun::star::uno::XInterface>&, SwDoc const*) (this=0x278de80, xShape=uno::Reference to (SvxCustomShape *) 0x73ec840, pDoc=0x0) at sw/source/core/unocore/unodraw.cxx:889
1  SwFmDrawPage::CreateShape(SdrObject*) const (this=0x637a980, pObj=0x6409410) at sw/source/core/unocore/unodraw.cxx:372
2  SdrObject::getUnoShape() (this=0x6409410) at svx/source/svdraw/svdobj.cxx:2836
3  GetXShapeForSdrObject(SdrObject*) (pObj=0x6409410) at svx/source/unodraw/unoshape.cxx:3928
4  SdrObjCustomShape::GetCustomShapeEngine() const (this=0x6409410) at svx/source/svdraw/svdoashp.cxx:381
5  SdrObjCustomShape::GetTextBounds(tools::Rectangle&) const (this=0x6409410, rTextBound=...) at svx/source/svdraw/svdoashp.cxx:534
6  SdrObjCustomShape::AdaptTextMinSize() (this=0x6409410) at svx/source/svdraw/svdoashp.cxx:1397
7  SdrObjCustomShape::NbcSetSnapRect(tools::Rectangle const&) (this=0x6409410, rRect=...) at svx/source/svdraw/svdoashp.cxx:1421
8  SdrObjCustomShape::handlePageChange(SdrPage*, SdrPage*) (this=0x6409410, pOldPage=0x0, pNewPage=0x627fc80) at svx/source/svdraw/svdoashp.cxx:2855
9  SdrObject::setParentOfSdrObject(SdrObjList*) (this=0x6409410, pNewObjList=0x627fc80) at svx/source/svdraw/svdobj.cxx:294
10 SetParentAtSdrObjectFromSdrObjList(SdrObject&, SdrObjList*) (rSdrObject=..., pNew=0x627fc80) at svx/source/svdraw/svdpage.cxx:65
11 SdrObjList::NbcInsertObject(SdrObject*, unsigned long) (this=0x627fc80, pObj=0x6409410, nPos=0) at svx/source/svdraw/svdpage.cxx:305
12 SdrObjList::InsertObject(SdrObject*, unsigned long) (this=0x627fc80, pObj=0x6409410, nPos=0) at svx/source/svdraw/svdpage.cxx:358
13 FmFormPage::InsertObject(SdrObject*, unsigned long) (this=0x627fc80, pObj=0x6409410, nPos=0) at svx/source/form/fmpage.cxx:79
14 SwDrawContact::InsertMasterIntoDrawPage() (this=0x640d6b0) at sw/source/core/draw/dcontact.cxx:1909
15 SwDrawContact::SwClientNotify(SwModify const&, SfxHint const&) (this=0x640d6b0, rMod=..., rHint=...) at sw/source/core/draw/dcontact.cxx:1457
16 SwModify::CallSwClientNotify(SfxHint const&) const (this=0x640d090, rHint=...) at sw/source/core/attr/calbck.cxx:373
17 sw::BroadcastingModify::CallSwClientNotify(SfxHint const&) const (this=0x640d090, rHint=...) at sw/source/core/attr/calbck.cxx:378
18 SwUndoFlyBase::InsFly(sw::UndoRedoContext&, bool) (this=0x78cdfd0, rContext=..., bShowSelFrame=false) at sw/source/core/undo/undobj1.cxx:97
19 SwUndoDelLayFormat::UndoImpl(sw::UndoRedoContext&) (this=0x78cdfd0, rContext=...) at sw/source/core/undo/undobj1.cxx:440
20 SwHistoryTextFlyCnt::SetInDoc(SwDoc*, bool) (this=0x60d14c0, pDoc=0x625aa30) at sw/source/core/undo/rolbck.cxx:581

Whereas if the shape is selected and deleted that way, a completely
different Undo is created, which doesn't have this problem:

0  SwXShape::SetFrameFormat(SwFrameFormat*) (this=0x2497d50, pFormat=0x564b470) at sw/inc/unodraw.hxx:206
1  SwXShape::AddExistingShapeToFormat(SdrObject const&) (_rObj=...) at sw/source/core/unocore/unodraw.cxx:945
2  SwDrawContact::SwDrawContact(SwFrameFormat*, SdrObject*) (this=0x6bad330, pToRegisterIn=0x564b470, pObj=0x5647880) at sw/source/core/draw/dcontact.cxx:709
3  SwUndoDrawDelete::UndoImpl(sw::UndoRedoContext&) (this=0x56ebcd0, rContext=...) at sw/source/core/undo/undraw.cxx:501

In SwUndoDelLayFormat, the SdrObject is apparently removed from SdrPage
and the SwDrawContact remains, whereas in SwUndoDrawDelete, the
SdrObject remains on SdrPage but is moved to invisible layer, and
SwDrawContact is destroyed (presumably).

Include obligatory rant why sw has 2 undos doing the same thing here.

(reportedly regression from 2d89b9929e85bede4c72684a12e7508751875f0e
 but probably this can be triggered before, at least since
 91b2325808a75174f284c48c8b8afc118fad74e4)

Change-Id: I4fbb3620bfe1ac07f47e4441625797db7a87cecd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101740
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit a609bc9cc03a0a23c8f20fee808cc6cc2887170d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101681
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
22 months agotdf#135001 sw_redlinehide: fix IsShown() for AT_PARA flys
Michael Stahl [Fri, 28 Aug 2020 20:05:06 +0000 (28 22:05 +0200)]
tdf#135001 sw_redlinehide: fix IsShown() for AT_PARA flys

There is one merged text frame from node 102 to node 328 with no
extents, and of course a shape anchored at node 271 should not be
visible at all.

This crashes because the shape was removed from the layout during
CheckParaRedlineMerge() but then moved to the visible heaven layer
again via sw::AddRemoveFlysAnchoredToFrameStartingAtNode() and the
layer determines if it's visible as far as Sdr* is concerned;
it lacks a connection to a SwFrame though.

warn:legacy.osl:3547848:3547848:sw/source/core/layout/paintfrm.cxx:3861: <SwFlyFrame::IsPaint(..)> - paint of drawing object without anchor frame!?

(regression from 6aaae44da382f4bc3eafc287b4a21734b740cf21)

Change-Id: Ia20449b3a7d251f0c049eb979c88df1e80cd7d5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101584
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit 586750da40c5b332d2442ef24ae121795e88e903)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101673
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
22 months agotdf#131801: sw: support of style references in ListAutoFormat
Vasily Melenchuk [Tue, 18 Aug 2020 15:59:26 +0000 (18 17:59 +0200)]
tdf#131801: sw: support of style references in ListAutoFormat

ListAutoFormat property did support char attributes, but not
style references ("CharStyleName"). It is important for correct
formatting of pilcrow symbol or list format in some DOCX scenarios.

Export to DOCX already works, but not to RTF/DOC.

Change-Id: I1bf23d1e45fcc213adcf9aa6f404be803919fbee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100893
Tested-by: Michael Stahl <michael.stahl@cib.de>
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit c77b9c349f0a48392d8cb7a49532844b2cafb5ba)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101560
Tested-by: Jenkins
22 months agoupdate credits
Christian Lohmaier [Thu, 27 Aug 2020 12:26:16 +0000 (27 14:26 +0200)]
update credits

Change-Id: I09404b311a121d0316f30991f82fc21e596f080a
(cherry picked from commit 9f77b5b694ec3708c8ae5feb01dc7d34f1c29d82)

22 months agoupdate credits
Christian Lohmaier [Thu, 6 Aug 2020 17:44:17 +0000 (6 19:44 +0200)]
update credits

Change-Id: I2a9253f3c9699a235cdb1f051e728708a5da15b1
(cherry picked from commit ad99b6cb2de7eb91554c224540daef03027beaa9)

22 months agosw: set name for section format on creation
Vasily Melenchuk [Thu, 20 Aug 2020 09:09:49 +0000 (20 12:09 +0300)]
sw: set name for section format on creation

Section format is derived from frame format and better to
have own unique name for undo/redo work.

Change-Id: If41890443c2d71886164e0b94721b92bc2e9573a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101043
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit 5f23f241704f798164df498e24dbf6b0daf27c44)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101369
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
22 months agotdf#135973: DOCX export: improved list override support
Vasily Melenchuk [Sun, 23 Aug 2020 11:02:40 +0000 (23 14:02 +0300)]
tdf#135973: DOCX export: improved list override support

Removed remains of old override support which are not working now.

Partial refactoring and fixing for listid and overrides detection.

Change-Id: I1f94a09b7d51fcc3300b056d6d9e8ea6367a4446
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101238
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101438
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
22 months agotdf#133490: set name for pasted frame format
Vasily Melenchuk [Thu, 20 Aug 2020 09:06:03 +0000 (20 12:06 +0300)]
tdf#133490: set name for pasted frame format

In some copy/paste operations resulting frame format name can
be empty. This can lead to problems with udo/redo which relies
on format names.

Change-Id: I3cb542321d37cc00e2dee83d0f667164d83ead78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101042
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit a6c2a87612a10d55fc59fa01e44d67d95505834f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101367
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
22 months agotdf#135018 sw_redlinehide: fix accept delete redline at start of body
Michael Stahl [Tue, 25 Aug 2020 15:30:16 +0000 (25 17:30 +0200)]
tdf#135018 sw_redlinehide: fix accept delete redline at start of body

There is no predecessor text node.

(regression from 34b32f56e7f76639ee3a31cfc230a3340acf635a)

Change-Id: I5f6a1a7a1a35a2a6e600166dc1afcf6c4bf9d389
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101337
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit a64511dc929a91926ade0c132b310214fdb1bdea)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101354
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
22 months ago(related: tdf#132160) sw: fix lcl_RejectRedline if end is on table node
Michael Stahl [Tue, 25 Aug 2020 12:44:39 +0000 (25 14:44 +0200)]
(related: tdf#132160) sw: fix lcl_RejectRedline if end is on table node

This happens on Undo:

sw/source/core/undo/undobj.cxx:1394: void SwRedlineSaveData::RedlineToDoc(const SwPaM&): Assertion `result != IDocumentRedlineAccess::AppendResult::IGNORED' failed.

Because the SwRedlineSaveData was created in SwUndoDelete ctor from
this:

(rr) p *pRedl
$18 = (SwRangeRedline) {
  <SwPaM> = SwPaM = {
    point = SwPosition (node 13457, offset 0),
    mark = SwPosition (node 13455, offset 0)
  },
(rr) p pRedl->GetPoint()->nNode.GetNode().GetNodes()[13457]
$19 = (SwTableNode *) 0x80bdbe0

DelFullPara() will delete the end node, see "m_rDoc.GetNodes().Delete(
aRg.aStart, nNodeDiff+1 );" or equivalent in SwUndoDelete.

So if the end is on a start node, set it back to the previous node,
because deleting just a start node is a bad idea.

Change-Id: Ib7c35c103ce05ede39e66505fa47fa70bfece018
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101334
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit e2fe4fde592564d35099ad1e2659ad682dfb77f5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101352
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
22 months agotdf#127802 support tristate for hidden/unhidden text
Caolán McNamara [Tue, 25 Aug 2020 12:53:46 +0000 (25 13:53 +0100)]
tdf#127802 support tristate for hidden/unhidden text

Change-Id: I9a8ad72ae3ee45ac2521e662b17d3d22d98aa055
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101331
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
22 months agotdf#132160 sw_redlinehide: more pathological redline problems
Michael Stahl [Mon, 24 Aug 2020 17:29:14 +0000 (24 19:29 +0200)]
tdf#132160 sw_redlinehide: more pathological redline problems

This is similar to 63dba5203e8bc7fc390943cb8208ae904f18e3bb except here
the redline starts with a section (in particular an entire alphabetical
index); this one is at node 13489 to node 14206.

There's another fun one, starts with a table but has a text node
following it, at node 8222 to 8231; this case also wasn't handled
correctly at least in one direction.  Fix that by continuing iteration
of text-nodes once table/section at the start are handled.

(regression from d258fc29560baa5ecae03ebc2740e11420643e27)

Change-Id: I3f75ad473881f01be80d2c3804b9ac209f430bdf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101287
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit 0bbc397dc5b4440144627330c2b6ee479bdcf074)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101350
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
22 months agoofz#25169 insertion into set might find a duplicate
Caolán McNamara [Sun, 23 Aug 2020 19:47:00 +0000 (23 20:47 +0100)]
ofz#25169 insertion into set might find a duplicate

in which case pImpRec is deleted and pImpRecTmp is invalid

Change-Id: I2a273a436ebd88cb53e329bbcb4f171dda6ed840
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101155
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
22 months agotdf#135457 sw: fix invalidation of SwXTextField
Michael Stahl [Fri, 14 Aug 2020 14:35:32 +0000 (14 16:35 +0200)]
tdf#135457 sw: fix invalidation of SwXTextField

This was supposed to happen from SwNodes::ChgNode() when moving to the
undo nodes array.

There are fields with a range that contains other fields, when the outer
field's range is deleted, the contained field moves to the undo array
and its position is no longer valid to be given out by
SwXTextField::getAnchor().

(regression from c73b5e969b2f9abdb2b9191938ca30bec5af725d
 ERR no, actually more likely from e18359445fabad9ba1a704600e9ee327112cc6ae)

Change-Id: I38c8b3393a777ca8dc8739b5ca4233a7f124961e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100749
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit 14fd4b54113f884cfd6871aeff693734fc06224b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100705
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 27e9ead64d4e3a3f3b3d1203f7b9fee50eb0d04d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100987
Tested-by: Michael Stahl <michael.stahl@cib.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
22 months agotdf#133437: sw: set generated shape name if it is missing
Vasily Melenchuk [Wed, 8 Jul 2020 05:49:04 +0000 (8 08:49 +0300)]
tdf#133437: sw: set generated shape name if it is missing

Shape names are required for seting format name and undo/redo
and correct displaying of objects in Navigator pane

Change-Id: I43caf6a4d5f054283d48c46b081d43b743bd4433
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98312
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit 0c53a58b2dd9bee3d4de6843966486428fdaa78f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100942

22 months agotdf#135721 sw: fix spell check context menu deleting flys
Michael Stahl [Wed, 19 Aug 2020 16:55:27 +0000 (19 18:55 +0200)]
tdf#135721 sw: fix spell check context menu deleting flys

Kind of similar to e1629c210ad78310e3d48c0756723134a27b89df
but the problem is at a higher level: SwTextShell::Execute() with
SID_SPELLCHECK_APPLY_SUGGESTION should not DelLeft() + Insert() but
just Replace().

(regression from 28b77c89dfcafae82cf2a6d85731b643ff9290e5)

Change-Id: I78487c7841ba22ccc6751240a8e55e08a86fba32
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101014
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit ec579354af954867b829e7d08e4d752518c83728)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101072
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
22 months agotdf#135412 tdf#135888 sw: fix copying of linked text-boxes
Michael Stahl [Wed, 19 Aug 2020 14:44:09 +0000 (19 16:44 +0200)]
tdf#135412 tdf#135888 sw: fix copying of linked text-boxes

The resetLink()/restoreLinks() were added in commit
00a007be5ad88bac9905b373bc5e02d02acab11a because testMissingPath
missing-path.docx was crashing.

But then 0bcc5b3daebeb2a7d2b5ba132af4745cc6c78cd0 refactored how linking
works and introduced the isTextBox function, which is called in the
middle of DocumentContentOperationsManager::CopyFlyInFlyImpl() after
resetLink(), and this now always returns false, the same for another
call inside CopyLayoutFormat() (when called from CopyFlyInFlyImpl()),
which causes text-boxes to be copied to 2 separate flys (tdf#135888).

The problem in tdf#135412 is that somehow when called from
SwFEShell::Paste() the content-index from the clipboard document ends up
in the SwDrawFrameFormat that is created in the target document,
and this causes crash in Undo because the node index is out of bounds.

 10 SwUndoInsLayFormat::UndoImpl (this=0x7c2a760, rContext=...) at sw/source/core/undo/undobj1.cxx:310
(rr) p rContent.GetContentIdx()->GetNode().GetDoc()->IsClipBoard()
(rr) $29 = true

It turns out that missing-path.docx doesn't crash any more without
resetLink(), and removing it fixes the 2 bugs.

Change-Id: I0c6c91a42e00b9f3b79b774c814e7323f2bb3e05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101004
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit 10ae7ba661dff57a7d08174792565ec5e33fae9b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100948
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
23 months agoKJ: Update Line Numbering icons
Rizal Muttaqin [Wed, 19 Aug 2020 23:01:51 +0000 (20 06:01 +0700)]
KJ: Update Line Numbering icons

Change-Id: Ia04b0f2b7703172f2557e24bb1fb63cfa566c91b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101054
Tested-by: Jenkins
Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id>
23 months agotdf#135931 Breeze Line Numbering icons
Rizal Muttaqin [Wed, 19 Aug 2020 22:59:03 +0000 (20 05:59 +0700)]
tdf#135931 Breeze Line Numbering icons

Change-Id: Ie7ff70c83135ed6bf0c1bcdaea31796518f5632c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101051
Tested-by: Jenkins
Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id>
23 months agoSifr: tdf#135872, missing Line Numbering icon
Rizal Muttaqin [Tue, 18 Aug 2020 09:41:33 +0000 (18 16:41 +0700)]
Sifr: tdf#135872, missing Line Numbering icon

Change-Id: Ic44d598b7f7c66f45dbf1e4e419f6f76e13c7f6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100910
Tested-by: Jenkins
Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id>
(cherry picked from commit cff430c6ba8a85faaf6e15abd26eceafb493ed9c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100808
(cherry picked from commit da4b25dc11cfa22885ff260a4bdf99ec32f617f9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100937

23 months agosw: moved setting shape name to earlier stage
Vasily Melenchuk [Thu, 30 Apr 2020 13:27:37 +0000 (30 16:27 +0300)]
sw: moved setting shape name to earlier stage

During setting of some shape properties undo/redo code is called.
Undo/redo code should know about shape and style name.

Change-Id: I5240c450d0c739a245e32e9ca6f34518f35ddda5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93214
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit db3d90abd3bb830b079169397f656c56bdcc3af8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100939

23 months agosw: generate unique style name for table box and line frames
Vasily Melenchuk [Mon, 20 Jul 2020 06:55:19 +0000 (20 09:55 +0300)]
sw: generate unique style name for table box and line frames

Since SwTableBoxFormat and SwTableLineFormat are derived from
SwFrameFormat they can behave incorrectly during undo/redo.
Undo/redo code is trying to rely style names instead of pointers
to format: this is dangerous.

Any problems with SwTableBoxFormat and SwTableLineFormat, I was
not able to reproduce with GUI. But external access to document
via UNO can bring surprises.

For example: NumberFormat for table cells in GUI is modified, but
can be changed to another by UNO call (see example/usecase in
/sw/qa/python/check_table.py: test_tdf32082. And such replacement
looks from core as a new style, not a modification of attributes
in existing one.

Change-Id: I6afc992f6cdb9ce692167204b3c98e8234cd87d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99023
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit 083fe09958658de8c3da87a28e0f8ff7b3b8a5e9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100941

23 months agonss: fix Android build
Michael Stahl [Tue, 18 Aug 2020 12:36:33 +0000 (18 14:36 +0200)]
nss: fix Android build

Change-Id: I8d6704a00ee70c1cb397f8f12dac8050f24f44be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100917
Tested-by: Michael Stahl <michael.stahl@cib.de>
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit c7d1bb119d88faaafb53d65ad8907ede97d89c8c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100931
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
23 months agotdf#132892 Revert "sw: paragraph-sign: erase metafields ... correctly"
Caolán McNamara [Fri, 14 Aug 2020 15:52:23 +0000 (14 16:52 +0100)]
tdf#132892 Revert "sw: paragraph-sign: erase metafields ... correctly"

This reverts commit b402d0112a0bb53221b847fa372bfa3f6390a0e2.

Change-Id: I210d2fded01fb952d7384b78240e32d868b08575
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100796
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Tested-by: Jenkins
23 months agotdf#134439 honor FN_PARAM_PAM arguments
Caolán McNamara [Thu, 13 Aug 2020 14:48:16 +0000 (13 15:48 +0100)]
tdf#134439 honor FN_PARAM_PAM arguments

which was dropped by

commit bba8e5aa6d1968e5279b3fe368c0f81145513d04
Date:   Thu Mar 1 21:00:24 2018 +0100

    tdf#116070: Use a valid PaM when confirming the dialog.

when fixing

commit 34527cec54ca634b831cfa5ac1098c4046818ac3
Date:   Tue Jan 16 18:54:19 2018 +0100

    lokdialog: Convert the Format -> Paragraph... dialog to async exec.

so, go back to using pPaM instead of rWrtSh.GetCursor but make a copy
of pPaM to avoid the crash of tdf#116070

Change-Id: I0aaaf5173c6be47dd306b77eacbb07d0e1c4eaf1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100528
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
23 months agotdf#134746 sw: fix redline hiding of at-char fly on empty paragraphs
Michael Stahl [Tue, 11 Aug 2020 15:54:09 +0000 (11 17:54 +0200)]
tdf#134746 sw: fix redline hiding of at-char fly on empty paragraphs

If a merged paragraph has no extents, a fly anchored at the start or at
the end should be shown.

(regression from 28b77c89dfcafae82cf2a6d85731b643ff9290e5)

Change-Id: I78135f3c033cf08aad81c86b0ac693528e3f3f8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100543
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit f3cb59c46398b3a0646b8b374d5626f715fa6884)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100703
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
23 months agonss: upgrade to release 3.55.0
Michael Stahl [Fri, 7 Aug 2020 16:57:00 +0000 (7 18:57 +0200)]
nss: upgrade to release 3.55.0

Fixes CVE-2020-6829, CVE-2020-12400 CVE-2020-12401 CVE-2020-12403.
(also CVE-2020-12402 CVE-2020-12399 in older releases since 3.47)

* external/nss/nss.nspr-parallel-win-debug_build.patch:
  remove, merged upstream

Change-Id: I8b48e25ce68a2327cde1420abdaea8f9e51a7888
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100345
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit 495a5944a3d442cfe748a3bb0dcef76f6a961d30)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100420
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit 227d30a3a17f2fffb1a166cdc3e2a796bb335214)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100590
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
23 months agoNSS: enable parallel build
Jan-Marek Glogowski [Wed, 26 Jun 2019 16:09:19 +0000 (26 18:09 +0200)]
NSS: enable parallel build

Since NSS 3.53, the Makefile based build should be fixed (upstream
bug 290526). The only missing patch is a minimal NSPR fix for the
"NSPR, configure + make, parallel, Windows, MS VS, debug" build.
That patch isn't incuded in the NSPR 4.25 release (but it's already
in the mercurial repo for NSPR 4.26).

Change-Id: I8eaa3792a12bdff734e56ac3f552991478957e23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95218
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
(cherry picked from commit b56e8d6def26a0430853835e997f1be841840a61)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100419
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit c1bce55faebd9ad8751d7b6b9a7f77dff7b3d507)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100589

23 months agosw: MS Word export: don't insert section breaks in field instructions
Michael Stahl [Wed, 12 Aug 2020 15:07:18 +0000 (12 17:07 +0200)]
sw: MS Word export: don't insert section breaks in field instructions

MSWordExportBase::NeedTextNodeSplit() simply uses the soft-page-break
positions to potentially insert section breaks - but now that Writer can
display field instructions, it's quite silly to insert section breaks
inside them.

Change-Id: Ie57e6281a0287aac36984e5467920852db19a8ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100661
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit 68cc91cd2c461b7062c3f3b89b2c677e41c9a8d4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100690
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
23 months agosw: avoid assert when deletion starts at fieldmark end
Michael Stahl [Wed, 12 Aug 2020 14:32:07 +0000 (12 16:32 +0200)]
sw: avoid assert when deletion starts at fieldmark end

This hit assert(bSavePos && bSaveOtherPos);

Tweak SwUndoSaveContent::DelContentIndex() for fieldmarks to only accept
an equal end position if the start position was in range as well.

(regression from 24fd14b387dca458a1b6e9415e936d26562ddb1e)

Change-Id: If6c9b049193bb7f1bc39ec66d1c965512f9d6ec1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100673
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
23 months agoKarasa Jaga: enlarge Insert Char/Symbol icons, update Ref Field icons
Rizal Muttaqin [Thu, 13 Aug 2020 00:57:19 +0000 (13 07:57 +0700)]
Karasa Jaga: enlarge Insert Char/Symbol icons, update Ref Field icons

Change-Id: I16184cc81bda1b9608bbf52d2732e2fd3f5a8cf3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100636
Tested-by: Jenkins
Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id>
(cherry picked from commit 6d5f547f5504a5a2f18bf0b44970ccf87b12b661)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100526

23 months agotdf#135639: check the return value of GetDim32
Mike Kaganski [Tue, 11 Aug 2020 15:11:10 +0000 (11 18:11 +0300)]
tdf#135639: check the return value of GetDim32

... to avoid crash accessing non-existing element of pChildItem->vIndices

Change-Id: I248a9301abd69883f940051d9d9671298dcc8453
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100540
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100565
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100615
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
23 months agotdf#128197: sw: different line height for DOCX with compat=14
Vasily Melenchuk [Thu, 11 Jun 2020 06:45:03 +0000 (11 09:45 +0300)]
tdf#128197: sw: different line height for DOCX with compat=14

Lines containing just a shape inline without any other text are
treated in DOCX with compatibility option 15 and 14 in a different
way: while compat=15 is layouting line exatly as LO does, in
compat=14 mode minimal line height takes into account just shape
height and not current font.

Change-Id: Id2bdab941a0bbaa9080567d736435d9e0babd490
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96080
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100542

23 months agotdf#135442 min supported version of gtk3 is 3.18 not 3.20
Caolán McNamara [Tue, 11 Aug 2020 14:29:38 +0000 (11 15:29 +0100)]
tdf#135442 min supported version of gtk3 is 3.18 not 3.20

Change-Id: Iaa2eefbe08fad3a7dd6eff98bf5fb513053a263d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100541
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
23 months agotdf#134043 DOCX import: new unit tests: ComboBox to DropDown
Thorsten Behrens [Wed, 22 Jul 2020 08:44:46 +0000 (22 10:44 +0200)]
tdf#134043 DOCX import: new unit tests: ComboBox to DropDown

Change-Id: I034b0cd9c6f66c531460d1bb69d9ede5ff46f7d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97531
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99994

tdf#134572 DOCX: Incorrect default value in dropdown text fields

Change-Id: I3169e817c2f033d1525adc3b02ac3680ad220d70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99074
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100306

23 months agotdf#128198 sw: text formatting: only consider upper margin for first line
Michael Stahl [Mon, 10 Aug 2020 17:14:54 +0000 (10 19:14 +0200)]
tdf#128198 sw: text formatting: only consider upper margin for first line

The non-first lines start below the first one so the margin is already
included in the previous line's Y position.

Also move the testTdf116486 to layout.cxx.

(regression from d07fc485d46f431405a3f6a002f951a08c559677)

Change-Id: I574516ea5f9600e2d861e43162b1a69488c68819
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100440
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit 99ef50f97b6d8461b8953c2555298c7bbeb3405b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100499
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
23 months agotdf#135098 update SwTableCursor m_SelectedBoxes before merge
Caolán McNamara [Wed, 5 Aug 2020 20:08:04 +0000 (5 21:08 +0100)]
tdf#135098 update SwTableCursor m_SelectedBoxes before merge

so it does not contain the soon to-be-deleted SwTableBox so if the rPam is
queried via a11y it doesn't claim the deleted cell still exists.

tdf#122844 may be the same issue

Change-Id: I1ac3752676162ba5a29c0916039b2b467e2ac41a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100214
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
23 months agoUpdate git submodules
Christian Lohmaier [Thu, 6 Aug 2020 13:32:09 +0000 (6 15:32 +0200)]
Update git submodules

* Update translations from branch 'libreoffice-6-4'
  to d03e92fd5d821662dc0ed7d9a0a2b45da09de8a4
  - update translations for 6.4.6 rc2

    and force-fix errors using pocheck

    Change-Id: Id908ccd8e13508c60a4a0cd1fbede491bb0bf2bb

23 months agoResolves: tdf#135249 Duration input 0:123 or 0:0:123 or 0:123:59 is valid
Eike Rathke [Wed, 5 Aug 2020 23:40:04 +0000 (6 01:40 +0200)]
Resolves: tdf#135249 Duration input 0:123 or 0:0:123 or 0:123:59 is valid

Change-Id: Ie624b324822495192edc65d046945eb92356550b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100192
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
(cherry picked from commit 1616b53292cdc22c04d07bb21e71bf43dcd22299)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100212
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
23 months agotdf#135144 sw: copy bookmarks in SwDoc::CopyMasterHeader()
Michael Stahl [Tue, 4 Aug 2020 10:26:23 +0000 (4 12:26 +0200)]
tdf#135144 sw: copy bookmarks in SwDoc::CopyMasterHeader()

... and SwDoc::CopyMasterFooter(); this is the same as commit
9f7ee38acec0cb614e37aecc5ea9c5f1c63b61b6 but for 2 other functions that
do the same thing.

Change-Id: Id7ed449a004ee3c9452d4603bf8632e2720651ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100077
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit af38654b4b8388f0a0236601742b7ab3d1590ae8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100059
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
23 months agotdf#130707 xmloff: survive <text:database-display> in editeng text
Miklos Vajna [Mon, 3 Aug 2020 19:03:43 +0000 (3 21:03 +0200)]
tdf#130707 xmloff: survive <text:database-display> in editeng text

Regression from commit 28d67b792724a23015dec32fb0278b729f676736
(tdf#107776 sw ODF shape import: make is-textbox check more strict,
2019-08-26), now that we correctly identify what shape text to import as
"textbox" (Writer TextFrame) and what to import as editeng text, there
are documents out there that try to import mailmerge fields into
editeng-based shape text. Fix missing error handling there.

Note that the error is not just silently ignored, we do insert the field
result into the shape text, existing code provides this already.

(cherry picked from commit fd18d12efdfbe0e26d41d733edc711d0f40a7804)

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

Change-Id: Ibe631ac5d94c1c7795dd00bad05fdcca0e6741a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100055
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
23 months agotdf#130559: don't fail creation of preview when BackingComp can't add...
Mike Kaganski [Sat, 25 Jul 2020 15:55:18 +0000 (25 18:55 +0300)]
tdf#130559: don't fail creation of preview when BackingComp can't add...

an event listener. This crashes when loading a document with print preview
set as active view.

Regression after commit 128ecffe53394c1f045521c2efb42ea03a319f4b.

Change-Id: I5dc421f7c08dd70d51772fac5432f33cd9a1491a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99442
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit e3b695f6a1525ac6b32abd27a6368a7e8b7d09fa)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99740
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit a9457b3c18f6030b19d8cb1aada3709649a05460)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99747
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
23 months agotdf#134965 sw: avoid RemoveFollowFlowLine() SNAFU
Michael Stahl [Fri, 31 Jul 2020 12:46:13 +0000 (31 14:46 +0200)]
tdf#134965 sw: avoid RemoveFollowFlowLine() SNAFU

A follow-flow-line SwRowFrame is deleted in RemoveFollowFlowLine()
while it is being iterated in stack frame #18.

0  SwRowFrame::~SwRowFrame() (this=0xaa035b0, __in_chrg=<optimized out>) at sw/source/core/layout/tabfrm.cxx:3807
1  SwFrame::DestroyFrame(SwFrame*) (pFrame=0xaa035b0) at sw/source/core/layout/ssfrm.cxx:389
2  SwTabFrame::RemoveFollowFlowLine() (this=0x9c16790) at sw/source/core/layout/tabfrm.cxx:945
3  SwTabFrame::MakeAll(OutputDevice*) (this=0x9c16790, pRenderContext=0x72afaf0) at sw/source/core/layout/tabfrm.cxx:2203
4  SwFrame::PrepareMake(OutputDevice*) (this=0x9c16790, pRenderContext=0x72afaf0) at sw/source/core/layout/calcmove.cxx:370
5  SwFrame::Calc(OutputDevice*) const (this=0x9c16790, pRenderContext=0x72afaf0) at sw/source/core/layout/trvlfrm.cxx:1791
6  SwFrame::PrepareMake(OutputDevice*) (this=0x925b740, pRenderContext=0x72afaf0) at sw/source/core/layout/calcmove.cxx:248
7  SwFrame::Calc(OutputDevice*) const (this=0x925b740, pRenderContext=0x72afaf0) at sw/source/core/layout/trvlfrm.cxx:1791
8  SwFrame::PrepareMake(OutputDevice*) (this=0x925b8e0, pRenderContext=0x72afaf0) at sw/source/core/layout/calcmove.cxx:248
9  SwFrame::Calc(OutputDevice*) const (this=0x925b8e0, pRenderContext=0x72afaf0) at sw/source/core/layout/trvlfrm.cxx:1791
10 SwFrame::PrepareMake(OutputDevice*) (this=0x925ba70, pRenderContext=0x72afaf0) at sw/source/core/layout/calcmove.cxx:248
11 SwFrame::Calc(OutputDevice*) const (this=0x925ba70, pRenderContext=0x72afaf0) at sw/source/core/layout/trvlfrm.cxx:1791
12 SwFrame::MakePos() (this=0x925bc20) at sw/source/core/layout/calcmove.cxx:552
13 SwTextFrame::MakePos() (this=0x925bc20) at sw/source/core/text/frmform.cxx:339
14 SwContentFrame::MakeAll(OutputDevice*) (this=0x925bc20) at sw/source/core/layout/calcmove.cxx:1408
15 SwFrame::PrepareMake(OutputDevice*) (this=0x925bc20, pRenderContext=0x72afaf0) at sw/source/core/layout/calcmove.cxx:370
16 SwFrame::Calc(OutputDevice*) const (this=0x925bc20, pRenderContext=0x72afaf0) at sw/source/core/layout/trvlfrm.cxx:1791
17 SwContentFrame::CalcLowers(SwLayoutFrame&, SwLayoutFrame const&, long, bool) (rLay=..., rDontLeave=..., nBottom=168478, bSkipRowSpanCells=true) at sw/source/core/layout/tabfrm.cxx:1521
18 lcl_RecalcRow(SwRowFrame&, long) (rRow=..., nBottom=168478) at sw/source/core/layout/tabfrm.cxx:1651
19 SwTabFrame::MakeAll(OutputDevice*) (this=0x93ec7e0, pRenderContext=0x72afaf0) at sw/source/core/layout/tabfrm.cxx:2421
20 SwFrame::PrepareMake(OutputDevice*) (this=0x3df3cc0, pRenderContext=0x72afaf0) at sw/source/core/layout/calcmove.cxx:316
21 SwFrame::Calc(OutputDevice*) const (this=0x3df3cc0, pRenderContext=0x72afaf0) at sw/source/core/layout/trvlfrm.cxx:1791
22 GetFrameOfModify(SwRootFrame const*, SwModify const&, SwFrameType, SwPosition const*, std::pair<Point, bool> const*) (pLayout=0x72aa850, rMod=..., nFrameType=(SwFrameType::Txt | SwFrameType::NoTxt), pPos=0x71f35e0, pViewPosAndCalcFrame=0x7ffc99f591a0) at sw/source/core/layout/frmtool.cxx:3697
23 SwContentNode::getLayoutFrame(SwRootFrame const*, SwPosition const*, std::pair<Point, bool> const*) const (this=0x6fcfb50, _pRoot=0x72aa850, pPos=0x71f35e0, pViewPosAndCalcFrame=0x7ffc99f591a0) at sw/source/core/docnode/node.cxx:1194
24 SwCursorShell::GetCurrFrame(bool) const (this=0x72a9730, bCalcFrame=true) at sw/source/core/crsr/crsrsh.cxx:2455
25 SwFEShell::GetAnyCurRect(CurRectType, Point const*, com::sun::star::uno::Reference<com::sun::star::embed::XEmbeddedObject> const&) const (this=0x72a9730, eType=CurRectType::PageCalc, pPt=0x0, xObj=empty uno::Reference) at sw/source/core/frmedt/fews.cxx:113
26 SwView::StateStatusLine(SfxItemSet&) (this=0x72af430, rSet=SfxItemSet of pool 0x6fa3d50 with parent 0x0 and Which ranges: [(10000, 10000), (10221, 10221), (10223, 10225), (11064, 11065), (21182, 21182), (21185, 21185), (21189, 21189)] = {...}) at sw/source/uibase/uiview/view2.cxx:1517

Not obvious why this changed with calling MakeFrames() instead of
SwNodes::CopyNodes(bNewFrames=true) or how to best prevent it; adding
another FrameDeleteGuard avoids the crash at least.

(regression from 166b5010b402a41b192b1659093a25acf9065fd9)

Change-Id: Ifd5a0c93064c9536429dda30a2c4ebc7a31b7e7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99870
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit aed92491f356b008fe1cd25b5cd6cc43279db3a3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99848
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
23 months agotdf#134436 sw: fix SwUndoDelete::RedoImpl() with section at end...
Michael Stahl [Thu, 30 Jul 2020 16:27:28 +0000 (30 18:27 +0200)]
tdf#134436 sw: fix SwUndoDelete::RedoImpl() with section at end...

... of document; the root cause is that in some intermediate delete
operation, the delete will remove a section start/end node pair that
surrounds the last text node in the document, but
SwUndoDelete::RedoImpl() will not remove it, thus for subsequent Undo
actions the indexes are messed up and weird things happen.

Fix this in DocumentContentOperationsManager::DeleteRangeImplImpl(),
with the same weird "is point at the end" check as SwUndoDelete.

Change-Id: Iebf20d3c129c69692df8d57e3c5b9e6fec281e4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99810
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit 22a77cb83a3769a8b43d80565282988a74214866)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99858
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
23 months agotdf#134931 sw_redlinehide: fix layout following paste of table
Michael Stahl [Fri, 31 Jul 2020 11:32:29 +0000 (31 13:32 +0200)]
tdf#134931 sw_redlinehide: fix layout following paste of table

The pasted table does get a SwTabFrame but the problem is that
TurboAction() is called and formats the pre-existing SwTextFrame and
somehow that just sets all the valid flags on the new SwTabFrame without
doing any formatting.

Previously, SwNodes::CopyNodes(bNewFrames=true) would call
SwTabFrame::Paste() which invalidates the page.

In InsertCnt_(), for new SwSectionFrames InvalidatePage() is already
called so do the same for SwTabFrame which gets rid of the "turbo".

(regression from 166b5010b402a41b192b1659093a25acf9065fd9)

Change-Id: I970a04bd8e76f5418bddb66af915ac466f44daf3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99867
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit 5f7b937e9f81824f11022bc6b4dd222f700883cd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99845
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
23 months agotdf#133967: sw_uiwriter: Add unittest
Xisco Fauli [Wed, 29 Jul 2020 23:28:14 +0000 (30 01:28 +0200)]
tdf#133967: sw_uiwriter: Add unittest

Change-Id: I7ec43fd7109e883b0ae560cc8832e449a09fddb0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99758
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit a6e02f6337f038a445b858bb91bf14d1a14768e4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99735
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99791

23 months agotdf#134252 sw_redlinehide: fix SwUndoDelete for table before end of section
Michael Stahl [Wed, 29 Jul 2020 17:02:46 +0000 (29 19:02 +0200)]
tdf#134252 sw_redlinehide: fix SwUndoDelete for table before end of section

In this funny case, the SwPaM starts inside a section, and ends in the
first text node following the end of the section, which happens to be in
a different section (but that doesn't matter)... this is because
IsSelOvr() moves the end of the selection resulting in the 3rd SelAll
off of the table end node (as the section ends with a table), but then
it's on the section end node and moves forward again.

SwUndoDelete::UndoImpl() must first create the outer section frames,
skip over the start text node which has frames handled by
RecreateStartTextFrames() and then create the frames following the start
text node, where the end node of the outer section now finds its expected
outer section frame.

This relies on the code from 55576842ec72a748d0bad123d41fa03c89fc136d
to move the existing text frame below the new section frame(s).

(regression from 6c7245e789f973cf6dad03f7008ab3f9d12d350c)

Change-Id: I9f39b09e603e75ef813d5c855d828ec9bd5fdd95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99723
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit 740f1796504f66408b692225a9676c9ee3d63722)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99785
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
23 months ago(related: tdf#134252) sw: fix assert when moving mouse pointer
Michael Stahl [Wed, 29 Jul 2020 12:55:49 +0000 (29 14:55 +0200)]
(related: tdf#134252) sw: fix assert when moving mouse pointer

SwPageFrame::GetModelPositionForViewPoint() was calling GetCharRect() on
a frame that doesn't match the passed prevTextPos; it was supposed to be
initialised by GetModelPositionForViewPoint() call but that didn't work
because the point was outside the frame so nothing was inited.

(regression from edd2db1c783bd571ff796a5298385cacc91877b9)

Change-Id: Ic064c3efc1b7f29d18d713206e5ea5ac0b67fbc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99692
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit 63308aa3b109271ffb4fd47e9fea2e3281a1552d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99780
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
23 months agotdf#134250 sw_redlinehide: fix Undo with section before table
Michael Stahl [Tue, 28 Jul 2020 17:12:19 +0000 (28 19:12 +0200)]
tdf#134250 sw_redlinehide: fix Undo with section before table

... at start of document, part 2:

In SwUndoDelete::UndoImpl(), the m_aEndStr wasn't inserted, because the
pTextNd was a section node.

This caused asserts when trying to add the history hints that used to be
in the end text node.

thints.cxx:1295: bool SwTextNode::InsertHint(SwTextAttr*, SetAttrMode): Assertion `!pAttr->GetEnd() || (*pAttr->GetEnd() <= Len())' failed.

(regression from  57d488660572d62ef0371e50dcdd4ca7a6d98a14)

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

tdf#134250 add unit test
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99672
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit 50ceac91a4ac2057847e7d9807f5cb614e6ff755)

Change-Id: I48caa7487d2d1e6250b5aceab18f270555d3ee8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99779
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>