summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2023-08-11 08:27:32 +0200
committerMiklos Vajna <vmiklos@collabora.com>2023-08-11 11:09:30 +0200
commit5af44a176d2a738dd7523713202aeee27c5578b6 (patch)
tree8487fede2f319de5daf6734226c7f79ecdfdbf5d /sw/source
parent5484657d2b1677b7e385ab6ef87ad64dcb9934e4 (diff)
sw floattable: export <w:tblOverlap w:val=never> to DOCX
Once split flys containing tables have "allow overlap" disabled, this is not saved to DOCX when we map them to floating tables. The working case is the allowOverlap attribute on shapes, added in commit f8c7a2284b88c149addc8a30abb0cad8a10dad77 (Related: tdf#124600 sw anchored object allow overlap: add DOCX filter, 2019-09-20). Fix the problem by extending DocxAttributeOutput::TableDefinition(), to write <w:tblOverlap> in case overlap is not allowed, after <w:tblpPr>. DOC and RTF filters are still missing. Change-Id: I7d0bd4a15567014d3add8cbbcd92c62c5a33b7e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155573 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/filter/ww8/docxtableexport.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/docxtableexport.cxx b/sw/source/filter/ww8/docxtableexport.cxx
index 51fb3540c9df..b3e2d014222b 100644
--- a/sw/source/filter/ww8/docxtableexport.cxx
+++ b/sw/source/filter/ww8/docxtableexport.cxx
@@ -37,6 +37,7 @@
#include <frmatr.hxx>
#include <swmodule.hxx>
#include <fmtrowsplt.hxx>
+#include <fmtwrapinfluenceonobjpos.hxx>
#include "docxexportfilter.hxx"
#include "docxhelper.hxx"
@@ -281,6 +282,13 @@ void DocxAttributeOutput::TableDefinition(
bFloatingTableWritten = true;
// The outer table was floating, make sure potential inner tables are not floating.
m_rExport.SetFloatingTableFrame(nullptr);
+
+ const SwFrameFormat& rFloatingTableFormat = pFloatingTableFrame->GetFrameFormat();
+ if (!rFloatingTableFormat.GetWrapInfluenceOnObjPos().GetAllowOverlap())
+ {
+ // Allowing overlap is the default, both in OOXML and in Writer.
+ m_pSerializer->singleElementNS(XML_w, XML_tblOverlap, FSNS(XML_w, XML_val), "never");
+ }
}
// Extract properties from grab bag