svx/source/svdraw/svdoedge.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b5fa767e1463c0b3c4543803291178b28596a42e
Author:     Daniel Lee <[email protected]>
AuthorDate: Wed Nov 26 11:13:16 2025 -0600
Commit:     Ilmari Lauhakangas <[email protected]>
CommitDate: Thu Dec 4 11:54:52 2025 +0100

    tdf#75280 Convert inappropriate use of sal_uIntPtr
    
    The variables nBestDist and nDist never store pointers
    so their types were converted to sal_uInt64 for
    compatibility with the tools:Long type of Point.X()
    and Point.Y()
    
    Change-Id: I90b7de4688afa2f06a751ef18d7df86caa94e881
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194658
    Tested-by: Jenkins
    Reviewed-by: Ilmari Lauhakangas <[email protected]>

diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index 44ad75fa0cce..dc253e837952 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -2256,7 +2256,7 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const 
SdrPageView& rPV, SdrO
                 sal_uInt16 nGluePointCnt=pGPL==nullptr ? 0 : pGPL->GetCount();
                 sal_uInt16 nGesAnz=nGluePointCnt+9;
                 bool bUserFnd = false;
-                sal_uIntPtr nBestDist=0xFFFFFFFF;
+                sal_uInt64 nBestDist=0xFFFFFFFF;
                 for (sal_uInt16 i=0; i<nGesAnz; i++)
                 {
                     bool bUser=i<nGluePointCnt;
@@ -2294,7 +2294,7 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const 
SdrPageView& rPV, SdrO
                     if (bOk && aMouseRect.Contains(aConPos)) {
                         if (bUser) bUserFnd = true;
                         bFnd = true;
-                        sal_uIntPtr 
nDist=static_cast<sal_uIntPtr>(std::abs(aConPos.X()-rPt.X()))+static_cast<sal_uIntPtr>(std::abs(aConPos.Y()-rPt.Y()));
+                        sal_uInt64 
nDist=static_cast<sal_uInt64>(std::abs(aConPos.X()-rPt.X()))+static_cast<sal_uInt64>(std::abs(aConPos.Y()-rPt.Y()));
                         if (nDist<nBestDist) {
                             nBestDist=nDist;
                             aTestCon.m_pSdrObj=pObj;

Reply via email to