summaryrefslogtreecommitdiff
path: root/svx/source/gallery2/galbrws2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/gallery2/galbrws2.cxx')
-rw-r--r--svx/source/gallery2/galbrws2.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index 83849bf2b161..15bfd3646a2f 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -110,10 +110,10 @@ class GalleryThemePopup : public ::cppu::WeakImplHelper1< css::frame::XStatusLis
private:
const GalleryTheme* mpTheme;
sal_uIntPtr mnObjectPos;
- bool mbPreview;
+ bool mbPreview;
PopupMenu maPopupMenu;
PopupMenu maBackgroundPopup;
- GalleryBrowser2* mpBrowser;
+ VclPtr<GalleryBrowser2> mpBrowser;
typedef std::map< int, CommandInfo > CommandInfoMap;
CommandInfoMap m_aCommandInfo;
@@ -481,9 +481,9 @@ void GalleryBrowser2::dispose()
{
maMiscOptions.RemoveListenerLink( LINK( this, GalleryBrowser2, MiscHdl ) );
- delete mpPreview;
- delete mpListView;
- delete mpIconView;
+ mpPreview.clear();
+ mpListView.clear();
+ mpIconView.clear();
if( mpCurTheme )
mpGallery->ReleaseTheme( mpCurTheme, *this );
@@ -740,9 +740,9 @@ bool GalleryBrowser2::KeyInput( const KeyEvent& rKEvt, vcl::Window* pWindow )
void GalleryBrowser2::SelectTheme( const OUString& rThemeName )
{
- delete mpIconView, mpIconView = NULL;
- delete mpListView, mpListView = NULL;
- delete mpPreview, mpPreview = NULL;
+ mpIconView.clear();
+ mpListView.clear();
+ mpPreview.clear();
if( mpCurTheme )
mpGallery->ReleaseTheme( mpCurTheme, *this );