log.println( "get presentation" );
XCustomPresentationSupplier oPS = (XCustomPresentationSupplier)
UnoRuntime.queryInterface(
XCustomPresentationSupplier.class, xImpressDoc);
XInterface oObj = oPS.getCustomPresentations();
XSingleServiceFactory oSingleMSF = (XSingleServiceFactory)
UnoRuntime.queryInterface(XSingleServiceFactory.class, oObj);
XInterface oInstance = null;
XInterface oSecondInstance = null;
try{
oInstance = (XInterface) oSingleMSF.createInstance();
oSecondInstance = (XInterface) oSingleMSF.createInstance();
} catch (com.sun.star.uno.Exception e) {
e.printStackTrace(log);