summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/sectfrm.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-09-25 12:49:34 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-09-25 14:11:23 +0200
commit8da365e2a7a6b30da6c2ca26b2a5f45f89cd5460 (patch)
tree60adf21f9e47e0ebc283f680ad1c227101eb8bb0 /sw/source/core/layout/sectfrm.cxx
parent68af7378074397466c15509a5d813dce69a54a41 (diff)
sw: split section frames inside table cells, handle nested tables
Commit 3d1bb76ebf5c51141018cfd76eccdb63472de8de (tdf#112109 sw: split section frames inside table cells, ignore nested tables, 2017-08-31) explicitly disabled this, but the underlying problem is now fixed with commit ec262cbc56822d8fffccd6e983848df196cf5c44 (tdf#112160 sw: audit GetNextLayoutLeaf() calls in SwFrame::GetNextSctLeaf(), 2017-09-04), so we can have it again. Change-Id: Ic17c4921de2c69e4cc16ae82cfed58d096879db7
Diffstat (limited to 'sw/source/core/layout/sectfrm.cxx')
-rw-r--r--sw/source/core/layout/sectfrm.cxx28
1 files changed, 4 insertions, 24 deletions
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index 39bc17c79092..d5aa2322187e 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -589,34 +589,14 @@ namespace
return pLayFrame;
}
- /// Checks if pFrame is in a table, which itself is in a section.
- bool IsFrameInTableInSection(const SwFrame* pFrame)
+ /// Checks if pFrame has a parent that can contain a split section frame.
+ bool CanContainSplitSection(const SwFrame* pFrame)
{
if (!pFrame->IsInTab())
- return false;
+ return true;
// The frame is in a table, see if the table is in a section.
- return pFrame->FindTabFrame()->IsInSct();
- }
-
- /// Checks if pFrame is in a table, which itself is in a table.
- bool IsFrameInTableInTable(const SwFrame* pFrame)
- {
- if (!pFrame->IsInTab())
- return false;
-
- // The frame is in a table, see if the inner table is in an outer
- // table.
- bool bNested = false;
- if (const SwFrame* pUpper = pFrame->FindTabFrame()->GetUpper())
- bNested = pUpper->IsInTab();
- return bNested;
- }
-
- /// Checks if pFrame has a parent that can contain a split section frame.
- bool CanContainSplitSection(const SwFrame* pFrame)
- {
- return !IsFrameInTableInSection(pFrame) && !IsFrameInTableInTable(pFrame);
+ return !pFrame->FindTabFrame()->IsInSct();
}
}