... in replaceAt(): if the selection that is passed in is invalid, throw
an exception.
This obviously isn't thread-safe but naively adding a GetMutex() guard
quickly deadlocks against SolarMutex; why does it use its own mutex?
Reproduces when installing APSO 1.2.5 and starting the Python REPL.
Change-Id: I4fb16ab820641f1a031537b0c4d6f8664d67dc0c
Reviewed-on: https://gerrit.libreoffice.org/82460
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>