compilerplugins/clang/useuniqueptr.cxx | 6 ++++++ sw/source/ui/frmdlg/cption.cxx | 2 +- sw/source/ui/frmdlg/frmpage.cxx | 6 +++--- sw/source/uibase/inc/cption.hxx | 2 +- sw/source/uibase/inc/frmpage.hxx | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-)
New commits: commit cfe896e7b811d4c2777531efcca8065a0d2fbf54 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Jul 26 16:22:07 2018 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Jul 30 08:21:01 2018 +0200 loplugin:useuniqueptr in SwGrfExtPage Change-Id: Ic71cf09b6a443f6918b074010fe53ea0843bf246 Reviewed-on: https://gerrit.libreoffice.org/58238 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/compilerplugins/clang/useuniqueptr.cxx b/compilerplugins/clang/useuniqueptr.cxx index ab254920b6c9..d93c40205a8d 100644 --- a/compilerplugins/clang/useuniqueptr.cxx +++ b/compilerplugins/clang/useuniqueptr.cxx @@ -110,6 +110,12 @@ public: // SfxObjectShell::pMedium if (fn == SRCDIR "/sfx2/source/doc/objxtor.cxx") return; + // various + if (fn == SRCDIR "/sw/source/filter/ww8/wrtww8.cxx") + return; + // WW8TabBandDesc + if (fn == SRCDIR "/sw/source/filter/ww8/ww8par2.cxx") + return; TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); } 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; commit 95d7dc537e8979b67ed0928237404fd552880095 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Jul 26 16:18:04 2018 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Jul 30 08:20:53 2018 +0200 loplugin:useuniqueptr in SwCaptionDialog Change-Id: Ibf49f18ed43bb24a3ef79a0c7862b0dbd2698f3d Reviewed-on: https://gerrit.libreoffice.org/58237 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx index 1d62d1277e20..cc42c9a993f3 100644 --- a/sw/source/ui/frmdlg/cption.cxx +++ b/sw/source/ui/frmdlg/cption.cxx @@ -418,7 +418,7 @@ SwCaptionDialog::~SwCaptionDialog() void SwCaptionDialog::dispose() { - delete pMgr; + pMgr.reset(); m_pTextEdit.clear(); m_pCategoryBox.clear(); m_pFormatText.clear(); diff --git a/sw/source/uibase/inc/cption.hxx b/sw/source/uibase/inc/cption.hxx index 037debb11369..abf3855c52e1 100644 --- a/sw/source/uibase/inc/cption.hxx +++ b/sw/source/uibase/inc/cption.hxx @@ -58,7 +58,7 @@ class SwCaptionDialog : public SvxStandardDialog VclPtr<SwCaptionPreview> m_pPreview; SwView &rView; // search per active, avoid View - SwFieldMgr *pMgr; // pointer to save the include + std::unique_ptr<SwFieldMgr> pMgr; // pointer to save the include OUString sCharacterStyle; bool bCopyAttributes; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits