summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-11-02 07:39:47 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2022-11-02 11:35:56 +0100
commit5c5a2377038901204ec23e588f11e3592b1bea08 (patch)
tree3dddfd84e8ec52db40c93e9f76cb8f41b349ff81 /starmath
parent985c77b570807dcc558ccff4a51430fe489b68fd (diff)
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 <mike.kaganski@collabora.com>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/view.cxx3
1 files changed, 2 insertions, 1 deletions
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();