idl/source/objects/module.cxx               |    2 +-
 idl/source/objects/object.cxx               |    2 +-
 idl/source/objects/slot.cxx                 |    2 +-
 reportdesign/source/ui/report/dlgedfunc.cxx |    4 ++--
 sc/source/core/tool/chartpos.cxx            |    7 +++----
 sc/source/filter/excel/xiname.cxx           |    2 +-
 sd/source/core/drawdoc_animations.cxx       |    2 +-
 sw/source/filter/xml/xmltbli.cxx            |    4 ++--
 vcl/source/window/toolbox2.cxx              |    4 ++--
 9 files changed, 14 insertions(+), 15 deletions(-)

New commits:
commit a88effc4f53da8ae476f6a9f24b96e5948b17bee
Author:     Bayram Çiçek <m...@bayramcicek.com.tr>
AuthorDate: Sun Feb 14 19:11:12 2021 +0000
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Thu Mar 11 11:37:49 2021 +0100

    tdf#114441: Convert use of sal_uLong to better integer types
    
    Change-Id: Ibb432c3db6d99343514c412c4c1b968808b733c8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110886
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx
index 17c483a3243e..e97dd29d651c 100644
--- a/idl/source/objects/module.cxx
+++ b/idl/source/objects/module.cxx
@@ -26,7 +26,7 @@ SvMetaModule::SvMetaModule() {}
 
 void SvMetaModule::WriteSfx(SvIdlDataBase& rBase, SvStream& rOutStm)
 {
-    for (sal_uLong n = 0; n < aClassList.size(); n++)
+    for (size_t n = 0; n < aClassList.size(); n++)
     {
         SvMetaClass* pClass = aClassList[n];
         pClass->WriteSfx(rBase, rOutStm);
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index a424bb748044..1c8299b132d4 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -106,7 +106,7 @@ bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, 
SvTokenStream & rInStm,
         SAL_WARN( "idl", "new slot : " << rAttr.GetSlotId().getString() );
     }
 
-    for( sal_uLong n = 0; n < aAttrList.size(); n++ )
+    for( size_t n = 0; n < aAttrList.size(); n++ )
     {
         SvMetaAttribute * pS = aAttrList[n];
         if( pS->GetName() == rAttr.GetName() )
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index 30b6b1fe0eca..fcdbbb8e95d0 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -579,7 +579,7 @@ sal_uInt16 SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & 
rBase, SvStream & rO
 
         const SvRefMemberList<SvMetaAttribute *>& rList =
                     pType->GetAttrList();
-        for( sal_uLong n = 0; n < rList.size(); n++ )
+        for( size_t n = 0; n < rList.size(); n++ )
         {
             SvMetaAttribute * pPar  = rList[n];
             SvMetaType * pPType     = pPar->GetType();
diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx 
b/reportdesign/source/ui/report/dlgedfunc.cxx
index 4e653cb87930..d2be2d012406 100644
--- a/reportdesign/source/ui/report/dlgedfunc.cxx
+++ b/reportdesign/source/ui/report/dlgedfunc.cxx
@@ -411,8 +411,8 @@ void DlgEdFunc::deactivateOle(bool _bSelect)
 {
     OLEObjCache& rObjCache = GetSdrGlobalData().GetOLEObjCache();
     OReportController& rController = 
m_pParent->getSectionWindow()->getViewsWindow()->getView()->getReportView()->getController();
-    const sal_uLong nCount = rObjCache.size();
-    for(sal_uLong i = 0 ; i< nCount;++i)
+    const size_t nCount = rObjCache.size();
+    for(size_t i = 0 ; i < nCount;++i)
     {
         SdrOle2Obj* pObj = rObjCache[i];
         if ( m_pParent->getPage() == pObj->getSdrPageFromSdrObject() )
diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx
index 48e734ec2454..aee7df6583b6 100644
--- a/sc/source/core/tool/chartpos.cxx
+++ b/sc/source/core/tool/chartpos.cxx
@@ -422,11 +422,10 @@ void ScChartPositioner::CreatePositionMap()
         if ( bNoGlue )
         {   // fill gaps with Dummies, first column is master
             RowMap& rFirstCol = aColMap.begin()->second;
-            sal_uLong nCount = rFirstCol.size();
-            RowMap::const_iterator it1 = rFirstCol.begin();
-            for ( sal_uLong n = 0; n < nCount; n++, ++it1 )
+
+            for ( auto& it1 : rFirstCol )
             {
-                sal_uLong nKey = it1->first;
+                sal_uLong nKey = it1.first;
                 for (ColumnMap::iterator it2 = ++aColMap.begin(); it2 != 
aColMap.end(); ++it2 )
                     it2->second.emplace( nKey, nullptr ); // no data
             }
diff --git a/sc/source/filter/excel/xiname.cxx 
b/sc/source/filter/excel/xiname.cxx
index 11d1d753963a..d498dfba492c 100644
--- a/sc/source/filter/excel/xiname.cxx
+++ b/sc/source/filter/excel/xiname.cxx
@@ -282,7 +282,7 @@ XclImpNameManager::XclImpNameManager( const XclImpRoot& 
rRoot ) :
 
 void XclImpNameManager::ReadName( XclImpStream& rStrm )
 {
-    sal_uLong nCount = maNameList.size();
+    size_t nCount = maNameList.size();
     if( nCount < 0xFFFF )
         maNameList.push_back( std::make_unique<XclImpName>( rStrm, 
static_cast< sal_uInt16 >( nCount + 1 ) ) );
 }
diff --git a/sd/source/core/drawdoc_animations.cxx 
b/sd/source/core/drawdoc_animations.cxx
index 9fab403d50b5..b7f1bd5570f4 100644
--- a/sd/source/core/drawdoc_animations.cxx
+++ b/sd/source/core/drawdoc_animations.cxx
@@ -34,7 +34,7 @@ void SdDrawDocument::ReplacePageInCustomShows(const SdPage* 
pOldPage, const SdPa
 {
     if (mpCustomShowList)
     {
-        for (sal_uLong i = 0; i < mpCustomShowList->size(); i++)
+        for (size_t i = 0; i < mpCustomShowList->size(); i++)
         {
             SdCustomShow* pCustomShow = (*mpCustomShowList)[i].get();
             pCustomShow->ReplacePage(pOldPage, pNewPage);
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index bded70ce03dd..e1deda38e2fa 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -2177,7 +2177,7 @@ void SwXMLTableContext::MakeTable_( SwTableBox *pBox )
     {
         SwXMLTableRow_Impl *pPrevRow = (*m_pRows)[m_nCurRow - 1U].get();
         const SwXMLTableCell_Impl *pCell;
-        for( sal_uLong i = 0; i < m_aColumnWidths.size(); ++i )
+        for( size_t i = 0; i < m_aColumnWidths.size(); ++i )
         {
             pCell = pPrevRow->GetCell(i);
             if( pCell->GetRowSpan() > 1 )
@@ -2185,7 +2185,7 @@ void SwXMLTableContext::MakeTable_( SwTableBox *pBox )
                 FixRowSpan( m_nCurRow-1, i, 1UL );
             }
         }
-        for (sal_uLong i = m_pRows->size() - 1; i >= m_nCurRow; --i)
+        for (size_t i = m_pRows->size() - 1; i >= m_nCurRow; --i)
             m_pRows->pop_back();
     }
 
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 4cae6f2ca758..3dd2b5979546 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1418,7 +1418,7 @@ tools::Rectangle ToolBox::GetCharacterBounds( sal_uInt16 
nItemID, tools::Long nI
         ImplFillLayoutData();
     if( mpData->m_pLayoutData )
     {
-        for( sal_uLong i = 0; i < 
mpData->m_pLayoutData->m_aLineItemIds.size(); i++ )
+        for( size_t i = 0; i < mpData->m_pLayoutData->m_aLineItemIds.size(); 
i++ )
         {
             if( mpData->m_pLayoutData->m_aLineItemIds[i] == nItemID )
             {
@@ -1439,7 +1439,7 @@ tools::Long ToolBox::GetIndexForPoint( const Point& 
rPoint, sal_uInt16& rItemID
     if( mpData->m_pLayoutData )
     {
         nIndex = mpData->m_pLayoutData->GetIndexForPoint( rPoint );
-        for( sal_uLong i = 0; i < 
mpData->m_pLayoutData->m_aLineIndices.size(); i++ )
+        for( size_t i = 0; i < mpData->m_pLayoutData->m_aLineIndices.size(); 
i++ )
         {
             if( mpData->m_pLayoutData->m_aLineIndices[i] <= nIndex &&
                 (i == mpData->m_pLayoutData->m_aLineIndices.size()-1 || 
mpData->m_pLayoutData->m_aLineIndices[i+1] > nIndex) )
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to