diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-05 13:26:24 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-05 13:32:17 +0200 |
commit | 9e8ff13eb2405f7e3dcb4f90cb38e9e4b1da2bd5 (patch) | |
tree | ea4cd1922080d73b82a5b4bd4796d6190430f3fa | |
parent | use uno::Reference::set method instead of assignment (diff) | |
download | core-9e8ff13eb2405f7e3dcb4f90cb38e9e4b1da2bd5.tar.gz core-9e8ff13eb2405f7e3dcb4f90cb38e9e4b1da2bd5.zip |
use uno::Reference::set method instead of assignment
Change-Id: I60e52ef2abc3107ba77e81811dfe1bffbfd77218
49 files changed, 98 insertions, 114 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx index b9e47ea5c53c..16aff94b7b8d 100644 --- a/xmlhelp/source/cxxhelp/provider/databases.cxx +++ b/xmlhelp/source/cxxhelp/provider/databases.cxx @@ -104,7 +104,7 @@ OUString Databases::expandURL( const OUString& aURL, Reference< uno::XComponentC Reference< uri::XUriReference > uriRef; for (;;) { - uriRef = Reference< uri::XUriReference >( xFac->parse( aRetURL ), UNO_QUERY ); + uriRef.set( xFac->parse( aRetURL ), UNO_QUERY ); if ( uriRef.is() ) { Reference < uri::XVndSunStarExpandUrl > sxUri( uriRef, UNO_QUERY ); @@ -138,7 +138,7 @@ Databases::Databases( bool showBasic, vendVersion( "%VENDORVERSION" ), vendShort( "%VENDORSHORT" ) { - m_xSMgr = Reference< XMultiComponentFactory >( m_xContext->getServiceManager(), UNO_QUERY ); + m_xSMgr.set( m_xContext->getServiceManager(), UNO_QUERY ); m_vAdd[0] = 12; m_vAdd[1] = 15; @@ -880,7 +880,7 @@ Reference< XHierarchicalNameAccess > Databases::jarFile( const OUString& jar, if ( xIfc.is() ) { - it->second = Reference< XHierarchicalNameAccess >( xIfc, UNO_QUERY ); + it->second.set( xIfc, UNO_QUERY ); OSL_ENSURE( it->second.is(), "ContentProvider::createPackage - " @@ -1679,7 +1679,7 @@ Reference< XHierarchicalNameAccess > JarFileIterator::implGetJarFromPackage if ( xIfc.is() ) { - xNA = Reference< XHierarchicalNameAccess >( xIfc, UNO_QUERY ); + xNA.set( xIfc, UNO_QUERY ); OSL_ENSURE( xNA.is(), "JarFileIterator::implGetJarFromPackage() - " diff --git a/xmlhelp/source/cxxhelp/provider/provider.hxx b/xmlhelp/source/cxxhelp/provider/provider.hxx index f80ebe8fa36d..cd6cf86e4092 100644 --- a/xmlhelp/source/cxxhelp/provider/provider.hxx +++ b/xmlhelp/source/cxxhelp/provider/provider.hxx @@ -118,11 +118,10 @@ namespace chelp { // XConainerListener ( derive from XEventListener ) virtual void SAL_CALL - disposing( const ::com::sun::star::lang::EventObject& Source ) + disposing( const ::com::sun::star::lang::EventObject& /*Source*/ ) throw (::com::sun::star::uno::RuntimeException, std::exception) override { - (void)Source; - m_xContainer = com::sun::star::uno::Reference<com::sun::star::container::XContainer>(0); + m_xContainer.clear(); } virtual void SAL_CALL diff --git a/xmlhelp/source/cxxhelp/provider/resultset.cxx b/xmlhelp/source/cxxhelp/provider/resultset.cxx index 597392bf4380..64b7d5f57a64 100644 --- a/xmlhelp/source/cxxhelp/provider/resultset.cxx +++ b/xmlhelp/source/cxxhelp/provider/resultset.cxx @@ -53,12 +53,12 @@ DynamicResultSet::~DynamicResultSet() void DynamicResultSet::initStatic() { - m_xResultSet1 = Reference< XResultSet >( m_pFactory->createResultSet() ); + m_xResultSet1.set( m_pFactory->createResultSet() ); } void DynamicResultSet::initDynamic() { - m_xResultSet1 = Reference< XResultSet >( m_pFactory->createResultSet() ); + m_xResultSet1.set( m_pFactory->createResultSet() ); m_xResultSet2 = m_xResultSet1; } diff --git a/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx b/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx index 04e53e340a4b..d7fa6883b73b 100644 --- a/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx +++ b/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx @@ -403,8 +403,7 @@ ResultSetBase::queryContentIdentifier( { OUString url = queryContentIdentifierString(); if( ! m_aIdents[m_nRow].is() && !url.isEmpty() ) - m_aIdents[m_nRow] = uno::Reference< ucb::XContentIdentifier >( - new ::ucbhelper::ContentIdentifier( url ) ); + m_aIdents[m_nRow].set( new ::ucbhelper::ContentIdentifier( url ) ); return m_aIdents[m_nRow]; } diff --git a/xmlhelp/source/treeview/tvfactory.cxx b/xmlhelp/source/treeview/tvfactory.cxx index 81881f828ca2..abb4d9b0397c 100644 --- a/xmlhelp/source/treeview/tvfactory.cxx +++ b/xmlhelp/source/treeview/tvfactory.cxx @@ -86,17 +86,15 @@ TVFactory::createInstance( Reference< XInterface > SAL_CALL TVFactory::createInstanceWithArguments( - const OUString& ServiceSpecifier, + const OUString& /*ServiceSpecifier*/, const Sequence< Any >& Arguments ) throw( Exception, RuntimeException, std::exception ) { - (void)ServiceSpecifier; - if( ! m_xHDS.is() ) { cppu::OWeakObject* p = new TVChildTarget( m_xContext ); - m_xHDS = Reference< XInterface >( p ); + m_xHDS.set( p ); } Reference< XInterface > ret = m_xHDS; diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx index 4cb3e405f30d..28ad1522c6b7 100644 --- a/xmlhelp/source/treeview/tvread.cxx +++ b/xmlhelp/source/treeview/tvread.cxx @@ -1142,7 +1142,7 @@ OUString TreeFileIterator::expandURL( const OUString& aURL ) Reference< uri::XUriReference > uriRef; for (;;) { - uriRef = Reference< uri::XUriReference >( xFac->parse( aRetURL ), UNO_QUERY ); + uriRef.set( xFac->parse( aRetURL ), UNO_QUERY ); if ( uriRef.is() ) { Reference < uri::XVndSunStarExpandUrl > sxUri( uriRef, UNO_QUERY ); diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx index 7bae970a6ba2..c480081568f3 100644 --- a/xmloff/source/chart/SchXMLAxisContext.cxx +++ b/xmloff/source/chart/SchXMLAxisContext.cxx @@ -169,7 +169,7 @@ Reference< drawing::XShape > SchXMLAxisContext::getTitleShape() break; } xDiaProp->setPropertyValue( aPropName, uno::makeAny(sal_True) ); - xResult = Reference< drawing::XShape >( xAxis->getAxisTitle(), uno::UNO_QUERY ); + xResult.set( xAxis->getAxisTitle(), uno::UNO_QUERY ); return xResult; } @@ -433,7 +433,7 @@ void SchXMLAxisContext::CreateAxis() return; } - m_xAxisProps = Reference<beans::XPropertySet>( lcl_getChartAxis( m_aCurrentAxis, m_xDiagram ), uno::UNO_QUERY ); + m_xAxisProps.set( lcl_getChartAxis( m_aCurrentAxis, m_xDiagram ), uno::UNO_QUERY ); if( m_bAddMissingXAxisForNetCharts && m_aCurrentAxis.eDimension==SCH_XML_AXIS_Y && m_aCurrentAxis.nAxisIndex==0 ) { diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index 08c05e842a97..b33438aa6c1c 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -1080,7 +1080,7 @@ SvXMLImportContext* SchXMLChartContext::CreateChildContext( { uno::Reference< drawing::XDrawPageSupplier > xSupp( xDoc, uno::UNO_QUERY ); if( xSupp.is()) - mxDrawPage = uno::Reference< drawing::XShapes >( xSupp->getDrawPage(), uno::UNO_QUERY ); + mxDrawPage.set( xSupp->getDrawPage(), uno::UNO_QUERY ); SAL_WARN_IF( !mxDrawPage.is(), "xmloff.chart", "Invalid Chart Page" ); } diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 9ecdffe70b40..527be5994144 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -1586,7 +1586,7 @@ void SchXMLExportHelper_Impl::exportTable() { Reference< chart::XChartDocument > xChartDoc( mrExport.GetModel(), uno::UNO_QUERY ); if( xChartDoc.is() ) - xAnyDescriptionAccess = Reference< chart2::XAnyDescriptionAccess >( xChartDoc->getData(), uno::UNO_QUERY ); + xAnyDescriptionAccess.set( xChartDoc->getData(), uno::UNO_QUERY ); } if( bHasOwnData ) @@ -1856,7 +1856,7 @@ void SchXMLExportHelper_Impl::exportPlotArea( std::unique_ptr<SvXMLElementExport> xElPlotArea; // get property states for autostyles - xPropSet = Reference< beans::XPropertySet >( xDiagram, uno::UNO_QUERY ); + xPropSet.set( xDiagram, uno::UNO_QUERY ); if( xPropSet.is()) { if( mxExpPropMapper.is()) diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx index fae7430bb3d3..fcb0a910ca26 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.cxx +++ b/xmloff/source/chart/SchXMLSeries2Context.cxx @@ -229,7 +229,7 @@ Reference< chart2::data::XLabeledDataSequence2 > lcl_createAndAddSequenceToSerie Sequence< Reference< chart2::data::XLabeledDataSequence > > aOldSeq( xSeriesSource->getDataSequences()); sal_Int32 nOldCount = aOldSeq.getLength(); Sequence< Reference< chart2::data::XLabeledDataSequence > > aNewSeq( nOldCount + 1 ); - aNewSeq[0] = Reference< chart2::data::XLabeledDataSequence >(xLabeledSeq, uno::UNO_QUERY_THROW); + aNewSeq[0].set(xLabeledSeq, uno::UNO_QUERY_THROW); for( sal_Int32 nN=0; nN<nOldCount; nN++ ) aNewSeq[nN+1] = aOldSeq[nN]; xSeriesSink->setData( aNewSeq ); diff --git a/xmloff/source/chart/SchXMLSeriesHelper.cxx b/xmloff/source/chart/SchXMLSeriesHelper.cxx index 610a69ab04c2..b2024ff90ed2 100644 --- a/xmloff/source/chart/SchXMLSeriesHelper.cxx +++ b/xmloff/source/chart/SchXMLSeriesHelper.cxx @@ -180,8 +180,7 @@ uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPISeriesProp uno::Reference< lang::XMultiServiceFactory > xFactory( xChartModel, uno::UNO_QUERY ); if( xFactory.is() ) { - xRet = uno::Reference< beans::XPropertySet >( xFactory->createInstance( - "com.sun.star.comp.chart2.DataSeriesWrapper" ), uno::UNO_QUERY ); + xRet.set( xFactory->createInstance( "com.sun.star.comp.chart2.DataSeriesWrapper" ), uno::UNO_QUERY ); Reference< lang::XInitialization > xInit( xRet, uno::UNO_QUERY ); if(xInit.is()) { @@ -215,8 +214,7 @@ uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPIDataPointP uno::Reference< lang::XMultiServiceFactory > xFactory( xChartModel, uno::UNO_QUERY ); if( xFactory.is() ) { - xRet = uno::Reference< beans::XPropertySet >( xFactory->createInstance( - "com.sun.star.comp.chart2.DataSeriesWrapper" ), uno::UNO_QUERY ); + xRet.set( xFactory->createInstance( "com.sun.star.comp.chart2.DataSeriesWrapper" ), uno::UNO_QUERY ); Reference< lang::XInitialization > xInit( xRet, uno::UNO_QUERY ); if(xInit.is()) { diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx index 64304271ca04..0f1650595ae6 100644 --- a/xmloff/source/chart/SchXMLTools.cxx +++ b/xmloff/source/chart/SchXMLTools.cxx @@ -859,8 +859,7 @@ Reference< chart2::data::XDataProvider > getDataProviderFromParent( const Refere const OUString * pEnd = pBegin + aServiceNames.getLength(); if( ::std::find( pBegin, pEnd, aDataProviderServiceName ) != pEnd ) { - xRet = Reference< chart2::data::XDataProvider >( - xFact->createInstance( aDataProviderServiceName ), uno::UNO_QUERY ); + xRet.set( xFact->createInstance( aDataProviderServiceName ), uno::UNO_QUERY ); } } } diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx index 10a4eda39e60..8b597d5bfa3b 100644 --- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx +++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx @@ -150,7 +150,7 @@ bool XMLEmbeddedObjectImportContext::SetComponent( Reference< XComponentContext > xContext( GetImport().GetComponentContext() ); - xHandler = Reference < XDocumentHandler >( + xHandler.set( xContext->getServiceManager()->createInstanceWithArgumentsAndContext(sFilterService, aArgs, xContext), UNO_QUERY); diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 1bbbb98dceae..70d392db1678 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -302,7 +302,7 @@ SvXMLExport_Impl::SvXMLExport_Impl() void SvXMLExport::SetDocHandler( const uno::Reference< xml::sax::XDocumentHandler > &rHandler ) { mxHandler = rHandler; - mxExtHandler = uno::Reference<xml::sax::XExtendedDocumentHandler>( mxHandler, UNO_QUERY ); + mxExtHandler.set( mxHandler, UNO_QUERY ); } void SvXMLExport::_InitCtor() @@ -599,7 +599,7 @@ SvXMLExport::~SvXMLExport() void SAL_CALL SvXMLExport::setSourceDocument( const uno::Reference< lang::XComponent >& xDoc ) throw(lang::IllegalArgumentException, uno::RuntimeException, std::exception) { - mxModel = uno::Reference< frame::XModel >::query( xDoc ); + mxModel.set( xDoc, UNO_QUERY ); if( !mxModel.is() ) throw lang::IllegalArgumentException(); if (mxModel.is() && ! mxEventListener.is()) @@ -1336,15 +1336,15 @@ sal_uInt32 SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass ) { if( !mxGraphicResolver.is() ) { - mxGraphicResolver = Reference< XGraphicObjectResolver >::query( - xFactory->createInstance( "com.sun.star.document.ExportGraphicObjectResolver" )); + mxGraphicResolver.set( + xFactory->createInstance( "com.sun.star.document.ExportGraphicObjectResolver" ), UNO_QUERY); bOwnGraphicResolver = mxGraphicResolver.is(); } if( !mxEmbeddedResolver.is() ) { - mxEmbeddedResolver = Reference< XEmbeddedObjectResolver >::query( - xFactory->createInstance( "com.sun.star.document.ExportEmbeddedObjectResolver" )); + mxEmbeddedResolver.set( + xFactory->createInstance( "com.sun.star.document.ExportEmbeddedObjectResolver" ), UNO_QUERY); bOwnEmbeddedResolver = mxEmbeddedResolver.is(); } } @@ -1391,7 +1391,7 @@ sal_uInt32 SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass ) if( xTmpDocHandler.is() ) { mxHandler = xTmpDocHandler; - mxExtHandler = uno::Reference<xml::sax::XExtendedDocumentHandler>( mxHandler, UNO_QUERY ); + mxExtHandler.set( mxHandler, UNO_QUERY ); } } catch(const com::sun::star::uno::Exception&) diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 88579a8bfe01..7b7c36cae79c 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -508,19 +508,19 @@ void SAL_CALL SvXMLImport::startDocument() { if( !mxGraphicResolver.is() ) { - mxGraphicResolver = Reference< XGraphicObjectResolver >::query( - xFactory->createInstance( - // #99870# Import... instead of Export... - "com.sun.star.document.ImportGraphicObjectResolver")); + // #99870# Import... instead of Export... + mxGraphicResolver.set( + xFactory->createInstance("com.sun.star.document.ImportGraphicObjectResolver"), + UNO_QUERY); mpImpl->mbOwnGraphicResolver = mxGraphicResolver.is(); } if( !mxEmbeddedResolver.is() ) { - mxEmbeddedResolver = Reference< XEmbeddedObjectResolver >::query( - xFactory->createInstance( - // #99870# Import... instead of Export... - "com.sun.star.document.ImportEmbeddedObjectResolver")); + // #99870# Import... instead of Export... + mxEmbeddedResolver.set( + xFactory->createInstance("com.sun.star.document.ImportEmbeddedObjectResolver"), + UNO_QUERY); mpImpl->mbOwnEmbeddedResolver = mxEmbeddedResolver.is(); } } @@ -910,7 +910,7 @@ void SvXMLImport::SetStatistics(const uno::Sequence< beans::NamedValue> &) void SAL_CALL SvXMLImport::setTargetDocument( const uno::Reference< lang::XComponent >& xDoc ) throw(lang::IllegalArgumentException, uno::RuntimeException, std::exception) { - mxModel = uno::Reference< frame::XModel >::query( xDoc ); + mxModel.set( xDoc, UNO_QUERY ); if( !mxModel.is() ) throw lang::IllegalArgumentException(); @@ -1122,7 +1122,7 @@ const Reference< container::XNameContainer > & SvXMLImport::GetGradientHelper() { try { - mxGradientHelper = Reference< container::XNameContainer >( xServiceFact->createInstance( + mxGradientHelper.set( xServiceFact->createInstance( "com.sun.star.drawing.GradientTable" ), UNO_QUERY); } catch( lang::ServiceNotRegisteredException& ) @@ -1145,7 +1145,7 @@ const Reference< container::XNameContainer > & SvXMLImport::GetHatchHelper() { try { - mxHatchHelper = Reference< container::XNameContainer >( xServiceFact->createInstance( + mxHatchHelper.set( xServiceFact->createInstance( "com.sun.star.drawing.HatchTable" ), UNO_QUERY); } catch( lang::ServiceNotRegisteredException& ) @@ -1168,7 +1168,7 @@ const Reference< container::XNameContainer > & SvXMLImport::GetBitmapHelper() { try { - mxBitmapHelper = Reference< container::XNameContainer >( xServiceFact->createInstance( + mxBitmapHelper.set( xServiceFact->createInstance( "com.sun.star.drawing.BitmapTable" ), UNO_QUERY); } catch( lang::ServiceNotRegisteredException& ) @@ -1191,7 +1191,7 @@ const Reference< container::XNameContainer > & SvXMLImport::GetTransGradientHelp { try { - mxTransGradientHelper = Reference< container::XNameContainer >( xServiceFact->createInstance( + mxTransGradientHelper.set( xServiceFact->createInstance( "com.sun.star.drawing.TransparencyGradientTable" ), UNO_QUERY); } catch( lang::ServiceNotRegisteredException& ) @@ -1214,8 +1214,7 @@ const Reference< container::XNameContainer > & SvXMLImport::GetMarkerHelper() { try { - mxMarkerHelper = Reference< container::XNameContainer >( xServiceFact->createInstance( - "com.sun.star.drawing.MarkerTable" ), UNO_QUERY); + mxMarkerHelper.set( xServiceFact->createInstance( "com.sun.star.drawing.MarkerTable" ), UNO_QUERY); } catch( lang::ServiceNotRegisteredException& ) {} @@ -1237,8 +1236,7 @@ const Reference< container::XNameContainer > & SvXMLImport::GetDashHelper() { try { - mxDashHelper = Reference< container::XNameContainer >( xServiceFact->createInstance( - "com.sun.star.drawing.DashTable" ), UNO_QUERY); + mxDashHelper.set( xServiceFact->createInstance( "com.sun.star.drawing.DashTable" ), UNO_QUERY); } catch( lang::ServiceNotRegisteredException& ) {} @@ -1518,7 +1516,7 @@ ProgressBarHelper* SvXMLImport::GetProgressBarHelper() void SvXMLImport::AddNumberStyle(sal_Int32 nKey, const OUString& rName) { if (!mxNumberStyles.is()) - mxNumberStyles = uno::Reference< container::XNameContainer >( comphelper::NameContainer_createInstance( ::cppu::UnoType<sal_Int32>::get()) ); + mxNumberStyles.set( comphelper::NameContainer_createInstance( ::cppu::UnoType<sal_Int32>::get()) ); if (mxNumberStyles.is()) { uno::Any aAny; diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx index eaded066044b..e0652bbdbb12 100644 --- a/xmloff/source/core/xmluconv.cxx +++ b/xmloff/source/core/xmluconv.cxx @@ -85,7 +85,7 @@ struct SvXMLUnitConverter::Impl void SvXMLUnitConverter::Impl::createNumTypeInfo() const { Reference<XDefaultNumberingProvider> xDefNum = DefaultNumberingProvider::create(m_xContext); - m_xNumTypeInfo = Reference<XNumberingTypeInfo>(xDefNum, uno::UNO_QUERY); + m_xNumTypeInfo.set(xDefNum, uno::UNO_QUERY); } const uno::Reference< text::XNumberingTypeInfo >& diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index fece4ddaac9e..becd54016286 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -701,7 +701,7 @@ AnimationNodeContext::AnimationNodeContext( { Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); - mxNode = Reference< XAnimationNode >( + mxNode.set( xContext->getServiceManager()->createInstanceWithContext(OUString::createFromAscii(pServiceName), xContext), UNO_QUERY_THROW ); @@ -1296,7 +1296,7 @@ AnimationsImport::AnimationsImport( const Reference< XComponentContext > & rxCon GetXMLToken(XML_N_ANIMATION), XML_NAMESPACE_ANIMATION); - mxRootNode = Reference<XAnimationNode>( SequenceTimeContainer::create(rxContext), UNO_QUERY_THROW ); + mxRootNode.set( SequenceTimeContainer::create(rxContext), UNO_QUERY_THROW ); } AnimationsImport::~AnimationsImport() throw () diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx index 4226e69a4dd6..04e910e30972 100644 --- a/xmloff/source/draw/animimp.cxx +++ b/xmloff/source/draw/animimp.cxx @@ -563,7 +563,7 @@ void XMLAnimationsEffectContext::EndElement() Reference< XPropertySet > xSet; if( mpImpl->maLastShapeId != maShapeId ) { - xSet = Reference< XPropertySet >::query( GetImport().getInterfaceToIdentifierMapper().getReference( maShapeId ) ); + xSet.set( GetImport().getInterfaceToIdentifierMapper().getReference( maShapeId ), UNO_QUERY ); if( xSet.is() ) { // check for presentation shape service diff --git a/xmloff/source/draw/layerimp.cxx b/xmloff/source/draw/layerimp.cxx index ea4547f3bd0d..13241312d7bd 100644 --- a/xmloff/source/draw/layerimp.cxx +++ b/xmloff/source/draw/layerimp.cxx @@ -122,7 +122,7 @@ void SdXMLLayerContext::EndElement() { Reference< XLayerManager > xLayerManager( mxLayerManager, UNO_QUERY ); if( xLayerManager.is() ) - xLayer = Reference< XPropertySet >::query( xLayerManager->insertNewByIndex( xLayerManager->getCount() ) ); + xLayer.set( xLayerManager->insertNewByIndex( xLayerManager->getCount() ), UNO_QUERY ); DBG_ASSERT( xLayer.is(), "xmloff::SdXMLLayerContext::EndElement(), failed to create new XLayer!" ); if( xLayer.is() ) diff --git a/xmloff/source/draw/ximp3dscene.cxx b/xmloff/source/draw/ximp3dscene.cxx index 15b7fb98fd28..2bb82e0b1631 100644 --- a/xmloff/source/draw/ximp3dscene.cxx +++ b/xmloff/source/draw/ximp3dscene.cxx @@ -111,7 +111,7 @@ void SdXML3DSceneShapeContext::StartElement(const uno::Reference< xml::sax::XAtt { SetStyle(); - mxChildren = uno::Reference< drawing::XShapes >::query( mxShape ); + mxChildren.set( mxShape, uno::UNO_QUERY ); if( mxChildren.is() ) GetImport().GetShapeImport()->pushGroupForSorting( mxChildren ); diff --git a/xmloff/source/draw/ximpgrp.cxx b/xmloff/source/draw/ximpgrp.cxx index d97d3499eed6..4d62c92cf2c6 100644 --- a/xmloff/source/draw/ximpgrp.cxx +++ b/xmloff/source/draw/ximpgrp.cxx @@ -88,7 +88,7 @@ void SdXMLGroupShapeContext::StartElement(const uno::Reference< xml::sax::XAttri { SetStyle( false ); - mxChildren = uno::Reference< drawing::XShapes >::query( mxShape ); + mxChildren.set( mxShape, uno::UNO_QUERY ); if( mxChildren.is() ) GetImport().GetShapeImport()->pushGroupForSorting( mxChildren ); } diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx index 678109e099d1..3d33780220cf 100644 --- a/xmloff/source/draw/ximppage.cxx +++ b/xmloff/source/draw/ximppage.cxx @@ -382,8 +382,7 @@ void SdXMLGenericPageContext::SetStyle( OUString& rStyleName ) Reference< lang::XMultiServiceFactory > xServiceFact(GetSdImport().GetModel(), uno::UNO_QUERY); if(xServiceFact.is()) { - xBackgroundSet = Reference< beans::XPropertySet >::query( - xServiceFact->createInstance("com.sun.star.drawing.Background")); + xBackgroundSet.set(xServiceFact->createInstance("com.sun.star.drawing.Background"), UNO_QUERY); } } @@ -595,7 +594,7 @@ void SdXMLGenericPageContext::SetNavigationOrder() if( !aEnumerator.getNextToken(sId) ) break; - aShapes[nIndex] = Reference< XShape >( rIdMapper.getReference( sId ), UNO_QUERY ); + aShapes[nIndex].set( rIdMapper.getReference( sId ), UNO_QUERY ); } for( nIndex = 0; nIndex < nCount; ++nIndex ) diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index bf05af377a0b..57edea2ea5bd 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -259,7 +259,7 @@ void SdXMLShapeContext::addGluePoint( const uno::Reference< xml::sax::XAttribute if( !xSupplier.is() ) return; - mxGluePoints = uno::Reference< container::XIdentifierContainer >::query( xSupplier->getGluePoints() ); + mxGluePoints.set( xSupplier->getGluePoints(), UNO_QUERY ); if( !mxGluePoints.is() ) return; @@ -479,7 +479,7 @@ void SdXMLShapeContext::AddShape(uno::Reference< drawing::XShape >& xShape) } } - mxLockable = uno::Reference< document::XActionLockable >::query( xShape ); + mxLockable.set( xShape, UNO_QUERY ); if( mxLockable.is() ) mxLockable->addActionLock(); @@ -503,7 +503,7 @@ void SdXMLShapeContext::AddShape(OUString const & serviceName) if ( serviceName == "com.sun.star.drawing.OLE2Shape" && uno::Reference< text::XTextDocument >(GetImport().GetModel(), uno::UNO_QUERY).is() ) { - xShape = uno::Reference< drawing::XShape >(xServiceFact->createInstance("com.sun.star.drawing.temporaryForXMLImportOLE2Shape"), uno::UNO_QUERY); + xShape.set(xServiceFact->createInstance("com.sun.star.drawing.temporaryForXMLImportOLE2Shape"), uno::UNO_QUERY); } else if (serviceName == "com.sun.star.drawing.GraphicObjectShape" || serviceName == "com.sun.star.drawing.MediaShape" @@ -511,14 +511,12 @@ void SdXMLShapeContext::AddShape(OUString const & serviceName) { css::uno::Sequence<css::uno::Any> args(1); args[0] <<= GetImport().GetDocumentBase(); - xShape = css::uno::Reference<css::drawing::XShape>( - xServiceFact->createInstanceWithArguments( - serviceName, args), - css::uno::UNO_QUERY); + xShape.set( xServiceFact->createInstanceWithArguments(serviceName, args), + css::uno::UNO_QUERY); } else { - xShape = uno::Reference< drawing::XShape >(xServiceFact->createInstance(serviceName), uno::UNO_QUERY); + xShape.set(xServiceFact->createInstance(serviceName), uno::UNO_QUERY); } if( xShape.is() ) AddShape( xShape ); @@ -970,7 +968,7 @@ void SdXMLShapeContext::onDemandRescueUsefulDataFromTemporary( const SvXMLImport if( !xSupplier.is() ) return; - mxGluePoints = uno::Reference< container::XIdentifierContainer >::query( xSupplier->getGluePoints() ); + mxGluePoints.set( xSupplier->getGluePoints(), UNO_QUERY ); if( !mxGluePoints.is() ) return; diff --git a/xmloff/source/draw/ximpshow.cxx b/xmloff/source/draw/ximpshow.cxx index 3e154ec507bf..2ecde45c2f2c 100644 --- a/xmloff/source/draw/ximpshow.cxx +++ b/xmloff/source/draw/ximpshow.cxx @@ -72,16 +72,16 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, sal_uInt16 nPrfx, c if( xShowsSupplier.is() ) { mpImpl->mxShows = xShowsSupplier->getCustomPresentations(); - mpImpl->mxShowFactory = Reference< XSingleServiceFactory >::query( mpImpl->mxShows ); + mpImpl->mxShowFactory.set( mpImpl->mxShows, UNO_QUERY ); } Reference< XDrawPagesSupplier > xDrawPagesSupplier( rImport.GetModel(), UNO_QUERY ); if( xDrawPagesSupplier.is() ) - mpImpl->mxPages = Reference< XNameAccess >::query( xDrawPagesSupplier->getDrawPages() ); + mpImpl->mxPages.set( xDrawPagesSupplier->getDrawPages(), UNO_QUERY ); Reference< XPresentationSupplier > xPresentationSupplier( rImport.GetModel(), UNO_QUERY ); if( xPresentationSupplier.is() ) - mpImpl->mxPresProps = Reference< XPropertySet >::query( xPresentationSupplier->getPresentation() ); + mpImpl->mxPresProps.set( xPresentationSupplier->getPresentation(), UNO_QUERY ); if( mpImpl->mxPresProps.is() ) { diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index fec7bd238e51..cd10c3215559 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -619,7 +619,7 @@ namespace xmloff Reference< XInterface > xPure = xContext->getServiceManager()->createInstanceWithContext(m_sServiceName, xContext); OSL_ENSURE(xPure.is(), OStringBuffer("OElementImport::createElement: service factory gave me no object (service name: ").append(OUStringToOString(m_sServiceName, RTL_TEXTENCODING_ASCII_US)).append(")!").getStr()); - xReturn = Reference< XPropertySet >(xPure, UNO_QUERY); + xReturn.set(xPure, UNO_QUERY); } else OSL_FAIL("OElementImport::createElement: no service name to create an element!"); @@ -1853,7 +1853,7 @@ namespace xmloff Reference< XCloneable > xCloneList(_rxAttrList, UNO_QUERY); OSL_ENSURE(xCloneList.is(), "OColumnWrapperImport::StartElement: AttributeList not cloneable!"); if ( xCloneList.is() ) - m_xOwnAttributes = Reference< XAttributeList >(xCloneList->createClone(), UNO_QUERY); + m_xOwnAttributes.set(xCloneList->createClone(), UNO_QUERY); OSL_ENSURE(m_xOwnAttributes.is(), "OColumnWrapperImport::StartElement: no cloned list!"); } diff --git a/xmloff/source/forms/elementimport_impl.hxx b/xmloff/source/forms/elementimport_impl.hxx index a9cfc99aa9c2..d49859453bae 100644 --- a/xmloff/source/forms/elementimport_impl.hxx +++ b/xmloff/source/forms/elementimport_impl.hxx @@ -59,7 +59,7 @@ inline ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > return xReturn; // ensure that the object is a XNameContainer (we strongly need this for inserting child elements) - m_xMeAsContainer = ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >(xReturn, ::com::sun::star::uno::UNO_QUERY); + m_xMeAsContainer.set(xReturn, ::com::sun::star::uno::UNO_QUERY); if (!m_xMeAsContainer.is()) { OSL_FAIL("OContainerImport::createElement: invalid element (no XNameContainer) created!"); diff --git a/xmloff/source/forms/layerexport.cxx b/xmloff/source/forms/layerexport.cxx index 3a487a41abc7..f0145f1d60d7 100644 --- a/xmloff/source/forms/layerexport.cxx +++ b/xmloff/source/forms/layerexport.cxx @@ -113,7 +113,7 @@ namespace xmloff // nothing to do at all return false; - _rxForms = Reference< XIndexAccess >(xFormsSupp->getForms(), UNO_QUERY); + _rxForms.set(xFormsSupp->getForms(), UNO_QUERY); Reference< XServiceInfo > xSI(_rxForms, UNO_QUERY); // order is important! OSL_ENSURE(xSI.is(), "OFormLayerXMLExport_Impl::impl_isFormPageContainingForms: invalid collection (must not be NULL and must have a ServiceInfo)!"); if (!xSI.is()) diff --git a/xmloff/source/meta/MetaExportComponent.cxx b/xmloff/source/meta/MetaExportComponent.cxx index a9e0b3e89270..3f9d0eb71ca1 100644 --- a/xmloff/source/meta/MetaExportComponent.cxx +++ b/xmloff/source/meta/MetaExportComponent.cxx @@ -106,7 +106,7 @@ sal_uInt32 XMLMetaExportComponent::exportDoc( enum XMLTokenEnum ) aArgs[2] <<= GetModel(); // get filter component - xDocHandler = uno::Reference< xml::sax::XDocumentHandler >( + xDocHandler.set( xContext->getServiceManager()->createInstanceWithArgumentsAndContext( "com.sun.star.comp.Oasis2OOoTransformer", aArgs, xContext), uno::UNO_QUERY_THROW ); diff --git a/xmloff/source/meta/MetaImportComponent.cxx b/xmloff/source/meta/MetaImportComponent.cxx index 0ffcc128d3f4..326b84a1fd9b 100644 --- a/xmloff/source/meta/MetaImportComponent.cxx +++ b/xmloff/source/meta/MetaImportComponent.cxx @@ -103,7 +103,7 @@ void SAL_CALL XMLMetaImportComponent::setTargetDocument( const uno::Reference< lang::XComponent >& xDoc ) throw(lang::IllegalArgumentException, uno::RuntimeException, std::exception) { - mxDocProps = uno::Reference< document::XDocumentProperties >::query( xDoc ); + mxDocProps.set( xDoc, uno::UNO_QUERY ); if( !mxDocProps.is() ) throw lang::IllegalArgumentException(OUString( "XMLMetaImportComponent::setTargetDocument: argument is no " diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx index 8812f8e7041b..236d03fa8ee6 100644 --- a/xmloff/source/meta/xmlversion.cxx +++ b/xmloff/source/meta/xmlversion.cxx @@ -354,7 +354,7 @@ void SAL_CALL XMLVersionListPersistence::store( const uno::Reference< embed::XSt xExp->exportDoc( ::xmloff::token::XML_VERSION ); - xVerStream = uno::Reference< io::XStream >(); // use refcounting for now to dispose + xVerStream.clear(); // use refcounting for now to dispose } catch( uno::Exception& ) { diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx index da1cfbf5ea2b..45723a99d87e 100644 --- a/xmloff/source/style/prstylei.cxx +++ b/xmloff/source/style/prstylei.cxx @@ -241,7 +241,7 @@ Reference < XStyle > XMLPropStyleContext::Create() Reference < XInterface > xIfc = xFactory->createInstance( sServiceName ); if( xIfc.is() ) - xNewStyle = Reference < XStyle >( xIfc, UNO_QUERY ); + xNewStyle.set( xIfc, UNO_QUERY ); } } diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx index 7ea0ba1e23c2..0625ce210eb8 100644 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -275,7 +275,7 @@ bool XMLStyleExport::exportStyle( } else { - xPropState = Reference< XPropertyState >( xStyles->getByName( aParentStyle ), UNO_QUERY ); + xPropState.set( xStyles->getByName( aParentStyle ), UNO_QUERY ); if ( !xPropState.is() ) { break; @@ -287,7 +287,7 @@ bool XMLStyleExport::exportStyle( } else { - xStyle = Reference<XStyle>( xPropState, UNO_QUERY ); + xStyle.set( xPropState, UNO_QUERY ); } } } diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index a99ef11f2de0..107fba272ec8 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -1252,7 +1252,7 @@ Reference < XIndexReplace > SvxXMLListStyleContext::CreateNumRule( if( !xIfc.is() ) return xNumRule; - xNumRule = Reference<XIndexReplace>( xIfc, UNO_QUERY ); + xNumRule.set( xIfc, UNO_QUERY ); DBG_ASSERT( xNumRule.is(), "go no numbering rule" ); return xNumRule; diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index 8a012eab72af..7680d1b5248d 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -571,7 +571,7 @@ void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ ) Reference<XInterface> xIfc = xFactory->createInstance( sServiceName ); DBG_ASSERT( xIfc.is(), "couldn't create frame" ); if( xIfc.is() ) - xPropSet = Reference < XPropertySet >( xIfc, UNO_QUERY ); + xPropSet.set( xIfc, UNO_QUERY ); } } } diff --git a/xmloff/source/text/XMLTextMasterPageContext.cxx b/xmloff/source/text/XMLTextMasterPageContext.cxx index 21eafe49df49..9d7290a3879e 100644 --- a/xmloff/source/text/XMLTextMasterPageContext.cxx +++ b/xmloff/source/text/XMLTextMasterPageContext.cxx @@ -53,7 +53,7 @@ Reference < XStyle > XMLTextMasterPageContext::Create() Reference < XInterface > xIfc = xFactory->createInstance("com.sun.star.style.PageStyle"); if( xIfc.is() ) - xNewStyle = Reference < XStyle >( xIfc, UNO_QUERY ); + xNewStyle.set( xIfc, UNO_QUERY ); } return xNewStyle; diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index 43478b03bdc9..0e96c953ff77 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -2935,7 +2935,7 @@ bool XMLTextFieldExport::GetDependentFieldPropertySet( { // get first one and return Reference<XDependentTextField> xTField = aFields[0]; - xField = Reference<XPropertySet>(xTField, UNO_QUERY); + xField.set(xTField, UNO_QUERY); DBG_ASSERT(xField.is(), "Surprisinlgy, this TextField refuses to be a PropertySet!"); return true; diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index 2374feec9f8e..2fe66284aee6 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -1338,9 +1338,8 @@ static bool lcl_HasListStyle( const OUString& sStyleName, } else { - xPropState = Reference< XPropertyState >( - xParaStyles->getByName( aParentStyle ), - UNO_QUERY ); + xPropState.set( xParaStyles->getByName( aParentStyle ), + UNO_QUERY ); if ( !xPropState.is() ) { // error case @@ -1379,7 +1378,7 @@ static bool lcl_HasListStyle( const OUString& sStyleName, else { // search list style at parent - xStyle = Reference<XStyle>( xPropState, UNO_QUERY ); + xStyle.set( xPropState, UNO_QUERY ); } } } diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx index 52100214c4d3..3c222215f79a 100644 --- a/xmloff/source/transform/OOo2Oasis.cxx +++ b/xmloff/source/transform/OOo2Oasis.cxx @@ -1942,7 +1942,7 @@ void SAL_CALL OOo2OasisTransformer::Initialize( try { // get filter component - xDocHandler = Reference< XDocumentHandler >( + xDocHandler.set( xContext->getServiceManager()->createInstanceWithArgumentsAndContext(m_aSubServiceName, rArguments, xContext), UNO_QUERY); } diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx index 1b01baa62bfa..9ce81d68984d 100644 --- a/xmlsecurity/source/component/documentdigitalsignatures.cxx +++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx @@ -210,7 +210,7 @@ bool DocumentDigitalSignatures::ImplViewSignatures( { Reference< io::XStream > xStream; if ( xSignStream.is() ) - xStream = Reference< io::XStream >( xSignStream, UNO_QUERY ); + xStream.set( xSignStream, UNO_QUERY ); return ImplViewSignatures( rxStorage, xStream, eMode, bReadOnly ); } @@ -269,7 +269,7 @@ DocumentDigitalSignatures::ImplVerifySignatures( { aStreamHelper = DocumentSignatureHelper::OpenSignatureStream( rxStorage, embed::ElementModes::READ, eMode ); if ( aStreamHelper.xSignatureStream.is() ) - xInputStream = Reference< io::XInputStream >( aStreamHelper.xSignatureStream, UNO_QUERY ); + xInputStream.set( aStreamHelper.xSignatureStream, UNO_QUERY ); } if ( !xInputStream.is() ) diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index ba2c30c622cf..a1e0ce5e2c2a 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -780,7 +780,7 @@ SignatureStreamHelper DigitalSignaturesDialog::ImplOpenSignatureStream( if (nStreamOpenMode & css::embed::ElementModes::TRUNCATE) { //We write always into a new temporary stream. - mxTempSignatureStream = Reference < css::io::XStream >(css::io::TempFile::create(mxCtx), UNO_QUERY_THROW); + mxTempSignatureStream.set(css::io::TempFile::create(mxCtx), UNO_QUERY_THROW); aHelper.xSignatureStream = mxTempSignatureStream; } else diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx index 666063aea839..69a5ecd9188b 100644 --- a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx +++ b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx @@ -1341,10 +1341,8 @@ void SAL_CALL SAXEventKeeperImpl::initialize( const cssu::Sequence< cssu::Any >& OSL_ASSERT(aArguments.getLength() == 1); aArguments[0] >>= m_xXMLDocument; - m_xDocumentHandler = cssu::Reference< cssxs::XDocumentHandler >( - m_xXMLDocument, cssu::UNO_QUERY ); - m_xCompressedDocumentHandler = cssu::Reference< cssxcsax::XCompressedDocumentHandler >( - m_xXMLDocument, cssu::UNO_QUERY ); + m_xDocumentHandler.set( m_xXMLDocument, cssu::UNO_QUERY ); + m_xCompressedDocumentHandler.set( m_xXMLDocument, cssu::UNO_QUERY ); m_pRootBufferNode = new BufferNode(m_xXMLDocument->getCurrentElement()); m_pCurrentBufferNode = m_pRootBufferNode; diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx index 774645f5975d..666b67bc013d 100644 --- a/xmlsecurity/source/helper/xsecctl.cxx +++ b/xmlsecurity/source/helper/xsecctl.cxx @@ -148,7 +148,7 @@ void XSecController::createXSecComponent( ) cssu::Reference< cssl::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() ); - m_xXMLSignature = cssu::Reference< cssxc::XXMLSignature >( + m_xXMLSignature.set( xMCF->createInstanceWithContext( sXMLSignature, mxCtx ), cssu::UNO_QUERY ); @@ -158,7 +158,7 @@ void XSecController::createXSecComponent( ) * XMLSignature created successfully. */ { - m_xXMLDocumentWrapper = cssu::Reference< cssxw::XXMLDocumentWrapper >( + m_xXMLDocumentWrapper.set( xMCF->createInstanceWithContext( sXMLDocument, mxCtx ), cssu::UNO_QUERY ); } @@ -169,7 +169,7 @@ void XSecController::createXSecComponent( ) * XMLDocumentWrapper created successfully. */ { - m_xSAXEventKeeper = cssu::Reference< cssxc::sax::XSecuritySAXEventKeeper >( + m_xSAXEventKeeper.set( xMCF->createInstanceWithContext( sSAXEventKeeper, mxCtx ), cssu::UNO_QUERY ); } diff --git a/xmlsecurity/source/helper/xsecsign.cxx b/xmlsecurity/source/helper/xsecsign.cxx index e37836ffd58c..c1a7b091e122 100644 --- a/xmlsecurity/source/helper/xsecsign.cxx +++ b/xmlsecurity/source/helper/xsecsign.cxx @@ -74,7 +74,7 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar * create a SignatureCreator */ cssu::Reference< cssl::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() ); - xReferenceResolvedListener = cssu::Reference< cssxc::sax::XReferenceResolvedListener >( + xReferenceResolvedListener.set( xMCF->createInstanceWithContext(SIGNATURECREATOR_COMPONENT, mxCtx), cssu::UNO_QUERY); diff --git a/xmlsecurity/source/helper/xsecverify.cxx b/xmlsecurity/source/helper/xsecverify.cxx index 86663896dea6..325279f5da95 100644 --- a/xmlsecurity/source/helper/xsecverify.cxx +++ b/xmlsecurity/source/helper/xsecverify.cxx @@ -60,7 +60,7 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar * create a SignatureVerifier */ cssu::Reference< cssl::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() ); - xReferenceResolvedListener = cssu::Reference< cssxc::sax::XReferenceResolvedListener >( + xReferenceResolvedListener.set( xMCF->createInstanceWithContext(SIGNATUREVERIFIER_COMPONENT, mxCtx), cssu::UNO_QUERY); diff --git a/xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx b/xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx index 3af07cfbbfa3..ece35be08141 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx @@ -54,7 +54,7 @@ void* SAL_CALL mscrypt_component_getFactory( const sal_Char* pImplName , void* p } else if( XMLEncryption_MSCryptImpl::impl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) ) { xFactory = XMLEncryption_MSCryptImpl::impl_createFactory( reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ; } else if( SEInitializer_MSCryptImpl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) ) { - xFactory = Reference< XSingleServiceFactory >( createSingleFactory( + xFactory.set( createSingleFactory( reinterpret_cast< XMultiServiceFactory * >( pServiceManager ), OUString::createFromAscii( pImplName ), SEInitializer_MSCryptImpl_createInstance, SEInitializer_MSCryptImpl_getSupportedServiceNames() ) ); diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx index a61ebd6e17eb..71a3b870ea9b 100644 --- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx +++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx @@ -193,8 +193,7 @@ OString getMozillaCurrentProfile( const css::uno::Reference< css::uno::XComponen uno::Reference<uno::XInterface> xInstance = rxContext->getServiceManager()->createInstanceWithContext("com.sun.star.mozilla.MozillaBootstrap", rxContext); OSL_ENSURE( xInstance.is(), "failed to create instance" ); - uno::Reference<mozilla::XMozillaBootstrap> xMozillaBootstrap - = uno::Reference<mozilla::XMozillaBootstrap>(xInstance,uno::UNO_QUERY); + uno::Reference<mozilla::XMozillaBootstrap> xMozillaBootstrap(xInstance,uno::UNO_QUERY); OSL_ENSURE( xMozillaBootstrap.is(), "failed to create instance" ); if (xMozillaBootstrap.is()) diff --git a/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx b/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx index f26f18a1a353..35e8aa00615f 100644 --- a/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx +++ b/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx @@ -50,7 +50,7 @@ void* SAL_CALL nss_component_getFactory( const sal_Char* pImplName , void* pServ #ifdef XMLSEC_CRYPTO_NSS if( SEInitializer_NssImpl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) ) { - xFactory = Reference< XSingleServiceFactory >( createSingleFactory( + xFactory.set( createSingleFactory( static_cast< XMultiServiceFactory * >( pServiceManager ), OUString::createFromAscii( pImplName ), SEInitializer_NssImpl_createInstance, SEInitializer_NssImpl_getSupportedServiceNames() ) ); @@ -74,7 +74,7 @@ void* SAL_CALL nss_component_getFactory( const sal_Char* pImplName , void* pServ #else if( ONSSInitializer_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) ) { - xFactory = Reference< XSingleServiceFactory >( createSingleFactory( + xFactory.set( createSingleFactory( reinterpret_cast< XMultiServiceFactory * >( pServiceManager ), OUString::createFromAscii( pImplName ), ONSSInitializer_createInstance, ONSSInitializer_getSupportedServiceNames() ) ); diff --git a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx index 55bcaba0399a..f61dbfeeceba 100644 --- a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx +++ b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx @@ -214,7 +214,7 @@ void XMLDocumentWrapper_XmlSecImpl::sendStartElement( ******************************************************************************/ { SvXMLAttributeList* pAttributeList = new SvXMLAttributeList(); - cssu::Reference < cssxs::XAttributeList > xAttrList = cssu::Reference< cssxs::XAttributeList > (pAttributeList); + cssu::Reference < cssxs::XAttributeList > xAttrList(pAttributeList); xmlNsPtr pNsDef = pNode->nsDef; diff --git a/xmlsecurity/workben/signaturetest.cxx b/xmlsecurity/workben/signaturetest.cxx index d16e9468f489..42ac155f0cab 100644 --- a/xmlsecurity/workben/signaturetest.cxx +++ b/xmlsecurity/workben/signaturetest.cxx @@ -77,7 +77,7 @@ void Main(); return -1; } - xMSF = uno::Reference< lang::XMultiServiceFactory >(xCtx->getServiceManager(), uno::UNO_QUERY ); + xMSF.set(xCtx->getServiceManager(), uno::UNO_QUERY ); if ( !xMSF.is() ) { |