summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2022-12-22 20:20:24 -0500
committerJustin Luth <jluth@mail.com>2022-12-24 13:51:37 +0000
commit376152fbd110cdc0a2cde1fa9758f36c016d9352 (patch)
treebf11c18829f26668d2cd79799d02f81d1ce8f10e /sw
parentcfc73f3373f49770b859bc68cbf6bd987342f9ad (diff)
tdf#152636 writerfilter: no w:br in DMLShapes
Don't write postponed column and page breaks into DML shape paragraphs. No existing unit tests found that match this criteria. The example file I have is not appropriate as a unit test, and it too easily fails to match when any random change is made to minimize/scrub it. Change-Id: Iced1399f76caf97362a5ba47a325233b9f009fcf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144779 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 3e4bca89472d..0bc7e87f1469 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1545,7 +1545,8 @@ void DocxAttributeOutput::EndParagraphProperties(const SfxItemSet& rParagraphMar
m_pSerializer->endElementNS(XML_w, XML_smartTag);
}
- if ( m_nColBreakStatus == COLBRK_WRITE || m_nColBreakStatus == COLBRK_WRITEANDPOSTPONE )
+ if ((m_nColBreakStatus == COLBRK_WRITE || m_nColBreakStatus == COLBRK_WRITEANDPOSTPONE)
+ && !m_rExport.SdrExporter().IsDMLAndVMLDrawingOpen())
{
m_pSerializer->startElementNS(XML_w, XML_r);
m_pSerializer->singleElementNS(XML_w, XML_br, FSNS(XML_w, XML_type), "column");
@@ -1557,7 +1558,8 @@ void DocxAttributeOutput::EndParagraphProperties(const SfxItemSet& rParagraphMar
m_nColBreakStatus = COLBRK_NONE;
}
- if ( m_bPostponedPageBreak && !m_bWritingHeaderFooter )
+ if (m_bPostponedPageBreak && !m_bWritingHeaderFooter
+ && !m_rExport.SdrExporter().IsDMLAndVMLDrawingOpen())
{
m_pSerializer->startElementNS(XML_w, XML_r);
m_pSerializer->singleElementNS(XML_w, XML_br, FSNS(XML_w, XML_type), "page");