[Libreoffice-commits] .: writerfilter/source

Miklos Vajna vmiklos at kemper.freedesktop.org
Wed Jun 27 08:29:26 PDT 2012


 writerfilter/source/dmapper/DomainMapper.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 1fdd61db155cf63d5dd55cc2bfb45af33796e131
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Wed Jun 27 16:59:24 2012 +0200

    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

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 5ecceba..ac52d07 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


More information about the Libreoffice-commits mailing list