diff options
author | Justin Luth <justin_luth@sil.org> | 2016-07-04 21:39:37 +0300 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2016-10-10 19:02:57 +0200 |
commit | 9fae9fd2e156dc1c2790dd402787e62d94b96d6e (patch) | |
tree | 0762a7cfdc189d1e4cbbc55a0b62e5c33173d80c /writerfilter | |
parent | 4b2370b41b2e93979979be7f4d0b248174730982 (diff) |
tdf#64372 docx import: don't ignore continuous section break
If the previous break was also a continuous section break,
this break was simply ignored ever since
commit 1fdd61db155cf63d5dd55cc2bfb45af33796e131.
Thus, the default handler took over and assigned PROP_PAGE_DESC
if there was some kind of page style known
(either the first page/Standard defaults or any "converted" styles
that had been created) which effectively became a new page break.
Reviewed-on: https://gerrit.libreoffice.org/26567
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
(cherry picked from commit a60b2f7c227709d27d6294558fd396557a9ffd20)
Change-Id: I839570b0330ba274552cc671014e997c42765f4b
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 0dc8a651792f..ae201aaa797e 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -1722,17 +1722,9 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext ) OSL_ENSURE(pSectionContext, "SectionContext unavailable!"); if(pSectionContext) { - // Ignore continuous section break at the end of the document, if the previous section had the same type as well - // It makes the importer lose margin settings with no benefit + //continuous break only allowed if it is not the only section break SectionPropertyMap* pLastContext = m_pImpl->GetLastSectionContext(); - int nPrevBreakType = NS_ooxml::LN_Value_ST_SectionMark_continuous; - bool bHasPrevSection = false; - if (pLastContext) - { - bHasPrevSection = true; - nPrevBreakType = pLastContext->GetBreakType(); - } - if (m_pImpl->GetParaSectpr() || nIntValue != static_cast<sal_Int32>(NS_ooxml::LN_Value_ST_SectionMark_continuous) || (bHasPrevSection && nPrevBreakType != nIntValue)) + if ( nIntValue != static_cast<sal_Int32>(NS_ooxml::LN_Value_ST_SectionMark_continuous) || pLastContext || m_pImpl->GetParaSectpr() ) pSectionContext->SetBreakType( nIntValue ); } break; |