summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2017-11-28 16:59:26 +0530
committerPranav Kant <pranavk@collabora.co.uk>2017-11-29 16:12:50 +0530
commit45d17c5a19b74d9942e3550f6bb8eb75815b7c04 (patch)
tree3e6607cfb11842d9c32ce9eae148989fc5e57c0e /sfx2
parent3f4f6771e939fbe2fd12be6897ca0e27aaa4d55e (diff)
lokdialog: Make hyperlink dialog work
(cherry picked from commit 29f23a47f02b05ddd9a3a626a6cf8bfa7083d1bc) (cherry picked from commit 9ad0c1815e137c55f2d356c46630e67570262196) Change-Id: Ifd8c721b001b09ddab8d4fe06ae6818980d6ee76
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/basedlgs.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index ce028f908472..97d3c1c8b45e 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -211,6 +211,27 @@ 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("size", aSize.toString()));
+ SfxViewShell::Current()->notifyWindow(GetLOKWindowId(), "created", aItems);
+ }
+ }
+
+ ModalDialog::StateChanged(nType);
+}
+
+
void SfxModelessDialog::StateChanged( StateChangedType nStateChange )
{
if ( nStateChange == StateChangedType::InitShow )