diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-15 09:40:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-15 11:54:15 +0100 |
commit | 24a3d4eee7a01c4296a93708103d267d5473c790 (patch) | |
tree | 075ffe0192289b3fe635ab8c09c934760172bb04 /dbaccess | |
parent | b35f48d806f9e5ec689eda3828f1e4503644873b (diff) |
loplugin:referencecasting in dbaccess
Change-Id: Ib4e751ce4ce83db4af66d2fd969108a86dcd2296
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110891
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
28 files changed, 56 insertions, 58 deletions
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index 62383ecd5479..80e5206b4dd6 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -1504,7 +1504,7 @@ Reference< XIndexAccess > SAL_CALL ORowSet::getParameters( ) // our caller could change our parameters at any time m_bParametersDirty = true; - return m_pParameters.get(); + return m_pParameters; } void ORowSet::approveExecution() @@ -2404,7 +2404,7 @@ void ORowSet::impl_initParametersContainer_nothrow() { OSL_PRECOND( !m_pParameters.is(), "ORowSet::impl_initParametersContainer_nothrow: already initialized the parameters!" ); - m_pParameters = new param::ParameterWrapperContainer( m_xComposer.get() ); + m_pParameters = new param::ParameterWrapperContainer( m_xComposer ); // copy the premature parameters into the final ones size_t nParamCount( std::min( m_pParameters->size(), m_aPrematureParamValues->size() ) ); for ( size_t i=0; i<nParamCount; ++i ) diff --git a/dbaccess/source/core/api/tablecontainer.cxx b/dbaccess/source/core/api/tablecontainer.cxx index 2752de8e853c..e734729f7589 100644 --- a/dbaccess/source/core/api/tablecontainer.cxx +++ b/dbaccess/source/core/api/tablecontainer.cxx @@ -215,7 +215,7 @@ connectivity::sdbcx::ObjectType OTableContainer::createObject(const OUString& _r if ( !m_pTableMediator.is() ) m_pTableMediator = new OContainerMediator( - this, m_xTableDefinitions.get() ); + this, m_xTableDefinitions ); if ( m_pTableMediator.is() ) m_pTableMediator->notifyElementCreated(_rName,xDest); } diff --git a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx index a6110bdb2dab..688f22204c73 100644 --- a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx +++ b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx @@ -219,7 +219,7 @@ OColumn* OComponentDefinition::createColumn(const OUString& _rName) const OComponentDefinition_Impl::const_iterator aFind = rDefinition.find( _rName ); if ( aFind != rDefinition.end() ) { - aFind->second->addPropertyChangeListener(OUString(),m_xColumnPropertyListener.get()); + aFind->second->addPropertyChangeListener(OUString(),m_xColumnPropertyListener); return new OTableColumnWrapper( aFind->second, aFind->second, true ); } OSL_FAIL( "OComponentDefinition::createColumn: is this a valid case?" ); diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx index 6e0e17b360ef..e237d8ea3b88 100644 --- a/dbaccess/source/core/dataaccess/ContentHelper.cxx +++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx @@ -475,7 +475,7 @@ Reference< XRow > OContentHelper::getPropertyValues( const Sequence< Property >& // @@@ Append other properties supported directly. } - return Reference< XRow >( xRow.get() ); + return xRow; } void OContentHelper::notifyPropertiesChange( const Sequence< PropertyChangeEvent >& evt ) const diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx index 0cc2389d78dd..e41e847cc903 100644 --- a/dbaccess/source/core/dataaccess/ModelImpl.cxx +++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx @@ -1203,7 +1203,7 @@ namespace if ( xModify.is() && !_bListen && _inout_rListener.is() ) { - xModify->removeModifyListener( _inout_rListener.get() ); + xModify->removeModifyListener( _inout_rListener ); } if ( _inout_rListener.is() ) @@ -1215,7 +1215,7 @@ namespace if ( xModify.is() && _bListen ) { _inout_rListener = new ::sfx2::DocumentStorageModifyListener( _rDocument, _rMutex ); - xModify->addModifyListener( _inout_rListener.get() ); + xModify->addModifyListener( _inout_rListener ); } } } diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx index 2754a2c7d56e..f9f90b22e679 100644 --- a/dbaccess/source/core/dataaccess/connection.cxx +++ b/dbaccess/source/core/dataaccess/connection.cxx @@ -274,7 +274,7 @@ OConnection::OConnection(ODatabaseSource& _rDB try { Reference< XProxyFactory > xProxyFactory = ProxyFactory::create( m_aContext ); - Reference<XAggregation> xAgg = xProxyFactory->createProxy(_rxMaster.get()); + Reference<XAggregation> xAgg = xProxyFactory->createProxy(_rxMaster); setDelegation(xAgg,m_refCount); OSL_ENSURE(m_xConnection.is(), "OConnection::OConnection : invalid master connection !"); } diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx index b57cd9be52db..4440af82457a 100644 --- a/dbaccess/source/core/dataaccess/databasecontext.cxx +++ b/dbaccess/source/core/dataaccess/databasecontext.cxx @@ -219,7 +219,7 @@ Reference< XInterface > ODatabaseContext::impl_createNewDataSource() ::rtl::Reference pImpl( new ODatabaseModelImpl( m_aContext, *this ) ); Reference< XDataSource > xDataSource( pImpl->getOrCreateDataSource() ); - return xDataSource.get(); + return xDataSource; } Reference< XInterface > SAL_CALL ODatabaseContext::createInstance( ) @@ -374,7 +374,7 @@ Reference< XInterface > ODatabaseContext::loadObjectFromURL(const OUString& _rNa setTransientProperties( _sURL, *pModelImpl ); - return pModelImpl->getOrCreateDataSource().get(); + return pModelImpl->getOrCreateDataSource(); } void ODatabaseContext::appendAtTerminateListener(const ODatabaseModelImpl& _rDataSourceModel) diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx index 206b8e490e6e..1e45eace1f28 100644 --- a/dbaccess/source/core/dataaccess/datasource.cxx +++ b/dbaccess/source/core/dataaccess/datasource.cxx @@ -381,7 +381,7 @@ Reference<XConnection> OSharedConnectionManager::getConnection( const OUString& Reference<XConnection> xRet; if ( aIter->second.xMasterConnection.is() ) { - Reference< XAggregation > xConProxy = m_xProxyFactory->createProxy(aIter->second.xMasterConnection.get()); + Reference< XAggregation > xConProxy = m_xProxyFactory->createProxy(aIter->second.xMasterConnection); xRet = new OSharedConnection(xConProxy); m_aSharedConnection.emplace(xRet,aIter); addEventListener(xRet,aIter); diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx index 4788c4d03d7a..c9ca13c41ebb 100644 --- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx +++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx @@ -265,7 +265,7 @@ namespace if ( eVetoDetails >>= aWrappedError ) throw aWrappedError; - throw WrappedTargetException( xVeto->getReason(), Listener.get(), eVetoDetails ); + throw WrappedTargetException( xVeto->getReason(), Listener, eVetoDetails ); } }; } diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx index 2778a616597e..e3b015adff0d 100644 --- a/dbaccess/source/core/dataaccess/documentdefinition.cxx +++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx @@ -596,7 +596,7 @@ void ODocumentDefinition::impl_onActivateEmbeddedObject_nothrow( const bool i_bR // ensure that we ourself are kept alive as long as the embedded object's frame is // opened - LifetimeCoupler::couple( *this, xFrame.get() ); + LifetimeCoupler::couple( *this, xFrame ); // init the edit view if ( m_bForm && m_bOpenInDesign && !i_bReactivated ) @@ -937,7 +937,7 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons else { // ensure that we ourself are kept alive as long as the document is open - LifetimeCoupler::couple( *this, xModel.get() ); + LifetimeCoupler::couple( *this, xModel ); } if ( !m_bForm && m_pImpl->m_aProps.bAsTemplate && !m_bOpenInDesign ) @@ -1473,7 +1473,7 @@ Sequence< PropertyValue > ODocumentDefinition::fillLoadArgs( const Reference< XC } m_pInterceptor = new OInterceptor( this ); - Reference<XDispatchProviderInterceptor> xInterceptor = m_pInterceptor.get(); + Reference<XDispatchProviderInterceptor> xInterceptor = m_pInterceptor; ::comphelper::NamedValueCollection aEmbeddedDescriptor; aEmbeddedDescriptor.put( "OutplaceDispatchInterceptor", xInterceptor ); @@ -1601,8 +1601,7 @@ void ODocumentDefinition::loadEmbeddedObject( const Reference< XConnection >& i_ { m_pClientHelper = new OEmbeddedClientHelper; } - Reference<XEmbeddedClient> xClient = m_pClientHelper.get(); - m_xEmbeddedObject->setClientSite(xClient); + m_xEmbeddedObject->setClientSite(m_pClientHelper); m_xEmbeddedObject->changeState(EmbedStates::RUNNING); if ( bSetSize ) { @@ -1623,8 +1622,7 @@ void ODocumentDefinition::loadEmbeddedObject( const Reference< XConnection >& i_ { m_pClientHelper = new OEmbeddedClientHelper; } - Reference<XEmbeddedClient> xClient = m_pClientHelper.get(); - m_xEmbeddedObject->setClientSite(xClient); + m_xEmbeddedObject->setClientSite(m_pClientHelper); Sequence< PropertyValue > aEmbeddedObjectDescriptor; Sequence< PropertyValue > aLoadArgs( fillLoadArgs( diff --git a/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx b/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx index 52d6bd6a2b91..e0d32d56971b 100644 --- a/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx +++ b/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx @@ -147,7 +147,7 @@ DataSupplier::queryContent( sal_uInt32 _nIndex ) if ( static_cast<size_t>(_nIndex) < m_pImpl->m_aResults.size() ) { - Reference< XContent > xContent = m_pImpl->m_aResults[ _nIndex ]->xContent.get(); + Reference< XContent > xContent = m_pImpl->m_aResults[ _nIndex ]->xContent; if ( xContent.is() ) { // Already cached. @@ -221,7 +221,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! @@ -257,7 +257,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/dbaccess/source/core/misc/sdbcoretools.cxx b/dbaccess/source/core/misc/sdbcoretools.cxx index 70de1d1944ef..bc830418db39 100644 --- a/dbaccess/source/core/misc/sdbcoretools.cxx +++ b/dbaccess/source/core/misc/sdbcoretools.cxx @@ -80,8 +80,8 @@ namespace dbaccess ::rtl::Reference pRequest( new ::comphelper::OInteractionRequest( _rError ) ); ::rtl::Reference pApprove( new ::comphelper::OInteractionApprove ); - pRequest->addContinuation( pApprove.get() ); - Optional< OUString > aMessage = xStringResolver->getStringFromInformationalRequest( pRequest.get() ); + pRequest->addContinuation( pApprove ); + Optional< OUString > aMessage = xStringResolver->getStringFromInformationalRequest( pRequest ); if ( aMessage.IsPresent ) sDisplayMessage = aMessage.Value; } diff --git a/dbaccess/source/core/recovery/storagexmlstream.cxx b/dbaccess/source/core/recovery/storagexmlstream.cxx index c04eff6f8912..e76dabefec0e 100644 --- a/dbaccess/source/core/recovery/storagexmlstream.cxx +++ b/dbaccess/source/core/recovery/storagexmlstream.cxx @@ -88,7 +88,7 @@ namespace dbaccess { ENSURE_OR_RETURN_VOID( m_pData->xHandler.is(), "no document handler" ); - m_pData->xHandler->startElement( i_rElementName, m_pData->xAttributes.get() ); + m_pData->xHandler->startElement( i_rElementName, m_pData->xAttributes ); m_pData->xAttributes = new SvXMLAttributeList; m_pData->aElements.push( i_rElementName ); } diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.cxx b/dbaccess/source/core/recovery/subcomponentrecovery.cxx index 3549cd647fd8..e47ef6a0e6ce 100644 --- a/dbaccess/source/core/recovery/subcomponentrecovery.cxx +++ b/dbaccess/source/core/recovery/subcomponentrecovery.cxx @@ -382,7 +382,7 @@ namespace dbaccess // find a free sub storage name, and create Yet Another Sub Storage const OUString& rBaseName( lcl_getComponentStorageBaseName( m_eType ) ); - const OUString sStorName = ::dbtools::createUniqueName( xComponentsStorage.get(), rBaseName ); + const OUString sStorName = ::dbtools::createUniqueName( xComponentsStorage, rBaseName ); const Reference< XStorage > xObjectStor( xComponentsStorage->openStorageElement( sStorName, ElementModes::READWRITE ), UNO_SET_THROW ); @@ -560,7 +560,7 @@ namespace dbaccess StorageXMLInputStream aDesignInput( m_rContext, i_rRecoveryStorage, sSettingsStreamName ); ::rtl::Reference< SettingsDocumentHandler > pDocHandler( new SettingsDocumentHandler ); - aDesignInput.import( pDocHandler.get() ); + aDesignInput.import( pDocHandler ); const ::comphelper::NamedValueCollection& rSettings( pDocHandler->getSettings() ); const Any& aCurrentQueryDesign = rSettings.get( sCurrentQueryDesignName ); diff --git a/dbaccess/source/filter/xml/dbloader2.cxx b/dbaccess/source/filter/xml/dbloader2.cxx index 7c2efad43a33..0f0674d2c038 100644 --- a/dbaccess/source/filter/xml/dbloader2.cxx +++ b/dbaccess/source/filter/xml/dbloader2.cxx @@ -448,10 +448,10 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU Reference< XController2 > xController( xModel2->createViewController( sViewName, Sequence< PropertyValue >(), rFrame ), UNO_SET_THROW ); xController->attachModel( xModel ); - xModel->connectController( xController.get() ); - rFrame->setComponent( xController->getComponentWindow(), xController.get() ); + xModel->connectController( xController ); + rFrame->setComponent( xController->getComponentWindow(), xController ); xController->attachFrame( rFrame ); - xModel->setCurrentController( xController.get() ); + xModel->setCurrentController( xController ); bSuccess = true; } diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index 8905536c853d..d2fd90d9ad7d 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -912,11 +912,11 @@ namespace { rtl::Reference pRequest( new ::comphelper::OInteractionRequest( _rException ) ); rtl::Reference pApprove( new ::comphelper::OInteractionApprove ); - pRequest->addContinuation( pApprove.get() ); + pRequest->addContinuation( pApprove ); try { - xHandler->handle( pRequest.get() ); + xHandler->handle( pRequest ); } catch( const Exception& ) { @@ -2033,7 +2033,7 @@ void OApplicationController::renameEntry() Reference<XPropertySet>(xRename,UNO_QUERY_THROW)->getPropertyValue(PROPERTY_NAME) >>= sName; } } - pNameChecker.reset( new HierarchicalNameCheck( xHNames.get(), OUString() ) ); + pNameChecker.reset( new HierarchicalNameCheck( xHNames, OUString() ) ); xDialog.reset(new OSaveAsDlg( getFrameWeld(), getORB(), sName, sLabel, *pNameChecker, SADFlags::TitleRename)); } diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx index dcad078bd59e..09919dda7e61 100644 --- a/dbaccess/source/ui/app/AppControllerDnD.cxx +++ b/dbaccess/source/ui/app/AppControllerDnD.cxx @@ -586,7 +586,7 @@ rtl::Reference<TransferableHelper> OApplicationController::copyObject() { rtl::Reference<ODataClipboard> xExchange(new ODataClipboard); if (copySQLObject(*xExchange)) - return rtl::Reference<TransferableHelper>(xExchange.get()); + return xExchange; break; } case E_FORM: @@ -594,7 +594,7 @@ rtl::Reference<TransferableHelper> OApplicationController::copyObject() { rtl::Reference<svx::OComponentTransferable> xExchange(new svx::OComponentTransferable); if (copyDocObject(*xExchange)) - return rtl::Reference<TransferableHelper>(xExchange.get()); + return xExchange; break; } break; diff --git a/dbaccess/source/ui/app/subcomponentmanager.cxx b/dbaccess/source/ui/app/subcomponentmanager.cxx index f2a81ecf98a1..0fa0d3b45a0c 100644 --- a/dbaccess/source/ui/app/subcomponentmanager.cxx +++ b/dbaccess/source/ui/app/subcomponentmanager.cxx @@ -161,9 +161,9 @@ namespace dbaui Reference< XComponent > operator()( const SubComponentDescriptor &_desc ) const { if ( _desc.xModel.is() ) - return _desc.xModel.get(); + return _desc.xModel; OSL_ENSURE( _desc.xController.is(), "SelectSubComponent::operator(): illegal component!" ); - return _desc.xController.get(); + return _desc.xController; } }; diff --git a/dbaccess/source/ui/browser/dbloader.cxx b/dbaccess/source/ui/browser/dbloader.cxx index 394ae39273b7..3530bf7a6acd 100644 --- a/dbaccess/source/ui/browser/dbloader.cxx +++ b/dbaccess/source/ui/browser/dbloader.cxx @@ -183,8 +183,8 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU { xController.set( ReportDesign::create( m_xContext ) ); xController->attachModel( xReportModel ); - xReportModel->connectController( xController.get() ); - xReportModel->setCurrentController( xController.get() ); + xReportModel->connectController( xController ); + xReportModel->setCurrentController( xController ); } } @@ -255,7 +255,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU { if ( xController.is() && rFrame.is() ) { - rFrame->setComponent( xController->getComponentWindow(), xController.get() ); + rFrame->setComponent( xController->getComponentWindow(), xController ); xController->attachFrame(rFrame); } diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index ba5db408ba2d..1d7a657b453e 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -163,7 +163,7 @@ void SAL_CALL SbaXGridControl::createPeer(const Reference< css::awt::XToolkit > for (auto const& elem : m_aStatusMultiplexer) { if (elem.second.is() && elem.second->getLength()) - xDisp->addStatusListener(elem.second.get(), elem.first); + xDisp->addStatusListener(elem.second, elem.first); } } @@ -192,7 +192,7 @@ void SAL_CALL SbaXGridControl::addStatusListener( const Reference< XStatusListen if ( 1 == xMultiplexer->getLength() ) { // the first external listener for this URL Reference< XDispatch > xDisp( getPeer(), UNO_QUERY ); - xDisp->addStatusListener( xMultiplexer.get(), _rURL ); + xDisp->addStatusListener( xMultiplexer, _rURL ); } else { // already have other listeners for this URL @@ -214,7 +214,7 @@ void SAL_CALL SbaXGridControl::removeStatusListener(const Reference< css::frame: if (getPeer().is() && xMultiplexer->getLength() == 1) { Reference< css::frame::XDispatch > xDisp(getPeer(), UNO_QUERY); - xDisp->removeStatusListener(xMultiplexer.get(), _rURL); + xDisp->removeStatusListener(xMultiplexer, _rURL); } xMultiplexer->removeInterface( _rxListener ); } diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 5bbfe7b298ef..3e934309c2e9 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -3087,7 +3087,7 @@ namespace { DBG_UNHANDLED_EXCEPTION("dbaccess"); } - return xDataSource.get(); + return xDataSource; } } diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx index 11215d56ac93..132a659a776f 100644 --- a/dbaccess/source/ui/control/dbtreelistbox.cxx +++ b/dbaccess/source/ui/control/dbtreelistbox.cxx @@ -379,7 +379,7 @@ IMPL_LINK(TreeListBox, CommandHdl, const CommandEvent&, rCEvt, bool) VclPtr<vcl::Window> xMenuParent = m_pContextMenuProvider->getMenuParent(); rtl::Reference xPopupMenu( new VCLXPopupMenu ); - xMenuController->setPopupMenu( xPopupMenu.get() ); + xMenuController->setPopupMenu( xPopupMenu ); VclPtr<PopupMenu> pContextMenu( static_cast< PopupMenu* >( xPopupMenu->GetMenu() ) ); // allow context menu interception diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx index 5caefbc517ba..01f9182835df 100644 --- a/dbaccess/source/ui/control/sqledit.cxx +++ b/dbaccess/source/ui/control/sqledit.cxx @@ -146,7 +146,7 @@ void SQLEditView::SetDrawingArea(weld::DrawingArea* pDrawingArea) css::uno::Sequence< OUString > s(2); s[0] = "FontHeight"; s[1] = "FontName"; - n->addPropertiesChangeListener(s, m_listener.get()); + n->addPropertiesChangeListener(s, m_listener); m_ColorConfig.AddListener(this); } @@ -158,7 +158,7 @@ SQLEditView::~SQLEditView() n = m_notifier; } if (n.is()) { - n->removePropertiesChangeListener(m_listener.get()); + n->removePropertiesChangeListener(m_listener); } m_ColorConfig.RemoveListener(this); } diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index dfb3cc1db655..6b924e0bb846 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -272,8 +272,8 @@ bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< PropertyVal pAuthenticate->setRememberPassword( RememberAuthentication_SESSION ); // some knittings - pRequest->addContinuation(pAbort.get()); - pRequest->addContinuation(pAuthenticate.get()); + pRequest->addContinuation(pAbort); + pRequest->addContinuation(pAuthenticate); // handle the request try diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 5147ab3271df..f636edd2bc7a 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -1296,7 +1296,7 @@ bool insertHierachyElement(weld::Window* pParent, const Reference< XComponentCon sTargetName = ::dbtools::createUniqueName(xNameAccess,sTargetName); // here we have everything needed to create a new query object ... - HierarchicalNameCheck aNameChecker( _xNames.get(), _sParentFolder ); + HierarchicalNameCheck aNameChecker( _xNames, _sParentFolder ); // ... ehm, except a new name OSaveAsDlg aAskForName(pParent, _rxContext, diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx index 9c92f1301c71..4420b83bf428 100644 --- a/dbaccess/source/ui/misc/WCopyTable.cxx +++ b/dbaccess/source/ui/misc/WCopyTable.cxx @@ -849,12 +849,12 @@ IMPL_LINK_NOARG(OCopyTableWizard, ImplOKHdl, weld::Button&, void) aError.Message = sMsg; ::rtl::Reference xRequest( new ::comphelper::OInteractionRequest( makeAny( aError ) ) ); ::rtl::Reference xYes = new ::comphelper::OInteractionApprove; - xRequest->addContinuation( xYes.get() ); + xRequest->addContinuation( xYes ); xRequest->addContinuation( new ::comphelper::OInteractionDisapprove ); ::rtl::Reference< ::comphelper::OInteractionAbort > xAbort = new ::comphelper::OInteractionAbort; - xRequest->addContinuation( xAbort.get() ); + xRequest->addContinuation( xAbort ); - m_xInteractionHandler->handle( xRequest.get() ); + m_xInteractionHandler->handle( xRequest ); if ( xYes->wasSelected() ) { @@ -1545,7 +1545,7 @@ void OCopyTableWizard::showError(const Any& _aError) try { ::rtl::Reference< ::comphelper::OInteractionRequest > xRequest( new ::comphelper::OInteractionRequest( _aError ) ); - m_xInteractionHandler->handle( xRequest.get() ); + m_xInteractionHandler->handle( xRequest ); } catch( const Exception& ) { diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx index bef75317d17a..a289f185683f 100644 --- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx @@ -52,7 +52,7 @@ OTableWindowListBox::OTableWindowListBox(OTableWindow* pParent) m_xTreeView->connect_visible_range_changed(LINK(this, OTableWindowListBox, ScrollHdl)); m_xHelper.set(new OJoinExchObj); - rtl::Reference<TransferDataContainer> xHelper(m_xHelper.get()); + rtl::Reference<TransferDataContainer> xHelper(m_xHelper); m_xTreeView->enable_drag_source(xHelper, DND_ACTION_LINK); m_xTreeView->connect_drag_begin(LINK(this, OTableWindowListBox, DragBeginHdl)); } diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx index fedcb407f7d7..d128edacb371 100644 --- a/dbaccess/source/ui/uno/copytablewizard.cxx +++ b/dbaccess/source/ui/uno/copytablewizard.cxx @@ -1042,13 +1042,13 @@ bool CopyTableWizard::impl_processCopyError_nothrow( const CopyTableRowEvent& _r ::rtl::Reference< ::comphelper::OInteractionRequest > xRequest( new ::comphelper::OInteractionRequest( makeAny( aError ) ) ); ::rtl::Reference< ::comphelper::OInteractionApprove > xYes = new ::comphelper::OInteractionApprove; - xRequest->addContinuation( xYes.get() ); + xRequest->addContinuation( xYes ); xRequest->addContinuation( new ::comphelper::OInteractionDisapprove ); OSL_ENSURE( m_xInteractionHandler.is(), "CopyTableWizard::impl_processCopyError_nothrow: we always should have an interaction handler!" ); if ( m_xInteractionHandler.is() ) - m_xInteractionHandler->handle( xRequest.get() ); + m_xInteractionHandler->handle( xRequest ); if ( xYes->wasSelected() ) // continue copying @@ -1384,7 +1384,7 @@ void CopyTableWizard::impl_doCopy_nothrow() try { ::rtl::Reference< ::comphelper::OInteractionRequest > xRequest( new ::comphelper::OInteractionRequest( aError ) ); - m_xInteractionHandler->handle( xRequest.get() ); + m_xInteractionHandler->handle( xRequest ); } catch( const Exception& ) { |