summaryrefslogtreecommitdiff
path: root/sfx2/source/control/msgpool.cxx
diff options
context:
space:
mode:
authorMikhail Voytenko <mav@openoffice.org>2011-01-10 16:07:18 +0100
committerMikhail Voytenko <mav@openoffice.org>2011-01-10 16:07:18 +0100
commit3f4e9b4c3cd9028744ea6ed5e93c41c51a15d229 (patch)
tree65f4fe38cd7c7ba5805435393b299eb0b8ff31c6 /sfx2/source/control/msgpool.cxx
parent61a8280d645fe1b6957591d5d338d073040e8b2e (diff)
removetooltypes01: #i112600# remove tooltypes from sfx2
Diffstat (limited to 'sfx2/source/control/msgpool.cxx')
-rw-r--r--sfx2/source/control/msgpool.cxx48
1 files changed, 24 insertions, 24 deletions
diff --git a/sfx2/source/control/msgpool.cxx b/sfx2/source/control/msgpool.cxx
index 10359ba20f73..0d10d13a3790 100644
--- a/sfx2/source/control/msgpool.cxx
+++ b/sfx2/source/control/msgpool.cxx
@@ -53,20 +53,20 @@ struct SfxSIDRegistration_Impl
{
String _aGroup;
String _aName;
- USHORT _nSID;
+ sal_uInt16 _nSID;
};
struct SfxSlotType_Impl
{
- USHORT nId;
+ sal_uInt16 nId;
TypeId nType;
- SfxSlotType_Impl( USHORT nTheId, TypeId nTheType ):
+ SfxSlotType_Impl( sal_uInt16 nTheId, TypeId nTheType ):
nId(nTheId), nType(nTheType)
{}
};
-DECL_2BYTEARRAY(SfxSlotGroupArr_Impl, USHORT, 6, 4)
+DECL_2BYTEARRAY(SfxSlotGroupArr_Impl, sal_uInt16, 6, 4)
DECL_PTRARRAY(SfxInterfaceArr_Impl, SfxInterface*, 6, 3)
DECL_PTRARRAY(SfxSlotTypeArr_Impl, SfxSlotType_Impl*, 8, 8)
@@ -99,7 +99,7 @@ SfxSlotPool::~SfxSlotPool()
delete _pGroups;
if ( _pTypes )
{
- for ( USHORT n =_pTypes->Count(); n--; )
+ for ( sal_uInt16 n =_pTypes->Count(); n--; )
delete _pTypes->GetObject(n);
delete _pTypes;
}
@@ -132,14 +132,14 @@ void SfxSlotPool::RegisterInterface( SfxInterface& rInterface )
{
// Die Groups im parent Slotpool sind auch hier bekannt
SfxSlotGroupArr_Impl& rGroups = *_pParentPool->_pGroups;
- for ( USHORT n=0; n<rGroups.Count(); n++ )
+ for ( sal_uInt16 n=0; n<rGroups.Count(); n++ )
_pGroups->Append( rGroups[n] );
}
}
if ( !_pTypes )
_pTypes = new SfxSlotTypeArr_Impl;
- for ( USHORT nFunc = 0; nFunc < rInterface.Count(); ++nFunc )
+ for ( sal_uInt16 nFunc = 0; nFunc < rInterface.Count(); ++nFunc )
{
SfxSlot *pDef = rInterface[nFunc];
if ( pDef->GetGroupId() && /* pDef->GetGroupId() != GID_INTERN && */
@@ -154,7 +154,7 @@ void SfxSlotPool::RegisterInterface( SfxInterface& rInterface )
const TypeId &rTypeId = pDef->GetType()->Type();
if ( /*rTypeId != TYPE(SfxVoidItem) &&*/ rTypeId != 0 )
{
- USHORT nPos;
+ sal_uInt16 nPos;
for ( nPos = 0; nPos < _pTypes->Count(); ++nPos )
{
if ( _pTypes->GetObject(nPos)->nId == pDef->GetSlotId() )
@@ -175,12 +175,12 @@ void SfxSlotPool::RegisterInterface( SfxInterface& rInterface )
//====================================================================
-TypeId SfxSlotPool::GetSlotType( USHORT nId ) const
+TypeId SfxSlotPool::GetSlotType( sal_uInt16 nId ) const
{
const SfxSlot* pSlot = (const_cast <SfxSlotPool*> (this))->GetSlot( nId );
return pSlot ? pSlot->GetType()->Type() : 0;
/*
- for ( USHORT nPos = 0; nPos < _pTypes->Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < _pTypes->Count(); ++nPos )
{
if ( _pTypes->GetObject(nPos)->nId == nId )
return _pTypes->GetObject(nPos)->nType;
@@ -205,13 +205,13 @@ void SfxSlotPool::ReleaseInterface( SfxInterface& rInterface )
// get the first SfxMessage for a special Id (e.g. for getting check-mode)
-const SfxSlot* SfxSlotPool::GetSlot( USHORT nId )
+const SfxSlot* SfxSlotPool::GetSlot( sal_uInt16 nId )
{
DBG_MEMTEST();
DBG_ASSERT( _pInterfaces != 0, "no Interfaces registered" );
// Zun"achst die eigenen Interfaces absuchen
- for ( USHORT nInterf = 0; nInterf < _pInterfaces->Count(); ++nInterf )
+ for ( sal_uInt16 nInterf = 0; nInterf < _pInterfaces->Count(); ++nInterf )
{
const SfxSlot *pDef = _pInterfaces->GetObject(nInterf)->GetSlot(nId);
if ( pDef )
@@ -226,7 +226,7 @@ const SfxSlot* SfxSlotPool::GetSlot( USHORT nId )
// skips to the next group
-String SfxSlotPool::SeekGroup( USHORT nNo )
+String SfxSlotPool::SeekGroup( sal_uInt16 nNo )
{
DBG_MEMTEST();
DBG_ASSERT( _pInterfaces != 0, "no Interfaces registered" );
@@ -238,7 +238,7 @@ String SfxSlotPool::SeekGroup( USHORT nNo )
if ( _pParentPool )
{
// Meistens stimmt die Reihenfolge der Ids "uberein
- USHORT nParentCount = _pParentPool->_pGroups->Count();
+ sal_uInt16 nParentCount = _pParentPool->_pGroups->Count();
if ( nNo < nParentCount && (*_pGroups)[nNo] == (*_pParentPool->_pGroups)[nNo] )
_pParentPool->_nCurGroup = nNo;
else
@@ -246,7 +246,7 @@ String SfxSlotPool::SeekGroup( USHORT nNo )
// Ansonsten mu\s gesucht werden
// Wenn die Gruppe im parent pool nicht gefunden wird, wird
// _nCurGroup au\serhalb des g"ultigen Bereiches gesetzt
- USHORT i;
+ sal_uInt16 i;
for ( i=1; i<nParentCount; i++ )
if ( (*_pGroups)[nNo] == (*_pParentPool->_pGroups)[i] )
break;
@@ -271,7 +271,7 @@ String SfxSlotPool::SeekGroup( USHORT nNo )
//--------------------------------------------------------------------
-USHORT SfxSlotPool::GetGroupCount()
+sal_uInt16 SfxSlotPool::GetGroupCount()
{
return _pGroups->Count();
}
@@ -281,13 +281,13 @@ USHORT SfxSlotPool::GetGroupCount()
// internal search loop
-const SfxSlot* SfxSlotPool::SeekSlot( USHORT nStartInterface )
+const SfxSlot* SfxSlotPool::SeekSlot( sal_uInt16 nStartInterface )
{
DBG_MEMTEST();
DBG_ASSERT( _pInterfaces != 0, "no Interfaces registered" );
// Die Numerierung der interfaces startet beim parent pool
- USHORT nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0;
+ sal_uInt16 nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0;
// sind wir am Ende des Parent-Pools angekommen?
if ( nStartInterface < nFirstInterface &&
@@ -303,7 +303,7 @@ const SfxSlot* SfxSlotPool::SeekSlot( USHORT nStartInterface )
}
// find the first func-def with the current group id
- USHORT nCount = _pInterfaces->Count() + nFirstInterface;
+ sal_uInt16 nCount = _pInterfaces->Count() + nFirstInterface;
for ( _nCurInterface = nStartInterface;
_nCurInterface < nCount;
++_nCurInterface )
@@ -332,7 +332,7 @@ const SfxSlot* SfxSlotPool::NextSlot()
DBG_ASSERT( _pInterfaces != 0, "no Interfaces registered" );
// Die Numerierung der interfaces startet beim parent pool
- USHORT nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0;
+ sal_uInt16 nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0;
if ( _nCurInterface < nFirstInterface && _nCurGroup >= _pParentPool->_pGroups->Count() )
_nCurInterface = nFirstInterface;
@@ -349,7 +349,7 @@ const SfxSlot* SfxSlotPool::NextSlot()
return SeekSlot( nFirstInterface );
}
- USHORT nInterface = _nCurInterface - nFirstInterface;
+ sal_uInt16 nInterface = _nCurInterface - nFirstInterface;
// possibly we are already at the end
if ( nInterface >= _pInterfaces->Count() )
return 0;
@@ -387,17 +387,17 @@ SfxInterface* SfxSlotPool::FirstInterface()
SfxInterface* SfxSlotPool::NextInterface()
{
_nCurInterface++;
- USHORT nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0;
+ sal_uInt16 nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0;
if ( _nCurInterface < nFirstInterface )
return (*_pParentPool->_pInterfaces)[_nCurInterface];
- USHORT nInterface = _nCurInterface - nFirstInterface;
+ sal_uInt16 nInterface = _nCurInterface - nFirstInterface;
return nInterface < _pInterfaces->Count() ? (*_pInterfaces)[nInterface] : 0;
}
const SfxSlot* SfxSlotPool::GetUnoSlot( const String& rName )
{
const SfxSlot *pSlot = NULL;
- for ( USHORT nInterface=0; nInterface<_pInterfaces->Count(); nInterface++ )
+ for ( sal_uInt16 nInterface=0; nInterface<_pInterfaces->Count(); nInterface++ )
{
pSlot = (*_pInterfaces)[nInterface]->GetSlot( rName );
if ( pSlot )