summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2023-05-25 08:18:02 +0200
committerMiklos Vajna <vmiklos@collabora.com>2023-05-31 13:48:05 +0200
commit6ffce19cff873a3d90bb02b4a702cd06498fabb5 (patch)
treea4532fb55df17fa90e45c1c299eead6f7a56ef3a /sw/source/filter
parent53b99e785cf5506fdbdd3d896154a2b1ad6e9aac (diff)
sw floattable: handle <w:doNotBreakWrappedTables> in the DOCX filter
<w:doNotBreakWrappedTables> primarily appears in documents imported from RTF, unless \nobrkwrptbl is specified there (which, confusingly, means to do split floating tables). (cherry picked from commit f5dc52dc9a068fec3323c3089929a81675b0d1ba) Conflicts: sw/qa/filter/ww8/ww8.cxx Change-Id: I1891b89787719805e6c87045dee3c63c68ed2940 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152296 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/source/filter')
-rw-r--r--sw/source/filter/ww8/docxexport.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index 838d49a9b84d..b9c75140b7f6 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -1001,7 +1001,8 @@ static auto
WriteCompat(SwDoc const& rDoc, ::sax_fastparser::FSHelperPtr const& rpFS,
sal_Int32 & rTargetCompatibilityMode) -> void
{
- if (!rDoc.getIDocumentSettingAccess().get(DocumentSettingId::ADD_EXT_LEADING))
+ const IDocumentSettingAccess& rIDSA = rDoc.getIDocumentSettingAccess();
+ if (!rIDSA.get(DocumentSettingId::ADD_EXT_LEADING))
{
rpFS->singleElementNS(XML_w, XML_noLeading);
if (rTargetCompatibilityMode > 14)
@@ -1010,13 +1011,19 @@ WriteCompat(SwDoc const& rDoc, ::sax_fastparser::FSHelperPtr const& rpFS,
}
}
// Do not justify lines with manual break
- if (rDoc.getIDocumentSettingAccess().get(DocumentSettingId::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK))
+ if (rIDSA.get(DocumentSettingId::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK))
{
rpFS->singleElementNS(XML_w, XML_doNotExpandShiftReturn);
}
// tdf#146515 export "Use printer metrics for document formatting"
- if (!rDoc.getIDocumentSettingAccess().get(DocumentSettingId::USE_VIRTUAL_DEVICE))
+ if (!rIDSA.get(DocumentSettingId::USE_VIRTUAL_DEVICE))
rpFS->singleElementNS(XML_w, XML_usePrinterMetrics);
+
+ if (rIDSA.get(DocumentSettingId::DO_NOT_BREAK_WRAPPED_TABLES))
+ {
+ // Map the DoNotBreakWrappedTables compat flag to <w:doNotBreakWrappedTables>.
+ rpFS->singleElementNS(XML_w, XML_doNotBreakWrappedTables);
+ }
}
void DocxExport::WriteSettings()