From 5e838ad7d9d9919a362497cf5f04bdb2e7c1c6f7 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 16 Apr 2010 23:02:51 +0200 Subject: CWS gnumake2: move delivered header files from sfx2/inc to sfx2/inc/sfx2; removed unused code; avoid delivering sfx.srs to solver --- sfx2/source/menu/mnumgr.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sfx2/source/menu/mnumgr.cxx') diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx index 076932ba9dea..01d94dc141cf 100644 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -71,7 +71,7 @@ #include "sfxtypes.hxx" #include #include "mnucfga.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include #include -- cgit From 50c6c0aaebeda0f131e35da61729479180184192 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 4 Jun 2010 13:46:22 +0200 Subject: changehid: #i111874# remove SmartId, make HID of type rtl::OString, fill in dummies for all explicit help ids --- sfx2/source/menu/mnumgr.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sfx2/source/menu/mnumgr.cxx') diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx index ec803718f457..9137abd04764 100644 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -160,7 +160,8 @@ void InsertVerbs_Impl( SfxBindings* pBindings, const com::sun::star::uno::Sequen // einf"ugen pMenu->InsertItem( nId, aVerbs[n].VerbName ); - pMenu->SetHelpId( nId, (ULONG) nId ); + // FIXME: HELPID + pMenu->SetHelpId( nId, ""/*(ULONG) nId*/ ); } } } @@ -378,7 +379,8 @@ void SfxPopupMenuManager::InsertSeparator( USHORT nPos ) void SfxPopupMenuManager::InsertItem( USHORT nId, const String& rName, MenuItemBits nBits, USHORT nPos ) { pSVMenu->InsertItem( nId, rName, nBits,nPos ); - pSVMenu->SetHelpId( nId, (ULONG) nId ); + // FIXME: HELPID + pSVMenu->SetHelpId( nId, ""/*(ULONG) nId*/ ); } //------------------------------------------------------------------------- -- cgit From f24b1da07ebfbc95e76af93fc9c7133f7d52daa5 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Sat, 10 Jul 2010 18:21:24 +0200 Subject: CWS changehid: #i111874#: change code to support HelpIds as byte strings --- sfx2/source/menu/mnumgr.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'sfx2/source/menu/mnumgr.cxx') diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx index 9137abd04764..c76f47345979 100644 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -160,8 +160,6 @@ void InsertVerbs_Impl( SfxBindings* pBindings, const com::sun::star::uno::Sequen // einf"ugen pMenu->InsertItem( nId, aVerbs[n].VerbName ); - // FIXME: HELPID - pMenu->SetHelpId( nId, ""/*(ULONG) nId*/ ); } } } @@ -376,11 +374,10 @@ void SfxPopupMenuManager::InsertSeparator( USHORT nPos ) //------------------------------------------------------------------------- -void SfxPopupMenuManager::InsertItem( USHORT nId, const String& rName, MenuItemBits nBits, USHORT nPos ) +void SfxPopupMenuManager::InsertItem( USHORT nId, const String& rName, MenuItemBits nBits, const rtl::OString& rHelpId, USHORT nPos ) { pSVMenu->InsertItem( nId, rName, nBits,nPos ); - // FIXME: HELPID - pSVMenu->SetHelpId( nId, ""/*(ULONG) nId*/ ); + pSVMenu->SetHelpId( nId, rHelpId ); } //------------------------------------------------------------------------- -- cgit From c1419160f52222a3ed85c4a309df2ab10fceb2ed Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Mon, 26 Jul 2010 13:11:58 +0200 Subject: cws tl82: #i106993# thesaurus code clean-up --- sfx2/source/menu/mnumgr.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sfx2/source/menu/mnumgr.cxx') diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx index b264a5b47861..cec1cbdac985 100755 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -60,6 +60,7 @@ #include #include #include +#include #include @@ -244,7 +245,7 @@ PopupMenu* InsertThesaurusSubmenu_Impl( SfxBindings* pBindings, Menu* pSVMenu ) //! item ids should start with values > 0, since 0 has special meaning const USHORT nId = i + 1; - String aItemText( GetThesaurusReplaceText_Impl( aSynonyms[i] ) ); + String aItemText( linguistic::GetThesaurusReplaceText( aSynonyms[i] ) ); pThesSubMenu->InsertItem( nId, aItemText ); ::rtl::OUString aCmd( ::rtl::OUString::createFromAscii( ".uno:ThesaurusFromContext?WordReplace:string=" ) ); aCmd += aItemText; -- cgit From fdfb7900c36637c38f73cfa2a2a68b7c7a65046e Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 1 Nov 2010 15:32:53 +0100 Subject: undoapi: made the SfxMacroConfig event more slim, by removing unused methods. In turn, got rid of SfxMacroInfo, which is not used anymore --- sfx2/source/menu/mnumgr.cxx | 1 - 1 file changed, 1 deletion(-) (limited to 'sfx2/source/menu/mnumgr.cxx') diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx index b3e5717dd7b6..dfad7e1a7132 100755 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -77,7 +77,6 @@ #include #include "mnucfga.hxx" #include "sfxresid.hxx" -#include #include #include #include "menu.hrc" -- cgit From dcd8e4664d9a284c24ceb0360cab0606b22cf86d Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Fri, 7 Jan 2011 17:14:47 +0100 Subject: removetooltypes: #i112600# remove tooltypes --- sfx2/source/menu/mnumgr.cxx | 70 ++++++++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'sfx2/source/menu/mnumgr.cxx') diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx index 77dbd0dcb885..445b2ecc9de0 100755 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -87,8 +87,8 @@ #include "thessubmenu.hxx" -static const USHORT nCompatVersion = 4; -static const USHORT nVersion = 5; +static const sal_uInt16 nCompatVersion = 4; +static const sal_uInt16 nVersion = 5; // static member initialization PopupMenu * SfxPopupMenuManager::pStaticThesSubMenu = NULL; @@ -119,7 +119,7 @@ SfxMenuManager::SfxMenuManager( const ResId& rResId, SfxBindings &rBindings ) pResMgr(rResId.GetResMgr()), nType( rResId.GetId() ) { - bAddClipboardFuncs = FALSE; + bAddClipboardFuncs = sal_False; DBG_MEMTEST(); } @@ -154,8 +154,8 @@ void InsertVerbs_Impl( SfxBindings* pBindings, const com::sun::star::uno::Sequen { SfxObjectShell* pDoc = pView->GetObjectShell(); pMenu->InsertSeparator(); - USHORT nr=0; - for ( USHORT n = 0; n < aVerbs.getLength(); ++n ) + sal_uInt16 nr=0; + for ( sal_uInt16 n = 0; n < aVerbs.getLength(); ++n ) { // check for ReadOnly verbs if ( pDoc->IsReadOnly() && !(aVerbs[n].VerbAttributes & embed::VerbAttributes::MS_VERBATTR_NEVERDIRTIES) ) @@ -166,7 +166,7 @@ void InsertVerbs_Impl( SfxBindings* pBindings, const com::sun::star::uno::Sequen continue; // neue Id vergeben - USHORT nId = SID_VERB_START + nr++; + sal_uInt16 nId = SID_VERB_START + nr++; DBG_ASSERT(nId <= SID_VERB_END, "Zuviele Verben!"); if ( nId > SID_VERB_END ) break; @@ -239,10 +239,10 @@ PopupMenu* InsertThesaurusSubmenu_Impl( SfxBindings* pBindings, Menu* pSVMenu ) if (sThesImplName.Len() > 0 && aSynonymsImageUrl.getLength() > 0) aImage = Image( lcl_GetImageFromPngUrl( aSynonymsImageUrl ) ); - for (USHORT i = 0; (size_t)i < nNumSynonyms; ++i) + for (sal_uInt16 i = 0; (size_t)i < nNumSynonyms; ++i) { //! item ids should start with values > 0, since 0 has special meaning - const USHORT nId = i + 1; + const sal_uInt16 nId = i + 1; String aItemText( linguistic::GetThesaurusReplaceText( aSynonyms[i] ) ); pThesSubMenu->InsertItem( nId, aItemText ); @@ -297,10 +297,10 @@ void SfxMenuManager::UseDefault() if ( bAddClipboardFuncs ) { - USHORT n, nCount = pSVMenu->GetItemCount(); + sal_uInt16 n, nCount = pSVMenu->GetItemCount(); for ( n=0; nGetItemId( n ); + sal_uInt16 nId = pSVMenu->GetItemId( n ); if ( nId == SID_COPY || nId == SID_CUT || nId == SID_PASTE ) break; } @@ -312,13 +312,13 @@ void SfxMenuManager::UseDefault() pSVMenu->InsertSeparator(); for ( n=0; nInsertItem( nId, aPop.GetItemText( nId ), aPop.GetItemBits( nId ) ); } } } - pVMenu = new SfxVirtualMenu( pSVMenu, FALSE, *pBindings, TRUE, TRUE ); + pVMenu = new SfxVirtualMenu( pSVMenu, sal_False, *pBindings, sal_True, sal_True ); } Construct(*pVMenu); @@ -336,7 +336,7 @@ IMPL_LINK( SfxMenuManager, Select, Menu *, pSelMenu ) { DBG_MEMTEST(); - USHORT nId = (USHORT) pSelMenu->GetCurItemId(); + sal_uInt16 nId = (sal_uInt16) pSelMenu->GetCurItemId(); String aCommand = pSelMenu->GetItemCommand( nId ); if ( !aCommand.Len() && pBindings ) { @@ -359,12 +359,12 @@ IMPL_LINK( SfxMenuManager, Select, Menu *, pSelMenu ) // special menu function pBindings->GetDispatcher_Impl()->Execute( nId ); - return TRUE; + return sal_True; } //-------------------------------------------------------------------- -void SfxMenuManager::Construct_Impl( Menu* pSVMenu, BOOL bWithHelp ) +void SfxMenuManager::Construct_Impl( Menu* pSVMenu, sal_Bool bWithHelp ) { SfxVirtualMenu *pOldVirtMenu=0; if ( pMenu ) @@ -375,7 +375,7 @@ void SfxMenuManager::Construct_Impl( Menu* pSVMenu, BOOL bWithHelp ) } TryToHideDisabledEntries_Impl( pSVMenu ); - SfxVirtualMenu *pVMenu = new SfxVirtualMenu( pSVMenu, bWithHelp, *pBindings, TRUE ); + SfxVirtualMenu *pVMenu = new SfxVirtualMenu( pSVMenu, bWithHelp, *pBindings, sal_True ); Construct(*pVMenu); if ( pOldVirtMenu ) @@ -409,10 +409,10 @@ void SfxPopupMenuManager::RemoveDisabledEntries() //-------------------------------------------------------------------- -USHORT SfxPopupMenuManager::Execute( const Point& rPos, Window* pWindow ) +sal_uInt16 SfxPopupMenuManager::Execute( const Point& rPos, Window* pWindow ) { DBG_MEMTEST(); - USHORT nVal = ( (PopupMenu*) GetMenu()->GetSVMenu() )->Execute( pWindow, rPos ); + sal_uInt16 nVal = ( (PopupMenu*) GetMenu()->GetSVMenu() )->Execute( pWindow, rPos ); delete pStaticThesSubMenu; pStaticThesSubMenu = NULL; return nVal; } @@ -428,13 +428,13 @@ IMPL_LINK_INLINE_END( SfxPopupMenuManager, SelectHdl, void *, EMPTYARG ) //-------------------------------------------------------------------- -USHORT SfxPopupMenuManager::Execute( const Point& rPoint, Window* pWindow, va_list pArgs, const SfxPoolItem *pArg1 ) +sal_uInt16 SfxPopupMenuManager::Execute( const Point& rPoint, Window* pWindow, va_list pArgs, const SfxPoolItem *pArg1 ) { DBG_MEMTEST(); PopupMenu* pPopMenu = ( (PopupMenu*)GetMenu()->GetSVMenu() ); pPopMenu->SetSelectHdl( LINK( this, SfxPopupMenuManager, SelectHdl ) ); - USHORT nId = pPopMenu->Execute( pWindow, rPoint ); + sal_uInt16 nId = pPopMenu->Execute( pWindow, rPoint ); pPopMenu->SetSelectHdl( Link() ); if ( nId ) @@ -445,7 +445,7 @@ USHORT SfxPopupMenuManager::Execute( const Point& rPoint, Window* pWindow, va_li //-------------------------------------------------------------------- -USHORT SfxPopupMenuManager::Execute( const Point& rPoint, Window* pWindow, const SfxPoolItem *pArg1, ... ) +sal_uInt16 SfxPopupMenuManager::Execute( const Point& rPoint, Window* pWindow, const SfxPoolItem *pArg1, ... ) { DBG_MEMTEST(); @@ -470,21 +470,21 @@ void SfxPopupMenuManager::StartInsert() void SfxPopupMenuManager::EndInsert() { pBindings->ENTERREGISTRATIONS(); - pMenu = new SfxVirtualMenu( pSVMenu, FALSE, *pBindings, TRUE, TRUE ); + pMenu = new SfxVirtualMenu( pSVMenu, sal_False, *pBindings, sal_True, sal_True ); Construct( *pMenu ); pBindings->LEAVEREGISTRATIONS(); } //------------------------------------------------------------------------- -void SfxPopupMenuManager::InsertSeparator( USHORT nPos ) +void SfxPopupMenuManager::InsertSeparator( sal_uInt16 nPos ) { pSVMenu->InsertSeparator( nPos ); } //------------------------------------------------------------------------- -void SfxPopupMenuManager::InsertItem( USHORT nId, const String& rName, MenuItemBits nBits, const rtl::OString& rHelpId, USHORT nPos ) +void SfxPopupMenuManager::InsertItem( sal_uInt16 nId, const String& rName, MenuItemBits nBits, const rtl::OString& rHelpId, sal_uInt16 nPos ) { pSVMenu->InsertItem( nId, rName, nBits,nPos ); pSVMenu->SetHelpId( nId, rHelpId ); @@ -492,21 +492,21 @@ void SfxPopupMenuManager::InsertItem( USHORT nId, const String& rName, MenuItemB //------------------------------------------------------------------------- -void SfxPopupMenuManager::RemoveItem( USHORT nId ) +void SfxPopupMenuManager::RemoveItem( sal_uInt16 nId ) { pSVMenu->RemoveItem( nId ); } //------------------------------------------------------------------------- -void SfxPopupMenuManager::CheckItem( USHORT nId, BOOL bCheck ) +void SfxPopupMenuManager::CheckItem( sal_uInt16 nId, sal_Bool bCheck ) { pSVMenu->CheckItem( nId, bCheck ); } void SfxPopupMenuManager::AddClipboardFunctions() { - bAddClipboardFuncs = TRUE; + bAddClipboardFuncs = sal_True; } SfxMenuManager::SfxMenuManager( Menu* pMenuArg, SfxBindings &rBindings ) @@ -516,8 +516,8 @@ SfxMenuManager::SfxMenuManager( Menu* pMenuArg, SfxBindings &rBindings ) pResMgr(NULL), nType(0) { - bAddClipboardFuncs = FALSE; - SfxVirtualMenu* pVMenu = new SfxVirtualMenu( pMenuArg, FALSE, rBindings, TRUE, TRUE ); + bAddClipboardFuncs = sal_False; + SfxVirtualMenu* pVMenu = new SfxVirtualMenu( pMenuArg, sal_False, rBindings, sal_True, sal_True ); Construct(*pVMenu); } @@ -530,10 +530,10 @@ SfxPopupMenuManager::SfxPopupMenuManager( PopupMenu* pMenuArg, SfxBindings& rBin SfxPopupMenuManager* SfxPopupMenuManager::Popup( const ResId& rResId, SfxViewFrame* pFrame,const Point& rPoint, Window* pWindow ) { PopupMenu *pSVMenu = new PopupMenu( rResId ); - USHORT n, nCount = pSVMenu->GetItemCount(); + sal_uInt16 n, nCount = pSVMenu->GetItemCount(); for ( n=0; nGetItemId( n ); + sal_uInt16 nId = pSVMenu->GetItemId( n ); if ( nId == SID_COPY || nId == SID_CUT || nId == SID_PASTE ) break; } @@ -549,7 +549,7 @@ SfxPopupMenuManager* SfxPopupMenuManager::Popup( const ResId& rResId, SfxViewFra pSVMenu->InsertSeparator(); for ( n=0; nInsertItem( nId, aPop.GetItemText( nId ), aPop.GetItemBits( nId ) ); pSVMenu->SetHelpId( nId, aPop.GetHelpId( nId )); } @@ -582,10 +582,10 @@ SfxPopupMenuManager* SfxPopupMenuManager::Popup( const ResId& rResId, SfxViewFra void SfxPopupMenuManager::ExecutePopup( const ResId& rResId, SfxViewFrame* pFrame, const Point& rPoint, Window* pWindow ) { PopupMenu *pSVMenu = new PopupMenu( rResId ); - USHORT n, nCount = pSVMenu->GetItemCount(); + sal_uInt16 n, nCount = pSVMenu->GetItemCount(); for ( n=0; nGetItemId( n ); + sal_uInt16 nId = pSVMenu->GetItemId( n ); if ( nId == SID_COPY || nId == SID_CUT || nId == SID_PASTE ) break; } @@ -599,7 +599,7 @@ void SfxPopupMenuManager::ExecutePopup( const ResId& rResId, SfxViewFrame* pFram pSVMenu->InsertSeparator(); for ( n=0; nInsertItem( nId, aPop.GetItemText( nId ), aPop.GetItemBits( nId ) ); pSVMenu->SetHelpId( nId, aPop.GetHelpId( nId )); } -- cgit