refactor assignment out of complex expression

Change-Id: I20dedb69e562869dba90db15e9902e714680bf03
Reviewed-on: https://gerrit.libreoffice.org/12994
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>