summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-28 15:44:10 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-02-06 11:26:53 -0500
commit57027233275260b066442037a904ec34a703ae09 (patch)
treeb2cada7a3987854e4e8459a6ab7d754ba781bb44 /sfx2/source
parent1b1669e430603ae01f593a5019dd6214cded4a33 (diff)
loplugin:loopvartoosmall
(cherry picked from commit 6140ca9f1d728475e332f9fa96ee62dda58687ea) Change-Id: Icb31e51575f7fffd36be73bbd87a3c5e56c3aa26
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/control/bindings.cxx6
-rw-r--r--sfx2/source/control/dispatch.cxx4
-rw-r--r--sfx2/source/control/msgpool.cxx2
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx10
-rw-r--r--sfx2/source/dialog/splitwin.cxx4
-rw-r--r--sfx2/source/dialog/templdlg.cxx6
-rw-r--r--sfx2/source/doc/docinsert.cxx2
-rw-r--r--sfx2/source/doc/objxtor.cxx2
-rw-r--r--sfx2/source/menu/mnuitem.cxx4
-rw-r--r--sfx2/source/menu/mnumgr.cxx4
-rw-r--r--sfx2/source/menu/virtmenu.cxx2
-rw-r--r--sfx2/source/statbar/stbitem.cxx4
-rw-r--r--sfx2/source/toolbox/imgmgr.cxx6
-rw-r--r--sfx2/source/view/viewfrm.cxx2
-rw-r--r--sfx2/source/view/viewsh.cxx8
15 files changed, 33 insertions, 33 deletions
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 24cfbd0819fa..64108e6df2a5 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 aa43c5437fc5..645e7bb263d9 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -559,7 +559,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 )
@@ -732,7 +732,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 6de3b56df334..09aa9b2ee04e 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();
}
@@ -2256,7 +2256,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 3e910a7256b0..8d703a151e4b 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 4e2b0652efa0..e64e7532beae 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -556,14 +556,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();
}
@@ -653,7 +653,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 7b2a1972fd48..c53a4ab253f0 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -480,7 +480,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 f61f06093179..204fee2207ce 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 bb859bb258f9..c805c3e6f0e6 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 fbf12051441d..046fac849d37 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1514,7 +1514,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 )
@@ -1522,7 +1522,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() )
@@ -1564,7 +1564,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() )
@@ -1597,7 +1597,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() )