From b4adac8edd0f89a83905a567ba6c13e3ba18838b Mon Sep 17 00:00:00 2001 From: mert Date: Wed, 24 Feb 2021 06:22:49 +0300 Subject: Fix chart sub element rectangle and handle positions Change-Id: I486b542ae0bb4a987c98d92c1866895eafcf620c Signed-off-by: mert Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111440 Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111516 Tested-by: Jenkins --- svx/source/svdraw/svdmrkv.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 8c1ec40dce92..216d2c043709 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -689,7 +689,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, const S tools::Rectangle aSelection(rRect); bool bIsChart = false; - + Point addLogicOffset(0, 0); if (!rRect.IsEmpty()) { sal_uInt32 nTotalPaintWindows = this->PaintWindowCount(); @@ -704,6 +704,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, const S { Point aOffsetPx = pWin->GetOffsetPixelFrom(*pViewShellWindow); Point aLogicOffset = pWin->PixelToLogic(aOffsetPx); + addLogicOffset = aLogicOffset; aSelection.Move(aLogicOffset.getX(), aLogicOffset.getY()); } } @@ -858,8 +859,6 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, const S } sPolygonElem += R"elem(\" style=\"stroke: none; fill: rgb(114,159,207); fill-opacity: 0.8\"/>)elem"; - aSelection = OutputDevice::LogicToLogic(aSelection, MapMode(MapUnit::MapTwip), MapMode(MapUnit::Map100thMM)); - OString sSVGElem = R"elem((pHdl->GetPointer())); Point pHdlPos = pHdl->GetPos(); + pHdlPos.Move(addLogicOffset.getX(), addLogicOffset.getY()); if (convertMapMode) pHdlPos = OutputDevice::LogicToLogic(pHdlPos, MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip)); point.put("x", pHdlPos.getX()); -- cgit