fdo#85912 Delete surrounding text failing for input method calls regression.

When Apache OpenOffice code was merged in, a few lines were removed for
no apparent reason.  This just adds the code back in, and resolves the bug.

See the comments in fdo#85912 for details about this bug.  It is hard for
majority language users to reproduce since they don't use ibus/kmfl to
type their language's letters.

Change-Id: I3963ea0f0eeeab8c8006408a7e229beab1ccf9f6
Reviewed-on: https://gerrit.libreoffice.org/12311
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>