svx/source/svdraw/svdopath.cxx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
New commits: commit b51386b77c03068520a0460fed6f2e8fe9459f34 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Wed Nov 13 11:34:08 2024 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Wed Nov 13 12:58:47 2024 +0100 tdf#163486: PVS: variable was assigned the same value V1048 The 'y' variable was assigned the same value. V1048 The 'x' variable was assigned the same value. Change-Id: I691b6f2c108dae48cf28d328f502847b8f6726f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176526 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 935397d1ea61..84ef3909c7b5 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -389,16 +389,14 @@ Point ImpPathCreateUser::CalcLine(const Point& aCsr, tools::Long nDirX, tools::L if (bHLin) y=0; else if (bVLin) x=0; else { - tools::Long x1=BigMulDiv(y,nDirX,nDirY); - tools::Long y1=y; - tools::Long x2=x; + tools::Long x2=BigMulDiv(y,nDirX,nDirY); tools::Long y2=BigMulDiv(x,nDirY,nDirX); - tools::Long l1=std::abs(x1)+std::abs(y1); - tools::Long l2=std::abs(x2)+std::abs(y2); + tools::Long l1=std::abs(x2)+std::abs(y); + tools::Long l2=std::abs(x)+std::abs(y2); if ((l1<=l2) != (pView!=nullptr && pView->IsBigOrtho())) { - x=x1; y=y1; + x = x2; } else { - x=x2; y=y2; + y = y2; } } return Point(x,y);