summaryrefslogtreecommitdiff
path: root/sw/qa/extras/layout
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-02-23 16:45:31 +0100
committerAndras Timar <andras.timar@collabora.com>2022-03-09 09:17:19 +0100
commit6898a9c93351e2b317c546b21049ed315ab09e6f (patch)
tree2708baa096873a148f392b5fa7a0556d60f5769e /sw/qa/extras/layout
parentd0e41aa9e9680c1a204f9bdc4888fba3470e7fff (diff)
sw: really prevent footnote frame against delete while it's moved
This reverts commit fe5d3fbfe63fe8b433776bd3a0508dd712b868b0 (on master only) It turns out that checking a single column's IsMovingFootnotes() is not enough - as frames can move both forwards and backwards the entire chain of columns would need to be checked. (Most callers of MoveLowerFootnotes() move forwards, but one place in tabfrm.cxx moves from a follow to master.) But it turns out that this is probably the wrong way in any case: most likely the intention in FormatAnchorFrameAndItsPrevs() is to format previous frames in the same layout environment, so if there is a section or column inside a footnote then this upper should be formatted, while if the footnote is inside a section or column this upper should not be formatted; this should make calls during MoveFootnotes_() safe as it should prevent the formatting of frames in the footnote boss moving a footnote that is already being moved. So tweak the fix in commit fa1bcc22921941b2cd8a0b32fe0d15655d12d607 a little to make it more general. Also it was previously possible that for a section with columns, both the section branch and the column branch was taken, which seems supperfluous. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130544 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 3f569ffc9238e6bf2915e78bf21c844ca5f1270d) add a layout test to exercise UXTSOREL Change-Id: I57b29dd7d73c08bdbf227676c4ce9034aabf418a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130493 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 10d46c0498b89350645cf45e744a528d3d8f1ac1) Change-Id: I39487640322339fe4d511e845d9c6bced2ba9dad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130831 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/qa/extras/layout')
-rw-r--r--sw/qa/extras/layout/data/LIBREOFFICE-UXTSOREL.rtfbin0 -> 108987 bytes
-rw-r--r--sw/qa/extras/layout/layout.cxx9
2 files changed, 9 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/LIBREOFFICE-UXTSOREL.rtf b/sw/qa/extras/layout/data/LIBREOFFICE-UXTSOREL.rtf
new file mode 100644
index 000000000000..1020269ae119
--- /dev/null
+++ b/sw/qa/extras/layout/data/LIBREOFFICE-UXTSOREL.rtf
Binary files differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 0c7a4dc13ff0..94edf650a359 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -2478,6 +2478,15 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint75)
createSwDoc(DATA_DIRECTORY, "forcepoint75-1.rtf");
}
+// FIXME: apparently infinite loop on Mac
+#ifndef MACOSX
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testUXTSOREL)
+{
+ createSwDoc(DATA_DIRECTORY, "LIBREOFFICE-UXTSOREL.rtf");
+}
+#endif
+
//just care it doesn't crash/assert
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepointFootnoteFrame)
{