From 59d8dde3fc9a4dc653e43efb8552efc4ab3efc92 Mon Sep 17 00:00:00 2001 From: Adam Co Date: Sun, 21 Jul 2013 16:27:45 +0300 Subject: fdo#66145 DOCX export: fix not-well-formed output Reviewed-on: https://gerrit.libreoffice.org/5002 Reviewed-by: Fridrich Strba Tested-by: Fridrich Strba (partially cherry picked from commit 2d5978b22b402dea9dee5b468d2044ccc1208a15) Change-Id: Id8cc3829ccd5806295b0f240a570dc1d66ed0c87 Signed-off-by: Miklos Vajna --- sw/source/filter/ww8/docxattributeoutput.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 0e2ee5e8969e..d7c008fac99a 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -419,7 +419,9 @@ void DocxAttributeOutput::StartParagraphProperties( const SwTxtNode& rNode ) if ( aNextIndex.GetNode().IsTxtNode() ) { const SwTxtNode* pTxtNode = static_cast< SwTxtNode* >( &aNextIndex.GetNode() ); - m_rExport.OutputSectionBreaks( pTxtNode->GetpSwAttrSet(), *pTxtNode ); + // If next node has no string - it is an empty node, so no need to output the section break + if (!pTxtNode->GetTxt().isEmpty()) + m_rExport.OutputSectionBreaks( pTxtNode->GetpSwAttrSet(), *pTxtNode ); } else if ( aNextIndex.GetNode().IsTableNode() ) { -- cgit v1.2.3