diff options
27 files changed, 56 insertions, 64 deletions
diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx index 65cba521b004..f4b0874c91ac 100644 --- a/filter/source/config/cache/filtercache.cxx +++ b/filter/source/config/cache/filtercache.cxx @@ -497,14 +497,14 @@ void FilterCache::addStatePropsToItem( EItemType eType, { case E_TYPE : { - xPackage = css::uno::Reference< css::container::XNameAccess >(impl_openConfig(E_PROVIDER_TYPES), css::uno::UNO_QUERY_THROW); + xPackage.set(impl_openConfig(E_PROVIDER_TYPES), css::uno::UNO_QUERY_THROW); xPackage->getByName(CFGSET_TYPES) >>= xSet; } break; case E_FILTER : { - xPackage = css::uno::Reference< css::container::XNameAccess >(impl_openConfig(E_PROVIDER_FILTERS), css::uno::UNO_QUERY_THROW); + xPackage.set(impl_openConfig(E_PROVIDER_FILTERS), css::uno::UNO_QUERY_THROW); xPackage->getByName(CFGSET_FILTERS) >>= xSet; } break; @@ -532,14 +532,14 @@ void FilterCache::addStatePropsToItem( EItemType eType, } /* <-- HACK */ - xPackage = css::uno::Reference< css::container::XNameAccess >(impl_openConfig(E_PROVIDER_OTHERS), css::uno::UNO_QUERY_THROW); + xPackage.set(impl_openConfig(E_PROVIDER_OTHERS), css::uno::UNO_QUERY_THROW); xPackage->getByName(CFGSET_FRAMELOADERS) >>= xSet; } break; case E_CONTENTHANDLER : { - xPackage = css::uno::Reference< css::container::XNameAccess >(impl_openConfig(E_PROVIDER_OTHERS), css::uno::UNO_QUERY_THROW); + xPackage.set(impl_openConfig(E_PROVIDER_OTHERS), css::uno::UNO_QUERY_THROW); xPackage->getByName(CFGSET_CONTENTHANDLERS) >>= xSet; } break; diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx index a637d0890f54..b25f1be2af87 100644 --- a/filter/source/config/cache/typedetection.cxx +++ b/filter/source/config/cache/typedetection.cxx @@ -1013,7 +1013,7 @@ OUString TypeDetection::impl_askDetectService(const OUString& sDet // third party components here, which can make trouble anyway. So we // should handle errors during creation of such services more // gracefully .-) - xDetector = css::uno::Reference< css::document::XExtendedFilterDetection >( + xDetector.set( xContext->getServiceManager()->createInstanceWithContext(sDetectService, xContext), css::uno::UNO_QUERY_THROW); } diff --git a/filter/source/flash/swffilter.cxx b/filter/source/flash/swffilter.cxx index e866ef275bc5..c72256516e43 100644 --- a/filter/source/flash/swffilter.cxx +++ b/filter/source/flash/swffilter.cxx @@ -331,7 +331,7 @@ bool FlashExportFilter::ExportAsMultipleFiles(const Sequence< PropertyValue >& a Reference< XDrawPage > xDrawPage; Reference< XFrame > rFrame = rDesktop->getCurrentFrame(); - Reference< XDrawView > rDrawView = Reference< XDrawView >( rFrame->getController(), UNO_QUERY ); + Reference< XDrawView > rDrawView( rFrame->getController(), UNO_QUERY ); Reference< XDrawPage > rCurrentPage = rDrawView->getCurrentPage(); diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx index 9f1bed809c41..2e0048dde16d 100644 --- a/filter/source/graphicfilter/icgm/actimpr.cxx +++ b/filter/source/graphicfilter/icgm/actimpr.cxx @@ -95,8 +95,8 @@ bool CGMImpressOutAct::ImplInitPage() bool CGMImpressOutAct::ImplCreateShape( const OUString& rType ) { uno::Reference< uno::XInterface > xNewShape( maXMultiServiceFactory->createInstance( rType ) ); - maXShape = uno::Reference< drawing::XShape >( xNewShape, uno::UNO_QUERY ); - maXPropSet = uno::Reference< beans::XPropertySet >( xNewShape, uno::UNO_QUERY ); + maXShape.set( xNewShape, uno::UNO_QUERY ); + maXPropSet.set( xNewShape, uno::UNO_QUERY ); if ( maXShape.is() && maXPropSet.is() ) { maXShapes->add( maXShape ); diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index 463838ea3e98..a453cacf00e2 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -882,7 +882,7 @@ bool ImplEscherExSdr::ImplInitPage( const SdrPage& rPage ) mpSdrPage = NULL; mXDrawPage = pSvxDrawPage = new SvxFmDrawPage( const_cast<SdrPage*>(&rPage) ); - mXShapes = Reference< XShapes >::query( mXDrawPage ); + mXShapes.set( mXDrawPage, UNO_QUERY ); if ( !mXShapes.is() ) break; if ( !ImplInitPageValues() ) // ImplEESdrWriter @@ -1035,7 +1035,7 @@ ImplEESdrObject::ImplEESdrObject( ImplEscherExSdr& rEx, { // why not declare a const parameter if the object will // not be modified? - mXShape = uno::Reference< drawing::XShape >::query( const_cast<SdrObject*>(&rObj)->getUnoShape() ); + mXShape.set( const_cast<SdrObject*>(&rObj)->getUnoShape(), UNO_QUERY ); Init( rEx ); } } @@ -1164,7 +1164,7 @@ basegfx::B2DRange getUnrotatedGroupBoundRange(const Reference< XShape >& rxShape void ImplEESdrObject::Init( ImplEESdrWriter& rEx ) { - mXPropSet = Reference< XPropertySet >::query( mXShape ); + mXPropSet.set( mXShape, UNO_QUERY ); if( mXPropSet.is() ) { // detect name first to make below test (is group) work diff --git a/filter/source/msfilter/msocximex.cxx b/filter/source/msfilter/msocximex.cxx index a2c859827cb3..a796798317c5 100644 --- a/filter/source/msfilter/msocximex.cxx +++ b/filter/source/msfilter/msocximex.cxx @@ -78,8 +78,7 @@ const uno::Reference< drawing::XShapes >& SvxMSConvertOCXControls::GetShapes() if( xDrawPage.is() ) { - xShapes = uno::Reference< drawing::XShapes >(xDrawPage, - uno::UNO_QUERY); + xShapes.set(xDrawPage, uno::UNO_QUERY); OSL_ENSURE( xShapes.is(), "UNO_QUERY failed for XShapes from XDrawPage" ); } } diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index fecff378afed..19c333f684cc 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -1704,7 +1704,7 @@ bool PPTConvertOCXControls::InsertControl( ->createInstance( "com.sun.star.drawing.ControlShape" ); if( xCreate.is() ) { - xShape = css::uno::Reference< css::drawing::XShape >(xCreate, css::uno::UNO_QUERY); + xShape.set(xCreate, css::uno::UNO_QUERY); if ( xShape.is() ) { xShape->setSize(rSize); diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index f04f169c8cb5..76e647923697 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -550,7 +550,7 @@ bool SVGFilter::implExport( const Sequence< PropertyValue >& rDescriptor ) pOStm.reset(::utl::UcbStreamHelper::CreateStream( aFileName, StreamMode::WRITE | StreamMode::TRUNC )); if( pOStm ) - xOStm = Reference< XOutputStream >( new ::utl::OOutputStreamWrapper ( *pOStm ) ); + xOStm.set( new ::utl::OOutputStreamWrapper ( *pOStm ) ); } else if ( pValue[ i ].Name == "FilterData" ) { @@ -1507,7 +1507,7 @@ bool SVGFilter::implExportDrawPages( const SVGFilter::XDrawPageSequence & rxPage } else { - xShapes = Reference< XShapes >( rxPages[i], UNO_QUERY ); + xShapes.set( rxPages[i], UNO_QUERY ); } if( xShapes.is() ) diff --git a/filter/source/svg/svgimport.cxx b/filter/source/svg/svgimport.cxx index 66c88c625eca..58bad3f72846 100644 --- a/filter/source/svg/svgimport.cxx +++ b/filter/source/svg/svgimport.cxx @@ -55,8 +55,8 @@ bool SVGFilter::implImport(const Sequence< PropertyValue >& rDescriptor) uno::Reference<io::XInputStream> xInputStream; uno::Reference<task::XStatusIndicator> xStatus; - xInputStream = uno::Reference<io::XInputStream>(aMediaDescriptor[utl::MediaDescriptor::PROP_INPUTSTREAM()], UNO_QUERY); - xStatus = uno::Reference<task::XStatusIndicator>(aMediaDescriptor[utl::MediaDescriptor::PROP_STATUSINDICATOR()], UNO_QUERY); + xInputStream.set(aMediaDescriptor[utl::MediaDescriptor::PROP_INPUTSTREAM()], UNO_QUERY); + xStatus.set(aMediaDescriptor[utl::MediaDescriptor::PROP_STATUSINDICATOR()], UNO_QUERY); if (isStreamGZip(xInputStream)) { diff --git a/filter/source/svg/test/svg2odf.cxx b/filter/source/svg/test/svg2odf.cxx index 46771bdce101..a8620b13d8a6 100644 --- a/filter/source/svg/test/svg2odf.cxx +++ b/filter/source/svg/test/svg2odf.cxx @@ -94,8 +94,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) try { xCtx = ::cppu::defaultBootstrap_InitialComponentContext(aIniUrl); - xFactory = uno::Reference< lang::XMultiServiceFactory >(xCtx->getServiceManager(), - uno::UNO_QUERY); + xFactory.set(xCtx->getServiceManager(), uno::UNO_QUERY); if (!xFactory.is()) { OSL_TRACE( "Could not bootstrap UNO, installation must be in disorder. Exiting." ); diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx index a834e649ca1e..c689a2c1a633 100644 --- a/filter/source/t602/t602filter.cxx +++ b/filter/source/t602/t602filter.cxx @@ -270,7 +270,7 @@ bool SAL_CALL T602ImportFilter::importImpl( const Sequence< css::beans::Property // An XML import service: what we push sax messages to.. OUString sXMLImportService ( "com.sun.star.comp.Writer.XMLImporter" ); - mxHandler = Reference< XDocumentHandler >( mxMSF->createInstance( sXMLImportService ), UNO_QUERY ); + mxHandler.set( mxMSF->createInstance( sXMLImportService ), UNO_QUERY ); // The XImporter sets up an empty target document for XDocumentHandler to write to.. Reference < XImporter > xImporter(mxHandler, UNO_QUERY); diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx index b82406e16256..f5e506b4e49b 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx @@ -92,9 +92,9 @@ XMLFilterSettingsDialog::XMLFilterSettingsDialog(vcl::Window* pParent, try { - mxFilterContainer = Reference< XNameContainer >::query( rxContext->getServiceManager()->createInstanceWithContext( "com.sun.star.document.FilterFactory", rxContext ) ); - mxTypeDetection = Reference< XNameContainer >::query( rxContext->getServiceManager()->createInstanceWithContext( "com.sun.star.document.TypeDetection", rxContext ) ); - mxExtendedTypeDetection = Reference< XNameContainer >::query( rxContext->getServiceManager()->createInstanceWithContext( "com.sun.star.document.ExtendedTypeDetectionFactory", rxContext ) ); + mxFilterContainer.set( rxContext->getServiceManager()->createInstanceWithContext( "com.sun.star.document.FilterFactory", rxContext ), UNO_QUERY ); + mxTypeDetection.set( rxContext->getServiceManager()->createInstanceWithContext( "com.sun.star.document.TypeDetection", rxContext ), UNO_QUERY ); + mxExtendedTypeDetection.set( rxContext->getServiceManager()->createInstanceWithContext( "com.sun.star.document.ExtendedTypeDetectionFactory", rxContext ), UNO_QUERY ); SvtPathOptions aOptions; m_sTemplatePath = aOptions.SubstituteVariable( m_sTemplatePath ); @@ -837,7 +837,7 @@ void XMLFilterSettingsDialog::onDelete() if( xFlushable.is() ) xFlushable->flush(); - xFlushable = Reference< XFlushable >::query( mxTypeDetection ); + xFlushable.set( mxTypeDetection, UNO_QUERY ); if( xFlushable.is() ) xFlushable->flush(); diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx index eddaf829e023..2071a134ed20 100644 --- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx @@ -494,8 +494,8 @@ void XMLFilterTestDialog::doExport( Reference< XComponent > xComp ) { try { - xGrfResolver = Reference< XGraphicObjectResolver >::query( xDocFac->createInstance("com.sun.star.document.ExportGraphicObjectResolver") ); - xObjectResolver = Reference< XEmbeddedObjectResolver >::query( xDocFac->createInstance("com.sun.star.document.ExportEmbeddedObjectResolver") ); + xGrfResolver.set( xDocFac->createInstance("com.sun.star.document.ExportGraphicObjectResolver"), UNO_QUERY ); + xObjectResolver.set( xDocFac->createInstance("com.sun.star.document.ExportEmbeddedObjectResolver"), UNO_QUERY ); } catch( const Exception& ) { diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index 2893d52eca0e..19916a4c2cf1 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -609,7 +609,7 @@ void OComboBoxModel::loadData( bool _bForce ) Reference<XIndexAccess> xColumns; if (xSupplyCols.is()) { - xColumns = Reference<XIndexAccess>(xSupplyCols->getColumns(), UNO_QUERY); + xColumns.set(xSupplyCols->getColumns(), UNO_QUERY); DBG_ASSERT(xColumns.is(), "OComboBoxModel::loadData : no columns supplied by the row set !"); } Reference< XPropertySet > xDataField; diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index bc46d588493f..31005fc39bac 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -392,7 +392,7 @@ void ODatabaseForm::impl_construct() // aggregate a row set osl_atomic_increment(&m_refCount); { - m_xAggregate = Reference< XAggregation >( m_xContext->getServiceManager()->createInstanceWithContext(SRV_SDB_ROWSET, m_xContext), UNO_QUERY_THROW ); + m_xAggregate.set( m_xContext->getServiceManager()->createInstanceWithContext(SRV_SDB_ROWSET, m_xContext), UNO_QUERY_THROW ); m_xAggregateAsRowSet.set( m_xAggregate, UNO_QUERY_THROW ); setAggregation( m_xAggregate ); } diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index f9e67b9c4c04..9f0bceb66622 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -518,7 +518,7 @@ OControlModel::OControlModel( { osl_atomic_increment(&m_refCount); { - m_xAggregate = Reference<XAggregation>(m_xContext->getServiceManager()->createInstanceWithContext(_rUnoControlModelTypeName, m_xContext), UNO_QUERY); + m_xAggregate.set(m_xContext->getServiceManager()->createInstanceWithContext(_rUnoControlModelTypeName, m_xContext), UNO_QUERY); setAggregation(m_xAggregate); if ( m_xAggregateSet.is() ) @@ -1971,8 +1971,8 @@ bool OBoundControlModel::connectToField(const Reference<XRowSet>& rForm) m_nFieldType = nFieldType; // listen to changing values m_xField->addPropertyChangeListener( PROPERTY_VALUE, this ); - m_xColumnUpdate = Reference< XColumnUpdate >( m_xField, UNO_QUERY ); - m_xColumn = Reference< XColumn >( m_xField, UNO_QUERY ); + m_xColumnUpdate.set( m_xField, UNO_QUERY ); + m_xColumn.set( m_xField, UNO_QUERY ); sal_Int32 nNullableFlag = ColumnValue::NO_NULLS; m_xField->getPropertyValue(PROPERTY_ISNULLABLE) >>= nNullableFlag; m_bRequired = (ColumnValue::NO_NULLS == nNullableFlag); diff --git a/forms/source/component/FormattedFieldWrapper.cxx b/forms/source/component/FormattedFieldWrapper.cxx index b35160ab0bd8..e7c8f0622b8a 100644 --- a/forms/source/component/FormattedFieldWrapper.cxx +++ b/forms/source/component/FormattedFieldWrapper.cxx @@ -61,12 +61,12 @@ css::uno::Reference<css::uno::XInterface> OFormattedFieldWrapper::createFormatte css::uno::Reference<css::uno::XInterface> xFormattedModel( static_cast<XWeak*>(pModel), css::uno::UNO_QUERY); - pRef->m_xAggregate = Reference<XAggregation> (xFormattedModel, UNO_QUERY); + pRef->m_xAggregate.set(xFormattedModel, UNO_QUERY); OSL_ENSURE(pRef->m_xAggregate.is(), "the OFormattedModel didn't have an XAggregation interface !"); // _before_ setting the delegator, give it to the member references pRef->m_xFormattedPart.set(xFormattedModel, css::uno::UNO_QUERY); - pRef->m_pEditPart = rtl::Reference< OEditModel >(new OEditModel(pRef->m_xContext)); + pRef->m_pEditPart.set(new OEditModel(pRef->m_xContext)); } osl_atomic_increment(&pRef->m_refCount); @@ -95,7 +95,7 @@ Reference< XCloneable > SAL_CALL OFormattedFieldWrapper::createClone() throw (Ru if ( xCloneAccess.is() ) { Reference< XCloneable > xClone = xCloneAccess->createClone(); - xRef->m_xAggregate = Reference< XAggregation >(xClone, UNO_QUERY); + xRef->m_xAggregate.set(xClone, UNO_QUERY); OSL_ENSURE(xRef->m_xAggregate.is(), "invalid aggregate cloned !"); xRef->m_xFormattedPart.set( @@ -103,7 +103,7 @@ Reference< XCloneable > SAL_CALL OFormattedFieldWrapper::createClone() throw (Ru if ( m_pEditPart.is() ) { - xRef->m_pEditPart = rtl::Reference< OEditModel >( new OEditModel(m_pEditPart.get(), m_xContext)); + xRef->m_pEditPart.set( new OEditModel(m_pEditPart.get(), m_xContext) ); } } else @@ -284,15 +284,15 @@ void SAL_CALL OFormattedFieldWrapper::read(const Reference<XObjectInputStream>& if (!pBasicReader->lastReadWasFormattedFake()) { // yes -> all fine - m_xAggregate = Reference< XAggregation >( pBasicReader.get() ); + m_xAggregate.set( pBasicReader.get() ); } else { // no -> substitute it with a formatted model // let the formmatted model do the reading - m_xFormattedPart = Reference< XPersistObject >(new OFormattedModel(m_xContext)); + m_xFormattedPart.set(new OFormattedModel(m_xContext)); m_xFormattedPart->read(_rxInStream); m_pEditPart = pBasicReader; - m_xAggregate = Reference< XAggregation >( m_xFormattedPart, UNO_QUERY ); + m_xAggregate.set( m_xFormattedPart, UNO_QUERY ); } } @@ -321,7 +321,7 @@ void OFormattedFieldWrapper::ensureAggregate() xEditModel.set(static_cast<XWeak*>(pModel), css::uno::UNO_QUERY); } - m_xAggregate = Reference<XAggregation> (xEditModel, UNO_QUERY); + m_xAggregate.set(xEditModel, UNO_QUERY); DBG_ASSERT(m_xAggregate.is(), "OFormattedFieldWrapper::ensureAggregate : the OEditModel didn't have an XAggregation interface !"); { diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index 24e456ffa61e..ca1cb8b6b236 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -868,7 +868,7 @@ namespace frm Reference<XIndexAccess> xColumns; if (xSupplyCols.is()) { - xColumns = Reference<XIndexAccess>(xSupplyCols->getColumns(), UNO_QUERY); + xColumns.set(xSupplyCols->getColumns(), UNO_QUERY); DBG_ASSERT(xColumns.is(), "OListBoxModel::loadData : no columns supplied by the row set !"); } diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx index 776b1a9f189e..53dd2f41416a 100644 --- a/forms/source/runtime/formoperations.cxx +++ b/forms/source/runtime/formoperations.cxx @@ -662,7 +662,7 @@ namespace frm if ( xConfirmDelete.is() ) { RowChangeEvent aEvent; - aEvent.Source = Reference< XInterface >( m_xCursor, UNO_QUERY ); + aEvent.Source.set( m_xCursor, UNO_QUERY ); aEvent.Action = RowChangeAction::DELETE; aEvent.Rows = 1; bSuccess = xConfirmDelete->confirmDelete( aEvent ); diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx index 3da165ef4837..4095073e1e3a 100644 --- a/forms/source/xforms/model.cxx +++ b/forms/source/xforms/model.cxx @@ -157,9 +157,7 @@ EvaluationContext Model::getEvaluationContext() // no element found? Then insert default element 'instanceData' if( ! xElement.is() ) { - xElement = Reference<XNode>( - xInstance->createElement( "instanceData" ), - UNO_QUERY_THROW ); + xElement.set( xInstance->createElement( "instanceData" ), UNO_QUERY_THROW ); xInstance->appendChild( xElement ); } @@ -327,7 +325,7 @@ bool Model::setSimpleContent( const XNode_t& xConstNode, // create text node, if none is found if( ! xChild.is() ) { - xChild = Reference<XNode>( + xChild.set( xNode->getOwnerDocument()->createTextNode( OUString() ), UNO_QUERY_THROW ); xNode->appendChild( xChild ); diff --git a/forms/source/xforms/submission.cxx b/forms/source/xforms/submission.cxx index fbbd6a77b51a..0ec72bc5456f 100644 --- a/forms/source/xforms/submission.cxx +++ b/forms/source/xforms/submission.cxx @@ -591,8 +591,7 @@ Reference< XDocumentFragment > Submission::createSubmissionDocument(const Refere { aListItem = aList->item(i); if (aListItem->getNodeType()==NodeType_DOCUMENT_NODE) - aListItem = Reference< XNode >( - (Reference< XDocument >(aListItem, UNO_QUERY))->getDocumentElement(), UNO_QUERY); + aListItem.set( (Reference< XDocument >(aListItem, UNO_QUERY))->getDocumentElement(), UNO_QUERY); // copy relevant nodes from instance into fragment _cloneNodes(*getModelImpl(), aFragment, aListItem, bRemoveWSNodes); } diff --git a/forms/source/xforms/submission/replace.cxx b/forms/source/xforms/submission/replace.cxx index 0abdab0c8dcd..0cbc86fefeb0 100644 --- a/forms/source/xforms/submission/replace.cxx +++ b/forms/source/xforms/submission/replace.cxx @@ -56,10 +56,10 @@ CSubmission::SubmissionResult CSubmission::replace(const OUString& aReplace, con || aReplace.equalsIgnoreAsciiCase("document")) { Reference< XComponentLoader > xLoader; if (aFrame.is()) - xLoader = Reference< XComponentLoader >(aFrame, UNO_QUERY); + xLoader.set(aFrame, UNO_QUERY); if (!xLoader.is()) - xLoader = Reference< XComponentLoader >( Desktop::create(xContext), UNO_QUERY_THROW); + xLoader.set( Desktop::create(xContext), UNO_QUERY_THROW); // open the stream from the result... // build media descriptor @@ -124,7 +124,7 @@ CSubmission::SubmissionResult CSubmission::replace(const OUString& aReplace, con InteractionHandler::createWithParent(m_xContext, 0), UNO_QUERY_THROW); CProgressHandlerHelper *pProgressHelper = new CProgressHandlerHelper; - pHelper->m_aProgressHandler = Reference< XProgressHandler >(pProgressHelper); + pHelper->m_aProgressHandler.set(pProgressHelper); // UCB has ownership of environment... _rOutEnv = pHelper; diff --git a/forms/source/xforms/submission/serialization_urlencoded.cxx b/forms/source/xforms/submission/serialization_urlencoded.cxx index 221ccc10f88f..a3dddb11c9fb 100644 --- a/forms/source/xforms/submission/serialization_urlencoded.cxx +++ b/forms/source/xforms/submission/serialization_urlencoded.cxx @@ -127,7 +127,7 @@ void CSerializationURLEncoded::serialize_node(const Reference< XNode >& aNode) aChild = aChildList->item(i); if (aChild->getNodeType() == NodeType_TEXT_NODE) { - aText = Reference< XText >(aChild, UNO_QUERY); + aText.set(aChild, UNO_QUERY); aValue.append(aText->getData()); } } diff --git a/forms/source/xforms/submission/submission_get.cxx b/forms/source/xforms/submission/submission_get.cxx index e5cfd3b2e5e4..e638213828e8 100644 --- a/forms/source/xforms/submission/submission_get.cxx +++ b/forms/source/xforms/submission/submission_get.cxx @@ -64,7 +64,7 @@ CSubmission::SubmissionResult CSubmissionGet::submit(const css::uno::Reference< pHelper->m_aInteractionHandler.set( css::task::InteractionHandler::createWithParent(m_xContext, 0), UNO_QUERY_THROW); CProgressHandlerHelper *pProgressHelper = new CProgressHandlerHelper; - pHelper->m_aProgressHandler = css::uno::Reference< XProgressHandler >(pProgressHelper); + pHelper->m_aProgressHandler.set(pProgressHelper); // UCB has ownership of environment... css::uno::Reference< XCommandEnvironment > aEnvironment(pHelper); diff --git a/fpicker/source/office/fpinteraction.cxx b/fpicker/source/office/fpinteraction.cxx index d82612c13a76..a991e3044529 100644 --- a/fpicker/source/office/fpinteraction.cxx +++ b/fpicker/source/office/fpinteraction.cxx @@ -66,13 +66,13 @@ namespace svt for (sal_Int32 i=0; i<lConts.getLength(); ++i) { if (!xAbort.is()) - xAbort = Reference< XInteractionAbort >(pConts[i], UNO_QUERY); + xAbort.set(pConts[i], UNO_QUERY); if (!xApprove.is()) - xApprove = Reference< XInteractionApprove >(pConts[i], UNO_QUERY); + xApprove.set(pConts[i], UNO_QUERY); if (!xDisapprove.is()) - xDisapprove = Reference< XInteractionDisapprove >(pConts[i], UNO_QUERY); + xDisapprove.set(pConts[i], UNO_QUERY); if (!xRetry.is()) - xRetry = Reference< XInteractionRetry >(pConts[i], UNO_QUERY); + xRetry.set(pConts[i], UNO_QUERY); } // safe the original request for later analyzing! diff --git a/fpicker/source/win32/filepicker/FilePicker.cxx b/fpicker/source/win32/filepicker/FilePicker.cxx index b08e53b68ccf..9a3c4552db27 100644 --- a/fpicker/source/win32/filepicker/FilePicker.cxx +++ b/fpicker/source/win32/filepicker/FilePicker.cxx @@ -135,7 +135,7 @@ void SAL_CALL CFilePicker::disposing(const lang::EventObject& aEvent) throw(uno: void SAL_CALL CFilePicker::fileSelectionChanged(FilePickerEvent aEvent) { - aEvent.Source = uno::Reference<uno::XInterface>(static_cast<XFilePickerNotifier*>(this)); + aEvent.Source.set(static_cast<XFilePickerNotifier*>(this)); m_aAsyncEventNotifier.notifyEvent( new CFilePickerParamEventNotification(&XFilePickerListener::fileSelectionChanged,aEvent)); } @@ -146,7 +146,7 @@ void SAL_CALL CFilePicker::fileSelectionChanged(FilePickerEvent aEvent) void SAL_CALL CFilePicker::directoryChanged(FilePickerEvent aEvent) { - aEvent.Source = uno::Reference<uno::XInterface>(static_cast<XFilePickerNotifier*>(this)); + aEvent.Source.set(static_cast<XFilePickerNotifier*>(this)); m_aAsyncEventNotifier.notifyEvent( new CFilePickerParamEventNotification(&XFilePickerListener::directoryChanged,aEvent)); } @@ -157,7 +157,7 @@ void SAL_CALL CFilePicker::directoryChanged(FilePickerEvent aEvent) void SAL_CALL CFilePicker::controlStateChanged(FilePickerEvent aEvent) { - aEvent.Source = uno::Reference<uno::XInterface>(static_cast<XFilePickerNotifier*>(this)); + aEvent.Source.set(static_cast<XFilePickerNotifier*>(this)); m_aAsyncEventNotifier.notifyEvent( new CFilePickerParamEventNotification(&XFilePickerListener::controlStateChanged,aEvent)); } diff --git a/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx b/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx index 7c4a54e6386c..ae561b4487d4 100644 --- a/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx +++ b/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx @@ -91,10 +91,7 @@ int SAL_CALL main(int /*nArgc*/, char* /*Argv[]*/, char* /*Env[]*/ ) // try to get an Interface to a XFilePicker Service - Reference< XFolderPicker2 > xFolderPicker; - - xFolderPicker = Reference< XFolderPicker2 >( - g_xFactory->createInstance( FOLDER_PICKER_SERVICE_NAME), UNO_QUERY ); + Reference< XFolderPicker2 > xFolderPicker( g_xFactory->createInstance( FOLDER_PICKER_SERVICE_NAME ), UNO_QUERY ); if ( xFolderPicker.is() == sal_False ) { |