summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-28 14:42:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-29 17:50:52 +0200
commitee50d4152cc4a06367d66808ceba1e74e62f3ed8 (patch)
tree0b3dc08f11807e722b0ad780a80732efcc0a190f /svtools
parentf57c2e65a50585ef4a282549c13655d9afc83d86 (diff)
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/ruler.cxx20
1 files changed, 10 insertions, 10 deletions
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<RulerSelection> 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();