summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2019-11-20 18:32:25 +0100
committerMarco Cecchetti <marco.cecchetti@collabora.com>2019-11-26 08:54:22 +0100
commit079eefbc452b9b0d143d40c3bb0e05d597da2149 (patch)
tree1f0267a0f7c45c6ab2c6a40c0fc3142780e665c3 /sc
parent0ca1d9601920025e832be20cdca5161342ca16d4 (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
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/app/inputwin.cxx22
-rw-r--r--sc/source/ui/inc/inputwin.hxx1
2 files changed, 23 insertions, 0 deletions
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 29a810ff284a..6bbbd9dcfe22 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -491,6 +491,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 8df165e5af1c..5bb9ea45b08e 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -227,6 +227,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;