[Libreoffice-commits] core.git: svx/source

mert (via logerrit) logerrit at kemper.freedesktop.org
Wed Mar 3 07:43:19 UTC 2021


 svx/source/svdraw/svdmrkv.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit b4adac8edd0f89a83905a567ba6c13e3ba18838b
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 Mar 3 08:42:38 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>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111516
    Tested-by: Jenkins

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());


More information about the Libreoffice-commits mailing list