[Libreoffice-commits] core.git: reportdesign/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Sun Jan 26 18:40:11 UTC 2020


 reportdesign/source/ui/report/ReportSection.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 32922b3f1fc47415b40a701345a76a33e2d69a64
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Sun Jan 26 15:15:23 2020 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sun Jan 26 19:39:22 2020 +0100

    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 <sbergman at redhat.com>

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<sal_uInt32>(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<sal_uInt32>(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();


More information about the Libreoffice-commits mailing list