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@cib.de>
Tested-by: Jenkins
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index aba17d4..1247d6c 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -2580,8 +2580,8 @@
        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 ff32346..403d748 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -358,9 +358,9 @@

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 286b74b..72a743f 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -2093,7 +2093,7 @@
        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 @@
            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)));