diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-11-16 17:40:27 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-11-16 17:08:08 +0100 |
commit | 2d4cde2f75d4aaa3a69fdd65ee7584eb15d20275 (patch) | |
tree | 974fcea75daed2a7fbf5a89d202b9de844c469e7 /sw | |
parent | 6eb9529abef9d7588899f9b241f31baa0b2beee2 (diff) |
lok: handle mouse/keyboard events in Math embedded in Impress/Draw
Since Impress/Draw use mm100, we need to convert object area that
SfxInPlaceClient provides, which is in parent units, into twips.
TODO: how would taking the units from object shell with Calc, given
that it does not call SetMapUnit in ScDocShell ctor?
Change-Id: I8de2088a3e0e7f9070d6c3c234b40038b6e00f15
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142777
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 08746303cecf..146384c452f2 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3534,16 +3534,15 @@ VclPtr<vcl::Window> SwXTextDocument::getDocWindow() { SolarMutexGuard aGuard; SwView* pView = m_pDocShell->GetView(); + if (!pView) + return {}; if (VclPtr<vcl::Window> pWindow = LokChartHelper(pView).GetWindow()) return pWindow; if (VclPtr<vcl::Window> pWindow = LokStarMathHelper(pView).GetWidgetWindow()) return pWindow; - if (pView) - return &(pView->GetEditWin()); - - return {}; + return &(pView->GetEditWin()); } void SwXTextDocument::initializeForTiledRendering(const css::uno::Sequence<css::beans::PropertyValue>& rArguments) |