summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-10-30 07:59:06 +0200
committerNoel Grandin <noel@peralex.com>2015-10-30 11:08:36 +0200
commitcb4fa1d1e2e61b686442a9d26220c0f1a6e1d4e7 (patch)
tree2d819dbc32230f7af209b59a5c1f262f4964fa84 /cppuhelper
parent3bc5df7f32501075149e4b41f6e98ea8dd2cfcbd (diff)
use uno::Reference::set method instead of assignment
Change-Id: I080668f86f0ab8b3bba857ee21411f907ae285c4
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/source/propertysetmixin.cxx2
-rw-r--r--cppuhelper/source/servicemanager.cxx6
-rw-r--r--cppuhelper/test/testpropshlp.cxx4
3 files changed, 5 insertions, 7 deletions
diff --git a/cppuhelper/source/propertysetmixin.cxx b/cppuhelper/source/propertysetmixin.cxx
index 4b42d33e3368..c4de4fa547ae 100644
--- a/cppuhelper/source/propertysetmixin.cxx
+++ b/cppuhelper/source/propertysetmixin.cxx
@@ -435,7 +435,7 @@ PropertySetMixinImpl::Impl::Impl(
m_idlClass = getReflection(m_type.getTypeName());
css::uno::Reference< css::reflection::XTypeDescription > ifc;
try {
- ifc = css::uno::Reference< css::reflection::XTypeDescription >(
+ ifc.set(
css::uno::Reference< css::container::XHierarchicalNameAccess >(
m_context->getValueByName(
"/singletons/com.sun.star.reflection."
diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx
index 97a831dfeddf..cd9ec85969d1 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -834,8 +834,7 @@ void cppuhelper::ServiceManager::loadImplementation(
css::uno::Reference< css::lang::XMultiComponentFactory > smgr;
if (implementation->info->alienContext.is()) {
ctxt = implementation->info->alienContext;
- smgr = css::uno::Reference< css::lang::XMultiComponentFactory >(
- ctxt->getServiceManager(), css::uno::UNO_SET_THROW);
+ smgr.set(ctxt->getServiceManager(), css::uno::UNO_SET_THROW);
} else {
assert(context.is());
ctxt = context;
@@ -1620,8 +1619,7 @@ void cppuhelper::ServiceManager::insertLegacyFactory(
factoryInfo, css::uno::UNO_QUERY);
css::uno::Reference< css::lang::XSingleServiceFactory > f2;
if (!f1.is()) {
- f2 = css::uno::Reference< css::lang::XSingleServiceFactory >(
- factoryInfo, css::uno::UNO_QUERY);
+ f2.set(factoryInfo, css::uno::UNO_QUERY);
if (!f2.is()) {
throw css::lang::IllegalArgumentException(
("Bad XServiceInfo argument implements neither"
diff --git a/cppuhelper/test/testpropshlp.cxx b/cppuhelper/test/testpropshlp.cxx
index 8e98f12c57bb..ad62cd95b44e 100644
--- a/cppuhelper/test/testpropshlp.cxx
+++ b/cppuhelper/test/testpropshlp.cxx
@@ -344,7 +344,7 @@ public:
{
disposing();
EventObject aEvt;
- aEvt.Source = Reference < XInterface > ( (static_cast< OWeakObject * >(this)) );
+ aEvt.Source.set( (static_cast< OWeakObject * >(this)) );
rBHelper.aLC.disposeAndClear( aEvt );
rBHelper.bDisposed = sal_True;
@@ -796,7 +796,7 @@ void test_PropertySetHelper()
Reference < XFastPropertySet > rFast( xPS , UNO_QUERY );
OSL_ENSURE( rFast.is() , "PropertySetHelper: XFastPropertySet nor supported" );
- x = Reference < XInterface > ();
+ x.clear();
// Test add-remove listener
{