diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-29 11:54:46 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-29 15:26:36 +0200 |
commit | ca2b546a8a4c80f4f589ef529b3cb98d0c3bf048 (patch) | |
tree | 5e315275ec25a97ba3e3eb057b4ba04a5253a019 /sc/source/ui/attrdlg | |
parent | bd26eb29d7d2bc0f3a990bfcd3f2c82148ee913d (diff) |
loplugin:useuniqueptr in the sc dialog classes
Change-Id: I61c9812e1779e0342160f0762afe79d3302304e6
Reviewed-on: https://gerrit.libreoffice.org/59759
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/attrdlg')
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.cxx | 38 | ||||
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.hxx | 76 |
2 files changed, 57 insertions, 57 deletions
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index 9f40c38f2b7e..159a04fa21c9 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -746,12 +746,12 @@ VclPtr<AbstractScAutoFormatDlg> ScAbstractDialogFactory_Impl::CreateScAutoFormat VclPtr<AbstractScColRowLabelDlg> ScAbstractDialogFactory_Impl::CreateScColRowLabelDlg(weld::Window* pParent, bool bCol, bool bRow) { - return VclPtr<AbstractScColRowLabelDlg_Impl>::Create(new ScColRowLabelDlg(pParent, bCol, bRow)); + return VclPtr<AbstractScColRowLabelDlg_Impl>::Create(o3tl::make_unique<ScColRowLabelDlg>(pParent, bCol, bRow)); } VclPtr<AbstractScSortWarningDlg> ScAbstractDialogFactory_Impl::CreateScSortWarningDlg(weld::Window* pParent, const OUString& rExtendText, const OUString& rCurrentText) { - return VclPtr<AbstractScSortWarningDlg_Impl>::Create(new ScSortWarningDlg(pParent, rExtendText, rCurrentText)); + return VclPtr<AbstractScSortWarningDlg_Impl>::Create(o3tl::make_unique<ScSortWarningDlg>(pParent, rExtendText, rCurrentText)); } VclPtr<AbstractScCondFormatManagerDlg> ScAbstractDialogFactory_Impl::CreateScCondFormatMgrDlg(vcl::Window* pParent, ScDocument* pDoc, const ScConditionalFormatList* pFormatList ) @@ -762,25 +762,25 @@ VclPtr<AbstractScCondFormatManagerDlg> ScAbstractDialogFactory_Impl::CreateScCon VclPtr<AbstractScDataPilotDatabaseDlg> ScAbstractDialogFactory_Impl::CreateScDataPilotDatabaseDlg(weld::Window* pParent) { - return VclPtr<AbstractScDataPilotDatabaseDlg_Impl>::Create(new ScDataPilotDatabaseDlg(pParent)); + return VclPtr<AbstractScDataPilotDatabaseDlg_Impl>::Create(o3tl::make_unique<ScDataPilotDatabaseDlg>(pParent)); } VclPtr<AbstractScDataPilotSourceTypeDlg> ScAbstractDialogFactory_Impl::CreateScDataPilotSourceTypeDlg( weld::Window* pParent, bool bEnableExternal) { - return VclPtr<AbstractScDataPilotSourceTypeDlg_Impl>::Create(new ScDataPilotSourceTypeDlg(pParent, bEnableExternal)); + return VclPtr<AbstractScDataPilotSourceTypeDlg_Impl>::Create(o3tl::make_unique<ScDataPilotSourceTypeDlg>(pParent, bEnableExternal)); } VclPtr<AbstractScDataPilotServiceDlg> ScAbstractDialogFactory_Impl::CreateScDataPilotServiceDlg(weld::Window* pParent, const std::vector<OUString>& rServices) { - return VclPtr<AbstractScDataPilotServiceDlg_Impl>::Create(new ScDataPilotServiceDlg(pParent, rServices)); + return VclPtr<AbstractScDataPilotServiceDlg_Impl>::Create(o3tl::make_unique<ScDataPilotServiceDlg>(pParent, rServices)); } VclPtr<AbstractScDeleteCellDlg> ScAbstractDialogFactory_Impl::CreateScDeleteCellDlg(weld::Window* pParent, bool bDisallowCellMove) { - return VclPtr<AbstractScDeleteCellDlg_Impl>::Create(new ScDeleteCellDlg(pParent, bDisallowCellMove)); + return VclPtr<AbstractScDeleteCellDlg_Impl>::Create(o3tl::make_unique<ScDeleteCellDlg>(pParent, bDisallowCellMove)); } VclPtr<AbstractScDataFormDlg> ScAbstractDialogFactory_Impl::CreateScDataFormDlg(vcl::Window* pParent, @@ -792,7 +792,7 @@ VclPtr<AbstractScDataFormDlg> ScAbstractDialogFactory_Impl::CreateScDataFormDlg( VclPtr<AbstractScDeleteContentsDlg> ScAbstractDialogFactory_Impl::CreateScDeleteContentsDlg(weld::Window* pParent) { - return VclPtr<AbstractScDeleteContentsDlg_Impl>::Create(new ScDeleteContentsDlg(pParent)); + return VclPtr<AbstractScDeleteContentsDlg_Impl>::Create(o3tl::make_unique<ScDeleteContentsDlg>(pParent)); } VclPtr<AbstractScFillSeriesDlg> ScAbstractDialogFactory_Impl::CreateScFillSeriesDlg(weld::Window* pParent, @@ -805,41 +805,41 @@ VclPtr<AbstractScFillSeriesDlg> ScAbstractDialogFactory_Impl::CreateScFillSeries double fMax, sal_uInt16 nPossDir) { - return VclPtr<AbstractScFillSeriesDlg_Impl>::Create(new ScFillSeriesDlg(pParent, rDocument,eFillDir, eFillCmd,eFillDateCmd, aStartStr,fStep,fMax,nPossDir)); + return VclPtr<AbstractScFillSeriesDlg_Impl>::Create(o3tl::make_unique<ScFillSeriesDlg>(pParent, rDocument,eFillDir, eFillCmd,eFillDateCmd, aStartStr,fStep,fMax,nPossDir)); } VclPtr<AbstractScGroupDlg> ScAbstractDialogFactory_Impl::CreateAbstractScGroupDlg(weld::Window* pParent, bool bUnGroup) { - return VclPtr<AbstractScGroupDlg_Impl>::Create(new ScGroupDlg(pParent, bUnGroup, true/*bRows*/)); + return VclPtr<AbstractScGroupDlg_Impl>::Create(o3tl::make_unique<ScGroupDlg>(pParent, bUnGroup, true/*bRows*/)); } VclPtr<AbstractScInsertCellDlg> ScAbstractDialogFactory_Impl::CreateScInsertCellDlg(weld::Window* pParent, bool bDisallowCellMove) { - return VclPtr<AbstractScInsertCellDlg_Impl>::Create(new ScInsertCellDlg(pParent, bDisallowCellMove)); + return VclPtr<AbstractScInsertCellDlg_Impl>::Create(o3tl::make_unique<ScInsertCellDlg>(pParent, bDisallowCellMove)); } VclPtr<AbstractScInsertContentsDlg> ScAbstractDialogFactory_Impl::CreateScInsertContentsDlg(weld::Window* pParent, const OUString* pStrTitle) { - return VclPtr<AbstractScInsertContentsDlg_Impl>::Create(new ScInsertContentsDlg(pParent, pStrTitle)); + return VclPtr<AbstractScInsertContentsDlg_Impl>::Create(o3tl::make_unique<ScInsertContentsDlg>(pParent, pStrTitle)); } VclPtr<AbstractScInsertTableDlg> ScAbstractDialogFactory_Impl::CreateScInsertTableDlg(weld::Window* pParent, ScViewData& rViewData, SCTAB nTabCount, bool bFromFile) { - return VclPtr<AbstractScInsertTableDlg_Impl>::Create(new ScInsertTableDlg(pParent, rViewData,nTabCount, bFromFile)); + return VclPtr<AbstractScInsertTableDlg_Impl>::Create(o3tl::make_unique<ScInsertTableDlg>(pParent, rViewData,nTabCount, bFromFile)); } VclPtr<AbstractScSelEntryDlg> ScAbstractDialogFactory_Impl::CreateScSelEntryDlg(weld::Window* pParent, const std::vector<OUString> &rEntryList) { - return VclPtr<AbstractScSelEntryDlg_Impl>::Create(new ScSelEntryDlg(pParent, rEntryList)); + return VclPtr<AbstractScSelEntryDlg_Impl>::Create(o3tl::make_unique<ScSelEntryDlg>(pParent, rEntryList)); } VclPtr<AbstractScLinkedAreaDlg> ScAbstractDialogFactory_Impl::CreateScLinkedAreaDlg(weld::Window* pParent) { - return VclPtr<AbstractScLinkedAreaDlg_Impl>::Create(new ScLinkedAreaDlg(pParent)); + return VclPtr<AbstractScLinkedAreaDlg_Impl>::Create(o3tl::make_unique<ScLinkedAreaDlg>(pParent)); } VclPtr<AbstractScMetricInputDlg> ScAbstractDialogFactory_Impl::CreateScMetricInputDlg(weld::Window* pParent, @@ -851,19 +851,19 @@ VclPtr<AbstractScMetricInputDlg> ScAbstractDialogFactory_Impl::CreateScMetricInp long nMaximum , long nMinimum ) { - return VclPtr<AbstractScMetricInputDlg_Impl>::Create(new ScMetricInputDlg(pParent, sDialogName, nCurrent ,nDefault, eFUnit, + return VclPtr<AbstractScMetricInputDlg_Impl>::Create(o3tl::make_unique<ScMetricInputDlg>(pParent, sDialogName, nCurrent ,nDefault, eFUnit, nDecimals, nMaximum , nMinimum)); } VclPtr<AbstractScMoveTableDlg> ScAbstractDialogFactory_Impl::CreateScMoveTableDlg(weld::Window* pParent, const OUString& rDefault) { - return VclPtr<AbstractScMoveTableDlg_Impl>::Create(new ScMoveTableDlg(pParent, rDefault)); + return VclPtr<AbstractScMoveTableDlg_Impl>::Create(o3tl::make_unique<ScMoveTableDlg>(pParent, rDefault)); } VclPtr<AbstractScNameCreateDlg> ScAbstractDialogFactory_Impl::CreateScNameCreateDlg(weld::Window * pParent, CreateNameFlags nFlags) { - return VclPtr<AbstractScNameCreateDlg_Impl>::Create(new ScNameCreateDlg(pParent, nFlags)); + return VclPtr<AbstractScNameCreateDlg_Impl>::Create(o3tl::make_unique<ScNameCreateDlg>(pParent, nFlags)); } VclPtr<AbstractScNamePasteDlg> ScAbstractDialogFactory_Impl::CreateScNamePasteDlg ( vcl::Window * pParent, ScDocShell* pShell ) @@ -933,7 +933,7 @@ VclPtr<AbstractScStringInputDlg> ScAbstractDialogFactory_Impl::CreateScStringInp const OUString& rTitle, const OUString& rEditTitle, const OUString& rDefault, const OString& rHelpId, const OString& rEditHelpId) { - return VclPtr<AbstractScStringInputDlg_Impl>::Create(new ScStringInputDlg(pParent, rTitle, rEditTitle, + return VclPtr<AbstractScStringInputDlg_Impl>::Create(o3tl::make_unique<ScStringInputDlg>(pParent, rTitle, rEditTitle, rDefault, rHelpId, rEditHelpId)); } @@ -943,7 +943,7 @@ VclPtr<AbstractScTabBgColorDlg> ScAbstractDialogFactory_Impl::CreateScTabBgColor const OUString& rTabBgColorNoColorText, const Color& rDefaultColor) { - return VclPtr<AbstractScTabBgColorDlg_Impl>::Create(new ScTabBgColorDlg(pParent, rTitle, rTabBgColorNoColorText, rDefaultColor)); + return VclPtr<AbstractScTabBgColorDlg_Impl>::Create(o3tl::make_unique<ScTabBgColorDlg>(pParent, rTitle, rTabBgColorNoColorText, rDefaultColor)); } VclPtr<AbstractScImportOptionsDlg> ScAbstractDialogFactory_Impl::CreateScImportOptionsDlg ( diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index c1d6aac33a58..600bd6eecc18 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -119,8 +119,8 @@ class AbstractScColRowLabelDlg_Impl : public AbstractScColRowLabelDlg { std::unique_ptr<ScColRowLabelDlg> m_xDlg; public: - explicit AbstractScColRowLabelDlg_Impl(ScColRowLabelDlg* p) - : m_xDlg(p) + explicit AbstractScColRowLabelDlg_Impl(std::unique_ptr<ScColRowLabelDlg> p) + : m_xDlg(std::move(p)) { } virtual short Execute() override; @@ -145,8 +145,8 @@ class AbstractScDataPilotDatabaseDlg_Impl :public AbstractScDataPilotDatabaseDl { std::unique_ptr<ScDataPilotDatabaseDlg> m_xDlg; public: - explicit AbstractScDataPilotDatabaseDlg_Impl(ScDataPilotDatabaseDlg* p) - : m_xDlg(p) + explicit AbstractScDataPilotDatabaseDlg_Impl(std::unique_ptr<ScDataPilotDatabaseDlg> p) + : m_xDlg(std::move(p)) { } virtual short Execute() override; @@ -157,8 +157,8 @@ class AbstractScDataPilotSourceTypeDlg_Impl :public AbstractScDataPilotSourceTy { std::unique_ptr<ScDataPilotSourceTypeDlg> m_xDlg; public: - explicit AbstractScDataPilotSourceTypeDlg_Impl(ScDataPilotSourceTypeDlg* p) - : m_xDlg(p) + explicit AbstractScDataPilotSourceTypeDlg_Impl(std::unique_ptr<ScDataPilotSourceTypeDlg> p) + : m_xDlg(std::move(p)) { } virtual short Execute() override; @@ -173,8 +173,8 @@ class AbstractScDataPilotServiceDlg_Impl : public AbstractScDataPilotServiceDlg { std::unique_ptr<ScDataPilotServiceDlg> m_xDlg; public: - explicit AbstractScDataPilotServiceDlg_Impl(ScDataPilotServiceDlg* p) - : m_xDlg(p) + explicit AbstractScDataPilotServiceDlg_Impl(std::unique_ptr<ScDataPilotServiceDlg> p) + : m_xDlg(std::move(p)) { } virtual short Execute() override; @@ -189,8 +189,8 @@ class AbstractScDeleteCellDlg_Impl : public AbstractScDeleteCellDlg { std::unique_ptr<ScDeleteCellDlg> m_xDlg; public: - explicit AbstractScDeleteCellDlg_Impl(ScDeleteCellDlg* p) - : m_xDlg(p) + explicit AbstractScDeleteCellDlg_Impl(std::unique_ptr<ScDeleteCellDlg> p) + : m_xDlg(std::move(p)) { } virtual short Execute() override; @@ -207,8 +207,8 @@ class AbstractScDeleteContentsDlg_Impl : public AbstractScDeleteContentsDlg { std::unique_ptr<ScDeleteContentsDlg> m_xDlg; public: - explicit AbstractScDeleteContentsDlg_Impl(ScDeleteContentsDlg* p) - : m_xDlg(p) + explicit AbstractScDeleteContentsDlg_Impl(std::unique_ptr<ScDeleteContentsDlg> p) + : m_xDlg(std::move(p)) { } virtual short Execute() override; @@ -220,8 +220,8 @@ class AbstractScFillSeriesDlg_Impl:public AbstractScFillSeriesDlg { std::unique_ptr<ScFillSeriesDlg> m_xDlg; public: - explicit AbstractScFillSeriesDlg_Impl(ScFillSeriesDlg* p) - : m_xDlg(p) + explicit AbstractScFillSeriesDlg_Impl(std::unique_ptr<ScFillSeriesDlg> p) + : m_xDlg(std::move(p)) { } virtual short Execute() override; @@ -239,8 +239,8 @@ class AbstractScGroupDlg_Impl : public AbstractScGroupDlg { std::unique_ptr<ScGroupDlg> m_xDlg; public: - explicit AbstractScGroupDlg_Impl(ScGroupDlg* p) - : m_xDlg(p) + explicit AbstractScGroupDlg_Impl(std::unique_ptr<ScGroupDlg> p) + : m_xDlg(std::move(p)) { } virtual short Execute() override; @@ -251,8 +251,8 @@ class AbstractScInsertCellDlg_Impl : public AbstractScInsertCellDlg { std::unique_ptr<ScInsertCellDlg> m_xDlg; public: - explicit AbstractScInsertCellDlg_Impl(ScInsertCellDlg* p) - : m_xDlg(p) + explicit AbstractScInsertCellDlg_Impl(std::unique_ptr<ScInsertCellDlg> p) + : m_xDlg(std::move(p)) { } virtual short Execute() override; @@ -263,8 +263,8 @@ class AbstractScInsertContentsDlg_Impl : public AbstractScInsertContentsDlg { std::unique_ptr<ScInsertContentsDlg> m_xDlg; public: - explicit AbstractScInsertContentsDlg_Impl(ScInsertContentsDlg* p) - : m_xDlg(p) + explicit AbstractScInsertContentsDlg_Impl(std::unique_ptr<ScInsertContentsDlg> p) + : m_xDlg(std::move(p)) { } virtual short Execute() override; @@ -284,8 +284,8 @@ class AbstractScInsertTableDlg_Impl : public AbstractScInsertTableDlg { std::unique_ptr<ScInsertTableDlg> m_xDlg; public: - explicit AbstractScInsertTableDlg_Impl(ScInsertTableDlg* p) - : m_xDlg(p) + explicit AbstractScInsertTableDlg_Impl(std::unique_ptr<ScInsertTableDlg> p) + : m_xDlg(std::move(p)) { } virtual short Execute() override; @@ -303,8 +303,8 @@ class AbstractScSelEntryDlg_Impl : public AbstractScSelEntryDlg { std::unique_ptr<ScSelEntryDlg> m_xDlg; public: - explicit AbstractScSelEntryDlg_Impl(ScSelEntryDlg* p) - : m_xDlg(p) + explicit AbstractScSelEntryDlg_Impl(std::unique_ptr<ScSelEntryDlg> p) + : m_xDlg(std::move(p)) { } virtual short Execute() override; @@ -315,8 +315,8 @@ class AbstractScLinkedAreaDlg_Impl : public AbstractScLinkedAreaDlg { std::unique_ptr<ScLinkedAreaDlg> m_xDlg; public: - explicit AbstractScLinkedAreaDlg_Impl(ScLinkedAreaDlg* p) - : m_xDlg(p) + explicit AbstractScLinkedAreaDlg_Impl(std::unique_ptr<ScLinkedAreaDlg> p) + : m_xDlg(std::move(p)) { } virtual ~AbstractScLinkedAreaDlg_Impl() override; @@ -335,8 +335,8 @@ class AbstractScMetricInputDlg_Impl : public AbstractScMetricInputDlg { std::unique_ptr<ScMetricInputDlg> m_xDlg; public: - explicit AbstractScMetricInputDlg_Impl(ScMetricInputDlg* p) - : m_xDlg(p) + explicit AbstractScMetricInputDlg_Impl(std::unique_ptr<ScMetricInputDlg> p) + : m_xDlg(std::move(p)) { } virtual short Execute() override; @@ -347,8 +347,8 @@ class AbstractScMoveTableDlg_Impl : public AbstractScMoveTableDlg { std::unique_ptr<ScMoveTableDlg> m_xDlg; public: - explicit AbstractScMoveTableDlg_Impl(ScMoveTableDlg* p) - : m_xDlg(p) + explicit AbstractScMoveTableDlg_Impl(std::unique_ptr<ScMoveTableDlg> p) + : m_xDlg(std::move(p)) { } virtual short Execute() override; @@ -365,8 +365,8 @@ class AbstractScNameCreateDlg_Impl : public AbstractScNameCreateDlg { std::unique_ptr<ScNameCreateDlg> m_xDlg; public: - explicit AbstractScNameCreateDlg_Impl(ScNameCreateDlg* p) - : m_xDlg(p) + explicit AbstractScNameCreateDlg_Impl(std::unique_ptr<ScNameCreateDlg> p) + : m_xDlg(std::move(p)) { } virtual short Execute() override; @@ -457,8 +457,8 @@ class AbstractScSortWarningDlg_Impl : public AbstractScSortWarningDlg protected: std::unique_ptr<ScSortWarningDlg> m_xDlg; public: - explicit AbstractScSortWarningDlg_Impl(ScSortWarningDlg* p) - : m_xDlg(p) + explicit AbstractScSortWarningDlg_Impl(std::unique_ptr<ScSortWarningDlg> p) + : m_xDlg(std::move(p)) { } virtual short Execute() override; @@ -469,8 +469,8 @@ class AbstractScStringInputDlg_Impl : public AbstractScStringInputDlg protected: std::unique_ptr<ScStringInputDlg> m_xDlg; public: - explicit AbstractScStringInputDlg_Impl(ScStringInputDlg* p) - : m_xDlg(p) + explicit AbstractScStringInputDlg_Impl(std::unique_ptr<ScStringInputDlg> p) + : m_xDlg(std::move(p)) { } virtual short Execute() override; @@ -482,8 +482,8 @@ class AbstractScTabBgColorDlg_Impl : public AbstractScTabBgColorDlg protected: std::unique_ptr<ScTabBgColorDlg> m_xDlg; public: - explicit AbstractScTabBgColorDlg_Impl(ScTabBgColorDlg* p) - : m_xDlg(p) + explicit AbstractScTabBgColorDlg_Impl(std::unique_ptr<ScTabBgColorDlg> p) + : m_xDlg(std::move(p)) { } virtual short Execute() override; |