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 )
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);
......
......@@ -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;
......
......@@ -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():
......
......@@ -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);
......
......@@ -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() );
......
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