Use parameters instead of static access when possible

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