tdf#93875 sw viewsrch: avoid bogus found selection from UnSelectFrame

In the Quick Find or Find&Replace dialog, after a match is found,
then if some frame had the selection,
then the visible selection is changed to cover the match.

However, UnSelectFrame actually sets the cursor as it disengages.
Well, we don't care about that cursor change,
so just drop it and restore the match-selection.

Change-Id: If5d7968f4541954defeead39306be685c872a73e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208129
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
This commit is contained in:
Justin Luth
2026-07-15 13:34:18 +02:00
parent becb1c338e
commit ad9ed8a247
+2
View File
@@ -517,8 +517,10 @@ bool SwView::SearchAndWrap(bool bApi)
s_bFound = true;
if(m_pWrtShell->IsSelFrameMode())
{
m_pWrtShell->Push(); // push the 'found' cursor to the stack
m_pWrtShell->UnSelectFrame();
m_pWrtShell->LeaveSelFrameMode();
m_pWrtShell->Pop(SwCursorShell::PopMode::DeleteCurrent); // restore stack cursor
}
m_pWrtShell->Pop();
m_pWrtShell->EndAllAction();