tdf#96505: Get rid of cargo cult long integer literals

I checked return values.
Long variables didn't affect the calculation.

Change-Id: I1d5b5cffa291c20f7940dc14efa05cc64f3ff1ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87499
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 54e6122..a76a6e82 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1197,8 +1197,8 @@
                Size     OutputSize (rOutDev.LogicToPixel(Size(aOutRect.GetWidth(),
                                                            aOutRect.GetHeight()), MapMode(MapUnit::Map100thMM)));
                Size     GraphicSize (rOutDev.LogicToPixel(aSize, MapMode(MapUnit::Map100thMM)));
                sal_uInt16 nZ = sal::static_int_cast<sal_uInt16>(std::min(long(Fraction(OutputSize.Width()  * 100L, GraphicSize.Width())),
                                                                          long(Fraction(OutputSize.Height() * 100L, GraphicSize.Height()))));
                sal_uInt16 nZ = sal::static_int_cast<sal_uInt16>(std::min(long(Fraction(OutputSize.Width()  * 100, GraphicSize.Width())),
                                                                          long(Fraction(OutputSize.Height() * 100, GraphicSize.Height()))));
                nZ -= 10;
                Fraction aFraction (std::max(MINZOOM, std::min(MAXZOOM, nZ)), 100);

@@ -2019,8 +2019,8 @@
            Size       OutputSize(pPrinter->LogicToPixel(Size(OutputRect.GetWidth(),
                                                              OutputRect.GetHeight()), aMap));
            Size       GraphicSize(pPrinter->LogicToPixel(GetDoc()->GetSize(), aMap));
            sal_uInt16 nZ = sal::static_int_cast<sal_uInt16>(std::min(long(Fraction(OutputSize.Width()  * 100L, GraphicSize.Width())),
                                                                      long(Fraction(OutputSize.Height() * 100L, GraphicSize.Height()))));
            sal_uInt16 nZ = sal::static_int_cast<sal_uInt16>(std::min(long(Fraction(OutputSize.Width()  * 100, GraphicSize.Width())),
                                                                      long(Fraction(OutputSize.Height() * 100, GraphicSize.Height()))));
            mpGraphic->SetZoom (nZ);
            break;
        }
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
index a950046..dcf3649 100644
--- a/starmath/source/visitors.cxx
+++ b/starmath/source/visitors.cxx
@@ -406,7 +406,7 @@
    // _unscaled_ font height to be used, we use that to calculate the
    // bar height. Thus it is independent of the arguments height.
    // ( see display of sqrt QQQ versus sqrt stack{Q#Q#Q#Q} )
    long nBarHeight = pNode->GetWidth( ) * 7L / 100L;
    long nBarHeight = pNode->GetWidth( ) * 7 / 100;
    long nBarWidth = pNode->GetBodyWidth( ) + pNode->GetBorderWidth( );
    Point aBarOffset( pNode->GetWidth( ), +pNode->GetBorderWidth( ) );
    Point aBarPos( maPosition + aBarOffset );
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index 38c9314..27c5d3a 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -676,7 +676,7 @@
        // Prepare Color comparison array
        for( i = 0; i < nCount; i++ )
        {
            long nTol = ( pTols[i] * 255L ) / 100L;
            long nTol = ( pTols[i] * 255 ) / 100;

            long nVal = static_cast<long>(pSrcCols[i].GetRed());
            pMinR[i] = std::max( nVal - nTol, 0L );
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index 1ca7148..fe08cad 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -631,7 +631,7 @@
        if( aGraphic.GetType() == GraphicType::Bitmap )
        {
            const Bitmap & rBmp( aGraphic.GetBitmapEx().GetBitmap() );
            const long  nTol = static_cast<long>(m_xMtfTolerance->get_value(FieldUnit::PERCENT) * 255L / 100L);
            const long  nTol = static_cast<long>(m_xMtfTolerance->get_value(FieldUnit::PERCENT) * 255 / 100);

            aMask = rBmp.CreateMask( rColor, nTol );

diff --git a/svx/source/dialog/framelinkarray.cxx b/svx/source/dialog/framelinkarray.cxx
index c94bd58..752778b 100644
--- a/svx/source/dialog/framelinkarray.cxx
+++ b/svx/source/dialog/framelinkarray.cxx
@@ -246,10 +246,10 @@
{
    // default-construct all vectors
    maCells.resize( mnWidth * mnHeight );
    maWidths.resize( mnWidth, 0L );
    maHeights.resize( mnHeight, 0L );
    maXCoords.resize( mnWidth + 1, 0L );
    maYCoords.resize( mnHeight + 1, 0L );
    maWidths.resize( mnWidth, 0 );
    maHeights.resize( mnHeight, 0 );
    maXCoords.resize( mnWidth + 1, 0 );
    maYCoords.resize( mnHeight + 1, 0 );
}

const Cell& ArrayImpl::GetCell( size_t nCol, size_t nRow ) const
diff --git a/svx/source/sdr/animation/scheduler.cxx b/svx/source/sdr/animation/scheduler.cxx
index a9e93d0..0efac9e 100644
--- a/svx/source/sdr/animation/scheduler.cxx
+++ b/svx/source/sdr/animation/scheduler.cxx
@@ -100,7 +100,7 @@
            {
                mnDeltaTime = mvEvents.front()->GetTime() - mnTime;

                if(0L != mnDeltaTime)
                if(0 != mnDeltaTime)
                {
                    SetTimeout(mnDeltaTime);
                    Start();
diff --git a/svx/source/sdr/contact/viewcontactofsdrobj.cxx b/svx/source/sdr/contact/viewcontactofsdrobj.cxx
index cf5bd08..7202555 100644
--- a/svx/source/sdr/contact/viewcontactofsdrobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrobj.cxx
@@ -72,7 +72,7 @@
        return GetSdrObject().GetSubList()->GetObjCount();
    }

    return 0L;
    return 0;
}

ViewContact& ViewContactOfSdrObj::GetViewContact(sal_uInt32 nIndex) const
diff --git a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
index 5da45ea..aac3803 100644
--- a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
@@ -229,11 +229,11 @@
            const basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(aPageBound));

            // add replacement fill
            xPageContent[0L] = drawinglayer::primitive2d::Primitive2DReference(
            xPageContent[0] = drawinglayer::primitive2d::Primitive2DReference(
                new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(basegfx::B2DPolyPolygon(aOutline), aDocColor.getBColor()));

            // add replacement border
            xPageContent[1L] = drawinglayer::primitive2d::Primitive2DReference(
            xPageContent[1] = drawinglayer::primitive2d::Primitive2DReference(
                new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aBorderColor.getBColor()));
        }
        else
diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx
index 1e6102f..fc9c069 100644
--- a/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx
@@ -464,8 +464,8 @@
        const Size aFine(rView.GetGridFine());
        const double fWidthX(aRaw.getWidth());
        const double fWidthY(aRaw.getHeight());
        const sal_uInt32 nSubdivisionsX(aFine.getWidth() ? aRaw.getWidth() / aFine.getWidth() : 0L);
        const sal_uInt32 nSubdivisionsY(aFine.getHeight() ? aRaw.getHeight() / aFine.getHeight() : 0L);
        const sal_uInt32 nSubdivisionsX(aFine.getWidth() ? aRaw.getWidth() / aFine.getWidth() : 0);
        const sal_uInt32 nSubdivisionsY(aFine.getHeight() ? aRaw.getHeight() / aFine.getHeight() : 0);

        xRetval.resize(1);
        xRetval[0] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::GridPrimitive2D(