diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-09-22 08:47:03 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-10-17 23:22:37 +0200 |
commit | fd4a84be252178f8f2738ed405dd6d52454ba6b1 (patch) | |
tree | 3a45c2acbdd5e5cbbedb74a272d49b239ec2a50f /writerfilter | |
parent | 4d1cb6b42135df1200d69b98b84c7a1dd21b5c61 (diff) |
tdf#92454 DOCX import: allow overriding para prop from num style in para style
Word has a feature like this: a paragraph style can refer to a numbering
style, and both can specify paragraph margins. If that's the case, then
the ones from the paragraph style has priority.
In Writer, the numbering style has priority, so the only chance for
correct import result is to set the margin directly on the paragraph in
this case.
(cherry picked from commit f4badd9a485f32f787d78431ed673e2932973887)
Conflicts:
sw/qa/extras/ooxmlimport/ooxmlimport.cxx
Conflicts:
sw/qa/extras/ooxmlimport/ooxmlimport.cxx
Change-Id: Iff3b03bcc56e0db3a48452c293acf41c91b8f159
Reviewed-on: https://gerrit.libreoffice.org/18794
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit d14c7b034d75730a85b5f6f843e39ff79840c272)
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index f7ef2266ea0b..3868d746c4ea 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -2039,6 +2039,13 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext ) rContext->Insert(PROP_PARA_RIGHT_MARGIN, uno::makeAny(nParaRightMargin)); } + + // Indent properties from the paragraph style have priority + // over the ones from the numbering styles in Word, not in + // Writer. + boost::optional<PropertyMap::Property> oProperty; + if (pStyleSheetProperties && (oProperty = pStyleSheetProperties->getProperty(PROP_PARA_FIRST_LINE_INDENT))) + rContext->Insert(PROP_PARA_FIRST_LINE_INDENT, oProperty->second); } if( pStyleSheetProperties && pStyleSheetProperties->GetListLevel() >= 0 ) |