summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2023-09-13 08:14:19 +0200
committerMiklos Vajna <vmiklos@collabora.com>2023-09-13 11:35:07 +0200
commit5127b1961b762643d47a26704556fd9b8664c6fc (patch)
tree3955a52480030dc12934dfdfecf49d2ac450caf3 /sw
parentfa0e4fa0154b15fa1c04495562d08b4490ec984b (diff)
sw floattable, nesting: add DOCX import
There were two problems here: 1) writerfilter/ didn't even try allowing split floating tables for the inner case, because layout didn't support that previously. 2) CppunitTest_writerfilter_dmapper's test3NestedFloatingTables crashed because we expected that in case a fly+table is not toplevel, then the parent is also a fly+table frame, but in this case the parent was just a table frame. Fix this by checking for a table parent instead of a fly parent when deciding if we handle the split as a nested case or a toplevel one. Change-Id: I4c58636ef80371b8ec51a96fe436fa6379c795d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156865 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/flycnt.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index d6aa1b6b2321..2cba4e295728 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -1611,10 +1611,11 @@ SwLayoutFrame *SwFrame::GetNextFlyLeaf( MakePageType eMakePage )
}
}
- if (bLeftFly && pFlyAnchor && pFlyAnchor->IsInFly()
- && FindFlyFrame() == pLayLeaf->FindFlyFrame())
+ if (bLeftFly && pFlyAnchor && pFlyAnchor->IsInTab()
+ && FindTabFrame() == pLayLeaf->FindTabFrame())
{
- // This is an inner fly, then the follow anchor will be just next to us.
+ // This is an inner fly (parent is an inline or a floating table), then the follow
+ // anchor will be just next to us.
SwLayoutFrame* pFlyAnchorUpper = pFlyAnchor->GetUpper();
pOldLayLeaf = pLayLeaf;
pLayLeaf = pFlyAnchorUpper;