[Libreoffice-commits] core.git: sc/qa sfx2/source slideshow/source starmath/source svx/source

udareechk udareeck at gmail.com
Mon Oct 23 14:51:32 UTC 2017


 sc/qa/unit/subsequent_export-test.cxx                    |   24 +++++++--------
 sfx2/source/bastyp/bitset.cxx                            |    6 +--
 slideshow/source/engine/shapes/drawinglayeranimation.cxx |    8 ++---
 starmath/source/rect.cxx                                 |    8 ++---
 svx/source/gallery2/galtheme.cxx                         |    2 -
 5 files changed, 24 insertions(+), 24 deletions(-)

New commits:
commit 022b1b2a40fcaf8d201081dead44c1d3346d1972
Author: udareechk <udareeck at gmail.com>
Date:   Thu Sep 21 01:30:46 2017 +0530

    tdf#96505 Get rid of cargo cult long integer literals
    
    Removed 0L, 1L and 2L
    
    Change-Id: Icb38de1cdd8e1215a86118b0c8af993025fd790e
    Reviewed-on: https://gerrit.libreoffice.org/42567
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index ee8e33433bab..43faffb75127 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -2299,18 +2299,18 @@ void ScExportTest::testExcelCellBorders( sal_uLong nFormatType )
         SvxBorderLineStyle mnStyle;
         long mnWidth;
     } aChecks[] = {
-        {  1, SvxBorderLineStyle::SOLID,         1L }, // hair
-        {  3, SvxBorderLineStyle::DOTTED,       15L }, // dotted
-        {  5, SvxBorderLineStyle::DASH_DOT_DOT, 15L }, // dash dot dot
-        {  7, SvxBorderLineStyle::DASH_DOT,     15L }, // dash dot
-        {  9, SvxBorderLineStyle::FINE_DASHED,  15L }, // dashed
-        { 11, SvxBorderLineStyle::SOLID,        15L }, // thin
-        { 13, SvxBorderLineStyle::DASH_DOT_DOT, 35L }, // medium dash dot dot
-        { 17, SvxBorderLineStyle::DASH_DOT,     35L }, // medium dash dot
-        { 19, SvxBorderLineStyle::DASHED,       35L }, // medium dashed
-        { 21, SvxBorderLineStyle::SOLID,        35L }, // medium
-        { 23, SvxBorderLineStyle::SOLID,        50L }, // thick
-        { 25, SvxBorderLineStyle::DOUBLE_THIN,  -1L }, // double (don't check width)
+        {  1, SvxBorderLineStyle::SOLID,         1 }, // hair
+        {  3, SvxBorderLineStyle::DOTTED,       15 }, // dotted
+        {  5, SvxBorderLineStyle::DASH_DOT_DOT, 15 }, // dash dot dot
+        {  7, SvxBorderLineStyle::DASH_DOT,     15 }, // dash dot
+        {  9, SvxBorderLineStyle::FINE_DASHED,  15 }, // dashed
+        { 11, SvxBorderLineStyle::SOLID,        15 }, // thin
+        { 13, SvxBorderLineStyle::DASH_DOT_DOT, 35 }, // medium dash dot dot
+        { 17, SvxBorderLineStyle::DASH_DOT,     35 }, // medium dash dot
+        { 19, SvxBorderLineStyle::DASHED,       35 }, // medium dashed
+        { 21, SvxBorderLineStyle::SOLID,        35 }, // medium
+        { 23, SvxBorderLineStyle::SOLID,        50 }, // thick
+        { 25, SvxBorderLineStyle::DOUBLE_THIN,  -1 }, // double (don't check width)
     };
 
     ScDocShellRef xDocSh = loadDoc("cell-borders.", nFormatType);
diff --git a/sfx2/source/bastyp/bitset.cxx b/sfx2/source/bastyp/bitset.cxx
index 66dbcf2b7db3..49a6a75dac0f 100644
--- a/sfx2/source/bastyp/bitset.cxx
+++ b/sfx2/source/bastyp/bitset.cxx
@@ -29,7 +29,7 @@
 IndexBitSet& IndexBitSet::operator-=(sal_uInt16 nBit)
 {
     sal_uInt16 nBlock = nBit / 32;
-    sal_uInt32 nBitVal = 1L << (nBit % 32);
+    sal_uInt32 nBitVal = 1 << (nBit % 32);
 
     if ( nBlock >= nBlocks )
       return *this;
@@ -48,7 +48,7 @@ IndexBitSet& IndexBitSet::operator-=(sal_uInt16 nBit)
 IndexBitSet& IndexBitSet::operator|=( sal_uInt16 nBit )
 {
     sal_uInt16 nBlock = nBit / 32;
-    sal_uInt32 nBitVal = 1L << (nBit % 32);
+    sal_uInt32 nBitVal = 1 << (nBit % 32);
 
     if ( nBlock >= nBlocks )
     {
@@ -78,7 +78,7 @@ IndexBitSet& IndexBitSet::operator|=( sal_uInt16 nBit )
 bool IndexBitSet::Contains( sal_uInt16 nBit ) const
 {
     sal_uInt16 nBlock = nBit / 32;
-    sal_uInt32 nBitVal = 1L << (nBit % 32);
+    sal_uInt32 nBitVal = 1 << (nBit % 32);
 
     if ( nBlock >= nBlocks )
         return false;
diff --git a/slideshow/source/engine/shapes/drawinglayeranimation.cxx b/slideshow/source/engine/shapes/drawinglayeranimation.cxx
index bff671de8804..63006b5af07a 100644
--- a/slideshow/source/engine/shapes/drawinglayeranimation.cxx
+++ b/slideshow/source/engine/shapes/drawinglayeranimation.cxx
@@ -435,7 +435,7 @@ void ActivityImpl::ImpForceScrollTextAnimNodes()
 
             // init loop
             ScrollTextAnimNode aInitNode(
-                nLoopTime, 1L,
+                nLoopTime, 1,
                 fRelativeStartValue, fRelativeEndValue,
                 mnFrequency, false);
             maVector.push_back(aInitNode);
@@ -468,7 +468,7 @@ void ActivityImpl::ImpForceScrollTextAnimNodes()
                 {
                     // endless main loop
                     ScrollTextAnimNode aMainNode(
-                        nLoopTime, 0L,
+                        nLoopTime, 0,
                         fRelativeStartValue, fRelativeEndValue,
                         mnFrequency, DoAlternate());
                     maVector.push_back(aMainNode);
@@ -513,7 +513,7 @@ void ActivityImpl::ImpForceScrollTextAnimNodes()
 
             // exit loop
             ScrollTextAnimNode aExitNode(
-                nLoopTime, 1L,
+                nLoopTime, 1,
                 fRelativeStartValue, fRelativeEndValue, mnFrequency, false);
             maVector.push_back(aExitNode);
         }
@@ -816,7 +816,7 @@ ActivityImpl::ActivityImpl(
     mnFrequency = (nDelay ? nDelay :
                    // default:
                    meAnimKind == drawing::TextAnimationKind_BLINK
-                   ? 250L : 50L );
+                   ? 250 : 50 );
 
     // adopted from in AInfoScrollText::ImplInit():
 
diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx
index 6f5faf57ec20..169933fcb6de 100644
--- a/starmath/source/rect.cxx
+++ b/starmath/source/rect.cxx
@@ -190,8 +190,8 @@ SmRect::SmRect(const OutputDevice &rDev, const SmFormat *pFormat,
     bHasAlignInfo = true;
     bHasBaseline  = true;
     nBaseline     = aFM.GetAscent();
-    nAlignT       = nBaseline - nFontHeight * 750L / 1000L;
-    nAlignM       = nBaseline - nFontHeight * 121L / 422L;
+    nAlignT       = nBaseline - nFontHeight * 750 / 1000;
+    nAlignM       = nBaseline - nFontHeight * 121 / 422;
         // that's where the horizontal bars of '+', '-', ... are
         // (1/3 of ascent over baseline)
         // (121 = 1/3 of 12pt ascent, 422 = 12pt fontheight)
@@ -212,7 +212,7 @@ SmRect::SmRect(const OutputDevice &rDev, const SmFormat *pFormat,
         if (nDelta == 0)
         {   // this value approx. fits a Leading of 80 at a
             // Fontheight of 422 (12pt)
-            nDelta = nFontHeight * 8L / 43;
+            nDelta = nFontHeight * 8 / 43;
         }
         SetTop(GetTop() - nDelta);
 
@@ -235,7 +235,7 @@ SmRect::SmRect(const OutputDevice &rDev, const SmFormat *pFormat,
     long  nDist = 0;
     if (pFormat)
         nDist = (rDev.GetFont().GetFontSize().Height()
-                * pFormat->GetDistance(DIS_ORNAMENTSIZE)) / 100L;
+                * pFormat->GetDistance(DIS_ORNAMENTSIZE)) / 100;
 
     nHiAttrFence = aGlyphRect.TopLeft().Y() - 1 - nBorderWidth - nDist;
     nLoAttrFence = SmFromTo(GetAlignB(), GetBottom(), 0.0);
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index fa7d6971207f..4ae50c793001 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -1378,7 +1378,7 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm )
         rIStm.ReadUInt16( nTmp16 );
     }
 
-    if( nCount <= ( 1L << 14 ) )
+    if( nCount <= ( 1 << 14 ) )
     {
         GalleryObject*  pObj;
         INetURLObject   aRelURL1( GetParent()->GetRelativeURL() );


More information about the Libreoffice-commits mailing list