diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2015-05-29 23:34:09 +0200 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2015-06-02 10:47:42 +0200 |
commit | 263b4b99856c81c12707a5e9823d693a594ee305 (patch) | |
tree | 5606e0b36e0a059a267fa4757f31e7e455b27d4e /sw/source/uibase | |
parent | 20bb2e707481135440b2c905fb234c5ba54d5041 (diff) |
loplugin: loopvartoosmall
Change-Id: Icb30dac9cdcba493752623ccafff5f06ccafc31f
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/app/applab.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/app/docsh2.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/app/docstyle.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/app/mainwn.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/dbui/dbmgr.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/dbui/mmconfigitem.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/dochdl/gloshdl.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/docvw/romenu.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/lingu/olmenu.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/misc/numberingtypelistbox.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/shells/basesh.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/shells/tabsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/view.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uno/unodispatch.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/utlui/content.cxx | 2 |
17 files changed, 25 insertions, 25 deletions
diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx index f324eb0b08ce..2521c995a0a2 100644 --- a/sw/source/uibase/app/applab.cxx +++ b/sw/source/uibase/app/applab.cxx @@ -308,9 +308,9 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel) aFrmVertOrient.SetVertOrient( text::VertOrientation::TOP ); pFormat->SetFormatAttr(aFrmVertOrient); - for ( sal_uInt16 i = 0; i < rItem.nRows; ++i ) + for ( sal_Int32 i = 0; i < rItem.nRows; ++i ) { - for ( sal_uInt16 j = 0; j < rItem.nCols; ++j ) + for ( sal_Int32 j = 0; j < rItem.nCols; ++j ) { pSh->Push(); const SwFrameFormat *pTmp = ( bLabel ? diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index d75d1604e91a..9eafac523a17 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -964,7 +964,7 @@ void SwDocShell::Execute(SfxRequest& rReq) const SwOutlineNodes& rOutlNds = m_pDoc->GetNodes().GetOutLineNds(); if( !rOutlNds.empty() ) { - for(sal_uInt16 n = 0; n < rOutlNds.size(); ++n ) + for( size_t n = 0; n < rOutlNds.size(); ++n ) { const int nLevel = rOutlNds[n]->GetTextNode()->GetAttrOutlineLevel(); if( nLevel > 0 && ! bOutline[nLevel-1] ) diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index f6c210956cad..578445b7779d 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -2887,7 +2887,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() nSearchFamily == SFX_STYLE_FAMILY_ALL ) { const SwNumRuleTable& rNumTable = rDoc.GetNumRuleTable(); - for(sal_uInt16 i = 0; i < rNumTable.size(); ++i) + for(size_t i = 0; i < rNumTable.size(); ++i) { const SwNumRule& rRule = *rNumTable[ i ]; if( !rRule.IsAutoRule() ) diff --git a/sw/source/uibase/app/mainwn.cxx b/sw/source/uibase/app/mainwn.cxx index db6f6166e9e4..707f368831ca 100644 --- a/sw/source/uibase/app/mainwn.cxx +++ b/sw/source/uibase/app/mainwn.cxx @@ -38,7 +38,7 @@ static std::vector<SwProgress*> *pProgressContainer = 0; static SwProgress *lcl_SwFindProgress( SwDocShell *pDocShell ) { - for ( sal_uInt16 i = 0; i < pProgressContainer->size(); ++i ) + for ( size_t i = 0; i < pProgressContainer->size(); ++i ) { SwProgress *pTmp = (*pProgressContainer)[i]; if ( pTmp->pDocShell == pDocShell ) diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 38996db38074..db84bae5c212 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -725,7 +725,7 @@ SwDBManager::SwDBManager() SwDBManager::~SwDBManager() { - for(sal_uInt16 nPos = 0; nPos < aDataSourceParams.size(); nPos++) + for(size_t nPos = 0; nPos < aDataSourceParams.size(); nPos++) { SwDSParam* pParam = &aDataSourceParams[nPos]; if(pParam->xConnection.is()) @@ -2283,7 +2283,7 @@ void SwDBManager::CloseAll(bool bIncludingMerge) { //the only thing done here is to reset the selection index //all connections stay open - for(sal_uInt16 nPos = 0; nPos < aDataSourceParams.size(); nPos++) + for(size_t nPos = 0; nPos < aDataSourceParams.size(); nPos++) { SwDSParam* pParam = &aDataSourceParams[nPos]; if(bIncludingMerge || pParam != pImpl->pMergeData) @@ -2359,7 +2359,7 @@ SwDSParam* SwDBManager::FindDSConnection(const OUString& rDataSource, bool bCre return pImpl->pMergeData; } SwDSParam* pFound = 0; - for(sal_uInt16 nPos = 0; nPos < aDataSourceParams.size(); nPos++) + for(size_t nPos = 0; nPos < aDataSourceParams.size(); nPos++) { SwDSParam* pParam = &aDataSourceParams[nPos]; if(rDataSource == pParam->sDataSource) @@ -2824,7 +2824,7 @@ void SwDBManager::ExecuteFormLetter( SwWrtShell& rSh, } if(pFound) { - for(sal_uInt16 nPos = 0; nPos < aDataSourceParams.size(); nPos++) + for(size_t nPos = 0; nPos < aDataSourceParams.size(); nPos++) { SwDSParam* pParam = &aDataSourceParams[nPos]; if(pParam == pFound) diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx index cec51c7d9292..8523fac38a6b 100644 --- a/sw/source/uibase/dbui/mmconfigitem.cxx +++ b/sw/source/uibase/dbui/mmconfigitem.cxx @@ -389,7 +389,7 @@ static void lcl_ConvertToNumbers(OUString& rBlock, const ResStringArray& rHeader { //convert the strings used for UI to numbers used for the configuration OUString sBlock(rBlock.replaceAll("\n", OUString("\\n"))); - for(sal_uInt16 i = 0; i < rHeaders.Count(); ++i) + for(sal_uInt32 i = 0; i < rHeaders.Count(); ++i) { OUString sHeader = "<" + rHeaders.GetString( i ) + ">"; OUString sReplace = "<" + OUString('0' + i) + ">"; @@ -619,7 +619,7 @@ const Sequence< OUString> SwMailMergeConfigItem_Impl::GetAddressBlocks( { Sequence< OUString> aRet(aAddressBlocks.size()); OUString* pRet = aRet.getArray(); - for(sal_uInt32 nBlock = 0; nBlock < aAddressBlocks.size(); nBlock++) + for(size_t nBlock = 0; nBlock < aAddressBlocks.size(); nBlock++) { pRet[nBlock] = aAddressBlocks[nBlock]; if(bConvertToConfig) @@ -653,7 +653,7 @@ const Sequence< OUString> SwMailMergeConfigItem_Impl::GetGreetings( aNeutralGreetingLines; Sequence< OUString> aRet(rGreetings.size()); OUString* pRet = aRet.getArray(); - for(sal_uInt32 nGreeting = 0; nGreeting < rGreetings.size(); nGreeting++) + for(size_t nGreeting = 0; nGreeting < rGreetings.size(); nGreeting++) { pRet[nGreeting] = rGreetings[nGreeting]; if(bConvertToConfig) diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx index 7f0067250974..a370117a9c18 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -447,7 +447,7 @@ bool SwGlossaryHdl::Expand( const OUString& rShortName, boost::scoped_ptr<AbstractSwSelGlossaryDlg> pDlg(pFact->CreateSwSelGlossaryDlg(0, aShortName)); assert(pDlg && "Dialog creation failed!"); - for(sal_uInt16 i = 0; i < aFoundArr.size(); ++i) + for(size_t i = 0; i < aFoundArr.size(); ++i) { TextBlockInfo_Impl* pData = &aFoundArr[i]; pDlg->InsertGlos(pData->sTitle, pData->sLongName); diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 53e7cebe51a2..0ac4bfcd752e 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -5951,7 +5951,7 @@ void QuickHelpData::FillStrArr( SwWrtShell& rSh, const OUString& rWord ) if ( rACList.GetWordsMatching( rWord, strings ) ) { - for (unsigned int i= 0; i<strings.size(); i++) + for (size_t i= 0; i<strings.size(); i++) { OUString aCompletedString = strings[i]; //fdo#61251 if it's an exact match, ensure unchanged replacement diff --git a/sw/source/uibase/docvw/romenu.cxx b/sw/source/uibase/docvw/romenu.cxx index 77c0adc07063..f53e3eae52f5 100644 --- a/sw/source/uibase/docvw/romenu.cxx +++ b/sw/source/uibase/docvw/romenu.cxx @@ -138,7 +138,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : pMenu->CheckItem( MN_READONLY_TOGALLERYLINK, bGrfToGalleryAsLnk ); pMenu->CheckItem( MN_READONLY_TOGALLERYCOPY, !bGrfToGalleryAsLnk ); - for ( sal_uInt16 i=0; i < aThemeList.size(); ++i ) + for ( size_t i=0; i < aThemeList.size(); ++i ) pMenu->InsertItem( MN_READONLY_GRAPHICTOGALLERY+i + 3, aThemeList[ i ] ); } else @@ -169,7 +169,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : pMenu->CheckItem( MN_READONLY_TOGALLERYCOPY, !bGrfToGalleryAsLnk ); bEnableBackGallery = true; - for ( sal_uInt16 i=0; i < aThemeList.size(); ++i ) + for ( size_t i=0; i < aThemeList.size(); ++i ) pMenu->InsertItem( MN_READONLY_GRAPHICTOGALLERY+i + 3, aThemeList[ i ] ); } } diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index b74693bb501a..d04ef90da678 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -181,7 +181,7 @@ void SwSpellPopup::fillLangPopupMenu( uno::Sequence< lang::Locale > rLocales( xDocumentLanguages->getDocumentLanguages( static_cast<sal_Int16>(nScriptType), nMaxCount ) ); if (rLocales.getLength() > 0) { - for (sal_uInt16 i = 0; i < rLocales.getLength(); ++i) + for (sal_Int32 i = 0; i < rLocales.getLength(); ++i) { if (aLangItems.size() == (size_t)nMaxCount) break; @@ -514,7 +514,7 @@ m_aInfo16( SW_RES(IMG_INFO_16) ) } sal_uInt16 nItemId = MN_SUGGESTION_START; - for (sal_uInt16 i = 0; i < nStringCount; ++i) + for (sal_Int32 i = 0; i < nStringCount; ++i) { const OUString aEntry = m_aSuggestions[ i ]; InsertItem(nItemId, aEntry, MenuItemBits::NONE, OString(), nPos++); diff --git a/sw/source/uibase/misc/numberingtypelistbox.cxx b/sw/source/uibase/misc/numberingtypelistbox.cxx index 52847602751f..7e76bc6b26fa 100644 --- a/sw/source/uibase/misc/numberingtypelistbox.cxx +++ b/sw/source/uibase/misc/numberingtypelistbox.cxx @@ -89,7 +89,7 @@ void SwNumberingTypeListBox::Reload(sal_uInt16 nTypeFlags) } SwOLENames aNames(SW_RES(STRRES_NUMTYPES)); ResStringArray& rNames = aNames.GetNames(); - for(sal_uInt16 i = 0; i < rNames.Count(); i++) + for(size_t i = 0; i < rNames.Count(); i++) { sal_IntPtr nValue = rNames.GetValue(i); bool bInsert = true; diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 0a9c64f1f2b3..5adf4ed726d4 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -2600,7 +2600,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest ) { SwTableAutoFormatTable aTableTable; aTableTable.Load(); - for ( sal_uInt16 n=0; n<aTableTable.size(); n++ ) + for ( size_t n=0; n<aTableTable.size(); n++ ) { if ( aTableTable[n].GetName() == aAutoName ) { diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 55abe1001d4f..b1a6fc0c8c8d 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -846,7 +846,7 @@ void SwTableShell::Execute(SfxRequest &rReq) long minX = std::numeric_limits<long>::max(); long minY = std::numeric_limits<long>::max(); long nbBoxes = aBoxes.size(); - for ( int i = 0; i < nbBoxes; i++ ) + for ( long i = 0; i < nbBoxes; i++ ) { Point aCoord ( aBoxes[i]->GetCoordinates() ); if ( aCoord.X() < minX ) minX = aCoord.X(); diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 97044dc2eb26..c767a6af5ad5 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -1263,7 +1263,7 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue > bGotZoomFactor = false, bGotIsSelectedFrame = false, bGotViewLayoutColumns = false, bGotViewLayoutBookMode = false; - for (sal_Int16 i = 0 ; i < nLength; i++) + for (sal_Int32 i = 0 ; i < nLength; i++) { if ( pValue->Name == "ViewLeft" ) { diff --git a/sw/source/uibase/uno/unodispatch.cxx b/sw/source/uibase/uno/unodispatch.cxx index 07f783ae3bbf..139af7861efa 100644 --- a/sw/source/uibase/uno/unodispatch.cxx +++ b/sw/source/uibase/uno/unodispatch.cxx @@ -95,7 +95,7 @@ uno::Sequence< uno::Reference< frame::XDispatch > > SwXDispatchProviderIntercept uno::Sequence< uno::Reference< frame::XDispatch> > aReturn(aDescripts.getLength()); uno::Reference< frame::XDispatch>* pReturn = aReturn.getArray(); const frame::DispatchDescriptor* pDescripts = aDescripts.getConstArray(); - for (sal_Int16 i=0; i<aDescripts.getLength(); ++i, ++pReturn, ++pDescripts) + for (sal_Int32 i=0; i<aDescripts.getLength(); ++i, ++pReturn, ++pDescripts) { *pReturn = queryDispatch(pDescripts->FeatureURL, pDescripts->FrameName, pDescripts->SearchFlags); diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 8c21898740c6..0f6a93b88264 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -1055,7 +1055,7 @@ static OUString lcl_CreateOutlineString( size_t nIndex, const SwTextNode * pTextNd = rOutlineNodes[ nIndex ]->GetTextNode(); SwNumberTree::tNumberVector aNumVector = pTextNd->GetNumberVector(); if( pOutlRule && pTextNd->GetNumRule()) - for( sal_Int8 nLevel = 0; + for( int nLevel = 0; nLevel <= pTextNd->GetActualListLevel(); nLevel++ ) { diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 5e3ca2be83ae..95281f806b5f 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -1789,7 +1789,7 @@ bool SwContentTree::FillTransferData( TransferDataContainer& rTransfer, { SwNumberTree::tNumberVector aNumVector = pTextNd->GetNumberVector(); - for( sal_Int8 nLevel = 0; + for( int nLevel = 0; nLevel <= pTextNd->GetActualListLevel(); nLevel++ ) { |