[Libreoffice-commits] core.git: i18npool/qa i18npool/source io/source io/test lingucomponent/source linguistic/source lotuswordpro/qa oox/source

Noel Grandin noel at peralex.com
Wed Nov 4 04:21:20 PST 2015


 i18npool/qa/cppunit/test_breakiterator.cxx           |    3 +--
 i18npool/qa/cppunit/test_characterclassification.cxx |    3 +--
 i18npool/qa/cppunit/test_ordinalsuffix.cxx           |    3 +--
 i18npool/qa/cppunit/test_textsearch.cxx              |    3 +--
 i18npool/source/localedata/saxparser.cxx             |    2 +-
 io/source/acceptor/acceptor.cxx                      |    3 +--
 io/source/connector/connector.cxx                    |    4 ++--
 io/source/stm/odata.cxx                              |    2 +-
 io/test/stm/datatest.cxx                             |   16 ++++++++--------
 io/test/stm/pumptest.cxx                             |    6 +++---
 io/test/testcomponent.cxx                            |    2 +-
 io/test/testconnection.cxx                           |    2 +-
 lingucomponent/source/thesaurus/libnth/nthesimp.cxx  |    2 +-
 linguistic/source/gciterator.cxx                     |    2 +-
 linguistic/source/hyphdsp.cxx                        |    7 +++----
 linguistic/source/lngsvcmgr.cxx                      |   17 ++++++++---------
 linguistic/source/spelldsp.cxx                       |    6 ++----
 linguistic/source/thesdsp.cxx                        |    3 +--
 lotuswordpro/qa/cppunit/test_lotuswordpro.cxx        |    2 +-
 oox/source/drawingml/chart/converterbase.cxx         |    2 +-
 oox/source/drawingml/shape.cxx                       |    4 ++--
 oox/source/ppt/slidepersist.cxx                      |    2 +-
 22 files changed, 43 insertions(+), 53 deletions(-)

New commits:
commit fcb8df3bcf551fc3437e6c7c8ddb24dc5a09db02
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Nov 4 14:16:19 2015 +0200

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

diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx
index a1f63d5..29fc489 100644
--- a/i18npool/qa/cppunit/test_breakiterator.cxx
+++ b/i18npool/qa/cppunit/test_breakiterator.cxx
@@ -980,8 +980,7 @@ void TestBreakIterator::testChinese()
 void TestBreakIterator::setUp()
 {
     BootstrapFixtureBase::setUp();
-    m_xBreak = uno::Reference< i18n::XBreakIterator >(m_xSFactory->createInstance(
-        "com.sun.star.i18n.BreakIterator"), uno::UNO_QUERY_THROW);
+    m_xBreak.set(m_xSFactory->createInstance("com.sun.star.i18n.BreakIterator"), uno::UNO_QUERY_THROW);
 }
 
 void TestBreakIterator::tearDown()
diff --git a/i18npool/qa/cppunit/test_characterclassification.cxx b/i18npool/qa/cppunit/test_characterclassification.cxx
index 9c2b452..16cf087 100644
--- a/i18npool/qa/cppunit/test_characterclassification.cxx
+++ b/i18npool/qa/cppunit/test_characterclassification.cxx
@@ -96,8 +96,7 @@ void TestCharacterClassification::testStringType()
 void TestCharacterClassification::setUp()
 {
     BootstrapFixtureBase::setUp();
-    m_xCC = uno::Reference< i18n::XCharacterClassification >(m_xSFactory->createInstance(
-        "com.sun.star.i18n.CharacterClassification"), uno::UNO_QUERY_THROW);
+    m_xCC.set(m_xSFactory->createInstance("com.sun.star.i18n.CharacterClassification"), uno::UNO_QUERY_THROW);
 }
 
 void TestCharacterClassification::tearDown()
diff --git a/i18npool/qa/cppunit/test_ordinalsuffix.cxx b/i18npool/qa/cppunit/test_ordinalsuffix.cxx
index f09f8ec..fb06a41 100644
--- a/i18npool/qa/cppunit/test_ordinalsuffix.cxx
+++ b/i18npool/qa/cppunit/test_ordinalsuffix.cxx
@@ -34,8 +34,7 @@ public:
 void TestOrdinalSuffix::setUp()
 {
     BootstrapFixtureBase::setUp();
-    m_xOrdinal = uno::Reference< i18n::XOrdinalSuffix >(m_xSFactory->createInstance(
-        "com.sun.star.i18n.OrdinalSuffix"), uno::UNO_QUERY_THROW);
+    m_xOrdinal.set(m_xSFactory->createInstance("com.sun.star.i18n.OrdinalSuffix"), uno::UNO_QUERY_THROW);
 }
 
 void TestOrdinalSuffix::tearDown()
diff --git a/i18npool/qa/cppunit/test_textsearch.cxx b/i18npool/qa/cppunit/test_textsearch.cxx
index 405a853..a5713d0 100644
--- a/i18npool/qa/cppunit/test_textsearch.cxx
+++ b/i18npool/qa/cppunit/test_textsearch.cxx
@@ -127,8 +127,7 @@ void TestTextSearch::testSearches()
 void TestTextSearch::setUp()
 {
     BootstrapFixtureBase::setUp();
-    m_xSearch = uno::Reference< util::XTextSearch >(m_xSFactory->createInstance(
-        "com.sun.star.util.TextSearch"), uno::UNO_QUERY_THROW);
+    m_xSearch.set(m_xSFactory->createInstance("com.sun.star.util.TextSearch"), uno::UNO_QUERY_THROW);
 }
 
 void TestTextSearch::tearDown()
diff --git a/i18npool/source/localedata/saxparser.cxx b/i18npool/source/localedata/saxparser.cxx
index beb184e..695a36b 100644
--- a/i18npool/source/localedata/saxparser.cxx
+++ b/i18npool/source/localedata/saxparser.cxx
@@ -143,7 +143,7 @@ Reference< XInputStream > createStreamFromFile(
 
     Sequence<sal_Int8> seqIn(nLength);
     if (fread( seqIn.getArray(), nLength , 1 , f ) == 1)
-        r = Reference< XInputStream > ( new OInputStream( seqIn ) );
+        r.set( new OInputStream( seqIn ) );
     else
         fprintf(stderr, "failure reading %s\n", pcFile);
     fclose( f );
diff --git a/io/source/acceptor/acceptor.cxx b/io/source/acceptor/acceptor.cxx
index 43c86cd..e2b6ffd 100644
--- a/io/source/acceptor/acceptor.cxx
+++ b/io/source/acceptor/acceptor.cxx
@@ -210,8 +210,7 @@ namespace io_acceptor
                         "trying to get service %s\n",
                         OUStringToOString(
                             delegatee, RTL_TEXTENCODING_ASCII_US).getStr());
-                    _xAcceptor = Reference<XAcceptor>(
-                        _xSMgr->createInstanceWithContext(delegatee, _xCtx), UNO_QUERY);
+                    _xAcceptor.set(_xSMgr->createInstanceWithContext(delegatee, _xCtx), UNO_QUERY);
 
                     if(!_xAcceptor.is())
                     {
diff --git a/io/source/connector/connector.cxx b/io/source/connector/connector.cxx
index e564d3e..25fa3bd 100644
--- a/io/source/connector/connector.cxx
+++ b/io/source/connector/connector.cxx
@@ -94,7 +94,7 @@ namespace stoc_connector
 
                 if( pConn->m_pipe.create( aName.pData, osl_Pipe_OPEN, osl::Security() ) )
                 {
-                    r = Reference < XConnection > ( static_cast<XConnection *>(pConn) );
+                    r.set( static_cast<XConnection *>(pConn) );
                 }
                 else
                 {
@@ -141,7 +141,7 @@ namespace stoc_connector
                                                sizeof( nTcpNoDelay ) , osl_Socket_LevelTcp );
                 }
                 pConn->completeConnectionString();
-                r = Reference< XConnection > ( static_cast<XConnection *>(pConn) );
+                r.set( static_cast<XConnection *>(pConn) );
             }
             else
             {
diff --git a/io/source/stm/odata.cxx b/io/source/stm/odata.cxx
index ee37bcb..c626661 100644
--- a/io/source/stm/odata.cxx
+++ b/io/source/stm/odata.cxx
@@ -1310,7 +1310,7 @@ Reference< XPersistObject >  OObjectInputStream::readObject() throw (css::io::IO
         {
             // load the object
             Reference< XInterface > x = m_rSMgr->createInstanceWithContext( aName, m_rCxt );
-            xLoadedObj = Reference< XPersistObject >( x, UNO_QUERY );
+            xLoadedObj.set( x, UNO_QUERY );
             if( xLoadedObj.is() )
             {
                 sal_uInt32 nSize = m_aPersistVector.size();
diff --git a/io/test/stm/datatest.cxx b/io/test/stm/datatest.cxx
index fb26008..f98f602 100644
--- a/io/test/stm/datatest.cxx
+++ b/io/test/stm/datatest.cxx
@@ -172,15 +172,15 @@ sal_Int32 ODataStreamTest::test(
                 if( ! rSink.is() ) {
                     x = m_rFactory->createInstance(
                         "com.sun.star.io.DataInputStream" );
-                    rInput = Reference < XDataInputStream > ( x , UNO_QUERY);
-                    rSink = Reference<  XActiveDataSink > ( x , UNO_QUERY );
+                    rInput.set( x , UNO_QUERY);
+                    rSink.set( x , UNO_QUERY );
                 }
                 else if ( !rSource.is() )
                 {
                     x = m_rFactory->createInstance(
                         "com.sun.star.io.DataOutputStream" );
-                    rOutput = Reference< XDataOutputStream > ( x , UNO_QUERY );
-                    rSource = Reference< XActiveDataSource > ( x, UNO_QUERY );
+                    rOutput.set( x , UNO_QUERY );
+                    rSource.set( x, UNO_QUERY );
                 }
 
                 OSL_ASSERT( rPipeInput.is() );
@@ -750,14 +750,14 @@ sal_Int32 OObjectStreamTest::test(  const OUString& TestName,
                 if( ! rSink.is() ) {
                     x = m_rFactory->createInstance(
                         "com.sun.star.io.ObjectInputStream" );
-                    rInput = Reference < XObjectInputStream > ( x , UNO_QUERY );
-                    rSink = Reference < XActiveDataSink > ( x , UNO_QUERY );
+                    rInput.set( x , UNO_QUERY );
+                    rSink.set( x , UNO_QUERY );
                 }
                 else if ( !rSource.is() ) {
                     x = m_rFactory->createInstance(
                         "com.sun.star.io.ObjectOutputStream" );
-                    rOutput = Reference <XObjectOutputStream > ( x , UNO_QUERY );
-                    rSource = Reference <XActiveDataSource>( x, UNO_QUERY );
+                    rOutput.set( x , UNO_QUERY );
+                    rSource.set( x, UNO_QUERY );
                 }
 
                 OSL_ASSERT( rPipeInput.is() );
diff --git a/io/test/stm/pumptest.cxx b/io/test/stm/pumptest.cxx
index 465cf90..b95d54c 100644
--- a/io/test/stm/pumptest.cxx
+++ b/io/test/stm/pumptest.cxx
@@ -278,16 +278,16 @@ public:
     TestCase( const Reference< XMultiServiceFactory > & rSMgr,
               const Reference< XInterface > &r ) : m_rSmgr( rSMgr ), m_pTestListener( 0 )
     {
-        m_rControl = Reference<XActiveDataControl>( r, UNO_QUERY );
+        m_rControl.set( r, UNO_QUERY );
 
         Reference< XActiveDataSource > rSource ( r, UNO_QUERY );
         Reference< XActiveDataSink > rSink( r , UNO_QUERY );
 
-        m_rOutSource = Reference< XOutputStream > ( createPipe() );
+        m_rOutSource.set( createPipe() );
         rSink->setInputStream(Reference< XInputStream> (m_rOutSource,UNO_QUERY));
 
         Reference< XOutputStream > rOutSink( createPipe() );
-        m_rInSink = Reference< XInputStream > ( rOutSink, UNO_QUERY );
+        m_rInSink.set( rOutSink, UNO_QUERY );
         rSource->setOutputStream( rOutSink );
 
         m_pTestListener = new TestListener();
diff --git a/io/test/testcomponent.cxx b/io/test/testcomponent.cxx
index 58b4f68..1703526 100644
--- a/io/test/testcomponent.cxx
+++ b/io/test/testcomponent.cxx
@@ -61,7 +61,7 @@ int main (int argc, char **argv)
         // Create registration service
         Reference < XInterface > x = xSMgr->createInstance(
             "com.sun.star.registry.ImplementationRegistration" );
-        xReg = Reference<  XImplementationRegistration > ( x , UNO_QUERY );
+        xReg.set( x , UNO_QUERY );
     }
     catch( Exception & ) {
         printf( "Couldn't create ImplementationRegistration service\n" );
diff --git a/io/test/testconnection.cxx b/io/test/testconnection.cxx
index ae42cf5..38cf446 100644
--- a/io/test/testconnection.cxx
+++ b/io/test/testconnection.cxx
@@ -205,7 +205,7 @@ int SAL_CALL main( int argc, char * argv[] )
     printf( " Done\n" );
 
     // check, if errornous strings make any problem
-    rAcceptor = Reference< XAcceptor > (
+    rAcceptor.set(
         xMgr->createInstance("com.sun.star.connection.Acceptor"),
         UNO_QUERY );
 
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
index 29adef1..017429e 100644
--- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
@@ -466,7 +466,7 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM
             return noMeanings;
         stem = 1;
 
-        xSpell = uno::Reference< XSpellChecker1 >( xLngSvcMgr->getSpellChecker(), UNO_QUERY );
+        xSpell.set( xLngSvcMgr->getSpellChecker(), UNO_QUERY );
         if (!xSpell.is() || !xSpell->isValid( SPELLML_SUPPORT, nLanguage, rProperties ))
             return noMeanings;
         Reference< XSpellAlternatives > xTmpRes;
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index eb6f90a..f6f6dc2 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -1005,7 +1005,7 @@ uno::Reference< util::XChangesBatch > GrammarCheckingIterator::GetUpdateAccess()
             aValue.Value = uno::makeAny( OUString("org.openoffice.Office.Linguistic/ServiceManager") );
             uno::Sequence< uno::Any > aProps(1);
             aProps[0] <<= aValue;
-            m_xUpdateAccess = uno::Reference< util::XChangesBatch >(
+            m_xUpdateAccess.set(
                     xConfigurationProvider->createInstanceWithArguments(
                         "com.sun.star.configuration.ConfigurationUpdateAccess", aProps ),
                         uno::UNO_QUERY_THROW );
diff --git a/linguistic/source/hyphdsp.cxx b/linguistic/source/hyphdsp.cxx
index ae0da99..7f23cd6 100644
--- a/linguistic/source/hyphdsp.cxx
+++ b/linguistic/source/hyphdsp.cxx
@@ -617,10 +617,9 @@ Reference< XPossibleHyphens > SAL_CALL
                 // create specific service via it's implementation name
                 try
                 {
-                    xHyph = Reference< XHyphenator >(
-                                xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
-                                    pEntry->aSvcImplNames[0], aArgs, xContext ),
-                                UNO_QUERY );
+                    xHyph.set( xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
+                                   pEntry->aSvcImplNames[0], aArgs, xContext ),
+                               UNO_QUERY );
                 }
                 catch (uno::Exception &)
                 {
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 75fda0e..742544a 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -97,10 +97,9 @@ static uno::Sequence< lang::Locale > GetAvailLocales(
             uno::Reference< linguistic2::XSupportedLocales > xSuppLoc;
             try
             {
-                xSuppLoc = uno::Reference< linguistic2::XSupportedLocales >(
-                                xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
-                                   pImplNames[i], aArgs, xContext ),
-                                uno::UNO_QUERY );
+                xSuppLoc.set( xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
+                                 pImplNames[i], aArgs, xContext ),
+                              uno::UNO_QUERY );
             }
             catch (uno::Exception &)
             {
@@ -490,7 +489,7 @@ LngSvcMgr::LngSvcMgr()
     }
     if (xExtensionManager.is())
     {
-        xMB = uno::Reference<util::XModifyBroadcaster>(xExtensionManager, uno::UNO_QUERY_THROW);
+        xMB.set(xExtensionManager, uno::UNO_QUERY_THROW);
 
         uno::Reference<util::XModifyListener> xListener(this);
         xMB->addModifyListener( xListener );
@@ -1068,7 +1067,7 @@ void LngSvcMgr::GetAvailableSpellSvcs_Impl()
                 {
                     try
                     {
-                        xSvc = uno::Reference< linguistic2::XSpellChecker >( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY );
+                        xSvc.set( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY );
                     }
                     catch (const uno::Exception &)
                     {
@@ -1130,7 +1129,7 @@ void LngSvcMgr::GetAvailableGrammarSvcs_Impl()
                 {
                     try
                     {
-                        xSvc = uno::Reference< linguistic2::XProofreader >( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY );
+                        xSvc.set( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY );
                     }
                     catch (const uno::Exception &)
                     {
@@ -1192,7 +1191,7 @@ void LngSvcMgr::GetAvailableHyphSvcs_Impl()
                 {
                     try
                     {
-                        xSvc = uno::Reference< linguistic2::XHyphenator >( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY );
+                        xSvc.set( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY );
                     }
                     catch (const uno::Exception &)
                     {
@@ -1253,7 +1252,7 @@ void LngSvcMgr::GetAvailableThesSvcs_Impl()
                 {
                     try
                     {
-                        xSvc = uno::Reference< linguistic2::XThesaurus >( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY );
+                        xSvc.set( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY );
                     }
                     catch (const uno::Exception &)
                     {
diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx
index e77fd30..745e0a9 100644
--- a/linguistic/source/spelldsp.cxx
+++ b/linguistic/source/spelldsp.cxx
@@ -371,8 +371,7 @@ bool SpellCheckerDispatcher::isValid_Impl(
                 Reference< XSpellChecker > xSpell;
                 try
                 {
-                    xSpell = Reference< XSpellChecker >(
-                                xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
+                    xSpell.set( xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
                                     pImplNames[i], aArgs, xContext ),
                                 UNO_QUERY );
                 }
@@ -557,8 +556,7 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl(
                 Reference< XSpellChecker > xSpell;
                 try
                 {
-                    xSpell = Reference< XSpellChecker >(
-                                xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
+                    xSpell.set( xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
                                     pImplNames[i], aArgs, xContext ),
                                 UNO_QUERY );
                 }
diff --git a/linguistic/source/thesdsp.cxx b/linguistic/source/thesdsp.cxx
index a0027a1..8676318 100644
--- a/linguistic/source/thesdsp.cxx
+++ b/linguistic/source/thesdsp.cxx
@@ -171,8 +171,7 @@ Sequence< Reference< XMeaning > > SAL_CALL
                 Reference< XThesaurus > xThes;
                 try
                 {
-                    xThes = Reference< XThesaurus >(
-                                xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
+                    xThes.set(  xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
                                     pImplNames[i], aArgs, xContext ),
                                 UNO_QUERY );
                 }
diff --git a/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx b/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx
index 10f1f33..d4fe779 100644
--- a/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx
+++ b/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx
@@ -44,7 +44,7 @@ namespace
     {
         test::BootstrapFixture::setUp();
 
-        m_xFilter = uno::Reference< document::XFilter >(m_xSFactory->createInstance(
+        m_xFilter.set(m_xSFactory->createInstance(
             "com.sun.star.comp.Writer.LotusWordProImportFilter"),
             uno::UNO_QUERY_THROW);
     }
diff --git a/oox/source/drawingml/chart/converterbase.cxx b/oox/source/drawingml/chart/converterbase.cxx
index 73fd818..950550b 100644
--- a/oox/source/drawingml/chart/converterbase.cxx
+++ b/oox/source/drawingml/chart/converterbase.cxx
@@ -218,7 +218,7 @@ Reference< XInterface > ConverterRoot::createInstance( const OUString& rServiceN
     Reference< XInterface > xInt;
     try
     {
-        Reference<XMultiServiceFactory> xMSF = Reference<XMultiServiceFactory>(getComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW);
+        Reference<XMultiServiceFactory> xMSF(getComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW);
 
         xInt = xMSF->createInstance( rServiceName );
     }
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 93b78a8..d39d3dd 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -552,7 +552,7 @@ Reference< XShape > Shape::createAndInsert(
 
     Reference< lang::XMultiServiceFactory > xServiceFact( rFilterBase.getModel(), UNO_QUERY_THROW );
     if ( !mxShape.is() )
-        mxShape = Reference< drawing::XShape >( xServiceFact->createInstance( aServiceName ), UNO_QUERY_THROW );
+        mxShape.set( xServiceFact->createInstance( aServiceName ), UNO_QUERY_THROW );
 
     Reference< XPropertySet > xSet( mxShape, UNO_QUERY );
     if( mxShape.is() && xSet.is() )
@@ -1201,7 +1201,7 @@ Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase& rFilterBase )
 
         Reference < graphic::XGraphic > xGraphic( aGraphic.GetXGraphic() );
         Reference < lang::XMultiServiceFactory > xServiceFact( rFilterBase.getModel(), UNO_QUERY_THROW );
-        xShape = Reference < XShape > ( xServiceFact->createInstance( "com.sun.star.drawing.GraphicObjectShape" ), UNO_QUERY_THROW );
+        xShape.set( xServiceFact->createInstance( "com.sun.star.drawing.GraphicObjectShape" ), UNO_QUERY_THROW );
         Reference < XPropertySet > xPropSet( xShape, UNO_QUERY_THROW );
         xPropSet->setPropertyValue(  "Graphic", Any( xGraphic ) );
         xPropSet->setPropertyValue(  "MoveProtect", Any( sal_True ) );
diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index 732df6d..59026cf 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -278,7 +278,7 @@ void SlidePersist::applyTextStyles( const XmlFilterBase& rFilterBase )
                                                 {
                                                     xFamilies->getByName( sOutlineStyle ) >>= aXStyle;
                                                     if( aXStyle.is() )
-                                                        xPropSet = Reference< beans::XPropertySet >( aXStyle, UNO_QUERY_THROW );
+                                                        xPropSet.set( aXStyle, UNO_QUERY_THROW );
                                                 }
                                             }
                                             setTextStyle( xPropSet, rFilterBase, maDefaultTextStylePtr, nLevel );


More information about the Libreoffice-commits mailing list