summaryrefslogtreecommitdiff
path: root/sfx2/source/menu/mnumgr.cxx
diff options
context:
space:
mode:
authorMikhail Voytenko <mav@openoffice.org>2011-01-07 17:14:47 +0100
committerMikhail Voytenko <mav@openoffice.org>2011-01-07 17:14:47 +0100
commitdcd8e4664d9a284c24ceb0360cab0606b22cf86d (patch)
tree19c2817590445d01056d62e793f68892eb1b23b4 /sfx2/source/menu/mnumgr.cxx
parent71747dd58636847fdfda6b5e4029a78d5e0cccfb (diff)
removetooltypes: #i112600# remove tooltypes
Diffstat (limited to 'sfx2/source/menu/mnumgr.cxx')
-rwxr-xr-xsfx2/source/menu/mnumgr.cxx70
1 files changed, 35 insertions, 35 deletions
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; n<nCount; n++ )
{
- USHORT nId = pSVMenu->GetItemId( 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; n<nCount; n++ )
{
- USHORT nId = aPop.GetItemId( n );
+ sal_uInt16 nId = aPop.GetItemId( n );
pSVMenu->InsertItem( 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; n<nCount; n++ )
{
- USHORT nId = pSVMenu->GetItemId( 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; n<nCount; n++ )
{
- USHORT nId = aPop.GetItemId( n );
+ sal_uInt16 nId = aPop.GetItemId( n );
pSVMenu->InsertItem( 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; n<nCount; n++ )
{
- USHORT nId = pSVMenu->GetItemId( 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; n<nCount; n++ )
{
- USHORT nId = aPop.GetItemId( n );
+ sal_uInt16 nId = aPop.GetItemId( n );
pSVMenu->InsertItem( nId, aPop.GetItemText( nId ), aPop.GetItemBits( nId ) );
pSVMenu->SetHelpId( nId, aPop.GetHelpId( nId ));
}