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

Stephan Bergmann sbergman at redhat.com
Tue Apr 28 08:05:51 PDT 2015


 extensions/source/update/ui/updatecheckui.cxx |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit 0cdecf1ac2864927ac5cb50dd0a521eb9a8d7bc8
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Apr 28 17:05:26 2015 +0200

    loplugin:vclwidgets (best guess)
    
    Change-Id: I9870b4ae7c8c11af34be1edb1ebcbab5e708f42e

diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx
index cd04ef5..e282b11 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -128,8 +128,8 @@ class UpdateCheckUI : public ::cppu::WeakImplHelper3
     OUString       maBubbleText;
     OUString       maBubbleImageURL;
     Image               maBubbleImage;
-    BubbleWindow*       mpBubbleWin;
-    SystemWindow*       mpIconSysWin;
+    VclPtr<BubbleWindow> mpBubbleWin;
+    VclPtr<SystemWindow> mpIconSysWin;
     MenuBar*            mpIconMBar;
     ResMgr*             mpUpdResMgr;
     ResMgr*             mpSfxResMgr;
@@ -200,8 +200,6 @@ public:
 
 UpdateCheckUI::UpdateCheckUI(const uno::Reference<uno::XComponentContext>& xContext) :
       m_xContext(xContext)
-    , mpBubbleWin( NULL )
-    , mpIconSysWin( NULL )
     , mpIconMBar( NULL )
     , mbShowBubble( false )
     , mbShowMenuIcon( false )
@@ -557,8 +555,7 @@ void UpdateCheckUI::RemoveBubbleWindow( bool bRemoveIcon )
 
     if ( mpBubbleWin )
     {
-        delete mpBubbleWin;
-        mpBubbleWin = NULL;
+        mpBubbleWin.disposeAndClear();
     }
 
     if ( bRemoveIcon )
@@ -709,7 +706,7 @@ IMPL_LINK( UpdateCheckUI, WindowEventHdl, VclWindowEvent*, pEvent )
     {
         SolarMutexGuard aGuard;
         if ( ( mpIconSysWin == pEvent->GetWindow() ) &&
-             ( mpBubbleWin != NULL ) && ( mpIconMBar != NULL ) )
+             mpBubbleWin && ( mpIconMBar != NULL ) )
         {
             Rectangle aIconRect = mpIconMBar->GetMenuBarButtonRectPixel( mnIconID );
             Point aWinPos = aIconRect.BottomCenter();


More information about the Libreoffice-commits mailing list