diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-04-05 16:15:15 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-04-05 17:52:24 +0200 |
commit | 61888e49d6eee55197ca1c27b4b023f9b2108d48 (patch) | |
tree | a60bad8e9434e76a2ba59a4bca5586f550b1ac97 /sw/source/core/text | |
parent | 19de5d97efbb80e9767bc6b873bcc2c263a721de (diff) |
tdf#148366 sw clearing breaks: fix handling of anchored objs from header/footer
Regression from commit f86d1482bef285f90079b5130e410646db96cf58 (sw
clearing breaks: add DOCX import, 2022-03-08), the trouble was that we
considered an anchored object from the header for text wrapping, while
this anchored object was in the background in Word.
Change-Id: I806cc91ce1eb390c02cbff2defa4cb47fde86853
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132578
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/source/core/text')
-rw-r--r-- | sw/source/core/text/txtfly.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx index 1b9c3b55308a..88f0687de8c1 100644 --- a/sw/source/core/text/txtfly.cxx +++ b/sw/source/core/text/txtfly.cxx @@ -1012,6 +1012,13 @@ SwTwips SwTextFly::GetMaxBottom(const SwBreakPortion& rPortion, const SwTextForm for (size_t i = 0; i < nCount; ++i) { const SwAnchoredObject* pAnchoredObj = (*mpAnchoredObjList)[i]; + + if (pAnchoredObj->GetAnchorFrame()->FindFooterOrHeader()) + { + // Anchored in the header or footer, ignore it for clearing break purposes. + continue; + } + SwRect aRect(pAnchoredObj->GetObjRectWithSpaces()); if (rPortion.GetClear() == SwLineBreakClear::LEFT) { |