sw/source/filter/ww8/docxattributeoutput.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit bb968d0bfa5cb40e648f2cb032a6a1109de13377
Author:     Justin Luth <justin.l...@collabora.com>
AuthorDate: Thu Dec 22 20:20:24 2022 -0500
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Tue Jan 3 12:43:18 2023 +0000

    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 <jl...@mail.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144824
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index d24f5f77393f..d3bdc6fa6164 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1539,7 +1539,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");
@@ -1551,7 +1552,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");

Reply via email to