summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMark Page <aptitude@btconnect.com>2016-07-13 13:21:03 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-07-13 19:17:12 +0000
commit9641e51cd71d537313f9b238a0bab73701128b3b (patch)
tree5b9f8ac1006f224d40a093d03793436817cc57e8 /sfx2
parent595c049afe0aff08ec350100bda5a2528f660a8e (diff)
Remove SfxInterface::operator[]
This operator can be confusing when reading the SfxSlotPool source Also this operator could return nullptr that SfxSlotPool doesn't check or require. Change-Id: I8d6009ea1b1f18e7022f1e7065c27f31feb02a6a Reviewed-on: https://gerrit.libreoffice.org/27185 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/msgpool.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sfx2/source/control/msgpool.cxx b/sfx2/source/control/msgpool.cxx
index ab832d6464c7..1f9dec03d3fd 100644
--- a/sfx2/source/control/msgpool.cxx
+++ b/sfx2/source/control/msgpool.cxx
@@ -60,7 +60,7 @@ void SfxSlotPool::RegisterInterface( SfxInterface& rInterface )
// Stop at a (single) Null-slot (for syntactic reasons the interfaces
// always contain at least one slot)
- if ( rInterface.Count() != 0 && !rInterface[0]->nSlotId )
+ if ( rInterface.Count() != 0 && !rInterface.pSlots[0].nSlotId )
return;
// possibly add Interface-id and group-ids of funcs to the list of groups
@@ -77,7 +77,7 @@ void SfxSlotPool::RegisterInterface( SfxInterface& rInterface )
for ( size_t nFunc = 0; nFunc < rInterface.Count(); ++nFunc )
{
- SfxSlot *pDef = rInterface[nFunc];
+ SfxSlot *pDef = &rInterface.pSlots[nFunc];
if ( pDef->GetGroupId() && /* pDef->GetGroupId() != GID_INTERN && */
_pGroups->find(pDef->GetGroupId()) == SfxSlotGroupArr_Impl::npos )
{
@@ -216,7 +216,7 @@ const SfxSlot* SfxSlotPool::SeekSlot( sal_uInt16 nStartInterface )
_nCurMsg < pInterface->Count();
++_nCurMsg )
{
- const SfxSlot* pMsg = (*pInterface)[_nCurMsg];
+ const SfxSlot* pMsg = &pInterface->pSlots[_nCurMsg];
if ( pMsg->GetGroupId() == _pGroups->at(_nCurGroup) )
return pMsg;
}
@@ -261,7 +261,7 @@ const SfxSlot* SfxSlotPool::NextSlot()
SfxInterface* pInterface = (*_pInterfaces)[nInterface];
while ( ++_nCurMsg < pInterface->Count() )
{
- SfxSlot* pMsg = (*pInterface)[_nCurMsg];
+ SfxSlot* pMsg = &pInterface->pSlots[_nCurMsg];
if ( pMsg->GetGroupId() == _pGroups->at(_nCurGroup) )
return pMsg;
}