diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-30 11:29:18 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-10-30 13:52:29 +0200 |
commit | e10570565f02959c8b713d1e17f5810424ddb63d (patch) | |
tree | 04822382005d039c2981ab8093776284b7a80770 /dbaccess | |
parent | 76cfcea67284c246e04efce836327ec0dd2bfb66 (diff) |
use uno::Reference::set method instead of assignment
Change-Id: I3d45914e349a4268204af84b95b53ccce7b9d544
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/preparedstatement.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/api/statement.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/api/tablecontainer.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/sdbtools/connection/connectiondependent.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppControllerGen.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/brwctrlr.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/dsbrowserDnD.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/exsrcbrw.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/sbagrid.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/DbAdminImpl.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/paramdialog.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/UITools.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/datasourceconnector.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/ui/uno/dbinteraction.cxx | 2 |
15 files changed, 21 insertions, 21 deletions
diff --git a/dbaccess/source/core/api/preparedstatement.cxx b/dbaccess/source/core/api/preparedstatement.cxx index 28912f229f40..83dd22fb5eab 100644 --- a/dbaccess/source/core/api/preparedstatement.cxx +++ b/dbaccess/source/core/api/preparedstatement.cxx @@ -49,7 +49,7 @@ OPreparedStatement::OPreparedStatement(const Reference< XConnection > & _xConn, const Reference< XInterface > & _xStatement) :OStatementBase(_xConn, _xStatement) { - m_xAggregateAsParameters = Reference< XParameters >( m_xAggregateAsSet, UNO_QUERY_THROW ); + m_xAggregateAsParameters.set( m_xAggregateAsSet, UNO_QUERY_THROW ); Reference<XDatabaseMetaData> xMeta = _xConn->getMetaData(); m_pColumns = new OColumns(*this, m_aMutex, xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers(),::std::vector< OUString>(), NULL,NULL); diff --git a/dbaccess/source/core/api/statement.cxx b/dbaccess/source/core/api/statement.cxx index fa2d6ce5e8ef..dd251b7ae5c1 100644 --- a/dbaccess/source/core/api/statement.cxx +++ b/dbaccess/source/core/api/statement.cxx @@ -53,7 +53,7 @@ OStatementBase::OStatementBase(const Reference< XConnection > & _xConn, { OSL_ENSURE(_xStatement.is() ,"Statement is NULL!"); m_xAggregateAsSet.set(_xStatement,UNO_QUERY); - m_xAggregateAsCancellable = Reference< css::util::XCancellable > (m_xAggregateAsSet, UNO_QUERY); + m_xAggregateAsCancellable.set(m_xAggregateAsSet, UNO_QUERY); } OStatementBase::~OStatementBase() diff --git a/dbaccess/source/core/api/tablecontainer.cxx b/dbaccess/source/core/api/tablecontainer.cxx index 85ee5ef1e2f8..cf45d53176dc 100644 --- a/dbaccess/source/core/api/tablecontainer.cxx +++ b/dbaccess/source/core/api/tablecontainer.cxx @@ -196,7 +196,9 @@ connectivity::sdbcx::ObjectType OTableContainer::createObject(const OUString& _r Sequence< OUString> aTypeFilter; getAllTableTypeFilter( aTypeFilter ); - Reference< XResultSet > xRes = m_xMetaData.is() ? m_xMetaData->getTables(aCatalog,sSchema,sTable,aTypeFilter) : Reference< XResultSet >(); + Reference< XResultSet > xRes; + if ( m_xMetaData.is() ) + xRes = m_xMetaData->getTables(aCatalog,sSchema,sTable,aTypeFilter); if(xRes.is() && xRes->next()) { Reference< XRow > xRow(xRes,UNO_QUERY); @@ -242,7 +244,7 @@ Reference< XPropertySet > OTableContainer::createDescriptor() Reference<XDataDescriptorFactory> xDataFactory(m_xMasterContainer,UNO_QUERY); if ( xDataFactory.is() && m_xMetaData.is() ) { - xMasterColumnsSup = Reference< XColumnsSupplier >( xDataFactory->createDataDescriptor(), UNO_QUERY ); + xMasterColumnsSup.set( xDataFactory->createDataDescriptor(), UNO_QUERY ); ODBTableDecorator* pTable = new ODBTableDecorator( m_xConnection, xMasterColumnsSup, ::dbtools::getNumberFormats( m_xConnection ) ,NULL); xRet = pTable; pTable->construct(); diff --git a/dbaccess/source/sdbtools/connection/connectiondependent.hxx b/dbaccess/source/sdbtools/connection/connectiondependent.hxx index 28a294a07caf..845a52c0669a 100644 --- a/dbaccess/source/sdbtools/connection/connectiondependent.hxx +++ b/dbaccess/source/sdbtools/connection/connectiondependent.hxx @@ -90,7 +90,7 @@ namespace sdbtools inline bool acquireConnection( GuardAccess ) { - m_xConnection = css::uno::Reference< css::sdbc::XConnection >(m_aConnection); + m_xConnection.set(m_aConnection); return m_xConnection.is(); } inline void releaseConnection( GuardAccess ) diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx index 195864b288b7..9516a481eb14 100644 --- a/dbaccess/source/ui/app/AppControllerGen.cxx +++ b/dbaccess/source/ui/app/AppControllerGen.cxx @@ -209,7 +209,7 @@ void OApplicationController::openDialog( const OUString& _sServiceName ) // create the dialog Reference< XExecutableDialog > xAdminDialog; - xAdminDialog = Reference< XExecutableDialog >( + xAdminDialog.set( getORB()->getServiceManager()->createInstanceWithArgumentsAndContext(_sServiceName, aArgs, getORB()), UNO_QUERY); diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index d998829bff98..a26c9ac4db5d 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -691,8 +691,7 @@ void SbaXDataBrowserController::initFormatter() if(xSupplier.is()) { // create a new formatter - m_xFormatter = Reference< util::XNumberFormatter > ( - util::NumberFormatter::create(getORB()), UNO_QUERY_THROW); + m_xFormatter.set(util::NumberFormatter::create(getORB()), UNO_QUERY_THROW); m_xFormatter->attachNumberFormatsSupplier(xSupplier); } else // clear the formatter @@ -2229,7 +2228,7 @@ bool SbaXDataBrowserController::CommitCurrent() // zunaechst das Control fragen ob es das IFace unterstuetzt Reference< css::form::XBoundComponent > xBoundControl(xActiveControl, UNO_QUERY); if (!xBoundControl.is()) - xBoundControl = Reference< css::form::XBoundComponent > (xActiveControl->getModel(), UNO_QUERY); + xBoundControl.set(xActiveControl->getModel(), UNO_QUERY); if (xBoundControl.is() && !xBoundControl->commit()) return false; } diff --git a/dbaccess/source/ui/browser/dsbrowserDnD.cxx b/dbaccess/source/ui/browser/dsbrowserDnD.cxx index a9e44ac48fc3..b249306b1bc1 100644 --- a/dbaccess/source/ui/browser/dsbrowserDnD.cxx +++ b/dbaccess/source/ui/browser/dsbrowserDnD.cxx @@ -106,7 +106,8 @@ namespace dbaui { Reference<XChild> xChild(xConnection,UNO_QUERY); Reference<XStorable> xStore; - xStore = Reference<XStorable>( xChild.is() ? getDataSourceOrModel(xChild->getParent()) : Reference<XInterface>(),UNO_QUERY ); + if ( xChild.is() ) + xStore.set( getDataSourceOrModel(xChild->getParent()), UNO_QUERY ); // check for the concrete type if ( xStore.is() && !xStore->isReadonly() && ::std::any_of(_rFlavors.begin(),_rFlavors.end(),TAppSupportedSotFunctor(E_TABLE,true)) ) return DND_ACTION_COPY; diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx index 004faa65f972..901752e6ed4b 100644 --- a/dbaccess/source/ui/browser/exsrcbrw.cxx +++ b/dbaccess/source/ui/browser/exsrcbrw.cxx @@ -222,7 +222,7 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const css::util::URL& aURL, con { if ( (pArguments->Name == "MasterForm") && (pArguments->Value.getValueTypeClass() == TypeClass_INTERFACE) ) { - xMasterForm = Reference< XRowSet > (*static_cast<Reference< XInterface > const *>(pArguments->Value.getValue()), UNO_QUERY); + xMasterForm.set(*static_cast<Reference< XInterface > const *>(pArguments->Value.getValue()), UNO_QUERY); break; } } diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index acd4550739be..638dd5ff9c42 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -1437,7 +1437,7 @@ Reference< XPropertySet > SbaGridControl::getDataSource() const Reference< XChild > xColumns(GetPeer()->getColumns(), UNO_QUERY); Reference< XPropertySet > xDataSource; if (xColumns.is()) - xReturn = Reference< XPropertySet > (xColumns->getParent(), UNO_QUERY); + xReturn.set(xColumns->getParent(), UNO_QUERY); return xReturn; } diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index c1cdc7f14cdd..29b056f9da7f 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -245,7 +245,7 @@ bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< PropertyVal if ( !xHandler.is() ) { // instantiate the default SDB interaction handler - xHandler = Reference< XInteractionHandler >( task::InteractionHandler::createWithParent(m_xContext, 0), UNO_QUERY ); + xHandler.set( task::InteractionHandler::createWithParent(m_xContext, 0), UNO_QUERY ); } OUString sName = pName ? pName->GetValue() : OUString(); diff --git a/dbaccess/source/ui/dlg/paramdialog.cxx b/dbaccess/source/ui/dlg/paramdialog.cxx index 7a3769df11d1..c1c0e77453c8 100644 --- a/dbaccess/source/ui/dlg/paramdialog.cxx +++ b/dbaccess/source/ui/dlg/paramdialog.cxx @@ -68,7 +68,7 @@ namespace dbaui set_height_request(200); if (rxContext.is()) - m_xFormatter = Reference< XNumberFormatter>( NumberFormatter::create( rxContext ), UNO_QUERY_THROW); + m_xFormatter.set( NumberFormatter::create( rxContext ), UNO_QUERY_THROW); else { OSL_FAIL("OParameterDialog::OParameterDialog: need a service factory!"); } diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 423fb3bd22b8..20704cab1133 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -1501,8 +1501,7 @@ Reference< XNumberFormatter > getNumberFormatter(const Reference< XConnection >& if ( xSupplier.is() ) { // create a new formatter - xFormatter = Reference< util::XNumberFormatter > ( - util::NumberFormatter::create( _rxContext ), UNO_QUERY_THROW); + xFormatter.set(util::NumberFormatter::create( _rxContext ), UNO_QUERY_THROW); xFormatter->attachNumberFormatsSupplier(xSupplier); } } diff --git a/dbaccess/source/ui/misc/datasourceconnector.cxx b/dbaccess/source/ui/misc/datasourceconnector.cxx index 8ed65da45918..7c2b8015b6ba 100644 --- a/dbaccess/source/ui/misc/datasourceconnector.cxx +++ b/dbaccess/source/ui/misc/datasourceconnector.cxx @@ -130,7 +130,7 @@ namespace dbaui if ( !xHandler.is() ) { // instantiate the default SDB interaction handler - xHandler = Reference< XInteractionHandler >( InteractionHandler::createWithParent(m_xContext, 0), UNO_QUERY ); + xHandler.set( InteractionHandler::createWithParent(m_xContext, 0), UNO_QUERY ); } xConnection = xConnectionCompletion->connectWithCompletion(xHandler); diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx index 343b840738f4..35cb35e1cd9b 100644 --- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx +++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx @@ -258,7 +258,7 @@ namespace dbaui Reference< XChild > xConnAsChild( m_pImpl->m_xConnection, UNO_QUERY ); Reference< XDataSource > xDS; if ( xConnAsChild.is() ) - xDS = Reference< XDataSource >( xConnAsChild->getParent(), UNO_QUERY ); + xDS.set( xConnAsChild->getParent(), UNO_QUERY ); // (take the indirection through XDataSource to ensure we have a correct object ....) m_pImpl->m_aDataSource = DataSourceHolder(xDS); @@ -284,8 +284,7 @@ namespace dbaui Reference< XNumberFormatsSupplier> xSupplier = ::dbtools::getNumberFormats(m_pImpl->m_xConnection); if(xSupplier.is()) { - m_pImpl->m_xFormatter = Reference< XNumberFormatter >( - NumberFormatter::create(getORB()), UNO_QUERY_THROW); + m_pImpl->m_xFormatter.set(NumberFormatter::create(getORB()), UNO_QUERY_THROW); m_pImpl->m_xFormatter->attachNumberFormatsSupplier(xSupplier); } OSL_ENSURE(m_pImpl->m_xFormatter.is(),"No NumberFormatter!"); diff --git a/dbaccess/source/ui/uno/dbinteraction.cxx b/dbaccess/source/ui/uno/dbinteraction.cxx index dd2d477dfa84..1cf3748e6ca7 100644 --- a/dbaccess/source/ui/uno/dbinteraction.cxx +++ b/dbaccess/source/ui/uno/dbinteraction.cxx @@ -124,7 +124,7 @@ namespace dbaui Reference< XInteractionSupplyParameters > xParamCallback; if (-1 != nParamPos) - xParamCallback = Reference< XInteractionSupplyParameters >(_rContinuations[nParamPos], UNO_QUERY); + xParamCallback.set(_rContinuations[nParamPos], UNO_QUERY); OSL_ENSURE(xParamCallback.is(), "BasicInteractionHandler::implHandle(ParametersRequest): can't set the parameters without an appropriate interaction handler!s"); ScopedVclPtrInstance< OParameterDialog > aDlg(nullptr, _rParamRequest.Parameters, _rParamRequest.Connection, m_xContext); |