tdf#108518 revert OOo hack: Fix issue #i119405: Numbering text style
commit343d4d32f00053bd72cfe240125835fe25ce264f
authorJustin Luth <justin.luth@collabora.com>
Thu, 11 Mar 2021 06:41:53 +0000 (11 08:41 +0200)
committerMichael Stahl <michael.stahl@allotropia.de>
Mon, 14 Jun 2021 08:57:47 +0000 (14 10:57 +0200)
tree1a97ba687c5715a49b958352c80e4559c5cf56d9
parent859978445daeb848d033f64736709503ec44a7bb
tdf#108518 revert OOo hack: Fix issue #i119405: Numbering text style

...changed after importing the *.doc
2012 commit 1c22545edf9085b9f2656ca92781158b6b123db3

This hack has been made irrelevant by layout support for
copying paragraph CR formatting to the numbering.
It can be improved even more for DOC by supporting
RES_PARATR_LIST_AUTOFMT.

The OOo guys who made this knew it was a hack.
They document in https://bz.apache.org/ooo/show_bug.cgi?id=119405#c11
> Negative Impact:
> Although most common user scenarios can be met by the solution,
> there are still negative impacts. Because the attributes of
> paragraph end mark(0x0D) will be set to the character style
> binding to the given level of a number rule,
> it will have the global impact.
> Other paragraphs that are applied with the same number rule's
> level will also be changed.
> Generally, MS Word users will have their numbering/bullets
> the same attributes/style when using the same level's
> of number rule, correspondingly,the impacted scenarios are rarely.

So, the bad thing that was happening was that any paragraph's
CR formatting could change every instance of the numbering level's
formatting - not just that one paragraph's number.
The first instance of the defined formatting won.

tdf#133410: Also, it spammed a new char style
for every numbering level.

This patch depends on an earlier commit. The unit test ensures
that this earlier commit exists. It was the only example I found
where reverting the hack failed.

Change-Id: I43b88b8219c9dbc882f57d1a282749d7c0ab2a19
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112320
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
13 files changed:
sw/inc/IDocumentContentOperations.hxx
sw/inc/ndtxt.hxx
sw/qa/extras/ww8export/data/tdf108518_CRnumformatting.doc [new file with mode: 0644]
sw/qa/extras/ww8export/ww8export3.cxx
sw/source/core/doc/DocumentContentOperationsManager.cxx
sw/source/core/inc/DocumentContentOperationsManager.hxx
sw/source/core/txtnode/thints.cxx
sw/source/core/unocore/unoidx.cxx
sw/source/filter/basflt/fltshell.cxx
sw/source/filter/inc/fltshell.hxx
sw/source/filter/ww8/ww8par.cxx
sw/source/filter/ww8/ww8par.hxx
sw/source/filter/ww8/ww8par3.cxx