summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2016-10-06 16:53:23 +0300
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-10-10 06:27:40 +0000
commit7060c7b642fdc0a369505e430652ee44205e7eed (patch)
treec0e7ce2ac49a82d6910b0127f5d90914e1ffbf64 /sw/source/filter
parent8bfbd7fbd74b69959929e29df3c99aa22ec13ca5 (diff)
tdf#95367 DOCX: allow r-t of changed first/follow sections
Change-Id: Ibb97411a7dfeebc3edbdd149842bfe626942cf7f Reviewed-on: https://gerrit.libreoffice.org/29559 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/source/filter')
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx6
-rw-r--r--sw/source/filter/ww8/docxexport.cxx4
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx4
3 files changed, 11 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 62e8e8f5ec6c..582e8cde7b92 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -821,13 +821,13 @@ void DocxAttributeOutput::SectionBreaks(const SwNode& rNode)
}
else if (rNode.IsEndNode())
{
- // End of something: make sure that it's the end of a table.
- assert(rNode.StartOfSectionNode()->IsTableNode());
if (aNextIndex.GetNode().IsTextNode())
{
// Handle section break between a table and a text node following it.
+ // Also handle section endings
const SwTextNode* pTextNode = aNextIndex.GetNode().GetTextNode();
- m_rExport.OutputSectionBreaks(pTextNode->GetpSwAttrSet(), *pTextNode, m_tableReference->m_bTableCellOpen, pTextNode->GetText().isEmpty());
+ if (rNode.StartOfSectionNode()->IsTableNode() || rNode.StartOfSectionNode()->IsSectionNode())
+ m_rExport.OutputSectionBreaks(pTextNode->GetpSwAttrSet(), *pTextNode, m_tableReference->m_bTableCellOpen, pTextNode->GetText().isEmpty());
}
}
}
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index e19cf1990ab2..05459deb461e 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -509,6 +509,10 @@ void DocxExport::OutputEndNode( const SwEndNode& rEndNode )
AttrOutput().SectionBreak( msword::PageBreak, m_pSections->CurrentSectionInfo( ) );
m_pSections->AppendSection( m_pAktPageDesc, pParentFormat, nRstLnNum );
}
+ else
+ {
+ AttrOutput().SectionBreaks( rEndNode );
+ }
}
else if (TXT_MAINTEXT == m_nTextTyp && rEndNode.StartOfSectionNode()->IsTableNode())
// End node of a table: see if a section break should be written after the table.
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 63324ec652e6..224f961d0f9e 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -2735,6 +2735,10 @@ void MSWordExportBase::WriteText()
AppendSection( m_pAktPageDesc, pParentFormat, nRstLnNum );
}
+ else
+ {
+ OutputEndNode( *rNd.GetEndNode() );
+ }
}
}
else if ( rNd.IsStartNode() )