[Libreoffice-commits] core.git: Branch 'feature/vclref' - 2 commits - sfx2/source vcl/source

Michael Meeks michael.meeks at collabora.com
Tue Mar 17 10:40:43 PDT 2015


 sfx2/source/toolbox/tbxitem.cxx |    4 ++--
 vcl/source/control/combobox.cxx |    6 +++---
 vcl/source/control/ilstbox.cxx  |    1 -
 3 files changed, 5 insertions(+), 6 deletions(-)

New commits:
commit d007a2e161e640f2d5d6205c0bb952042f608140
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Tue Mar 17 17:45:07 2015 +0000

    fix explicit delete.
    
    Change-Id: I6d12eb32e9c8fcb403473c41b3a6eb2f29fe8639

diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index c73547e..7921069 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -274,9 +274,9 @@ void SAL_CALL SfxToolBoxControl::dispose() throw (::com::sun::star::uno::Runtime
 
     // Remove and destroy our item window at our toolbox
     SolarMutexGuard aGuard;
-    vcl::Window* pWindow = pImpl->pBox->GetItemWindow( pImpl->nTbxId );
+    VclPtr< vcl::Window > pWindow = pImpl->pBox->GetItemWindow( pImpl->nTbxId );
     pImpl->pBox->SetItemWindow( pImpl->nTbxId, 0 );
-    delete pWindow;
+    pWindow.disposeAndClear();
 
     // Dispose an open sub toolbar. It's possible that we have an open
     // sub toolbar while we get disposed. Therefore we have to dispose
commit bd21b01f4fc603ed6508d4c8268d7aaf4dcc5952
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Tue Mar 17 16:58:15 2015 +0000

    fix ilistbox dispose.
    
    Change-Id: Icc5b6e924dfeec7a7da4f654d79b17fe91ce1418

diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index f1724dc..6d4b9f7 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -75,9 +75,9 @@ void ComboBox::dispose()
 {
     mpSubEdit.disposeAndClear();
 
-    ImplListBox *pImplLB = mpImplLB;
-    mpImplLB = NULL;
-    delete pImplLB;
+    VclPtr< ImplListBox > pImplLB = mpImplLB;
+    mpImplLB.clear();
+    pImplLB.disposeAndClear();
 
     mpFloatWin.disposeAndClear();
     mpBtn.disposeAndClear();
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index d32a4ec..ae8df9f 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -2172,7 +2172,6 @@ void ImplListBox::dispose()
     mpHScrollBar.disposeAndClear();
     mpVScrollBar.disposeAndClear();
     mpScrollBarBox.disposeAndClear();
-    maLBWindow.clear();
     maLBWindow.disposeAndClear();
     Control::dispose();
 }


More information about the Libreoffice-commits mailing list