diff options
Diffstat (limited to 'sw/source/filter/ww8/rtfexport.cxx')
-rw-r--r-- | sw/source/filter/ww8/rtfexport.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index eca168e97780..5636e8d7be87 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -708,7 +708,9 @@ void RtfExport::PrepareNewPageDesc( const SfxItemSet* pSet, else if ( pNewPgDesc ) m_pSections->AppendSection( pNewPgDesc, rNd, pFmt, nLnNm ); - AttrOutput().SectionBreak( msword::PageBreak, m_pSections->CurrentSectionInfo() ); + // Don't insert a page break, when we're changing page style just because the next page has to be a different one. + if (!m_pAttrOutput->m_pPrevPageDesc || m_pAttrOutput->m_pPrevPageDesc->GetFollow() != pNewPgDesc) + AttrOutput().SectionBreak( msword::PageBreak, m_pSections->CurrentSectionInfo() ); } bool RtfExport::DisallowInheritingOutlineNumbering( const SwFmt& rFmt ) |