tdf#159625: fix "allow to split paragraph"
commit83236587bfca52513515b0b7a7dbfa18eed11503
authorJulien Nabet <serval2412@yahoo.fr>
Sat, 27 Apr 2024 08:52:29 +0000 (27 10:52 +0200)
committerJulien Nabet <serval2412@yahoo.fr>
Sun, 28 Apr 2024 11:38:02 +0000 (28 13:38 +0200)
tree9688384bf9bccf2f62a8e16956d7e893f2873d32
parent5158104b9294ab85ab7a675b5b627469e303c345
tdf#159625: fix "allow to split paragraph"

2 pbs here:
1) bug described in the bugtracker, the uncheck isn't kept
=> just remove all the buggy GetOldItem stuff
2) after unchecked the option then saving the file and reloading the file, the option is still checked
=> change the buggy
rOutSet->Put( SvxFormatSplitItem( eState == TRISTATE_FALSE, _nWhich ) );
to
rOutSet->Put( SvxFormatSplitItem( eState == TRISTATE_TRUE, _nWhich ) );

In fact, I just mimicked the code used for "keep paragraphs" which works well.

Also change the QA test since "allow to split paragraph" is checked by default
so if the QA simulates a click on it, we expect the value to be false when dialog is opened again

Change-Id: I947feb02e0c282304621a252ad5e4c168c1d295a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166774
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
cui/source/tabpages/paragrph.cxx
sw/qa/uitest/writer_tests2/formatParagraph.py