diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2019-11-20 18:32:25 +0100 |
---|---|---|
committer | Marco Cecchetti <marco.cecchetti@collabora.com> | 2020-03-06 10:41:02 +0100 |
commit | 5651a04514cea317556bf9fe66af93d32b95db3c (patch) | |
tree | ddae58a6238ecf7cc4f9eb5d776d12a202c1f42d /sc | |
parent | 366e328dc7f36061971c549c2d33d365026b65ca (diff) |
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.cecchetti@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/app/inputwin.cxx | 22 | ||||
-rw-r--r-- | sc/source/ui/inc/inputwin.hxx | 1 |
2 files changed, 23 insertions, 0 deletions
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; |