summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2017-11-28 16:59:26 +0530
committerAndras Timar <andras.timar@collabora.com>2018-03-19 14:56:09 +0100
commit9db03f5fdc322dbffe8b2b22cd0244bf41d78d4a (patch)
tree1b1a74d5430b9888f669e09613110b8f3c3ac2c8 /sfx2/source/dialog
parentc5af1d2ec785387f1358f91ea62b27ae5db3c1d9 (diff)
lokdialog: Make hyperlink dialog work
Change-Id: Ifd8c721b001b09ddab8d4fe06ae6818980d6ee76 (cherry picked from commit 7bcb9a8416d61bdd3c7fc345f87de5aa8c3054f9)
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r--sfx2/source/dialog/basedlgs.cxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 1de5c4fb2f79..f44ed4c15446 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -206,6 +206,28 @@ void SfxModalDialog::CreateOutputItemSet( const SfxItemSet& rSet )
}
+void SfxModalDialog::StateChanged( StateChangedType nType )
+{
+ if (comphelper::LibreOfficeKit::isActive() && nType == StateChangedType::InitShow)
+ {
+ // There are some dialogs, like Hyperlink dialog, which inherit from
+ // SfxModalDialog even though they are modeless, i.e., their Execute method
+ // isn't called.
+ if (!GetLOKNotifier())
+ {
+ SetLOKNotifier(SfxViewShell::Current());
+ const Size aSize = GetOptimalSize();
+ std::vector<vcl::LOKPayloadItem> aItems;
+ aItems.emplace_back(std::make_pair("type", "dialog"));
+ aItems.emplace_back(std::make_pair("size", aSize.toString()));
+ SfxViewShell::Current()->notifyWindow(GetLOKWindowId(), "created", aItems);
+ }
+ }
+
+ ModalDialog::StateChanged(nType);
+}
+
+
void SfxModelessDialog::StateChanged( StateChangedType nStateChange )
{
if ( nStateChange == StateChangedType::InitShow )