From ee50d4152cc4a06367d66808ceba1e74e62f3ed8 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 28 May 2021 14:42:34 +0200 Subject: no need to allocate these on the heap Change-Id: I58847f8eb2c8dc17ca393a758d122cd3929deeb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116375 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svtools/source/control/ruler.cxx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'svtools') diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index df3f981af0d7..4322f15dacf9 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -1931,27 +1931,27 @@ void Ruler::MouseButtonDown( const MouseEvent& rMEvt ) } else { - std::unique_ptr pHitTest(new RulerSelection); - bool bHitTestResult = ImplDoHitTest(aMousePos, pHitTest.get()); + RulerSelection aHitTest; + bool bHitTestResult = ImplDoHitTest(aMousePos, &aHitTest); if ( nMouseClicks == 1 ) { if ( bHitTestResult ) { - ImplStartDrag( pHitTest.get(), nMouseModifier ); + ImplStartDrag( &aHitTest, nMouseModifier ); } else { // calculate position inside of ruler area - if ( pHitTest->eType == RulerType::DontKnow ) + if ( aHitTest.eType == RulerType::DontKnow ) { - mnDragPos = pHitTest->nPos; + mnDragPos = aHitTest.nPos; Click(); mnDragPos = 0; // call HitTest again as a click, for example, could set a new tab - if ( ImplDoHitTest(aMousePos, pHitTest.get()) ) - ImplStartDrag(pHitTest.get(), nMouseModifier); + if ( ImplDoHitTest(aMousePos, &aHitTest) ) + ImplStartDrag(&aHitTest, nMouseModifier); } } } @@ -1959,10 +1959,10 @@ void Ruler::MouseButtonDown( const MouseEvent& rMEvt ) { if (bHitTestResult) { - mnDragPos = pHitTest->nPos; - mnDragAryPos = pHitTest->nAryPos; + mnDragPos = aHitTest.nPos; + mnDragAryPos = aHitTest.nAryPos; } - meDragType = pHitTest->eType; + meDragType = aHitTest.eType; DoubleClick(); -- cgit