diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-28 15:44:10 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-29 08:48:41 +0200 |
commit | 6140ca9f1d728475e332f9fa96ee62dda58687ea (patch) | |
tree | 284733762d73048939675ca39a8932a3ca2009f5 /sfx2 | |
parent | afcf1ecee1af1312551583b9fc860c1881ba2134 (diff) |
loplugin:loopvartoosmall
Change-Id: Icb31e51575f7fffd36be73bbd87a3c5e56c3aa26
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/control/bindings.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/control/msgpool.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/dialog/splitwin.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/docinsert.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objxtor.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/menu/mnuitem.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/menu/mnumgr.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/menu/virtmenu.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/statbar/stbitem.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/toolbox/imgmgr.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 8 |
15 files changed, 33 insertions, 33 deletions
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index 3d696cb23cdd..76c4d4ff5d49 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -424,7 +424,7 @@ void SfxBindings::Update_Impl // Post Status const SfxInterface *pInterface = rDispat.GetShell(pMsgServer->GetShellLevel())->GetInterface(); - for ( sal_uInt16 nPos = 0; nPos < aFound.size(); ++nPos ) + for ( size_t nPos = 0; nPos < aFound.size(); ++nPos ) { const SfxFoundCache_Impl& rFound = aFound[nPos]; sal_uInt16 nWhich = rFound.nWhichId; @@ -706,7 +706,7 @@ void SfxBindings::InvalidateAll pImp->bMsgDirty = pImp->bMsgDirty || pImp->bAllMsgDirty || bWithMsg; pImp->bAllDirty = true; - for ( sal_uInt16 n = 0; n < pImp->pCaches->size(); ++n ) + for ( size_t n = 0; n < pImp->pCaches->size(); ++n ) (*pImp->pCaches)[n]->Invalidate(bWithMsg); pImp->nMsgPos = 0; @@ -807,7 +807,7 @@ void SfxBindings::InvalidateShell sal_uInt16 nLevel = pDispatcher->GetShellLevel(rSh); if ( nLevel != USHRT_MAX ) { - for ( sal_uInt16 n = 0; n < pImp->pCaches->size(); ++n ) + for ( size_t n = 0; n < pImp->pCaches->size(); ++n ) { SfxStateCache *pCache = (*pImp->pCaches)[n]; const SfxSlotServer *pMsgServer = diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 5e6f9bc2898c..f9f2ef8896ab 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -558,7 +558,7 @@ sal_uInt16 SfxDispatcher::GetShellLevel(const SfxShell& rShell) SFX_STACK(SfxDispatcher::GetShellLevel); Flush(); - for ( sal_uInt16 n = 0; n < xImp->aStack.size(); ++n ) + for ( size_t n = 0; n < xImp->aStack.size(); ++n ) if ( *( xImp->aStack.rbegin() + n ) == &rShell ) return n; if ( xImp->pParent ) @@ -731,7 +731,7 @@ void SfxDispatcher::DoDeactivate_Impl(bool bMDI, SfxViewFrame* pNew) if ( IsAppDispatcher() && !pSfxApp->IsDowning() ) return; - for ( sal_uInt16 i = 0; i < xImp->aStack.size(); ++i ) + for ( size_t i = 0; i < xImp->aStack.size(); ++i ) (*(xImp->aStack.rbegin() + i))->DoDeactivate_Impl(xImp->pFrame, bMDI); bool bHidePopups = bMDI && xImp->pFrame; diff --git a/sfx2/source/control/msgpool.cxx b/sfx2/source/control/msgpool.cxx index ac0026d4ef34..f3ca3d9f67ce 100644 --- a/sfx2/source/control/msgpool.cxx +++ b/sfx2/source/control/msgpool.cxx @@ -125,7 +125,7 @@ const SfxSlot* SfxSlotPool::GetSlot( sal_uInt16 nId ) return 0; // First, search their own interfaces - for ( sal_uInt16 nInterf = 0; nInterf < _pInterfaces->size(); ++nInterf ) + for ( size_t nInterf = 0; nInterf < _pInterfaces->size(); ++nInterf ) { const SfxSlot *pDef = ((*_pInterfaces)[nInterf])->GetSlot(nId); if ( pDef ) diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 0e47101b7385..eb65995d2719 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -302,7 +302,7 @@ SfxDocumentInfoItem::SfxDocumentInfoItem( const SfxDocumentInfoItem& rItem ) , m_bDeleteUserData( rItem.m_bDeleteUserData ) , m_bUseUserData( rItem.m_bUseUserData ) { - for ( sal_uInt32 i = 0; i < rItem.m_aCustomProperties.size(); i++ ) + for ( size_t i = 0; i < rItem.m_aCustomProperties.size(); i++ ) { CustomProperty* pProp = new CustomProperty( rItem.m_aCustomProperties[i]->m_sName, rItem.m_aCustomProperties[i]->m_aValue ); @@ -421,7 +421,7 @@ void SfxDocumentInfoItem::UpdateDocumentInfo( } } - for ( sal_uInt32 k = 0; k < m_aCustomProperties.size(); ++k ) + for ( size_t k = 0; k < m_aCustomProperties.size(); ++k ) { try { @@ -456,7 +456,7 @@ void SfxDocumentInfoItem::SetUseUserData( bool bSet ) std::vector< CustomProperty* > SfxDocumentInfoItem::GetCustomProperties() const { std::vector< CustomProperty* > aRet; - for ( sal_uInt32 i = 0; i < m_aCustomProperties.size(); i++ ) + for ( size_t i = 0; i < m_aCustomProperties.size(); i++ ) { CustomProperty* pProp = new CustomProperty( m_aCustomProperties[i]->m_sName, m_aCustomProperties[i]->m_aValue ); @@ -468,7 +468,7 @@ std::vector< CustomProperty* > SfxDocumentInfoItem::GetCustomProperties() const void SfxDocumentInfoItem::ClearCustomProperties() { - for ( sal_uInt32 i = 0; i < m_aCustomProperties.size(); i++ ) + for ( size_t i = 0; i < m_aCustomProperties.size(); i++ ) delete m_aCustomProperties[i]; m_aCustomProperties.clear(); } @@ -2253,7 +2253,7 @@ void SfxCustomPropertiesPage::Reset( const SfxItemSet* rItemSet ) m_pPropertiesCtrl->ClearAllLines(); const SfxDocumentInfoItem& rInfoItem = static_cast<const SfxDocumentInfoItem &>(rItemSet->Get(SID_DOCINFO)); std::vector< CustomProperty* > aCustomProps = rInfoItem.GetCustomProperties(); - for ( sal_uInt32 i = 0; i < aCustomProps.size(); i++ ) + for ( size_t i = 0; i < aCustomProps.size(); i++ ) { m_pPropertiesCtrl->AddLine( aCustomProps[i]->m_sName, aCustomProps[i]->m_aValue, false ); } diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx index 8dc5303a5572..1b1b33b810a1 100644 --- a/sfx2/source/dialog/splitwin.cxx +++ b/sfx2/source/dialog/splitwin.cxx @@ -448,7 +448,7 @@ void SfxSplitWindow::Split() // apply FIXED item size as 'original' item size to improve layouting of undock-dock-cycle of a window { DeactivateUpdateMode aDeactivateUpdateMode( *this ); - for ( sal_uInt16 i = 0; i < aNewOrgSizes.size(); ++i ) + for ( size_t i = 0; i < aNewOrgSizes.size(); ++i ) { SetItemSize( aNewOrgSizes[i].first, aNewOrgSizes[i].second ); } @@ -792,7 +792,7 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock, } // apply new item sizes DeactivateUpdateMode aDeactivateUpdateMode( *this ); - for ( sal_uInt16 i = 0; i < aNewOrgSizes.size(); ++i ) + for ( size_t i = 0; i < aNewOrgSizes.size(); ++i ) { SetItemSize( aNewOrgSizes[i].first, aNewOrgSizes[i].second ); } diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 833a8afedae7..e7952ca6b7ef 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -547,14 +547,14 @@ public: aName(rName), aParent(rParent), pChildren(0) {} ~StyleTree_Impl(); void Put(StyleTree_Impl* pIns, sal_uIntPtr lPos=ULONG_MAX); - sal_uIntPtr Count(); + size_t Count(); OUString getName() { return aName; } OUString getParent() { return aParent; } StyleTree_Impl *operator[](size_t idx) const { return pChildren[idx]; } }; -sal_uIntPtr StyleTree_Impl::Count() +size_t StyleTree_Impl::Count() { return pChildren.size(); } @@ -642,7 +642,7 @@ SvTreeListEntry* FillBox_Impl(SvTreeListBox* pBox, pBox->GetModel()->InvalidateEntry(pTreeListEntry); - for(sal_uInt16 i = 0; i < pEntry->Count(); ++i) + for(size_t i = 0; i < pEntry->Count(); ++i) { FillBox_Impl(pBox, (*pEntry)[i], rEntries, eStyleFamily, pTreeListEntry); } diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx index 3968db6d66d4..c488b60c4d5f 100644 --- a/sfx2/source/doc/docinsert.cxx +++ b/sfx2/source/doc/docinsert.cxx @@ -152,7 +152,7 @@ void impl_FillURLList( sfx2::FileDialogHelper* _pFileDlg, std::vector<OUString>& { _rpURLList.clear(); - for ( sal_uInt16 i = 0; i < aPathSeq.getLength(); ++i ) + for ( sal_Int32 i = 0; i < aPathSeq.getLength(); ++i ) { INetURLObject aPathObj( aPathSeq[i] ); _rpURLList.push_back(aPathObj.GetMainURL(INetURLObject::NO_DECODE)); diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index 526f66e5f64a..60bd56815e15 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -503,7 +503,7 @@ SfxObjectShell* SfxObjectShell::GetFirst SfxObjectShellArr_Impl &rDocs = SfxGetpApp()->GetObjectShells_Impl(); // search for a SfxDocument of the specified type - for ( sal_uInt16 nPos = 0; nPos < rDocs.size(); ++nPos ) + for ( size_t nPos = 0; nPos < rDocs.size(); ++nPos ) { SfxObjectShell* pSh = rDocs[ nPos ]; if ( bOnlyVisible && pSh->IsPreview() && pSh->IsReadOnly() ) diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx index 8ff9a78b58d4..be6a260c13ff 100644 --- a/sfx2/source/menu/mnuitem.cxx +++ b/sfx2/source/menu/mnuitem.cxx @@ -270,7 +270,7 @@ SfxMenuControl* SfxMenuControl::CreateControl( sal_uInt16 nId, Menu &rMenu, SfxB if ( pFactories ) { SfxMenuCtrlFactArr_Impl &rFactories = *pFactories; - for ( sal_uInt16 nFactory = 0; nFactory < rFactories.size(); ++nFactory ) + for ( size_t nFactory = 0; nFactory < rFactories.size(); ++nFactory ) if ( rFactories[nFactory].nTypeId == aSlotType && ( ( rFactories[nFactory].nSlotId == 0 ) || ( rFactories[nFactory].nSlotId == nId) ) ) @@ -280,7 +280,7 @@ SfxMenuControl* SfxMenuControl::CreateControl( sal_uInt16 nId, Menu &rMenu, SfxB SfxMenuCtrlFactArr_Impl &rFactories = pApp->GetMenuCtrlFactories_Impl(); - for ( sal_uInt16 nFactory = 0; nFactory < rFactories.size(); ++nFactory ) + for ( size_t nFactory = 0; nFactory < rFactories.size(); ++nFactory ) if ( rFactories[nFactory].nTypeId == aSlotType && ( ( rFactories[nFactory].nSlotId == 0 ) || ( rFactories[nFactory].nSlotId == nId) ) ) diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx index 782d041b7081..74ee7b664e02 100644 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -108,7 +108,7 @@ void InsertVerbs_Impl( SfxBindings* pBindings, const com::sun::star::uno::Sequen SfxObjectShell* pDoc = pView->GetObjectShell(); pMenu->InsertSeparator(); sal_uInt16 nr=0; - for ( sal_uInt16 n = 0; n < aVerbs.getLength(); ++n ) + for ( sal_Int32 n = 0; n < aVerbs.getLength(); ++n ) { // check for ReadOnly verbs if ( pDoc->IsReadOnly() && !(aVerbs[n].VerbAttributes & embed::VerbAttributes::MS_VERBATTR_NEVERDIRTIES) ) @@ -169,7 +169,7 @@ PopupMenu* InsertThesaurusSubmenu_Impl( SfxBindings* pBindings, Menu* pSVMenu ) if (!sThesImplName.isEmpty() && !aSynonymsImageUrl.isEmpty()) aImage = Image( aSynonymsImageUrl ); - for (sal_uInt16 i = 0; (size_t)i < nNumSynonyms; ++i) + for (size_t i = 0; i < nNumSynonyms; ++i) { //! item ids should start with values > 0, since 0 has special meaning const sal_uInt16 nId = i + 1; diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx index 2ca790ebf76a..85defbfc21fb 100644 --- a/sfx2/source/menu/virtmenu.cxx +++ b/sfx2/source/menu/virtmenu.cxx @@ -858,7 +858,7 @@ IMPL_LINK_TYPED( SfxVirtualMenu, Activate, Menu *, pMenu, bool ) // append new window list entries to menu pMenu->InsertSeparator(); nItemId = START_ITEMID_WINDOWLIST; - for ( sal_uInt32 i = 0; i < aNewWindowListVector.size(); i++ ) + for ( size_t i = 0; i < aNewWindowListVector.size(); i++ ) { pMenu->InsertItem( nItemId, aNewWindowListVector.at( i ), MenuItemBits::RADIOCHECK ); if ( nItemId == nActiveItemId ) diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx index c0ded64c7da3..d3dea7c7fe7d 100644 --- a/sfx2/source/statbar/stbitem.cxx +++ b/sfx2/source/statbar/stbitem.cxx @@ -613,7 +613,7 @@ SfxStatusBarControl* SfxStatusBarControl::CreateControl if ( pFactories ) { SfxStbCtrlFactArr_Impl &rFactories = *pFactories; - for ( sal_uInt16 nFactory = 0; nFactory < rFactories.size(); ++nFactory ) + for ( size_t nFactory = 0; nFactory < rFactories.size(); ++nFactory ) if ( rFactories[nFactory].nTypeId == aSlotType && ( ( rFactories[nFactory].nSlotId == 0 ) || ( rFactories[nFactory].nSlotId == nSlotID) ) ) @@ -622,7 +622,7 @@ SfxStatusBarControl* SfxStatusBarControl::CreateControl } SfxStbCtrlFactArr_Impl &rFactories = pApp->GetStbCtrlFactories_Impl(); - for ( sal_uInt16 nFactory = 0; nFactory < rFactories.size(); ++nFactory ) + for ( size_t nFactory = 0; nFactory < rFactories.size(); ++nFactory ) if ( rFactories[nFactory].nTypeId == aSlotType && ( ( rFactories[nFactory].nSlotId == 0 ) || ( rFactories[nFactory].nSlotId == nSlotID) ) ) diff --git a/sfx2/source/toolbox/imgmgr.cxx b/sfx2/source/toolbox/imgmgr.cxx index 7bdda110e279..95509a817032 100644 --- a/sfx2/source/toolbox/imgmgr.cxx +++ b/sfx2/source/toolbox/imgmgr.cxx @@ -125,7 +125,7 @@ SfxImageManager_Impl::~SfxImageManager_Impl() m_aOpt.RemoveListenerLink( LINK( this, SfxImageManager_Impl, OptionsChanged_Impl ) ); if (m_bAppEventListener) Application::RemoveEventListener( LINK( this, SfxImageManager_Impl, SettingsChanged_Impl ) ); - for ( sal_uInt32 i = 0; i < m_aToolBoxes.size(); i++ ) + for ( size_t i = 0; i < m_aToolBoxes.size(); i++ ) delete m_aToolBoxes[i]; } @@ -163,7 +163,7 @@ void SfxImageManager_Impl::SetSymbolsSize_Impl( sal_Int16 nNewSymbolsSize ) m_nSymbolsSize = nNewSymbolsSize; bool bLarge( m_nSymbolsSize == SFX_SYMBOLS_SIZE_LARGE ); - for ( sal_uInt32 n=0; n < m_aToolBoxes.size(); n++ ) + for ( size_t n=0; n < m_aToolBoxes.size(); n++ ) { ToolBoxInf_Impl *pInf = m_aToolBoxes[n]; if ( pInf->nFlags & SfxToolboxFlags::CHANGESYMBOLSET ) @@ -315,7 +315,7 @@ void SfxImageManager::ReleaseToolBox( ToolBox *pBox ) { SolarMutexGuard aGuard; - for ( sal_uInt32 n=0; n < pImp->m_aToolBoxes.size(); n++ ) + for ( size_t n=0; n < pImp->m_aToolBoxes.size(); n++ ) { if ((pImp->m_aToolBoxes[n])->pToolBox == pBox ) { diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 8119842b38a6..bcca3cfaa3e7 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -1542,7 +1542,7 @@ SfxViewFrame* SfxViewFrame::GetFirst SfxViewFrameArr_Impl &rFrames = pSfxApp->GetViewFrames_Impl(); // search for a SfxDocument of the specified type - for ( sal_uInt16 nPos = 0; nPos < rFrames.size(); ++nPos ) + for ( size_t nPos = 0; nPos < rFrames.size(); ++nPos ) { SfxViewFrame *pFrame = rFrames[nPos]; if ( ( !pDoc || pDoc == pFrame->GetObjectShell() ) diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 431ba976591c..d41ae370ad63 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1512,7 +1512,7 @@ SfxViewShell* SfxViewShell::GetFirst // search for a SfxViewShell of the specified type SfxViewShellArr_Impl &rShells = SfxGetpApp()->GetViewShells_Impl(); SfxViewFrameArr_Impl &rFrames = SfxGetpApp()->GetViewFrames_Impl(); - for ( sal_uInt16 nPos = 0; nPos < rShells.size(); ++nPos ) + for ( size_t nPos = 0; nPos < rShells.size(); ++nPos ) { SfxViewShell *pShell = rShells[nPos]; if ( pShell ) @@ -1520,7 +1520,7 @@ SfxViewShell* SfxViewShell::GetFirst // sometimes dangling SfxViewShells exist that point to a dead SfxViewFrame // these ViewShells shouldn't be accessible anymore // a destroyed ViewFrame is not in the ViewFrame array anymore, so checking this array helps - for ( sal_uInt16 n=0; n<rFrames.size(); ++n ) + for ( size_t n=0; n<rFrames.size(); ++n ) { SfxViewFrame *pFrame = rFrames[n]; if ( pFrame == pShell->GetViewFrame() ) @@ -1562,7 +1562,7 @@ SfxViewShell* SfxViewShell::GetNext // sometimes dangling SfxViewShells exist that point to a dead SfxViewFrame // these ViewShells shouldn't be accessible anymore // a destroyed ViewFrame is not in the ViewFrame array anymore, so checking this array helps - for ( sal_uInt16 n=0; n<rFrames.size(); ++n ) + for ( size_t n=0; n<rFrames.size(); ++n ) { SfxViewFrame *pFrame = rFrames[n]; if ( pFrame == pShell->GetViewFrame() ) @@ -1595,7 +1595,7 @@ void SfxViewShell::Notify( SfxBroadcaster& rBC, { // avoid access to dangling ViewShells SfxViewFrameArr_Impl &rFrames = SfxGetpApp()->GetViewFrames_Impl(); - for ( sal_uInt16 n=0; n<rFrames.size(); ++n ) + for ( size_t n=0; n<rFrames.size(); ++n ) { SfxViewFrame *frame = rFrames[n]; if ( frame == GetViewFrame() && &rBC == GetObjectShell() ) |