summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2017-11-27 21:05:56 +0530
committerJan Holesovsky <kendy@collabora.com>2017-11-28 19:49:28 +0100
commit6c19b9710ad274369bf3793367b038de9edb1feb (patch)
treefa0694ddd57d409c2ab5f3296aa43f1cfe1e0f17
parent2175822e925a8dba87f39dcf83b17348fba855f5 (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
-rw-r--r--vcl/source/window/dialog.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 116ec1406f7a..bbc8972b00e2 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -59,6 +59,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 );