summaryrefslogtreecommitdiffstats
path: root/sw/source/filter/ww8/rtfattributeoutput.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-09-24 07:40:14 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-09-24 07:40:58 +0200
commit0d7d6f242ef87c976095d22a7f5ebf751ba77ad8 (patch)
tree1ad3cb45e42b68caf18eefd18aa2c91dc796aee1 /sw/source/filter/ww8/rtfattributeoutput.cxx
parentdesktop: missing header guard (diff)
downloadcore-0d7d6f242ef87c976095d22a7f5ebf751ba77ad8.tar.gz
core-0d7d6f242ef87c976095d22a7f5ebf751ba77ad8.zip
Related: tdf#92521 RTF export: handle section break right after a table
Change-Id: Ibb6e612165ec6e5d771bdf9efa13a88a72233d6f
Diffstat (limited to 'sw/source/filter/ww8/rtfattributeoutput.cxx')
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 83219e973ced..3c9c5b508545 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -316,12 +316,12 @@ void RtfAttributeOutput::EmptyParagraph()
void RtfAttributeOutput::SectionBreaks(const SwNode& rNode)
{
+ SwNodeIndex aNextIndex(rNode, 1);
if (rNode.IsTextNode())
{
OSL_ENSURE(m_aStyles.getLength() == 0, "m_aStyles is not empty");
// output page/section breaks
- SwNodeIndex aNextIndex(rNode, 1);
m_rExport.Strm().WriteCharPtr(m_aSectionBreaks.makeStringAndClear().getStr());
m_bBufferSectionBreaks = true;
@@ -344,6 +344,17 @@ void RtfAttributeOutput::SectionBreaks(const SwNode& rNode)
}
m_bBufferSectionBreaks = false;
}
+ 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.
+ const SwTextNode* pTextNode = aNextIndex.GetNode().GetTextNode();
+ m_rExport.OutputSectionBreaks(pTextNode->GetpSwAttrSet(), *pTextNode);
+ }
+ }
}
void RtfAttributeOutput::StartParagraphProperties()