diff options
author | mert <mert.tumer@collabora.com> | 2021-02-24 06:22:49 +0300 |
---|---|---|
committer | Mert Tumer <mert.tumer@collabora.com> | 2021-03-03 08:42:38 +0100 |
commit | b4adac8edd0f89a83905a567ba6c13e3ba18838b (patch) | |
tree | 890fc03fb476a390a8714f559e33c9ada4a892d5 | |
parent | a434f5d2d4ff4991937b57e521782ad3594aa370 (diff) |
Fix chart sub element rectangle and handle positions
Change-Id: I486b542ae0bb4a987c98d92c1866895eafcf620c
Signed-off-by: mert <mert.tumer@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111440
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111516
Tested-by: Jenkins
-rw-r--r-- | svx/source/svdraw/svdmrkv.cxx | 6 |
1 files 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(<svg version=\"1.2\" width=\")elem" + OString::number(aSelection.GetWidth() / 100.0) + R"elem(mm\" height=\")elem" + @@ -903,6 +902,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, const S child.put("kind", kind); child.put("pointer", static_cast<sal_Int32>(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()); |