summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
index 69951ba08a2c..31802ee4c184 100644
--- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
@@ -1204,6 +1204,7 @@ void SwToContentAnchoredObjectPosition::CalcOverlap(const SwTextFrame* pAnchorFr
// Get the list of objects.
auto pSortedObjs = pAnchorFrameForVertPos->GetDrawObjs();
+ const SwLayoutFrame* pAnchorUpper = pAnchorFrameForVertPos->GetUpper();
bool bSplitFly = false;
SwFlyFrame* pFlyFrame = GetAnchoredObj().DynCastFlyFrame();
@@ -1267,6 +1268,12 @@ void SwToContentAnchoredObjectPosition::CalcOverlap(const SwTextFrame* pAnchorFr
// An inner fly overlapping with its outer fly is fine.
continue;
}
+
+ if (pAnchoredObjFlyAnchor && pAnchoredObjFlyAnchor->GetUpper() != pAnchorUpper)
+ {
+ // A fly overlapping with a fly from an other upper is fine.
+ continue;
+ }
}
css::text::WrapTextMode eWrap = pAnchoredObj->GetFrameFormat().GetSurround().GetSurround();