[Libreoffice-commits] core.git: vcl/source

Maxim Monastirsky momonasmon at gmail.com
Thu Jan 5 09:38:19 UTC 2017


 vcl/source/control/notebookbar.cxx |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

New commits:
commit 82c9dbe2a015a16e8e3525daab77967a90858f14
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Thu Jan 5 11:27:23 2017 +0200

    Improve last commit
    
    Change-Id: I4feb71c9117e13f18e2c5215714fd0170f166b64

diff --git a/vcl/source/control/notebookbar.cxx b/vcl/source/control/notebookbar.cxx
index 1a1de02..837c515 100644
--- a/vcl/source/control/notebookbar.cxx
+++ b/vcl/source/control/notebookbar.cxx
@@ -52,10 +52,8 @@ NotebookBar::~NotebookBar()
 void NotebookBar::dispose()
 {
     if (m_pSystemWindow && m_pSystemWindow->ImplIsInTaskPaneList(this))
-    {
         m_pSystemWindow->GetTaskPaneList()->RemoveWindow(this);
-        m_pSystemWindow.clear();
-    }
+    m_pSystemWindow.clear();
     disposeBuilder();
     m_pEventListener.clear();
     Control::dispose();
@@ -117,10 +115,7 @@ void NotebookBar::SetIconClickHdl(Link<NotebookBar*, void> aHdl)
 
 void NotebookBar::SetSystemWindow(SystemWindow* pSystemWindow)
 {
-    if (m_pSystemWindow)
-        m_pSystemWindow.clear();
-
-    m_pSystemWindow = VclPtr<SystemWindow>(pSystemWindow);
+    m_pSystemWindow = pSystemWindow;
     if (!m_pSystemWindow->ImplIsInTaskPaneList(this))
         m_pSystemWindow->GetTaskPaneList()->AddWindow(this);
 }


More information about the Libreoffice-commits mailing list