[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - writerfilter/source
Miklos Vajna
vmiklos at suse.cz
Fri Sep 6 04:29:18 PDT 2013
writerfilter/source/dmapper/DomainMapper.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit d1225696aa77afb05b6c289394dd671af8d0b8a3
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Wed Aug 28 11:43:36 2013 +0200
bnc#816593 DOCX import: let w:before not overwrite w:beforeAutospacing
And do the same for w:after / w:afterAutospacing. The spec says that if
w:beforeAutospacing is read, w:before should be ignored, this implies
that if we already had w:beforeAutospacing, w:before should not
overwrite the already existing top margin.
(cherry picked from commit de516780bf2d5f74afe643033bfc528c53013902)
Conflicts:
writerfilter/source/dmapper/DomainMapper.cxx
Change-Id: I9437cb5c6fc352a360e27aa279d0a789706c5578
Reviewed-on: https://gerrit.libreoffice.org/5784
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 f2a06b9..a2b2bce 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -968,13 +968,15 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
break;
case NS_ooxml::LN_CT_Spacing_before:
if (m_pImpl->GetTopContext())
- m_pImpl->GetTopContext()->Insert(PROP_PARA_TOP_MARGIN, true, uno::makeAny( ConversionHelper::convertTwipToMM100( nIntValue ) ));
+ // Don't overwrite NS_ooxml::LN_CT_Spacing_beforeAutospacing.
+ m_pImpl->GetTopContext()->Insert(PROP_PARA_TOP_MARGIN, true, uno::makeAny( ConversionHelper::convertTwipToMM100( nIntValue ) ), false);
break;
case NS_ooxml::LN_CT_Spacing_beforeLines:
break;
case NS_ooxml::LN_CT_Spacing_after:
if (m_pImpl->GetTopContext())
- m_pImpl->GetTopContext()->Insert(PROP_PARA_BOTTOM_MARGIN, true, uno::makeAny( ConversionHelper::convertTwipToMM100( nIntValue ) ));
+ // Don't overwrite NS_ooxml::LN_CT_Spacing_afterAutospacing.
+ m_pImpl->GetTopContext()->Insert(PROP_PARA_BOTTOM_MARGIN, true, uno::makeAny( ConversionHelper::convertTwipToMM100( nIntValue ) ), false);
break;
case NS_ooxml::LN_CT_Spacing_afterLines:
break;
More information about the Libreoffice-commits
mailing list