tdf#167930 wina11y: Keep caret pos when removing selection

This is the Windows version of

    Change-Id: Ieca9dff66eef366bf2a3845e5fdb53b3bfa70df9
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Aug 14 11:19:14 2025 +0200

        tdf#167930 gtk3 a11y: Keep caret pos when removing selection

Change-Id: I3cc3fb781ffc036d7f4df4552aee766378fdb0c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189581
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
Michael Weghorn
2025-08-14 15:44:11 +02:00
parent d540577625
commit cf118143d6
@@ -616,7 +616,8 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTextBase::removeSelection(long selectionIn
}
else
{
pRXText->setSelection(0, 0);
const sal_Int32 nCaretPos = pRXText->getCaretPosition();
pRXText->setSelection(nCaretPos, nCaretPos);
return S_OK;
}