m_aSettings = Settings.getSettings(m_xContext);
try
{
Object obj;
obj = xMCF.createInstanceWithContext("com.sun.star.awt.DialogProvider2", m_xContext );
XDialogProvider2 xDialogProvider = (XDialogProvider2) UnoRuntime.queryInterface( XDialogProvider2.class, obj );
m_xDialog = xDialogProvider.createDialogWithHandler( DialogURL, this );
m_xControlContainer = (XControlContainer)UnoRuntime.queryInterface( XControlContainer.class, m_xDialog );
XTopWindow xTopWindow = (XTopWindow)UnoRuntime.queryInterface( XTopWindow.class, m_xDialog );
if ( xTopWindow != null )
xTopWindow.addTopWindowListener( this );
}