summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2019-11-30 09:36:27 -0400
committerJan Holesovsky <kendy@collabora.com>2019-12-10 13:14:55 +0100
commit95801714f4159cbbe5fc4249dc6af037fd716f7e (patch)
tree04582738357c73289019a1493aaeaa451c9c51c0 /sfx2
parent4a437520d6295327d42a586e908c4c6e7b24561e (diff)
lok: fix welded dialogs
In the tiled rendering case the dialogs, run asynchronous due to multiple user access. In order to send the messages to the client side, the dialog has to hook a LOKNotifier in the constructor of the SfxViewShell. However, the new weld wrapper classes use the Frame Window, (i.e. Window::GetFarmeWeld()), as a parent of the dialogs. On the other hand, in order to avoid getting the interface implementation inside implementation classes, it has been created a new method Window::GetFrameWindow(), otherwise I have to do a bureaucratic conversion between Interfaces to Implementations ( i.e. UnoWrapperBase::GetUnoWrapper() ) Change-Id: I32c34d82a89211a025250e65a05ce47d30efa0b8 Reviewed-on: https://gerrit.libreoffice.org/84117 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/viewfrm.cxx5
-rw-r--r--sfx2/source/view/viewsh.cxx11
2 files changed, 11 insertions, 5 deletions
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 1f16a65973d3..80573aa61fc8 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1376,8 +1376,9 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
case SfxHintId::Deinitializing:
{
- if (GetWindow().GetLOKNotifier())
- GetWindow().ReleaseLOKNotifier();
+ vcl::Window* pFrameWin = GetWindow().GetFrameWindow();
+ if (pFrameWin && pFrameWin->GetLOKNotifier())
+ pFrameWin->ReleaseLOKNotifier();
GetFrame().DoClose();
break;
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index f8ffb6ddae1c..7e2ec6369e58 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1080,7 +1080,11 @@ SfxViewShell::SfxViewShell
rViewArr.push_back(this);
if (comphelper::LibreOfficeKit::isActive())
- pViewFrame->GetWindow().SetLOKNotifier(this, true);
+ {
+ vcl::Window* pFrameWin = pViewFrame->GetWindow().GetFrameWindow();
+ if (pFrameWin)
+ pFrameWin->SetLOKNotifier(this, true);
+ }
}
@@ -1105,8 +1109,9 @@ SfxViewShell::~SfxViewShell()
pImpl->m_pController.clear();
}
- if (GetViewFrame()->GetWindow().GetLOKNotifier())
- GetViewFrame()->GetWindow().ReleaseLOKNotifier();
+ vcl::Window* pFrameWin = GetViewFrame()->GetWindow().GetFrameWindow();
+ if (pFrameWin && pFrameWin->GetLOKNotifier())
+ pFrameWin->ReleaseLOKNotifier();
}
bool SfxViewShell::PrepareClose