[Libreoffice-commits] core.git: sw/qa sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Mar 16 11:37:11 UTC 2021
sw/qa/core/layout/data/tdf122894-4.doc |binary
sw/qa/core/layout/layout.cxx | 5 +++++
sw/source/core/layout/objectformattertxtfrm.cxx | 3 ++-
3 files changed, 7 insertions(+), 1 deletion(-)
New commits:
commit fa1bcc22921941b2cd8a0b32fe0d15655d12d607
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Mar 16 10:18:18 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Mar 16 12:36:27 2021 +0100
tdf#122894 skipping anchor in column in footnote
a trawl of crash testing document didn't show up another example
and it doesn't seem possible to create this scenario directly in out
UI
Change-Id: Ie65a51bf609e8bacd261f368f0b8037431c116ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112567
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/qa/core/layout/data/tdf122894-4.doc b/sw/qa/core/layout/data/tdf122894-4.doc
new file mode 100644
index 000000000000..4ebdb53de04f
Binary files /dev/null and b/sw/qa/core/layout/data/tdf122894-4.doc differ
diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx
index 7c899aa31d63..8db099b6fc1b 100644
--- a/sw/qa/core/layout/layout.cxx
+++ b/sw/qa/core/layout/layout.cxx
@@ -463,6 +463,11 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testVerticallyMergedCellBorder)
}
}
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testCrashRemoveFromLayout)
+{
+ load(DATA_DIRECTORY, "tdf122894-4.doc");
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx
index 96ea415070c5..1ea4a63fb56c 100644
--- a/sw/source/core/layout/objectformattertxtfrm.cxx
+++ b/sw/source/core/layout/objectformattertxtfrm.cxx
@@ -747,7 +747,8 @@ void SwObjectFormatterTextFrame::FormatAnchorFrameAndItsPrevs( SwTextFrame& _rAn
// format the content of the previous columns.
// Note: It's a very simple format without formatting objects.
SwFrame* pColFrameOfAnchor = _rAnchorTextFrame.FindColFrame();
- if ( pColFrameOfAnchor )
+ SAL_WARN_IF(pColFrameOfAnchor && _rAnchorTextFrame.IsInFootnote(), "sw.layout", "tdf#122894 skipping anchor in column in footnote");
+ if (pColFrameOfAnchor && !_rAnchorTextFrame.IsInFootnote())
{
// #i44049#
_rAnchorTextFrame.LockJoin();
More information about the Libreoffice-commits
mailing list