summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2019-11-30 09:36:27 -0400
committerHenry Castro <hcastro@collabora.com>2019-12-11 03:25:57 +0100
commitd5d8fa63282a433da9c49d811f04390b8d6ab9cc (patch)
tree51e7bd759def8d8dbcc50c0b4fe8027ef637ef45 /sfx2
parent3bf5610d14a6dd5f093314016ba25038fe06fdf1 (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/84215 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@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 223a02a7a8ab..96bdf69f0c89 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1509,8 +1509,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 126a09e5ecad..baaceb0b6a73 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1096,7 +1096,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);
+ }
}
@@ -1121,8 +1125,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