sw/source/uibase/inc/inputwin.hxx    |    2 +-
 sw/source/uibase/inc/redlndlg.hxx    |    4 ++--
 sw/source/uibase/misc/redlndlg.cxx   |    9 ++++-----
 sw/source/uibase/ribbar/inputwin.cxx |    4 ++--
 sw/source/uibase/shells/textsh.cxx   |    2 +-
 5 files changed, 10 insertions(+), 11 deletions(-)

New commits:
commit cc60fd2285515b17b893ab4c106f5b060cf31a38
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Jul 24 11:27:58 2018 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Jul 25 08:47:06 2018 +0200

    loplugin:useuniqueptr in SwModelessRedlineAcceptDlg
    
    Change-Id: I29dcfce3cc9977454f29cf21efb38dbe14f5c14f
    Reviewed-on: https://gerrit.libreoffice.org/57944
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/source/uibase/inc/redlndlg.hxx 
b/sw/source/uibase/inc/redlndlg.hxx
index a0ddb69ba3a3..2e3e34aa87fa 100644
--- a/sw/source/uibase/inc/redlndlg.hxx
+++ b/sw/source/uibase/inc/redlndlg.hxx
@@ -136,7 +136,7 @@ public:
 
 class SwModelessRedlineAcceptDlg : public SfxModelessDialog
 {
-    SwRedlineAcceptDlg*     pImplDlg;
+    std::unique_ptr<SwRedlineAcceptDlg> pImplDlg;
     SwChildWinWrapper*      pChildWin;
 
 public:
@@ -165,7 +165,7 @@ public:
 /// Redline (Manage Changes) panel for the sidebar.
 class SwRedlineAcceptPanel : public PanelLayout, public SfxListener
 {
-    SwRedlineAcceptDlg* mpImplDlg;
+    std::unique_ptr<SwRedlineAcceptDlg> mpImplDlg;
 public:
     SwRedlineAcceptPanel(vcl::Window* pParent, const 
css::uno::Reference<css::frame::XFrame>& rFrame);
     virtual ~SwRedlineAcceptPanel() override;
diff --git a/sw/source/uibase/misc/redlndlg.cxx 
b/sw/source/uibase/misc/redlndlg.cxx
index b8590f525b7d..90a96f5ed56d 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -86,7 +86,7 @@ SwModelessRedlineAcceptDlg::SwModelessRedlineAcceptDlg(
         "AcceptRejectChangesDialog", "svx/ui/acceptrejectchangesdialog.ui")
     , pChildWin       (pChild)
 {
-    pImplDlg = new SwRedlineAcceptDlg(this, this, get_content_area());
+    pImplDlg.reset(new SwRedlineAcceptDlg(this, this, get_content_area()));
 }
 
 void SwModelessRedlineAcceptDlg::Activate()
@@ -142,7 +142,7 @@ SwModelessRedlineAcceptDlg::~SwModelessRedlineAcceptDlg()
 
 void SwModelessRedlineAcceptDlg::dispose()
 {
-    delete pImplDlg;
+    pImplDlg.reset();
     SfxModelessDialog::dispose();
 }
 
@@ -1205,7 +1205,7 @@ void SwRedlineAcceptDlg::FillInfo(OUString &rExtraData) 
const
 SwRedlineAcceptPanel::SwRedlineAcceptPanel(vcl::Window* pParent, const 
css::uno::Reference<css::frame::XFrame>& rFrame)
     : PanelLayout(pParent, "ManageChangesPanel", 
"modules/swriter/ui/managechangessidebar.ui", rFrame)
 {
-    mpImplDlg = new SwRedlineAcceptDlg(this, this, 
get<VclGrid>("content_area"));
+    mpImplDlg.reset(new SwRedlineAcceptDlg(this, this, 
get<VclGrid>("content_area")));
 
     mpImplDlg->Init();
 
@@ -1220,8 +1220,7 @@ SwRedlineAcceptPanel::~SwRedlineAcceptPanel()
 
 void SwRedlineAcceptPanel::dispose()
 {
-    delete mpImplDlg;
-    mpImplDlg = nullptr;
+    mpImplDlg.reset();
     PanelLayout::dispose();
 }
 
diff --git a/sw/source/uibase/shells/textsh.cxx 
b/sw/source/uibase/shells/textsh.cxx
index 3d9592f2ff3e..b34a65a6d97b 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -89,7 +89,7 @@
 #include <strings.hrc>
 #include <swerror.h>
 #include <unochart.hxx>
-
+#include <tgrditem.hxx>
 #include <chartins.hxx>
 
 #define ShellClass_SwTextShell
commit e2d96eaa1d6b75347c3de272547fe5d78e9d8623
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Jul 24 11:21:29 2018 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Jul 25 08:46:51 2018 +0200

    loplugin:useuniqueptr in SwInputWindow
    
    Change-Id: If9ea84c6402269483d74a64b4b79a1f47f01c88d
    Reviewed-on: https://gerrit.libreoffice.org/57943
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/source/uibase/inc/inputwin.hxx 
b/sw/source/uibase/inc/inputwin.hxx
index c23d2c51a361..2fcac269e132 100644
--- a/sw/source/uibase/inc/inputwin.hxx
+++ b/sw/source/uibase/inc/inputwin.hxx
@@ -49,7 +49,7 @@ friend class InputEdit;
 
     VclPtr<Edit>        aPos;
     VclPtr<InputEdit>   aEdit;
-    SwFieldMgr*     pMgr;
+    std::unique_ptr<SwFieldMgr> pMgr;
     SwWrtShell*     pWrtShell;
     SwView*         pView;
     OUString        aCurrentTableName, sOldFormula;
diff --git a/sw/source/uibase/ribbar/inputwin.cxx 
b/sw/source/uibase/ribbar/inputwin.cxx
index 07e71a29b90a..d5bc628b8bfd 100644
--- a/sw/source/uibase/ribbar/inputwin.cxx
+++ b/sw/source/uibase/ribbar/inputwin.cxx
@@ -143,7 +143,7 @@ void SwInputWindow::dispose()
         pView->GetHRuler().SetActive();
         pView->GetVRuler().SetActive();
     }
-    delete pMgr;
+    pMgr.reset();
     if(pWrtShell)
         pWrtShell->EndSelTableCells();
 
@@ -215,7 +215,7 @@ void SwInputWindow::ShowWin()
 
         // Edit current field
         OSL_ENSURE(pMgr == nullptr, "FieldManager not deleted");
-        pMgr = new SwFieldMgr;
+        pMgr.reset(new SwFieldMgr);
 
         // Form should always begin with "=" , so set here
         OUString sEdit('=');
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to