[Libreoffice-commits] core.git: fpicker/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Thu Apr 23 11:24:41 UTC 2020


 fpicker/source/office/OfficeFilePicker.cxx   |    8 ++++----
 fpicker/source/office/OfficeFilePicker.hxx   |    4 ++--
 fpicker/source/office/OfficeFolderPicker.cxx |    4 ++--
 fpicker/source/office/OfficeFolderPicker.hxx |    2 +-
 fpicker/source/office/commonpicker.hxx       |    2 +-
 5 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit dd23ec329faddd74691595405e977baa8ac7f0a3
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Apr 23 11:19:18 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Apr 23 13:23:56 2020 +0200

    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 at collabora.co.uk>

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 ...
 


More information about the Libreoffice-commits mailing list