diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-10-16 08:46:54 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-10-16 09:53:35 +0200 |
commit | 33ade4171a1a443fd24e6463a9eaa279f7d778bb (patch) | |
tree | 9f850d200381808809f4f75df9eef80737f51922 /sw/source/filter/ww8/docxexport.cxx | |
parent | 5af582071da444af338c8cd0a9657f73f9a5f52f (diff) |
sw floattable, wrap on all pages: add DOCX filter
- map DocumentSettingId::ALLOW_TEXT_AFTER_FLOATING_TABLE_BREAK to
<w:compatSetting w:name="allowTextAfterFloatingTableBreak"> on export
- do the opposite on import
- this requires a bit of rework, to avoid routing <w:compatSetting>
via a grab-bag when we want to actually read it during import
- also expose GetBooleanValue() from the OOXML tokenizer, so dmapper
can know when the value of the compat flag is a true-like string.
Note that it seems DOC and RTF don't have a matching compat flag for
this.
Change-Id: I0cb1230ee40994f59b816c42f8e7d2ac658b3212
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158013
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/source/filter/ww8/docxexport.cxx')
-rw-r--r-- | sw/source/filter/ww8/docxexport.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 61319d5e2f3b..42ff0fdf7a09 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -1435,6 +1435,18 @@ void DocxExport::WriteSettings() FSNS( XML_w, XML_name ), "compatibilityMode", FSNS( XML_w, XML_uri ), "http://schemas.microsoft.com/office/word", FSNS( XML_w, XML_val ), OString::number(nTargetCompatibilityMode)); + + const IDocumentSettingAccess& rIDSA = m_rDoc.getIDocumentSettingAccess(); + if (rIDSA.get(DocumentSettingId::ALLOW_TEXT_AFTER_FLOATING_TABLE_BREAK)) + { + // AllowTextAfterFloatingTableBreak doesn't have its own XML element, it's a + // <w:compatSetting> with a specific name. + pFS->singleElementNS(XML_w, XML_compatSetting, + FSNS(XML_w, XML_name), "allowTextAfterFloatingTableBreak", + FSNS(XML_w, XML_uri), "http://schemas.microsoft.com/office/word", + FSNS(XML_w, XML_val), "1"); + } + pFS->endElementNS( XML_w, XML_compat ); } |