summaryrefslogtreecommitdiff
path: root/sfx2/source/inet/inettbc.cxx
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2005-01-27 09:18:43 +0000
committerRüdiger Timm <rt@openoffice.org>2005-01-27 09:18:43 +0000
commit9a7e3bb552d4c2078353e0e9496c0eaf27d21b82 (patch)
tree2af26180b89f0a73043ce29ca28d0eef993f3383 /sfx2/source/inet/inettbc.cxx
parent29793ad3fd8a3008fe4fbacbb4cd74335cf577d8 (diff)
INTEGRATION: CWS cd04 (1.27.174); FILE MERGED
2005/01/25 10:20:52 cd 1.27.174.1: #i40980# Use asynchronous dispatch to fix VCL reentrance problem
Diffstat (limited to 'sfx2/source/inet/inettbc.cxx')
-rw-r--r--sfx2/source/inet/inettbc.cxx30
1 files changed, 27 insertions, 3 deletions
diff --git a/sfx2/source/inet/inettbc.cxx b/sfx2/source/inet/inettbc.cxx
index 75a5d9e8d272..046988648282 100644
--- a/sfx2/source/inet/inettbc.cxx
+++ b/sfx2/source/inet/inettbc.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: inettbc.cxx,v $
*
- * $Revision: 1.27 $
+ * $Revision: 1.28 $
*
- * last change: $Author: rt $ $Date: 2004-09-09 09:55:13 $
+ * last change: $Author: rt $ $Date: 2005-01-27 10:18:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -189,11 +189,35 @@ void SfxURLToolBoxControl_Impl::OpenURL( const String& rName, BOOL bNew ) const
aArgs[3].Value = makeAny( OUString( aFilter ));
}
- xDispatch->dispatch( aTargetURL, aArgs );
+ SfxURLToolBoxControl_Impl::ExecuteInfo* pExecuteInfo = new SfxURLToolBoxControl_Impl::ExecuteInfo;
+ pExecuteInfo->xDispatch = xDispatch;
+ pExecuteInfo->aTargetURL = aTargetURL;
+ pExecuteInfo->aArgs = aArgs;
+ Application::PostUserEvent( STATIC_LINK( 0, SfxURLToolBoxControl_Impl, ExecuteHdl_Impl), pExecuteInfo );
}
}
}
+//--------------------------------------------------------------------
+
+IMPL_STATIC_LINK( SfxURLToolBoxControl_Impl, ExecuteHdl_Impl, ExecuteInfo*, pExecuteInfo )
+{
+ try
+ {
+ // Asynchronous execution as this can lead to our own destruction!
+ // Framework can recycle our current frame and the layout manager disposes all user interface
+ // elements if a component gets detached from its frame!
+ pExecuteInfo->xDispatch->dispatch( pExecuteInfo->aTargetURL, pExecuteInfo->aArgs );
+ }
+ catch ( Exception& )
+ {
+ }
+
+ delete pExecuteInfo;
+ return 0;
+}
+
+
Window* SfxURLToolBoxControl_Impl::CreateItemWindow( Window* pParent )
{
SvtURLBox* pURLBox = new SvtURLBox( pParent );