summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/swabstdlg.hxx2
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx2
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx2
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx2
-rw-r--r--sw/source/ui/table/convert.cxx2
-rw-r--r--sw/source/ui/table/tautofmt.cxx4
-rw-r--r--sw/source/uibase/inc/tautofmt.hxx2
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;
};