summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/layout/flowfrm.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index cb47267f1195..41b6b8fff953 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -248,6 +248,17 @@ bool SwFlowFrame::IsKeep(SvxFormatKeepItem const& rKeep,
( !m_rThis.IsInTab() || m_rThis.IsTabFrame() ) &&
rKeep.GetValue() && !IsNextContentFullPage(m_rThis));
+ if (bKeep && m_rThis.IsTextFrame())
+ {
+ auto& rTextFrame = static_cast<SwTextFrame&>(m_rThis);
+ if (rTextFrame.HasNonLastSplitFlyDrawObj())
+ {
+ // Allow split for the non-last anchors of a split fly, even if rKeep.GetValue() is
+ // true.
+ bKeep = false;
+ }
+ }
+
OSL_ENSURE( !bCheckIfLastRowShouldKeep || m_rThis.IsTabFrame(),
"IsKeep with bCheckIfLastRowShouldKeep should only be used for tabfrms" );