diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-08-15 22:34:13 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-08-17 21:11:15 +0200 |
commit | 6e8c6f08cfc34ab59ef359152725aeae940f2654 (patch) | |
tree | 1446e64a849851ef5016c42377cf7f84edff5388 /writerfilter | |
parent | a0636486e54bf9c8cf35657368e2779792da8b6d (diff) |
tdf#107480 RTF import: fix HTML automatic spacing in styles
\htmautsp changes the meaning of \sbauto and \saauto, but the auto
keywords may appear early in style definitions before \htmautsp arrives.
This wasn't a problem before commit
1be0a3fa9ebb22b607c54b47739d4467acfed259 (n#825305: writerfilter RTF
import: override style properties like Word, 2014-06-17), as there the
right auto keyword interpretation was repeated as direct formatting.
So fix the regression by not deduplicating these keywords, which brings
back the correct layout. A larger rework is necessary in the future to
delay the parsing of the stylesheet table, that would be a cleaner
approach.
(cherry picked from commit 9dd82d0d68065ab95e20a1a489f4130299a8669e)
Change-Id: I783d2175483bc80ead0a511ad15c4b75e4ab663c
Reviewed-on: https://gerrit.libreoffice.org/41203
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/rtftok/rtfsprm.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfsprm.cxx b/writerfilter/source/rtftok/rtfsprm.cxx index a1d0605a248b..7d0129cf2b5f 100644 --- a/writerfilter/source/rtftok/rtfsprm.cxx +++ b/writerfilter/source/rtftok/rtfsprm.cxx @@ -168,6 +168,10 @@ static bool isSPRMDeduplicateBlacklist(Id nId) // possibly from the numbering. case NS_ooxml::LN_CT_Ind_left: case NS_ooxml::LN_CT_Ind_right: + // \htmautsp arrives after the style table, so only the non-style value is + // correct, keep these. + case NS_ooxml::LN_CT_Spacing_beforeAutospacing: + case NS_ooxml::LN_CT_Spacing_afterAutospacing: return true; default: |