From 7dc626a6cd3895d206320e0ddc1412749d1663a7 Mon Sep 17 00:00:00 2001 From: Marco Cecchetti Date: Tue, 10 Sep 2024 11:31:37 +0200 Subject: [PATCH] lok: slideshow: animated shape bounding box in twips Since we have slide size in twips we need shape bounding box in twips too. Change-Id: I41e4658278e7b36b87a6bccc72b429944ef27e4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177522 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- sd/source/ui/tools/SlideshowLayerRenderer.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sd/source/ui/tools/SlideshowLayerRenderer.cxx b/sd/source/ui/tools/SlideshowLayerRenderer.cxx index ffa36854c55f..8328829e0fa4 100644 --- a/sd/source/ui/tools/SlideshowLayerRenderer.cxx +++ b/sd/source/ui/tools/SlideshowLayerRenderer.cxx @@ -337,7 +337,8 @@ static void writeContentNode(::tools::JsonWriter& aJsonWriter) static void writeBoundingBox(::tools::JsonWriter& aJsonWriter, SdrObject* pObject) { auto aContentNode = aJsonWriter.startNode("bounds"); - ::tools::Rectangle aRect = pObject->GetCurrentBoundRect(); + ::tools::Rectangle aRectmm100 = pObject->GetCurrentBoundRect(); + ::tools::Rectangle aRect = o3tl::convert(aRectmm100, o3tl::Length::mm100, o3tl::Length::twip); aJsonWriter.put("x", aRect.getX()); aJsonWriter.put("y", aRect.getY()); aJsonWriter.put("width", aRect.GetWidth());