{
ex.printStackTrace();
}
final WikiPropDialog aThisDialog = this;
final XDialog xDialogToClose = xDialog;
final XComponentContext xContext = m_xContext;
// start spinning
SetThrobberVisible( true );
SetThrobberActive( true );
// the following method might show a dialog, should be used in main thread
final Hashtable aWikiSettings = m_aSettings.getSettingByUrl( m_sWikiEngineURL );
if ( Helper.AllowThreadUsage( m_xContext ) )
{
m_aThread = new Thread( "com.sun.star.thread.WikiEditorSendingThread" )
{
public void run()
{
try
{
if ( m_aWikiEditor != null )
{
Thread.yield();
m_bAction = m_aWikiEditor.SendArticleImpl( aThisDialog, aWikiSettings );
}
}
finally
{
EnableControls( true );
SetThrobberActive( false );
SetThrobberVisible( false );
ThreadStop( true );
if ( m_bAction )
MainThreadDialogExecutor.Close( xContext, xDialogToClose );
}
}
};
m_aThread.start();
}
else
{
try
{
if ( m_aWikiEditor != null )
{
m_bAction = m_aWikiEditor.SendArticleImpl( aThisDialog, aWikiSettings );
}
} catch( java.lang.Exception e )
{}
finally
{
EnableControls( true );
SetThrobberActive( false );
SetThrobberVisible( false );
if ( m_bAction )
xDialogToClose.endExecute();
}
}
return true;
}