summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sd/source/core/annotations/Annotation.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/sd/source/core/annotations/Annotation.cxx b/sd/source/core/annotations/Annotation.cxx
index 9faee9d7b701..597c357dd3ba 100644
--- a/sd/source/core/annotations/Annotation.cxx
+++ b/sd/source/core/annotations/Annotation.cxx
@@ -364,10 +364,11 @@ OString lcl_LOKGetCommentPayload(CommentNotificationType nType, uno::Reference<o
aJsonWriter.put("parthash", pPage ? OString::number(pPage->GetHashCode()) : OString());
geometry::RealPoint2D const & rPoint = rxAnnotation->getPosition();
geometry::RealSize2D const & rSize = rxAnnotation->getSize();
- ::tools::Rectangle aRectangle(Point(rPoint.X * 100.0, rPoint.Y * 100.0), Size(rSize.Width * 100.0, rSize.Height * 100.0));
- aRectangle = OutputDevice::LogicToLogic(aRectangle, MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip));
- OString sRectangle = aRectangle.toString();
- aJsonWriter.put("rectangle", sRectangle.getStr());
+ ::tools::Rectangle aRectangle(Point(std::round(o3tl::toTwips(rPoint.X, o3tl::Length::mm)),
+ std::round(o3tl::toTwips(rPoint.Y, o3tl::Length::mm))),
+ Size(std::round(o3tl::toTwips(rSize.Width, o3tl::Length::mm)),
+ std::round(o3tl::toTwips(rSize.Height, o3tl::Length::mm))));
+ aJsonWriter.put("rectangle", aRectangle.toString());
}
}
return aJsonWriter.finishAndGetAsOString();