if (desktopService == null) {
Object service = officeConnection
.createService("com.sun.star.frame.Desktop");
XDesktop desktop = (XDesktop) UnoRuntime.queryInterface(
XDesktop.class, service);
desktopService = new DesktopService(desktop, officeConnection);
}
return desktopService;
} catch (Exception exception) {
OfficeApplicationException officeApplicationException = new OfficeApplicationException(
exception.getMessage());