diff options
Diffstat (limited to 'sfx2/source/dialog/basedlgs.cxx')
-rw-r--r-- | sfx2/source/dialog/basedlgs.cxx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index 7877e878e129..73a110038d95 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -160,9 +160,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!" ); |