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

Noel (via logerrit) logerrit at kemper.freedesktop.org
Sat Feb 27 10:56:06 UTC 2021


 ucb/source/ucp/ftp/ftpcontent.cxx             |    2 +-
 ucb/source/ucp/ftp/ftpresultsetfactory.hxx    |    3 ++-
 ucb/source/ucp/hierarchy/hierarchycontent.cxx |    4 ++--
 ucb/source/ucp/hierarchy/hierarchycontent.hxx |    4 ++--
 ucb/source/ucp/package/pkgcontent.cxx         |    4 ++--
 ucb/source/ucp/package/pkgcontent.hxx         |    4 ++--
 ucb/source/ucp/tdoc/tdoc_content.cxx          |    4 ++--
 ucb/source/ucp/tdoc/tdoc_content.hxx          |    4 ++--
 8 files changed, 15 insertions(+), 14 deletions(-)

New commits:
commit 11cd35b5a2d137de83daaad63edac69916fe5fe1
Author:     Noel <noel.grandin at collabora.co.uk>
AuthorDate: Fri Feb 26 15:22:38 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Feb 27 11:55:28 2021 +0100

    loplugin:refcounting in ucb
    
    Change-Id: I5dd8295648aadafc7dfc73121354aa5f602c2c79
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111633
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx
index bac2579ffa54..7a6716ee06a0 100644
--- a/ucb/source/ucp/ftp/ftpcontent.cxx
+++ b/ucb/source/ucp/ftp/ftpcontent.cxx
@@ -208,7 +208,7 @@ ResultSetFactory::ResultSetFactory(const Reference<XComponentContext >&  rxConte
 }
 
 
-ResultSetBase* ResultSetFactory::createResultSet()
+rtl::Reference<ResultSetBase> ResultSetFactory::createResultSet()
 {
     return new ResultSetI(m_xContext,
                           m_xProvider,
diff --git a/ucb/source/ucp/ftp/ftpresultsetfactory.hxx b/ucb/source/ucp/ftp/ftpresultsetfactory.hxx
index 24102b870d5f..e230a04d316b 100644
--- a/ucb/source/ucp/ftp/ftpresultsetfactory.hxx
+++ b/ucb/source/ucp/ftp/ftpresultsetfactory.hxx
@@ -29,6 +29,7 @@
 #include "ftpdirp.hxx"
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include <com/sun/star/beans/Property.hpp>
+#include <rtl/ref.hxx>
 #include <vector>
 
 namespace ftp {
@@ -43,7 +44,7 @@ public:
                       const css::uno::Sequence<css::beans::Property>& seq,
                       const std::vector<FTPDirentry>& dirvec);
 
-    ResultSetBase* createResultSet();
+    rtl::Reference<ResultSetBase> createResultSet();
 private:
     css::uno::Reference< css::uno::XComponentContext >        m_xContext;
     css::uno::Reference< css::ucb::XContentProvider >         m_xProvider;
diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
index e3cc82594f37..5afd6cc5bb3b 100644
--- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
@@ -80,7 +80,7 @@ using namespace hierarchy_ucp;
 
 
 // static ( "virtual" ctor )
-HierarchyContent* HierarchyContent::create(
+rtl::Reference<HierarchyContent> HierarchyContent::create(
             const uno::Reference< uno::XComponentContext >& rxContext,
             HierarchyContentProvider* pProvider,
             const uno::Reference< ucb::XContentIdentifier >& Identifier )
@@ -95,7 +95,7 @@ HierarchyContent* HierarchyContent::create(
 
 
 // static ( "virtual" ctor )
-HierarchyContent* HierarchyContent::create(
+rtl::Reference<HierarchyContent> HierarchyContent::create(
             const uno::Reference< uno::XComponentContext >& rxContext,
             HierarchyContentProvider* pProvider,
             const uno::Reference< ucb::XContentIdentifier >& Identifier,
diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.hxx b/ucb/source/ucp/hierarchy/hierarchycontent.hxx
index 3e17ac35e643..c830c5772b77 100644
--- a/ucb/source/ucp/hierarchy/hierarchycontent.hxx
+++ b/ucb/source/ucp/hierarchy/hierarchycontent.hxx
@@ -183,14 +183,14 @@ private:
 
 public:
     // Create existing content. Fail, if not already exists.
-    static HierarchyContent* create(
+    static rtl::Reference<HierarchyContent> create(
             const css::uno::Reference< css::uno::XComponentContext >& rxContext,
             HierarchyContentProvider* pProvider,
             const css::uno::Reference<
                 css::ucb::XContentIdentifier >& Identifier );
 
     // Create new content. Fail, if already exists.
-    static HierarchyContent* create(
+    static rtl::Reference<HierarchyContent> create(
             const css::uno::Reference< css::uno::XComponentContext >& rxContext,
             HierarchyContentProvider* pProvider,
             const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier,
diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx
index a3944757ec48..dfda010f2f63 100644
--- a/ucb/source/ucp/package/pkgcontent.cxx
+++ b/ucb/source/ucp/package/pkgcontent.cxx
@@ -140,7 +140,7 @@ ContentProperties::getCreatableContentsInfo( PackageUri const & rUri ) const
 
 
 // static ( "virtual" ctor )
-Content* Content::create(
+rtl::Reference<Content> Content::create(
             const uno::Reference< uno::XComponentContext >& rxContext,
             ContentProvider* pProvider,
             const uno::Reference< ucb::XContentIdentifier >& Identifier )
@@ -192,7 +192,7 @@ Content* Content::create(
 
 
 // static ( "virtual" ctor )
-Content* Content::create(
+rtl::Reference<Content> Content::create(
             const uno::Reference< uno::XComponentContext >& rxContext,
             ContentProvider* pProvider,
             const uno::Reference< ucb::XContentIdentifier >& Identifier,
diff --git a/ucb/source/ucp/package/pkgcontent.hxx b/ucb/source/ucp/package/pkgcontent.hxx
index 5bbd483ff175..fe5f67f535b8 100644
--- a/ucb/source/ucp/package/pkgcontent.hxx
+++ b/ucb/source/ucp/package/pkgcontent.hxx
@@ -200,13 +200,13 @@ private:
 
 public:
     // Create existing content. Fail, if not already exists.
-    static Content* create(
+    static rtl::Reference<Content> create(
             const css::uno::Reference< css::uno::XComponentContext >& rxContext,
             ContentProvider* pProvider,
             const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier );
 
     // Create new content. Fail, if already exists.
-    static Content* create(
+    static rtl::Reference<Content> create(
             const css::uno::Reference< css::uno::XComponentContext >& rxContext,
             ContentProvider* pProvider,
             const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier,
diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx
index 03c0300b4b09..34c6ea2b31df 100644
--- a/ucb/source/ucp/tdoc/tdoc_content.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_content.cxx
@@ -103,7 +103,7 @@ static ContentType lcl_getContentType( std::u16string_view rType )
 
 
 // static ( "virtual" ctor )
-Content* Content::create(
+rtl::Reference<Content> Content::create(
             const uno::Reference< uno::XComponentContext >& rxContext,
             ContentProvider* pProvider,
             const uno::Reference< ucb::XContentIdentifier >& Identifier )
@@ -120,7 +120,7 @@ Content* Content::create(
 
 
 // static ( "virtual" ctor )
-Content* Content::create(
+rtl::Reference<Content> Content::create(
             const uno::Reference< uno::XComponentContext >& rxContext,
             ContentProvider* pProvider,
             const uno::Reference< ucb::XContentIdentifier >& Identifier,
diff --git a/ucb/source/ucp/tdoc/tdoc_content.hxx b/ucb/source/ucp/tdoc/tdoc_content.hxx
index c8cf050f655c..08bedba75cff 100644
--- a/ucb/source/ucp/tdoc/tdoc_content.hxx
+++ b/ucb/source/ucp/tdoc/tdoc_content.hxx
@@ -201,13 +201,13 @@ private:
 
 public:
     // Create existing content. Fail, if not already exists.
-    static Content* create(
+    static rtl::Reference<Content> create(
             const css::uno::Reference< css::uno::XComponentContext >& rxContext,
             ContentProvider* pProvider,
             const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier );
 
     // Create new content. Fail, if already exists.
-    static Content* create(
+    static rtl::Reference<Content> create(
             const css::uno::Reference< css::uno::XComponentContext >& rxContext,
             ContentProvider* pProvider,
             const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier,


More information about the Libreoffice-commits mailing list