Refactor some code for handling redline in DOCX importer

Change-Id: Id5d0814c1ebbcd85507d11cf562d394a748773a6
Reviewed-on: https://gerrit.libreoffice.org/7807
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>