diff options
-rw-r--r-- | include/sfx2/mnuitem.hxx | 9 | ||||
-rw-r--r-- | sfx2/source/menu/mnuitem.cxx | 15 |
2 files changed, 12 insertions, 12 deletions
diff --git a/include/sfx2/mnuitem.hxx b/include/sfx2/mnuitem.hxx index 8e5e0cdcc1ef..3f6586fd8266 100644 --- a/include/sfx2/mnuitem.hxx +++ b/include/sfx2/mnuitem.hxx @@ -120,15 +120,6 @@ inline SfxVirtualMenu* SfxMenuControl::GetPopupMenu() const { SfxMenuControl::RegisterMenuControl( pMod, new SfxMenuCtrlFactory( \ Class::CreateImpl, TYPE(nItemClass), nSlotId ) ); } -struct ExecuteInfo -{ - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatch; - ::com::sun::star::util::URL aTargetURL; - ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aArgs; - - DECL_STATIC_LINK( ExecuteInfo, ExecuteHdl_Impl, ExecuteInfo* ); -}; - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx index c3daef0afe64..9d10b93ddf4f 100644 --- a/sfx2/source/menu/mnuitem.cxx +++ b/sfx2/source/menu/mnuitem.cxx @@ -327,6 +327,15 @@ SfxUnoMenuControl::~SfxUnoMenuControl() pUnoCtrl->release(); } +struct MenuExecuteInfo +{ + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatch; + ::com::sun::star::util::URL aTargetURL; + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aArgs; + + DECL_STATIC_LINK( MenuExecuteInfo, ExecuteHdl_Impl, MenuExecuteInfo* ); +}; + sal_IntPtr Select_Impl( void* /*pHdl*/, void* pVoid ) { Menu* pMenu = static_cast<Menu*>(pVoid); @@ -360,17 +369,17 @@ sal_IntPtr Select_Impl( void* /*pHdl*/, void* pVoid ) if ( xDisp.is() ) { - ExecuteInfo* pExecuteInfo = new ExecuteInfo; + MenuExecuteInfo* pExecuteInfo = new MenuExecuteInfo; pExecuteInfo->xDispatch = xDisp; pExecuteInfo->aTargetURL = aTargetURL; pExecuteInfo->aArgs = Sequence< PropertyValue >(); - Application::PostUserEvent( LINK( 0, ExecuteInfo, ExecuteHdl_Impl), pExecuteInfo ); + Application::PostUserEvent( LINK( 0, MenuExecuteInfo, ExecuteHdl_Impl), pExecuteInfo ); } return sal_IntPtr(true); } -IMPL_STATIC_LINK_NOINSTANCE( ExecuteInfo, ExecuteHdl_Impl, ExecuteInfo*, pExecuteInfo ) +IMPL_STATIC_LINK_NOINSTANCE( MenuExecuteInfo, ExecuteHdl_Impl, MenuExecuteInfo*, pExecuteInfo ) { pExecuteInfo->xDispatch->dispatch( pExecuteInfo->aTargetURL, pExecuteInfo->aArgs ); delete pExecuteInfo; |