[Libreoffice-commits] core.git: ucbhelper/source unodevtools/source unotest/source unotools/source unoxml/source uui/source

Noel Grandin noel at peralex.com
Thu Nov 5 02:43:09 PST 2015


 ucbhelper/source/client/content.cxx                  |    3 --
 ucbhelper/source/client/proxydecider.cxx             |    3 --
 ucbhelper/source/provider/registerucb.cxx            |    2 -
 unodevtools/source/skeletonmaker/cppcompskeleton.cxx |    6 +---
 unotest/source/cpp/bootstrapfixturebase.cxx          |    2 -
 unotest/source/cpp/macros_test.cxx                   |    2 -
 unotools/source/config/configitem.cxx                |   28 +++++++++----------
 unotools/source/config/confignode.cxx                |    8 ++---
 unotools/source/config/historyoptions.cxx            |   22 +++++++-------
 unotools/source/config/lingucfg.cxx                  |    2 -
 unotools/source/config/moduleoptions.cxx             |    4 +-
 unotools/source/config/useroptions.cxx               |    4 +-
 unotools/source/config/viewoptions.cxx               |    5 +--
 unotools/source/ucbhelper/ucblockbytes.cxx           |   18 +++++-------
 unoxml/source/dom/attributesmap.cxx                  |   13 +++-----
 unoxml/source/dom/saxbuilder.cxx                     |    4 --
 unoxml/source/service/services.cxx                   |    6 ++--
 uui/source/passwordcontainer.cxx                     |    4 --
 uui/source/unknownauthdlg.cxx                        |    6 +---
 19 files changed, 63 insertions(+), 79 deletions(-)

New commits:
commit 94268513eeded3952972d7efe0a9bc689605421b
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Nov 5 12:42:10 2015 +0200

    use uno::Reference::set method instead of assignment
    
    Change-Id: Id57ccff7ea6cf5c7053b51268b1190f5459bb357

diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx
index a384a5e..54363ef 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -1298,8 +1298,7 @@ Reference< XCommandProcessor > Content_Impl::getCommandProcessor()
         osl::MutexGuard aGuard( m_aMutex );
 
         if ( !m_xCommandProcessor.is() )
-            m_xCommandProcessor
-                = Reference< XCommandProcessor >( getContent(), UNO_QUERY );
+            m_xCommandProcessor.set( getContent(), UNO_QUERY );
     }
 
     return m_xCommandProcessor;
diff --git a/ucbhelper/source/client/proxydecider.cxx b/ucbhelper/source/client/proxydecider.cxx
index 49fa8ed..b51e889 100644
--- a/ucbhelper/source/client/proxydecider.cxx
+++ b/ucbhelper/source/client/proxydecider.cxx
@@ -369,8 +369,7 @@ InternetProxyDecider_Impl::InternetProxyDecider_Impl(
 
             // Register as listener for config changes.
 
-            m_xNotifier = uno::Reference< util::XChangesNotifier >(
-                                                xInterface, uno::UNO_QUERY );
+            m_xNotifier.set( xInterface, uno::UNO_QUERY );
 
             OSL_ENSURE( m_xNotifier.is(),
                         "InternetProxyDecider - No notifier!" );
diff --git a/ucbhelper/source/provider/registerucb.cxx b/ucbhelper/source/provider/registerucb.cxx
index 5016155..d13a729 100644
--- a/ucbhelper/source/provider/registerucb.cxx
+++ b/ucbhelper/source/provider/registerucb.cxx
@@ -80,7 +80,7 @@ registerAtUcb(
         if (!xProvider.is())
             try
             {
-                xProvider = uno::Reference< ucb::XContentProvider >(
+                xProvider.set(
                     rxContext->getServiceManager()->createInstanceWithContext(rName, rxContext),
                     uno::UNO_QUERY);
             }
diff --git a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
index f9137b0..488440e 100644
--- a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
@@ -538,8 +538,7 @@ void generateAddinConstructorAndHelper(std::ostream& o,
             "        css::uno::Reference< css::uno::XInterface > xIface =\n"
             "            xProvider->createInstanceWithArguments(sReadOnlyView, "
             "aArguments);\n\n"
-            "         m_xHAccess = css::uno::Reference<\n            "
-            "css::container::XHierarchicalNameAccess >(xIface, css::uno::UNO_QUERY);"
+            "         m_xHAccess.set(xIface, css::uno::UNO_QUERY);"
             "\n\n";
 
         o << "        // extend arguments to create a view for all locales to get "
@@ -551,8 +550,7 @@ void generateAddinConstructorAndHelper(std::ostream& o,
             "        // create view for all locales\n"
             "        xIface = xProvider->createInstanceWithArguments(sReadOnlyView, "
             "aArguments);\n\n"
-            "        m_xCompAccess = css::uno::Reference<\n            "
-            "css::container::XHierarchicalNameAccess >(xIface, css::uno::UNO_QUERY);\n";
+            "        m_xCompAccess.set(xIface, css::uno::UNO_QUERY);\n";
 
         o << "    }\n    catch ( css::uno::Exception & ) {\n    }\n}\n\n";
 
diff --git a/unotest/source/cpp/bootstrapfixturebase.cxx b/unotest/source/cpp/bootstrapfixturebase.cxx
index e04c00f..af340d6 100644
--- a/unotest/source/cpp/bootstrapfixturebase.cxx
+++ b/unotest/source/cpp/bootstrapfixturebase.cxx
@@ -99,7 +99,7 @@ void test::BootstrapFixtureBase::setUp()
 
     m_xContext = comphelper::getProcessComponentContext();
     m_xFactory = m_xContext->getServiceManager();
-    m_xSFactory = uno::Reference<lang::XMultiServiceFactory>(m_xFactory, uno::UNO_QUERY_THROW);
+    m_xSFactory.set(m_xFactory, uno::UNO_QUERY_THROW);
 }
 
 void test::BootstrapFixtureBase::tearDown()
diff --git a/unotest/source/cpp/macros_test.cxx b/unotest/source/cpp/macros_test.cxx
index d7a57d5..84ab110 100644
--- a/unotest/source/cpp/macros_test.cxx
+++ b/unotest/source/cpp/macros_test.cxx
@@ -25,7 +25,7 @@ namespace unotest {
 uno::Reference<css::lang::XComponent> MacrosTest::loadFromDesktop(const OUString& rURL, const OUString& rDocService, const uno::Sequence<beans::PropertyValue>& rExtraArgs)
 {
     CPPUNIT_ASSERT_MESSAGE("no desktop", mxDesktop.is());
-    uno::Reference<frame::XComponentLoader> xLoader = uno::Reference<frame::XComponentLoader>(mxDesktop, uno::UNO_QUERY);
+    uno::Reference<frame::XComponentLoader> xLoader(mxDesktop, uno::UNO_QUERY);
     CPPUNIT_ASSERT_MESSAGE("no loader", xLoader.is());
     std::vector<beans::PropertyValue> args;
     beans::PropertyValue aMacroValue;
diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx
index a830e8d..9b4ed5f 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -392,20 +392,20 @@ Sequence< sal_Bool > ConfigItem::GetReadOnlyStates(const com::sun::star::uno::Se
             }
             else
             {
-                xNode = Reference<XInterface>( xHierarchyAccess, UNO_QUERY );
+                xNode.set( xHierarchyAccess, UNO_QUERY );
             }
 
-        xSet = Reference< XPropertySet >(xNode, UNO_QUERY);
+            xSet.set(xNode, UNO_QUERY);
             if (xSet.is())
-        {
-            xInfo = xSet->getPropertySetInfo();
+            {
+                xInfo = xSet->getPropertySetInfo();
                 OSL_ENSURE(xInfo.is(), "ConfigItem::IsReadonly()\ngetPropertySetInfo failed ...\n");
-        }
+            }
             else
-        {
-               xInfo = Reference< XPropertySetInfo >(xNode, UNO_QUERY);
+            {
+                xInfo.set(xNode, UNO_QUERY);
                 OSL_ENSURE(xInfo.is(), "ConfigItem::IsReadonly()\nUNO_QUERY failed ...\n");
-        }
+            }
 
             if (!xInfo.is())
             {
@@ -680,7 +680,7 @@ Sequence< OUString > ConfigItem::GetNodeNames(const OUString& rNode, ConfigNameF
                 aNode >>= xCont;
             }
             else
-                xCont = Reference<XNameAccess> (xHierarchyAccess, UNO_QUERY);
+                xCont.set(xHierarchyAccess, UNO_QUERY);
             if(xCont.is())
             {
                 aRet = xCont->getElementNames();
@@ -709,7 +709,7 @@ bool ConfigItem::ClearNodeSet(const OUString& rNode)
                 aNode >>= xCont;
             }
             else
-                xCont = Reference<XNameContainer> (xHierarchyAccess, UNO_QUERY);
+                xCont.set(xHierarchyAccess, UNO_QUERY);
             if(!xCont.is())
                 return false;
             Sequence< OUString > aNames = xCont->getElementNames();
@@ -748,7 +748,7 @@ bool ConfigItem::ClearNodeElements(const OUString& rNode, Sequence< OUString >&
                 aNode >>= xCont;
             }
             else
-                xCont = Reference<XNameContainer> (xHierarchyAccess, UNO_QUERY);
+                xCont.set(xHierarchyAccess, UNO_QUERY);
             if(!xCont.is())
                 return false;
             try
@@ -822,7 +822,7 @@ bool ConfigItem::SetSetProperties(
                 aNode >>= xCont;
             }
             else
-                xCont = Reference<XNameContainer> (xHierarchyAccess, UNO_QUERY);
+                xCont.set(xHierarchyAccess, UNO_QUERY);
             if(!xCont.is())
                 return false;
 
@@ -921,7 +921,7 @@ bool ConfigItem::ReplaceSetProperties(
                 aNode >>= xCont;
             }
             else
-                xCont = Reference<XNameContainer> (xHierarchyAccess, UNO_QUERY);
+                xCont.set(xHierarchyAccess, UNO_QUERY);
             if(!xCont.is())
                 return false;
 
@@ -1058,7 +1058,7 @@ bool ConfigItem::AddNode(const OUString& rNode, const OUString& rNewNode)
                 aNode >>= xCont;
             }
             else
-                xCont = Reference<XNameContainer> (xHierarchyAccess, UNO_QUERY);
+                xCont.set(xHierarchyAccess, UNO_QUERY);
             if(!xCont.is())
                 return false;
 
diff --git a/unotools/source/config/confignode.cxx b/unotools/source/config/confignode.cxx
index dfd10cb..3e521ac 100644
--- a/unotools/source/config/confignode.cxx
+++ b/unotools/source/config/confignode.cxx
@@ -54,8 +54,8 @@ namespace utl
         if (_rxNode.is())
         {
             // collect all interfaces necessary
-            m_xHierarchyAccess = Reference< XHierarchicalNameAccess >(_rxNode, UNO_QUERY);
-            m_xDirectAccess = Reference< XNameAccess >(_rxNode, UNO_QUERY);
+            m_xHierarchyAccess.set(_rxNode, UNO_QUERY);
+            m_xDirectAccess.set(_rxNode, UNO_QUERY);
 
             // reset _all_ interfaces if _one_ of them is not supported
             if (!m_xHierarchyAccess.is() || !m_xDirectAccess.is())
@@ -65,8 +65,8 @@ namespace utl
             }
 
             // now for the non-critical interfaces
-            m_xReplaceAccess = Reference< XNameReplace >(_rxNode, UNO_QUERY);
-            m_xContainerAccess = Reference< XNameContainer >(_rxNode, UNO_QUERY);
+            m_xReplaceAccess.set(_rxNode, UNO_QUERY);
+            m_xContainerAccess.set(_rxNode, UNO_QUERY);
         }
 
         Reference< XComponent > xConfigNodeComp(m_xDirectAccess, UNO_QUERY);
diff --git a/unotools/source/config/historyoptions.cxx b/unotools/source/config/historyoptions.cxx
index 86da956..0b2e12c 100644
--- a/unotools/source/config/historyoptions.cxx
+++ b/unotools/source/config/historyoptions.cxx
@@ -106,18 +106,18 @@ SvtHistoryOptions_Impl::SvtHistoryOptions_Impl()
 {
     try
     {
-        m_xCfg = Reference<container::XNameAccess> (
+        m_xCfg.set(
             ::comphelper::ConfigurationHelper::openConfig(
-            ::comphelper::getProcessComponentContext(),
-            s_sHistories,
-            ::comphelper::ConfigurationHelper::E_STANDARD),
+                ::comphelper::getProcessComponentContext(),
+                s_sHistories,
+                ::comphelper::ConfigurationHelper::E_STANDARD),
             uno::UNO_QUERY);
 
-        m_xCommonXCU = Reference<container::XNameAccess> (
+        m_xCommonXCU.set(
             ::comphelper::ConfigurationHelper::openConfig(
-            ::comphelper::getProcessComponentContext(),
-            s_sCommonHistory,
-            ::comphelper::ConfigurationHelper::E_STANDARD),
+                ::comphelper::getProcessComponentContext(),
+                s_sCommonHistory,
+                ::comphelper::ConfigurationHelper::E_STANDARD),
             uno::UNO_QUERY);
     }
     catch(const uno::Exception& ex)
@@ -444,7 +444,7 @@ void SvtHistoryOptions_Impl::AppendItem(EHistoryType eHistory,
             }
             if (nLength != nMaxSize)
             {
-                xFac = uno::Reference<lang::XSingleServiceFactory>(xOrderList, uno::UNO_QUERY);
+                xFac.set(xOrderList, uno::UNO_QUERY);
                 xInst = xFac->createInstance();
                 OUString sPush = OUString::number(nLength++);
                 xOrderList->insertByName(sPush, uno::makeAny(xInst));
@@ -461,11 +461,11 @@ void SvtHistoryOptions_Impl::AppendItem(EHistoryType eHistory,
             xSet->setPropertyValue(s_sHistoryItemRef, uno::makeAny(sURL));
 
             // Append the item to ItemList.
-            xFac = uno::Reference<lang::XSingleServiceFactory>(xItemList, uno::UNO_QUERY);
+            xFac.set(xItemList, uno::UNO_QUERY);
             xInst = xFac->createInstance();
             xItemList->insertByName(sURL, uno::makeAny(xInst));
 
-            xSet = uno::Reference<beans::XPropertySet>(xInst, uno::UNO_QUERY);
+            xSet.set(xInst, uno::UNO_QUERY);
             xSet->setPropertyValue(s_sFilter, uno::makeAny(sFilter));
             xSet->setPropertyValue(s_sTitle, uno::makeAny(sTitle));
             xSet->setPropertyValue(s_sPassword, uno::makeAny(sPassword));
diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx
index 6d0e8b1..2b28b2e 100644
--- a/unotools/source/config/lingucfg.cxx
+++ b/unotools/source/config/lingucfg.cxx
@@ -1076,7 +1076,7 @@ uno::Reference< util::XChangesBatch > SvtLinguConfig::GetMainUpdateAccess() cons
             aValue.Value = uno::makeAny(OUString("org.openoffice.Office.Linguistic"));
             uno::Sequence< uno::Any > aProps(1);
             aProps[0] <<= aValue;
-            m_xMainUpdateAccess = uno::Reference< util::XChangesBatch >(
+            m_xMainUpdateAccess.set(
                     xConfigurationProvider->createInstanceWithArguments(
                         "com.sun.star.configuration.ConfigurationUpdateAccess", aProps),
                         uno::UNO_QUERY_THROW );
diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx
index 5677fb2..828e159 100644
--- a/unotools/source/config/moduleoptions.cxx
+++ b/unotools/source/config/moduleoptions.cxx
@@ -1078,9 +1078,9 @@ SvtModuleOptions::EFactory SvtModuleOptions::ClassifyFactoryByURL(const OUString
     css::uno::Reference< css::container::XNameAccess > xTypeCfg;
     try
     {
-        xFilterCfg = css::uno::Reference< css::container::XNameAccess >(
+        xFilterCfg.set(
             xContext->getServiceManager()->createInstanceWithContext("com.sun.star.document.FilterFactory", xContext), css::uno::UNO_QUERY);
-        xTypeCfg = css::uno::Reference< css::container::XNameAccess >(
+        xTypeCfg.set(
             xContext->getServiceManager()->createInstanceWithContext("com.sun.star.document.TypeDetection", xContext), css::uno::UNO_QUERY);
     }
     catch(const css::uno::RuntimeException&)
diff --git a/unotools/source/config/useroptions.cxx b/unotools/source/config/useroptions.cxx
index 3dbd034..a4d2afe 100644
--- a/unotools/source/config/useroptions.cxx
+++ b/unotools/source/config/useroptions.cxx
@@ -126,7 +126,7 @@ SvtUserOptions::Impl::Impl() :
 {
     try
     {
-        m_xCfg = uno::Reference<container::XNameAccess>(
+        m_xCfg.set(
             comphelper::ConfigurationHelper::openConfig(
                 comphelper::getProcessComponentContext(),
                 "org.openoffice.UserProfile/Data",
@@ -135,7 +135,7 @@ SvtUserOptions::Impl::Impl() :
             uno::UNO_QUERY
         );
 
-        m_xData = uno::Reference<beans::XPropertySet>(m_xCfg, uno::UNO_QUERY);
+        m_xData.set(m_xCfg, uno::UNO_QUERY);
         uno::Reference<util::XChangesNotifier> xChgNot(m_xCfg, uno::UNO_QUERY);
         try
         {
diff --git a/unotools/source/config/viewoptions.cxx b/unotools/source/config/viewoptions.cxx
index 83e2d04..77e2941 100644
--- a/unotools/source/config/viewoptions.cxx
+++ b/unotools/source/config/viewoptions.cxx
@@ -154,12 +154,11 @@ SvtViewOptionsBase_Impl::SvtViewOptionsBase_Impl( const OUString& sList )
 
     try
     {
-        m_xRoot = css::uno::Reference< css::container::XNameAccess >(
-                        ::comphelper::ConfigurationHelper::openConfig(
+        m_xRoot.set( ::comphelper::ConfigurationHelper::openConfig(
                             ::comphelper::getProcessComponentContext(),
                             PACKAGE_VIEWS,
                             ::comphelper::ConfigurationHelper::E_STANDARD),
-                        css::uno::UNO_QUERY);
+                     css::uno::UNO_QUERY);
         if (m_xRoot.is())
             m_xRoot->getByName(sList) >>= m_xSet;
     }
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index 140a902..be0e71c 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -544,13 +544,11 @@ Moderator::Moderator(
 
     Reference < XActiveDataSink > xActiveSink(*pxSink,UNO_QUERY);
     if(xActiveSink.is())
-        *pxSink = Reference<XInterface>(
-            static_cast<cppu::OWeakObject*>(new ModeratorsActiveDataSink(*this)));
+        pxSink->set( static_cast<cppu::OWeakObject*>(new ModeratorsActiveDataSink(*this)));
 
     Reference<XActiveDataStreamer> xStreamer( *pxSink, UNO_QUERY );
     if ( xStreamer.is() )
-        *pxSink = Reference<XInterface>(
-            static_cast<cppu::OWeakObject*>(new ModeratorsActiveDataStreamer(*this)));
+        pxSink->set( static_cast<cppu::OWeakObject*>(new ModeratorsActiveDataStreamer(*this)));
 
     if(dec == 0)
         m_aArg.Argument <<= aPostArg;
@@ -860,7 +858,7 @@ static bool UCBOpenContentSync(
                         = ir->getSelection();
                     if(ref.is()) {
                         Reference<XInterface> xInt(ref.get());
-                        xRet = Reference<XInteractionRetry>(xInt,UNO_QUERY);
+                        xRet.set(xInt,UNO_QUERY);
                     }
                 }
 
@@ -1103,7 +1101,7 @@ bool UcbLockBytes::setStream_Impl( const Reference<XStream>& aStream )
     {
         m_xOutputStream = aStream->getOutputStream();
         setInputStream_Impl( aStream->getInputStream(), false );
-        m_xSeekable = Reference < XSeekable > ( aStream, UNO_QUERY );
+        m_xSeekable.set( aStream, UNO_QUERY );
     }
     else
     {
@@ -1129,15 +1127,15 @@ bool UcbLockBytes::setInputStream_Impl( const Reference<XInputStream> &rxInputSt
 
         if( bSetXSeekable )
         {
-            m_xSeekable = Reference < XSeekable > ( rxInputStream, UNO_QUERY );
+            m_xSeekable.set( rxInputStream, UNO_QUERY );
             if( !m_xSeekable.is() && rxInputStream.is() )
             {
                 Reference < XComponentContext > xContext = ::comphelper::getProcessComponentContext();
-                Reference< XOutputStream > rxTempOut = Reference < XOutputStream > ( TempFile::create(xContext), UNO_QUERY_THROW );
+                Reference< XOutputStream > rxTempOut( TempFile::create(xContext), UNO_QUERY_THROW );
 
                 ::comphelper::OStorageHelper::CopyInputToOutput( rxInputStream, rxTempOut );
-                m_xInputStream = Reference< XInputStream >( rxTempOut, UNO_QUERY );
-                m_xSeekable = Reference < XSeekable > ( rxTempOut, UNO_QUERY );
+                m_xInputStream.set( rxTempOut, UNO_QUERY );
+                m_xSeekable.set( rxTempOut, UNO_QUERY );
             }
         }
 
diff --git a/unoxml/source/dom/attributesmap.cxx b/unoxml/source/dom/attributesmap.cxx
index edac054..3f25688 100644
--- a/unoxml/source/dom/attributesmap.cxx
+++ b/unoxml/source/dom/attributesmap.cxx
@@ -76,9 +76,8 @@ namespace DOM
             {
                 if( strcmp(reinterpret_cast<char const *>(xName), reinterpret_cast<char const *>(cur->name)) == 0)
                 {
-                    aNode = Reference< XNode >(
-                            m_pElement->GetOwnerDocument().GetCNode(
-                                reinterpret_cast<xmlNodePtr>(cur)).get() );
+                    aNode.set( m_pElement->GetOwnerDocument().GetCNode(
+                                   reinterpret_cast<xmlNodePtr>(cur)).get() );
                     break;
                 }
                 cur = cur->next;
@@ -113,9 +112,8 @@ namespace DOM
                 if( strcmp(reinterpret_cast<char const *>(xName), reinterpret_cast<char const *>(cur->name)) == 0 &&
                     cur->ns == pNs)
                 {
-                    aNode = Reference< XNode >(
-                            m_pElement->GetOwnerDocument().GetCNode(
-                                reinterpret_cast<xmlNodePtr>(cur)).get() );
+                    aNode.set( m_pElement->GetOwnerDocument().GetCNode(
+                                  reinterpret_cast<xmlNodePtr>(cur)).get() );
                     break;
                 }
                 cur = cur->next;
@@ -142,8 +140,7 @@ namespace DOM
             {
                 if (count == index)
                 {
-                    aNode = Reference< XNode >(
-                            m_pElement->GetOwnerDocument().GetCNode(
+                    aNode.set( m_pElement->GetOwnerDocument().GetCNode(
                                 reinterpret_cast<xmlNodePtr>(cur)).get() );
                     break;
                 }
diff --git a/unoxml/source/dom/saxbuilder.cxx b/unoxml/source/dom/saxbuilder.cxx
index 4737131..be04b5f 100644
--- a/unoxml/source/dom/saxbuilder.cxx
+++ b/unoxml/source/dom/saxbuilder.cxx
@@ -256,9 +256,7 @@ namespace DOM
             // no URI for prefix
             aElement = m_aDocument->createElement(aName);
         }
-        aElement = Reference< XElement > (
-            m_aNodeStack.top()->appendChild(aElement),
-            UNO_QUERY);
+        aElement.set( m_aNodeStack.top()->appendChild(aElement), UNO_QUERY);
         m_aNodeStack.push(aElement);
 
         // set non xmlns attributes
diff --git a/unoxml/source/service/services.cxx b/unoxml/source/service/services.cxx
index f3e015f..bd77845 100644
--- a/unoxml/source/service/services.cxx
+++ b/unoxml/source/service/services.cxx
@@ -54,21 +54,21 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL unoxml_component_getFactory(const sal_Char *
 
         if (CDocumentBuilder::_getImplementationName().equalsAscii( pImplementationName )  )
         {
-            xFactory = Reference< XSingleServiceFactory >(
+            xFactory.set(
                 cppu::createOneInstanceFactory(
                     xServiceManager, CDocumentBuilder::_getImplementationName(),
                     CDocumentBuilder::_getInstance, CDocumentBuilder::_getSupportedServiceNames()));
         }
         else if (CSAXDocumentBuilder::_getImplementationName().equalsAscii( pImplementationName ) )
         {
-            xFactory = Reference< XSingleServiceFactory >(
+            xFactory.set(
                 cppu::createSingleFactory(
                     xServiceManager, CSAXDocumentBuilder::_getImplementationName(),
                     CSAXDocumentBuilder::_getInstance, CSAXDocumentBuilder::_getSupportedServiceNames()));
         }
         else if (CXPathAPI::_getImplementationName().equalsAscii( pImplementationName ) )
         {
-            xFactory = Reference< XSingleServiceFactory >(
+            xFactory.set(
                 cppu::createSingleFactory(
                     xServiceManager, CXPathAPI::_getImplementationName(),
                     CXPathAPI::_getInstance, CXPathAPI::_getSupportedServiceNames()));
diff --git a/uui/source/passwordcontainer.cxx b/uui/source/passwordcontainer.cxx
index 08a8b68..285f7b8 100644
--- a/uui/source/passwordcontainer.cxx
+++ b/uui/source/passwordcontainer.cxx
@@ -382,9 +382,7 @@ PasswordContainerInteractionHandler::handleInteractionRequest(
 
     for ( sal_Int32 i = 0; i < rContinuations.getLength(); ++i )
     {
-        xSupplyAuthentication
-            = uno::Reference< ucb::XInteractionSupplyAuthentication >(
-                rContinuations[i], uno::UNO_QUERY );
+        xSupplyAuthentication.set( rContinuations[i], uno::UNO_QUERY );
         if( xSupplyAuthentication.is() )
             break;
     }
diff --git a/uui/source/unknownauthdlg.cxx b/uui/source/unknownauthdlg.cxx
index 8d0ac80..378b98f 100644
--- a/uui/source/unknownauthdlg.cxx
+++ b/uui/source/unknownauthdlg.cxx
@@ -44,10 +44,8 @@ IMPL_LINK_NOARG_TYPED(UnknownAuthDialog, OKHdl_Impl, Button*, void)
 
 IMPL_LINK_NOARG_TYPED(UnknownAuthDialog, ViewCertHdl_Impl, Button*, void)
 {
-    uno::Reference< css::security::XDocumentDigitalSignatures > xDocumentDigitalSignatures;
-
-    xDocumentDigitalSignatures = uno::Reference< css::security::XDocumentDigitalSignatures >(
-                    css::security::DocumentDigitalSignatures::createDefault(m_xContext) );
+    uno::Reference< css::security::XDocumentDigitalSignatures > xDocumentDigitalSignatures(
+        css::security::DocumentDigitalSignatures::createDefault(m_xContext) );
 
     xDocumentDigitalSignatures.get()->showCertificate(getCert());
 }


More information about the Libreoffice-commits mailing list