diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-26 16:02:39 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-31 06:25:45 +0000 |
commit | 0b23eec200c8c12db5778405df44f4bf8e38e4ad (patch) | |
tree | ee45856fe1781195c51f63835024865f283cdab8 /ucb | |
parent | 88c03cd07a171e05c7fb4dcade8baa28e7c5a770 (diff) |
teach refcounting clang plugin about uno::Reference
uno::Reference is only allowed to used with classes that have a
::static_type member.
So convert all those places to rtl::Reference.
Maybe we need some LIBO_INTERNAL_ONLY constructors on rtl::Reference and
uno::Reference to make this a little smoother?
Change-Id: Icdcb35d71ca40a87b1dc474096776412adbfc7e3
Reviewed-on: https://gerrit.libreoffice.org/25516
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/cmis/cmis_content.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/gio/gio_datasupplier.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/gio/gio_datasupplier.hxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/gio/gio_mount.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/gio/gio_resultset.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/gio/gio_resultset.hxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_storage.cxx | 2 |
7 files changed, 9 insertions, 9 deletions
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index b097a6f4e0ca..c8958d8c437f 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -539,7 +539,7 @@ namespace cmis aParentUrl.removeSegment( ); OUString sParentUrl = aParentUrl.GetMainURL( INetURLObject::NO_DECODE ); - uno::Reference<Content> xParent( new Content(m_xContext, m_pProvider, new ucbhelper::ContentIdentifier( sParentUrl )) ); + rtl::Reference<Content> xParent( new Content(m_xContext, m_pProvider, new ucbhelper::ContentIdentifier( sParentUrl )) ); libcmis::FolderPtr pParentFolder = boost::dynamic_pointer_cast< libcmis::Folder >( xParent->getObject( xEnv ) ); if ( pParentFolder ) { diff --git a/ucb/source/ucp/gio/gio_datasupplier.cxx b/ucb/source/ucp/gio/gio_datasupplier.cxx index 38999de1b902..4e85e210ec7f 100644 --- a/ucb/source/ucp/gio/gio_datasupplier.cxx +++ b/ucb/source/ucp/gio/gio_datasupplier.cxx @@ -37,7 +37,7 @@ namespace gio typedef std::vector< ResultListEntry* > ResultList; -DataSupplier::DataSupplier( const uno::Reference< ::gio::Content >& rContent, sal_Int32 nOpenMode ) +DataSupplier::DataSupplier( const rtl::Reference< ::gio::Content >& rContent, sal_Int32 nOpenMode ) : mxContent(rContent), mnOpenMode(nOpenMode), mbCountFinal(false) { } diff --git a/ucb/source/ucp/gio/gio_datasupplier.hxx b/ucb/source/ucp/gio/gio_datasupplier.hxx index 5f442f38ef4e..8d1d87c94d8d 100644 --- a/ucb/source/ucp/gio/gio_datasupplier.hxx +++ b/ucb/source/ucp/gio/gio_datasupplier.hxx @@ -53,13 +53,13 @@ typedef std::vector< ResultListEntry* > ResultList; class DataSupplier : public ucbhelper::ResultSetDataSupplier { private: - css::uno::Reference< ::gio::Content > mxContent; + rtl::Reference< ::gio::Content > mxContent; sal_Int32 mnOpenMode; bool mbCountFinal; bool getData(); ResultList maResults; public: - DataSupplier( const css::uno::Reference< Content >& rContent, sal_Int32 nOpenMode ); + DataSupplier( const rtl::Reference< Content >& rContent, sal_Int32 nOpenMode ); virtual ~DataSupplier(); virtual OUString queryContentIdentifierString( sal_uInt32 nIndex ) override; diff --git a/ucb/source/ucp/gio/gio_mount.cxx b/ucb/source/ucp/gio/gio_mount.cxx index b9e898719d34..75aa07e7061f 100644 --- a/ucb/source/ucp/gio/gio_mount.cxx +++ b/ucb/source/ucp/gio/gio_mount.cxx @@ -117,7 +117,7 @@ static void ooo_mount_operation_ask_password (GMountOperation *op, if (default_domain) aDomain = OUString(default_domain, strlen(default_domain), RTL_TEXTENCODING_UTF8); - uno::Reference< ucbhelper::SimpleAuthenticationRequest > xRequest + rtl::Reference< ucbhelper::SimpleAuthenticationRequest > xRequest = new ucbhelper::SimpleAuthenticationRequest (OUString() /* FIXME: provide URL here */, aHostName, eDomain, aDomain, eUserName, aUserName, ePassword, aPassword); xIH->handle( xRequest.get() ); diff --git a/ucb/source/ucp/gio/gio_resultset.cxx b/ucb/source/ucp/gio/gio_resultset.cxx index eeb0c4ab5ab8..48ab47026032 100644 --- a/ucb/source/ucp/gio/gio_resultset.cxx +++ b/ucb/source/ucp/gio/gio_resultset.cxx @@ -29,7 +29,7 @@ using namespace gio; DynamicResultSet::DynamicResultSet( const Reference< XComponentContext >& rxContext, - const Reference< Content >& rxContent, + const rtl::Reference< Content >& rxContent, const OpenCommandArgument2& rCommand, const Reference< XCommandEnvironment >& rxEnv ) : ResultSetImplHelper( rxContext, rCommand ), diff --git a/ucb/source/ucp/gio/gio_resultset.hxx b/ucb/source/ucp/gio/gio_resultset.hxx index 543b38455b54..99dc6c6c6666 100644 --- a/ucb/source/ucp/gio/gio_resultset.hxx +++ b/ucb/source/ucp/gio/gio_resultset.hxx @@ -28,7 +28,7 @@ namespace gio class DynamicResultSet : public ::ucbhelper::ResultSetImplHelper { - css::uno::Reference< Content > m_xContent; + rtl::Reference< Content > m_xContent; css::uno::Reference< css::ucb::XCommandEnvironment > m_xEnv; private: @@ -38,7 +38,7 @@ namespace gio public: DynamicResultSet( const css::uno::Reference< css::uno::XComponentContext >& rxContext, - const css::uno::Reference< Content >& rxContent, + const rtl::Reference< Content >& rxContent, const css::ucb::OpenCommandArgument2& rCommand, const css::uno::Reference< css::ucb::XCommandEnvironment >& rxEnv ); }; diff --git a/ucb/source/ucp/tdoc/tdoc_storage.cxx b/ucb/source/ucp/tdoc/tdoc_storage.cxx index 1356d93e6997..8bba2180a939 100644 --- a/ucb/source/ucp/tdoc/tdoc_storage.cxx +++ b/ucb/source/ucp/tdoc/tdoc_storage.cxx @@ -174,7 +174,7 @@ StorageElementFactory::createStorage( const OUString & rUri, bool bWritable = ( ( eMode == READ_WRITE_NOCREATE ) || ( eMode == READ_WRITE_CREATE ) ); - uno::Reference< Storage > xElement( + rtl::Reference< Storage > xElement( new Storage( m_xContext, this, aUriKey, xParentStorage, xStorage ) ); aIt = m_aMap.insert( |