tdf#147583 sw find: fix backwards search for emptyPara/endOfPara
commitd8ff9e1e259f7b11940f76d1055bce3dd44f0844
authorJustin Luth <justin.luth@collabora.com>
Sat, 16 Mar 2024 00:01:39 +0000 (15 20:01 -0400)
committerAron Budea <aron.budea@collabora.com>
Thu, 28 Mar 2024 12:03:03 +0000 (28 22:33 +1030)
tree4732d7373b70dba719950aa57a25b94e244bc8fe
parenteb26913aba35522babb15eee06124d18d4a0cb4e
tdf#147583 sw find: fix backwards search for emptyPara/endOfPara

A comment added 10 years ago thought that it had never worked.

The very last paragraph end cannot be selected manually,
and so of course it can't work in find either.
It didn't work earlier either.

Everything goes ballistic if searching inside comments,
but that would be handled elsewhere anyway I guess.
It didn't work earlier either.

Keeping the search "inside the selection" didn't work earlier either.
That should be fixed now.

make CppunitTest_sw_uiwriter7 \
    CPPUNIT_TEST_NAME=testTdf147583_backwardSearch

Change-Id: I48a72084d277b8c270255de9296a2743162937cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164892
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164982
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
(cherry picked from commit 2f5b9916baaf0017ece84bf867a9e9acfe86d61a)
(cherry picked from commit 098a2536d08a18981032273b55e287bd231dc58e)
sw/qa/extras/uiwriter/data/tdf147583_backwardSearch.odt [new file with mode: 0644]
sw/qa/extras/uiwriter/uiwriter4.cxx
sw/source/core/crsr/findtxt.cxx