diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-06-19 21:43:10 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-06-20 16:05:48 +0200 |
commit | 24446c610a178f77f9a39d2713b9ac90677abd94 (patch) | |
tree | b6eaa833390b77adf71058f0dd05e89085d29d54 /writerfilter | |
parent | 8a2f107e8f8d06850b956b815d9fa414498298b6 (diff) |
tdf#108416 RTF import: fix unexpected bold list numbering
Some paragraph-level run properties affect the current list style since
commit 2123ede032ca64f696ef54af4ad3238974ca2b5d (n#758883 dmapper:
paragraph-level run props should affect numberings as well, 2012-06-19).
This was extended for any run properties in case of RTF since commit
c1f8437dbed0e8b989e41a345ef7e658a6e8a4cd (fdo#83465 RTF import: handle
font of numbering, 2014-09-25), as RTF doesn't really separate the
paragraph-level and the other run properties.
However, field formatting clearly should affect only the field itself,
so disable this mechanism in that context.
(cherry picked from commit 67a0889450daa6b9c9c799dab2d9da3a5044cb5d)
Change-Id: I6df7488e99e44f3ba7e17bf09ce590c88151e043
Reviewed-on: https://gerrit.libreoffice.org/39013
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 0b29a1a5a523..7c496d20e106 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -5289,11 +5289,13 @@ uno::Reference<beans::XPropertySet> DomainMapper_Impl::GetCurrentNumberingCharSt if (!xLevels.is()) { PropertyMapPtr pContext = m_pTopContext; - if (IsRTFImport()) + if (IsRTFImport() && !IsOpenField()) { // Looking up the paragraph context explicitly (and not just taking // the top context) is necessary for RTF, where formatting of a run // and of the paragraph mark is not separated. + // We know that the formatting inside a field won't affect the + // paragraph marker formatting, though. pContext = GetTopContextOfType(CONTEXT_PARAGRAPH); if (!pContext) return xRet; |