diff options
author | Henry Castro <hcastro@collabora.com> | 2019-12-18 21:17:29 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2020-05-21 00:35:46 +0200 |
commit | 61b2927122ff2ae3bd70025377b782359300bfdf (patch) | |
tree | 650edc9665c3bf8b0d37911b1534993ba8610f48 /sfx2 | |
parent | 02063f5f500444761d46d4a405c17527fcff4c5b (diff) |
lok: ReleaseLOKNotifier only if view shell is assigned to a view frame
There is an interesting case with the dialog SwMultiTOXTabDialog
it creates a temporary frame-controller-view and when closing
the dialog the LOKNotifier was already released, and of course
the "close" message is not sent to the client side.
Change-Id: Ie6877d077f8fad3e5893be9e1d5f7a337a38c9c8
Reviewed-on: https://gerrit.libreoffice.org/85461
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94508
Tested-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index eee24a00d0ff..bf14212fa289 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1124,7 +1124,7 @@ SfxViewShell::~SfxViewShell() } vcl::Window* pFrameWin = GetViewFrame()->GetWindow().GetFrameWindow(); - if (pFrameWin && pFrameWin->GetLOKNotifier()) + if (pFrameWin && pFrameWin->GetLOKNotifier() == this) pFrameWin->ReleaseLOKNotifier(); } @@ -1133,7 +1133,7 @@ bool SfxViewShell::PrepareClose bool bUI // TRUE: Allow Dialog and so on, FALSE: silent-mode ) { - if (GetViewFrame()->GetWindow().GetLOKNotifier()) + if (GetViewFrame()->GetWindow().GetLOKNotifier() == this) GetViewFrame()->GetWindow().ReleaseLOKNotifier(); SfxPrinter *pPrinter = GetPrinter(); |