logger.trace("Bootstrap OK");
XMultiComponentFactory xMCF = xContext.getServiceManager();
logger.trace("ServiceManager OK");
Object desktop = xMCF.createInstanceWithContext(
"com.sun.star.frame.Desktop", xContext);
XComponentLoader loader = unoCast(XComponentLoader.class, desktop);
String internalLocation = getSupportedLocation(location, xContext);
// internalLocation = correctLocation;
if (logger.isDebugEnabled()) {
logger.debug("Chargement du fichier : " + internalLocation);
}
String mode;
if (hidden) {
mode = "_hidden";
} else {
mode = "_default";
}
XComponent component = loader.loadComponentFromURL(
internalLocation, mode, 0, null);
if (component == null) {
throw new ImpressException("Probleme de chargement du fichier "
+ internalLocation);