summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2017-11-24 02:27:09 +0530
committerJan Holesovsky <kendy@collabora.com>2017-11-28 17:58:03 +0100
commitf003eba0e30f41d036bed6fe417520fe66a3335f (patch)
tree63f10203f818f609288dc40ece8a2928458babff /sfx2
parent533e23cbadfe0426d172e46c5d8e0fcba633afcf (diff)
lokdialog: Let all modal dialogs notify about creation, disposal
Change-Id: I8ec0ad81abcf1adf628906b02f7f94ab74a550b5
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/basedlgs.cxx24
1 files changed, 24 insertions, 0 deletions
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index a80c43c906d0..1a20dcf2576e 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -166,9 +166,33 @@ void SfxModalDialog::dispose()
{
SetDialogData_Impl();
delete pOutputSet;
+
+ SfxViewShell* pViewShell = SfxViewShell::Current();
+ if (comphelper::LibreOfficeKit::isActive() && pViewShell)
+ {
+ pViewShell->notifyDialog(maID, "close");
+ pViewShell->UnregisterDlg(maID);
+ }
+
ModalDialog::dispose();
}
+short SfxModalDialog::Execute()
+{
+ SfxViewShell* pViewShell = SfxViewShell::Current();
+ if (comphelper::LibreOfficeKit::isActive() && pViewShell)
+ {
+ pViewShell->RegisterDlg(maID, this);
+ registerDialogNotifier(static_cast<vcl::IDialogNotifier*>(pViewShell));
+ const Size aSize = GetOptimalSize();
+ std::vector<vcl::LOKPayloadItem> aItems;
+ aItems.emplace_back(std::make_pair("size", aSize.toString()));
+ pViewShell->notifyDialog(maID, "created", aItems);
+ }
+
+ return ModalDialog::Execute();
+}
+
void SfxModalDialog::CreateOutputItemSet( SfxItemPool& rPool )
{
DBG_ASSERT( !pOutputSet, "Double creation of OutputSet!" );