[Libreoffice-commits] core.git: dbaccess/source desktop/source
Noel Grandin
noel at peralex.com
Fri Oct 30 11:52:57 UTC 2015
dbaccess/source/core/api/preparedstatement.cxx | 2 -
dbaccess/source/core/api/statement.cxx | 2 -
dbaccess/source/core/api/tablecontainer.cxx | 6 +++-
dbaccess/source/sdbtools/connection/connectiondependent.hxx | 2 -
dbaccess/source/ui/app/AppControllerGen.cxx | 2 -
dbaccess/source/ui/browser/brwctrlr.cxx | 5 +--
dbaccess/source/ui/browser/dsbrowserDnD.cxx | 3 +-
dbaccess/source/ui/browser/exsrcbrw.cxx | 2 -
dbaccess/source/ui/browser/sbagrid.cxx | 2 -
dbaccess/source/ui/dlg/DbAdminImpl.cxx | 2 -
dbaccess/source/ui/dlg/paramdialog.cxx | 2 -
dbaccess/source/ui/misc/UITools.cxx | 3 --
dbaccess/source/ui/misc/datasourceconnector.cxx | 2 -
dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx | 5 +--
dbaccess/source/ui/uno/dbinteraction.cxx | 2 -
desktop/source/app/app.cxx | 8 ++----
desktop/source/app/check_ext_deps.cxx | 4 +--
desktop/source/app/dispatchwatcher.cxx | 2 -
desktop/source/deployment/gui/dp_gui_theextmgr.cxx | 10 ++++---
desktop/source/deployment/manager/dp_extensionmanager.cxx | 3 --
desktop/source/deployment/misc/dp_descriptioninfoset.cxx | 3 --
desktop/source/deployment/misc/dp_update.cxx | 3 --
desktop/source/deployment/registry/dp_backenddb.cxx | 6 ++--
desktop/source/lib/init.cxx | 8 ------
desktop/source/migration/migration.cxx | 16 ++++++------
desktop/source/migration/services/oo3extensionmigration.cxx | 2 -
desktop/source/offacc/acceptor.cxx | 4 +--
27 files changed, 51 insertions(+), 60 deletions(-)
New commits:
commit e10570565f02959c8b713d1e17f5810424ddb63d
Author: Noel Grandin <noel at peralex.com>
Date: Fri Oct 30 11:29:18 2015 +0200
use uno::Reference::set method instead of assignment
Change-Id: I3d45914e349a4268204af84b95b53ccce7b9d544
diff --git a/dbaccess/source/core/api/preparedstatement.cxx b/dbaccess/source/core/api/preparedstatement.cxx
index 28912f2..83dd22f 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 fa2d6ce..dd251b7 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 85ee5ef..cf45d53 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 28a294a..845a52c 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 195864b..9516a48 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 d998829..a26c9ac 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 a9e44ac..b249306 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 004faa6..901752e 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 acd4550..638dd5f 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 c1cdc7f..29b056f 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 7a3769d..c1c0e77 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 423fb3b..20704ca 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 8ed65da..7c2b801 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 343b840..35cb35e 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 dd2d477..1cf3748 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);
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 60e2605..c9b7d13 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -2143,8 +2143,7 @@ void Desktop::PreloadConfigurationData()
}
// preload filter configuration
- xNameAccess = Reference< XNameAccess >(
- xContext->getServiceManager()->createInstanceWithContext("com.sun.star.document.FilterFactory", xContext),
+ xNameAccess.set(xContext->getServiceManager()->createInstanceWithContext("com.sun.star.document.FilterFactory", xContext),
UNO_QUERY );
if ( xNameAccess.is() )
{
@@ -2158,8 +2157,7 @@ void Desktop::PreloadConfigurationData()
}
// preload type detection configuration
- xNameAccess = Reference< XNameAccess >(
- xContext->getServiceManager()->createInstanceWithContext("com.sun.star.document.TypeDetection", xContext),
+ xNameAccess.set(xContext->getServiceManager()->createInstanceWithContext("com.sun.star.document.TypeDetection", xContext),
UNO_QUERY );
if ( xNameAccess.is() )
{
@@ -2728,7 +2726,7 @@ void Desktop::OpenSplashScreen()
aSeq[0] <<= bVisible;
aSeq[1] <<= aAppName;
css::uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
- m_rSplashScreen = Reference<XStatusIndicator>(
+ m_rSplashScreen.set(
xContext->getServiceManager()->createInstanceWithArgumentsAndContext(aSplashService, aSeq, xContext),
UNO_QUERY);
diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx
index 38b7d21..359ee1c 100644
--- a/desktop/source/app/check_ext_deps.cxx
+++ b/desktop/source/app/check_ext_deps.cxx
@@ -331,7 +331,7 @@ static void impl_setNeedsCompatCheck()
beans::NamedValue v( OUString("nodepath"),
makeAny( OUString("org.openoffice.Setup/Office") ) );
theArgs[0] <<= v;
- Reference< beans::XPropertySet > pset = Reference< beans::XPropertySet >(
+ Reference< beans::XPropertySet > pset(
theConfigProvider->createInstanceWithArguments( aAccessSrvc, theArgs ), UNO_QUERY_THROW );
Any value = makeAny( OUString("never") );
@@ -362,7 +362,7 @@ static bool impl_needsCompatCheck()
beans::NamedValue v( OUString("nodepath"),
makeAny( OUString("org.openoffice.Setup/Office") ) );
theArgs[0] <<= v;
- Reference< beans::XPropertySet > pset = Reference< beans::XPropertySet >(
+ Reference< beans::XPropertySet > pset(
theConfigProvider->createInstanceWithArguments( OUString(aAccessSrvc), theArgs ), UNO_QUERY_THROW );
Any result = pset->getPropertyValue("LastCompatibilityCheckID");
diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx
index 3bf045c..bac5499 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -455,7 +455,7 @@ bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatchRequ
// This is a synchron loading of a component so we don't have to deal with our statusChanged listener mechanism.
try
{
- xDoc = Reference < XPrintable >( ::comphelper::SynchronousDispatch::dispatch( xDesktop, aName, aTarget, 0, aArgs ), UNO_QUERY );
+ xDoc.set( ::comphelper::SynchronousDispatch::dispatch( xDesktop, aName, aTarget, 0, aArgs ), UNO_QUERY );
}
catch (const css::lang::IllegalArgumentException& iae)
{
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index 3689b6f..cd34cd4 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -66,18 +66,20 @@ TheExtensionManager::TheExtensionManager( const uno::Reference< awt::XWindow > &
beans::PropertyValue aValue( OUString("nodepath"), 0, uno::Any( OUString("/org.openoffice.Office.OptionsDialog/Nodes") ),
beans::PropertyState_DIRECT_VALUE );
args[0] <<= aValue;
- m_xNameAccessNodes = uno::Reference< container::XNameAccess >(
+ m_xNameAccessNodes.set(
xConfig->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess",
- uno::Sequence< uno::Any >( args, 1 )), uno::UNO_QUERY_THROW);
+ uno::Sequence< uno::Any >( args, 1 )),
+ uno::UNO_QUERY_THROW);
// get the 'get more extensions here' url
uno::Reference< container::XNameAccess > xNameAccessRepositories;
beans::PropertyValue aValue2( OUString("nodepath"), 0, uno::Any( OUString("/org.openoffice.Office.ExtensionManager/ExtensionRepositories") ),
beans::PropertyState_DIRECT_VALUE );
args[0] <<= aValue2;
- xNameAccessRepositories = uno::Reference< container::XNameAccess > (
+ xNameAccessRepositories.set(
xConfig->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess",
- uno::Sequence< uno::Any >( args, 1 )), uno::UNO_QUERY_THROW);
+ uno::Sequence< uno::Any >( args, 1 )),
+ uno::UNO_QUERY_THROW);
try
{ //throws css::container::NoSuchElementException, css::lang::WrappedTargetException
uno::Any value = xNameAccessRepositories->getByName("WebsiteLink");
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index e662c31..8913224 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -596,8 +596,7 @@ bool ExtensionManager::doChecksForAddExtension(
if (licenseAttributes && licenseAttributes->suppressIfRequired
&& props.isSuppressedLicense())
- _xCmdEnv = Reference<ucb::XCommandEnvironment>(
- new NoLicenseCommandEnv(xCmdEnv->getInteractionHandler()));
+ _xCmdEnv.set(new NoLicenseCommandEnv(xCmdEnv->getInteractionHandler()));
bCanInstall = xTmpExtension->checkPrerequisites(
xAbortChannel, _xCmdEnv, xOldExtension.is() || props.isExtensionUpdate()) == 0;
diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
index a27c171..ae0d56e 100644
--- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
+++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
@@ -227,8 +227,7 @@ ExtensionDescription::ExtensionDescription(
sDescriptionUri + " does not contain the root element <description>.", 0);
}
- m_xRoot = Reference<css::xml::dom::XNode>(
- xRoot, css::uno::UNO_QUERY_THROW);
+ m_xRoot.set(xRoot, css::uno::UNO_QUERY_THROW);
OUString nsDescription = xRoot->getNamespaceURI();
//check if this namespace is supported
diff --git a/desktop/source/deployment/misc/dp_update.cxx b/desktop/source/deployment/misc/dp_update.cxx
index 4ec7b37..35bdd17 100644
--- a/desktop/source/deployment/misc/dp_update.cxx
+++ b/desktop/source/deployment/misc/dp_update.cxx
@@ -115,8 +115,7 @@ void getOwnUpdateInfos(
if (*id2 == id)
{
i->second.version = infoset.getVersion();
- i->second.info = Reference< xml::dom::XNode >(
- infos[j], UNO_QUERY_THROW);
+ i->second.info.set(infos[j], UNO_QUERY_THROW);
}
break;
}
diff --git a/desktop/source/deployment/registry/dp_backenddb.cxx b/desktop/source/deployment/registry/dp_backenddb.cxx
index 3f607ae..a2c0323 100644
--- a/desktop/source/deployment/registry/dp_backenddb.cxx
+++ b/desktop/source/deployment/registry/dp_backenddb.cxx
@@ -170,7 +170,7 @@ void BackendDb::revokeEntry(OUString const & url)
{
try
{
- Reference<css::xml::dom::XElement> entry = Reference<css::xml::dom::XElement>(getKeyElement(url), UNO_QUERY);
+ Reference<css::xml::dom::XElement> entry(getKeyElement(url), UNO_QUERY);
if (entry.is())
{
entry->setAttribute("revoked", "true");
@@ -191,7 +191,7 @@ bool BackendDb::activateEntry(OUString const & url)
try
{
bool ret = false;
- Reference<css::xml::dom::XElement> entry = Reference<css::xml::dom::XElement>(getKeyElement(url), UNO_QUERY);
+ Reference<css::xml::dom::XElement> entry(getKeyElement(url), UNO_QUERY);
if (entry.is())
{
//no attribute "active" means it is active, that is, registered.
@@ -215,7 +215,7 @@ bool BackendDb::hasActiveEntry(OUString const & url)
try
{
bool ret = false;
- Reference<css::xml::dom::XElement> entry = Reference<css::xml::dom::XElement>(getKeyElement(url), UNO_QUERY);
+ Reference<css::xml::dom::XElement> entry(getKeyElement(url), UNO_QUERY);
if (entry.is())
{
OUString sActive = entry->getAttribute("revoked");
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 32b0101..d9a3fdd 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1285,13 +1285,7 @@ static bool initialize_uno(const OUString& aAppProgramURL)
return false;
}
- xSFactory = uno::Reference<lang::XMultiServiceFactory>(xFactory, uno::UNO_QUERY_THROW);
- if (!xSFactory.is())
- {
- gImpl->maLastExceptionMsg = "XMultiServiceFactory could not be created";
- SAL_INFO("lok", "XMultiServiceFactory could not be created");
- return false;
- }
+ xSFactory.set(xFactory, uno::UNO_QUERY_THROW);
comphelper::setProcessServiceFactory(xSFactory);
SAL_INFO("lok", "Uno initialized - " << xContext.is());
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index 37ce482..1f8e999 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -279,7 +279,7 @@ bool MigrationImpl::doMigration()
if (vModulesInfo[i].bHasMenubar)
{
- uno::Reference< container::XIndexContainer > xOldVersionMenuSettings = uno::Reference< container::XIndexContainer >(xOldCfgManager->getSettings(sMenubarResourceURL, sal_True), uno::UNO_QUERY);
+ uno::Reference< container::XIndexContainer > xOldVersionMenuSettings(xOldCfgManager->getSettings(sMenubarResourceURL, sal_True), uno::UNO_QUERY);
uno::Reference< container::XIndexContainer > xNewVersionMenuSettings = aNewVersionUIInfo.getNewMenubarSettings(vModulesInfo[i].sModuleShortName);
OUString sParent;
compareOldAndNewConfig(sParent, xOldVersionMenuSettings, xNewVersionMenuSettings, sMenubarResourceURL);
@@ -294,7 +294,7 @@ bool MigrationImpl::doMigration()
OUString sToolbarName = vModulesInfo[i].m_vToolbars[j];
OUString sToolbarResourceURL = sToolbarResourcePre + sToolbarName;
- uno::Reference< container::XIndexContainer > xOldVersionToolbarSettings = uno::Reference< container::XIndexContainer >(xOldCfgManager->getSettings(sToolbarResourceURL, sal_True), uno::UNO_QUERY);
+ uno::Reference< container::XIndexContainer > xOldVersionToolbarSettings(xOldCfgManager->getSettings(sToolbarResourceURL, sal_True), uno::UNO_QUERY);
uno::Reference< container::XIndexContainer > xNewVersionToolbarSettings = aNewVersionUIInfo.getNewToolbarSettings(vModulesInfo[i].sModuleShortName, sToolbarName);
OUString sParent;
compareOldAndNewConfig(sParent, xOldVersionToolbarSettings, xNewVersionToolbarSettings, sToolbarResourceURL);
@@ -878,7 +878,7 @@ uno::Reference< XNameAccess > MigrationImpl::getConfigAccess(const sal_Char* pPa
// access the provider
uno::Sequence< uno::Any > theArgs(1);
theArgs[ 0 ] <<= sConfigURL;
- xNameAccess = uno::Reference< XNameAccess > (
+ xNameAccess.set(
theConfigProvider->createInstanceWithArguments(
sAccessSrvc, theArgs ), uno::UNO_QUERY_THROW );
}
@@ -966,7 +966,7 @@ void MigrationImpl::runServices()
seqArguments[2] = uno::makeAny(NamedValue("ExtensionBlackList",
uno::makeAny( seqExtBlackList )));
- xMigrationJob = uno::Reference< XJob >(
+ xMigrationJob.set(
xContext->getServiceManager()->createInstanceWithArgumentsAndContext(i_mig->service, seqArguments, xContext),
uno::UNO_QUERY_THROW);
@@ -1008,11 +1008,11 @@ void MigrationImpl::runServices()
embed::FileSystemStorageFactory::create(comphelper::getProcessComponentContext()));
uno::Reference< embed::XStorage > xModules;
- xModules = uno::Reference< embed::XStorage >(xStorageFactory->createInstanceWithArguments(lArgs), uno::UNO_QUERY);
+ xModules.set(xStorageFactory->createInstanceWithArguments(lArgs), uno::UNO_QUERY);
if (!xModules.is())
return vModulesInfo;
- uno::Reference< container::XNameAccess > xAccess = uno::Reference< container::XNameAccess >(xModules, uno::UNO_QUERY);
+ uno::Reference< container::XNameAccess > xAccess(xModules, uno::UNO_QUERY);
uno::Sequence< OUString > lNames = xAccess->getElementNames();
sal_Int32 nLength = lNames.getLength();
for (sal_Int32 i=0; i<nLength; ++i)
@@ -1026,7 +1026,7 @@ void MigrationImpl::runServices()
uno::Reference< embed::XStorage > xMenubar = xModule->openStorageElement(MENUBAR, embed::ElementModes::READ);
if (xMenubar.is())
{
- uno::Reference< container::XNameAccess > xNameAccess = uno::Reference< container::XNameAccess >(xMenubar, uno::UNO_QUERY);
+ uno::Reference< container::XNameAccess > xNameAccess(xMenubar, uno::UNO_QUERY);
if (xNameAccess->getElementNames().getLength() > 0)
{
aModuleInfo.sModuleShortName = sModuleShortName;
@@ -1040,7 +1040,7 @@ void MigrationImpl::runServices()
const OUString RESOURCEURL_CUSTOM_ELEMENT("custom_");
sal_Int32 nCustomLen = 7;
- uno::Reference< container::XNameAccess > xNameAccess = uno::Reference< container::XNameAccess >(xToolbar, uno::UNO_QUERY);
+ uno::Reference< container::XNameAccess > xNameAccess(xToolbar, uno::UNO_QUERY);
::uno::Sequence< OUString > lToolbars = xNameAccess->getElementNames();
for (sal_Int32 j=0; j<lToolbars.getLength(); ++j)
{
diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx
index eb1b005..726a192 100644
--- a/desktop/source/migration/services/oo3extensionmigration.cxx
+++ b/desktop/source/migration/services/oo3extensionmigration.cxx
@@ -209,7 +209,7 @@ bool OO3ExtensionMigration::scanDescriptionXml( const OUString& sDescriptionXmlU
{
if ( !m_xDocBuilder.is() )
{
- m_xDocBuilder = uno::Reference< xml::dom::XDocumentBuilder >( xml::dom::DocumentBuilder::create(m_ctx) );
+ m_xDocBuilder.set( xml::dom::DocumentBuilder::create(m_ctx) );
}
if ( !m_xSimpleFileAccess.is() )
diff --git a/desktop/source/offacc/acceptor.cxx b/desktop/source/offacc/acceptor.cxx
index 7378033..2320851 100644
--- a/desktop/source/offacc/acceptor.cxx
+++ b/desktop/source/offacc/acceptor.cxx
@@ -236,7 +236,7 @@ Reference<XInterface> AccInstanceProvider::getInstance (const OUString& aName )
if ( aName == "StarOffice.ServiceManager" )
{
- rInstance = Reference< XInterface >( m_rContext->getServiceManager() );
+ rInstance.set( m_rContext->getServiceManager() );
}
else if ( aName == "StarOffice.ComponentContext" )
{
@@ -279,7 +279,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL offacc_component_getFactory(char const *pIm
if (desktop::Acceptor::impl_getImplementationName().equalsAscii( pImplementationName ) )
{
- xFactory = Reference< XSingleServiceFactory >( cppu::createSingleFactory(
+ xFactory.set( cppu::createSingleFactory(
xServiceManager, desktop::Acceptor::impl_getImplementationName(),
desktop::Acceptor::impl_getInstance, desktop::Acceptor::impl_getSupportedServiceNames()) );
}
More information about the Libreoffice-commits
mailing list