diff options
author | obo <obo@openoffice.org> | 2010-06-16 12:49:04 +0200 |
---|---|---|
committer | obo <obo@openoffice.org> | 2010-06-16 12:49:04 +0200 |
commit | 7f0993d43019a0ccb7f89c11fc23704c063b902f (patch) | |
tree | 07b5d34f293ad27917bf6d846e0e3418218b9b01 | |
parent | 990ef886211196e7c1de0881fd78fc02bebf9073 (diff) |
masterfix: #i10000# dispatchCommand,DispatchInfo missing
Notes
Notes:
split repo tag: libs-gui_ooo/DEV300_m83
-rw-r--r-- | svtools/source/uno/toolboxcontroller.cxx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx index bac34d2baf1c..92ae93f5080d 100644 --- a/svtools/source/uno/toolboxcontroller.cxx +++ b/svtools/source/uno/toolboxcontroller.cxx @@ -751,6 +751,25 @@ const rtl::OUString& ToolboxController::getModuleName() const return m_pImpl->m_sModuleName; } +void ToolboxController::dispatchCommand( const OUString& sCommandURL, const Sequence< PropertyValue >& rArgs ) +{ + try + { + Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY_THROW ); + URL aURL; + aURL.Complete = sCommandURL; + getURLTransformer()->parseStrict( aURL ); + + Reference< XDispatch > xDispatch( xDispatchProvider->queryDispatch( aURL, OUString(), 0 ), UNO_QUERY_THROW ); + + Application::PostUserEvent( STATIC_LINK(0, ToolboxController_Impl, ExecuteHdl_Impl), new DispatchInfo( xDispatch, aURL, rArgs ) ); + + } + catch( Exception& ) + { + } +} + // //------------------------------------------------------------------------- // XPropertySet by shizhoubo @@ -815,6 +834,15 @@ throw( com::sun::star::uno::Exception) } } +//-------------------------------------------------------------------- + +IMPL_STATIC_LINK_NOINSTANCE( ToolboxController_Impl, ExecuteHdl_Impl, DispatchInfo*, pDispatchInfo ) +{ + pDispatchInfo->mxDispatch->dispatch( pDispatchInfo->maURL, pDispatchInfo->maArgs ); + delete pDispatchInfo; + return 0; +} + void ToolboxController::enable( bool bEnable ) { ToolBox* pToolBox = 0; |