diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-23 11:19:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-23 13:23:56 +0200 |
commit | dd23ec329faddd74691595405e977baa8ac7f0a3 (patch) | |
tree | 215599a7db4f2acaaac9c8839370796f2107340c /fpicker/source | |
parent | 524c4c61ebd985ab6721d8c7e5f8f85f273883cb (diff) |
loplugin:makeshared in fpicker
Change-Id: I121b6f6d2e7d3fa17caa4e3b3ac38eea0388507b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92747
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'fpicker/source')
-rw-r--r-- | fpicker/source/office/OfficeFilePicker.cxx | 8 | ||||
-rw-r--r-- | fpicker/source/office/OfficeFilePicker.hxx | 4 | ||||
-rw-r--r-- | fpicker/source/office/OfficeFolderPicker.cxx | 4 | ||||
-rw-r--r-- | fpicker/source/office/OfficeFolderPicker.hxx | 2 | ||||
-rw-r--r-- | fpicker/source/office/commonpicker.hxx | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx index 5475a5002561..d849326119f4 100644 --- a/fpicker/source/office/OfficeFilePicker.cxx +++ b/fpicker/source/office/OfficeFilePicker.cxx @@ -431,11 +431,11 @@ sal_Int16 SvtFilePicker::implExecutePicker( ) return nRet; } -std::unique_ptr<SvtFileDialog_Base> SvtFilePicker::implCreateDialog( weld::Window* pParent ) +std::shared_ptr<SvtFileDialog_Base> SvtFilePicker::implCreateDialog( weld::Window* pParent ) { PickerFlags nBits = getPickerFlags(); - auto dialog = std::make_unique<SvtFileDialog>(pParent, nBits); + auto dialog = std::make_shared<SvtFileDialog>(pParent, nBits); // Set StandardDir if present if ( !m_aStandardDir.isEmpty()) @@ -1067,11 +1067,11 @@ SvtRemoteFilePicker::SvtRemoteFilePicker() { } -std::unique_ptr<SvtFileDialog_Base> SvtRemoteFilePicker::implCreateDialog(weld::Window* pParent) +std::shared_ptr<SvtFileDialog_Base> SvtRemoteFilePicker::implCreateDialog(weld::Window* pParent) { PickerFlags nBits = getPickerFlags(); - auto dialog = std::make_unique<RemoteFilesDialog>(pParent, nBits); + auto dialog = std::make_shared<RemoteFilesDialog>(pParent, nBits); // Set StandardDir if present if ( !m_aStandardDir.isEmpty()) diff --git a/fpicker/source/office/OfficeFilePicker.hxx b/fpicker/source/office/OfficeFilePicker.hxx index e682581c5372..7e9dc4f70520 100644 --- a/fpicker/source/office/OfficeFilePicker.hxx +++ b/fpicker/source/office/OfficeFilePicker.hxx @@ -203,7 +203,7 @@ protected: // OCommonPicker overridables - virtual std::unique_ptr<SvtFileDialog_Base> implCreateDialog( weld::Window* pParent ) override; + virtual std::shared_ptr<SvtFileDialog_Base> implCreateDialog( weld::Window* pParent ) override; virtual sal_Int16 implExecutePicker( ) override; virtual bool implHandleInitializationArgument( const OUString& _rName, @@ -231,7 +231,7 @@ class SvtRemoteFilePicker : public SvtFilePicker public: SvtRemoteFilePicker(); - virtual std::unique_ptr<SvtFileDialog_Base> implCreateDialog( weld::Window* pParent ) override; + virtual std::shared_ptr<SvtFileDialog_Base> implCreateDialog( weld::Window* pParent ) override; // disambiguate XInterface diff --git a/fpicker/source/office/OfficeFolderPicker.cxx b/fpicker/source/office/OfficeFolderPicker.cxx index db06eb421c76..424bf708cdb0 100644 --- a/fpicker/source/office/OfficeFolderPicker.cxx +++ b/fpicker/source/office/OfficeFolderPicker.cxx @@ -68,9 +68,9 @@ void SAL_CALL SvtFolderPicker::startExecuteModal( const Reference< css::ui::dial }); } -std::unique_ptr<SvtFileDialog_Base> SvtFolderPicker::implCreateDialog( weld::Window* pParent ) +std::shared_ptr<SvtFileDialog_Base> SvtFolderPicker::implCreateDialog( weld::Window* pParent ) { - return std::make_unique<SvtFileDialog>(pParent, PickerFlags::PathDialog); + return std::make_shared<SvtFileDialog>(pParent, PickerFlags::PathDialog); } sal_Int16 SvtFolderPicker::implExecutePicker( ) diff --git a/fpicker/source/office/OfficeFolderPicker.hxx b/fpicker/source/office/OfficeFolderPicker.hxx index a9f3606b1050..acf9bd149b5e 100644 --- a/fpicker/source/office/OfficeFolderPicker.hxx +++ b/fpicker/source/office/OfficeFolderPicker.hxx @@ -93,7 +93,7 @@ protected: // OCommonPicker overridables - virtual std::unique_ptr<SvtFileDialog_Base> implCreateDialog( weld::Window* pParent ) override; + virtual std::shared_ptr<SvtFileDialog_Base> implCreateDialog( weld::Window* pParent ) override; virtual sal_Int16 implExecutePicker( ) override; }; diff --git a/fpicker/source/office/commonpicker.hxx b/fpicker/source/office/commonpicker.hxx index e4c5e7125f38..e68de462d9a4 100644 --- a/fpicker/source/office/commonpicker.hxx +++ b/fpicker/source/office/commonpicker.hxx @@ -87,7 +87,7 @@ namespace svt // overridables // will be called with locked SolarMutex - virtual std::unique_ptr<SvtFileDialog_Base> implCreateDialog( weld::Window* pParent ) = 0; + virtual std::shared_ptr<SvtFileDialog_Base> implCreateDialog( weld::Window* pParent ) = 0; virtual sal_Int16 implExecutePicker( ) = 0; // do NOT override XExecutableDialog::execute! We need to do some stuff there ourself ... |