Use template function to reduce copy'n'pasta code
Use template function to reduce copy'n'pasta code

Change-Id: I22964bfcfb80a3e97903674dbf71a1b7be3a0920
Reviewed-on: https://gerrit.libreoffice.org/16308
Tested-by: Jenkins <5a4fe08359c7f97380e408c717ef42c86939cd86@libreoffice.org>
Reviewed-by: Caolán McNamara <301f5784f9f6aac04077f24f1e5abc31af69d401@redhat.com>
Tested-by: Caolán McNamara <301f5784f9f6aac04077f24f1e5abc31af69d401@redhat.com>

JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core