summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-06-27 16:59:24 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-06-27 17:30:42 +0200
commit1fdd61db155cf63d5dd55cc2bfb45af33796e131 (patch)
tree36c31f033f85b2161954c33809ff7b0e47d0fc16
parentb709845e27db0f439c430c9ebe3c2884dbc48789 (diff)
n#693238 dmapper: fix margin values vs SBkc = 0 at the end of the doc
The problem was that a continous section break at the end of the document caused the section margins to be ignored. Just ignoring the continous section break (only in case it's at the end of the document) makes the problem go away. The original fix was commit cd1c434c4bd4756fa1355e906cb2e8de4aae0618, but it got reverted in commit 2dee7d6205832a1212790ac1ab168a6b6fce686d, as it caused fdo#44292. This second attempt fixes the original bug again, without introducing the "4 columns" bug. Change-Id: I75d612430a5cd631dec0d224127cba580070900d
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 5ecceba11cc5..ac52d070fa05 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2369,7 +2369,12 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
*/
OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
if(pSectionContext)
- pSectionContext->SetBreakType( nIntValue );
+ {
+ // Ignore continous section break at the end of the document
+ // It makes the importer loose margin settings with no benefit
+ if (m_pImpl->GetParaSectpr() || nIntValue != 0)
+ pSectionContext->SetBreakType( nIntValue );
+ }
break;
case 143:
case NS_sprm::LN_SFTitlePage: // sprmSFTitlePage