diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-27 10:01:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-28 07:39:31 +0100 |
commit | b4a208d1d38fb1eb71070e24cb2d146558b214a2 (patch) | |
tree | b7b9a1233a1b2e072046c8953e5ac720af3a5452 /sw | |
parent | c95b13c1ad9e01462180feb996ef4efb764eb879 (diff) |
return unique_ptr from FillAutoFormatOfIndex
Change-Id: If41981a2136ab1a9d06a1b7a3b044ade302ba1d4
Reviewed-on: https://gerrit.libreoffice.org/69795
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/swabstdlg.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dbui/dbinsdlg.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dialog/swdlgfact.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dialog/swdlgfact.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/table/convert.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/table/tautofmt.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/inc/tautofmt.hxx | 2 |
7 files changed, 8 insertions, 8 deletions
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index 647c5c903925..c92ab77686e9 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -297,7 +297,7 @@ class AbstractSwAutoFormatDlg : public VclAbstractDialog protected: virtual ~AbstractSwAutoFormatDlg() override = default; public: - virtual SwTableAutoFormat* FillAutoFormatOfIndex() const = 0; + virtual std::unique_ptr<SwTableAutoFormat> FillAutoFormatOfIndex() const = 0; }; class AbstractSwFieldDlg : public SfxAbstractTabDialog diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index dd3abe56a7ee..51d02dcd5026 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -740,7 +740,7 @@ IMPL_LINK_NOARG(SwInsertDBColAutoPilot, AutoFormatHdl, weld::Button&, void) ScopedVclPtr<AbstractSwAutoFormatDlg> pDlg(rFact.CreateSwAutoFormatDlg(m_xDialog.get(), pView->GetWrtShellPtr(), false, m_xTAutoFormat.get())); if( RET_OK == pDlg->Execute()) - m_xTAutoFormat.reset(pDlg->FillAutoFormatOfIndex()); + m_xTAutoFormat = pDlg->FillAutoFormatOfIndex(); } IMPL_LINK(SwInsertDBColAutoPilot, TVSelectHdl, weld::TreeView&, rBox, void) diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index 7d36a5e527e1..687f70bd90cf 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -437,7 +437,7 @@ void AbstractSwSelGlossaryDlg_Impl::SelectEntryPos(sal_Int32 nIdx) m_xDlg->SelectEntryPos( nIdx ); } -SwTableAutoFormat* AbstractSwAutoFormatDlg_Impl::FillAutoFormatOfIndex() const +std::unique_ptr<SwTableAutoFormat> AbstractSwAutoFormatDlg_Impl::FillAutoFormatOfIndex() const { return m_xDlg->FillAutoFormatOfIndex(); } diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index dfb5925b7a5e..94b7fa965640 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -344,7 +344,7 @@ public: { } virtual short Execute() override; - virtual SwTableAutoFormat* FillAutoFormatOfIndex() const override; + virtual std::unique_ptr<SwTableAutoFormat> FillAutoFormatOfIndex() const override; }; class AbstractSwFieldDlg_Impl : public AbstractSwFieldDlg diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx index 6ac46df8eaae..9420e5c2290f 100644 --- a/sw/source/ui/table/convert.cxx +++ b/sw/source/ui/table/convert.cxx @@ -175,7 +175,7 @@ IMPL_LINK_NOARG(SwConvertTableDlg, AutoFormatHdl, weld::Button&, void) ScopedVclPtr<AbstractSwAutoFormatDlg> pDlg(rFact.CreateSwAutoFormatDlg(m_xDialog.get(), pShell, false, mxTAutoFormat.get())); if (RET_OK == pDlg->Execute()) - mxTAutoFormat.reset(pDlg->FillAutoFormatOfIndex()); + mxTAutoFormat = pDlg->FillAutoFormatOfIndex(); } IMPL_LINK(SwConvertTableDlg, BtnHdl, weld::Button&, rButton, void) diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 503553fc6ead..e2cfa38a688d 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -161,11 +161,11 @@ void SwAutoFormatDlg::UpdateChecks( const SwTableAutoFormat& rFormat, bool bEnab m_xBtnAlignment->set_active(rFormat.IsJustify()); } -SwTableAutoFormat* SwAutoFormatDlg::FillAutoFormatOfIndex() const +std::unique_ptr<SwTableAutoFormat> SwAutoFormatDlg::FillAutoFormatOfIndex() const { if( 255 != m_nIndex ) { - return new SwTableAutoFormat( (*m_xTableTable)[ m_nIndex ] ); + return std::make_unique<SwTableAutoFormat>( (*m_xTableTable)[ m_nIndex ] ); } return nullptr; diff --git a/sw/source/uibase/inc/tautofmt.hxx b/sw/source/uibase/inc/tautofmt.hxx index bfc00a3d97d5..69e9938ba11c 100644 --- a/sw/source/uibase/inc/tautofmt.hxx +++ b/sw/source/uibase/inc/tautofmt.hxx @@ -79,7 +79,7 @@ public: virtual short run() override; - SwTableAutoFormat* FillAutoFormatOfIndex() const; + std::unique_ptr<SwTableAutoFormat> FillAutoFormatOfIndex() const; virtual ~SwAutoFormatDlg() override; }; |