Blame SOURCES/0361-sw-lok-comments-avoid-crash-an-exit-after-clicking-t.patch

135360
From 0410c35ff5f46e51def9a2515d8e5a72f8fd37c4 Mon Sep 17 00:00:00 2001
135360
From: Miklos Vajna <vmiklos@collabora.co.uk>
135360
Date: Tue, 24 Nov 2015 15:20:22 +0100
135360
Subject: [PATCH 361/398] sw lok comments: avoid crash an exit after clicking
135360
 the scrollbar
135360
135360
Without this, vcl::Window::ImplTrackTimerHdl() will be called on a
135360
deleted vcl::Window.
135360
135360
Can be reproduced with a comment having a scrollbar in a LOK client,
135360
then clicking on the down button of the scrollbar a number of times ->
135360
crash on exit.
135360
135360
Change-Id: I5d67f96e8baa199f65ec5cf39cb5d39c8162ff33
135360
(cherry picked from commit 7c654ee9d51a752e02c0a972de27d699ab5b649a)
135360
---
135360
 sw/source/uibase/docvw/SidebarScrollBar.cxx | 5 +++++
135360
 sw/source/uibase/docvw/SidebarScrollBar.hxx | 1 +
135360
 2 files changed, 6 insertions(+)
135360
135360
diff --git a/sw/source/uibase/docvw/SidebarScrollBar.cxx b/sw/source/uibase/docvw/SidebarScrollBar.cxx
135360
index 7a80363693d1..b4d70b423eec 100644
135360
--- a/sw/source/uibase/docvw/SidebarScrollBar.cxx
135360
+++ b/sw/source/uibase/docvw/SidebarScrollBar.cxx
135360
@@ -60,6 +60,11 @@ void SidebarScrollBar::LogicInvalidate(const Rectangle* pRectangle)
135360
     rWrtShell.libreOfficeKitCallback(LOK_CALLBACK_INVALIDATE_TILES, sRectangle.getStr());
135360
 }
135360
 
135360
+void SidebarScrollBar::MouseButtonUp(const MouseEvent& /*rMouseEvent*/)
135360
+{
135360
+    EndTracking();
135360
+}
135360
+
135360
 void SidebarScrollBar::MouseMove(const MouseEvent& rMouseEvent)
135360
 {
135360
     TrackingEvent aEvent(rMouseEvent);
135360
diff --git a/sw/source/uibase/docvw/SidebarScrollBar.hxx b/sw/source/uibase/docvw/SidebarScrollBar.hxx
135360
index ea5639e42e92..0de225b2a135 100644
135360
--- a/sw/source/uibase/docvw/SidebarScrollBar.hxx
135360
+++ b/sw/source/uibase/docvw/SidebarScrollBar.hxx
135360
@@ -31,6 +31,7 @@ protected:
135360
     /// @see OutputDevice::LogicInvalidate().
135360
     void LogicInvalidate(const Rectangle* pRectangle) override;
135360
     void MouseMove(const MouseEvent& rMouseEvent) override;
135360
+    void MouseButtonUp(const MouseEvent& rMouseEvent) override;
135360
 public:
135360
     SidebarScrollBar(SwSidebarWin& rSidebarWin, WinBits nStyle, SwView& rView);
135360
     virtual ~SidebarScrollBar();
135360
-- 
135360
2.12.0
135360