Use reference instead of pointer

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