[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sfx2/source

Henry Castro (via logerrit) logerrit at kemper.freedesktop.org
Fri Dec 20 11:36:57 UTC 2019


 sfx2/source/view/viewsh.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3b4be91f44492d7ec7658684f130b4f1779e70d9
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Wed Dec 18 21:17:29 2019 -0400
Commit:     Henry Castro <hcastro at collabora.com>
CommitDate: Fri Dec 20 12:36:09 2019 +0100

    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 at gmail.com>
    Reviewed-by: Henry Castro <hcastro at collabora.com>

diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 0a6fc164081d..1a022e49f7b2 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1110,7 +1110,7 @@ SfxViewShell::~SfxViewShell()
     }
 
     vcl::Window* pFrameWin = GetViewFrame()->GetWindow().GetFrameWindow();
-    if (pFrameWin && pFrameWin->GetLOKNotifier())
+    if (pFrameWin && pFrameWin->GetLOKNotifier() == this)
         pFrameWin->ReleaseLOKNotifier();
 }
 
@@ -1119,7 +1119,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();


More information about the Libreoffice-commits mailing list