fdo#66232 fix opening files via COM server

Thanks to Noel Grandin & Stephan Bergmann for the hint on IRC.

Change-Id: I2b407a53b02a7ecdbff553ad47674c1e00455180
Reviewed-on: https://gerrit.libreoffice.org/6721
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>