[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - writerfilter/source

Miklos Vajna vmiklos at suse.cz
Fri Sep 6 04:28:47 PDT 2013


 writerfilter/source/dmapper/DomainMapper.cxx |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit ea6000028d0aa2e9d1c24d4d84defc72d5cf81da
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Wed Aug 28 11:24:07 2013 +0200

    bnc#816593 DOCX import: fix auto para spacing without compat option
    
    Paragraph auto spacing (before and after) without the
    w:doNotUseHTMLParagraphAutoSpacing compat option was incorrect.
    
    (cherry picked from commit 279ff2e03371542d014bf281e73282ba8080cf6b)
    
    Conflicts:
    	writerfilter/source/dmapper/DomainMapper.cxx
    
    Change-Id: I56d6153f7c489de7fceaf6fab7325c42ee8f9cae
    Reviewed-on: https://gerrit.libreoffice.org/5783
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index fb4786e..f2a06b9 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1153,17 +1153,16 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
                              uno::makeAny( aLocale ) );
         }
         break;
-// This is the value when the compat option is not enabled. No idea where it comes from, the spec doesn't mention it.
-#define AUTO_PARA_SPACING sal_Int32(49)
+        // See SwWW8ImplReader::GetParagraphAutoSpace() on why these are 100 and 280
         case NS_ooxml::LN_CT_Spacing_beforeAutospacing:
             if (!m_pImpl->GetSettingsTable()->GetDoNotUseHTMLParagraphAutoSpacing())
-                m_pImpl->GetTopContext()->Insert( PROP_PARA_TOP_MARGIN, false, uno::makeAny( AUTO_PARA_SPACING ) );
+                m_pImpl->GetTopContext()->Insert( PROP_PARA_TOP_MARGIN, false, uno::makeAny( ConversionHelper::convertTwipToMM100(280) ) );
             else
                 m_pImpl->GetTopContext()->Insert( PROP_PARA_TOP_MARGIN, false, uno::makeAny( ConversionHelper::convertTwipToMM100(100) ) );
         break;
         case NS_ooxml::LN_CT_Spacing_afterAutospacing:
             if (!m_pImpl->GetSettingsTable()->GetDoNotUseHTMLParagraphAutoSpacing())
-                m_pImpl->GetTopContext()->Insert( PROP_PARA_BOTTOM_MARGIN, false, uno::makeAny( AUTO_PARA_SPACING ) );
+                m_pImpl->GetTopContext()->Insert( PROP_PARA_BOTTOM_MARGIN, false, uno::makeAny( ConversionHelper::convertTwipToMM100(280) ) );
             else
                 m_pImpl->GetTopContext()->Insert( PROP_PARA_BOTTOM_MARGIN, false, uno::makeAny( ConversionHelper::convertTwipToMM100(100) ) );
         break;


More information about the Libreoffice-commits mailing list