[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.3' - writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Mon Apr 27 06:03:12 PDT 2015


 writerfilter/source/dmapper/DomainMapper.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8961fa8c1a72c81cee091f3e447a0f6cac7f6bea
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Apr 27 14:45:29 2015 +0200

    cp#1000125 DOCX import: fix non-zero para indent
    
    This only affects libreoffice-4-3 and earlier, libreoffice-4-4 and newer
    is unaffected.
    
    The problem is that the document had this XML fragment:
    
        <w:p>
          <w:pPr>
            <w:numPr>
              ...
            </w:numPr>
            <w:ind w:left="0" w:firstLine="0"/>
          </w:pPr>
        </w:p>
    
    The order of generated tokens for the left and firstLine attributes is
    ~random (but with the exact CPLinux config or on Windows, it's
    "firstLine, left"), while it's always "left, firstLine" on newer
    versions, since iterating over the keys of the boost::unordered_map has
    been cleaned up.
    
    When "left" is the later attribute, then the ParaFirstLineIndent
    property should be set in the "left" handler only in case "firstLine"
    did not set it already, so switch off overwriting.
    
    Change-Id: Ifd0f6f7e1e85ac485be326d52b6db89f32d77357

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 44efb59..4784c16 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -439,7 +439,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
                 sal_Int32 nFirstLineIndent = m_pImpl->getCurrentNumberingProperty("FirstLineIndent");
 
                 if (nFirstLineIndent != 0)
-                    m_pImpl->GetTopContext()->Insert(PROP_PARA_FIRST_LINE_INDENT, uno::makeAny(nFirstLineIndent));
+                    m_pImpl->GetTopContext()->Insert(PROP_PARA_FIRST_LINE_INDENT, uno::makeAny(nFirstLineIndent), /*bOverwrite=*/false);
 
                 m_pImpl->GetTopContext()->Insert(
                     PROP_PARA_LEFT_MARGIN, uno::makeAny( ConversionHelper::convertTwipToMM100(nIntValue ) ));


More information about the Libreoffice-commits mailing list