Do not reference a dangling OUString

(cherry picked from commit 151f3d665581d887cda1e36b817afb124c5c789e)
Conflicts:
	sw/source/core/unocore/unostyle.cxx

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