From 5c5a2377038901204ec23e588f11e3592b1bea08 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Wed, 2 Nov 2022 07:39:47 +0300 Subject: Simplify LokStarMathHelper SfxInPlaceClient seems to have everything needed to check the OLE bounds; OTOH, the embedded Math windows/widgets lack that info. Set SmGraphicWidget MapMode to pixels when lok is active, as other windows do. Change-Id: Ib9b76a51a2d9253c20b782e8c53fbfa5dc776eca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142130 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- starmath/source/view.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'starmath') diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 21ff5afce349..dd6e5f40b3b7 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -309,7 +309,8 @@ void SmGraphicWidget::SetDrawingArea(weld::DrawingArea* pDrawingArea) rDevice.SetBackground(SM_MOD()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor); const Fraction aFraction(1, 1); - rDevice.SetMapMode(MapMode(MapUnit::Map100thMM, Point(), aFraction, aFraction)); + MapUnit unit = comphelper::LibreOfficeKit::isActive() ? MapUnit::MapPixel : MapUnit::Map100thMM; + rDevice.SetMapMode(MapMode(unit, Point(), aFraction, aFraction)); SetTotalSize(); -- cgit