When typing into a protected section (or other read-only area), the code goes through SwEditWin::KeyInput(), which checks for HasReadonlySel(), and calls into sw::DocumentContentOperationsManager::InsertString() in the read-write case.
When typing via ExtTextInput (e.g. Online), then SwEditWin::Command() called into sw::DocumentContentOperationsManager::InsertString() without such a check.
The convention is to do a read-only check in the first Writer function called by vcl, so handle this in SwEditWin::Command(), to have exactly 1 read-only popup on typing a character.
Change-Id: I7d002e7d76bffeb6f16750de735c5bbf13a7bba9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109186
0c03a97fb884 sw edit win: fix read-only selections while handling ExtTextInput
sw/qa/extras/tiledrendering/tiledrendering.cxx | 43 ++++++++++++++++++++++++++
sw/source/uibase/docvw/edtwin.cxx | 10 +++++-
2 files changed, 52 insertions(+), 1 deletion(-)