[Libreoffice-commits] core.git: include/LibreOfficeKit vcl/source
Szymon Kłos (via logerrit)
logerrit at kemper.freedesktop.org
Fri May 3 16:27:35 UTC 2019
include/LibreOfficeKit/LibreOfficeKitEnums.h | 2 ++
vcl/source/window/dialog.cxx | 10 ++++++++++
2 files changed, 12 insertions(+)
New commits:
commit e575a5e8f89beb3ce1df5a1d83edc0f9d1d8ac43
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Apr 29 16:58:03 2019 +0200
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Fri May 3 18:26:17 2019 +0200
libreofficekit: send show/hide messages for dialogs
Change-Id: I2b3ff5e5122b2be099be500ac544bf81f8d1b2ae
Reviewed-on: https://gerrit.libreoffice.org/71544
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index 33d235af827b..af4952566dbd 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -575,6 +575,8 @@ typedef enum
* - "cursor_visible" - cursor visible status is changed. Status is available
* in "visible" field
* - "close" - window is closed
+ * - "show" - show the window
+ * - "hide" - hide the window
*/
LOK_CALLBACK_WINDOW = 36,
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index e34ff81f6148..1219b312a26b 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -799,6 +799,16 @@ void Dialog::StateChanged( StateChangedType nType )
ImplInitSettings();
Invalidate();
}
+
+ if (!mbModalMode && nType == StateChangedType::Visible)
+ {
+ if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
+ {
+ std::vector<vcl::LOKPayloadItem> aPayload;
+ aPayload.emplace_back("title", GetText().toUtf8());
+ pNotifier->notifyWindow(GetLOKWindowId(), IsVisible()? OUString("show"): OUString("hide"), aPayload);
+ }
+ }
}
void Dialog::DataChanged( const DataChangedEvent& rDCEvt )
More information about the Libreoffice-commits
mailing list