fdo#74702 Return true if graphics is set, cleanup unused variables

If mpGraphics is set, then return true as initialization of graphics
device has already been done. I've also removed unnecessary variables
which were a left over from the function splits.

Change-Id: I25c25b93b9db2c112c9a1aea278b1ec3e0590303
Reviewed-on: https://gerrit.libreoffice.org/8581
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>