diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-28 16:48:15 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-29 08:48:41 +0200 |
commit | 49ea2258d482950ad3af16f9c8ac4fef7f192fc0 (patch) | |
tree | 4910b89f264f47c378fa7540705ca84f50d91919 | |
parent | e0b2e6e3f767240016133dd2d55e0bfb9192ca39 (diff) |
loplugin:loopvartoosmall
Change-Id: I5518e40a30bdad53470cc52b59eff04ab6d873d4
45 files changed, 88 insertions, 88 deletions
diff --git a/compilerplugins/clang/loopvartoosmall.cxx b/compilerplugins/clang/loopvartoosmall.cxx index a742af61fb12..bba88548f9eb 100644 --- a/compilerplugins/clang/loopvartoosmall.cxx +++ b/compilerplugins/clang/loopvartoosmall.cxx @@ -112,7 +112,7 @@ bool LoopVarTooSmall::VisitForStmt( const ForStmt* stmt ) } -loplugin::Plugin::Registration< LoopVarTooSmall > X("loopvartoosmall", true); +loplugin::Plugin::Registration< LoopVarTooSmall > X("loopvartoosmall", false); } diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 36f39974812b..b5ebf1a217e4 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -1861,7 +1861,7 @@ bool SvxConfigPage::FillItemSet( SfxItemSet* ) { bool result = false; - for ( sal_uInt16 i = 0 ; i < m_pSaveInListBox->GetEntryCount(); ++i ) + for ( sal_Int32 i = 0 ; i < m_pSaveInListBox->GetEntryCount(); ++i ) { SaveInData* pData = static_cast<SaveInData*>(m_pSaveInListBox->GetEntryData( i )); @@ -2264,7 +2264,7 @@ void SvxMenuConfigPage::Init() void SvxMenuConfigPage::dispose() { - for ( sal_uInt16 i = 0 ; i < m_pSaveInListBox->GetEntryCount(); ++i ) + for ( sal_Int32 i = 0 ; i < m_pSaveInListBox->GetEntryCount(); ++i ) { MenuSaveInData* pData = static_cast<MenuSaveInData*>(m_pSaveInListBox->GetEntryData( i )); @@ -2963,7 +2963,7 @@ SvxToolbarConfigPage::~SvxToolbarConfigPage() void SvxToolbarConfigPage::dispose() { - for ( sal_uInt16 i = 0 ; i < m_pSaveInListBox->GetEntryCount(); ++i ) + for ( sal_Int32 i = 0 ; i < m_pSaveInListBox->GetEntryCount(); ++i ) { ToolbarSaveInData* pData = static_cast<ToolbarSaveInData*>(m_pSaveInListBox->GetEntryData( i )); @@ -3201,7 +3201,7 @@ IMPL_LINK_TYPED( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton, vo sal_uInt16 nSelectionPos = 0; // find position of entry within the list - for ( sal_uInt16 i = 0; i < m_pContentsListBox->GetEntryCount(); ++i ) + for ( sal_uLong i = 0; i < m_pContentsListBox->GetEntryCount(); ++i ) { if ( m_pContentsListBox->GetEntry( 0, i ) == pActEntry ) { @@ -3299,7 +3299,7 @@ IMPL_LINK_TYPED( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton, vo sal_uInt16 nSelectionPos = 0; // find position of entry within the list - for ( sal_uInt16 i = 0; i < m_pContentsListBox->GetEntryCount(); ++i ) + for ( sal_uLong i = 0; i < m_pContentsListBox->GetEntryCount(); ++i ) { if ( m_pContentsListBox->GetEntry( 0, i ) == pActEntry ) { @@ -3377,7 +3377,7 @@ IMPL_LINK_TYPED( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton, vo sal_uInt16 nSelectionPos = 0; // find position of entry within the list - for ( sal_uInt16 i = 0; i < m_pContentsListBox->GetEntryCount(); ++i ) + for ( sal_uLong i = 0; i < m_pContentsListBox->GetEntryCount(); ++i ) { if ( m_pContentsListBox->GetEntry( 0, i ) == pActEntry ) { @@ -3447,7 +3447,7 @@ void SvxToolbarConfigPage::Init() sal_uInt16 nPos = 0; if ( !m_aURLToSelect.isEmpty() ) { - for ( sal_uInt16 i = 0 ; i < m_pTopLevelListBox->GetEntryCount(); ++i ) + for ( sal_Int32 i = 0 ; i < m_pTopLevelListBox->GetEntryCount(); ++i ) { SvxConfigEntry* pData = static_cast<SvxConfigEntry*>(m_pTopLevelListBox->GetEntryData( i )); @@ -4437,7 +4437,7 @@ IMPL_LINK( SvxToolbarConfigPage, NewToolbarHdl, Button *, pButton ) VclPtrInstance< SvxNewToolbarDialog > pNameDialog( nullptr, aNewName ); sal_uInt16 nInsertPos; - for ( sal_uInt16 i = 0 ; i < m_pSaveInListBox->GetEntryCount(); ++i ) + for ( sal_Int32 i = 0 ; i < m_pSaveInListBox->GetEntryCount(); ++i ) { SaveInData* pData = static_cast<SaveInData*>(m_pSaveInListBox->GetEntryData( i )); diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index b0657eef30cf..798731af25d1 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -136,7 +136,7 @@ void SvxHyperlinkNewDocTp::dispose() { if (m_pLbDocTypes) { - for ( sal_uInt16 n=0; n<m_pLbDocTypes->GetEntryCount(); n++ ) + for ( sal_Int32 n=0; n<m_pLbDocTypes->GetEntryCount(); n++ ) delete static_cast<DocumentTypeData*>(m_pLbDocTypes->GetEntryData ( n )); m_pLbDocTypes = NULL; } diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx index 686734d6e8a2..ec76ff1831ac 100644 --- a/cui/source/dialogs/iconcdlg.cxx +++ b/cui/source/dialogs/iconcdlg.cxx @@ -841,7 +841,7 @@ short IconChoiceDialog::Ok() void IconChoiceDialog::FocusOnIcon( sal_uInt16 nId ) { // set focus to icon for the current visible page - for ( sal_uInt16 i=0; i<m_pIconCtrl->GetEntryCount(); i++) + for ( sal_uLong i=0; i<m_pIconCtrl->GetEntryCount(); i++) { SvxIconChoiceCtrlEntry* pEntry = m_pIconCtrl->GetEntry ( i ); sal_uInt16* pUserData = static_cast<sal_uInt16*>(pEntry->GetUserData()); diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx index 8cdc64439efa..75c8b8896030 100644 --- a/cui/source/dialogs/multipat.cxx +++ b/cui/source/dialogs/multipat.cxx @@ -270,7 +270,7 @@ OUString SvxMultiPathDialog::GetPath() const sal_Unicode cDelim = SVT_SEARCHPATH_DELIMITER; OUString sWritable; - for ( sal_uInt16 i = 0; i < m_pRadioLB->GetEntryCount(); ++i ) + for ( sal_uLong i = 0; i < m_pRadioLB->GetEntryCount(); ++i ) { SvTreeListEntry* pEntry = m_pRadioLB->GetEntry(i); if ( m_pRadioLB->GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED ) @@ -294,7 +294,7 @@ OUString SvxPathSelectDialog::GetPath() const OUString sNewPath; sal_Unicode cDelim = SVT_SEARCHPATH_DELIMITER; - for ( sal_uInt16 i = 0; i < m_pPathLB->GetEntryCount(); ++i ) + for ( sal_Int32 i = 0; i < m_pPathLB->GetEntryCount(); ++i ) { if ( !sNewPath.isEmpty() ) sNewPath += OUString(cDelim); diff --git a/cui/source/dialogs/showcols.cxx b/cui/source/dialogs/showcols.cxx index 4c86ac4da191..79bdda9387bd 100644 --- a/cui/source/dialogs/showcols.cxx +++ b/cui/source/dialogs/showcols.cxx @@ -57,7 +57,7 @@ IMPL_LINK_NOARG(FmShowColsDialog, OnClickedOk) if (m_xColumns.is()) { ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xCol; - for (sal_uInt16 i=0; i < m_pList->GetSelectEntryCount(); ++i) + for (sal_Int32 i=0; i < m_pList->GetSelectEntryCount(); ++i) { m_xColumns->getByIndex(sal::static_int_cast<sal_Int32>(reinterpret_cast<sal_uIntPtr>(m_pList->GetEntryData(m_pList->GetSelectEntryPos(i))))) >>= xCol; if (xCol.is()) @@ -90,7 +90,7 @@ void FmShowColsDialog::SetColumns(const ::com::sun::star::uno::Reference< ::com: ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xCurCol; OUString sCurName; - for (sal_uInt16 i=0; i<xCols->getCount(); ++i) + for (sal_Int32 i=0; i<xCols->getCount(); ++i) { sCurName.clear(); xCurCol.set(xCols->getByIndex(i), css::uno::UNO_QUERY); diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx index 44976012dad2..5bd9284cd776 100644 --- a/cui/source/dialogs/srchxtra.cxx +++ b/cui/source/dialogs/srchxtra.cxx @@ -196,7 +196,7 @@ IMPL_LINK_NOARG(SvxSearchAttributeDialog, OKHdl) SearchAttrItem aInvalidItem; aInvalidItem.pItem = reinterpret_cast<SfxPoolItem*>(-1); - for ( sal_uInt16 i = 0; i < m_pAttrLB->GetEntryCount(); ++i ) + for ( sal_uLong i = 0; i < m_pAttrLB->GetEntryCount(); ++i ) { sal_uInt16 nSlot = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pAttrLB->GetEntryData(i)); bool bChecked = m_pAttrLB->IsChecked(i); diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx index 86f7af92fbec..63ffc2c71b16 100644 --- a/cui/source/inc/treeopt.hxx +++ b/cui/source/inc/treeopt.hxx @@ -87,11 +87,11 @@ typedef ::std::vector< VectorOfLeaves > VectorOfGroupedLeaves; struct OptionsNode { - OUString m_sId; - OUString m_sLabel; - OUString m_sPageURL; + OUString m_sId; + OUString m_sLabel; + OUString m_sPageURL; bool m_bAllModules; - OUString m_sGroupId; + OUString m_sGroupId; sal_Int32 m_nGroupIndex; VectorOfLeaves m_aLeaves; VectorOfGroupedLeaves m_aGroupedLeaves; @@ -111,7 +111,7 @@ struct OptionsNode ~OptionsNode() { - for ( sal_uInt32 i = 0; i < m_aLeaves.size(); ++i ) + for ( size_t i = 0; i < m_aLeaves.size(); ++i ) delete m_aLeaves[i]; m_aLeaves.clear(); m_aGroupedLeaves.clear(); @@ -122,9 +122,9 @@ typedef ::std::vector< OptionsNode* > VectorOfNodes; struct LastPageSaver { - sal_uInt16 m_nLastPageId; - OUString m_sLastPageURL_Tools; - OUString m_sLastPageURL_ExtMgr; + sal_uInt16 m_nLastPageId; + OUString m_sLastPageURL_Tools; + OUString m_sLastPageURL_ExtMgr; LastPageSaver() : m_nLastPageId( USHRT_MAX ) {} }; diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index ba17c70246ef..3bf5f84bd16d 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -168,7 +168,7 @@ DbRegistrationOptionsPage::~DbRegistrationOptionsPage() void DbRegistrationOptionsPage::dispose() { - for ( sal_uInt16 i = 0; i < pPathBox->GetEntryCount(); ++i ) + for ( sal_uLong i = 0; i < pPathBox->GetEntryCount(); ++i ) delete static_cast< DatabaseRegistration* >( pPathBox->GetEntry(i)->GetUserData() ); pPathBox.disposeAndClear(); m_pPathCtrl.clear(); diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index b82189f610b0..11b37a77c1ff 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -1171,7 +1171,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(vcl::Window* pParent, const SfxItemSet& if (!m_sUserLocaleValue.isEmpty()) { sal_Int32 d = 0; - for (sal_uInt16 i=0; i < m_pUserInterfaceLB->GetEntryCount(); i++) + for (sal_Int32 i=0; i < m_pUserInterfaceLB->GetEntryCount(); i++) { d = (sal_Int32)reinterpret_cast<sal_IntPtr>(m_pUserInterfaceLB->GetEntryData(i)); if ( d > 0 && seqInstalledLanguages.getLength() > d-1 && seqInstalledLanguages[d-1].equals(m_sUserLocaleValue)) diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx index 465bb4acf437..4c97609dcbc4 100644 --- a/cui/source/options/optopencl.cxx +++ b/cui/source/options/optopencl.cxx @@ -109,9 +109,9 @@ SvxOpenCLTabPage::~SvxOpenCLTabPage() void SvxOpenCLTabPage::dispose() { - for ( sal_uInt16 i = 0; i < mpBlackList->GetEntryCount(); ++i ) + for ( sal_uLong i = 0; i < mpBlackList->GetEntryCount(); ++i ) delete static_cast<OpenCLConfig::ImplMatcher*>(mpBlackList->GetEntry(i)->GetUserData()); - for ( sal_uInt16 i = 0; i < mpWhiteList->GetEntryCount(); ++i ) + for ( sal_uLong i = 0; i < mpWhiteList->GetEntryCount(); ++i ) delete static_cast<OpenCLConfig::ImplMatcher*>(mpWhiteList->GetEntry(i)->GetUserData()); mpBlackList.disposeAndClear(); mpWhiteList.disposeAndClear(); @@ -176,7 +176,7 @@ void fillListBox(SvSimpleTable* pListBox, const OpenCLConfig::ImplMatcherSet& rS { pListBox->SetUpdateMode(false); // kill added UserData to treeitem - for ( sal_uInt16 i = 0; i < pListBox->GetEntryCount(); ++i ) + for ( sal_uLong i = 0; i < pListBox->GetEntryCount(); ++i ) delete static_cast<OpenCLConfig::ImplMatcher*>(pListBox->GetEntry(i)->GetUserData()); pListBox->Clear(); diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index 0bab1a92168a..5e13382ed237 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -243,7 +243,7 @@ void SvxPathTabPage::dispose() { if ( pPathBox ) { - for ( sal_uInt16 i = 0; i < pPathBox->GetEntryCount(); ++i ) + for ( sal_uLong i = 0; i < pPathBox->GetEntryCount(); ++i ) delete static_cast<PathUserData_Impl*>(pPathBox->GetEntry(i)->GetUserData()); pPathBox.disposeAndClear(); } @@ -263,7 +263,7 @@ VclPtr<SfxTabPage> SvxPathTabPage::Create( vcl::Window* pParent, bool SvxPathTabPage::FillItemSet( SfxItemSet* ) { - for ( sal_uInt16 i = 0; i < pPathBox->GetEntryCount(); ++i ) + for ( sal_uLong i = 0; i < pPathBox->GetEntryCount(); ++i ) { PathUserData_Impl* pPathImpl = static_cast<PathUserData_Impl*>(pPathBox->GetEntry(i)->GetUserData()); sal_uInt16 nRealId = pPathImpl->nRealId; diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx index f6c5741dadb0..8c1c67a67421 100644 --- a/cui/source/options/optsave.cxx +++ b/cui/source/options/optsave.cxx @@ -419,7 +419,7 @@ void SfxSaveTabPage::Reset( const SfxItemSet* ) Reference< XContainerQuery > xQuery(pImpl->xFact, UNO_QUERY); if(xQuery.is()) { - for(sal_uInt16 n = 0; n < aDocTypeLB->GetEntryCount(); n++) + for(sal_Int32 n = 0; n < aDocTypeLB->GetEntryCount(); n++) { sal_IntPtr nData = reinterpret_cast<sal_IntPtr>(aDocTypeLB->GetEntryData(n)); OUString sCommand; diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 6146c5db89b8..a3d1b90e06ee 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1796,7 +1796,7 @@ bool isNodeActive( OptionsNode* pNode, Module* pModule ) // search node in active module if ( pModule->m_bActive ) { - for ( sal_uInt32 j = 0; j < pModule->m_aNodeList.size(); ++j ) + for ( size_t j = 0; j < pModule->m_aNodeList.size(); ++j ) if ( pModule->m_aNodeList[j]->m_sId == pNode->m_sId ) return true; } @@ -1990,7 +1990,7 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes( bool bAlreadyOpened = false; if ( pNode->m_aGroupedLeaves.size() > 0 ) { - for ( sal_uInt32 k = 0; + for ( size_t k = 0; k < pNode->m_aGroupedLeaves.size(); ++k ) { if ( pNode->m_aGroupedLeaves[k].size() > 0 && @@ -2106,7 +2106,7 @@ static void lcl_insertLeaf( void OfaTreeOptionsDialog::InsertNodes( const VectorOfNodes& rNodeList ) { - for ( sal_uInt32 i = 0; i < rNodeList.size(); ++i ) + for ( size_t i = 0; i < rNodeList.size(); ++i ) { OptionsNode* pNode = rNodeList[i]; @@ -2115,7 +2115,7 @@ void OfaTreeOptionsDialog::InsertNodes( const VectorOfNodes& rNodeList ) sal_uInt32 j = 0; for ( ; j < pNode->m_aGroupedLeaves.size(); ++j ) { - for ( sal_uInt32 k = 0; k < pNode->m_aGroupedLeaves[j].size(); ++k ) + for ( size_t k = 0; k < pNode->m_aGroupedLeaves[j].size(); ++k ) { OptionsLeaf* pLeaf = pNode->m_aGroupedLeaves[j][k]; lcl_insertLeaf( this, pNode, pLeaf, *pTreeLB ); diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index a4da64ee0456..ce474e3dd7bb 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -982,14 +982,14 @@ bool OfaAutocorrReplacePage::FillItemSet( SfxItemSet* ) std::vector<SvxAutocorrWord> aDeleteWords; std::vector<SvxAutocorrWord> aNewWords; - for (sal_uInt32 i = 0; i < rStringChangeList.aDeletedEntries.size(); i++) + for (size_t i = 0; i < rStringChangeList.aDeletedEntries.size(); i++) { DoubleString& deleteEntry = rStringChangeList.aDeletedEntries[i]; SvxAutocorrWord aDeleteWord( deleteEntry.sShort, deleteEntry.sLong ); aDeleteWords.push_back( aDeleteWord ); } - for (sal_uInt32 i = 0; i < rStringChangeList.aNewEntries.size(); i++) + for (size_t i = 0; i < rStringChangeList.aNewEntries.size(); i++) { DoubleString& newEntry = rStringChangeList.aNewEntries[i]; @@ -1055,7 +1055,7 @@ void OfaAutocorrReplacePage::RefillReplaceBox(bool bFromReset, if( aDoubleStringTable.find(eLang) != aDoubleStringTable.end() ) { DoubleStringArray& rArray = aDoubleStringTable[eNewLanguage]; - for( sal_uInt32 i = 0; i < rArray.size(); i++ ) + for( size_t i = 0; i < rArray.size(); i++ ) { DoubleString& rDouble = rArray[i]; bool bTextOnly = 0 == rDouble.pUserData; @@ -1183,7 +1183,7 @@ IMPL_LINK(OfaAutocorrReplacePage, SelectHdl, SvTabListBox*, pBox) void OfaAutocorrReplacePage::NewEntry(const OUString& sShort, const OUString& sLong, bool bKeepSourceFormatting) { DoubleStringArray& rNewArray = aChangesTable[eLang].aNewEntries; - for (sal_uInt32 i = 0; i < rNewArray.size(); i++) + for (size_t i = 0; i < rNewArray.size(); i++) { if (rNewArray[i].sShort == sShort) { @@ -1193,7 +1193,7 @@ void OfaAutocorrReplacePage::NewEntry(const OUString& sShort, const OUString& sL } DoubleStringArray& rDeletedArray = aChangesTable[eLang].aDeletedEntries; - for (sal_uInt32 i = 0; i < rDeletedArray.size(); i++) + for (size_t i = 0; i < rDeletedArray.size(); i++) { if (rDeletedArray[i].sShort == sShort) { @@ -1213,7 +1213,7 @@ void OfaAutocorrReplacePage::NewEntry(const OUString& sShort, const OUString& sL void OfaAutocorrReplacePage::DeleteEntry(const OUString& sShort, const OUString& sLong) { DoubleStringArray& rNewArray = aChangesTable[eLang].aNewEntries; - for (sal_uInt32 i = 0; i < rNewArray.size(); i++) + for (size_t i = 0; i < rNewArray.size(); i++) { if (rNewArray[i].sShort == sShort) { @@ -1223,7 +1223,7 @@ void OfaAutocorrReplacePage::DeleteEntry(const OUString& sShort, const OUString& } DoubleStringArray& rDeletedArray = aChangesTable[eLang].aDeletedEntries; - for (sal_uInt32 i = 0; i < rDeletedArray.size(); i++) + for (size_t i = 0; i < rDeletedArray.size(); i++) { if (rDeletedArray[i].sShort == sShort) { @@ -1324,7 +1324,7 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, Edit*, pEdt) bool bFound = false; bool bTmpSelEntry=false; - for(sal_uInt32 i = 0; i < m_pReplaceTLB->GetEntryCount(); i++) + for(sal_uLong i = 0; i < m_pReplaceTLB->GetEntryCount(); i++) { SvTreeListEntry* pEntry = m_pReplaceTLB->GetEntry( i ); OUString aTestStr = SvTabListBox::GetEntryText(pEntry, 0); diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 4d721afaffa0..57efff58d25a 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -2670,7 +2670,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectan if (aBlackColor == aBackColor) aBlackColor.Invert(); - for (sal_uInt8 nLevel = 0; nLevel < pActNum->GetLevelCount(); ++nLevel, nYStart = nYStart + nYStep) + for (sal_uInt16 nLevel = 0; nLevel < pActNum->GetLevelCount(); ++nLevel, nYStart = nYStart + nYStep) { const SvxNumberFormat &rFmt = pActNum->GetLevel(nLevel); aNum.GetLevelVal()[ nLevel ] = rFmt.GetStart(); diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index 8bbc09474704..4ba23fa758d6 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -884,7 +884,7 @@ void SbaXDataBrowserController::removeModelListeners(const Reference< XControlMo if (xColumns.is()) { sal_Int32 nCount = xColumns->getCount(); - for (sal_uInt16 i=0; i < nCount; ++i) + for (sal_Int32 i=0; i < nCount; ++i) { Reference< XPropertySet > xCol(xColumns->getByIndex(i),UNO_QUERY); RemoveColumnListener(xCol); @@ -2642,7 +2642,7 @@ void SbaXDataBrowserController::addColumnListeners(const Reference< ::com::sun:: if (xColumns.is()) { sal_Int32 nCount = xColumns->getCount(); - for (sal_uInt16 i=0; i < nCount; ++i) + for (sal_Int32 i=0; i < nCount; ++i) { Reference< XPropertySet > xCol(xColumns->getByIndex(i),UNO_QUERY); AddColumnListener(xCol); diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx index 803237f43289..9630d4473565 100644 --- a/dbaccess/source/ui/browser/exsrcbrw.cxx +++ b/dbaccess/source/ui/browser/exsrcbrw.cxx @@ -218,7 +218,7 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U Reference< XRowSet > xMasterForm; // search the arguments for the master form - for (sal_uInt16 i=0; i<aArgs.getLength(); ++i, ++pArguments) + for (sal_Int32 i=0; i<aArgs.getLength(); ++i, ++pArguments) { if ( (pArguments->Name == "MasterForm") && (pArguments->Value.getValueTypeClass() == TypeClass_INTERFACE) ) { diff --git a/dbaccess/source/ui/browser/formadapter.cxx b/dbaccess/source/ui/browser/formadapter.cxx index 5b2fbb54c2e9..a8da57849df5 100644 --- a/dbaccess/source/ui/browser/formadapter.cxx +++ b/dbaccess/source/ui/browser/formadapter.cxx @@ -1338,7 +1338,7 @@ Sequence< ::com::sun::star::beans::PropertyState> SAL_CALL SbaXFormAdapter::getP // set them all to DEFAULT Sequence< ::com::sun::star::beans::PropertyState> aReturn(aPropertyName.getLength()); ::com::sun::star::beans::PropertyState* pStates = aReturn.getArray(); - for (sal_uInt16 i=0; i<aPropertyName.getLength(); ++i, ++pStates) + for (sal_Int32 i=0; i<aPropertyName.getLength(); ++i, ++pStates) *pStates = ::com::sun::star::beans::PropertyState_DEFAULT_VALUE; return aReturn; } diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index c2509dcd00cd..e7fbbd4bfcef 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -430,7 +430,7 @@ void SAL_CALL SbaXGridPeer::dispatch(const URL& aURL, const Sequence< PropertyVa SolarMutexGuard aGuard; sal_Int16 nColId = -1; const PropertyValue* pArgs = aArgs.getConstArray(); - for (sal_uInt16 i=0; i<aArgs.getLength(); ++i, ++pArgs) + for (sal_Int32 i=0; i<aArgs.getLength(); ++i, ++pArgs) { if (pArgs->Name == "ColumnViewPos") { diff --git a/dbaccess/source/ui/browser/sbamultiplex.cxx b/dbaccess/source/ui/browser/sbamultiplex.cxx index 815f6745aff8..4f8bbe0a6933 100644 --- a/dbaccess/source/ui/browser/sbamultiplex.cxx +++ b/dbaccess/source/ui/browser/sbamultiplex.cxx @@ -86,7 +86,7 @@ void SbaXPropertiesChangeMultiplexer::propertiesChange(const ::com::sun::star::u ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyChangeEvent> aMulti(aEvts); ::com::sun::star::beans::PropertyChangeEvent* pMulti = aMulti.getArray(); - for (sal_uInt16 i=0; i<aMulti.getLength(); ++i, ++pMulti) + for (sal_Int32 i=0; i<aMulti.getLength(); ++i, ++pMulti) pMulti->Source = &m_rParent; ::cppu::OInterfaceIteratorHelper aIt(*this); diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx index 67d464ada188..a2490f3e4829 100644 --- a/dbaccess/source/ui/misc/DExport.cxx +++ b/dbaccess/source/ui/misc/DExport.cxx @@ -833,7 +833,7 @@ Reference< XPreparedStatement > ODatabaseExport::createPreparedStatment( const R ::std::vector< OUString> aInsertList; aInsertList.resize(aDestColumnNames.getLength()+1); sal_Int32 i = 0; - for(sal_uInt32 j=0; j < aInsertList.size() ;++i,++j) + for(size_t j=0; j < aInsertList.size() ;++i,++j) { ODatabaseExport::TPositions::const_iterator aFind = ::std::find_if(_rvColumns.begin(),_rvColumns.end(), ::o3tl::compose1(::std::bind2nd(::std::equal_to<sal_Int32>(),i+1),::o3tl::select2nd<ODatabaseExport::TPositions::value_type>())); diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 71df15d4e64c..ca24bc20c8ed 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -884,7 +884,7 @@ bool callColumnFormatDialog(vcl::Window* _pParent, { const sal_uInt32* pDeletedKeys = pInfoItem->GetDelArray(); - for (sal_uInt16 i=0; i< pInfoItem->GetDelCount(); ++i, ++pDeletedKeys) + for (sal_uInt32 i=0; i< pInfoItem->GetDelCount(); ++i, ++pDeletedKeys) _pFormatter->DeleteEntry(*pDeletedKeys); } } diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx index d9ca01bf3565..bfe001ab59c3 100644 --- a/dbaccess/source/ui/misc/WColumnSelect.cxx +++ b/dbaccess/source/ui/misc/WColumnSelect.cxx @@ -167,7 +167,7 @@ bool OWizColumnSelect::LeavePage() m_pParent->clearDestColumns(); - for(sal_uInt16 i=0 ; i< m_pNewColumnNames->GetEntryCount();++i) + for(sal_Int32 i=0 ; i< m_pNewColumnNames->GetEntryCount();++i) { OFieldDescription* pField = static_cast<OFieldDescription*>(m_pNewColumnNames->GetEntryData(i)); OSL_ENSURE(pField,"The field information can not be null!"); @@ -226,7 +226,7 @@ IMPL_LINK( OWizColumnSelect, ButtonClickHdl, Button *, pButton ) if(!bAll) { - for(sal_uInt16 i=0; i < pLeft->GetSelectEntryCount(); ++i) + for(sal_Int32 i=0; i < pLeft->GetSelectEntryCount(); ++i) moveColumn(pRight,pLeft,aRightColumns,pLeft->GetSelectEntry(i),sExtraChars,nMaxNameLen,aCase); for(sal_uInt16 j=pLeft->GetSelectEntryCount(); j ; --j) @@ -272,7 +272,7 @@ IMPL_LINK( OWizColumnSelect, ListDoubleClickHdl, ListBox *, pListBox ) ::std::vector< OUString> aRightColumns; fillColumns(pRight,aRightColumns); - for(sal_uInt16 i=0; i < pLeft->GetSelectEntryCount(); ++i) + for(sal_Int32 i=0; i < pLeft->GetSelectEntryCount(); ++i) moveColumn(pRight,pLeft,aRightColumns,pLeft->GetSelectEntry(i),sExtraChars,nMaxNameLen,aCase); for(sal_uInt16 j=pLeft->GetSelectEntryCount(); j ; --j) pLeft->RemoveEntry(pLeft->GetSelectEntry(j-1)); diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 8cdb1012d338..153579fdab2d 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -2303,7 +2303,7 @@ namespace OQueryController& rController = static_cast<OQueryController&>(_pView->getController()); EOrderDir eOrderDir; - for( sal_uInt32 i=0 ; i<pNode->count() ; i++ ) + for( size_t i=0 ; i<pNode->count() ; i++ ) { OTableFieldDescRef aDragLeft = new OTableFieldDesc(); eOrderDir = ORDER_ASC; diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index c474a19a6bbe..098ba2de4fda 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -2047,7 +2047,7 @@ void OSelectionBrowseBox::SetRowVisible(sal_uInt16 _nWhich, bool _bVis) long OSelectionBrowseBox::GetBrowseRow(long nRowId) const { sal_uInt16 nCount(0); - for(sal_uInt16 i = 0 ; i < nRowId ; ++i) + for(long i = 0 ; i < nRowId ; ++i) { if ( m_bVisibleRow[i] ) ++nCount; diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx index fddfb428e9a9..f0b29ecde2d4 100644 --- a/desktop/source/app/dispatchwatcher.cxx +++ b/desktop/source/app/dispatchwatcher.cxx @@ -709,7 +709,7 @@ bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatchRequ aArgs[1].Name = "SynchronMode"; aArgs[1].Value <<= sal_True; - for ( sal_uInt32 n = 0; n < aDispatches.size(); n++ ) + for ( size_t n = 0; n < aDispatches.size(); n++ ) { Reference< XDispatch > xDispatch = aDispatches[n].xDispatch; Reference < XNotifyingDispatch > xDisp( xDispatch, UNO_QUERY ); diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index 74f61742e230..ef8517c340e5 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -253,7 +253,7 @@ bool MigrationImpl::doMigration() const OUString sMenubarResourceURL("private:resource/menubar/menubar"); const OUString sToolbarResourcePre("private:resource/toolbar/"); - for (sal_uInt32 i=0; i<vModulesInfo.size(); ++i) + for (size_t i=0; i<vModulesInfo.size(); ++i) { OUString sModuleIdentifier = mapModuleShortNameToIdentifier(vModulesInfo[i].sModuleShortName); if (sModuleIdentifier.isEmpty()) @@ -1322,7 +1322,7 @@ void NewVersionUIInfo::init(const ::std::vector< MigrationModuleInfo >& vModules uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier = ui::theModuleUIConfigurationManagerSupplier::get( ::comphelper::getProcessComponentContext() ); - for (sal_uInt32 i=0; i<vModulesInfo.size(); ++i) + for (size_t i=0; i<vModulesInfo.size(); ++i) { OUString sModuleIdentifier = mapModuleShortNameToIdentifier(vModulesInfo[i].sModuleShortName); if (!sModuleIdentifier.isEmpty()) diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx index ef82a5bac06c..eb1b0052f085 100644 --- a/desktop/source/migration/services/oo3extensionmigration.cxx +++ b/desktop/source/migration/services/oo3extensionmigration.cxx @@ -258,7 +258,7 @@ bool OO3ExtensionMigration::scanDescriptionXml( const OUString& sDescriptionXmlU if ( !aExtIdentifier.isEmpty() ) { // scan extension identifier and try to match with our black list entries - for ( sal_uInt32 i = 0; i < m_aBlackList.size(); i++ ) + for ( size_t i = 0; i < m_aBlackList.size(); i++ ) { utl::SearchParam param(m_aBlackList[i], utl::SearchParam::SRCH_REGEXP); utl::TextSearch ts(param, LANGUAGE_DONTKNOW); @@ -283,7 +283,7 @@ bool OO3ExtensionMigration::scanDescriptionXml( const OUString& sDescriptionXmlU // Try to use the folder name to match our black list // as some extensions don't provide an identifier in the // description.xml! - for ( sal_uInt32 i = 0; i < m_aBlackList.size(); i++ ) + for ( size_t i = 0; i < m_aBlackList.size(); i++ ) { utl::SearchParam param(m_aBlackList[i], utl::SearchParam::SRCH_REGEXP); utl::TextSearch ts(param, LANGUAGE_DONTKNOW); diff --git a/extensions/source/bibliography/bibconfig.cxx b/extensions/source/bibliography/bibconfig.cxx index 86157c8bf031..649ff8affbe3 100644 --- a/extensions/source/bibliography/bibconfig.cxx +++ b/extensions/source/bibliography/bibconfig.cxx @@ -159,7 +159,7 @@ BibConfig::BibConfig() Sequence<OUString> aAssignmentPropertyNames(aAssignmentNodeNames.getLength() * 2); OUString* pAssignmentPropertyNames = aAssignmentPropertyNames.getArray(); sal_Int16 nFieldIdx = 0; - for(sal_Int16 nField = 0; nField < aAssignmentNodeNames.getLength(); nField++) + for(sal_Int32 nField = 0; nField < aAssignmentNodeNames.getLength(); nField++) { OUString sSubPrefix(sPrefix); sSubPrefix += "/"; @@ -294,7 +294,7 @@ void BibConfig::ImplCommit() const Mapping* BibConfig::GetMapping(const BibDBDescriptor& rDesc) const { - for(sal_uInt16 i = 0; i < pMappingsArr->size(); i++) + for(size_t i = 0; i < pMappingsArr->size(); i++) { Mapping& rMapping = (*pMappingsArr)[i]; bool bURLEqual = rDesc.sDataSource.equals(rMapping.sURL); @@ -306,7 +306,7 @@ const Mapping* BibConfig::GetMapping(const BibDBDescriptor& rDesc) const void BibConfig::SetMapping(const BibDBDescriptor& rDesc, const Mapping* pSetMapping) { - for(sal_uInt16 i = 0; i < pMappingsArr->size(); i++) + for(size_t i = 0; i < pMappingsArr->size(); i++) { Mapping& rMapping = (*pMappingsArr)[i]; bool bURLEqual = rDesc.sDataSource.equals(rMapping.sURL); diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx index 8f5871cd1549..a1fc5b8c76b8 100644 --- a/extensions/source/bibliography/datman.cxx +++ b/extensions/source/bibliography/datman.cxx @@ -354,7 +354,7 @@ MappingDialog_Impl::MappingDialog_Impl(vcl::Window* pParent, BibDataManager* pMa aListBoxes[0]->SetSelectHdl(aLnk); for(sal_uInt16 i = 1; i < COLUMN_COUNT; i++) { - for(sal_uInt16 j = 0; j < aListBoxes[0]->GetEntryCount();j++) + for(sal_Int32 j = 0; j < aListBoxes[0]->GetEntryCount();j++) aListBoxes[i]->InsertEntry(aListBoxes[0]->GetEntry(j)); aListBoxes[i]->SelectEntryPos(0); aListBoxes[i]->SetSelectHdl(aLnk); @@ -581,7 +581,7 @@ void BibInterceptorHelper::ReleaseInterceptor() Sequence< Reference< XDispatch> > aReturn( aDescripts.getLength() ); Reference< XDispatch >* pReturn = aReturn.getArray(); const 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/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx index d2f252c84b2f..ddedd34ec9da 100644 --- a/extensions/source/bibliography/toolbar.cxx +++ b/extensions/source/bibliography/toolbar.cxx @@ -518,7 +518,7 @@ IMPL_LINK_NOARG_TYPED( BibToolBar, MenuHdl, ToolBox*, void) void BibToolBar::statusChanged(const frame::FeatureStateEvent& rEvent) throw( uno::RuntimeException ) { - for(sal_uInt16 i = 0; i < aListenerArr.size(); i++) + for(size_t i = 0; i < aListenerArr.size(); i++) { BibToolBarListenerRef* pListener = &aListenerArr[i]; (*pListener)->statusChanged(rEvent); diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx index 822839a6354e..48a27d87348a 100644 --- a/extensions/source/dbpilots/commonpagesdbp.cxx +++ b/extensions/source/dbpilots/commonpagesdbp.cxx @@ -137,7 +137,7 @@ namespace dbp OSL_VERIFY( rContext.xForm->getPropertyValue("CommandType") >>= nCommandType ); // search the entry of the given type with the given name - for ( sal_uInt16 nLookup = 0; nLookup < m_pTable->GetEntryCount(); ++nLookup ) + for ( sal_Int32 nLookup = 0; nLookup < m_pTable->GetEntryCount(); ++nLookup ) { if (sCommand.equals(m_pTable->GetEntry(nLookup))) { diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx index eb8b8e1276f3..e6bc4d9d6339 100644 --- a/extensions/source/dbpilots/groupboxwiz.cxx +++ b/extensions/source/dbpilots/groupboxwiz.cxx @@ -251,7 +251,7 @@ namespace dbp rSettings.aValues.clear(); rSettings.aLabels.reserve(m_pExistingRadios->GetEntryCount()); rSettings.aValues.reserve(m_pExistingRadios->GetEntryCount()); - for (::svt::WizardTypes::WizardState i=0; i<m_pExistingRadios->GetEntryCount(); ++i) + for (sal_Int32 i=0; i<m_pExistingRadios->GetEntryCount(); ++i) { rSettings.aLabels.push_back(m_pExistingRadios->GetEntry(i)); rSettings.aValues.push_back(OUString::number((i + 1))); diff --git a/extensions/source/plugin/base/manager.cxx b/extensions/source/plugin/base/manager.cxx index 84d45719d4c6..c78cb0f928b0 100644 --- a/extensions/source/plugin/base/manager.cxx +++ b/extensions/source/plugin/base/manager.cxx @@ -90,7 +90,7 @@ const Sequence< OUString >& PluginManager::getAdditionalSearchPaths() { sal_Int32 nPaths = comphelper::string::getTokenCount(aPluginPath, ';'); aPaths.realloc( nPaths ); - for( sal_uInt16 i = 0; i < nPaths; i++ ) + for( sal_Int32 i = 0; i < nPaths; i++ ) aPaths.getArray()[i] = aPluginPath.getToken(i, ';'); } } diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index 2bd9564d2098..d22cec4914c7 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -474,7 +474,7 @@ namespace pcr m_aVScroll->SetPosSizePixel( aVScrollPos, aVScrollSize ); } - for ( sal_uInt16 i = 0; i < m_aLines.size(); ++i ) + for ( size_t i = 0; i < m_aLines.size(); ++i ) m_aOutOfDateLines.insert( i ); // repaint diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 53a9bd4ddbf0..7a8a026e891e 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -2744,7 +2744,7 @@ namespace pcr { const sal_uInt32* pDeletedKeys = pInfoItem->GetDelArray(); - for (sal_uInt16 i=0; i< pInfoItem->GetDelCount(); ++i, ++pDeletedKeys) + for (sal_uInt32 i=0; i< pInfoItem->GetDelCount(); ++i, ++pDeletedKeys) pFormatter->DeleteEntry(*pDeletedKeys); } diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index 9cf73d7fd299..ed4d1df0bf0f 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -683,7 +683,7 @@ namespace pcr if ( pColorList.is() ) { - for (sal_uInt16 i = 0; i < pColorList->Count(); ++i) + for (long i = 0; i < pColorList->Count(); ++i) { XColorEntry* pEntry = pColorList->GetColor( i ); getTypedControlWindow()->InsertEntry( pEntry->GetColor(), pEntry->GetName() ); diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx index 6fa2dc7b88bc..496542f42fad 100644 --- a/extensions/source/scanner/grid.cxx +++ b/extensions/source/scanner/grid.cxx @@ -525,7 +525,7 @@ void GridWindow::drawNew(vcl::RenderContext& rRenderContext) void GridWindow::drawHandles(vcl::RenderContext& rRenderContext) { - for(sal_uInt32 i(0L); i < m_aHandles.size(); i++) + for(size_t i(0L); i < m_aHandles.size(); i++) { m_aHandles[i].draw(rRenderContext, m_aMarkerBitmap); } @@ -678,7 +678,7 @@ void GridWindow::ChangeMode(int nType) if (m_pNewYValues) { - for(sal_uInt32 i(0L); i < m_aHandles.size(); i++) + for(size_t i(0); i < m_aHandles.size(); i++) { // find nearest xvalue double x, y; diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index 0aee63fdc57d..57e80bbc829d 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -426,7 +426,7 @@ void SaneDlg::InitFields() // workaround: offer at least some more standard dpi resolution between // min and max value int bGot300 = 0; - for ( int nRes = (long) pDouble[0] * 2; nRes < (long) pDouble[1]; nRes = nRes * 2 ) + for ( long nRes = (long) pDouble[0] * 2; nRes < (long) pDouble[1]; nRes = nRes * 2 ) { if ( !bGot300 && nRes > 300 ) { nRes = 300; bGot300 = 1; diff --git a/helpcompiler/source/HelpCompiler.cxx b/helpcompiler/source/HelpCompiler.cxx index a45b3567b448..2f67295783c5 100644 --- a/helpcompiler/source/HelpCompiler.cxx +++ b/helpcompiler/source/HelpCompiler.cxx @@ -464,7 +464,7 @@ bool HelpCompiler::compile() std::string title; // returns a clone of the document with switch-cases resolved std::string appl = module.substr(1); - for (unsigned int i = 0; i < appl.length(); ++i) + for (size_t i = 0; i < appl.length(); ++i) { appl[i]=toupper(appl[i]); } diff --git a/i18npool/source/collator/collatorImpl.cxx b/i18npool/source/collator/collatorImpl.cxx index 2c931443a630..6d64b2fd3a71 100644 --- a/i18npool/source/collator/collatorImpl.cxx +++ b/i18npool/source/collator/collatorImpl.cxx @@ -74,7 +74,7 @@ sal_Int32 SAL_CALL CollatorImpl::loadDefaultCollator(const lang::Locale& rLocale, sal_Int32 collatorOptions) throw(RuntimeException, std::exception) { const Sequence< Implementation > &imp = mxLocaleData->getCollatorImplementations(rLocale); - for (sal_Int16 i = 0; i < imp.getLength(); i++) + for (sal_Int32 i = 0; i < imp.getLength(); i++) if (imp[i].isDefault) return loadCollatorAlgorithm(imp[i].unoID, rLocale, collatorOptions); diff --git a/i18npool/source/indexentry/indexentrysupplier_default.cxx b/i18npool/source/indexentry/indexentrysupplier_default.cxx index 7fccfb4e1cfd..69f5aeb48c6d 100644 --- a/i18npool/source/indexentry/indexentrysupplier_default.cxx +++ b/i18npool/source/indexentry/indexentrysupplier_default.cxx @@ -271,7 +271,7 @@ void Index::init(const lang::Locale &rLocale, const OUString& algorithm) throw ( sal_Int16 j=0; sal_Unicode start = unicode::getUnicodeScriptStart((UnicodeScript)0); sal_Unicode end = unicode::getUnicodeScriptEnd((UnicodeScript)0); - for (sal_Int16 i= (scriptList[0] == (UnicodeScript)0) ? 1 : 0; i< scriptList.getLength(); i++) { + for (sal_Int32 i= (scriptList[0] == (UnicodeScript)0) ? 1 : 0; i< scriptList.getLength(); i++) { if (unicode::getUnicodeScriptStart(scriptList[i]) != end+1) { tables[j++].init(start, end, keys, key_count, this); start = unicode::getUnicodeScriptStart(scriptList[i]); diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx index 08cc318dfa6c..9ecf2754749b 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx @@ -626,7 +626,7 @@ void DomainMapperTableManager::endOfRowAction() // a grid of "20:40:20" and it doesn't have to do something with the tableWidth // -> so we have get the sum of each grid entry for the fullWidthRelative: int nFullWidthRelative = 0; - for (unsigned int i = 0 ; i < (*pTableGrid.get()).size(); i++ ) + for (size_t i = 0 ; i < (*pTableGrid.get()).size(); i++ ) nFullWidthRelative += (*pTableGrid.get())[ i ]; if( pTableGrid->size() == ( m_nGridBefore + nGrids + m_nGridAfter ) && m_nCell.back( ) > 0 ) @@ -664,7 +664,7 @@ void DomainMapperTableManager::endOfRowAction() throw o3tl::divide_by_zero(); ::std::vector< sal_Int32 >::const_iterator aSpansIter = pCurrentSpans->begin( ); - for( sal_uInt32 nBorder = 0; nBorder < nWidthsBound; ++nBorder ) + for( size_t nBorder = 0; nBorder < nWidthsBound; ++nBorder ) { double fGridWidth = 0.; for ( sal_Int32 nGridCount = *aSpansIter; nGridCount > 0; --nGridCount ) @@ -707,7 +707,7 @@ void DomainMapperTableManager::endOfRowAction() sal_uInt32 nPos = 0; // Avoid divide by zero (if there's no grid, position using cell widths). if( nFullWidthRelative == 0 ) - for (sal_uInt32 i = 0; i < pCellWidths->size(); ++i) + for (size_t i = 0; i < pCellWidths->size(); ++i) nFullWidthRelative += (*pCellWidths.get())[i]; size_t nWidthsBound = pCellWidths->size() - 1; @@ -716,7 +716,7 @@ void DomainMapperTableManager::endOfRowAction() if (nFullWidthRelative == 0) throw o3tl::divide_by_zero(); - for (sal_uInt32 i = 0; i < nWidthsBound; ++i) + for (size_t i = 0; i < nWidthsBound; ++i) { nSum += (*pCellWidths.get())[i]; pSeparators[nPos].Position = (nSum * 10000) / nFullWidthRelative; // Relative position diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index 211d2a0cd49d..a732d0201610 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -1239,7 +1239,7 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) const StyleSheetEntryPtr StyleSheetTable::FindStyleSheetByISTD(const OUString& sIndex) { StyleSheetEntryPtr pRet; - for( sal_uInt32 nPos = 0; nPos < m_pImpl->m_aStyleSheetEntries.size(); ++nPos ) + for( size_t nPos = 0; nPos < m_pImpl->m_aStyleSheetEntries.size(); ++nPos ) { if( m_pImpl->m_aStyleSheetEntries[nPos]->sStyleIdentifierD == sIndex) { @@ -1254,7 +1254,7 @@ const StyleSheetEntryPtr StyleSheetTable::FindStyleSheetByISTD(const OUString& s const StyleSheetEntryPtr StyleSheetTable::FindStyleSheetByStyleName(const OUString& sIndex) { StyleSheetEntryPtr pRet; - for( sal_uInt32 nPos = 0; nPos < m_pImpl->m_aStyleSheetEntries.size(); ++nPos ) + for( size_t nPos = 0; nPos < m_pImpl->m_aStyleSheetEntries.size(); ++nPos ) { if( m_pImpl->m_aStyleSheetEntries[nPos]->sStyleName == sIndex) { @@ -1269,7 +1269,7 @@ const StyleSheetEntryPtr StyleSheetTable::FindStyleSheetByStyleName(const OUStri const StyleSheetEntryPtr StyleSheetTable::FindStyleSheetByConvertedStyleName(const OUString& sIndex) { StyleSheetEntryPtr pRet; - for( sal_uInt32 nPos = 0; nPos < m_pImpl->m_aStyleSheetEntries.size(); ++nPos ) + for( size_t nPos = 0; nPos < m_pImpl->m_aStyleSheetEntries.size(); ++nPos ) { if( m_pImpl->m_aStyleSheetEntries[nPos]->sConvertedStyleName == sIndex) { |