diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-09-19 09:17:25 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-09-26 17:44:31 +0200 |
commit | c324c0aa25d35e1f580079c80d40b80cd4bc3bf3 (patch) | |
tree | 5dc6c3ee66a7d13d27dd03049706980b8add1a2a /sw/UIConfig_sglobal.mk | |
parent | ef9ac6e14cf2a5446136c2d4b3daf28418f56351 (diff) |
tdf#112211 RTF import: fix unwanted direct formatting for left indents
This is a combination of 2 commits:
1st commit:
Related: tdf#112211 DOCX import: fix handling of missing first ind in <w:lvl>
Usually a DOCX numbering definition has multiple levels, each level
containing a <w:ind ... w:hanging="..."/> element. When this is missing,
we should default to the Word default, not to the Writer one.
This makes the DOCX version of tdf#106953 imported correctly, in
preparation of dropping the original fix that helped RTF only.
[ The DOC version of the bugdoc is still not imported correctly. ]
Reviewed-on: https://gerrit.libreoffice.org/42447
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
(cherry picked from commit c72a1a74b5b1064fc9cdf9994b11fce26d866e26)
Commit #2:
Commit f528f9499bd91b700c549575e88fa102cfffede9 (tdf#106953 RTF import:
fix missing paragraph left margin, 2017-05-16) fixed a problem around
inheriting indents from numbering styles vs paragraph styles, but it
turns out that document was rather special and in general the old
behavior was correct. So fix that bug in a different way again, this
time without less side-effects.
The trick is that in case the level numbers group in a list definition
ends with \u59 (instead of an ASCII ';'), then that group is considered
to be invalid by Word. RTF import already was aware of this, but it
wasn't known that when this invalid state is reached, that also means
that the indents of the list level definitions should be ignored. So in
general not putting direct formatting on a paragraph is a good thing:
that way in case the paragraph style and the number style both has
indent infos, then the numbering style wins, and that is what we want --
but in case \u59 appears in the list definition, then the indentation
from the numbering style should be ignored.
So fix up the tokenizer to import the indentation from list levels in
general, ignore it for invalid list levels, and then we can remove the
direct formatting from the paragraphs, which fixes this bug and keeps
the old one fixed as well.
This required fixing up two poor testcases, which tested paragraph
properties, but in fact are interested in the real source of
indentation, which is now the numbering style. Visually both bugdocs are
unchanged.
(cherry picked from commit 56a695fddb915bcba13b088b5b2b4e0841d4acbc)
Conflicts:
sw/qa/extras/rtfexport/rtfexport2.cxx
writerfilter/source/dmapper/NumberingManager.cxx
Change-Id: I6390aa870659a8ad02ba5512d84dea34dba29e9f
Reviewed-on: https://gerrit.libreoffice.org/42793
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw/UIConfig_sglobal.mk')
0 files changed, 0 insertions, 0 deletions