From 32922b3f1fc47415b40a701345a76a33e2d69a64 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sun, 26 Jan 2020 15:15:23 +0100 Subject: iAvoid explicit casts to smaller sal_uInt32 from larger long ...in what might be attempts to avoid warnings about signed vs. unsigned comparisons. Change-Id: I0e689d8b730170f35107cbdf46c3d8cd9a593367 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87456 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- reportdesign/source/ui/report/ReportSection.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'reportdesign/source') diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index 84236084c00d..7991fea3f1b5 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -276,7 +276,7 @@ void OReportSection::Paste(const uno::Sequence< beans::NamedValue >& _aAllreadyC } m_pView->AddUndo( m_pView->GetModel()->GetSdrUndoFactory().CreateUndoNewObject( *pNewObj ) ); m_pView->MarkObj( pNewObj, m_pView->GetSdrPageView() ); - if ( m_xSection.is() && (static_cast(aRet.getHeight() + aRet.Top()) > m_xSection->getHeight()) ) + if ( m_xSection.is() && (o3tl::make_unsigned(aRet.getHeight() + aRet.Top()) > m_xSection->getHeight()) ) m_xSection->setHeight(aRet.getHeight() + aRet.Top()); } } @@ -540,7 +540,7 @@ void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_I tools::Rectangle aRet(VCLPoint(xReportComponent->getPosition()),VCLSize(xReportComponent->getSize())); aRet.setHeight(aRet.getHeight() + 1); aRet.setWidth(aRet.getWidth() + 1); - if ( m_xSection.is() && (static_cast(aRet.getHeight() + aRet.Top()) > m_xSection->getHeight()) ) + if ( m_xSection.is() && (o3tl::make_unsigned(aRet.getHeight() + aRet.Top()) > m_xSection->getHeight()) ) m_xSection->setHeight(aRet.getHeight() + aRet.Top()); pObject->RecalcBoundRect(); -- cgit