diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-15 09:41:31 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-15 13:36:07 +0100 |
commit | 96be489048ca97bfc07d4aa252675b76dfca73a2 (patch) | |
tree | ba8300a10d40a107e14112163535dfc34cb23532 /ucb | |
parent | 08b82fa3ee915666ef8b60aeb670c38f64553630 (diff) |
loplugin:referencecasting in ucb
Change-Id: I7531ea30e8d141dce1d1bc27ffbca3fcf28d0ef5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110892
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb')
37 files changed, 79 insertions, 82 deletions
diff --git a/ucb/source/cacher/dynamicresultsetwrapper.cxx b/ucb/source/cacher/dynamicresultsetwrapper.cxx index 3aa765da316a..274aff18dc6a 100644 --- a/ucb/source/cacher/dynamicresultsetwrapper.cxx +++ b/ucb/source/cacher/dynamicresultsetwrapper.cxx @@ -297,7 +297,7 @@ void SAL_CALL DynamicResultSetWrapper::setSource( const Reference< XInterface > xMyListenerImpl = m_xMyListenerImpl.get(); } if( xListener.is() ) - xSourceDynamic->setListener( m_xMyListenerImpl.get() ); + xSourceDynamic->setListener( m_xMyListenerImpl ); else if( bStatic ) { Reference< XComponent > xSourceComponent( Source, UNO_QUERY ); diff --git a/ucb/source/core/FileAccess.cxx b/ucb/source/core/FileAccess.cxx index 4a816618471e..139c05cb500a 100644 --- a/ucb/source/core/FileAccess.cxx +++ b/ucb/source/core/FileAccess.cxx @@ -253,8 +253,8 @@ void OFileAccess::transferImpl( const OUString& rSource, } - ucbhelper::Content aDestPath( aDestURL, mxEnvironment.get(), comphelper::getProcessComponentContext() ); - ucbhelper::Content aSrc ( aSourceURL, mxEnvironment.get(), comphelper::getProcessComponentContext() ); + ucbhelper::Content aDestPath( aDestURL, mxEnvironment, comphelper::getProcessComponentContext() ); + ucbhelper::Content aSrc ( aSourceURL, mxEnvironment, comphelper::getProcessComponentContext() ); try { @@ -285,7 +285,7 @@ void OFileAccess::kill( const OUString& FileURL ) { // SfxContentHelper::Kill INetURLObject aDeleteObj( FileURL, INetProtocol::File ); - ucbhelper::Content aCnt( aDeleteObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment.get(), comphelper::getProcessComponentContext() ); + ucbhelper::Content aCnt( aDeleteObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() ); try { aCnt.executeCommand( "delete", makeAny( true ) ); @@ -302,7 +302,7 @@ sal_Bool OFileAccess::isFolder( const OUString& FileURL ) try { INetURLObject aURLObj( FileURL, INetProtocol::File ); - ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment.get(), comphelper::getProcessComponentContext() ); + ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() ); bRet = aCnt.isFolder(); } catch (const Exception &) {} @@ -312,7 +312,7 @@ sal_Bool OFileAccess::isFolder( const OUString& FileURL ) sal_Bool OFileAccess::isReadOnly( const OUString& FileURL ) { INetURLObject aURLObj( FileURL, INetProtocol::File ); - ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment.get(), comphelper::getProcessComponentContext() ); + ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() ); Any aRetAny = aCnt.getPropertyValue("IsReadOnly"); bool bRet = false; aRetAny >>= bRet; @@ -322,7 +322,7 @@ sal_Bool OFileAccess::isReadOnly( const OUString& FileURL ) void OFileAccess::setReadOnly( const OUString& FileURL, sal_Bool bReadOnly ) { INetURLObject aURLObj( FileURL, INetProtocol::File ); - ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment.get(), comphelper::getProcessComponentContext() ); + ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() ); aCnt.setPropertyValue("IsReadOnly", Any(bReadOnly) ); } @@ -347,7 +347,7 @@ void OFileAccess::createFolder( const OUString& NewFolderURL ) } } - ucbhelper::Content aCnt( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment.get(), comphelper::getProcessComponentContext() ); + ucbhelper::Content aCnt( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() ); const Sequence< ContentInfo > aInfo = aCnt.queryCreatableContentsInfo(); @@ -393,7 +393,7 @@ sal_Int32 OFileAccess::getSize( const OUString& FileURL ) sal_Int32 nSize = 0; sal_Int64 nTemp = 0; INetURLObject aObj( FileURL, INetProtocol::File ); - ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment.get(), comphelper::getProcessComponentContext() ); + ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() ); aCnt.getPropertyValue( "Size" ) >>= nTemp; nSize = static_cast<sal_Int32>(nTemp); return nSize; @@ -402,7 +402,7 @@ sal_Int32 OFileAccess::getSize( const OUString& FileURL ) OUString OFileAccess::getContentType( const OUString& FileURL ) { INetURLObject aObj( FileURL, INetProtocol::File ); - ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment.get(), comphelper::getProcessComponentContext() ); + ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() ); Reference< XContent > xContent = aCnt.get(); OUString aTypeStr = xContent->getContentType(); @@ -427,7 +427,7 @@ Sequence< OUString > OFileAccess::getFolderContents( const OUString& FolderURL, std::vector<OUString> aFiles; INetURLObject aFolderObj( FolderURL, INetProtocol::File ); - ucbhelper::Content aCnt( aFolderObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment.get(), comphelper::getProcessComponentContext() ); + ucbhelper::Content aCnt( aFolderObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() ); Reference< XResultSet > xResultSet; Sequence< OUString > aProps(0); @@ -479,7 +479,7 @@ Reference< XInputStream > OFileAccess::openFileRead( const OUString& FileURL ) { Reference< XInputStream > xRet; INetURLObject aObj( FileURL, INetProtocol::File ); - ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment.get(), comphelper::getProcessComponentContext() ); + ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() ); Reference<XActiveDataSink> xSink = new OActiveDataSink; @@ -520,7 +520,7 @@ Reference< XStream > OFileAccess::openFileReadWrite( const OUString& FileURL ) aCmdArg <<= aArg; INetURLObject aFileObj( FileURL, INetProtocol::File ); - ucbhelper::Content aCnt( aFileObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment.get(), comphelper::getProcessComponentContext() ); + ucbhelper::Content aCnt( aFileObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() ); // Be silent... Reference< XInteractionHandler > xIH; @@ -579,7 +579,7 @@ bool OFileAccess::createNewFile( const OUString & rParentURL, const OUString & rTitle, const Reference< XInputStream >& data ) { - ucbhelper::Content aParentCnt( rParentURL, mxEnvironment.get(), comphelper::getProcessComponentContext() ); + ucbhelper::Content aParentCnt( rParentURL, mxEnvironment, comphelper::getProcessComponentContext() ); const Sequence< ContentInfo > aInfo = aParentCnt.queryCreatableContentsInfo(); @@ -632,7 +632,7 @@ void SAL_CALL OFileAccess::writeFile( const OUString& FileURL, try { ucbhelper::Content aCnt( - aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment.get(), + aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() ); try @@ -678,7 +678,7 @@ void SAL_CALL OFileAccess::writeFile( const OUString& FileURL, sal_Bool OFileAccess::isHidden( const OUString& FileURL ) { INetURLObject aURLObj( FileURL, INetProtocol::File ); - ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment.get(), comphelper::getProcessComponentContext() ); + ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() ); Any aRetAny = aCnt.getPropertyValue("IsHidden"); bool bRet = false; aRetAny >>= bRet; @@ -688,7 +688,7 @@ sal_Bool OFileAccess::isHidden( const OUString& FileURL ) void OFileAccess::setHidden( const OUString& FileURL, sal_Bool bHidden ) { INetURLObject aURLObj( FileURL, INetProtocol::File ); - ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment.get(), comphelper::getProcessComponentContext() ); + ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() ); aCnt.setPropertyValue("IsHidden", Any(bHidden) ); } diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx index 3eb032d2263c..819f3a05c155 100644 --- a/ucb/source/core/ucbcmds.cxx +++ b/ucb/source/core/ucbcmds.cxx @@ -366,7 +366,7 @@ NameClashContinuation interactiveNameClashResolve( if ( xIH.is() ) { - xIH->handle( xRequest.get() ); + xIH->handle( xRequest ); rtl::Reference< ucbhelper::InteractionContinuation > xSelection( xRequest->getSelection() ); diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx index 24936d416c4e..d20378247fbd 100644 --- a/ucb/source/core/ucbstore.cxx +++ b/ucb/source/core/ucbstore.cxx @@ -1173,7 +1173,7 @@ Reference< XPropertySetInfo > SAL_CALL PersistentPropertySet::getPropertySetInfo { m_pImpl->m_pInfo = new PropertySetInfo_Impl( this ); } - return Reference< XPropertySetInfo >( m_pImpl->m_pInfo.get() ); + return m_pImpl->m_pInfo; } @@ -1355,7 +1355,7 @@ void SAL_CALL PersistentPropertySet::removeVetoableChangeListener( // virtual Reference< XPropertySetRegistry > SAL_CALL PersistentPropertySet::getRegistry() { - return Reference< XPropertySetRegistry >( m_pImpl->m_pCreator.get() ); + return m_pImpl->m_pCreator; } diff --git a/ucb/source/sorter/sortdynres.cxx b/ucb/source/sorter/sortdynres.cxx index d2455ca11ec0..a75da8ab4bdf 100644 --- a/ucb/source/sorter/sortdynres.cxx +++ b/ucb/source/sorter/sortdynres.cxx @@ -157,7 +157,7 @@ SortedDynamicResultSet::getStaticResultSet() mxOne->Initialize( maOptions, mxCompFac ); } - return mxOne.get(); + return mxOne; } @@ -174,7 +174,7 @@ SortedDynamicResultSet::setListener( const Reference< XDynamicResultSetListener mxListener = Listener; if ( mxOriginal.is() ) - mxOriginal->setListener( mxOwnListener.get() ); + mxOriginal->setListener( mxOwnListener ); } diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx index bbf471a8b317..5f9504f2843b 100644 --- a/ucb/source/sorter/sortresult.cxx +++ b/ucb/source/sorter/sortresult.cxx @@ -755,7 +755,7 @@ SortedResultSet::getPropertySetInfo() mpPropSetInfo = new SRSPropertySetInfo(); } - return Reference< XPropertySetInfo >( mpPropSetInfo.get() ); + return mpPropSetInfo; } diff --git a/ucb/source/ucp/cmis/auth_provider.cxx b/ucb/source/ucp/cmis/auth_provider.cxx index dd7b4f9f1e3c..5c2ded12986e 100644 --- a/ucb/source/ucp/cmis/auth_provider.cxx +++ b/ucb/source/ucp/cmis/auth_provider.cxx @@ -37,7 +37,7 @@ namespace cmis STD_TO_OUSTR( username ), STD_TO_OUSTR( password ), false, false ); - xIH->handle( xRequest.get() ); + xIH->handle( xRequest ); rtl::Reference< ucbhelper::InteractionContinuation > xSelection = xRequest->getSelection(); @@ -99,7 +99,7 @@ namespace cmis "http://localhost/LibreOffice?code=YOUR_CODE", url_oustr ); - xIH->handle( xRequest.get() ); + xIH->handle( xRequest ); rtl::Reference< ucbhelper::InteractionContinuation > xSelection = xRequest->getSelection(); @@ -139,7 +139,7 @@ namespace cmis = new ucbhelper::AuthenticationFallbackRequest ( "PIN:", "" ); - xIH->handle( xRequest.get() ); + xIH->handle( xRequest ); rtl::Reference< ucbhelper::InteractionContinuation > xSelection = xRequest->getSelection(); diff --git a/ucb/source/ucp/cmis/certvalidation_handler.cxx b/ucb/source/ucp/cmis/certvalidation_handler.cxx index cbb0848867de..ae488697a7eb 100644 --- a/ucb/source/ucp/cmis/certvalidation_handler.cxx +++ b/ucb/source/ucp/cmis/certvalidation_handler.cxx @@ -103,7 +103,7 @@ namespace cmis rtl::Reference< ucbhelper::SimpleCertificateValidationRequest > xRequest( new ucbhelper::SimpleCertificateValidationRequest( sal_Int32( certValidity ), xCert, m_sHostname ) ); - xIH->handle( xRequest.get() ); + xIH->handle( xRequest ); rtl::Reference< ucbhelper::InteractionContinuation > xSelection = xRequest->getSelection(); diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index 60bd54b722ec..23c3f625de19 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -947,7 +947,7 @@ namespace cmis } } - return uno::Reference< sdbc::XRow >( xRow.get() ); + return xRow; } uno::Any Content::open(const ucb::OpenCommandArgument2 & rOpenCommand, diff --git a/ucb/source/ucp/cmis/cmis_provider.cxx b/ucb/source/ucp/cmis/cmis_provider.cxx index b6f207b62cd3..bb84412bb97e 100644 --- a/ucb/source/ucp/cmis/cmis_provider.cxx +++ b/ucb/source/ucp/cmis/cmis_provider.cxx @@ -30,7 +30,7 @@ ContentProvider::queryContent( osl::MutexGuard aGuard( m_aMutex ); // Check, if a content with given id already exists... - uno::Reference< ucb::XContent > xContent = queryExistingContent( Identifier ).get(); + uno::Reference< ucb::XContent > xContent = queryExistingContent( Identifier ); if ( xContent.is() ) return xContent; diff --git a/ucb/source/ucp/cmis/cmis_repo_content.cxx b/ucb/source/ucp/cmis/cmis_repo_content.cxx index d98da53d5e2d..507cade426ad 100644 --- a/ucb/source/ucp/cmis/cmis_repo_content.cxx +++ b/ucb/source/ucp/cmis/cmis_repo_content.cxx @@ -111,7 +111,7 @@ namespace cmis } } - return uno::Reference< sdbc::XRow >( xRow.get() ); + return xRow; } void RepoContent::getRepositories( const uno::Reference< ucb::XCommandEnvironment > & xEnv ) diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx index 86d265db5535..a2d01b06181d 100644 --- a/ucb/source/ucp/ext/ucpext_content.cxx +++ b/ucb/source/ucp/ext/ucpext_content.cxx @@ -421,7 +421,7 @@ namespace ucb::ucp::ext true ); } - return Reference< XRow >( xRow.get() ); + return xRow; } @@ -472,7 +472,7 @@ namespace ucb::ucp::ext { xValueRow->appendObject( aPropertyNames[i], *value ); } - return xValueRow.get(); + return xValueRow; } default: diff --git a/ucb/source/ucp/ext/ucpext_datasupplier.cxx b/ucb/source/ucp/ext/ucpext_datasupplier.cxx index 7de5fb09aa3d..06c379a6e2af 100644 --- a/ucb/source/ucp/ext/ucpext_datasupplier.cxx +++ b/ucb/source/ucp/ext/ucpext_datasupplier.cxx @@ -228,7 +228,7 @@ namespace ucb::ucp::ext ::rtl::Reference< Content > pContent( m_pImpl->m_aResults[ i_nIndex ].pContent ); if ( pContent.is() ) - return pContent.get(); + return pContent; Reference< XContentIdentifier > xId( queryContentIdentifier( i_nIndex ) ); if ( xId.is() ) @@ -239,7 +239,7 @@ namespace ucb::ucp::ext pContent.set( dynamic_cast< Content* >( xContent.get() ) ); OSL_ENSURE( pContent.is() || !xContent.is(), "DataSupplier::queryContent: invalid content implementation!" ); m_pImpl->m_aResults[ i_nIndex ].pContent = pContent; - return pContent.get(); + return pContent; } catch ( const IllegalIdentifierException& ) diff --git a/ucb/source/ucp/ext/ucpext_provider.cxx b/ucb/source/ucp/ext/ucpext_provider.cxx index cd8141e8fe0a..d0a7993fbbf8 100644 --- a/ucb/source/ucp/ext/ucpext_provider.cxx +++ b/ucb/source/ucp/ext/ucpext_provider.cxx @@ -144,7 +144,7 @@ namespace ucb::ucp::ext ::osl::MutexGuard aGuard( m_aMutex ); // check if a content with given id already exists... - Reference< XContent > xContent( queryExistingContent( xNormalizedIdentifier ).get() ); + Reference< XContent > xContent( queryExistingContent( xNormalizedIdentifier ) ); if ( xContent.is() ) return xContent; diff --git a/ucb/source/ucp/ext/ucpext_resultset.cxx b/ucb/source/ucp/ext/ucpext_resultset.cxx index b810d2956149..2ccbded5567c 100644 --- a/ucb/source/ucp/ext/ucpext_resultset.cxx +++ b/ucb/source/ucp/ext/ucpext_resultset.cxx @@ -55,7 +55,7 @@ namespace ucb::ucp::ext m_xResultSet1 = new ::ucbhelper::ResultSet( m_xContext, m_aCommand.Properties, - pDataSupplier.get(), + pDataSupplier, m_xEnvironment ); pDataSupplier->fetchData(); diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx index 4a8a36a35516..1a95350105b7 100644 --- a/ucb/source/ucp/file/filtask.cxx +++ b/ucb/source/ucp/file/filtask.cxx @@ -725,7 +725,7 @@ TaskManager::open( sal_Int32 CommandId, pInputStream.clear(); } - return uno::Reference< io::XInputStream >( pInputStream.get() ); + return pInputStream; } @@ -756,7 +756,7 @@ TaskManager::open_rw( sal_Int32 CommandId, pStream.clear(); } - return uno::Reference< io::XStream >( pStream.get() ); + return pStream; } @@ -790,7 +790,7 @@ TaskManager::ls( sal_Int32 CommandId, p.clear(); } - return uno::Reference< XDynamicResultSet > ( p.get() ); + return p; } diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx index e655c6cbe162..bac2579ffa54 100644 --- a/ucb/source/ucp/ftp/ftpcontent.cxx +++ b/ucb/source/ucp/ftp/ftpcontent.cxx @@ -273,10 +273,10 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand, Environment->getInteractionHandler(); if( xInteractionHandler.is()) { - xInteractionHandler->handle(p.get()); + xInteractionHandler->handle(p); Reference<XInterface> xSelection( - p->getSelection().get()); + p->getSelection()); if(Reference<XInteractionRetry>( xSelection,UNO_QUERY).is()) @@ -771,7 +771,7 @@ Reference< XRow > FTPContent::getPropertyValues( xRow->appendVoid(rProp); } - return Reference<XRow>(xRow.get()); + return xRow; } diff --git a/ucb/source/ucp/ftp/ftpcontentprovider.cxx b/ucb/source/ucp/ftp/ftpcontentprovider.cxx index 3f10357c395f..9af1b97441e2 100644 --- a/ucb/source/ucp/ftp/ftpcontentprovider.cxx +++ b/ucb/source/ucp/ftp/ftpcontentprovider.cxx @@ -121,7 +121,7 @@ Reference<XContent> SAL_CALL FTPContentProvider::queryContent( const Reference< XContentIdentifier >& xCanonicId) { // Check, if a content with given id already exists... - Reference<XContent> xContent = queryExistingContent(xCanonicId).get(); + Reference<XContent> xContent = queryExistingContent(xCanonicId); if(xContent.is()) return xContent; diff --git a/ucb/source/ucp/ftp/ftpresultsetI.cxx b/ucb/source/ucp/ftp/ftpresultsetI.cxx index 838850229708..0da84408d562 100644 --- a/ucb/source/ucp/ftp/ftpresultsetI.cxx +++ b/ucb/source/ucp/ftp/ftpresultsetI.cxx @@ -84,7 +84,7 @@ ResultSetI::ResultSetI(const Reference<XComponentContext>& rxContext, else xRow->appendVoid(rProp); } - m_aItems[n].set(xRow.get()); + m_aItems[n].set(xRow); } } diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx index f67ab4738abc..5a5bf05a32cd 100644 --- a/ucb/source/ucp/gio/gio_content.cxx +++ b/ucb/source/ucp/gio/gio_content.cxx @@ -546,7 +546,7 @@ css::uno::Reference< css::sdbc::XRow > Content::getPropertyValues( } } - return css::uno::Reference< css::sdbc::XRow >( xRow.get() ); + return xRow; } static css::lang::IllegalAccessException diff --git a/ucb/source/ucp/gio/gio_mount.cxx b/ucb/source/ucp/gio/gio_mount.cxx index b78817c670e2..dfbb9a0310e5 100644 --- a/ucb/source/ucp/gio/gio_mount.cxx +++ b/ucb/source/ucp/gio/gio_mount.cxx @@ -146,7 +146,7 @@ static void ooo_mount_operation_ask_password (GMountOperation *op, rtl::Reference< ucbhelper::SimpleAuthenticationRequest > xRequest = new ucbhelper::SimpleAuthenticationRequest (OUString() /* FIXME: provide URL here */, OUString(), eDomain, aDomain, eUserName, aUserName, ePassword, aPassword); - xIH->handle( xRequest.get() ); + xIH->handle( xRequest ); rtl::Reference< ucbhelper::InteractionContinuation > xSelection = xRequest->getSelection(); diff --git a/ucb/source/ucp/gio/gio_provider.cxx b/ucb/source/ucp/gio/gio_provider.cxx index 224ab0eacf88..4ac5ae6fffa6 100644 --- a/ucb/source/ucp/gio/gio_provider.cxx +++ b/ucb/source/ucp/gio/gio_provider.cxx @@ -37,7 +37,7 @@ ContentProvider::queryContent( osl::MutexGuard aGuard( m_aMutex ); // Check, if a content with given id already exists... - css::uno::Reference< css::ucb::XContent > xContent = queryExistingContent( Identifier ).get(); + css::uno::Reference< css::ucb::XContent > xContent = queryExistingContent( Identifier ); if ( xContent.is() ) return xContent; diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx index ca0f8c7198b3..e3cc82594f37 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx @@ -964,7 +964,7 @@ uno::Reference< sdbc::XRow > HierarchyContent::getPropertyValues( xRow->appendPropertySet( xSet ); } - return uno::Reference< sdbc::XRow >( xRow.get() ); + return xRow; } diff --git a/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx b/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx index 2415714e7132..9a4cae13d2b3 100644 --- a/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx +++ b/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx @@ -252,7 +252,7 @@ bool HierarchyResultSetDataSupplier::getResult( sal_uInt32 nIndex ) if ( !bFound ) m_pImpl->m_bCountFinal = true; - rtl::Reference< ::ucbhelper::ResultSet > xResultSet = getResultSet().get(); + rtl::Reference< ::ucbhelper::ResultSet > xResultSet = getResultSet(); if ( xResultSet.is() ) { // Callbacks follow! @@ -289,7 +289,7 @@ sal_uInt32 HierarchyResultSetDataSupplier::totalCount() m_pImpl->m_bCountFinal = true; - rtl::Reference< ::ucbhelper::ResultSet > xResultSet = getResultSet().get(); + rtl::Reference< ::ucbhelper::ResultSet > xResultSet = getResultSet(); if ( xResultSet.is() ) { // Callbacks follow! diff --git a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx index c041a50a9f84..4922802f55fd 100644 --- a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx +++ b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx @@ -138,7 +138,7 @@ HierarchyContentProvider::queryContent( // Check, if a content with given id already exists... uno::Reference< ucb::XContent > xContent - = queryExistingContent( xCanonicId ).get(); + = queryExistingContent( xCanonicId ); if ( xContent.is() ) return xContent; diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx index 6b6cb88d4e48..a3944757ec48 100644 --- a/ucb/source/ucp/package/pkgcontent.cxx +++ b/ucb/source/ucp/package/pkgcontent.cxx @@ -705,7 +705,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( for ( const beans::Property& rProp : rProperties ) xRow->appendVoid( rProp ); - return uno::Reference< sdbc::XRow >( xRow.get() ); + return xRow; } } @@ -924,7 +924,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( xRow->appendPropertySet( xSet ); } - return uno::Reference< sdbc::XRow >( xRow.get() ); + return xRow; } @@ -935,9 +935,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( return getPropertyValues( m_xContext, rProperties, m_aProps, - rtl::Reference< - ::ucbhelper::ContentProviderImplHelper >( - m_xProvider.get() ), + m_xProvider, m_xIdentifier->getContentIdentifier() ); } diff --git a/ucb/source/ucp/package/pkgdatasupplier.cxx b/ucb/source/ucp/package/pkgdatasupplier.cxx index 4b097d021f59..bcf5c1764067 100644 --- a/ucb/source/ucp/package/pkgdatasupplier.cxx +++ b/ucb/source/ucp/package/pkgdatasupplier.cxx @@ -266,7 +266,7 @@ bool DataSupplier::getResult( sal_uInt32 nIndex ) if ( !bFound ) m_pImpl->m_bCountFinal = true; - rtl::Reference< ::ucbhelper::ResultSet > xResultSet = getResultSet().get(); + rtl::Reference< ::ucbhelper::ResultSet > xResultSet = getResultSet(); if ( xResultSet.is() ) { // Callbacks follow! @@ -334,7 +334,7 @@ sal_uInt32 DataSupplier::totalCount() m_pImpl->m_bCountFinal = true; - rtl::Reference< ::ucbhelper::ResultSet > xResultSet = getResultSet().get(); + rtl::Reference< ::ucbhelper::ResultSet > xResultSet = getResultSet(); if ( xResultSet.is() ) { // Callbacks follow! diff --git a/ucb/source/ucp/package/pkgprovider.cxx b/ucb/source/ucp/package/pkgprovider.cxx index 30f8e47955b5..40ab9f635210 100644 --- a/ucb/source/ucp/package/pkgprovider.cxx +++ b/ucb/source/ucp/package/pkgprovider.cxx @@ -180,7 +180,7 @@ uno::Reference< ucb::XContent > SAL_CALL ContentProvider::queryContent( // Check, if a content with given id already exists... uno::Reference< ucb::XContent > xContent - = queryExistingContent( xId ).get(); + = queryExistingContent( xId ); if ( xContent.is() ) return xContent; @@ -243,7 +243,7 @@ ContentProvider::createPackage( const PackageUri & rURI ) rtl::Reference< Package> xPackage = new Package( rURL, xNameAccess, this ); (*m_pPackages)[ rURL ] = xPackage.get(); - return xPackage.get(); + return xPackage; } diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx index 4ecc6583dfa8..03c0300b4b09 100644 --- a/ucb/source/ucp/tdoc/tdoc_content.cxx +++ b/ucb/source/ucp/tdoc/tdoc_content.cxx @@ -846,7 +846,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( for ( const beans::Property& rProp : rProperties ) xRow->appendVoid( rProp ); - return uno::Reference< sdbc::XRow >( xRow.get() ); + return xRow; } } @@ -1022,7 +1022,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( xRow->appendPropertySet( xSet ); } - return uno::Reference< sdbc::XRow >( xRow.get() ); + return xRow; } @@ -2607,7 +2607,7 @@ static OUString obtainPassword( = xEnv->getInteractionHandler(); if ( xIH.is() ) { - xIH->handle( xRequest.get() ); + xIH->handle( xRequest ); rtl::Reference< ucbhelper::InteractionContinuation > xSelection = xRequest->getSelection(); diff --git a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx b/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx index 332da1096a2e..c7bad1e70ffa 100644 --- a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx +++ b/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx @@ -236,7 +236,7 @@ bool ResultSetDataSupplier::getResult( sal_uInt32 nIndex ) if ( !bFound ) m_pImpl->m_bCountFinal = true; - rtl::Reference< ::ucbhelper::ResultSet > xResultSet = getResultSet().get(); + rtl::Reference< ::ucbhelper::ResultSet > xResultSet = getResultSet(); if ( xResultSet.is() ) { // Callbacks follow! @@ -287,7 +287,7 @@ sal_uInt32 ResultSetDataSupplier::totalCount() m_pImpl->m_bCountFinal = true; - rtl::Reference< ::ucbhelper::ResultSet > xResultSet = getResultSet().get(); + rtl::Reference< ::ucbhelper::ResultSet > xResultSet = getResultSet(); if ( xResultSet.is() ) { // Callbacks follow! diff --git a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx index 53bc31a683ad..af66cb8a4b25 100644 --- a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx +++ b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx @@ -214,7 +214,7 @@ void SAL_CALL OfficeDocumentsManager::documentEventOccured( "OnLoadFinished/OnCreate event: got no close broadcaster!" ); if ( xCloseBroadcaster.is() ) - xCloseBroadcaster->addCloseListener(m_xDocCloseListener.get()); + xCloseBroadcaster->addCloseListener(m_xDocCloseListener); // Propagate document closure. OSL_ENSURE( m_pDocEventListener, @@ -274,7 +274,7 @@ void SAL_CALL OfficeDocumentsManager::documentEventOccured( OSL_ENSURE( xCloseBroadcaster.is(), "OnUnload event: got no XCloseBroadcaster from XModel" ); if ( xCloseBroadcaster.is() ) - xCloseBroadcaster->removeCloseListener(m_xDocCloseListener.get()); + xCloseBroadcaster->removeCloseListener(m_xDocCloseListener); } } } @@ -457,7 +457,7 @@ void OfficeDocumentsManager::buildDocumentsList() "buildDocumentsList: got no close broadcaster!" ); if ( xCloseBroadcaster.is() ) - xCloseBroadcaster->addCloseListener(m_xDocCloseListener.get()); + xCloseBroadcaster->addCloseListener(m_xDocCloseListener); } } } diff --git a/ucb/source/ucp/tdoc/tdoc_provider.cxx b/ucb/source/ucp/tdoc/tdoc_provider.cxx index d7ee3f59aa96..f468bbf12fc4 100644 --- a/ucb/source/ucp/tdoc/tdoc_provider.cxx +++ b/ucb/source/ucp/tdoc/tdoc_provider.cxx @@ -149,7 +149,7 @@ ContentProvider::queryContent( // Check, if a content with given id already exists... uno::Reference< ucb::XContent > xContent - = queryExistingContent( xCanonicId ).get(); + = queryExistingContent( xCanonicId ); if ( !xContent.is() ) { @@ -206,7 +206,7 @@ ContentProvider::createDocumentContent( // Check, if a content with given id already exists... uno::Reference< ucb::XContent > xContent - = queryExistingContent( xId ).get(); + = queryExistingContent( xId ); if ( !xContent.is() ) { diff --git a/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx b/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx index 97205dd14a81..4a239bd80d07 100644 --- a/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx +++ b/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx @@ -73,7 +73,7 @@ int DAVAuthListener_Impl::authenticate( = new ucbhelper::SimpleAuthenticationRequest( m_aURL, inHostName, inRealm, inoutUserName, outPassWord, bCanUseSystemCredentials ); - xIH->handle( xRequest.get() ); + xIH->handle( xRequest ); rtl::Reference< ucbhelper::InteractionContinuation > xSelection = xRequest->getSelection(); diff --git a/ucb/source/ucp/webdav-neon/NeonSession.cxx b/ucb/source/ucp/webdav-neon/NeonSession.cxx index b914f41cd903..3c5dbf0398ca 100644 --- a/ucb/source/ucp/webdav-neon/NeonSession.cxx +++ b/ucb/source/ucp/webdav-neon/NeonSession.cxx @@ -505,7 +505,7 @@ int NeonSession::CertificationNotify(const ne_ssl_certificate *cert) rtl::Reference< ucbhelper::SimpleCertificateValidationRequest > xRequest( new ucbhelper::SimpleCertificateValidationRequest( static_cast<sal_Int32>(certValidity), xEECert, getHostName() ) ); - xIH->handle( xRequest.get() ); + xIH->handle( xRequest ); rtl::Reference< ucbhelper::InteractionContinuation > xSelection = xRequest->getSelection(); @@ -1210,7 +1210,7 @@ NeonSession::GET( const OUString & inPath, HandleError( theRetVal, inPath, rEnv ); - return uno::Reference< io::XInputStream >( xInputStream.get() ); + return xInputStream; } void NeonSession::GET( const OUString & inPath, @@ -1258,7 +1258,7 @@ NeonSession::GET( const OUString & inPath, HandleError( theRetVal, inPath, rEnv ); - return uno::Reference< io::XInputStream >( xInputStream.get() ); + return xInputStream; } void NeonSession::GET0( const OUString & inPath, @@ -1363,7 +1363,7 @@ NeonSession::POST( const OUString & inPath, HandleError( theRetVal, inPath, rEnv ); - return uno::Reference< io::XInputStream >( xInputStream.get() ); + return xInputStream; } void NeonSession::POST( const OUString & inPath, diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx index e73547af427b..472366469c76 100644 --- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx +++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx @@ -1247,7 +1247,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( xRow->appendPropertySet( xSet ); } - return uno::Reference< sdbc::XRow >( xRow.get() ); + return xRow; } namespace { @@ -1307,7 +1307,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( aUnescapedTitle = NeonUri::unescape( m_aEscapedTitle ); xIdentifier.set( m_xIdentifier ); - xProvider.set( m_xProvider.get() ); + xProvider = m_xProvider; xResAccess.reset(new DAVResourceAccess(*m_xResAccess)); // First, ask cache... @@ -2480,7 +2480,7 @@ void Content::insert( = new ucbhelper::SimpleInteractionRequest( aExAsAny, ContinuationFlags::Approve | ContinuationFlags::Disapprove ); - xIH->handle( xRequest.get() ); + xIH->handle( xRequest ); const ContinuationFlags nResp = xRequest->getResponse(); @@ -2677,7 +2677,7 @@ void Content::transfer( osl::Guard< osl::Mutex > aGuard( m_aMutex ); xIdentifier.set( m_xIdentifier ); - xProvider.set( m_xProvider.get() ); + xProvider = m_xProvider; xResAccess.reset(new DAVResourceAccess(*m_xResAccess)); } diff --git a/ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx b/ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx index b87d987752fb..6acadda6a6fd 100644 --- a/ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx +++ b/ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx @@ -295,8 +295,7 @@ uno::Reference< sdbc::XRow > DataSupplier::queryPropertyValues( m_pImpl->m_xContext, getResultSet()->getProperties(), *(m_pImpl->m_Results[ nIndex ]->pData), - rtl::Reference< ::ucbhelper::ContentProviderImplHelper >( - m_pImpl->m_xContent->getProvider().get() ), + m_pImpl->m_xContent->getProvider(), queryContentIdentifierString( nIndex ) ); m_pImpl->m_Results[ nIndex ]->xRow = xRow; return xRow; diff --git a/ucb/source/ucp/webdav-neon/webdavprovider.cxx b/ucb/source/ucp/webdav-neon/webdavprovider.cxx index e63fd5c9d40a..55d8619a94aa 100644 --- a/ucb/source/ucp/webdav-neon/webdavprovider.cxx +++ b/ucb/source/ucp/webdav-neon/webdavprovider.cxx @@ -156,7 +156,7 @@ ContentProvider::queryContent( // Check, if a content with given id already exists... uno::Reference< ucb::XContent > xContent - = queryExistingContent( xCanonicId ).get(); + = queryExistingContent( xCanonicId ); if ( xContent.is() ) return xContent; |