diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2022-07-11 19:20:33 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2022-07-26 07:53:44 +0200 |
commit | a5b6a8e45d23443ee59fefa188f007d2147d93dc (patch) | |
tree | 020e0d3c0738129345e8b11da379d64af0164d6f /sw/qa/extras/uiwriter | |
parent | 14f95c7311c3d3cf6ca0d5898b20f06b0089a425 (diff) |
sw: fix spurious layout invalidation from ~SwCallLink()
This code was added in commit 56b2cf0c10d9caa01ebae1d80465e342d046a85c
"sw-collapse-empty-table-par-like-html.diff" and leaves us to guess
what it should do.
Apparently it's trying to replicate a Word feature where an empty
paragraph at the end of a table cell and preceded by a nested table is
effectively hidden, *unless* the user moves the cursor into it, at which
point it grows to its ordinary height.
The problem is that this is implemented by invalidating the position of
any table once the cursor is moved into it, causing it to be
reformatted, at potentially great expense, regardless if the cursor is
actually on a paragraph that may be hidden.
Also limit invalidations to when the cursor has actually moved to a
different node.
To fix tdf#105330, un-collapse a paragraph after Undo, requires
additionally doing the same notification from
SwUndoInsTable::UndoImpl() because the SwCallLink won't see the removed
table any more.
Mysteriously this causes the test SwLayoutWriter2 testTdf124261 to fail
in Jenkins, but only on MacOSX so impossible to debug; tb86 fails with:
layout2.cxx:2227:testTdf124261::TestBody
equality assertion failed
- Expected: 1721
- Actual : 5437
... and tb84 with:
layout2.cxx:2227:testTdf124261::TestBody
equality assertion failed
- Expected: 1721
- Actual : 3740
Change-Id: Ifd55097735d3675e6b82264f455baa44e9c9e30a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136963
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit c605283ad6785dea762feab5fdffd9d27e75c292)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137034
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/qa/extras/uiwriter')
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter2.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx index c85e8e707a70..75fb81de923c 100644 --- a/sw/qa/extras/uiwriter/uiwriter2.cxx +++ b/sw/qa/extras/uiwriter/uiwriter2.cxx @@ -4063,7 +4063,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf147006) CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf124261) { -#if !defined(_WIN32) +#if !defined(_WIN32) && !defined(MACOSX) // Make sure that pressing a key in a btlr cell frame causes an immediate, correct repaint. SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf124261.docx"); SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); |