summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorIvan Safonov <insafonov@gmail.com>2017-07-13 08:02:50 +0300
committerEike Rathke <erack@redhat.com>2017-07-14 16:57:52 +0200
commitd2adc30aa0bb843ace819277c68871a86a8418e8 (patch)
tree3b89513bb4d418e0236787deb01e96422ea223ab /cui/source
parent55baf61c08630e0c09a87d99519211467818ef8c (diff)
tdf#96505 Get rid of cargo cult "long" integer literals
Remove unnecessary "Long" literals in cui/source/tabpages. Change-Id: Ia46cc027e2225ab7dcfdab2828f1fb4a60f4619a Reviewed-on: https://gerrit.libreoffice.org/39881 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/tabpages/grfpage.cxx12
-rw-r--r--cui/source/tabpages/numfmt.cxx4
-rw-r--r--cui/source/tabpages/paragrph.cxx2
-rw-r--r--cui/source/tabpages/tpcolor.cxx12
-rw-r--r--cui/source/tabpages/tplnedef.cxx20
-rw-r--r--cui/source/tabpages/tpshadow.cxx30
-rw-r--r--cui/source/tabpages/transfrm.cxx2
7 files changed, 41 insertions, 41 deletions
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index 4073bcfc5bff..1938f2705b91 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -423,7 +423,7 @@ IMPL_LINK( SvxGrfCropPage, ZoomHdl, Edit&, rField, void )
long nLRBorders = lcl_GetValue(*m_pLeftMF, eUnit)
+lcl_GetValue(*m_pRightMF, eUnit);
m_pWidthMF->SetValue( m_pWidthMF->Normalize(
- ((aOrigSize.Width() - nLRBorders) * static_cast<MetricField&>(rField).GetValue())/100L),
+ ((aOrigSize.Width() - nLRBorders) * static_cast<MetricField&>(rField).GetValue())/100),
eUnit);
}
else
@@ -431,7 +431,7 @@ IMPL_LINK( SvxGrfCropPage, ZoomHdl, Edit&, rField, void )
long nULBorders = lcl_GetValue(*m_pTopMF, eUnit)
+lcl_GetValue(*m_pBottomMF, eUnit);
m_pHeightMF->SetValue( m_pHeightMF->Normalize(
- ((aOrigSize.Height() - nULBorders ) * static_cast<MetricField&>(rField).GetValue())/100L) ,
+ ((aOrigSize.Height() - nULBorders ) * static_cast<MetricField&>(rField).GetValue())/100) ,
eUnit );
}
}
@@ -457,7 +457,7 @@ IMPL_LINK( SvxGrfCropPage, SizeHdl, Edit&, rField, void )
lcl_GetValue(*m_pRightMF, eUnit) );
if(!nWidth)
nWidth++;
- sal_uInt16 nZoom = (sal_uInt16)( aSize.Width() * 100L / nWidth);
+ sal_uInt16 nZoom = (sal_uInt16)( aSize.Width() * 100 / nWidth);
m_pWidthZoomMF->SetValue(nZoom);
}
else
@@ -467,7 +467,7 @@ IMPL_LINK( SvxGrfCropPage, SizeHdl, Edit&, rField, void )
lcl_GetValue(*m_pBottomMF, eUnit));
if(!nHeight)
nHeight++;
- sal_uInt16 nZoom = (sal_uInt16)( aSize.Height() * 100L/ nHeight);
+ sal_uInt16 nZoom = (sal_uInt16)( aSize.Height() * 100 / nHeight);
m_pHeightZoomMF->SetValue(nZoom);
}
}
@@ -599,10 +599,10 @@ void SvxGrfCropPage::CalcZoom()
sal_uInt16 nZoom = 0;
long nDen;
if( (nDen = aOrigSize.Width() - nLRBorders) > 0)
- nZoom = (sal_uInt16)((( nWidth * 1000L / nDen )+5)/10);
+ nZoom = (sal_uInt16)((( nWidth * 1000 / nDen )+5)/10);
m_pWidthZoomMF->SetValue(nZoom);
if( (nDen = aOrigSize.Height() - nULBorders) > 0)
- nZoom = (sal_uInt16)((( nHeight * 1000L / nDen )+5)/10);
+ nZoom = (sal_uInt16)((( nHeight * 1000 / nDen )+5)/10);
else
nZoom = 0;
m_pHeightZoomMF->SetValue(nZoom);
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index ba67fc85c0c4..78cae7475cf6 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -513,13 +513,13 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet* rSet )
if ( eValType == SvxNumberValueType::String )
pNumFmtShell =SvxNumberFormatShell::Create(
pNumItem->GetNumberFormatter(),
- (pValFmtAttr) ? nInitFormat : 0L,
+ (pValFmtAttr) ? nInitFormat : 0,
eValType,
aValString );
else
pNumFmtShell =SvxNumberFormatShell::Create(
pNumItem->GetNumberFormatter(),
- (pValFmtAttr) ? nInitFormat : 0L,
+ (pValFmtAttr) ? nInitFormat : 0,
eValType,
nValDouble,
&aValString );
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 656858c86093..4d608a2e4147 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -631,7 +631,7 @@ SvxStdParagraphTabPage::SvxStdParagraphTabPage( vcl::Window* pParent, const Sfx
nAbst ( MAX_DURCH ),
nWidth ( 11905 /*567 * 50*/ ),
- nMinFixDist(0L),
+ nMinFixDist(0),
bRelativeMode ( false )
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 7f17633377f1..d9b140729036 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -702,20 +702,20 @@ void SvxColorTabPage::CmykToRgb_Impl( Color& rColor, const sal_uInt16 nK )
lTemp = 255 - ( rColor.GetRed() + nK );
- if( lTemp < 0L )
- lTemp = 0L;
+ if( lTemp < 0 )
+ lTemp = 0;
rColor.SetRed( (sal_uInt8)lTemp );
lTemp = 255 - ( rColor.GetGreen() + nK );
- if( lTemp < 0L )
- lTemp = 0L;
+ if( lTemp < 0 )
+ lTemp = 0;
rColor.SetGreen( (sal_uInt8)lTemp );
lTemp = 255 - ( rColor.GetBlue() + nK );
- if( lTemp < 0L )
- lTemp = 0L;
+ if( lTemp < 0 )
+ lTemp = 0;
rColor.SetBlue( (sal_uInt8)lTemp );
}
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index b5c99ea3495e..f622e18358e7 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -393,15 +393,15 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ChangePreviewHdl_Impl, Edit&, void)
IMPL_LINK_NOARG(SvxLineDefTabPage, ChangeNumber1Hdl_Impl, Edit&, void)
{
- if( m_pNumFldNumber1->GetValue() == 0L )
+ if( m_pNumFldNumber1->GetValue() == 0 )
{
- m_pNumFldNumber2->SetMin( 1L );
- m_pNumFldNumber2->SetFirst( 1L );
+ m_pNumFldNumber2->SetMin( 1 );
+ m_pNumFldNumber2->SetFirst( 1 );
}
else
{
- m_pNumFldNumber2->SetMin( 0L );
- m_pNumFldNumber2->SetFirst( 0L );
+ m_pNumFldNumber2->SetMin( 0 );
+ m_pNumFldNumber2->SetFirst( 0 );
}
ChangePreviewHdl_Impl( *m_pMtrLength1 );
@@ -410,15 +410,15 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ChangeNumber1Hdl_Impl, Edit&, void)
IMPL_LINK_NOARG(SvxLineDefTabPage, ChangeNumber2Hdl_Impl, Edit&, void)
{
- if( m_pNumFldNumber2->GetValue() == 0L )
+ if( m_pNumFldNumber2->GetValue() == 0 )
{
- m_pNumFldNumber1->SetMin( 1L );
- m_pNumFldNumber1->SetFirst( 1L );
+ m_pNumFldNumber1->SetMin( 1 );
+ m_pNumFldNumber1->SetFirst( 1 );
}
else
{
- m_pNumFldNumber1->SetMin( 0L );
- m_pNumFldNumber1->SetFirst( 0L );
+ m_pNumFldNumber1->SetMin( 0 );
+ m_pNumFldNumber1->SetFirst( 0 );
}
ChangePreviewHdl_Impl( *m_pMtrLength1 );
diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx
index 5c0d43068f2d..f4926f6d90e8 100644
--- a/cui/source/tabpages/tpshadow.cxx
+++ b/cui/source/tabpages/tpshadow.cxx
@@ -259,7 +259,7 @@ bool SvxShadowTabPage::FillItemSet( SfxItemSet* rAttrs )
// shadow removal
// a bit intricate inquiry whether there was something changed,
// as the items can't be displayed directly on controls
- sal_Int32 nX = 0L, nY = 0L;
+ sal_Int32 nX = 0, nY = 0;
sal_Int32 nXY = GetCoreValue( *m_pMtrDistance, m_ePoolUnit );
switch( m_pCtlPosition->GetActualRP() )
@@ -371,21 +371,21 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs )
sal_Int32 nY = static_cast<const SdrMetricItem&>( rAttrs->Get( SDRATTR_SHADOWYDIST ) ).GetValue();
if( nX != 0 )
- SetMetricValue( *m_pMtrDistance, nX < 0L ? -nX : nX, m_ePoolUnit );
+ SetMetricValue( *m_pMtrDistance, nX < 0 ? -nX : nX, m_ePoolUnit );
else
- SetMetricValue( *m_pMtrDistance, nY < 0L ? -nY : nY, m_ePoolUnit );
+ SetMetricValue( *m_pMtrDistance, nY < 0 ? -nY : nY, m_ePoolUnit );
// setting the shadow control
- if ( nX < 0L && nY < 0L ) m_pCtlPosition->SetActualRP( RectPoint::LT );
- else if( nX == 0L && nY < 0L ) m_pCtlPosition->SetActualRP( RectPoint::MT );
- else if( nX > 0L && nY < 0L ) m_pCtlPosition->SetActualRP( RectPoint::RT );
- else if( nX < 0L && nY == 0L ) m_pCtlPosition->SetActualRP( RectPoint::LM );
+ if ( nX < 0 && nY < 0 ) m_pCtlPosition->SetActualRP( RectPoint::LT );
+ else if( nX == 0 && nY < 0 ) m_pCtlPosition->SetActualRP( RectPoint::MT );
+ else if( nX > 0 && nY < 0 ) m_pCtlPosition->SetActualRP( RectPoint::RT );
+ else if( nX < 0 && nY == 0 ) m_pCtlPosition->SetActualRP( RectPoint::LM );
// there's no center point anymore
- else if( nX == 0L && nY == 0L ) m_pCtlPosition->SetActualRP( RectPoint::RB );
- else if( nX > 0L && nY == 0L ) m_pCtlPosition->SetActualRP( RectPoint::RM );
- else if( nX < 0L && nY > 0L ) m_pCtlPosition->SetActualRP( RectPoint::LB );
- else if( nX == 0L && nY > 0L ) m_pCtlPosition->SetActualRP( RectPoint::MB );
- else if( nX > 0L && nY > 0L ) m_pCtlPosition->SetActualRP( RectPoint::RB );
+ else if( nX == 0 && nY == 0 ) m_pCtlPosition->SetActualRP( RectPoint::RB );
+ else if( nX > 0 && nY == 0 ) m_pCtlPosition->SetActualRP( RectPoint::RM );
+ else if( nX < 0 && nY > 0 ) m_pCtlPosition->SetActualRP( RectPoint::LB );
+ else if( nX == 0 && nY > 0 ) m_pCtlPosition->SetActualRP( RectPoint::MB );
+ else if( nX > 0 && nY > 0 ) m_pCtlPosition->SetActualRP( RectPoint::RB );
}
else
{
@@ -398,9 +398,9 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs )
sal_Int32 nX = pXDistItem->GetValue();
sal_Int32 nY = pYDistItem->GetValue();
if( nX != 0 )
- SetMetricValue( *m_pMtrDistance, nX < 0L ? -nX : nX, m_ePoolUnit );
+ SetMetricValue( *m_pMtrDistance, nX < 0 ? -nX : nX, m_ePoolUnit );
else
- SetMetricValue( *m_pMtrDistance, nY < 0L ? -nY : nY, m_ePoolUnit );
+ SetMetricValue( *m_pMtrDistance, nY < 0 ? -nY : nY, m_ePoolUnit );
}
// Tristate, e. g. multiple objects have been marked of which some have a shadow and some don't.
@@ -479,7 +479,7 @@ IMPL_LINK_NOARG(SvxShadowTabPage, ModifyShadowHdl_Impl, Edit&, void)
m_rXFSet.Put( XFillTransparenceItem( nVal ) );
// shadow removal
- sal_Int32 nX = 0L, nY = 0L;
+ sal_Int32 nX = 0, nY = 0;
sal_Int32 nXY = GetCoreValue( *m_pMtrDistance, m_ePoolUnit );
switch( m_pCtlPosition->GetActualRP() )
{
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index e990af8fcd2e..af73a1010776 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -1310,7 +1310,7 @@ void SvxPositionSizeTabPage::SetMinMaxPosition()
}
}
- const double fMaxLong((double)(MetricField::ConvertValue( LONG_MAX, 0, MapUnit::Map100thMM, meDlgUnit ) - 1L));
+ const double fMaxLong((double)(MetricField::ConvertValue( LONG_MAX, 0, MapUnit::Map100thMM, meDlgUnit ) - 1));
fLeft = basegfx::clamp(fLeft, -fMaxLong, fMaxLong);
fRight = basegfx::clamp(fRight, -fMaxLong, fMaxLong);
fTop = basegfx::clamp(fTop, - fMaxLong, fMaxLong);