summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svx/source/svdraw/svdmrkv.cxx9
-rw-r--r--svx/source/svdraw/svdoedge.cxx2
2 files changed, 7 insertions, 4 deletions
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index e3b122d11938..beda9a2c3621 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -917,6 +917,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, SfxView
boost::property_tree::ptree poly;
boost::property_tree::ptree custom;
boost::property_tree::ptree nodes;
+ const bool convertMapMode = mpMarkedPV->GetView().GetFirstOutputDevice()->GetMapMode().GetMapUnit() == MapUnit::Map100thMM;
for (size_t i = 0; i < maHdlList.GetHdlCount(); i++)
{
SdrHdl *pHdl = maHdlList.GetHdl(i);
@@ -926,8 +927,11 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, SfxView
child.put("id", pHdl->GetObjHdlNum());
child.put("kind", kind);
child.put("pointer", static_cast<sal_Int32>(pHdl->GetPointer()));
- point.put("x", convertMm100ToTwip(pHdl->GetPos().getX()));
- point.put("y", convertMm100ToTwip(pHdl->GetPos().getY()));
+ Point pHdlPos = pHdl->GetPos();
+ if (convertMapMode)
+ pHdlPos = OutputDevice::LogicToLogic(pHdlPos, MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip));
+ point.put("x", pHdlPos.getX());
+ point.put("y", pHdlPos.getY());
child.add_child("point", point);
const auto node = std::make_pair("", child);
boost::property_tree::ptree* selectedNode = nullptr;
@@ -957,7 +961,6 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, SfxView
}
else
kindNode.get().push_back(node);
-
}
nodes.add_child("rectangle", rectangle);
nodes.add_child("poly", poly);
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index 5946ecadc4c4..99dee49aa2d2 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -2140,7 +2140,7 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrO
// sensitive area of connectors is twice as large as the one of the handles
sal_uInt16 nMarkHdSiz=rPV.GetView().GetMarkHdlSizePixel();
Size aHalfConSiz(nMarkHdSiz,nMarkHdSiz);
- if (comphelper::LibreOfficeKit::isActive())
+ if (comphelper::LibreOfficeKit::isActive() && pOut->GetMapMode().GetMapUnit() == MapUnit::Map100thMM)
aHalfConSiz=pOut->PixelToLogic(aHalfConSiz, MapMode(MapUnit::Map100thMM));
else
aHalfConSiz=pOut->PixelToLogic(aHalfConSiz);