From a35e7f38942ca3cc3b277692fae86d0787db934a Mon Sep 17 00:00:00 2001 From: Regina Henschel Date: Thu, 8 Nov 2018 18:35:48 +0100 Subject: tdf#121287 Use correct markers on tail of legacy callout A legacy callout from toolbar 'Text', not a custom shape, is a rectangle with an additional tail. Currently only the end of the tail is dragable. The error was, that all points of the tail had got markers and that the markers had got a wrong point reference. Change-Id: I900b1294aaeefc0f46547c6db009a3c750955460 Reviewed-on: https://gerrit.libreoffice.org/63120 Tested-by: Jenkins Reviewed-by: Regina Henschel --- svx/source/svdraw/svdocapt.cxx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'svx') diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx index 2fea3adbec97..ac2fde0070e3 100644 --- a/svx/source/svdraw/svdocapt.cxx +++ b/svx/source/svdraw/svdocapt.cxx @@ -297,16 +297,11 @@ sal_uInt32 SdrCaptionObj::GetHdlCount() const void SdrCaptionObj::AddToHdlList(SdrHdlList& rHdlList) const { SdrRectObj::AddToHdlList(rHdlList); - const sal_uInt32 nRectHdlCnt(rHdlList.GetHdlCount()); - - sal_uInt32 nCnt = aTailPoly.GetSize(); - for(sal_uInt32 i = 0; i pHdl(new SdrHdl(aTailPoly.GetPoint(i), SdrHdlKind::Poly)); - pHdl->SetPolyNum(1); - pHdl->SetPointNum(nRectHdlCnt + i); - rHdlList.AddHdl(std::move(pHdl)); - } + // Currently only dragging the tail's end is implemented. + std::unique_ptr pHdl(new SdrHdl(aTailPoly.GetPoint(0), SdrHdlKind::Poly)); + pHdl->SetPolyNum(1); + pHdl->SetPointNum(0); + rHdlList.AddHdl(std::move(pHdl)); } bool SdrCaptionObj::hasSpecialDrag() const -- cgit