Resolves: fdo#72587 make template dialog Modal

(cherry picked from commit 60126254eba8a6a6b94c60b2101ee90986161e24)

Change-Id: Ifb6d7ebbe297d17fc99426b501c92daf8577dd20
Reviewed-on: https://gerrit.libreoffice.org/11978
Reviewed-by: Muthu Subramanian K <muthusuba@gmail.com>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>