summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx6
-rw-r--r--sw/source/uibase/inc/frmpage.hxx2
2 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index a0d58c8a34d9..8925187a4a7a 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2406,7 +2406,7 @@ SwGrfExtPage::~SwGrfExtPage()
void SwGrfExtPage::dispose()
{
- delete pGrfDlg;
+ pGrfDlg.reset();
m_pMirror.clear();
m_pMirrorVertBox.clear();
m_pMirrorHorzBox.clear();
@@ -2603,9 +2603,9 @@ IMPL_LINK_NOARG(SwGrfExtPage, BrowseHdl, Button*, void)
{
if(!pGrfDlg)
{
- pGrfDlg = new FileDialogHelper(
+ pGrfDlg.reset(new FileDialogHelper(
ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW,
- FileDialogFlags::Graphic, GetFrameWeld());
+ FileDialogFlags::Graphic, GetFrameWeld()));
pGrfDlg->SetTitle(get<VclFrame>("linkframe")->get_label());
}
pGrfDlg->SetDisplayDirectory( m_pConnectED->GetText() );
diff --git a/sw/source/uibase/inc/frmpage.hxx b/sw/source/uibase/inc/frmpage.hxx
index 1b191e0e2279..6196cb3409da 100644
--- a/sw/source/uibase/inc/frmpage.hxx
+++ b/sw/source/uibase/inc/frmpage.hxx
@@ -222,7 +222,7 @@ class SwGrfExtPage: public SfxTabPage
OUString aFilterName;
OUString aGrfName, aNewGrfName;
- ::sfx2::FileDialogHelper* pGrfDlg;
+ std::unique_ptr<::sfx2::FileDialogHelper> pGrfDlg;
bool bHtmlMode;