diff options
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/gallery2/galbrws1.cxx | 10 | ||||
-rw-r--r-- | svx/source/gallery2/galbrws1.hxx | 4 |
2 files changed, 6 insertions, 8 deletions
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 7a8525c25990..4958e41f3ae5 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -150,8 +150,7 @@ void GalleryBrowser1::dispose() EndListening( *mpGallery ); mpThemePropertiesDialog.clear(); mpThemes.disposeAndClear(); - delete mpExchangeData; - mpExchangeData = nullptr; + mpExchangeData.reset(); maNewTheme.disposeAndClear(); Control::dispose(); } @@ -259,14 +258,14 @@ void GalleryBrowser1::ImplGetExecuteVector(std::vector<OString>& o_aExec) void GalleryBrowser1::ImplGalleryThemeProperties( const OUString & rThemeName, bool bCreateNew ) { DBG_ASSERT(!mpThemePropsDlgItemSet, "mpThemePropsDlgItemSet already set!"); - mpThemePropsDlgItemSet = new SfxItemSet( SfxGetpApp()->GetPool() ); + mpThemePropsDlgItemSet.reset(new SfxItemSet( SfxGetpApp()->GetPool() )); GalleryTheme* pTheme = mpGallery->AcquireTheme( rThemeName, *this ); ImplFillExchangeData( pTheme, *mpExchangeData ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); assert(pFact && "Got no AbstractDialogFactory!"); - mpThemePropertiesDialog = pFact->CreateGalleryThemePropertiesDialog(this, mpExchangeData, mpThemePropsDlgItemSet); + mpThemePropertiesDialog = pFact->CreateGalleryThemePropertiesDialog(this, mpExchangeData.get(), mpThemePropsDlgItemSet.get()); assert(mpThemePropertiesDialog && "Got no GalleryThemePropertiesDialog!"); if ( bCreateNew ) @@ -336,8 +335,7 @@ IMPL_LINK( GalleryBrowser1, EndThemePropertiesDlgHdl, Dialog&, /*rDialog*/, void IMPL_LINK( GalleryBrowser1, DestroyThemePropertiesDlgHdl, void*, /*p*/, void ) { mpThemePropertiesDialog.disposeAndClear(); - delete mpThemePropsDlgItemSet; - mpThemePropsDlgItemSet = nullptr; + mpThemePropsDlgItemSet.reset(); } void GalleryBrowser1::ImplExecute(const OString &rIdent) diff --git a/svx/source/gallery2/galbrws1.hxx b/svx/source/gallery2/galbrws1.hxx index 858a9559c17a..24f6ada7aade 100644 --- a/svx/source/gallery2/galbrws1.hxx +++ b/svx/source/gallery2/galbrws1.hxx @@ -78,8 +78,8 @@ private: VclPtr<GalleryThemeListBox> mpThemes; VclPtr<VclAbstractDialog2> mpThemePropertiesDialog; // to keep it alive during execution Gallery* mpGallery; - ExchangeData* mpExchangeData; - SfxItemSet* mpThemePropsDlgItemSet; + std::unique_ptr<ExchangeData> mpExchangeData; + std::unique_ptr<SfxItemSet> mpThemePropsDlgItemSet; Image aImgNormal; Image aImgDefault; |