fdo#74014: Broadcast changes during undo and redo after paste.

Change-Id: I271bbba5e5eb70e48274a4a062d125456af8ff6c
(cherry picked from commit f5d8029a456c2c708cbc2b67f2d7875540dff1ab)
Reviewed-on: https://gerrit.libreoffice.org/7728
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>