[Libreoffice-commits] core.git: sfx2/source svx/source

Yusuf Keten (via logerrit) logerrit at kemper.freedesktop.org
Mon Jan 13 13:05:18 UTC 2020


 sfx2/source/doc/doctemplates.cxx |    4 ++--
 svx/source/dialog/charmap.cxx    |    4 ++--
 svx/source/svdraw/svdedtv2.cxx   |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit c7de89df5efc4b2af1f81c00befcc957a7e22ca6
Author:     Yusuf Keten <ketenyusuf at gmail.com>
AuthorDate: Sat Jan 4 15:30:01 2020 +0300
Commit:     Michael Stahl <michael.stahl at cib.de>
CommitDate: Mon Jan 13 14:04:42 2020 +0100

    tdf#75280 Convert inappropriate use of sal_uIntPtr to better integer types
    
    Change-Id: Ia45fb0bc882411fe0bfcd1e83932d187b4873ab0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86214
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    Tested-by: Jenkins

diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index aba17d40360b..1247d6cfab88 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -2580,8 +2580,8 @@ void SfxDocTplService_Impl::addGroupToHierarchy( GroupData_Impl *pGroup )
         setProperty( aGroup, TARGET_DIR_URL, makeAny( pGroup->getTargetURL() ) );
         pGroup->setHierarchyURL( aNewGroupURL );
 
-        sal_uIntPtr nCount = pGroup->count();
-        for ( sal_uIntPtr i=0; i<nCount; i++ )
+        size_t nCount = pGroup->count();
+        for ( size_t i = 0; i < nCount; i++ )
         {
             DocTemplates_EntryData_Impl *pData = pGroup->getEntry( i );
             addToHierarchy( pGroup, pData ); // add entry to hierarchy
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index ff323461cfa5..403d748a231e 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -358,9 +358,9 @@ int SvxShowCharSet::FirstInView() const
 
 int SvxShowCharSet::LastInView() const
 {
-    sal_uIntPtr nIndex = FirstInView();
+    sal_uInt32 nIndex = FirstInView();
     nIndex += ROW_COUNT * COLUMN_COUNT - 1;
-    sal_uIntPtr nCompare = sal::static_int_cast<sal_uIntPtr>(mxFontCharMap->GetCharCount() - 1);
+    sal_uInt32 nCompare = mxFontCharMap->GetCharCount() - 1;
     if (nIndex > nCompare)
         nIndex = nCompare;
     return nIndex;
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 286b74bb5a23..72a743fda6c8 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -2093,7 +2093,7 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo)
         SdrPageView* pPV=pM->GetPageView();
         SdrObjList*  pOL=pObj->getParentSdrObjListFromSdrObject();
         const size_t nInsPos=pObj->GetOrdNum()+1;
-        sal_uIntPtr      nInsCnt=0;
+        size_t      nInsCnt=0;
         tools::Rectangle aLogicRect;
 
         SdrGrafObj*  pGraf = dynamic_cast<SdrGrafObj*>( pObj );
@@ -2142,7 +2142,7 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo)
             if (aGeoStat.nRotationAngle)
                 aGeoStat.RecalcSinCos();
 
-            for (sal_uIntPtr i = 0; i < nInsCnt; i++)
+            for (size_t i = 0; i < nInsCnt; i++)
             {
                 if (bUndo)
                     AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pOL->GetObj(nObj)));


More information about the Libreoffice-commits mailing list