sc/source/ui/app/inputwin.cxx |   22 ++++++++++++++++++++++
 sc/source/ui/inc/inputwin.hxx |    1 +
 2 files changed, 23 insertions(+)

New commits:
commit 5651a04514cea317556bf9fe66af93d32b95db3c
Author:     Marco Cecchetti <marco.cecche...@collabora.com>
AuthorDate: Wed Nov 20 18:32:25 2019 +0100
Commit:     Marco Cecchetti <marco.cecche...@collabora.com>
CommitDate: Fri Mar 6 10:41:02 2020 +0100

    lok: calc formula bar tunneling: resize the main window
    
    When a resize msg is forwarded from the client to the core for the
    formula bar, for instance because of a browser window resizing, we
    need to resize the whole main app window not the formula bar only.
    On the contrary we have 2 issues:
    1) each time the formula bar get focus the layout manager tries to set
    the size of the formula bar back so that it fits inside the app window
    2) the part of the formula bar outside the app window doesn't respond
    to mouse events on the client side.
    
    Change-Id: I13ddc40a2a8e543808a4bf36a04022deb3700163
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89858
    Tested-by: Jenkins
    Reviewed-by: Marco Cecchetti <marco.cecche...@collabora.com>

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 6a3fbb89f92d..2108f1c9dd8d 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -455,6 +455,28 @@ void ScInputWindow::PixelInvalidate(const 
tools::Rectangle* pRectangle)
     }
 }
 
+void ScInputWindow::SetSizePixel( const Size& rNewSize )
+{
+    const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier();
+    if (pNotifier)
+    {
+        if (vcl::Window* pFrameWindowImpl = GetParent())
+        {
+            if (vcl::Window* pWorkWindow = pFrameWindowImpl->GetParent())
+            {
+                if (vcl::Window* pImplBorderWindow = pWorkWindow->GetParent())
+                {
+                    Size aSize = pImplBorderWindow->GetSizePixel();
+                    aSize.setWidth(rNewSize.getWidth());
+                    pImplBorderWindow->SetSizePixel(aSize);
+                }
+            }
+        }
+    }
+
+    ToolBox::SetSizePixel(rNewSize);
+}
+
 void ScInputWindow::Resize()
 {
     ToolBox::Resize();
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 538adc9b0af4..4adf209daf1d 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -265,6 +265,7 @@ public:
 
     virtual void    Paint( vcl::RenderContext& rRenderContext, const 
tools::Rectangle& rRect ) override;
     virtual void    PixelInvalidate(const tools::Rectangle* pRectangle) 
override;
+    virtual void    SetSizePixel( const Size& rNewSize ) override;
     virtual void    Resize() override;
     virtual void    Select() override;
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to