Kaydet (Commit) 022b1b2a authored tarafından udareechk's avatar udareechk Kaydeden (comit) Michael Stahl

tdf#96505 Get rid of cargo cult long integer literals

Removed 0L, 1L and 2L

Change-Id: Icb38de1cdd8e1215a86118b0c8af993025fd790e
Reviewed-on: https://gerrit.libreoffice.org/42567Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
Tested-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst f68c1a0f
...@@ -2299,18 +2299,18 @@ void ScExportTest::testExcelCellBorders( sal_uLong nFormatType ) ...@@ -2299,18 +2299,18 @@ void ScExportTest::testExcelCellBorders( sal_uLong nFormatType )
SvxBorderLineStyle mnStyle; SvxBorderLineStyle mnStyle;
long mnWidth; long mnWidth;
} aChecks[] = { } aChecks[] = {
{ 1, SvxBorderLineStyle::SOLID, 1L }, // hair { 1, SvxBorderLineStyle::SOLID, 1 }, // hair
{ 3, SvxBorderLineStyle::DOTTED, 15L }, // dotted { 3, SvxBorderLineStyle::DOTTED, 15 }, // dotted
{ 5, SvxBorderLineStyle::DASH_DOT_DOT, 15L }, // dash dot dot { 5, SvxBorderLineStyle::DASH_DOT_DOT, 15 }, // dash dot dot
{ 7, SvxBorderLineStyle::DASH_DOT, 15L }, // dash dot { 7, SvxBorderLineStyle::DASH_DOT, 15 }, // dash dot
{ 9, SvxBorderLineStyle::FINE_DASHED, 15L }, // dashed { 9, SvxBorderLineStyle::FINE_DASHED, 15 }, // dashed
{ 11, SvxBorderLineStyle::SOLID, 15L }, // thin { 11, SvxBorderLineStyle::SOLID, 15 }, // thin
{ 13, SvxBorderLineStyle::DASH_DOT_DOT, 35L }, // medium dash dot dot { 13, SvxBorderLineStyle::DASH_DOT_DOT, 35 }, // medium dash dot dot
{ 17, SvxBorderLineStyle::DASH_DOT, 35L }, // medium dash dot { 17, SvxBorderLineStyle::DASH_DOT, 35 }, // medium dash dot
{ 19, SvxBorderLineStyle::DASHED, 35L }, // medium dashed { 19, SvxBorderLineStyle::DASHED, 35 }, // medium dashed
{ 21, SvxBorderLineStyle::SOLID, 35L }, // medium { 21, SvxBorderLineStyle::SOLID, 35 }, // medium
{ 23, SvxBorderLineStyle::SOLID, 50L }, // thick { 23, SvxBorderLineStyle::SOLID, 50 }, // thick
{ 25, SvxBorderLineStyle::DOUBLE_THIN, -1L }, // double (don't check width) { 25, SvxBorderLineStyle::DOUBLE_THIN, -1 }, // double (don't check width)
}; };
ScDocShellRef xDocSh = loadDoc("cell-borders.", nFormatType); ScDocShellRef xDocSh = loadDoc("cell-borders.", nFormatType);
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
IndexBitSet& IndexBitSet::operator-=(sal_uInt16 nBit) IndexBitSet& IndexBitSet::operator-=(sal_uInt16 nBit)
{ {
sal_uInt16 nBlock = nBit / 32; sal_uInt16 nBlock = nBit / 32;
sal_uInt32 nBitVal = 1L << (nBit % 32); sal_uInt32 nBitVal = 1 << (nBit % 32);
if ( nBlock >= nBlocks ) if ( nBlock >= nBlocks )
return *this; return *this;
...@@ -48,7 +48,7 @@ IndexBitSet& IndexBitSet::operator-=(sal_uInt16 nBit) ...@@ -48,7 +48,7 @@ IndexBitSet& IndexBitSet::operator-=(sal_uInt16 nBit)
IndexBitSet& IndexBitSet::operator|=( sal_uInt16 nBit ) IndexBitSet& IndexBitSet::operator|=( sal_uInt16 nBit )
{ {
sal_uInt16 nBlock = nBit / 32; sal_uInt16 nBlock = nBit / 32;
sal_uInt32 nBitVal = 1L << (nBit % 32); sal_uInt32 nBitVal = 1 << (nBit % 32);
if ( nBlock >= nBlocks ) if ( nBlock >= nBlocks )
{ {
...@@ -78,7 +78,7 @@ IndexBitSet& IndexBitSet::operator|=( sal_uInt16 nBit ) ...@@ -78,7 +78,7 @@ IndexBitSet& IndexBitSet::operator|=( sal_uInt16 nBit )
bool IndexBitSet::Contains( sal_uInt16 nBit ) const bool IndexBitSet::Contains( sal_uInt16 nBit ) const
{ {
sal_uInt16 nBlock = nBit / 32; sal_uInt16 nBlock = nBit / 32;
sal_uInt32 nBitVal = 1L << (nBit % 32); sal_uInt32 nBitVal = 1 << (nBit % 32);
if ( nBlock >= nBlocks ) if ( nBlock >= nBlocks )
return false; return false;
......
...@@ -435,7 +435,7 @@ void ActivityImpl::ImpForceScrollTextAnimNodes() ...@@ -435,7 +435,7 @@ void ActivityImpl::ImpForceScrollTextAnimNodes()
// init loop // init loop
ScrollTextAnimNode aInitNode( ScrollTextAnimNode aInitNode(
nLoopTime, 1L, nLoopTime, 1,
fRelativeStartValue, fRelativeEndValue, fRelativeStartValue, fRelativeEndValue,
mnFrequency, false); mnFrequency, false);
maVector.push_back(aInitNode); maVector.push_back(aInitNode);
...@@ -468,7 +468,7 @@ void ActivityImpl::ImpForceScrollTextAnimNodes() ...@@ -468,7 +468,7 @@ void ActivityImpl::ImpForceScrollTextAnimNodes()
{ {
// endless main loop // endless main loop
ScrollTextAnimNode aMainNode( ScrollTextAnimNode aMainNode(
nLoopTime, 0L, nLoopTime, 0,
fRelativeStartValue, fRelativeEndValue, fRelativeStartValue, fRelativeEndValue,
mnFrequency, DoAlternate()); mnFrequency, DoAlternate());
maVector.push_back(aMainNode); maVector.push_back(aMainNode);
...@@ -513,7 +513,7 @@ void ActivityImpl::ImpForceScrollTextAnimNodes() ...@@ -513,7 +513,7 @@ void ActivityImpl::ImpForceScrollTextAnimNodes()
// exit loop // exit loop
ScrollTextAnimNode aExitNode( ScrollTextAnimNode aExitNode(
nLoopTime, 1L, nLoopTime, 1,
fRelativeStartValue, fRelativeEndValue, mnFrequency, false); fRelativeStartValue, fRelativeEndValue, mnFrequency, false);
maVector.push_back(aExitNode); maVector.push_back(aExitNode);
} }
...@@ -816,7 +816,7 @@ ActivityImpl::ActivityImpl( ...@@ -816,7 +816,7 @@ ActivityImpl::ActivityImpl(
mnFrequency = (nDelay ? nDelay : mnFrequency = (nDelay ? nDelay :
// default: // default:
meAnimKind == drawing::TextAnimationKind_BLINK meAnimKind == drawing::TextAnimationKind_BLINK
? 250L : 50L ); ? 250 : 50 );
// adopted from in AInfoScrollText::ImplInit(): // adopted from in AInfoScrollText::ImplInit():
......
...@@ -190,8 +190,8 @@ SmRect::SmRect(const OutputDevice &rDev, const SmFormat *pFormat, ...@@ -190,8 +190,8 @@ SmRect::SmRect(const OutputDevice &rDev, const SmFormat *pFormat,
bHasAlignInfo = true; bHasAlignInfo = true;
bHasBaseline = true; bHasBaseline = true;
nBaseline = aFM.GetAscent(); nBaseline = aFM.GetAscent();
nAlignT = nBaseline - nFontHeight * 750L / 1000L; nAlignT = nBaseline - nFontHeight * 750 / 1000;
nAlignM = nBaseline - nFontHeight * 121L / 422L; nAlignM = nBaseline - nFontHeight * 121 / 422;
// that's where the horizontal bars of '+', '-', ... are // that's where the horizontal bars of '+', '-', ... are
// (1/3 of ascent over baseline) // (1/3 of ascent over baseline)
// (121 = 1/3 of 12pt ascent, 422 = 12pt fontheight) // (121 = 1/3 of 12pt ascent, 422 = 12pt fontheight)
...@@ -212,7 +212,7 @@ SmRect::SmRect(const OutputDevice &rDev, const SmFormat *pFormat, ...@@ -212,7 +212,7 @@ SmRect::SmRect(const OutputDevice &rDev, const SmFormat *pFormat,
if (nDelta == 0) if (nDelta == 0)
{ // this value approx. fits a Leading of 80 at a { // this value approx. fits a Leading of 80 at a
// Fontheight of 422 (12pt) // Fontheight of 422 (12pt)
nDelta = nFontHeight * 8L / 43; nDelta = nFontHeight * 8 / 43;
} }
SetTop(GetTop() - nDelta); SetTop(GetTop() - nDelta);
...@@ -235,7 +235,7 @@ SmRect::SmRect(const OutputDevice &rDev, const SmFormat *pFormat, ...@@ -235,7 +235,7 @@ SmRect::SmRect(const OutputDevice &rDev, const SmFormat *pFormat,
long nDist = 0; long nDist = 0;
if (pFormat) if (pFormat)
nDist = (rDev.GetFont().GetFontSize().Height() nDist = (rDev.GetFont().GetFontSize().Height()
* pFormat->GetDistance(DIS_ORNAMENTSIZE)) / 100L; * pFormat->GetDistance(DIS_ORNAMENTSIZE)) / 100;
nHiAttrFence = aGlyphRect.TopLeft().Y() - 1 - nBorderWidth - nDist; nHiAttrFence = aGlyphRect.TopLeft().Y() - 1 - nBorderWidth - nDist;
nLoAttrFence = SmFromTo(GetAlignB(), GetBottom(), 0.0); nLoAttrFence = SmFromTo(GetAlignB(), GetBottom(), 0.0);
......
...@@ -1378,7 +1378,7 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm ) ...@@ -1378,7 +1378,7 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm )
rIStm.ReadUInt16( nTmp16 ); rIStm.ReadUInt16( nTmp16 );
} }
if( nCount <= ( 1L << 14 ) ) if( nCount <= ( 1 << 14 ) )
{ {
GalleryObject* pObj; GalleryObject* pObj;
INetURLObject aRelURL1( GetParent()->GetRelativeURL() ); INetURLObject aRelURL1( GetParent()->GetRelativeURL() );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment