sd/source/ui/view/drviewsa.cxx |   11 +++++++++++
 1 file changed, 11 insertions(+)

New commits:
commit 94160cabee03ad1ea96bc28060d52f7b357df947
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Fri May 31 14:29:02 2024 +0500
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Fri May 31 17:00:00 2024 +0200

    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.kagan...@collabora.com>
    Tested-by: Jenkins

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);
     }

Reply via email to