diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2017-11-27 21:05:56 +0530 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-11-29 10:16:59 +0100 |
commit | bc113a3bae176a7dac1392d0f45c3e425725f230 (patch) | |
tree | 290640819533e887145b7df9b4bf512d22a64c31 /vcl | |
parent | 094ec23874b9af221c5c45b914150cf12a44fae6 (diff) |
lokdialog: Emit callback when title is changed
The plan is to remove the getDialogInfo from LOK API but one more step
before doing that is to find out why the dialog size in 'created'
dialog callback is less than what the actual dialog after painting is.
Change-Id: I5176e175cbf7ed81c1465feeeea053c9a024fbd9
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/dialog.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 66cef2d575a5..2ae4cf305530 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -57,6 +57,7 @@ #include <salframe.hxx> #include <iostream> +#include <utility> static OString ImplGetDialogText( Dialog* pDialog ) { @@ -691,6 +692,15 @@ void Dialog::StateChanged( StateChangedType nType ) ImplMouseAutoPos( this ); } + else if (nType == StateChangedType::Text) + { + if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier()) + { + std::vector<vcl::LOKPayloadItem> aPayload; + aPayload.push_back(std::make_pair(OString("title"), GetText().toUtf8())); + pNotifier->notifyWindow(GetLOKWindowId(), "title_changed", aPayload); + } + } SystemWindow::StateChanged( nType ); |