[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source
mert (via logerrit)
logerrit at kemper.freedesktop.org
Wed Feb 24 09:00:25 UTC 2021
svx/source/svdraw/svdmrkv.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 3e885c29ff1a295a20fdb8688d2875dd2a5fccd8
Author: mert <mert.tumer at collabora.com>
AuthorDate: Wed Feb 24 06:22:49 2021 +0300
Commit: Mert Tumer <mert.tumer at collabora.com>
CommitDate: Wed Feb 24 09:59:50 2021 +0100
Fix chart sub element rectangle and handle positions
Change-Id: I486b542ae0bb4a987c98d92c1866895eafcf620c
Signed-off-by: mert <mert.tumer at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111440
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index beda9a2c3621..db05163b1ec4 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -709,7 +709,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, SfxView
tools::Rectangle aSelection(rRect);
bool bIsChart = false;
-
+ Point addLogicOffset = Point(0,0);
if (!rRect.IsEmpty())
{
sal_uInt32 nTotalPaintWindows = this->PaintWindowCount();
@@ -724,6 +724,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, SfxView
{
Point aOffsetPx = pWin->GetOffsetPixelFrom(*pViewShellWindow);
Point aLogicOffset = pWin->PixelToLogic(aOffsetPx);
+ addLogicOffset = aLogicOffset;
aSelection.Move(aLogicOffset.getX(), aLogicOffset.getY());
}
}
@@ -883,8 +884,6 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, SfxView
}
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" +
@@ -928,6 +927,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, SfxView
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());
More information about the Libreoffice-commits
mailing list