• Miklos Vajna's avatar
    tdf#112211 RTF import: fix unwanted direct formatting for left indents · 56a695fd
    Miklos Vajna yazdı
    Commit f528f949 (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.
    
    Change-Id: I6390aa870659a8ad02ba5512d84dea34dba29e9f
    56a695fd
Adı
Son kayıt (commit)
Son güncelleme
..
documentation Loading commit data...
inc Loading commit data...
qa Loading commit data...
source Loading commit data...
util Loading commit data...
CppunitTest_writerfilter_misc.mk Loading commit data...
CppunitTest_writerfilter_rtftok.mk Loading commit data...
CustomTarget_source.mk Loading commit data...
Library_writerfilter.mk Loading commit data...
Makefile Loading commit data...
Module_writerfilter.mk Loading commit data...
README Loading commit data...