[Libreoffice-commits] core.git: 2 commits - sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Jul 30 06:20:15 UTC 2018
sw/source/ui/dialog/uiregionsw.cxx | 5 ++---
sw/source/ui/envelp/label1.cxx | 2 +-
sw/source/uibase/inc/label.hxx | 2 +-
sw/source/uibase/inc/regionsw.hxx | 2 +-
4 files changed, 5 insertions(+), 6 deletions(-)
New commits:
commit 9b7c875440d473aa914962d3a602b652722d30e8
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Jul 26 15:20:02 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Jul 30 08:20:02 2018 +0200
loplugin:useuniqueptr in SwLabDlg
Change-Id: Ie2a54b88e821041ecea6c84ea402486a76ba1f31
Reviewed-on: https://gerrit.libreoffice.org/58233
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index b4e8de82bac9..d7eadfdce5c1 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -163,7 +163,7 @@ SwLabDlg::SwLabDlg(weld::Window* pParent, const SfxItemSet& rSet,
SwLabDlg::~SwLabDlg()
{
- delete m_pRecs;
+ m_pRecs.reset();
}
void SwLabDlg::GetLabItem(SwLabItem &rItem)
diff --git a/sw/source/uibase/inc/label.hxx b/sw/source/uibase/inc/label.hxx
index fdb099cc24e6..a0471ceaafc9 100644
--- a/sw/source/uibase/inc/label.hxx
+++ b/sw/source/uibase/inc/label.hxx
@@ -38,7 +38,7 @@ class SwLabDlg : public SfxTabDialogController
std::vector<sal_uInt16> aTypeIds;
std::vector<OUString> aMakes;
- SwLabRecs* m_pRecs;
+ std::unique_ptr<SwLabRecs> m_pRecs;
OUString aLstGroup;
OUString m_sBusinessCardDlg;
bool m_bLabel;
commit c6b23dbf3deec12a5da71b2e310b80ccb8ef0ff9
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Jul 26 15:18:07 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Jul 30 08:19:52 2018 +0200
loplugin:useuniqueptr in SwInsertSectionTabPage
Change-Id: I22ffd16c26c837c8989d9c1875e5f809695ea27c
Reviewed-on: https://gerrit.libreoffice.org/58232
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index a97185831b97..bbf7f3c6838a 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -1555,7 +1555,7 @@ SwInsertSectionTabPage::~SwInsertSectionTabPage()
void SwInsertSectionTabPage::dispose()
{
- delete m_pDocInserter;
+ m_pDocInserter.reset();
m_pCurName.clear();
m_pFileCB.clear();
m_pDDECB.clear();
@@ -1771,8 +1771,7 @@ IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, Button *, pButton, void )
IMPL_LINK_NOARG(SwInsertSectionTabPage, FileSearchHdl, Button*, void)
{
- delete m_pDocInserter;
- m_pDocInserter = new ::sfx2::DocumentInserter(GetFrameWeld(), "swriter");
+ m_pDocInserter.reset(new ::sfx2::DocumentInserter(GetFrameWeld(), "swriter"));
m_pDocInserter->StartExecuteModal( LINK( this, SwInsertSectionTabPage, DlgClosedHdl ) );
}
diff --git a/sw/source/uibase/inc/regionsw.hxx b/sw/source/uibase/inc/regionsw.hxx
index 7e9b9deaefb2..8f44ea17fbd3 100644
--- a/sw/source/uibase/inc/regionsw.hxx
+++ b/sw/source/uibase/inc/regionsw.hxx
@@ -163,7 +163,7 @@ class SwInsertSectionTabPage : public SfxTabPage
css::uno::Sequence <sal_Int8 > m_aNewPasswd;
SwWrtShell* m_pWrtSh;
- sfx2::DocumentInserter* m_pDocInserter;
+ std::unique_ptr<sfx2::DocumentInserter> m_pDocInserter;
DECL_LINK( ChangeHideHdl, Button *, void );
DECL_LINK( ChangeProtectHdl, Button *, void );
More information about the Libreoffice-commits
mailing list