diff options
author | Henry Castro <hcastro@collabora.com> | 2019-12-18 21:17:29 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2019-12-23 11:59:19 +0100 |
commit | 6d982294c62dd951b1d9cb106b50a2abb1056086 (patch) | |
tree | e05113702f26440550e186528fb6811ec469813b /sfx2 | |
parent | e60c4940e4b5274d88cf20f456848d8f92948450 (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/85592
Tested-by: Jenkins
Reviewed-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 592ac3207da9..9e25fb002aea 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1126,7 +1126,7 @@ SfxViewShell::~SfxViewShell() } vcl::Window* pFrameWin = GetViewFrame()->GetWindow().GetFrameWindow(); - if (pFrameWin && pFrameWin->GetLOKNotifier()) + if (pFrameWin && pFrameWin->GetLOKNotifier() == this) pFrameWin->ReleaseLOKNotifier(); } @@ -1135,7 +1135,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(); |