summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-26 14:17:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-28 07:21:59 +0100
commit6436302f40252bc6619e304e2051115fee902e20 (patch)
treea32659b4fecc9fbf8fad3e379ddd8645a2a52e0b /svtools
parent35f16614ee7ddf518d4c01de6b1d800f5ff1ba7e (diff)
convert some more long -> tools::Long
grepping for stuff in template params this time Change-Id: Ia37bfd85480b3a72c3c465489581d56ad8dde851 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104855 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/brwbox/brwbox1.cxx6
-rw-r--r--svtools/source/control/ctrlbox.cxx6
2 files changed, 6 insertions, 6 deletions
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx
index 5eac20c1514e..4737698d145c 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -1004,7 +1004,7 @@ tools::Long BrowseBox::ScrollRows( tools::Long nRows )
// compute new top row
tools::Long nTmpMin = std::min( static_cast<tools::Long>(nTopRow + nRows), static_cast<tools::Long>(nRowCount - 1) );
- tools::Long nNewTopRow = std::max<long>( nTmpMin, 0 );
+ tools::Long nNewTopRow = std::max<tools::Long>( nTmpMin, 0 );
if ( nNewTopRow == nTopRow )
return 0;
@@ -1017,7 +1017,7 @@ tools::Long BrowseBox::ScrollRows( tools::Long nRows )
// compute new top row again (nTopRow might have changed!)
nTmpMin = std::min( static_cast<tools::Long>(nTopRow + nRows), static_cast<tools::Long>(nRowCount - 1) );
- nNewTopRow = std::max<long>( nTmpMin, 0 );
+ nNewTopRow = std::max<tools::Long>( nTmpMin, 0 );
StartScroll();
@@ -1659,7 +1659,7 @@ void BrowseBox::SelectAll()
tools::Rectangle aHighlightRect;
sal_uInt16 nVisibleRows =
static_cast<sal_uInt16>(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
- for ( tools::Long nRow = std::max<long>( nTopRow, uRow.pSel->FirstSelected() );
+ for ( tools::Long nRow = std::max<tools::Long>( nTopRow, uRow.pSel->FirstSelected() );
nRow != BROWSER_ENDOFSELECTION && nRow < nTopRow + nVisibleRows;
nRow = uRow.pSel->NextSelected() )
aHighlightRect.Union( tools::Rectangle(
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 180fe6a9661b..cc7f1c699069 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -91,7 +91,7 @@ tools::Long BorderWidthImpl::GetLine1( tools::Long nWidth ) const
{
tools::Long const nConstant2 = (m_nFlags & BorderWidthImplFlags::CHANGE_LINE2) ? 0 : m_nRate2;
tools::Long const nConstantD = (m_nFlags & BorderWidthImplFlags::CHANGE_DIST ) ? 0 : m_nRateGap;
- result = std::max<long>(0,
+ result = std::max<tools::Long>(0,
static_cast<tools::Long>((m_nRate1 * nWidth) + 0.5)
- (nConstant2 + nConstantD));
if (result == 0 && m_nRate1 > 0.0 && nWidth > 0)
@@ -109,7 +109,7 @@ tools::Long BorderWidthImpl::GetLine2( tools::Long nWidth ) const
{
tools::Long const nConstant1 = (m_nFlags & BorderWidthImplFlags::CHANGE_LINE1) ? 0 : m_nRate1;
tools::Long const nConstantD = (m_nFlags & BorderWidthImplFlags::CHANGE_DIST ) ? 0 : m_nRateGap;
- result = std::max<long>(0,
+ result = std::max<tools::Long>(0,
static_cast<tools::Long>((m_nRate2 * nWidth) + 0.5)
- (nConstant1 + nConstantD));
}
@@ -123,7 +123,7 @@ tools::Long BorderWidthImpl::GetGap( tools::Long nWidth ) const
{
tools::Long const nConstant1 = (m_nFlags & BorderWidthImplFlags::CHANGE_LINE1) ? 0 : m_nRate1;
tools::Long const nConstant2 = (m_nFlags & BorderWidthImplFlags::CHANGE_LINE2) ? 0 : m_nRate2;
- result = std::max<long>(0,
+ result = std::max<tools::Long>(0,
static_cast<tools::Long>((m_nRateGap * nWidth) + 0.5)
- (nConstant1 + nConstant2));
}