From 893d3ed1b6d83775df277825f07bf3d47f721004 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Mon, 23 Nov 2009 16:33:39 +0000 Subject: CWS-TOOLING: integrate CWS fwk125 2009-11-19 08:11:20 +0100 jsk r277554 : fwk125: #i105760# - removed warnlog, re-enabled autotest e_help.bas 2009-11-16 16:21:49 +0100 tl r277521 : #i106571# fixed locale list for dictionaries to get rid of duplicate entries 2009-11-12 08:47:31 +0100 hde r277469 : rework of hyphenation 2009-11-11 15:25:16 +0100 hde r277462 : rework of hyphenation 2009-11-11 15:24:09 +0100 hde r277461 : rework of hyphenation 2009-11-11 13:52:02 +0100 hde r277453 : new include for hyphenation tools 2009-11-10 12:28:51 +0100 tl r277427 : #i102304# fix for hyphenation dialog 2009-11-10 12:00:10 +0100 mav r277425 : #i10000# A workaround for pch and windows headers conflict 2009-11-10 11:58:32 +0100 mav r277424 : #i10000# A workaround for pch and windows headers conflict 2009-11-09 15:47:59 +0100 kso r277414 : #i16732# fixed url matching. 2009-11-09 11:51:40 +0100 mav r277406 : #i10000# use precompiled headers 2009-11-08 23:53:03 +0100 mav r277399 : #i10000# fix warning 2009-11-08 23:50:23 +0100 mav r277398 : #i10000# adapt for unix 2009-11-08 23:49:52 +0100 mav r277397 : #i10000# adapt for unix 2009-11-08 21:26:06 +0100 mav r277396 : CWS-TOOLING: rebase CWS fwk125 to branches/OOO320@277373 (milestone: OOO320:m4) 2009-11-06 16:30:27 +0100 ab r277394 : #i106100# Hold references to packages to speed up further calls to getDeployedPackages() 2009-11-06 15:58:48 +0100 mav r277392 : #i102464# check the Windows ACL 2009-11-06 15:58:23 +0100 mav r277391 : #i102464# check the Windows ACL 2009-11-04 11:54:06 +0100 tl r277342 : #i106497# incorrectly found 'supported languages' fixed 2009-11-04 10:40:51 +0100 tl r277335 : #i106571# dictionary updates for Polish and Swedish. 2009-10-28 09:54:41 +0100 tl r277236 : #i106100# context menu performance 2009-10-27 15:47:05 +0100 tl r277213 : #i106100# context menu performance 2009-10-23 17:31:56 +0200 mav r277170 : #i106075# use correct path to inprocserv.dll 2009-10-23 16:07:27 +0200 mav r277168 : #i105760# seek the temporary file to beginning also for URL case 2009-10-23 11:03:58 +0200 mav r277134 : CWS-TOOLING: rebase CWS fwk125 to branches/OOO320@276942 (milestone: OOO320:m2) --- sfx2/source/menu/mnuitem.cxx | 20 ++++++++++++++++++++ sfx2/source/menu/virtmenu.cxx | 20 +++++++++++--------- 2 files changed, 31 insertions(+), 9 deletions(-) (limited to 'sfx2/source/menu') diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx index 6619c17d3077..88247a0966e7 100644 --- a/sfx2/source/menu/mnuitem.cxx +++ b/sfx2/source/menu/mnuitem.cxx @@ -542,6 +542,13 @@ SfxUnoMenuControl* SfxMenuControl::CreateControl( const String& rCmd, return new SfxUnoMenuControl( rCmd, nId, rMenu, rBindings, pVirt ); } +SfxUnoMenuControl* SfxMenuControl::CreateControl( const String& rCmd, + USHORT nId, Menu& rMenu, const String& sItemText, const String& sHelpText, + SfxBindings& rBindings, SfxVirtualMenu* pVirt) +{ + return new SfxUnoMenuControl( rCmd, nId, rMenu, sItemText, sHelpText, rBindings, pVirt); +} + SfxUnoMenuControl::SfxUnoMenuControl( const String& rCmd, USHORT nSlotId, Menu& rMenu, SfxBindings& rBindings, SfxVirtualMenu* pVirt ) : SfxMenuControl( nSlotId, rBindings ) @@ -554,6 +561,19 @@ SfxUnoMenuControl::SfxUnoMenuControl( const String& rCmd, USHORT nSlotId, pUnoCtrl->GetNewDispatch(); } +SfxUnoMenuControl::SfxUnoMenuControl( + const String& rCmd, USHORT nSlotId, Menu& /*rMenu*/, + const String& rItemText, const String& rHelpText, + SfxBindings& rBindings, SfxVirtualMenu* pVirt) + : SfxMenuControl( nSlotId, rBindings ) +{ + Bind( pVirt, nSlotId, rItemText, rHelpText, rBindings); + UnBind(); + pUnoCtrl = new SfxUnoControllerItem( this, rBindings, rCmd ); + pUnoCtrl->acquire(); + pUnoCtrl->GetNewDispatch(); +} + SfxUnoMenuControl::~SfxUnoMenuControl() { pUnoCtrl->UnBind(); diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx index e0b6f6f32bf2..326431c3ffbd 100644 --- a/sfx2/source/menu/virtmenu.cxx +++ b/sfx2/source/menu/virtmenu.cxx @@ -417,8 +417,12 @@ void SfxVirtualMenu::CreateFromSVMenu() DELETEZ( pPopup ); } + const String sItemText = pSVMenu->GetItemText(nSlotId); + const String sHelpText = pSVMenu->GetHelpText(nSlotId); + if ( pPopup ) { + SfxMenuControl *pMnuCtrl = SfxMenuControl::CreateControl(nSlotId, *pPopup, *pBindings); @@ -434,10 +438,8 @@ void SfxVirtualMenu::CreateFromSVMenu() SfxMenuCtrlArr_Impl &rCtrlArr = GetAppCtrl_Impl(); rCtrlArr.C40_INSERT( SfxMenuControl, pMnuCtrl, rCtrlArr.Count() ); - (pItems+nPos)->Bind( 0, nSlotId, pSVMenu->GetItemText(nSlotId), - pSVMenu->GetHelpText(nSlotId), *pBindings); - pMnuCtrl->Bind( this, nSlotId, pSVMenu->GetItemText(nSlotId), - pSVMenu->GetHelpText(nSlotId), *pBindings); + (pItems+nPos)->Bind( 0, nSlotId, sItemText, sHelpText, *pBindings); + pMnuCtrl->Bind( this, nSlotId, sItemText, sHelpText, *pBindings); if ( Application::GetSettings().GetStyleSettings().GetUseImagesInMenus() ) { @@ -473,7 +475,7 @@ void SfxVirtualMenu::CreateFromSVMenu() { pMnuCtrl->Bind( this, nSlotId, *new SfxVirtualMenu(nSlotId, this, *pPopup, bHelpInitialized, *pBindings, bOLE, bResCtor), - pSVMenu->GetItemText(nSlotId), pSVMenu->GetHelpText(nSlotId), + sItemText, sHelpText, *pBindings ); } } @@ -510,12 +512,12 @@ void SfxVirtualMenu::CreateFromSVMenu() if ( aCmd.Len() && (( nSlotId < SID_SFX_START ) || ( nSlotId > SHRT_MAX )) ) { // try to create control via comand name - pMnuCtrl = SfxMenuControl::CreateControl( aCmd, nSlotId, *pSVMenu, *pBindings, this ); + pMnuCtrl = SfxMenuControl::CreateControl( aCmd, nSlotId, *pSVMenu, sItemText, sHelpText, *pBindings, this ); if ( pMnuCtrl ) { SfxMenuCtrlArr_Impl &rCtrlArr = GetAppCtrl_Impl(); rCtrlArr.C40_INSERT( SfxMenuControl, pMnuCtrl, rCtrlArr.Count()); - (pItems+nPos)->Bind( 0, nSlotId, pSVMenu->GetItemText(nSlotId), pSVMenu->GetHelpText(nSlotId), *pBindings); + (pItems+nPos)->Bind( 0, nSlotId, sItemText, sHelpText, *pBindings); } } @@ -527,13 +529,13 @@ void SfxVirtualMenu::CreateFromSVMenu() { SfxMenuCtrlArr_Impl &rCtrlArr = GetAppCtrl_Impl(); rCtrlArr.C40_INSERT( SfxMenuControl, pMnuCtrl, rCtrlArr.Count()); - (pItems+nPos)->Bind( 0, nSlotId, pSVMenu->GetItemText(nSlotId), pSVMenu->GetHelpText(nSlotId), *pBindings); + (pItems+nPos)->Bind( 0, nSlotId, sItemText, sHelpText, *pBindings); } else // take default control pMnuCtrl = (pItems+nPos); - pMnuCtrl->Bind( this, nSlotId, pSVMenu->GetItemText(nSlotId), pSVMenu->GetHelpText(nSlotId), *pBindings); + pMnuCtrl->Bind( this, nSlotId, sItemText, sHelpText, *pBindings); } if ( Application::GetSettings().GetStyleSettings().GetUseImagesInMenus() ) -- cgit