bnc#529470: I can't remove a path in AutoText dialog

This is, not surprisingly, somewhat weird code, but I think this patch does
what is necessary, it does fix the bug.

Change-Id: Ie1947b311f1455ba48a904f5ef42ad92899fac31
Reviewed-on: https://gerrit.libreoffice.org/11031
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>