summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-01-29 16:09:19 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-01-29 18:35:53 +0100
commit3544c475c0fd77f720f0767293656eaa02427e5e (patch)
treeb77bc85c2be4886c8b1c28257be80ac61e2d27bd /starmath
parent64857ffa263bba786f7a4af9420a93f824837664 (diff)
push/pop mapmode to avoid 'incorrect MapMode?' warning
since... commit 644ebf7823c85973e2724cbfcf403cb63b054bfe Date: Tue Jan 28 20:40:15 2020 +0000 weld SmElementsDockingWindow Change-Id: I072f8b9d31be93722930d30b183766b7795f7a26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87698 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/ElementsDockingWindow.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index 8840bcfa1b7c..8eca86c24077 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -828,6 +828,8 @@ void SmElementsControl::addElement(SmParser &rParser, const OUString& aElementVi
auto pNode = rParser.ParseExpression(aElementVisual);
OutputDevice& rDevice = GetDrawingArea()->get_ref_device();
+ rDevice.Push(PushFlags::MAPMODE);
+ rDevice.SetMapMode( MapMode(MapUnit::Map100thMM) );
pNode->Prepare(maFormat, *mpDocShell, 0);
pNode->SetSize(Fraction(10,8));
@@ -843,6 +845,8 @@ void SmElementsControl::addElement(SmParser &rParser, const OUString& aElementVi
}
maElementList.push_back(std::make_unique<SmElement>(std::move(pNode), aElementSource, aHelpText));
+
+ rDevice.Pop();
}
void SmElementsControl::setElementSetId(const char* pSetId)