diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-28 17:05:26 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-28 17:05:26 +0200 |
commit | 0cdecf1ac2864927ac5cb50dd0a521eb9a8d7bc8 (patch) | |
tree | ad56b4e69e50a4751472cf4a933eb664067b6fce /extensions | |
parent | abce3f30ac8e1c1d40c76de611b6a10d00d7555c (diff) |
loplugin:vclwidgets (best guess)
Change-Id: I9870b4ae7c8c11af34be1edb1ebcbab5e708f42e
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/update/ui/updatecheckui.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index cd04ef5d3810..e282b11b430a 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(); |