diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-05-31 14:29:02 +0500 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-05-31 17:00:00 +0200 |
commit | 94160cabee03ad1ea96bc28060d52f7b357df947 (patch) | |
tree | c57e7fa53c8040bc1e92da50214c3cea8efbc9f5 /sd | |
parent | efe386b01668c9a67224857773849916d44d56cd (diff) |
LOK: Disable map mode in DrawViewShell's ctor
This allows to use views other than normal and master (these two use the same
shell, and are initialized in SdXImpressDocument::initializeForTiledRendering).
Change-Id: I52f3ce46738f9feca1a16d008efca76cb478dceb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168286
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/drviewsa.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index 2ed2e8745a6c..a3587ab7490b 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -137,6 +137,17 @@ DrawViewShell::DrawViewShell( ViewShellBase& rViewShellBase, vcl::Window* pParen if (comphelper::LibreOfficeKit::isActive()) { + // get the full page size in pixels + mpContentWindow->EnableMapMode(); + Size aSize(mpContentWindow->LogicToPixel(GetView()->GetSdrPageView()->GetPage()->GetSize())); + // Disable map mode, so that it's possible to send mouse event + // coordinates in logic units + mpContentWindow->EnableMapMode(false); + + // arrange UI elements again with new view size + GetParentWindow()->SetSizePixel(aSize); + Resize(); + SdXImpressDocument* pModel = comphelper::getFromUnoTunnel<SdXImpressDocument>(rViewShellBase.GetCurrentDocument()); SfxLokHelper::notifyViewRenderState(&rViewShellBase, pModel); } |