[Libreoffice-commits] core.git: Branch 'distro/collabora/cd-5.3' - basegfx/source basic/source chart2/source connectivity/source cui/source drawinglayer/source editeng/source extensions/source filter/source forms/source include/basegfx include/svtools include/svx include/tools include/vcl include/xmloff lotuswordpro/source reportdesign/source salhelper/source sal/osl sal/rtl sc/source sd/source sfx2/source shell/source slideshow/source sot/source starmath/source stoc/test svl/source svtools/source svx/source sw/qa sw/source tools/source unotools/source vcl/inc vcl/opengl vcl/source vcl/win winaccessibility/source writerperfect/source xmloff/source

Noel Grandin noel.grandin at collabora.co.uk
Wed Nov 29 13:01:34 UTC 2017


 basegfx/source/curve/b2dcubicbezier.cxx                            |    2 
 basic/source/runtime/methods.cxx                                   |    2 
 basic/source/runtime/props.cxx                                     |    2 
 chart2/source/controller/main/SelectionHelper.cxx                  |    4 
 connectivity/source/drivers/firebird/ResultSet.cxx                 |    2 
 cui/source/options/optchart.cxx                                    |    2 
 drawinglayer/source/primitive2d/animatedprimitive2d.cxx            |    4 
 drawinglayer/source/primitive2d/graphicprimitive2d.cxx             |    2 
 drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx       |    6 
 drawinglayer/source/primitive2d/textlayoutdevice.cxx               |    2 
 drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx         |    4 
 drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx             |   14 
 drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx         |   62 ++--
 drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx            |    2 
 drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx           |    2 
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx         |    2 
 drawinglayer/source/processor3d/defaultprocessor3d.cxx             |    6 
 drawinglayer/source/texture/texture3d.cxx                          |    4 
 editeng/source/editeng/editeng.cxx                                 |    2 
 extensions/source/scanner/grid.cxx                                 |    2 
 filter/source/graphicfilter/egif/egif.cxx                          |    4 
 filter/source/graphicfilter/ipcd/ipcd.cxx                          |    2 
 filter/source/msfilter/svdfppt.cxx                                 |    8 
 forms/source/component/imgprod.cxx                                 |   10 
 include/basegfx/pixel/bpixel.hxx                                   |    2 
 include/basegfx/polygon/b3dpolypolygontools.hxx                    |    8 
 include/svtools/grfmgr.hxx                                         |    4 
 include/svtools/parhtml.hxx                                        |    6 
 include/svx/contdlg.hxx                                            |    2 
 include/svx/galmisc.hxx                                            |    4 
 include/svx/svdmark.hxx                                            |    2 
 include/tools/stream.hxx                                           |    2 
 include/vcl/animate.hxx                                            |    2 
 include/vcl/bitmap.hxx                                             |    2 
 include/vcl/graph.hxx                                              |    2 
 include/vcl/lineinfo.hxx                                           |    2 
 include/vcl/metaact.hxx                                            |    2 
 include/vcl/salbtype.hxx                                           |    6 
 include/xmloff/styleexp.hxx                                        |    4 
 lotuswordpro/source/filter/lwpbasetype.cxx                         |    4 
 reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx        |   12 
 sal/osl/unx/profile.cxx                                            |    2 
 sal/rtl/cipher.cxx                                                 |   12 
 sal/rtl/digest.cxx                                                 |   12 
 sal/rtl/random.cxx                                                 |    6 
 salhelper/source/timer.cxx                                         |    2 
 sc/source/core/data/document.cxx                                   |    4 
 sc/source/filter/excel/xltools.cxx                                 |    2 
 sc/source/filter/lotus/lotread.cxx                                 |    2 
 sc/source/ui/Accessibility/AccessibleCsvControl.cxx                |    2 
 sc/source/ui/cctrl/dpcontrol.cxx                                   |    2 
 sc/source/ui/dbgui/csvcontrol.cxx                                  |    4 
 sc/source/ui/dbgui/csvgrid.cxx                                     |    2 
 sc/source/ui/dbgui/csvruler.cxx                                    |    2 
 sc/source/ui/drawfunc/fuconrec.cxx                                 |    2 
 sc/source/ui/view/gridwin4.cxx                                     |    2 
 sd/source/core/PageListWatcher.cxx                                 |    6 
 sd/source/filter/html/htmlex.cxx                                   |    4 
 sd/source/ui/app/sdmod2.cxx                                        |    4 
 sd/source/ui/dlg/copydlg.cxx                                       |   12 
 sd/source/ui/dlg/custsdlg.cxx                                      |    4 
 sd/source/ui/dlg/vectdlg.cxx                                       |   14 
 sd/source/ui/func/fuconrec.cxx                                     |    2 
 sd/source/ui/func/fucopy.cxx                                       |    6 
 sd/source/ui/func/fumorph.cxx                                      |   18 -
 sd/source/ui/func/fuoaprms.cxx                                     |    4 
 sd/source/ui/func/fupoor.cxx                                       |    4 
 sd/source/ui/func/fusel.cxx                                        |    4 
 sd/source/ui/func/fusldlg.cxx                                      |    2 
 sd/source/ui/inc/DrawViewShell.hxx                                 |    2 
 sd/source/ui/slideshow/slideshowimpl.cxx                           |    4 
 sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx                  |    2 
 sd/source/ui/view/drawview.cxx                                     |    2 
 sd/source/ui/view/drtxtob.cxx                                      |    4 
 sd/source/ui/view/drviews4.cxx                                     |    4 
 sd/source/ui/view/drviewsa.cxx                                     |    2 
 sd/source/ui/view/outlnvsh.cxx                                     |    4 
 sd/source/ui/view/outlview.cxx                                     |   12 
 sd/source/ui/view/sdview.cxx                                       |    2 
 sd/source/ui/view/viewshel.cxx                                     |    2 
 sfx2/source/bastyp/mieclip.cxx                                     |    2 
 shell/source/win32/shlxthandler/ooofilt/stream_helper.cxx          |    4 
 slideshow/source/engine/shapes/drawinglayeranimation.cxx           |   22 -
 sot/source/sdstor/stg.cxx                                          |    4 
 sot/source/sdstor/stgole.cxx                                       |    4 
 starmath/source/node.cxx                                           |    4 
 stoc/test/testintrosp.cxx                                          |    4 
 svl/source/numbers/zformat.cxx                                     |    2 
 svtools/source/contnr/treelist.cxx                                 |    2 
 svtools/source/control/toolbarmenu.cxx                             |    2 
 svtools/source/graphic/grfcache.cxx                                |    2 
 svtools/source/graphic/grfmgr.cxx                                  |    4 
 svtools/source/graphic/grfmgr2.cxx                                 |   40 +-
 svtools/source/svhtml/parhtml.cxx                                  |    4 
 svx/source/customshapes/EnhancedCustomShape2d.cxx                  |   12 
 svx/source/customshapes/EnhancedCustomShape3d.cxx                  |    8 
 svx/source/dialog/_contdlg.cxx                                     |    2 
 svx/source/dialog/contimp.hxx                                      |    2 
 svx/source/engine3d/scene3d.cxx                                    |    2 
 svx/source/fmcomp/gridctrl.cxx                                     |    2 
 svx/source/form/fmvwimp.cxx                                        |    4 
 svx/source/gallery2/codec.cxx                                      |    4 
 svx/source/gallery2/galbrws2.cxx                                   |    4 
 svx/source/sdr/animation/animationstate.cxx                        |    2 
 svx/source/sdr/animation/scheduler.cxx                             |    2 
 svx/source/sdr/event/eventhandler.cxx                              |    2 
 svx/source/sdr/overlay/overlaymanagerbuffered.cxx                  |    8 
 svx/source/sdr/primitive2d/sdrattributecreator.cxx                 |   12 
 svx/source/sdr/primitive3d/sdrattributecreator3d.cxx               |   12 
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx                |    2 
 svx/source/svdraw/polypolygoneditor.cxx                            |    4 
 svx/source/svdraw/sdrpagewindow.cxx                                |    4 
 svx/source/svdraw/svdattr.cxx                                      |    2 
 svx/source/svdraw/svdedtv.cxx                                      |    2 
 svx/source/svdraw/svdedtv1.cxx                                     |    8 
 svx/source/svdraw/svdedtv2.cxx                                     |   40 +-
 svx/source/svdraw/svdedxv.cxx                                      |    4 
 svx/source/svdraw/svdfmtf.cxx                                      |   14 
 svx/source/svdraw/svdhdl.cxx                                       |    4 
 svx/source/svdraw/svdmark.cxx                                      |    8 
 svx/source/svdraw/svdmodel.cxx                                     |    2 
 svx/source/svdraw/svdmrkv.cxx                                      |    2 
 svx/source/svdraw/svdobj.cxx                                       |    2 
 svx/source/svdraw/svdocapt.cxx                                     |    2 
 svx/source/svdraw/svdocirc.cxx                                     |   12 
 svx/source/svdraw/svdograf.cxx                                     |    2 
 svx/source/svdraw/svdomeas.cxx                                     |    8 
 svx/source/svdraw/svdopath.cxx                                     |   44 +-
 svx/source/svdraw/svdotext.cxx                                     |    2 
 svx/source/svdraw/svdotextdecomposition.cxx                        |   18 -
 svx/source/svdraw/svdotextpathdecomposition.cxx                    |    6 
 svx/source/svdraw/svdpagv.cxx                                      |    2 
 svx/source/svdraw/svdpntv.cxx                                      |   14 
 svx/source/svdraw/svdpoev.cxx                                      |    2 
 svx/source/svdraw/svdsnpv.cxx                                      |    2 
 svx/source/svdraw/svdviter.cxx                                     |    2 
 svx/source/svdraw/svdxcgv.cxx                                      |    2 
 svx/source/table/accessibletableshape.cxx                          |    4 
 svx/source/tbxctrls/linectrl.cxx                                   |    4 
 svx/source/unodraw/unoshape.cxx                                    |    2 
 svx/source/xoutdev/_xoutbmp.cxx                                    |   26 -
 svx/source/xoutdev/xattr.cxx                                       |    4 
 svx/source/xoutdev/xattr2.cxx                                      |    4 
 sw/qa/extras/ww8export/ww8export.cxx                               |    2 
 sw/source/core/access/accdoc.cxx                                   |    4 
 sw/source/core/access/accframe.cxx                                 |    2 
 sw/source/core/access/accpara.cxx                                  |    2 
 sw/source/core/access/acctable.cxx                                 |    4 
 sw/source/core/frmedt/feshview.cxx                                 |    2 
 sw/source/core/frmedt/fews.cxx                                     |    4 
 sw/source/core/inc/frame.hxx                                       |    6 
 sw/source/core/layout/anchoredobject.cxx                           |    2 
 sw/source/core/layout/calcmove.cxx                                 |    4 
 sw/source/core/layout/findfrm.cxx                                  |    3 
 sw/source/core/layout/fly.cxx                                      |    4 
 sw/source/core/layout/objectformatter.cxx                          |    2 
 sw/source/core/layout/objectformattertxtfrm.cxx                    |    2 
 sw/source/core/layout/pagechg.cxx                                  |    2 
 sw/source/core/layout/sectfrm.cxx                                  |    2 
 sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx |    2 
 sw/source/core/view/viewsh.cxx                                     |    6 
 sw/source/filter/ww8/rtfattributeoutput.cxx                        |    2 
 sw/source/filter/xml/xmlexpit.cxx                                  |    2 
 sw/source/filter/xml/xmlimpit.cxx                                  |    2 
 sw/source/filter/xml/xmltble.cxx                                   |    8 
 sw/source/filter/xml/xmltbli.cxx                                   |  152 +++++-----
 sw/source/uibase/dochdl/swdtflvr.cxx                               |    2 
 sw/source/uibase/misc/redlndlg.cxx                                 |    4 
 sw/source/uibase/shells/drwbassh.cxx                               |    4 
 sw/source/uibase/uno/unotxdoc.cxx                                  |    4 
 sw/source/uibase/wrtsh/delete.cxx                                  |    2 
 tools/source/generic/b3dtrans.cxx                                  |    8 
 tools/source/generic/poly.cxx                                      |   16 -
 tools/source/stream/stream.cxx                                     |   12 
 tools/source/stream/strmwnt.cxx                                    |    4 
 tools/source/stream/vcompat.cxx                                    |    4 
 unotools/source/misc/datetime.cxx                                  |    2 
 vcl/inc/impoctree.hxx                                              |    6 
 vcl/inc/octree.hxx                                                 |    2 
 vcl/opengl/gdiimpl.cxx                                             |    2 
 vcl/source/bitmap/bitmapscalesuper.cxx                             |   68 ++--
 vcl/source/control/longcurr.cxx                                    |    2 
 vcl/source/control/spinfld.cxx                                     |    2 
 vcl/source/filter/graphicfilter2.cxx                               |    2 
 vcl/source/filter/igif/gifread.cxx                                 |   24 -
 vcl/source/filter/jpeg/JpegWriter.cxx                              |    6 
 vcl/source/filter/jpeg/transupp.c                                  |    2 
 vcl/source/filter/sgvmain.cxx                                      |   16 -
 vcl/source/filter/wmf/wmfwr.hxx                                    |    2 
 vcl/source/gdi/alpha.cxx                                           |   12 
 vcl/source/gdi/animate.cxx                                         |   10 
 vcl/source/gdi/bitmap.cxx                                          |  142 ++++-----
 vcl/source/gdi/bitmap3.cxx                                         |   12 
 vcl/source/gdi/dibtools.cxx                                        |   60 +--
 vcl/source/gdi/gdimtf.cxx                                          |    2 
 vcl/source/gdi/impanmvw.cxx                                        |    4 
 vcl/source/gdi/impvect.cxx                                         |   14 
 vcl/source/gdi/pngwrite.cxx                                        |    2 
 vcl/source/outdev/bitmap.cxx                                       |   30 -
 vcl/source/outdev/outdev.cxx                                       |    2 
 vcl/source/outdev/rect.cxx                                         |   16 -
 vcl/source/outdev/text.cxx                                         |    4 
 vcl/source/outdev/textline.cxx                                     |    2 
 vcl/source/outdev/transparent.cxx                                  |   12 
 vcl/source/outdev/wallpaper.cxx                                    |    8 
 vcl/source/window/menufloatingwindow.cxx                           |    2 
 vcl/source/window/scrwnd.cxx                                       |   22 -
 vcl/win/gdi/salbmp.cxx                                             |    6 
 vcl/win/gdi/salgdi.cxx                                             |   14 
 winaccessibility/source/UAccCOM/MAccessible.cxx                    |    4 
 writerperfect/source/common/WPXSvInputStream.cxx                   |    4 
 xmloff/source/core/nmspmap.cxx                                     |    6 
 xmloff/source/core/unoatrcn.cxx                                    |   12 
 xmloff/source/draw/xexptran.cxx                                    |    4 
 xmloff/source/style/fonthdl.cxx                                    |    6 
 xmloff/source/style/xmlnumi.cxx                                    |    2 
 xmloff/source/text/txtparae.cxx                                    |    2 
 xmloff/source/text/txtparai.cxx                                    |    4 
 218 files changed, 837 insertions(+), 838 deletions(-)

New commits:
commit 2887aefa4d4f60ba8b0cd7efd5d3a73ffb209781
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Aug 16 16:27:55 2017 +0200

    remove UL/L suffixes from integer constants on the RHS of expressions
    
    Reviewed-on: https://gerrit.libreoffice.org/41237
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    (cherry picked from commit 2e8acde112e1c6754df26902e79a78346ba45a2d)
    
    Change-Id: I899a8126c9d971601fea6c77eca165718aea0ac5
    Reviewed-on: https://gerrit.libreoffice.org/45452
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/basegfx/source/curve/b2dcubicbezier.cxx b/basegfx/source/curve/b2dcubicbezier.cxx
index ed81ea37b194..85adbcdbcb03 100644
--- a/basegfx/source/curve/b2dcubicbezier.cxx
+++ b/basegfx/source/curve/b2dcubicbezier.cxx
@@ -673,7 +673,7 @@ namespace basegfx
         const sal_uInt32 nInitialDivisions(3);
         B2DPolygon aInitialPolygon;
 
-        // as start make a fix division, creates nInitialDivisions + 2L points
+        // as start make a fix division, creates nInitialDivisions + 2 points
         aInitialPolygon.append(getStartPoint());
         adaptiveSubdivideByCount(aInitialPolygon, nInitialDivisions);
 
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 5b230e147c73..1cbc5bdd38b7 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -216,7 +216,7 @@ RTLFUNC(Error)
         else
         {
             nCode = rPar.Get( 1 )->GetLong();
-            if( nCode > 65535L )
+            if( nCode > 65535 )
             {
                 StarBASIC::Error( ERRCODE_BASIC_CONVERSION );
             }
diff --git a/basic/source/runtime/props.cxx b/basic/source/runtime/props.cxx
index ce994947389e..f56b914d4272 100644
--- a/basic/source/runtime/props.cxx
+++ b/basic/source/runtime/props.cxx
@@ -51,7 +51,7 @@ RTLFUNC(Err)
         if( bWrite )
         {
             sal_Int32 nVal = rPar.Get( 0 )->GetLong();
-            if( nVal <= 65535L )
+            if( nVal <= 65535 )
                 StarBASIC::Error( StarBASIC::GetSfxFromVBError( (sal_uInt16) nVal ) );
         }
         else
diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx
index 4e6375cdd26b..48de7a980d47 100644
--- a/chart2/source/controller/main/SelectionHelper.cxx
+++ b/chart2/source/controller/main/SelectionHelper.cxx
@@ -596,10 +596,10 @@ bool SelectionHelper::getMarkHandles( SdrHdlList& rHdlList )
             //if th object is a polygon
             //from each point a handle is generated
             const ::basegfx::B2DPolyPolygon& rPolyPolygon = static_cast<SdrPathObj*>(m_pMarkObj)->GetPathPoly();
-            for( sal_uInt32 nN = 0L; nN < rPolyPolygon.count(); nN++)
+            for( sal_uInt32 nN = 0; nN < rPolyPolygon.count(); nN++)
             {
                 const ::basegfx::B2DPolygon aPolygon(rPolyPolygon.getB2DPolygon(nN));
-                for( sal_uInt32 nM = 0L; nM < aPolygon.count(); nM++)
+                for( sal_uInt32 nM = 0; nM < aPolygon.count(); nM++)
                 {
                     const ::basegfx::B2DPoint aPoint(aPolygon.getB2DPoint(nM));
                     SdrHdl* pHdl = new SdrHdl(Point(basegfx::fround(aPoint.getX()), basegfx::fround(aPoint.getY())), SdrHdlKind::Poly);
diff --git a/connectivity/source/drivers/firebird/ResultSet.cxx b/connectivity/source/drivers/firebird/ResultSet.cxx
index acc486a6a88a..1c6045477035 100644
--- a/connectivity/source/drivers/firebird/ResultSet.cxx
+++ b/connectivity/source/drivers/firebird/ResultSet.cxx
@@ -136,7 +136,7 @@ sal_Bool SAL_CALL OResultSet::next() throw(SQLException, RuntimeException, std::
     {
         return true;
     }
-    else if (fetchStat == 100L) // END OF DATASET
+    else if (fetchStat == 100) // END OF DATASET
     {
         m_bIsAfterLastRow = true;
         return false;
diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index b4eb31b072d1..f61bceeb9780 100644
--- a/cui/source/options/optchart.cxx
+++ b/cui/source/options/optchart.cxx
@@ -241,7 +241,7 @@ long SvxDefaultColorOptPage::GetColorIndex( const Color& rCol )
                 return pColorList->GetIndex( pColorEntry->GetName() );
         }
     }
-    return -1L;
+    return -1;
 }
 
 
diff --git a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx
index 713c4bd52bcd..1399e832569c 100644
--- a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx
@@ -164,7 +164,7 @@ namespace drawinglayer
                     fState = 1.0;
                 }
 
-                const double fIndex(fState * (double)(nSize - 1L));
+                const double fIndex(fState * (double)(nSize - 1));
                 const sal_uInt32 nIndA(sal_uInt32(floor(fIndex)));
                 const double fOffset(fIndex - (double)nIndA);
                 basegfx::B2DHomMatrix aTargetTransform;
@@ -178,7 +178,7 @@ namespace drawinglayer
                 else
                 {
                     // interpolate. Get involved buffered decomposed matrices
-                    const sal_uInt32 nIndB((nIndA + 1L) % nSize);
+                    const sal_uInt32 nIndB((nIndA + 1) % nSize);
                     std::vector< basegfx::tools::B2DHomMatrixBufferedDecompose >::const_iterator aMatB(maMatrixStack.begin() + nIndB);
 
                     // interpolate for fOffset [0.0 .. 1.0[
diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
index e0b344a32130..22ed808772c0 100644
--- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
@@ -34,7 +34,7 @@ namespace drawinglayer
     {
         void GraphicPrimitive2D::create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& ) const
         {
-            if(255L == getGraphicAttr().GetTransparency())
+            if(255 == getGraphicAttr().GetTransparency())
             {
                 // content is invisible, done
                 return;
diff --git a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
index 4c48cf70b815..5813b47573da 100644
--- a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
@@ -121,9 +121,9 @@ namespace drawinglayer
 
                 // Bad trap: There are animated gifs with no set WaitTime (!).
                 // In that case use a default value.
-                if (0L == nWaitTime)
+                if (0 == nWaitTime)
                 {
-                    nWaitTime = 100L;
+                    nWaitTime = 100;
                 }
 
                 return nWaitTime;
@@ -405,7 +405,7 @@ namespace drawinglayer
                 // create frame representation in VirtualDevices
                 if (nIndex >= nLen)
                 {
-                    nIndex = nLen - 1L;
+                    nIndex = nLen - 1;
                 }
 
                 // check buffering shortcuts, may already be created
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index 2b899afd7b01..af9a1a08aae3 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -84,7 +84,7 @@ namespace
 
     ImpTimedRefDev::~ImpTimedRefDev()
     {
-        OSL_ENSURE(0L == mnUseCount, "destruction of a still used ImpTimedRefDev (!)");
+        OSL_ENSURE(0 == mnUseCount, "destruction of a still used ImpTimedRefDev (!)");
         const SolarMutexGuard aSolarGuard;
         mpVirDev.disposeAndClear();
     }
diff --git a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
index c580ffdfd73a..05cebc2ef693 100644
--- a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
@@ -363,8 +363,8 @@ namespace drawinglayer
 
                         for(sal_uInt32 a(0L); a < nVerSeg; a++)
                         {
-                            const bool bFirst(0L == a);
-                            const bool bLast(a + 1L == nVerSeg);
+                            const bool bFirst(0 == a);
+                            const bool bLast(a + 1 == nVerSeg);
 
                             if(bFirst || !bLast)
                             {
diff --git a/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx
index 4de490ac1e89..b546d8b0c544 100644
--- a/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx
@@ -91,24 +91,24 @@ namespace drawinglayer
                 if(bObjectSpecificX || bObjectSpecificY)
                 {
                     // object-specific
-                    for(sal_uInt32 a(0L); a < aFill.count(); a++)
+                    for(sal_uInt32 a(0); a < aFill.count(); a++)
                     {
                         basegfx::B3DPolygon aTmpPoly(aFill.getB3DPolygon(a));
 
-                        if(aTmpPoly.count() >= 4L)
+                        if(aTmpPoly.count() >= 4)
                         {
-                            for(sal_uInt32 b(0L); b < 4L; b++)
+                            for(sal_uInt32 b(0); b < 4; b++)
                             {
                                 basegfx::B2DPoint aPoint(aTmpPoly.getTextureCoordinate(b));
 
                                 if(bObjectSpecificX)
                                 {
-                                    aPoint.setX((1L == b || 2L == b) ? 1.0 : 0.0);
+                                    aPoint.setX((1 == b || 2 == b) ? 1.0 : 0.0);
                                 }
 
                                 if(bObjectSpecificY)
                                 {
-                                    aPoint.setY((2L == b || 3L == b) ? 1.0 : 0.0);
+                                    aPoint.setY((2 == b || 3 == b) ? 1.0 : 0.0);
                                 }
 
                                 aTmpPoly.setTextureCoordinate(b, aPoint);
@@ -126,9 +126,9 @@ namespace drawinglayer
             }
 
             // build vector of PolyPolygons
-            ::std::vector< basegfx::B3DPolyPolygon > a3DPolyPolygonVector;
+            std::vector< basegfx::B3DPolyPolygon > a3DPolyPolygonVector;
 
-            for(sal_uInt32 a(0L); a < aFill.count(); a++)
+            for(sal_uInt32 a(0); a < aFill.count(); a++)
             {
                 a3DPolyPolygonVector.push_back(basegfx::B3DPolyPolygon(aFill.getB3DPolygon(a)));
             }
diff --git a/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx b/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx
index dba0f54bcbd0..4287f6dbb129 100644
--- a/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx
@@ -113,7 +113,7 @@ namespace
         OSL_ENSURE(rPolA.count() == rPolB.count(), "impAddInBetweenFill: unequally sized polygons (!)");
         const sal_uInt32 nPolygonCount(::std::min(rPolA.count(), rPolB.count()));
 
-        for(sal_uInt32 a(0L); a < nPolygonCount; a++)
+        for(sal_uInt32 a(0); a < nPolygonCount; a++)
         {
             const basegfx::B3DPolygon aSubA(rPolA.getB3DPolygon(a));
             const basegfx::B3DPolygon aSubB(rPolB.getB3DPolygon(a));
@@ -122,7 +122,7 @@ namespace
 
             if(nPointCount)
             {
-                const sal_uInt32 nEdgeCount(aSubA.isClosed() ? nPointCount : nPointCount - 1L);
+                const sal_uInt32 nEdgeCount(aSubA.isClosed() ? nPointCount : nPointCount - 1);
                 double fTexHorMultiplicatorA(0.0), fTexHorMultiplicatorB(0.0);
                 double fPolygonPosA(0.0), fPolygonPosB(0.0);
 
@@ -135,10 +135,10 @@ namespace
                     fTexHorMultiplicatorB = basegfx::fTools::equalZero(fPolygonLengthB) ? 1.0 : 1.0 / fPolygonLengthB;
                 }
 
-                for(sal_uInt32 b(0L); b < nEdgeCount; b++)
+                for(sal_uInt32 b(0); b < nEdgeCount; b++)
                 {
                     const sal_uInt32 nIndexA(b);
-                    const sal_uInt32 nIndexB((b + 1L) % nPointCount);
+                    const sal_uInt32 nIndexB((b + 1) % nPointCount);
 
                     const basegfx::B3DPoint aStartA(aSubA.getB3DPoint(nIndexA));
                     const basegfx::B3DPoint aEndA(aSubA.getB3DPoint(nIndexB));
@@ -189,11 +189,11 @@ namespace
         basegfx::B3DPolyPolygon& rCandidate,
         const basegfx::B3DVector& rNormal)
     {
-        for(sal_uInt32 a(0L); a < rCandidate.count(); a++)
+        for(sal_uInt32 a(0); a < rCandidate.count(); a++)
         {
             basegfx::B3DPolygon aSub(rCandidate.getB3DPolygon(a));
 
-            for(sal_uInt32 b(0L); b < aSub.count(); b++)
+            for(sal_uInt32 b(0); b < aSub.count(); b++)
             {
                 aSub.setNormal(b, rNormal);
             }
@@ -210,7 +210,7 @@ namespace
         OSL_ENSURE(rPolA.count() == rPolB.count(), "sdrExtrudePrimitive3D: unequally sized polygons (!)");
         const sal_uInt32 nPolygonCount(::std::min(rPolA.count(), rPolB.count()));
 
-        for(sal_uInt32 a(0L); a < nPolygonCount; a++)
+        for(sal_uInt32 a(0); a < nPolygonCount; a++)
         {
             basegfx::B3DPolygon aSubA(rPolA.getB3DPolygon(a));
             basegfx::B3DPolygon aSubB(rPolB.getB3DPolygon(a));
@@ -219,13 +219,13 @@ namespace
 
             if(nPointCount)
             {
-                basegfx::B3DPoint aPrevA(aSubA.getB3DPoint(nPointCount - 1L));
-                basegfx::B3DPoint aCurrA(aSubA.getB3DPoint(0L));
+                basegfx::B3DPoint aPrevA(aSubA.getB3DPoint(nPointCount - 1));
+                basegfx::B3DPoint aCurrA(aSubA.getB3DPoint(0));
                 const bool bClosed(aSubA.isClosed());
 
                 for(sal_uInt32 b(0L); b < nPointCount; b++)
                 {
-                    const sal_uInt32 nIndNext((b + 1L) % nPointCount);
+                    const sal_uInt32 nIndNext((b + 1) % nPointCount);
                     const basegfx::B3DPoint aNextA(aSubA.getB3DPoint(nIndNext));
                     const basegfx::B3DPoint aCurrB(aSubB.getB3DPoint(b));
 
@@ -242,7 +242,7 @@ namespace
                     }
 
                     // vector to left (correct for non-closed lines)
-                    const bool bFirstAndNotClosed(!bClosed && 0L == b);
+                    const bool bFirstAndNotClosed(!bClosed && 0 == b);
                     basegfx::B3DVector aLeft(bFirstAndNotClosed ? aCurrA - aNextA : aPrevA - aCurrA);
                     aLeft.normalize();
 
@@ -252,7 +252,7 @@ namespace
                     if(bSmoothHorizontalNormals)
                     {
                         // vector to right (correct for non-closed lines)
-                        const bool bLastAndNotClosed(!bClosed && b + 1L == nPointCount);
+                        const bool bLastAndNotClosed(!bClosed && b + 1 == nPointCount);
                         basegfx::B3DVector aRight(bLastAndNotClosed ? aCurrA - aPrevA : aNextA - aCurrA);
                         aRight.normalize();
 
@@ -361,7 +361,7 @@ namespace drawinglayer
             bool bCloseFront,
             bool bCloseBack)
         {
-            if(basegfx::fTools::equalZero(fRotation) || 0L == nSteps)
+            if(basegfx::fTools::equalZero(fRotation) || 0 == nSteps)
             {
                 // no rotation or no steps, just one plane
                 rSliceVector.push_back(Slice3D(rSource, basegfx::B3DHomMatrix()));
@@ -418,7 +418,7 @@ namespace drawinglayer
                     }
                 }
 
-                // add start polygon (a = 0L)
+                // add start polygon (a = 0)
                 if(!bClosedRotation)
                 {
                     rSliceVector.push_back(Slice3D(aFront, basegfx::B3DHomMatrix()));
@@ -427,9 +427,9 @@ namespace drawinglayer
                 // create segments (a + 1 .. nSteps)
                 const double fStepSize(1.0 / (double)nSteps);
 
-                for(sal_uInt32 a(0L); a < nSteps; a++)
+                for(sal_uInt32 a(0); a < nSteps; a++)
                 {
-                    const double fStep((double)(a + 1L) * fStepSize);
+                    const double fStep((double)(a + 1) * fStepSize);
                     basegfx::B2DPolyPolygon aNewPoly(bBackScale ? basegfx::tools::interpolate(aFront, aBack, fStep) : aFront);
                     basegfx::B3DHomMatrix aNewMat;
                     aNewMat.rotate(0.0, fRotation * fStep, 0.0);
@@ -563,7 +563,7 @@ namespace drawinglayer
             basegfx::B3DPolyPolygon aRetval;
             const sal_uInt32 nNumSlices(rSliceVector.size());
 
-            for(sal_uInt32 a(0L); a < nNumSlices; a++)
+            for(sal_uInt32 a(0); a < nNumSlices; a++)
             {
                 aRetval.append(rSliceVector[a].getB3DPolyPolygon());
             }
@@ -589,7 +589,7 @@ namespace drawinglayer
             if(nNumSlices)
             {
                 // common parameters
-                const sal_uInt32 nLoopCount(bClosed ? nNumSlices : nNumSlices - 1L);
+                const sal_uInt32 nLoopCount(bClosed ? nNumSlices : nNumSlices - 1);
                 basegfx::B3DPolyPolygon aEdgeRounding;
                 sal_uInt32 a;
 
@@ -602,7 +602,7 @@ namespace drawinglayer
                 if(bCreateTextureCoordinates)
                 {
                     aTexRangeFront = basegfx::tools::getRange(rSliceVector[0L].getB3DPolyPolygon());
-                    aTexRangeBack = basegfx::tools::getRange(rSliceVector[nNumSlices - 1L].getB3DPolyPolygon());
+                    aTexRangeBack = basegfx::tools::getRange(rSliceVector[nNumSlices - 1].getB3DPolyPolygon());
 
                     if(aTexRangeBack.getDepth() > aTexRangeBack.getWidth())
                     {
@@ -616,9 +616,9 @@ namespace drawinglayer
 
                     basegfx::B3DPoint aCenter(basegfx::tools::getRange(rSliceVector[0L].getB3DPolyPolygon()).getCenter());
 
-                    for(a = 0L; a < nLoopCount; a++)
+                    for(a = 0; a < nLoopCount; a++)
                     {
-                        const basegfx::B3DPoint aNextCenter(basegfx::tools::getRange(rSliceVector[(a + 1L) % nNumSlices].getB3DPolyPolygon()).getCenter());
+                        const basegfx::B3DPoint aNextCenter(basegfx::tools::getRange(rSliceVector[(a + 1) % nNumSlices].getB3DPolyPolygon()).getCenter());
                         const double fLength(basegfx::B3DVector(aNextCenter - aCenter).getLength());
                         aTexHeightArray.push_back(fLength);
                         aCenter = aNextCenter;
@@ -635,10 +635,10 @@ namespace drawinglayer
                 if(nLoopCount)
                 {
                     double fTexHeightPos(0.0);
-                    for(a = 0L; a < nLoopCount; a++)
+                    for(a = 0; a < nLoopCount; a++)
                     {
                         const Slice3D& rSliceA(rSliceVector[a]);
-                        const Slice3D& rSliceB(rSliceVector[(a + 1L) % nNumSlices]);
+                        const Slice3D& rSliceB(rSliceVector[(a + 1) % nNumSlices]);
                         const bool bAcceptPair(SLICETYPE3D_REGULAR == rSliceA.getSliceType() && SLICETYPE3D_REGULAR == rSliceB.getSliceType());
                         basegfx::B3DPolyPolygon aPolA(rSliceA.getB3DPolyPolygon());
                         basegfx::B3DPolyPolygon aPolB(rSliceB.getB3DPolyPolygon());
@@ -651,7 +651,7 @@ namespace drawinglayer
                             }
 
                             {
-                                const sal_uInt32 nIndPrev((a + nNumSlices - 1L) % nNumSlices);
+                                const sal_uInt32 nIndPrev((a + nNumSlices - 1) % nNumSlices);
                                 const Slice3D& rSlicePrev(rSliceVector[nIndPrev]);
                                 basegfx::B3DPolyPolygon aPrev(rSlicePrev.getB3DPolyPolygon());
                                 basegfx::B3DPolyPolygon aPolAA(rSliceA.getB3DPolyPolygon());
@@ -672,7 +672,7 @@ namespace drawinglayer
 
                                         if(aFront.count())
                                         {
-                                            aNormal = -aFront.getB3DPolygon(0L).getNormal();
+                                            aNormal = -aFront.getB3DPolygon(0).getNormal();
                                         }
 
                                         impSetNormal(aFront, aNormal);
@@ -729,7 +729,7 @@ namespace drawinglayer
                                         if(bCreateTextureCoordinates)
                                         {
                                             fTexStart = fTexHeightPos * fInvTexHeight;
-                                            fTexStop = (fTexHeightPos - aTexHeightArray[(a + nLoopCount - 1L) % nLoopCount]) * fInvTexHeight;
+                                            fTexStop = (fTexHeightPos - aTexHeightArray[(a + nLoopCount - 1) % nLoopCount]) * fInvTexHeight;
                                         }
 
                                         impAddInBetweenFill(aEdgeRounding, aPolAA, aPrev, fTexStart, fTexStop, bCreateNormals, bCreateTextureCoordinates);
@@ -740,7 +740,7 @@ namespace drawinglayer
                                 }
                                 else
                                 {
-                                    if(bCreateNormals && bSmoothNormals && (nIndPrev != a + 1L))
+                                    if(bCreateNormals && bSmoothNormals && (nIndPrev != a + 1))
                                     {
                                         impCreateInBetweenNormals(aPolAA, aPrev, bSmoothHorizontalNormals);
                                         impMixNormals(aPolA, aPolAA, 0.5);
@@ -749,7 +749,7 @@ namespace drawinglayer
                             }
 
                             {
-                                const sal_uInt32 nIndNext((a + 2L) % nNumSlices);
+                                const sal_uInt32 nIndNext((a + 2) % nNumSlices);
                                 const Slice3D& rSliceNext(rSliceVector[nIndNext]);
                                 basegfx::B3DPolyPolygon aNext(rSliceNext.getB3DPolyPolygon());
                                 basegfx::B3DPolyPolygon aPolBB(rSliceB.getB3DPolyPolygon());
@@ -820,7 +820,7 @@ namespace drawinglayer
                                         double fTexStop{};
                                         if(bCreateTextureCoordinates)
                                         {
-                                            fTexStart = (fTexHeightPos + aTexHeightArray[a] + aTexHeightArray[(a + 1L) % nLoopCount]) * fInvTexHeight;
+                                            fTexStart = (fTexHeightPos + aTexHeightArray[a] + aTexHeightArray[(a + 1) % nLoopCount]) * fInvTexHeight;
                                             fTexStop = (fTexHeightPos + aTexHeightArray[a]) * fInvTexHeight;
                                         }
 
@@ -874,7 +874,7 @@ namespace drawinglayer
 
                         if(aFront.count())
                         {
-                            aNormal = -aFront.getB3DPolygon(0L).getNormal();
+                            aNormal = -aFront.getB3DPolygon(0).getNormal();
                         }
 
                         impSetNormal(aFront, aNormal);
@@ -889,7 +889,7 @@ namespace drawinglayer
                     aEdgeRounding.transformTextureCoordinates(rTexTransform);
                 }
 
-                for(a = 0L; a < aEdgeRounding.count(); a++)
+                for(a = 0; a < aEdgeRounding.count(); a++)
                 {
                     rFill.push_back(basegfx::B3DPolyPolygon(aEdgeRounding.getB3DPolygon(a)));
                 }
diff --git a/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx
index 64041d8439df..47f32c4ed1d6 100644
--- a/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx
@@ -214,7 +214,7 @@ namespace drawinglayer
             // that for polyPolygons, the subPolys 1..n only get reSegmented when polygon 0L is different
             // at all (and not always)
             const basegfx::B2DPolygon aSubCandidate(maCorrectedPolyPolygon.getB2DPolygon(0));
-            const sal_uInt32 nSubEdgeCount(aSubCandidate.isClosed() ? aSubCandidate.count() : (aSubCandidate.count() ? aSubCandidate.count() - 1L : 0L));
+            const sal_uInt32 nSubEdgeCount(aSubCandidate.isClosed() ? aSubCandidate.count() : (aSubCandidate.count() ? aSubCandidate.count() - 1 : 0L));
 
             if(nSubEdgeCount != getVerticalSegments())
             {
diff --git a/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx
index 42080eed51ca..0c51bb182adb 100644
--- a/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx
@@ -87,7 +87,7 @@ namespace drawinglayer
                         // different from forced to sphere texture coordinates,
                         // create a old version from it by rotating to old state before applying
                         // the texture coordinates to emulate old behaviour
-                        fRelativeAngle = F_2PI * ((double)((getHorizontalSegments() >> 1)  - 1L) / (double)getHorizontalSegments());
+                        fRelativeAngle = F_2PI * ((double)((getHorizontalSegments() >> 1)  - 1) / (double)getHorizontalSegments());
                         basegfx::B3DHomMatrix aRot;
                         aRot.rotate(0.0, fRelativeAngle, 0.0);
                         aFill.transform(aRot);
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 885367d3a78f..172b82bf00e6 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -135,7 +135,7 @@ namespace
                 if(aCandidate.areControlPointsUsed())
                 {
                     // compare with the maximum for bezier curved polygons
-                    bNeedToSplit = nPointCount > ((MAX_POLYGON_POINT_COUNT_METAFILE / 3L) - 1L);
+                    bNeedToSplit = nPointCount > ((MAX_POLYGON_POINT_COUNT_METAFILE / 3L) - 1);
                 }
                 else
                 {
diff --git a/drawinglayer/source/processor3d/defaultprocessor3d.cxx b/drawinglayer/source/processor3d/defaultprocessor3d.cxx
index 50830bae4275..02a71ae25dc7 100644
--- a/drawinglayer/source/processor3d/defaultprocessor3d.cxx
+++ b/drawinglayer/source/processor3d/defaultprocessor3d.cxx
@@ -70,14 +70,14 @@ namespace drawinglayer
                 if(nMaxSteps)
                 {
                     // there IS a color distance
-                    if(nSteps == 0L)
+                    if(nSteps == 0)
                     {
                         nSteps = nMaxSteps;
                     }
 
-                    if(nSteps < 2L)
+                    if(nSteps < 2)
                     {
-                        nSteps = 2L;
+                        nSteps = 2;
                     }
 
                     if(nSteps > nMaxSteps)
diff --git a/drawinglayer/source/texture/texture3d.cxx b/drawinglayer/source/texture/texture3d.cxx
index 4e4d19b6dd5f..bb2553ac789f 100644
--- a/drawinglayer/source/texture/texture3d.cxx
+++ b/drawinglayer/source/texture/texture3d.cxx
@@ -161,11 +161,11 @@ namespace drawinglayer
             {
                 rX = (sal_Int32)((rUV.getX() - maTopLeft.getX()) * mfMulX);
 
-                if(rX >= 0L && rX < mpReadBitmap->Width())
+                if(rX >= 0 && rX < mpReadBitmap->Width())
                 {
                     rY = (sal_Int32)((rUV.getY() - maTopLeft.getY()) * mfMulY);
 
-                    return (rY >= 0L && rY < mpReadBitmap->Height());
+                    return (rY >= 0 && rY < mpReadBitmap->Height());
                 }
             }
 
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 0accd5a69303..8adaeff23d28 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -512,7 +512,7 @@ void EditEngine::SetPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon, const b
 {
     bool bSimple(false);
 
-    if(pLinePolyPolygon && 1L == rPolyPolygon.count())
+    if(pLinePolyPolygon && 1 == rPolyPolygon.count())
     {
         if(rPolyPolygon.getB2DPolygon(0L).isClosed())
         {
diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx
index 90faba32e8fc..51b3317fa94c 100644
--- a/extensions/source/scanner/grid.cxx
+++ b/extensions/source/scanner/grid.cxx
@@ -608,7 +608,7 @@ void GridWindow::MouseButtonDown( const MouseEvent& rEvt )
         // user wants to add/delete a button
         if( nMarkerIndex != 0xffffffff )
         {
-            if( nMarkerIndex != 0L && nMarkerIndex != m_aHandles.size() - 1L)
+            if( nMarkerIndex != 0 && nMarkerIndex != m_aHandles.size() - 1)
             {
                 // delete marker under mouse
                 if( m_nDragIndex == nMarkerIndex )
diff --git a/filter/source/graphicfilter/egif/egif.cxx b/filter/source/graphicfilter/egif/egif.cxx
index 4b1315fc44ff..e6762f76e6a6 100644
--- a/filter/source/graphicfilter/egif/egif.cxx
+++ b/filter/source/graphicfilter/egif/egif.cxx
@@ -212,7 +212,7 @@ void GIFWriter::WriteAnimation( const Animation& rAnimation )
     {
         const double fStep = 100. / nCount;
 
-        nMinPercent = 0L;
+        nMinPercent = 0;
         nMaxPercent = (sal_uLong) fStep;
 
         for( sal_uInt16 i = 0; i < nCount; i++ )
@@ -509,7 +509,7 @@ void GIFWriter::WriteAccess()
                 aCompressor.Compress( m_pAcc->GetScanline( nY ), nWidth );
             else
             {
-                for( long nX = 0L; nX < nWidth; nX++ )
+                for( long nX = 0; nX < nWidth; nX++ )
                     pBuffer[ nX ] = m_pAcc->GetPixelIndex( nY, nX );
 
                 aCompressor.Compress( pBuffer.get(), nWidth );
diff --git a/filter/source/graphicfilter/ipcd/ipcd.cxx b/filter/source/graphicfilter/ipcd/ipcd.cxx
index c78101ebddca..ee69d94f2ae4 100644
--- a/filter/source/graphicfilter/ipcd/ipcd.cxx
+++ b/filter/source/graphicfilter/ipcd/ipcd.cxx
@@ -305,7 +305,7 @@ void PCDReader::ReadImage()
                     }
                 }
                 // conversion of nL,nCb,nCr in nRed,nGreen,nBlue:
-                nL *= 89024L;
+                nL *= 89024;
                 nCb -= 156;
                 nCr -= 137;
                 nRed = ( nL + nCr * 119374L + 0x8000 ) >> 16;
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index efbb46db0c89..0c6b0bc78a86 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -5687,9 +5687,9 @@ void PPTPortionObj::ApplyTo(  SfxItemSet& rSet, SdrPowerPointImport& rManager, T
 
                             if( pAcc->HasPalette() )
                             {
-                                for( long nY = 0L; nY < nHeight; nY++ )
+                                for( long nY = 0; nY < nHeight; nY++ )
                                 {
-                                    for( long nX = 0L; nX < nWidth; nX++ )
+                                    for( long nX = 0; nX < nWidth; nX++ )
                                     {
                                         const BitmapColor& rCol = pAcc->GetPaletteColor( pAcc->GetPixelIndex( nY, nX ) );
                                         nRt+=rCol.GetRed(); nGn+=rCol.GetGreen(); nBl+=rCol.GetBlue();
@@ -5698,9 +5698,9 @@ void PPTPortionObj::ApplyTo(  SfxItemSet& rSet, SdrPowerPointImport& rManager, T
                             }
                             else
                             {
-                                for( long nY = 0L; nY < nHeight; nY++ )
+                                for( long nY = 0; nY < nHeight; nY++ )
                                 {
-                                    for( long nX = 0L; nX < nWidth; nX++ )
+                                    for( long nX = 0; nX < nWidth; nX++ )
                                     {
                                         const BitmapColor aCol( pAcc->GetPixel( nY, nX ) );
                                         nRt+=aCol.GetRed(); nGn+=aCol.GetGreen(); nBl+=aCol.GetBlue();
diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx
index dab9b8f45574..4fc9c335f36c 100644
--- a/forms/source/component/imgprod.cxx
+++ b/forms/source/component/imgprod.cxx
@@ -113,7 +113,7 @@ ErrCode ImgProdLockBytes::ReadAt(sal_uInt64 const nPos,
             *pRead = nCount;
         }
         else
-            *pRead = 0UL;
+            *pRead = 0;
 
         return nErr;
     }
@@ -428,10 +428,10 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic )
         BitmapReadAccess*   pMskAcc = !!aMask ? aMask.AcquireReadAccess() : nullptr;
         const long          nWidth = pBmpAcc->Width();
         const long          nHeight = pBmpAcc->Height();
-        const long          nStartX = 0L;
-        const long          nEndX = nWidth - 1L;
-        const long          nStartY = 0L;
-        const long          nEndY = nHeight - 1L;
+        const long          nStartX = 0;
+        const long          nEndX = nWidth - 1;
+        const long          nStartY = 0;
+        const long          nEndY = nHeight - 1;
         const long          nPartWidth = nEndX - nStartX + 1;
         const long          nPartHeight = nEndY - nStartY + 1;
 
diff --git a/include/basegfx/pixel/bpixel.hxx b/include/basegfx/pixel/bpixel.hxx
index bce856c27a97..fcf7fcc31c4b 100644
--- a/include/basegfx/pixel/bpixel.hxx
+++ b/include/basegfx/pixel/bpixel.hxx
@@ -49,7 +49,7 @@ namespace basegfx
     public:
         BPixel()
         {
-            maPixelUnion.maCombinedRGBO.mnValue = 0L;
+            maPixelUnion.maCombinedRGBO.mnValue = 0;
         }
 
         // use explicit here to make sure everyone knows what he is doing. Values range from
diff --git a/include/basegfx/polygon/b3dpolypolygontools.hxx b/include/basegfx/polygon/b3dpolypolygontools.hxx
index f88c28340a31..142058362193 100644
--- a/include/basegfx/polygon/b3dpolypolygontools.hxx
+++ b/include/basegfx/polygon/b3dpolypolygontools.hxx
@@ -64,7 +64,7 @@ namespace basegfx
             With VerStart, VerStop and hor range in cartesian may be specified to create a partial sphere only.
          */
         BASEGFX_DLLPUBLIC B3DPolyPolygon createUnitSpherePolyPolygon(
-            sal_uInt32 nHorSeg, sal_uInt32 nVerSeg = 0L,
+            sal_uInt32 nHorSeg, sal_uInt32 nVerSeg = 0,
             double fVerStart = F_PI2, double fVerStop = -F_PI2,
             double fHorStart = 0.0, double fHorStop = F_2PI);
 
@@ -74,7 +74,7 @@ namespace basegfx
          */
         BASEGFX_DLLPUBLIC B3DPolyPolygon createSpherePolyPolygonFromB3DRange(
             const B3DRange& rRange,
-            sal_uInt32 nHorSeg, sal_uInt32 nVerSeg = 0L,
+            sal_uInt32 nHorSeg, sal_uInt32 nVerSeg = 0,
             double fVerStart = F_PI2, double fVerStop = -F_PI2,
             double fHorStart = 0.0, double fHorStop = F_2PI);
 
@@ -82,7 +82,7 @@ namespace basegfx
             There is one extra, the bool bNormals defines if normals will be set, default is false
          */
         BASEGFX_DLLPUBLIC B3DPolyPolygon createUnitSphereFillPolyPolygon(
-            sal_uInt32 nHorSeg, sal_uInt32 nVerSeg = 0L,
+            sal_uInt32 nHorSeg, sal_uInt32 nVerSeg = 0,
             bool bNormals = false,
             double fVerStart = F_PI2, double fVerStop = -F_PI2,
             double fHorStart = 0.0, double fHorStop = F_2PI);
@@ -92,7 +92,7 @@ namespace basegfx
          */
         BASEGFX_DLLPUBLIC B3DPolyPolygon createSphereFillPolyPolygonFromB3DRange(
             const B3DRange& rRange,
-            sal_uInt32 nHorSeg, sal_uInt32 nVerSeg = 0L,
+            sal_uInt32 nHorSeg, sal_uInt32 nVerSeg = 0,
             bool bNormals = false,
             double fVerStart = F_PI2, double fVerStop = -F_PI2,
             double fHorStart = 0.0, double fHorStop = F_2PI);
diff --git a/include/svtools/grfmgr.hxx b/include/svtools/grfmgr.hxx
index c1e165c1ed1a..0cd3d6f64e45 100644
--- a/include/svtools/grfmgr.hxx
+++ b/include/svtools/grfmgr.hxx
@@ -461,11 +461,11 @@ public:
                                 OutputDevice* pOut,
                                 const Point& rPt,
                                 const Size& rSz,
-                                long nExtraData = 0L,
+                                long nExtraData = 0,
                                 OutputDevice* pFirstFrameOutDev = nullptr
                             );
 
-    void                    StopAnimation( OutputDevice* pOut = nullptr, long nExtraData = 0L );
+    void                    StopAnimation( OutputDevice* pOut = nullptr, long nExtraData = 0 );
 
     static GraphicObject    CreateGraphicObjectFromURL( const OUString &rURL );
     // will inspect an object ( e.g. a control ) for any 'ImageURL'
diff --git a/include/svtools/parhtml.hxx b/include/svtools/parhtml.hxx
index f48106695a4a..85a961417460 100644
--- a/include/svtools/parhtml.hxx
+++ b/include/svtools/parhtml.hxx
@@ -246,21 +246,21 @@ inline void HTMLParser::StartPRE()
 {
     bReadPRE = true;
     bPre_IgnoreNewPara = true;
-    nPre_LinePos = 0UL;
+    nPre_LinePos = 0;
 }
 
 inline void HTMLParser::StartListing()
 {
     bReadListing = true;
     bPre_IgnoreNewPara = true;
-    nPre_LinePos = 0UL;
+    nPre_LinePos = 0;
 }
 
 inline void HTMLParser::StartXMP()
 {
     bReadXMP = true;
     bPre_IgnoreNewPara = true;
-    nPre_LinePos = 0UL;
+    nPre_LinePos = 0;
 }
 
 #endif
diff --git a/include/svx/contdlg.hxx b/include/svx/contdlg.hxx
index bbb7d5d7dba8..876aa70ded2f 100644
--- a/include/svx/contdlg.hxx
+++ b/include/svx/contdlg.hxx
@@ -73,7 +73,7 @@ public:
 
     static tools::PolyPolygon  CreateAutoContour(  const Graphic& rGraphic,
                                             const Rectangle* pRect = nullptr,
-                                            const sal_uIntPtr nFlags = 0L );
+                                            const sal_uIntPtr nFlags = 0 );
 };
 
 #endif // INCLUDED_SVX_CONTDLG_HXX
diff --git a/include/svx/galmisc.hxx b/include/svx/galmisc.hxx
index 4031af58369e..c9711c95ca1d 100644
--- a/include/svx/galmisc.hxx
+++ b/include/svx/galmisc.hxx
@@ -205,10 +205,10 @@ private:
 
 public:
 
-                     GalleryHint( GalleryHintType nType, const OUString& rThemeName, sal_uIntPtr nData1 = 0UL ) :
+                     GalleryHint( GalleryHintType nType, const OUString& rThemeName, sal_uIntPtr nData1 = 0 ) :
                         mnType( nType ), maThemeName( rThemeName ), mnData1( nData1 ) {}
 
-                     GalleryHint( GalleryHintType nType, const OUString& rThemeName, const OUString& rStringData, sal_uIntPtr nData1 = 0UL ) :
+                     GalleryHint( GalleryHintType nType, const OUString& rThemeName, const OUString& rStringData, sal_uIntPtr nData1 = 0 ) :
                         mnType( nType ), maThemeName( rThemeName ), maStringData( rStringData ), mnData1( nData1 ) {}
 
     GalleryHintType  GetType() const { return mnType; }
diff --git a/include/svx/svdmark.hxx b/include/svx/svdmark.hxx
index 39a5eb3f6c7a..731179c7c040 100644
--- a/include/svx/svdmark.hxx
+++ b/include/svx/svdmark.hxx
@@ -216,7 +216,7 @@ public:
         return GetPointMarkDescription(true);
     }
 
-    // pPage=0L: Selection of everything! Respect Pages
+    // pPage=0: Selection of everything! Respect Pages
     bool TakeBoundRect(SdrPageView* pPageView, Rectangle& rRect) const;
     bool TakeSnapRect(SdrPageView* pPageView, Rectangle& rRect) const;
 
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index 73955bf9c96f..3f457057e08a 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -623,7 +623,7 @@ protected:
 
     /// ReAllocateMemory must update the following variables:
     /// - pBuf: Address of new block
-    /// - nEndOfData: Set to nNewSize-1L , if outside of block
+    /// - nEndOfData: Set to nNewSize-1 , if outside of block
     ///               Set to 0 , if new block size is 0 bytes
     /// - nSize: New block size
     /// - nPos: Set to 0 if position outside of block
diff --git a/include/vcl/animate.hxx b/include/vcl/animate.hxx
index 119499629d36..5f705444775d 100644
--- a/include/vcl/animate.hxx
+++ b/include/vcl/animate.hxx
@@ -53,7 +53,7 @@ struct VCL_DLLPUBLIC AnimationBitmap
                         const BitmapEx& rBmpEx,
                         const Point& rPosPix,
                         const Size& rSizePix,
-                        long _nWait = 0L,
+                        long _nWait = 0,
                         Disposal _eDisposal = Disposal::Not
                     ) :
                         aBmpEx      ( rBmpEx ),
diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx
index 474441719031..bc17cbc70c13 100644
--- a/include/vcl/bitmap.hxx
+++ b/include/vcl/bitmap.hxx
@@ -500,7 +500,7 @@ public:
 
         @return the resulting bitmask.
      */
-    Bitmap                  CreateMask( const Color& rTransColor, sal_uLong nTol = 0UL ) const;
+    Bitmap                  CreateMask( const Color& rTransColor, sal_uLong nTol = 0 ) const;
 
     /** Create region of similar colors in a given rectangle
 
diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx
index 1339a88c7319..9a398c76c9e0 100644
--- a/include/vcl/graph.hxx
+++ b/include/vcl/graph.hxx
@@ -176,7 +176,7 @@ public:
     void            StartAnimation( OutputDevice* pOutDev,
                           const Point& rDestPt,
                           const Size& rDestSize,
-                          long nExtraData = 0L,
+                          long nExtraData = 0,
                           OutputDevice* pFirstFrameOutDev = nullptr );
     void            StopAnimation( OutputDevice* pOutputDevice,
                           long nExtraData );
diff --git a/include/vcl/lineinfo.hxx b/include/vcl/lineinfo.hxx
index 99dda6242cf8..4bfa3df339ff 100644
--- a/include/vcl/lineinfo.hxx
+++ b/include/vcl/lineinfo.hxx
@@ -53,7 +53,7 @@ struct ImplLineInfo
 class VCL_DLLPUBLIC LineInfo
 {
 public:
-                    LineInfo( LineStyle eLineStyle = LineStyle::Solid, long nWidth = 0L );
+                    LineInfo( LineStyle eLineStyle = LineStyle::Solid, long nWidth = 0 );
                     LineInfo( const LineInfo& rLineInfo );
                     LineInfo( LineInfo&& rLineInfo );
                     ~LineInfo();
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 5041f3a954ee..3a52aaff98cb 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -1442,7 +1442,7 @@ protected:
 public:
     explicit            MetaCommentAction();
     explicit            MetaCommentAction( const MetaCommentAction& rAct );
-    explicit            MetaCommentAction( const OString& rComment, sal_Int32 nValue = 0L, const sal_uInt8* pData = nullptr, sal_uInt32 nDataSize = 0UL );
+    explicit            MetaCommentAction( const OString& rComment, sal_Int32 nValue = 0, const sal_uInt8* pData = nullptr, sal_uInt32 nDataSize = 0 );
 
     virtual void        Move( long nHorzMove, long nVertMove ) override;
     virtual void        Scale( double fScaleX, double fScaleY ) override;
diff --git a/include/vcl/salbtype.hxx b/include/vcl/salbtype.hxx
index 5129ee76f54f..0cf73e2745f5 100644
--- a/include/vcl/salbtype.hxx
+++ b/include/vcl/salbtype.hxx
@@ -76,11 +76,11 @@ d_Col = BitmapColor( (sal_uInt8) ( _def_cR | ( ( _def_cR & maR.mnOr ) >> maR.mnO
 
 
 #define COLOR_TO_MASK( d_rCol, d_RM, d_GM, d_BM, d_RS, d_GS, d_BS, d_ALPHA ) \
-( ( ( ( d_RS < 0L ) ? ( (sal_uInt32) (d_rCol).GetRed() >> -d_RS ) :     \
+( ( ( ( d_RS < 0 ) ? ( (sal_uInt32) (d_rCol).GetRed() >> -d_RS ) :     \
     ( (sal_uInt32) (d_rCol).GetRed() << d_RS ) ) & d_RM ) |             \
-  ( ( ( d_GS < 0L ) ? ( (sal_uInt32) (d_rCol).GetGreen() >> -d_GS ) :   \
+  ( ( ( d_GS < 0 ) ? ( (sal_uInt32) (d_rCol).GetGreen() >> -d_GS ) :   \
     ( (sal_uInt32) (d_rCol).GetGreen() << d_GS ) ) & d_GM ) |           \
-  ( ( ( d_BS < 0L ) ? ( (sal_uInt32) (d_rCol).GetBlue() >> -d_BS ) :    \
+  ( ( ( d_BS < 0 ) ? ( (sal_uInt32) (d_rCol).GetBlue() >> -d_BS ) :    \
     ( (sal_uInt32) (d_rCol).GetBlue() << d_BS ) ) & d_BM ) | \
     d_ALPHA )
 
diff --git a/include/xmloff/styleexp.hxx b/include/xmloff/styleexp.hxx
index 5f215069d06a..c4b1fc7df080 100644
--- a/include/xmloff/styleexp.hxx
+++ b/include/xmloff/styleexp.hxx
@@ -87,13 +87,13 @@ public:
 //      const OUString& rFamily, const OUString& rXMLFamily,
 //      const rtl::Reference < XMLPropertySetMapper >& rPropMapper,
 //      bool bUsed, sal_uInt16 nFamily = 0,
-//      const OUString* pPrefix = 0L);
+//      const OUString* pPrefix = 0);
 
 //  void exportStyleFamily(
 //      const sal_Char *pFamily, const OUString& rXMLFamily,
 //      const rtl::Reference < XMLPropertySetMapper >& rPropMapper,
 //      bool bUsed, sal_uInt16 nFamily = 0,
-//      const OUString* pPrefix = 0L);
+//      const OUString* pPrefix = 0);
 
     bool exportDefaultStyle(
         const css::uno::Reference< css::beans::XPropertySet > & xPropSet,
diff --git a/lotuswordpro/source/filter/lwpbasetype.cxx b/lotuswordpro/source/filter/lwpbasetype.cxx
index 879094dc095b..8f26a6acf11d 100644
--- a/lotuswordpro/source/filter/lwpbasetype.cxx
+++ b/lotuswordpro/source/filter/lwpbasetype.cxx
@@ -90,8 +90,8 @@ void LwpPoint::Read(LwpObjectStream *pStrm)
 */
 void LwpPoint::Reset()
 {
-    m_nX=0L;
-    m_nY=0L;
+    m_nX=0;
+    m_nY=0;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
index f204ecb5cf84..3d28476bdb22 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
@@ -168,10 +168,10 @@ void SAL_CALL ImportDocumentHandler::startElement(const OUString & _sName, const
                 OUString sLocalName;
                 const OUString sAttrName = _xAttrList->getNameByIndex( i );
                 const sal_Int32 nColonPos = sAttrName.indexOf( ':' );
-                if( -1L == nColonPos )
+                if( -1 == nColonPos )
                     sLocalName = sAttrName;
                 else
-                    sLocalName = sAttrName.copy( nColonPos + 1L );
+                    sLocalName = sAttrName.copy( nColonPos + 1 );
                 const OUString sValue = _xAttrList->getValueByIndex( i );
 
                 switch( m_pReportElemTokenMap->Get( XML_NAMESPACE_REPORT, sLocalName ) )
@@ -217,10 +217,10 @@ void SAL_CALL ImportDocumentHandler::startElement(const OUString & _sName, const
                 OUString sLocalName;
                 const OUString sAttrName = _xAttrList->getNameByIndex( i );
                 const sal_Int32 nColonPos = sAttrName.indexOf( ':' );
-                if( -1L == nColonPos )
+                if( -1 == nColonPos )
                     sLocalName = sAttrName;
                 else
-                    sLocalName = sAttrName.copy( nColonPos + 1L );
+                    sLocalName = sAttrName.copy( nColonPos + 1 );
                 const OUString sValue = _xAttrList->getValueByIndex( i );
 
                 switch( pMasterElemTokenMap->Get( XML_NAMESPACE_REPORT, sLocalName ) )
@@ -260,10 +260,10 @@ void SAL_CALL ImportDocumentHandler::startElement(const OUString & _sName, const
             OUString sLocalName;
             const OUString sAttrName = _xAttrList->getNameByIndex( i );
             const sal_Int32 nColonPos = sAttrName.indexOf( ':' );
-            if( -1L == nColonPos )
+            if( -1 == nColonPos )
                 sLocalName = sAttrName;
             else
-                sLocalName = sAttrName.copy( nColonPos + 1L );
+                sLocalName = sAttrName.copy( nColonPos + 1 );
             if ( sLocalName == "data-source-has-labels" )
             {
                 const OUString sValue = _xAttrList->getValueByIndex( i );
diff --git a/sal/osl/unx/profile.cxx b/sal/osl/unx/profile.cxx
index b62bfad8adda..a34f91ff8986 100644
--- a/sal/osl/unx/profile.cxx
+++ b/sal/osl/unx/profile.cxx
@@ -1035,7 +1035,7 @@ static bool OslProfile_rewindFile(osl_TFile* pFile, bool bTruncate)
     {
         pFile->m_pReadPtr  = pFile->m_ReadBuf + sizeof(pFile->m_ReadBuf);
 
-        bRet = (lseek(pFile->m_Handle, SEEK_SET, 0L) == 0L);
+        bRet = (lseek(pFile->m_Handle, SEEK_SET, 0L) == 0);
 
         if (bTruncate)
         {
diff --git a/sal/rtl/cipher.cxx b/sal/rtl/cipher.cxx
index 0f9d7cc7bd8f..266277c91be9 100644
--- a/sal/rtl/cipher.cxx
+++ b/sal/rtl/cipher.cxx
@@ -31,13 +31,13 @@
 #define RTL_CIPHER_NTOHL(c, l) \
     ((l)  = ((sal_uInt32)(*((c)++))) << 24, \
      (l) |= ((sal_uInt32)(*((c)++))) << 16, \
-     (l) |= ((sal_uInt32)(*((c)++))) <<  8L, \
+     (l) |= ((sal_uInt32)(*((c)++))) <<  8, \
      (l) |= ((sal_uInt32)(*((c)++))))
 
 #define RTL_CIPHER_HTONL(l, c) \
     (*((c)++) = (sal_uInt8)(((l) >> 24) & 0xff), \
      *((c)++) = (sal_uInt8)(((l) >> 16) & 0xff), \
-     *((c)++) = (sal_uInt8)(((l) >>  8L) & 0xff), \
+     *((c)++) = (sal_uInt8)(((l) >>  8) & 0xff), \
      *((c)++) = (sal_uInt8)(((l)       ) & 0xff))
 
 #define RTL_CIPHER_NTOHL64(c, xl, xr, n) \
@@ -48,7 +48,7 @@
     { \
         case 8: (xr)  = ((sal_uInt32)(*(--(c)))); \
             SAL_FALLTHROUGH; \
-        case 7: (xr) |= ((sal_uInt32)(*(--(c)))) <<  8L; \
+        case 7: (xr) |= ((sal_uInt32)(*(--(c)))) <<  8; \
             SAL_FALLTHROUGH; \
         case 6: (xr) |= ((sal_uInt32)(*(--(c)))) << 16; \
             SAL_FALLTHROUGH; \
@@ -56,7 +56,7 @@
             SAL_FALLTHROUGH; \
         case 4: (xl)  = ((sal_uInt32)(*(--(c)))); \
             SAL_FALLTHROUGH; \
-        case 3: (xl) |= ((sal_uInt32)(*(--(c)))) <<  8L; \
+        case 3: (xl) |= ((sal_uInt32)(*(--(c)))) <<  8; \
             SAL_FALLTHROUGH; \
         case 2: (xl) |= ((sal_uInt32)(*(--(c)))) << 16; \
             SAL_FALLTHROUGH; \
@@ -71,7 +71,7 @@
     { \
         case 8: *(--(c)) = (sal_uInt8)(((xr)       ) & 0xff); \
             SAL_FALLTHROUGH; \
-        case 7: *(--(c)) = (sal_uInt8)(((xr) >>  8L) & 0xff); \
+        case 7: *(--(c)) = (sal_uInt8)(((xr) >>  8) & 0xff); \
             SAL_FALLTHROUGH; \
         case 6: *(--(c)) = (sal_uInt8)(((xr) >> 16) & 0xff); \
             SAL_FALLTHROUGH; \
@@ -79,7 +79,7 @@
             SAL_FALLTHROUGH; \
         case 4: *(--(c)) = (sal_uInt8)(((xl)       ) & 0xff); \
             SAL_FALLTHROUGH; \
-        case 3: *(--(c)) = (sal_uInt8)(((xl) >>  8L) & 0xff); \
+        case 3: *(--(c)) = (sal_uInt8)(((xl) >>  8) & 0xff); \
             SAL_FALLTHROUGH; \
         case 2: *(--(c)) = (sal_uInt8)(((xl) >> 16) & 0xff); \
             SAL_FALLTHROUGH; \
diff --git a/sal/rtl/digest.cxx b/sal/rtl/digest.cxx
index e54ada89e5f2..43e95913be17 100644
--- a/sal/rtl/digest.cxx
+++ b/sal/rtl/digest.cxx
@@ -36,12 +36,12 @@
 #define RTL_DIGEST_HTONL(l,c) \
     (*((c)++) = (sal_uInt8)(((l) >> 24) & 0xff), \
      *((c)++) = (sal_uInt8)(((l) >> 16) & 0xff), \
-     *((c)++) = (sal_uInt8)(((l) >>  8L) & 0xff), \
+     *((c)++) = (sal_uInt8)(((l) >>  8) & 0xff), \
      *((c)++) = (sal_uInt8)(((l)       ) & 0xff))
 
 #define RTL_DIGEST_LTOC(l,c) \
     (*((c)++) = (sal_uInt8)(((l)       ) & 0xff), \
-     *((c)++) = (sal_uInt8)(((l) >>  8L) & 0xff), \
+     *((c)++) = (sal_uInt8)(((l) >>  8) & 0xff), \
      *((c)++) = (sal_uInt8)(((l) >> 16) & 0xff), \
      *((c)++) = (sal_uInt8)(((l) >> 24) & 0xff))
 
@@ -701,9 +701,9 @@ static void endMD5 (DigestContextMD5 *ctx)
 
     switch (ctx->m_nDatLen & 0x03)
     {
-        case 0: X[i]  = ((sal_uInt32)(*(p++))) <<  0L;
+        case 0: X[i]  = ((sal_uInt32)(*(p++))) <<  0;
             SAL_FALLTHROUGH;
-        case 1: X[i] |= ((sal_uInt32)(*(p++))) <<  8L;
+        case 1: X[i] |= ((sal_uInt32)(*(p++))) <<  8;
             SAL_FALLTHROUGH;
         case 2: X[i] |= ((sal_uInt32)(*(p++))) << 16;
             SAL_FALLTHROUGH;
@@ -1155,9 +1155,9 @@ static void endSHA (DigestContextSHA *ctx)
 
     switch (ctx->m_nDatLen & 0x03)
     {
-        case 0: X[i]  = ((sal_uInt32)(*(p++))) <<  0L;
+        case 0: X[i]  = ((sal_uInt32)(*(p++))) <<  0;
             SAL_FALLTHROUGH;
-        case 1: X[i] |= ((sal_uInt32)(*(p++))) <<  8L;
+        case 1: X[i] |= ((sal_uInt32)(*(p++))) <<  8;
             SAL_FALLTHROUGH;
         case 2: X[i] |= ((sal_uInt32)(*(p++))) << 16;
             SAL_FALLTHROUGH;
diff --git a/sal/rtl/random.cxx b/sal/rtl/random.cxx
index 3168c9686e28..c68ad4b94f1f 100644
--- a/sal/rtl/random.cxx
+++ b/sal/rtl/random.cxx
@@ -36,13 +36,13 @@
 #define RTL_RANDOM_RNG(x, y, z) \
 { \
     (x) = 170 * ((x) % 178) - 63 * ((x) / 178); \
-    if ((x) < 0) (x) += 30328L; \
+    if ((x) < 0) (x) += 30328; \
     \
     (y) = 171 * ((y) % 177) -  2 * ((y) / 177); \
-    if ((y) < 0) (y) += 30269L; \
+    if ((y) < 0) (y) += 30269; \
     \
     (z) = 172 * ((z) % 176) - 35 * ((z) / 176); \
-    if ((z) < 0) (z) += 30307L; \
+    if ((z) < 0) (z) += 30307; \
 }
 
 /** RandomData_Impl.
diff --git a/salhelper/source/timer.cxx b/salhelper/source/timer.cxx
index c79f1fc03588..bcaeabf0a819 100644
--- a/salhelper/source/timer.cxx
+++ b/salhelper/source/timer.cxx
@@ -221,7 +221,7 @@ TTimeValue Timer::getRemainingTime() const
         if (secs > 0)
         {
             secs  -= 1;
-            nsecs += 1000000000L;
+            nsecs += 1000000000;
         }
         else
             return TTimeValue(0, 0);
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 931d44a550d1..038bcd5cafaf 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -6017,7 +6017,7 @@ void ScDocument::StylesToNames()
 
 sal_uLong ScDocument::GetCellCount() const
 {
-    sal_uLong nCellCount = 0L;
+    sal_uLong nCellCount = 0;
 
     TableContainer::const_iterator it = maTabs.begin();
     for (; it != maTabs.end(); ++it)
@@ -6029,7 +6029,7 @@ sal_uLong ScDocument::GetCellCount() const
 
 sal_uLong ScDocument::GetFormulaGroupCount() const
 {
-    sal_uLong nFormulaGroupCount = 0L;
+    sal_uLong nFormulaGroupCount = 0;
 
     ScFormulaGroupIterator aIter( const_cast<ScDocument*>(this) );
     for ( sc::FormulaGroupEntry* ptr = aIter.first(); ptr; ptr = aIter.next())
diff --git a/sc/source/filter/excel/xltools.cxx b/sc/source/filter/excel/xltools.cxx
index f2e33cff9539..8d55418a5b3b 100644
--- a/sc/source/filter/excel/xltools.cxx
+++ b/sc/source/filter/excel/xltools.cxx
@@ -316,7 +316,7 @@ sal_uInt16 XclTools::GetXclColumnWidth( sal_uInt16 nScWidth, long nScCharWidth )
 
 double XclTools::GetXclDefColWidthCorrection( long nXclDefFontHeight )
 {
-    return 40960.0 / ::std::max( nXclDefFontHeight - 15L, 60L ) + 50.0;
+    return 40960.0 / ::std::max( nXclDefFontHeight - 15, 60L ) + 50.0;
 }
 
 // formatting
diff --git a/sc/source/filter/lotus/lotread.cxx b/sc/source/filter/lotus/lotread.cxx
index 5e30fb56ad09..91a201aff0ab 100644
--- a/sc/source/filter/lotus/lotread.cxx
+++ b/sc/source/filter/lotus/lotread.cxx
@@ -233,7 +233,7 @@ FltError ImportLotus::Read(SvStream& rIn)
     bool            bRead = true;
     sal_uInt16          nOp;
     sal_uInt16          nRecLen;
-    sal_uInt32          nNextRec = 0UL;
+    sal_uInt32          nNextRec = 0;
     FltError        eRet = eERR_OK;
 
     nTab = 0;
diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
index 39ab0c4817df..8d7fb9499286 100644
--- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
@@ -293,7 +293,7 @@ static sal_Int32 lcl_GetRulerPos( sal_Int32 nApiPos )
         nApiLimit = lcl_GetApiPos( nExp );
     }
     sal_Int32 nRelPos = nApiPos - nApiBase;
-    return nRulerPos + nRelPos / nDiv * 10 + ::std::max( nRelPos % nDiv - nDiv + 10L, 0L );
+    return nRulerPos + nRelPos / nDiv * 10 + ::std::max<sal_Int32>( nRelPos % nDiv - nDiv + 10, 0 );
 }
 
 /** Expands the sequence's size and returns the base index of the new inserted elements. */
diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx
index cc0aaf972e61..48ab51194881 100644
--- a/sc/source/ui/cctrl/dpcontrol.cxx
+++ b/sc/source/ui/cctrl/dpcontrol.cxx
@@ -147,7 +147,7 @@ void ScDPFieldButton::getPopupBoundingBox(Point& rPos, Size& rSize) const
 {
     float fScaleFactor = mpOutDev->GetDPIScaleFactor();
 
-    long nMaxSize = 18L * fScaleFactor; // Button max size in either dimension
+    long nMaxSize = 18 * fScaleFactor; // Button max size in either dimension
 
     long nW = std::min(maSize.getWidth() / 2, nMaxSize);
     long nH = std::min(maSize.getHeight(),    nMaxSize);
diff --git a/sc/source/ui/dbgui/csvcontrol.cxx b/sc/source/ui/dbgui/csvcontrol.cxx
index f70aec78e579..9a33e4bd999f 100644
--- a/sc/source/ui/dbgui/csvcontrol.cxx
+++ b/sc/source/ui/dbgui/csvcontrol.cxx
@@ -181,7 +181,7 @@ sal_Int32 ScCsvControl::GetVisPosCount() const
 
 sal_Int32 ScCsvControl::GetMaxPosOffset() const
 {
-    return std::max( GetPosCount() - GetVisPosCount() + 2L, 0L );
+    return std::max<sal_Int32>( GetPosCount() - GetVisPosCount() + 2, 0 );
 }
 
 bool ScCsvControl::IsValidSplitPos( sal_Int32 nPos ) const
@@ -231,7 +231,7 @@ sal_Int32 ScCsvControl::GetLastVisLine() const
 
 sal_Int32 ScCsvControl::GetMaxLineOffset() const
 {
-    return std::max( GetLineCount() - GetVisLineCount() + 1L, 0L );
+    return std::max<sal_Int32>( GetLineCount() - GetVisLineCount() + 1, 0 );
 }
 
 bool ScCsvControl::IsValidLine( sal_Int32 nLine ) const
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index 2a26cc9b8cd9..f7b3d6e7664a 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -196,7 +196,7 @@ sal_Int32 ScCsvGrid::GetNoScrollCol( sal_Int32 nPos ) const
             sal_Int32 nScroll = (GetFirstVisPos() > 0) ? CSV_SCROLL_DIST : 0;
             nNewPos = GetFirstVisPos() + nScroll;
         }
-        else if( nNewPos > GetLastVisPos() - CSV_SCROLL_DIST - 1L )
+        else if( nNewPos > GetLastVisPos() - CSV_SCROLL_DIST - 1 )
         {
             sal_Int32 nScroll = (GetFirstVisPos() < GetMaxPosOffset()) ? CSV_SCROLL_DIST : 0;
             nNewPos = GetLastVisPos() - nScroll - 1;
diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx
index c0b5b197d68c..62abb23ac91c 100644
--- a/sc/source/ui/dbgui/csvruler.cxx
+++ b/sc/source/ui/dbgui/csvruler.cxx
@@ -256,7 +256,7 @@ sal_Int32 ScCsvRuler::GetNoScrollPos( sal_Int32 nPos ) const
             sal_Int32 nScroll = (GetFirstVisPos() > 0) ? CSV_SCROLL_DIST : 0;
             nNewPos = std::max( nPos, GetFirstVisPos() + nScroll );
         }
-        else if( nNewPos > GetLastVisPos() - CSV_SCROLL_DIST - 1L )
+        else if( nNewPos > GetLastVisPos() - CSV_SCROLL_DIST - 1 )
         {
             sal_Int32 nScroll = (GetFirstVisPos() < GetMaxPosOffset()) ? CSV_SCROLL_DIST : 0;
             nNewPos = std::min( nNewPos, GetLastVisPos() - nScroll - sal_Int32( 1 ) );
diff --git a/sc/source/ui/drawfunc/fuconrec.cxx b/sc/source/ui/drawfunc/fuconrec.cxx
index d76b1ef7c9d9..043a421454df 100644
--- a/sc/source/ui/drawfunc/fuconrec.cxx
+++ b/sc/source/ui/drawfunc/fuconrec.cxx
@@ -79,7 +79,7 @@ namespace {
         OUString aArrowName( SVX_RES(nResId) );
         long nCount = pLineEndList->Count();
         long nIndex;
-        for( nIndex = 0L; nIndex < nCount; nIndex++ )
+        for( nIndex = 0; nIndex < nCount; nIndex++ )
         {
             const XLineEndEntry* pEntry = pLineEndList->GetLineEnd(nIndex);
             if( pEntry->GetName() == aArrowName )
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index b4b2a910d4a1..740367eda3a2 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -614,7 +614,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
         {
             if(bLayoutRTL)
             {
-                aDrawingRectPixel.Left() = 0L;
+                aDrawingRectPixel.Left() = 0;
             }
             else
             {
diff --git a/sd/source/core/PageListWatcher.cxx b/sd/source/core/PageListWatcher.cxx
index d5e5dad9845f..ed3db401f37a 100644
--- a/sd/source/core/PageListWatcher.cxx
+++ b/sd/source/core/PageListWatcher.cxx
@@ -110,12 +110,12 @@ SdPage* ImpPageListWatcher::GetSdPage(PageKind ePgKind, sal_uInt32 nPgNum)
         case PageKind::Handout:
         {
 //          #11420# for models used to transfer drawing shapes via clipboard it's ok to not have a handout page
-            DBG_ASSERT(nPgNum == 0L, "ImpPageListWatcher::GetSdPage: access to non existing handout page (!)");
+            DBG_ASSERT(nPgNum == 0, "ImpPageListWatcher::GetSdPage: access to non existing handout page (!)");
             if (nPgNum == 0)
                 pRetval = mpHandoutPage;
             else
             {
-                DBG_ASSERT(nPgNum == 0L,
+                DBG_ASSERT(nPgNum == 0,
                     "ImpPageListWatcher::GetSdPage: access to non existing handout page (!)");
             }
             break;
@@ -150,7 +150,7 @@ sal_uInt32 ImpPageListWatcher::GetSdPageCount(PageKind ePgKind)
         {
             if(mpHandoutPage)
             {
-                nRetval = 1L;
+                nRetval = 1;
             }
 
             break;
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 4443c4262891..c773402b4af8 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -2793,14 +2793,14 @@ OUString HtmlExport::CreateHTMLPolygonArea( const ::basegfx::B2DPolyPolygon& rPo
     OUStringBuffer aStr;
     const sal_uInt32 nNoOfPolygons(rPolyPolygon.count());
 
-    for ( sal_uInt32 nXPoly = 0L; nXPoly < nNoOfPolygons; nXPoly++ )
+    for ( sal_uInt32 nXPoly = 0; nXPoly < nNoOfPolygons; nXPoly++ )
     {
         const ::basegfx::B2DPolygon& aPolygon = rPolyPolygon.getB2DPolygon(nXPoly);
         const sal_uInt32 nNoOfPoints(aPolygon.count());
 
         aStr.append("<area shape=\"polygon\" alt=\"\" coords=\"");
 
-        for ( sal_uInt32 nPoint = 0L; nPoint < nNoOfPoints; nPoint++ )
+        for ( sal_uInt32 nPoint = 0; nPoint < nNoOfPoints; nPoint++ )
         {
             const ::basegfx::B2DPoint aB2DPoint(aPolygon.getB2DPoint(nPoint));
             Point aPnt(FRound(aB2DPoint.getX()), FRound(aB2DPoint.getY()));
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index 79af5b81f845..ae01b515dbc2 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -494,8 +494,8 @@ SfxItemSet*  SdModule::CreateItemSet( sal_uInt16 nSlot )
     pRet->Put( SdOptionsSnapItem( pOptions, pFrameView ) );
 
     // TP_SCALE:
-    sal_uInt32 nW = 10L;
-    sal_uInt32 nH = 10L;
+    sal_uInt32 nW = 10;
+    sal_uInt32 nH = 10;
     sal_Int32  nX;
     sal_Int32  nY;
     if( pDocSh )
diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx
index efcebc1442f1..247fb43e3874 100644
--- a/sd/source/ui/dlg/copydlg.cxx
+++ b/sd/source/ui/dlg/copydlg.cxx
@@ -109,12 +109,12 @@ void CopyDlg::Reset()
         else
             m_pNumFldCopies->SetValue( 1L );
 
-        long nMoveX = 500L;
+        long nMoveX = 500;
         if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_MOVE_X, true, &pPoolItem ) )
             nMoveX = static_cast<const SfxInt32Item*>( pPoolItem )->GetValue();
         SetMetricValue( *m_pMtrFldMoveX, Fraction(nMoveX) / maUIScale, MapUnit::Map100thMM);
 
-        long nMoveY = 500L;
+        long nMoveY = 500;
         if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_MOVE_Y, true, &pPoolItem ) )
             nMoveY = static_cast<const SfxInt32Item*>( pPoolItem )->GetValue();
         SetMetricValue( *m_pMtrFldMoveY, Fraction(nMoveY) / maUIScale, MapUnit::Map100thMM);
@@ -124,12 +124,12 @@ void CopyDlg::Reset()
         else
             m_pMtrFldAngle->SetValue( 0L );
 
-        long nWidth = 0L;
+        long nWidth = 0;
         if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_WIDTH, true, &pPoolItem ) )
             nWidth = static_cast<const SfxInt32Item*>( pPoolItem )->GetValue();
         SetMetricValue( *m_pMtrFldWidth, Fraction(nWidth) / maUIScale, MapUnit::Map100thMM);
 
-        long nHeight = 0L;
+        long nHeight = 0;
         if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_HEIGHT, true, &pPoolItem ) )
             nHeight = static_cast<const SfxInt32Item*>( pPoolItem )->GetValue();
         SetMetricValue( *m_pMtrFldHeight, Fraction(nHeight) / maUIScale, MapUnit::Map100thMM);
@@ -244,11 +244,11 @@ IMPL_LINK_NOARG(CopyDlg, SetDefault, Button*, void)
 {
     m_pNumFldCopies->SetValue( 1L );
 
-    long nValue = 500L;
+    long nValue = 500;
     SetMetricValue( *m_pMtrFldMoveX, Fraction(nValue) / maUIScale, MapUnit::Map100thMM);
     SetMetricValue( *m_pMtrFldMoveY, Fraction(nValue) / maUIScale, MapUnit::Map100thMM);
 
-    nValue = 0L;
+    nValue = 0;
     m_pMtrFldAngle->SetValue( nValue );
     SetMetricValue( *m_pMtrFldWidth, Fraction(nValue) / maUIScale, MapUnit::Map100thMM);
     SetMetricValue( *m_pMtrFldHeight, Fraction(nValue) / maUIScale, MapUnit::Map100thMM);
diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx
index 8c6673011075..7a5dc67728e4 100644
--- a/sd/source/ui/dlg/custsdlg.cxx
+++ b/sd/source/ui/dlg/custsdlg.cxx
@@ -313,7 +313,7 @@ SdDefineCustomShowDlg::SdDefineCustomShowDlg( vcl::Window* pWindow,
     m_pLbPages->SetDropDownLineCount(10);
 
     // fill Listbox with page names of Docs
-    for( long nPage = 0L;
+    for( long nPage = 0;
          nPage < rDoc.GetSdPageCount( PageKind::Standard );
          nPage++ )
     {
@@ -409,7 +409,7 @@ void SdDefineCustomShowDlg::ClickButtonHdl2(void* p)
             sal_uLong nPosCP = TREELIST_APPEND;
             SvTreeListEntry* pEntry = m_pLbCustomPages->FirstSelected();
             if( pEntry )
-                nPosCP = m_pLbCustomPages->GetModel()->GetAbsPos( pEntry ) + 1L;
+                nPosCP = m_pLbCustomPages->GetModel()->GetAbsPos( pEntry ) + 1;
 
             for( sal_Int32 i = 0; i < nCount; i++ )
             {
diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx
index 54818e24a3be..dc22b52ac769 100644
--- a/sd/source/ui/dlg/vectdlg.cxx
+++ b/sd/source/ui/dlg/vectdlg.cxx
@@ -223,9 +223,9 @@ void SdVectorizeDlg::Calculate( Bitmap& rBmp, GDIMetaFile& rMtf )
 void SdVectorizeDlg::AddTile( BitmapReadAccess* pRAcc, GDIMetaFile& rMtf,
                               long nPosX, long nPosY, long nWidth, long nHeight )
 {
-    sal_uLong           nSumR = 0UL, nSumG = 0UL, nSumB = 0UL;
-    const long      nRight = nPosX + nWidth - 1L;
-    const long      nBottom = nPosY + nHeight - 1L;
+    sal_uLong           nSumR = 0, nSumG = 0, nSumB = 0;
+    const long      nRight = nPosX + nWidth - 1;
+    const long      nBottom = nPosY + nHeight - 1;
     const double    fMult = 1.0 / ( nWidth * nHeight );
 
     for( long nY = nPosY; nY <= nBottom; nY++ )
@@ -249,11 +249,11 @@ void SdVectorizeDlg::AddTile( BitmapReadAccess* pRAcc, GDIMetaFile& rMtf,
 
     aRect = PixelToLogic( aRect, rMtf.GetPrefMapMode() );
 
-    if( aRect.Right() > ( rMaxSize.Width() - 1L ) )
-        aRect.Right() = rMaxSize.Width() - 1L;
+    if( aRect.Right() > ( rMaxSize.Width() - 1 ) )
+        aRect.Right() = rMaxSize.Width() - 1;
 
-    if( aRect.Bottom() > ( rMaxSize.Height() - 1L ) )
-        aRect.Bottom() = rMaxSize.Height() - 1L;
+    if( aRect.Bottom() > ( rMaxSize.Height() - 1 ) )
+        aRect.Bottom() = rMaxSize.Height() - 1;
 
     rMtf.AddAction( new MetaLineColorAction( aColor, true ) );
     rMtf.AddAction( new MetaFillColorAction( aColor, true ) );
diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx
index 5555593fbb28..1087c488bd2f 100644
--- a/sd/source/ui/func/fuconrec.cxx
+++ b/sd/source/ui/func/fuconrec.cxx
@@ -509,7 +509,7 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& rAttr, SdrObject* pObj)
         OUString aArrowName( SVX_RES(nResId) );
         long nCount = pLineEndList->Count();
         long nIndex;
-        for( nIndex = 0L; nIndex < nCount; nIndex++ )
+        for( nIndex = 0; nIndex < nCount; nIndex++ )
         {
             const XLineEndEntry* pEntry = pLineEndList->GetLineEnd(nIndex);
             if( pEntry->GetName() == aArrowName )
diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx
index 3fb2dc929646..065314cc4772 100644
--- a/sd/source/ui/func/fucopy.cxx
+++ b/sd/source/ui/func/fucopy.cxx
@@ -127,7 +127,7 @@ void FuCopy::DoExecute( SfxRequest& rReq )
         }
 
         Rectangle           aRect;
-        sal_Int32               lWidth = 0, lHeight = 0, lSizeX = 0L, lSizeY = 0L, lAngle = 0L;
+        sal_Int32               lWidth = 0, lHeight = 0, lSizeX = 0, lSizeY = 0, lAngle = 0;
         sal_uInt16              nNumber = 0;
         Color               aStartColor, aEndColor;
         bool                bColor = false;
@@ -189,13 +189,13 @@ void FuCopy::DoExecute( SfxRequest& rReq )
         // calculate number of possible copies
         aRect = mpView->GetAllMarkedRect();
 
-        if( lWidth < 0L )
+        if( lWidth < 0 )
         {
             long nTmp = ( aRect.Right() - aRect.Left() ) / -lWidth;
             nNumber = (sal_uInt16) std::min( nTmp, (long)nNumber );
         }
 
-        if( lHeight < 0L )
+        if( lHeight < 0 )
         {
             long nTmp = ( aRect.Bottom() - aRect.Top() ) / -lHeight;
             nNumber = (sal_uInt16) std::min( nTmp, (long)nNumber );
diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx
index 009a2f39426c..4e22123d6862 100644
--- a/sd/source/ui/func/fumorph.cxx
+++ b/sd/source/ui/func/fumorph.cxx
@@ -128,11 +128,11 @@ void FuMorph::DoExecute( SfxRequest& )
             {
                 aPolyPoly1 = ::basegfx::tools::correctOrientations(aPolyPoly1);
                 aPolyPoly1.removeDoublePoints();
-                ::basegfx::B2VectorOrientation eIsClockwise1(::basegfx::tools::getOrientation(aPolyPoly1.getB2DPolygon(0L)));
+                ::basegfx::B2VectorOrientation eIsClockwise1(::basegfx::tools::getOrientation(aPolyPoly1.getB2DPolygon(0)));
 
                 aPolyPoly2 = ::basegfx::tools::correctOrientations(aPolyPoly2);
                 aPolyPoly2.removeDoublePoints();
-                ::basegfx::B2VectorOrientation eIsClockwise2(::basegfx::tools::getOrientation(aPolyPoly2.getB2DPolygon(0L)));
+                ::basegfx::B2VectorOrientation eIsClockwise2(::basegfx::tools::getOrientation(aPolyPoly2.getB2DPolygon(0)));
 
                 // set same orientation
                 if(eIsClockwise1 != eIsClockwise2)
@@ -149,7 +149,7 @@ void FuMorph::DoExecute( SfxRequest& )
                     aPolyPoly2.flip();
 
                 // force same point counts
-                for( sal_uInt32 a(0L); a < aPolyPoly1.count(); a++ )
+                for( sal_uInt32 a(0); a < aPolyPoly1.count(); a++ )
                 {
                     ::basegfx::B2DPolygon aSub1(aPolyPoly1.getB2DPolygon(a));
                     ::basegfx::B2DPolygon aSub2(aPolyPoly2.getB2DPolygon(a));
@@ -195,21 +195,21 @@ void FuMorph::DoExecute( SfxRequest& )
     {
         // length of step in dest poly
         ::basegfx::B2DPolygon aRetval;
-        const double fStep(::basegfx::tools::getLength(rCandidate) / (double)(rCandidate.isClosed() ? nNum : nNum - 1L));
+        const double fStep(::basegfx::tools::getLength(rCandidate) / (double)(rCandidate.isClosed() ? nNum : nNum - 1));
         double fDestPos(0.0);
         double fSrcPos(0.0);
-        sal_uInt32 nSrcPos(0L);
-        sal_uInt32 nSrcPosNext((nSrcPos + 1L == rCandidate.count()) ? 0L : nSrcPos + 1L);
+        sal_uInt32 nSrcPos(0);
+        sal_uInt32 nSrcPosNext((nSrcPos + 1 == rCandidate.count()) ? 0L : nSrcPos + 1);
         double fNextSrcLen(::basegfx::B2DVector(rCandidate.getB2DPoint(nSrcPos) - rCandidate.getB2DPoint(nSrcPosNext)).getLength());
 
-        for(sal_uInt32 b(0L); b < nNum; b++)
+        for(sal_uInt32 b(0); b < nNum; b++)
         {
             // calc fDestPos in source
             while(fSrcPos + fNextSrcLen < fDestPos)
             {
                 fSrcPos += fNextSrcLen;
                 nSrcPos++;
-                nSrcPosNext = (nSrcPos + 1L == rCandidate.count()) ? 0L : nSrcPos + 1L;
+                nSrcPosNext = (nSrcPos + 1 == rCandidate.count()) ? 0L : nSrcPos + 1;
                 fNextSrcLen = ::basegfx::B2DVector(rCandidate.getB2DPoint(nSrcPos) - rCandidate.getB2DPoint(nSrcPosNext)).getLength();
             }
 
@@ -224,7 +224,7 @@ void FuMorph::DoExecute( SfxRequest& )
             fDestPos += fStep;
         }
 
-        if(aRetval.count() >= 3L)
+        if(aRetval.count() >= 3)
         {
             aRetval.setClosed(rCandidate.isClosed());
         }
diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx
index eb7cfae7535a..a5114eab4395 100644
--- a/sd/source/ui/func/fuoaprms.cxx
+++ b/sd/source/ui/func/fuoaprms.cxx
@@ -664,9 +664,9 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
                 Point     aCurCenter(aCurRect.Center());
                 const ::basegfx::B2DPolyPolygon& rPolyPolygon = pPath->GetPathPoly();
                 sal_uInt32 nNoOfPolygons(rPolyPolygon.count());
-                const ::basegfx::B2DPolygon aPolygon(rPolyPolygon.getB2DPolygon(nNoOfPolygons - 1L));
+                const ::basegfx::B2DPolygon aPolygon(rPolyPolygon.getB2DPolygon(nNoOfPolygons - 1));
                 sal_uInt32 nPoints(aPolygon.count());
-                const ::basegfx::B2DPoint aNewB2DCenter(aPolygon.getB2DPoint(nPoints - 1L));
+                const ::basegfx::B2DPoint aNewB2DCenter(aPolygon.getB2DPoint(nPoints - 1));
                 const Point aNewCenter(FRound(aNewB2DCenter.getX()), FRound(aNewB2DCenter.getY()));
                 Size aDistance(aNewCenter.X() - aCurCenter.X(), aNewCenter.Y() - aCurCenter.Y());
                 pRunningObj->Move(aDistance);
diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx
index 7ef6ab46b3b4..4adb3f6b9762 100644
--- a/sd/source/ui/func/fupoor.cxx
+++ b/sd/source/ui/func/fupoor.cxx
@@ -628,14 +628,14 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt)
                     {
                         pEdgeObj = static_cast<SdrEdgeObj*>(pHdl->GetObj());
 
-                        if(0L == pHdl->GetPointNum())
+                        if(0 == pHdl->GetPointNum())
                         {
                             if(pEdgeObj->GetConnection(true).GetObject())
                             {
                                 bIsMoveOfConnectedHandle = true;
                             }
                         }
-                        if(1L == pHdl->GetPointNum())
+                        if(1 == pHdl->GetPointNum())
                         {
                             if(pEdgeObj->GetConnection(false).GetObject())
                             {
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index f1e024947f0e..f599f96037bc 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -176,7 +176,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
         long nAngle0  = GetAngle(aMDPos - mpView->GetRef1());
         nAngle0 -= 27000;
         nAngle0 = NormAngle360(nAngle0);
-        bMirrorSide0 = nAngle0 < 18000L;
+        bMirrorSide0 = nAngle0 < 18000;
 
         if (!pHdl && mpView->Is3DRotationCreationActive())
         {
@@ -731,7 +731,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
                      long nAngle1  = GetAngle(aPnt - mpView->GetRef1());
                      nAngle1 -= 27000;
                      nAngle1 = NormAngle360(nAngle1);
-                     bool bMirrorSide1 = nAngle1 < 18000L;
+                     bool bMirrorSide1 = nAngle1 < 18000;
 
                      if (bMirrorSide0 != bMirrorSide1)
                      {
diff --git a/sd/source/ui/func/fusldlg.cxx b/sd/source/ui/func/fusldlg.cxx
index 8d3a4218839f..a240333659cc 100644
--- a/sd/source/ui/func/fusldlg.cxx
+++ b/sd/source/ui/func/fusldlg.cxx
@@ -67,7 +67,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
     SdPage*         pPage = nullptr;
     long            nPage;
 
-    for( nPage = mpDoc->GetSdPageCount( PageKind::Standard ) - 1L; nPage >= 0L; nPage-- )
+    for( nPage = mpDoc->GetSdPageCount( PageKind::Standard ) - 1; nPage >= 0; nPage-- )
     {
         pPage = mpDoc->GetSdPage( (sal_uInt16) nPage, PageKind::Standard );
         OUString aStr( pPage->GetName() );
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index 30109b5a98bf..d974014a57d9 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -267,7 +267,7 @@ public:
 
     void            LockInput();
     void            UnlockInput();
-    bool            IsInputLocked() const { return mnLockCount > 0UL; }
+    bool            IsInputLocked() const { return mnLockCount > 0; }
 
     sal_uInt16      GetCurPageId() { return maTabControl->GetCurPageId(); }
     sal_uInt16      GetCurPagePos() { return maTabControl->GetCurPagePos(); }
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index e3d5a4c59c29..63b0c11d9967 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -662,7 +662,7 @@ void SAL_CALL SlideshowImpl::disposing()
         Help::EnableExtHelp();
 
         showChildWindows();
-        mnChildMask = 0UL;
+        mnChildMask = 0;
     }
 
     // show current window again
@@ -2391,7 +2391,7 @@ static const FncGetChildWindowId aShowChildren[] =
 
 void SlideshowImpl::hideChildWindows()
 {
-    mnChildMask = 0UL;
+    mnChildMask = 0;
 
     if( ANIMATIONMODE_SHOW == meAnimationMode )
     {
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
index ef80dac94e08..a3be158f7f2d 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
@@ -29,7 +29,7 @@
 // previews that are currently not visible.  The visible previews are all
 // held in memory at all times.  This default is used only when the
 // configuration does not have a value.
-static const sal_Int32 MAXIMAL_CACHE_SIZE = 4L*1024L*1024L;
+static const sal_Int32 MAXIMAL_CACHE_SIZE = 4*1024L*1024L;
 
 using namespace ::com::sun::star::uno;
 
diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx
index 9292cf50a08e..d3718f76ee73 100644
--- a/sd/source/ui/view/drawview.cxx
+++ b/sd/source/ui/view/drawview.cxx
@@ -454,7 +454,7 @@ bool DrawView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAtt
  * Paint-method: Redirect event to the view
  */
 
-void DrawView::CompleteRedraw(OutputDevice* pOutDev, const vcl::Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector /*=0L*/)
+void DrawView::CompleteRedraw(OutputDevice* pOutDev, const vcl::Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector /*=0*/)
 {
     if( mpVDev )
     {
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index ef1926241799..5271ed2e1293 100644
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -458,14 +458,14 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
                 nStartPara = 0;
                 nEndPara = pOLV->GetOutliner()->GetParagraphCount() - 1;
             }
-            long nUpper = 0L;
+            long nUpper = 0;
             for( sal_Int32 nPara = nStartPara; nPara <= nEndPara; nPara++ )
             {
                 const SfxItemSet& rItems = pOLV->GetOutliner()->GetParaAttribs( nPara );
                 const SvxULSpaceItem& rItem = static_cast<const SvxULSpaceItem&>( rItems.Get( EE_PARA_ULSPACE ) );
                 nUpper = std::max( nUpper, (long)rItem.GetUpper() );
             }
-            if( nUpper == 0L )
+            if( nUpper == 0 )
                 rSet.DisableItem( SID_PARASPACE_DECREASE );
         }
         else
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index b70b424eb046..94e44b1236f6 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -787,8 +787,8 @@ void DrawViewShell::ShowMousePosInfo(const Rectangle& rRect,
     {
         RulerLine   pHLines[2];
         RulerLine   pVLines[2];
-        long        nHOffs = 0L;
-        long        nVOffs = 0L;
+        long        nHOffs = 0;
+        long        nVOffs = 0;
         sal_uInt16      nCnt;
 
         if (mpHorizontalRuler.get() != nullptr)
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index 31ce3316ed54..0713916b1f46 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -325,7 +325,7 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind)
     OUString aName( "DrawViewShell" );
     SetName (aName);
 
-    mnLockCount = 0UL;
+    mnLockCount = 0;
 
     uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
 
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 5dfe6f600908..4954cde4fe50 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -1323,7 +1323,7 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet)
     if( pFirstPara == pLastPara )
     {
         // how many pages are we before the selected page?
-        sal_uLong nPos = 0L;
+        sal_uLong nPos = 0;
         while( pFirstPara )
         {
             pFirstPara = pOlView->GetPrevTitle( pFirstPara );
@@ -1673,7 +1673,7 @@ void OutlineViewShell::UpdateOutlineObject( SdPage* pPage, Paragraph* pPara )
     // how many paragraphs in the outline?
     sal_Int32 nTitlePara     = rOutliner.GetAbsPos( pPara );
     sal_Int32 nPara          = nTitlePara + 1;
-    sal_Int32 nParasInLayout = 0L;
+    sal_Int32 nParasInLayout = 0;
     pPara = rOutliner.GetParagraph( nPara );
     while( pPara && !::Outliner::HasParaFlag(pPara, ParaFlag::ISPAGE) )
     {
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 9eda921bb7a9..1ee4e3715183 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -385,8 +385,8 @@ SdPage* OutlineView::InsertSlideForParagraph( Paragraph* pPara )
 
     mrOutliner.SetParaFlag( pPara, ParaFlag::ISPAGE );
     // how many titles are there before the new title paragraph?
-    sal_uLong nExample = 0L;            // position of the "example" page
-    sal_uLong nTarget  = 0L;            // position of insertion
+    sal_uLong nExample = 0;            // position of the "example" page
+    sal_uLong nTarget  = 0;            // position of insertion
     while(pPara)
     {
         pPara = GetPrevTitle(pPara);
@@ -503,7 +503,7 @@ IMPL_LINK( OutlineView, ParagraphRemovingHdl, ::Outliner::ParagraphHdlParam, aPa
     if( ::Outliner::HasParaFlag( pPara, ParaFlag::ISPAGE ) )
     {
         // how many titles are in front of the title paragraph in question?
-        sal_uLong nPos = 0L;
+        sal_uLong nPos = 0;
         while(pPara)
         {
             pPara = GetPrevTitle(pPara);
@@ -631,7 +631,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner::DepthChangeHdlParam, aParam
         // the paragraph was a page but now becomes a normal paragraph
 
         // how many titles are before the title paragraph in question?
-        sal_uLong nPos = 0L;
+        sal_uLong nPos = 0;
         Paragraph* pParagraph = pPara;
         while(pParagraph)
         {
@@ -680,7 +680,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner::DepthChangeHdlParam, aParam
     else if ( (pOutliner->GetPrevDepth() == 1) && ( pOutliner->GetDepth( pOutliner->GetAbsPos( pPara ) ) == 2 ) )
     {
         // how many titles are in front of the title paragraph in question?
-        sal_Int32 nPos = -1L;
+        sal_Int32 nPos = -1;
 
         Paragraph* pParagraph = pPara;
         while(pParagraph)
@@ -700,7 +700,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner::DepthChangeHdlParam, aParam
 
     }
     // how many titles are in front of the title paragraph in question?
-    sal_Int32 nPos = -1L;
+    sal_Int32 nPos = -1;
 
     Paragraph* pTempPara = pPara;
     while(pTempPara)
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 193b5a45551f..12bfacf6dff8 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -468,7 +468,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirected
 /**
  * The event will be forwarded to the View
  */
-void View::CompleteRedraw(OutputDevice* pOutDev, const vcl::Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector /*=0L*/)
+void View::CompleteRedraw(OutputDevice* pOutDev, const vcl::Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector /*=0*/)
 {
     // execute ??
     if (mnLockRedrawSmph == 0)
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 91be0281b146..53f3a1e4c067 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -789,7 +789,7 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi
                         long        nNewZoom;
                         Point aOldMousePos = GetActiveWindow()->PixelToLogic(rCEvt.GetMousePosPixel());
 
-                        if( pData->GetDelta() < 0L )
+                        if( pData->GetDelta() < 0 )
                             nNewZoom = std::max( (long) pWin->GetMinZoom(), basegfx::zoomtools::zoomOut( nOldZoom ));
                         else
                             nNewZoom = std::min( (long) pWin->GetMaxZoom(), basegfx::zoomtools::zoomIn( nOldZoom ));
diff --git a/sfx2/source/bastyp/mieclip.cxx b/sfx2/source/bastyp/mieclip.cxx
index 65c2fee624a1..65fa79649183 100644
--- a/sfx2/source/bastyp/mieclip.cxx
+++ b/sfx2/source/bastyp/mieclip.cxx
@@ -82,7 +82,7 @@ SvStream* MSE40HTMLClipFormatObj::IsValid( SvStream& rStream )
                                         ? nEnd - nStt + 32
                                         : 0 ));
         pStrm->WriteStream( rStream );
-        pStrm->SetStreamSize( nEnd - nStt + 1L );
+        pStrm->SetStreamSize( nEnd - nStt + 1 );
         pStrm->Seek( STREAM_SEEK_TO_BEGIN );
         return pStrm;
     }
diff --git a/shell/source/win32/shlxthandler/ooofilt/stream_helper.cxx b/shell/source/win32/shlxthandler/ooofilt/stream_helper.cxx
index 49adb0aa95ac..7205eb9b6c5e 100644
--- a/shell/source/win32/shlxthandler/ooofilt/stream_helper.cxx
+++ b/shell/source/win32/shlxthandler/ooofilt/stream_helper.cxx
@@ -127,14 +127,14 @@ long FileStream::stell ()
 {
     if (file)
         return ftell(file);
-    return -1L;
+    return -1;
 }
 
 long FileStream::sseek (long offset, int origin)
 {
     if (file)
         return fseek(file, offset, origin);
-    return -1L;
+    return -1;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/slideshow/source/engine/shapes/drawinglayeranimation.cxx b/slideshow/source/engine/shapes/drawinglayeranimation.cxx
index 63d1787474cb..413d333890d2 100644
--- a/slideshow/source/engine/shapes/drawinglayeranimation.cxx
+++ b/slideshow/source/engine/shapes/drawinglayeranimation.cxx
@@ -105,7 +105,7 @@ double ScrollTextAnimNode::GetStateAtRelativeTime(
         const sal_uInt32 nRepeatCount(nRelativeTime / mnDuration);
         sal_uInt32 nFrameTime(nRelativeTime - (nRepeatCount * mnDuration));
 
-        if(DoAlternate() && (nRepeatCount + 1L) % 2L)
+        if(DoAlternate() && (nRepeatCount + 1) % 2L)
             nFrameTime = mnDuration - nFrameTime;
 
         return mfStart + ((mfStop - mfStart) *
@@ -120,7 +120,7 @@ double ScrollTextAnimNode::GetStateAtRelativeTime(
         {
             const sal_uInt32 nRepeatCount(nRelativeTime / mnDuration);
 
-            if((nRepeatCount + 1L) % 2L)
+            if((nRepeatCount + 1) % 2L)
                 nFrameTime = mnDuration - nFrameTime;
         }
 
@@ -306,7 +306,7 @@ double ActivityImpl::GetMixerState( sal_uInt32 nTime )
             else
             {
                 // end of animation, take last entry's end
-                fRetval = maVector[maVector.size() - 1L].GetStop();
+                fRetval = maVector[maVector.size() - 1].GetStop();
             }
         }
 
@@ -322,25 +322,25 @@ sal_uInt32 ActivityImpl::GetStepWidthLogic() const
 
     sal_uInt32 nRetval(0L);
 
-    if(mnStepWidth < 0L)
+    if(mnStepWidth < 0)
     {
         // is in pixels, convert to logical units
         nRetval = (-mnStepWidth * PIXEL_TO_LOGIC);
     }
-    else if(mnStepWidth > 0L)
+    else if(mnStepWidth > 0)
     {
         // is in logical units
         nRetval = mnStepWidth;
     }
 
-    if(0L == nRetval)
+    if(0 == nRetval)
     {
         // step 1 pixel, canned value
 
         // with very high DPIs like in PDF export, this can
         // still get zero.  for that cases, set a default, too (taken
         // from ainfoscrolltext.cxx)
-        nRetval = 100L;
+        nRetval = 100;
     }
 
     return nRetval;
@@ -464,7 +464,7 @@ void ActivityImpl::ImpForceScrollTextAnimNodes()
                 (fRelativeDistance * fDistanceLogic) / GetStepWidthLogic();
             nLoopTime = FRound(fNumberSteps * mnFrequency);
 
-            if(0L == mnRepeat)
+            if(0 == mnRepeat)
             {
                 if(!DoScrollIn())
                 {
@@ -480,8 +480,8 @@ void ActivityImpl::ImpForceScrollTextAnimNodes()
             {
                 sal_uInt32 nNumRepeat(mnRepeat);
 
-                if(DoAlternate() && (nNumRepeat + 1L) % 2L)
-                    nNumRepeat += 1L;
+                if(DoAlternate() && (nNumRepeat + 1) % 2L)
+                    nNumRepeat += 1;
 
                 // ending main loop
                 ScrollTextAnimNode aMainNode(
@@ -830,7 +830,7 @@ ActivityImpl::ActivityImpl(
         // eg VisisbleWhenStopped is grayed out and needs to be corrected here.
         mbVisibleWhenStopped = true;
         mbVisibleWhenStarted = false;
-        mnRepeat = 0L;
+        mnRepeat = 0;
     }
 
     // Get animation direction
diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx
index 0ce16d4900e5..c2a4477a0565 100644
--- a/sot/source/sdstor/stg.cxx
+++ b/sot/source/sdstor/stg.cxx
@@ -195,7 +195,7 @@ sal_uLong StorageStream::Read( void* pData, sal_uLong nSize )
         nPos += nSize;
     }
     else
-        nSize = 0L;
+        nSize = 0;
     return nSize;
 }
 
@@ -209,7 +209,7 @@ sal_uLong StorageStream::Write( const void* pData, sal_uLong nSize )
         nPos += nSize;
     }
     else
-        nSize = 0L;
+        nSize = 0;
     return nSize;
 }
 
diff --git a/sot/source/sdstor/stgole.cxx b/sot/source/sdstor/stgole.cxx
index 9adfcac5fbd4..983401def54c 100644
--- a/sot/source/sdstor/stgole.cxx
+++ b/sot/source/sdstor/stgole.cxx
@@ -111,7 +111,7 @@ bool StgCompObjStream::Load()
     Seek( 8L );     // skip the first part
     sal_Int32 nMarker = 0;
     ReadInt32( nMarker );
-    if( nMarker == -1L )
+    if( nMarker == -1 )
     {
         ReadClsId( *this, m_aClsId );
         sal_Int32 nLen1 = 0;
@@ -150,7 +150,7 @@ bool StgCompObjStream::Store()
     WriteInt16( 1 );          // Version?
     WriteInt16( -2 );                     // 0xFFFE = Byte Order Indicator
     WriteInt32( 0x0A03 );         // Windows 3.10
-    WriteInt32( -1L );
+    WriteInt32( -1 );
     WriteClsId( *this, m_aClsId );             // Class ID
     WriteInt32( aAsciiUserName.getLength() + 1 );
     WriteCharPtr( aAsciiUserName.getStr() );
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 84942089915d..71bcfe23f117 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -1548,8 +1548,8 @@ void SmVerticalBraceNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
         eRectPos = RectPos::Bottom;
         nDistScript *= + rFormat.GetDistance(DIS_LOWERLIMIT);
     }
-    nDistBody   /= 100L;
-    nDistScript /= 100L;
+    nDistBody   /= 100;
+    nDistScript /= 100;
 
     Point  aPos = pBrace->AlignTo(*pBody, eRectPos, RectHorAlign::Center, RectVerAlign::Baseline);
     aPos.Y() += nDistBody;
diff --git a/stoc/test/testintrosp.cxx b/stoc/test/testintrosp.cxx
index 22df49ebc509..f94b15b3eaaf 100644
--- a/stoc/test/testintrosp.cxx
+++ b/stoc/test/testintrosp.cxx
@@ -482,7 +482,7 @@ void ImplIntroTest::setPropertyValue( const OUString& aPropertyName, const Any&
         PropertyChangeEvent aEvt;
         aEvt.Source = (OWeakObject*)this;
         aEvt.PropertyName = aPropertyName;
-        aEvt.PropertyHandle = 0L;
+        aEvt.PropertyHandle = 0;
         aPropChangeListener->propertyChange( aEvt );
     }
     if( aVetoPropChangeListener.is() && aPropertyName == aVetoPropChangeListenerStr )
@@ -490,7 +490,7 @@ void ImplIntroTest::setPropertyValue( const OUString& aPropertyName, const Any&
         PropertyChangeEvent aEvt;
         aEvt.Source = (OWeakObject*)this;
         aEvt.PropertyName = aVetoPropChangeListenerStr;
-        aEvt.PropertyHandle = 0L;
+        aEvt.PropertyHandle = 0;
         aVetoPropChangeListener->vetoableChange( aEvt );
     }
 
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 103da063321f..85533c5e23f4 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2725,7 +2725,7 @@ void SvNumberformat::ImpGetFractionElements ( double& fNumber, sal_uInt16 nIx,
     {
         nDiv = 1;
         sal_uInt64 nBasis = ((sal_uInt64)floor( pow(10.0,rInfo.nCntExp))) - 1; // 9, 99, 999 ,...
-        sal_uInt64 nFracPrev = 1L, nDivPrev = 0, nFracNext, nDivNext, nPartialDenom;
+        sal_uInt64 nFracPrev = 1, nDivPrev = 0, nFracNext, nDivNext, nPartialDenom;
         double fRemainder = fNumber;
 
         // Use continued fraction representation of fNumber
diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx
index 844dc178cc65..4c3253f045d6 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -342,7 +342,7 @@ void SvTreeList::Move( SvTreeListEntry* pSrcEntry, SvTreeListEntry* pDstEntry )
     if ( !pDstEntry )
     {
         pParent = pRootItem;
-        nPos = 0UL;
+        nPos = 0;
     }
     else
     {
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index ad4eaef311b7..6173d089be73 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -1378,7 +1378,7 @@ void ToolbarMenu::Command( const CommandEvent& rCEvt )
         const CommandWheelData* pData = rCEvt.GetWheelData();
         if( !pData->GetModifier() && ( pData->GetMode() == CommandWheelMode::SCROLL ) )
         {
-            implCursorUpDown( pData->GetDelta() > 0L, false );
+            implCursorUpDown( pData->GetDelta() > 0, false );
         }
     }
 }
diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx
index c35159f9f00d..f8573997d1ab 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -1216,7 +1216,7 @@ bool GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, co
 
 bool GraphicCache::ImplFreeDisplayCacheSpace( sal_uLong nSizeToFree )
 {
-    sal_uLong nFreedSize = 0UL;
+    sal_uLong nFreedSize = 0;
 
     if( nSizeToFree )
     {
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index d50453192f8a..a70e87ce8b18 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -464,7 +464,7 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
         pOut->SetDrawMode( nOldDrawMode & ~DrawModeFlags( DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient ) );
 
     // mirrored horizontically
-    if( aSz.Width() < 0L )
+    if( aSz.Width() < 0 )
     {
         aPt.X() += aSz.Width() + 1;
         aSz.Width() = -aSz.Width();
@@ -472,7 +472,7 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
     }
 
     // mirrored vertically
-    if( aSz.Height() < 0L )
+    if( aSz.Height() < 0 )
     {
         aPt.Y() += aSz.Height() + 1;
         aSz.Height() = -aSz.Height();
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index 3eb47fbc867f..99b62c3a8c42 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -338,7 +338,7 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
         fRevScaleX = (double) ( aBitmapWidth  - 1 ) / (double)( aUnrotatedWidth  - 1 );
         // create horizontal mapping table
         long x;
-        for( x = 0, nTmpX = aBitmapWidth - 1L, nTmp = aBitmapWidth - 2L >= 0 ? aBitmapWidth -2L : 0L; x < aUnrotatedWidth; x++ )
+        for( x = 0, nTmpX = aBitmapWidth - 1, nTmp = aBitmapWidth - 2 >= 0 ? aBitmapWidth -2 : 0L; x < aUnrotatedWidth; x++ )
         {
             fTmp = x * fRevScaleX;
 
@@ -377,7 +377,7 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
         fRevScaleY = (double) ( aBitmapHeight  - 1 ) / (double)( aUnrotatedHeight - 1 );
         // create vertical mapping table
         long y;
-        for( y = 0, nTmpY = aBitmapHeight - 1L, nTmp = aBitmapHeight - 2L >= 0 ? aBitmapHeight - 2L : 0L; y < aUnrotatedHeight; y++ )
+        for( y = 0, nTmpY = aBitmapHeight - 1, nTmp = aBitmapHeight - 2 >= 0 ? aBitmapHeight - 2 : 0L; y < aUnrotatedHeight; y++ )
         {
             fTmp = y * fRevScaleY;
 
@@ -419,8 +419,8 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
 
     const double        fCosAngle = cos( nRot10 * F_PI1800 );
     const double        fSinAngle = sin( nRot10 * F_PI1800 );
-    const long          aTargetWidth  = nEndX - nStartX + 1L;
-    const long          aTargetHeight = nEndY - nStartY + 1L;
+    const long          aTargetWidth  = nEndX - nStartX + 1;
+    const long          aTargetHeight = nEndY - nStartY + 1;
     std::unique_ptr<long[]> pCosX(new long[ aTargetWidth ]);
     std::unique_ptr<long[]> pSinX(new long[ aTargetWidth ]);
     std::unique_ptr<long[]> pCosY(new long[ aTargetHeight ]);
@@ -472,8 +472,8 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
                             nUnRotX = ( pCosX[ x ] - nSinY ) >> 8;
                             nUnRotY = ( pSinX[ x ] + nCosY ) >> 8;
 
-                            if( ( nUnRotX >= 0L ) && ( nUnRotX < aUnrotatedWidth ) &&
-                                ( nUnRotY >= 0L ) && ( nUnRotY < aUnrotatedHeight ) )

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list