diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-05 12:55:32 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-05 13:32:16 +0200 |
commit | 281296330735158d6265e0b146b5d5301f6e610e (patch) | |
tree | ee8235f54b59dbec8d13f12b0bafa62e61ab9ad1 | |
parent | 75da22e3ce80f8dcdeef0488b22c4dc522c2ec29 (diff) |
use uno::Reference::set method instead of assignment
Change-Id: I31a69a997098eb1807361b8049c3312a4f287d75
-rw-r--r-- | vcl/osx/DragSource.cxx | 4 | ||||
-rw-r--r-- | vcl/osx/DropTarget.cxx | 4 | ||||
-rw-r--r-- | vcl/osx/a11ycomponentwrapper.mm | 2 | ||||
-rw-r--r-- | vcl/osx/a11ywrapper.mm | 24 | ||||
-rw-r--r-- | vcl/osx/service_entry.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/FilterConfigItem.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/print.cxx | 2 | ||||
-rw-r--r-- | vcl/source/opengl/OpenGLHelper.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk/gdi/salprn-gtk.cxx | 14 | ||||
-rw-r--r-- | vcl/unx/gtk/window/gtksalframe.cxx | 2 | ||||
-rw-r--r-- | vcl/workben/mtfdemo.cxx | 3 | ||||
-rw-r--r-- | vcl/workben/vcldemo.cxx | 3 | ||||
-rw-r--r-- | winaccessibility/source/service/AccObject.cxx | 4 | ||||
-rw-r--r-- | writerfilter/qa/cppunittests/rtftok/testrtftok.cxx | 2 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 26 | ||||
-rw-r--r-- | writerfilter/source/dmapper/FormControlHelper.cxx | 6 | ||||
-rw-r--r-- | writerfilter/source/dmapper/GraphicImport.cxx | 2 | ||||
-rw-r--r-- | writerfilter/source/dmapper/PropertyMap.cxx | 24 | ||||
-rw-r--r-- | writerfilter/source/dmapper/StyleSheetTable.cxx | 8 |
19 files changed, 64 insertions, 72 deletions
diff --git a/vcl/osx/DragSource.cxx b/vcl/osx/DragSource.cxx index d2ce6d103975..bc3ee9700284 100644 --- a/vcl/osx/DragSource.cxx +++ b/vcl/osx/DragSource.cxx @@ -123,7 +123,7 @@ Sequence<OUString> dragSource_getSupportedServiceNames() bDropSuccess ); mDragSource->mXDragSrcListener->dragDropEnd(dsde); - mDragSource->mXDragSrcListener = uno::Reference<XDragSourceListener>(); + mDragSource->mXDragSrcListener.clear(); } -(void)draggedImage:(NSImage *)draggedImage movedTo:(NSPoint)screenPoint @@ -276,7 +276,7 @@ void SAL_CALL DragSource::startDrag(const DragGestureEvent& trigger, [dragImage release]; - g_XTransferable = uno::Reference<XTransferable>(); + g_XTransferable.clear(); g_DragSourceView = nil; // reset drop success flags diff --git a/vcl/osx/DropTarget.cxx b/vcl/osx/DropTarget.cxx index 3c836eea31d5..bd7467db64cf 100644 --- a/vcl/osx/DropTarget.cxx +++ b/vcl/osx/DropTarget.cxx @@ -338,7 +338,7 @@ void DropTarget::concludeDragOperation(id /*sender*/) { mDragSourceSupportedActions = DNDConstants::ACTION_NONE; mSelectedDropAction = DNDConstants::ACTION_NONE; - mXCurrentDragClipboard = uno::Reference<XClipboard>(); + mXCurrentDragClipboard.clear(); [[NSCursor arrowCursor] set]; } @@ -438,7 +438,7 @@ void SAL_CALL DropTarget::dropComplete(sal_Bool success) throw (RuntimeException { // Reset the internal transferable used as shortcut in case this is // an internal D&D operation - DragSource::g_XTransferable = uno::Reference<XTransferable>(); + DragSource::g_XTransferable.clear(); DragSource::g_DropSuccessSet = true; DragSource::g_DropSuccess = success; } diff --git a/vcl/osx/a11ycomponentwrapper.mm b/vcl/osx/a11ycomponentwrapper.mm index 5b61c1257ca7..d7d0327b7b8a 100644 --- a/vcl/osx/a11ycomponentwrapper.mm +++ b/vcl/osx/a11ycomponentwrapper.mm @@ -85,7 +85,7 @@ using namespace ::com::sun::star::uno; if ( rxParent.is() ) { Reference < XAccessibleContext > rxContext = rxParent->getAccessibleContext(); if ( rxContext.is() && rxContext -> getAccessibleRole() == AccessibleRole::PANEL ) { - Reference < XAccessibleComponent > rxComponent = Reference < XAccessibleComponent > ( rxParent -> getAccessibleContext(), UNO_QUERY ); + Reference < XAccessibleComponent > rxComponent( rxParent -> getAccessibleContext(), UNO_QUERY ); if ( rxComponent.is() ) { rxComponent -> grabFocus(); } diff --git a/vcl/osx/a11ywrapper.mm b/vcl/osx/a11ywrapper.mm index a90f917f3813..cd6a28b3d041 100644 --- a/vcl/osx/a11ywrapper.mm +++ b/vcl/osx/a11ywrapper.mm @@ -83,27 +83,27 @@ static std::ostream &operator<<(std::ostream &s, NSObject *obj) { // Querying all supported interfaces try { // XAccessibleComponent - mpReferenceWrapper -> rAccessibleComponent = Reference < XAccessibleComponent > ( rxAccessibleContext, UNO_QUERY ); + mpReferenceWrapper->rAccessibleComponent.set( rxAccessibleContext, UNO_QUERY ); // XAccessibleExtendedComponent - mpReferenceWrapper -> rAccessibleExtendedComponent = Reference < XAccessibleExtendedComponent > ( rxAccessibleContext, UNO_QUERY ); + mpReferenceWrapper->rAccessibleExtendedComponent.set( rxAccessibleContext, UNO_QUERY ); // XAccessibleSelection - mpReferenceWrapper -> rAccessibleSelection = Reference< XAccessibleSelection > ( rxAccessibleContext, UNO_QUERY ); + mpReferenceWrapper->rAccessibleSelection.set( rxAccessibleContext, UNO_QUERY ); // XAccessibleTable - mpReferenceWrapper -> rAccessibleTable = Reference < XAccessibleTable > ( rxAccessibleContext, UNO_QUERY ); + mpReferenceWrapper->rAccessibleTable.set( rxAccessibleContext, UNO_QUERY ); // XAccessibleText - mpReferenceWrapper -> rAccessibleText = Reference < XAccessibleText > ( rxAccessibleContext, UNO_QUERY ); + mpReferenceWrapper->rAccessibleText.set( rxAccessibleContext, UNO_QUERY ); // XAccessibleEditableText - mpReferenceWrapper -> rAccessibleEditableText = Reference < XAccessibleEditableText > ( rxAccessibleContext, UNO_QUERY ); + mpReferenceWrapper->rAccessibleEditableText.set( rxAccessibleContext, UNO_QUERY ); // XAccessibleValue - mpReferenceWrapper -> rAccessibleValue = Reference < XAccessibleValue > ( rxAccessibleContext, UNO_QUERY ); + mpReferenceWrapper->rAccessibleValue.set( rxAccessibleContext, UNO_QUERY ); // XAccessibleAction - mpReferenceWrapper -> rAccessibleAction = Reference < XAccessibleAction > ( rxAccessibleContext, UNO_QUERY ); + mpReferenceWrapper->rAccessibleAction.set( rxAccessibleContext, UNO_QUERY ); // XAccessibleTextAttributes - mpReferenceWrapper -> rAccessibleTextAttributes = Reference < XAccessibleTextAttributes > ( rxAccessibleContext, UNO_QUERY ); + mpReferenceWrapper->rAccessibleTextAttributes.set( rxAccessibleContext, UNO_QUERY ); // XAccessibleMultiLineText - mpReferenceWrapper -> rAccessibleMultiLineText = Reference < XAccessibleMultiLineText > ( rxAccessibleContext, UNO_QUERY ); + mpReferenceWrapper->rAccessibleMultiLineText.set( rxAccessibleContext, UNO_QUERY ); // XAccessibleTextMarkup - mpReferenceWrapper -> rAccessibleTextMarkup = Reference < XAccessibleTextMarkup > ( rxAccessibleContext, UNO_QUERY ); + mpReferenceWrapper->rAccessibleTextMarkup.set( rxAccessibleContext, UNO_QUERY ); // XAccessibleEventBroadcaster #if 0 /* #i102033# NSAccessibility does not seemt to know an equivalent for transient children. @@ -313,7 +313,7 @@ static std::ostream &operator<<(std::ostream &s, NSObject *obj) { AccessibleRelation relationMemberOf = rxAccessibleRelationSet -> getRelationByType ( AccessibleRelationType::MEMBER_OF ); if ( relationMemberOf.RelationType == AccessibleRelationType::MEMBER_OF && relationMemberOf.TargetSet.hasElements() ) { for ( int index = 0; index < relationMemberOf.TargetSet.getLength(); index++ ) { - Reference < XAccessible > rMateAccessible = Reference < XAccessible > ( relationMemberOf.TargetSet[index], UNO_QUERY ); + Reference < XAccessible > rMateAccessible( relationMemberOf.TargetSet[index], UNO_QUERY ); if ( rMateAccessible.is() ) { Reference< XAccessibleContext > rMateAccessibleContext( rMateAccessible -> getAccessibleContext() ); if ( rMateAccessibleContext.is() ) { diff --git a/vcl/osx/service_entry.cxx b/vcl/osx/service_entry.cxx index a8ac53c58e8e..3679d9726459 100644 --- a/vcl/osx/service_entry.cxx +++ b/vcl/osx/service_entry.cxx @@ -42,7 +42,7 @@ uno::Reference< XInterface > AquaSalInstance::CreateClipboard( const Sequence< A SalData* pSalData = GetSalData(); if( ! pSalData->mxClipboard.is() ) - pSalData->mxClipboard = uno::Reference<XInterface>(static_cast< XClipboard* >(new AquaClipboard()), UNO_QUERY); + pSalData->mxClipboard.set(static_cast< XClipboard* >(new AquaClipboard()), UNO_QUERY); return pSalData->mxClipboard; } diff --git a/vcl/source/filter/FilterConfigItem.cxx b/vcl/source/filter/FilterConfigItem.cxx index 34ad8af03eda..a70a0c46313a 100644 --- a/vcl/source/filter/FilterConfigItem.cxx +++ b/vcl/source/filter/FilterConfigItem.cxx @@ -137,7 +137,7 @@ void FilterConfigItem::ImpInitTree( const OUString& rSubTree ) "com.sun.star.configuration.ConfigurationUpdateAccess", aArguments ); if ( xUpdatableView.is() ) - xPropSet = Reference< XPropertySet >( xUpdatableView, UNO_QUERY ); + xPropSet.set( xUpdatableView, UNO_QUERY ); } catch ( ::com::sun::star::uno::Exception& ) { diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 88d118ca04ec..6b02440f026e 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -157,7 +157,7 @@ bool PrinterOptions::ReadFromConfig( bool i_bFile ) else aVal.Value <<= OUString( "/org.openoffice.Office.Common/Print/Option/Printer" ); aArgs.getArray()[0] <<= aVal; - xConfigAccess = Reference< XNameAccess >( + xConfigAccess.set( xConfigProvider->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess", aArgs ), UNO_QUERY ); diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx index ae42776b2ac3..a051245d411f 100644 --- a/vcl/source/opengl/OpenGLHelper.cxx +++ b/vcl/source/opengl/OpenGLHelper.cxx @@ -837,7 +837,7 @@ void OpenGLWatchdogThread::start() { assert (gxWatchdog == NULL); gpWatchdogExit = osl_createCondition(); - gxWatchdog = rtl::Reference<OpenGLWatchdogThread>(new OpenGLWatchdogThread()); + gxWatchdog.set(new OpenGLWatchdogThread()); gxWatchdog->launch(); } diff --git a/vcl/unx/gtk/gdi/salprn-gtk.cxx b/vcl/unx/gtk/gdi/salprn-gtk.cxx index cf20b2c430eb..ce4088bf971f 100644 --- a/vcl/unx/gtk/gdi/salprn-gtk.cxx +++ b/vcl/unx/gtk/gdi/salprn-gtk.cxx @@ -895,7 +895,7 @@ void GtkPrintDialog::ExportAsPDF(const OUString &rFileURL, GtkPrintSettings *pSe uno::Reference < XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() ); uno::Reference < XFrame > xFrame(xDesktop->getActiveFrame()); if (!xFrame.is()) - xFrame = uno::Reference < XFrame >(xDesktop, UNO_QUERY); + xFrame.set(xDesktop, UNO_QUERY); uno::Reference < XFilter > xFilter( ::comphelper::getProcessServiceFactory()->createInstance("com.sun.star.document.PDFFilter"), @@ -908,7 +908,7 @@ void GtkPrintDialog::ExportAsPDF(const OUString &rFileURL, GtkPrintSettings *pSe if (xFrame.is()) xController = xFrame->getController(); if (xController.is()) - xDoc = uno::Reference< XComponent >(xController->getModel(), UNO_QUERY); + xDoc.set(xController->getModel(), UNO_QUERY); SvFileStream aStream(rFileURL, STREAM_READWRITE | StreamMode::SHARE_DENYWRITE | StreamMode::TRUNC); uno::Reference< XOutputStream > xOStm(new utl::OOutputStreamWrapper(aStream)); @@ -954,15 +954,15 @@ void GtkPrintDialog::ExportAsPDF(const OUString &rFileURL, GtkPrintSettings *pSe uno::Reference< XNamed > xName; if (xController.is()) - xSpreadsheetView = uno::Reference< XSpreadsheetView >(xController, UNO_QUERY); + xSpreadsheetView.set(xController, UNO_QUERY); if (xSpreadsheetView.is()) - xSheet = uno::Reference< XSpreadsheet>(xSpreadsheetView->getActiveSheet()); + xSheet.set(xSpreadsheetView->getActiveSheet()); if (xSheet.is()) - xName = uno::Reference < XNamed >(xSheet, UNO_QUERY); + xName.set(xSheet, UNO_QUERY); if (xName.is()) - xSheetDoc = uno::Reference< XSpreadsheetDocument >(xController->getModel(), UNO_QUERY); + xSheetDoc.set(xController->getModel(), UNO_QUERY); if (xSheetDoc.is()) - xSheets = uno::Reference< XIndexAccess >(xSheetDoc->getSheets(), UNO_QUERY); + xSheets.set(xSheetDoc->getSheets(), UNO_QUERY); if (xSheets.is()) { const OUString &rName = xName->getName(); diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx index 929fa5e54db9..8fe61521902a 100644 --- a/vcl/unx/gtk/window/gtksalframe.cxx +++ b/vcl/unx/gtk/window/gtksalframe.cxx @@ -592,7 +592,7 @@ static void activate_uno(GSimpleAction *action, GVariant*, gpointer) uno::Reference < css::frame::XFrame > xFrame(xDesktop->getActiveFrame()); if (!xFrame.is()) - xFrame = uno::Reference < css::frame::XFrame >(xDesktop, uno::UNO_QUERY); + xFrame.set(xDesktop, uno::UNO_QUERY); if (!xFrame.is()) return; diff --git a/vcl/workben/mtfdemo.cxx b/vcl/workben/mtfdemo.cxx index 404552750c35..3488a1e32b10 100644 --- a/vcl/workben/mtfdemo.cxx +++ b/vcl/workben/mtfdemo.cxx @@ -130,8 +130,7 @@ protected: uno::Reference<uno::XComponentContext> xComponentContext = ::cppu::defaultBootstrap_InitialComponentContext(); - xMSF = uno::Reference<lang::XMultiServiceFactory> - (xComponentContext->getServiceManager(), uno::UNO_QUERY); + xMSF.set(xComponentContext->getServiceManager(), uno::UNO_QUERY); if(!xMSF.is()) Application::Abort("Bootstrap failure - no service manager"); diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 1e7c5cca0b91..0e98530e8d77 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -1864,8 +1864,7 @@ protected: { uno::Reference<uno::XComponentContext> xComponentContext = ::cppu::defaultBootstrap_InitialComponentContext(); - xMSF = uno::Reference<lang::XMultiServiceFactory> - (xComponentContext->getServiceManager(), uno::UNO_QUERY); + xMSF.set(xComponentContext->getServiceManager(), uno::UNO_QUERY); if(!xMSF.is()) Application::Abort("Bootstrap failure - no service manager"); diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx index 17d35bdd5294..050b83b8c2c4 100644 --- a/winaccessibility/source/service/AccObject.cxx +++ b/winaccessibility/source/service/AccObject.cxx @@ -160,7 +160,7 @@ AccObject::AccObject(XAccessible* pAcc, AccObjectManagerAgent* pAgent, ImplInitializeCreateObj(); m_xAccContextRef = m_xAccRef->getAccessibleContext(); - m_xAccActionRef = Reference< XAccessibleAction > (m_xAccContextRef,UNO_QUERY); + m_xAccActionRef.set(m_xAccContextRef,UNO_QUERY); m_accRole = m_xAccContextRef -> getAccessibleRole(); if( m_pIMAcc ) { @@ -302,7 +302,7 @@ void AccObject::UpdateDescription() */ void AccObject::UpdateAction() { - m_xAccActionRef = Reference< XAccessibleAction > (m_xAccContextRef,UNO_QUERY); + m_xAccActionRef.set(m_xAccContextRef,UNO_QUERY); if( m_xAccActionRef.is() && m_pIMAcc ) { diff --git a/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx b/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx index 1f3a9b461d94..8c31f92abe9a 100644 --- a/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx +++ b/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx @@ -50,7 +50,7 @@ void RtfTest::setUp() { test::BootstrapFixture::setUp(); - m_xFilter = uno::Reference< document::XFilter >(m_xSFactory->createInstance("com.sun.star.comp.Writer.RtfFilter"), uno::UNO_QUERY_THROW); + m_xFilter.set(m_xSFactory->createInstance("com.sun.star.comp.Writer.RtfFilter"), uno::UNO_QUERY_THROW); } bool RtfTest::load(const OUString&, diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index c51d4eac0390..1c2778e8ee3f 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -242,7 +242,7 @@ DomainMapper_Impl::DomainMapper_Impl( { appendTableManager( ); GetBodyText(); - uno::Reference< text::XTextAppend > xBodyTextAppend = uno::Reference< text::XTextAppend >( m_xBodyText, uno::UNO_QUERY ); + uno::Reference< text::XTextAppend > xBodyTextAppend( m_xBodyText, uno::UNO_QUERY ); m_aTextAppendStack.push(TextAppendContext(xBodyTextAppend, m_bIsNewDoc ? uno::Reference<text::XTextCursor>() : m_xBodyText->createTextCursorByRange(m_xInsertTextRange))); @@ -301,8 +301,7 @@ uno::Reference< beans::XPropertySet > DomainMapper_Impl::GetDocumentSettings() { if( !m_xDocumentSettings.is() && m_xTextFactory.is()) { - m_xDocumentSettings = uno::Reference< beans::XPropertySet >( - m_xTextFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY ); + m_xDocumentSettings.set( m_xTextFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY ); } return m_xDocumentSettings; } @@ -1447,7 +1446,7 @@ uno::Reference< beans::XPropertySet > DomainMapper_Impl::appendTextSectionAfter( static const char sSectionService[] = "com.sun.star.text.TextSection"; uno::Reference< text::XTextContent > xSection( m_xTextFactory->createInstance(sSectionService), uno::UNO_QUERY_THROW ); xSection->attach( uno::Reference< text::XTextRange >( xCursor, uno::UNO_QUERY_THROW) ); - xRet = uno::Reference< beans::XPropertySet > (xSection, uno::UNO_QUERY ); + xRet.set(xSection, uno::UNO_QUERY ); } catch(const uno::Exception&) { @@ -1719,9 +1718,8 @@ void DomainMapper_Impl::PushAnnotation() m_bIsInComments = true; if (!GetTextFactory().is()) return; - m_xAnnotationField = uno::Reference< beans::XPropertySet >( GetTextFactory()->createInstance( - "com.sun.star.text.TextField.Annotation" ), - uno::UNO_QUERY_THROW ); + m_xAnnotationField.set( GetTextFactory()->createInstance( "com.sun.star.text.TextField.Annotation" ), + uno::UNO_QUERY_THROW ); uno::Reference< text::XText > xAnnotationText; m_xAnnotationField->getPropertyValue("TextRange") >>= xAnnotationText; m_aTextAppendStack.push(TextAppendContext(uno::Reference< text::XTextAppend >( xAnnotationText, uno::UNO_QUERY_THROW ), @@ -2607,16 +2605,14 @@ uno::Reference<beans::XPropertySet> DomainMapper_Impl::FindOrCreateFieldMaster(c if(xFieldMasterAccess->hasByName(sFieldMasterName)) { //get the master - xMaster = uno::Reference< beans::XPropertySet >(xFieldMasterAccess->getByName(sFieldMasterName), - uno::UNO_QUERY_THROW); + xMaster.set(xFieldMasterAccess->getByName(sFieldMasterName), uno::UNO_QUERY_THROW); } else { //create the master - xMaster = uno::Reference< beans::XPropertySet >( - m_xTextFactory->createInstance(sFieldMasterService), uno::UNO_QUERY_THROW); + xMaster.set( m_xTextFactory->createInstance(sFieldMasterService), uno::UNO_QUERY_THROW); //set the master's name - xMaster->setPropertyValue( + xMaster->setPropertyValue( getPropertyName(PROP_NAME), uno::makeAny(rFieldMasterName)); } @@ -3623,7 +3619,7 @@ void DomainMapper_Impl::CloseFieldCommand() if (m_xTextFactory.is()) { xFieldInterface = m_xTextFactory->createInstance(sServiceName); - xFieldProperties = uno::Reference< beans::XPropertySet >( xFieldInterface, uno::UNO_QUERY_THROW); + xFieldProperties.set( xFieldInterface, uno::UNO_QUERY_THROW); } } switch( aIt->second.eFieldId ) @@ -4480,9 +4476,9 @@ void DomainMapper_Impl::PopFieldContext() } else { - xToInsert = uno::Reference< text::XTextContent >(pContext->GetTC(), uno::UNO_QUERY); + xToInsert.set(pContext->GetTC(), uno::UNO_QUERY); if( !xToInsert.is() && !m_bStartTOC && !m_bStartIndex && !m_bStartBibliography ) - xToInsert = uno::Reference< text::XTextContent >(pContext->GetTextField(), uno::UNO_QUERY); + xToInsert.set( pContext->GetTextField(), uno::UNO_QUERY); if( xToInsert.is() && !m_bStartTOC && !m_bStartIndex && !m_bStartBibliography) { PropertyMap aMap; diff --git a/writerfilter/source/dmapper/FormControlHelper.cxx b/writerfilter/source/dmapper/FormControlHelper.cxx index 1e2d4912f901..c35edcfce1f1 100644 --- a/writerfilter/source/dmapper/FormControlHelper.cxx +++ b/writerfilter/source/dmapper/FormControlHelper.cxx @@ -75,7 +75,7 @@ uno::Reference<drawing::XDrawPage> FormControlHelper::FormControlHelper_Impl::ge uno::Reference<lang::XMultiServiceFactory> FormControlHelper::FormControlHelper_Impl::getServiceFactory() { if (! rServiceFactory.is()) - rServiceFactory = uno::Reference<lang::XMultiServiceFactory>(rTextDocument, uno::UNO_QUERY); + rServiceFactory.set(rTextDocument, uno::UNO_QUERY); return rServiceFactory; } @@ -110,7 +110,7 @@ uno::Reference<form::XForm> FormControlHelper::FormControlHelper_Impl::getForm() xFormProperties->setPropertyValue("Name", aAny); } - rForm = uno::Reference<form::XForm>(xForm, uno::UNO_QUERY); + rForm.set(xForm, uno::UNO_QUERY); uno::Reference<container::XIndexContainer> xForms(xFormsNamedContainer, uno::UNO_QUERY); uno::Any aAny(xForm); @@ -157,7 +157,7 @@ bool FormControlHelper::createCheckbox(uno::Reference<text::XTextRange> const& x if (!xInterface.is()) return false; - m_pImpl->rFormComponent = uno::Reference<form::XFormComponent>(xInterface, uno::UNO_QUERY); + m_pImpl->rFormComponent.set(xInterface, uno::UNO_QUERY); if (!m_pImpl->rFormComponent.is()) return false; diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index a384deaf9e24..9cd8852a781f 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -1143,7 +1143,7 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b uno::makeAny( m_pImpl->eGraphicImportType == IMPORT_AS_DETECTED_ANCHOR ? text::TextContentAnchorType_AT_CHARACTER : text::TextContentAnchorType_AS_CHARACTER )); - xGraphicObject = uno::Reference< text::XTextContent >( xGraphicObjectProperties, uno::UNO_QUERY_THROW ); + xGraphicObject.set( xGraphicObjectProperties, uno::UNO_QUERY_THROW ); //shapes have only one border table::BorderLine2 aBorderLine; diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index afff853767ae..536a00c075e9 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -502,9 +502,8 @@ uno::Reference< beans::XPropertySet > SectionPropertyMap::GetPageStyle( { uno::Sequence< OUString > aPageStyleNames = xPageStyles->getElementNames(); m_sFirstPageStyleName = lcl_FindUnusedPageStyleName(aPageStyleNames); - m_aFirstPageStyle = uno::Reference< beans::XPropertySet > ( - xTextFactory->createInstance("com.sun.star.style.PageStyle"), - uno::UNO_QUERY); + m_aFirstPageStyle.set( xTextFactory->createInstance("com.sun.star.style.PageStyle"), + uno::UNO_QUERY); // Call insertByName() before GetPageStyle(), otherwise the // first and the follow page style will have the same name, and @@ -530,9 +529,8 @@ uno::Reference< beans::XPropertySet > SectionPropertyMap::GetPageStyle( { uno::Sequence< OUString > aPageStyleNames = xPageStyles->getElementNames(); m_sFollowPageStyleName = lcl_FindUnusedPageStyleName(aPageStyleNames); - m_aFollowPageStyle = uno::Reference< beans::XPropertySet > ( - xTextFactory->createInstance("com.sun.star.style.PageStyle"), - uno::UNO_QUERY); + m_aFollowPageStyle.set( xTextFactory->createInstance("com.sun.star.style.PageStyle"), + uno::UNO_QUERY); xPageStyles->insertByName( m_sFollowPageStyleName, uno::makeAny(m_aFollowPageStyle) ); } else if(!m_aFollowPageStyle.is() && xPageStyles.is() ) @@ -959,10 +957,10 @@ uno::Reference<beans::XPropertySet> lcl_GetRangeProperties(bool bIsFirstSection, { uno::Reference<container::XEnumerationAccess> xEnumAccess(rDM_Impl.GetBodyText(), uno::UNO_QUERY_THROW); uno::Reference<container::XEnumeration> xEnum = xEnumAccess->createEnumeration(); - xRangeProperties = uno::Reference<beans::XPropertySet>(xEnum->nextElement(), uno::UNO_QUERY_THROW); + xRangeProperties.set(xEnum->nextElement(), uno::UNO_QUERY_THROW); } else if (xStartingRange.is()) - xRangeProperties = uno::Reference<beans::XPropertySet>(xStartingRange, uno::UNO_QUERY_THROW); + xRangeProperties.set(xStartingRange, uno::UNO_QUERY_THROW); return xRangeProperties; } @@ -1036,12 +1034,12 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl ) uno::Reference< beans::XPropertySet > xRangeProperties; if( m_xStartingRange.is() ) { - xRangeProperties = uno::Reference< beans::XPropertySet >( m_xStartingRange, uno::UNO_QUERY_THROW ); + xRangeProperties.set( m_xStartingRange, uno::UNO_QUERY_THROW ); } else { //set the start value at the beginning of the document - xRangeProperties = uno::Reference< beans::XPropertySet >( rDM_Impl.GetTextDocument()->getText()->getStart(), uno::UNO_QUERY_THROW ); + xRangeProperties.set( rDM_Impl.GetTextDocument()->getText()->getStart(), uno::UNO_QUERY_THROW ); } xRangeProperties->setPropertyValue( getPropertyName( PROP_PARA_LINE_NUMBER_START_VALUE ), uno::makeAny( m_nLnnMin )); } @@ -1091,12 +1089,12 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl ) uno::Reference< beans::XPropertySet > xRangeProperties; if( m_xStartingRange.is() ) { - xRangeProperties = uno::Reference< beans::XPropertySet >( m_xStartingRange, uno::UNO_QUERY_THROW ); + xRangeProperties.set( m_xStartingRange, uno::UNO_QUERY_THROW ); } else { //set the start value at the beginning of the document - xRangeProperties = uno::Reference< beans::XPropertySet >( rDM_Impl.GetTextDocument()->getText()->getStart(), uno::UNO_QUERY_THROW ); + xRangeProperties.set( rDM_Impl.GetTextDocument()->getText()->getStart(), uno::UNO_QUERY_THROW ); } xRangeProperties->setPropertyValue(getPropertyName(PROP_BREAK_TYPE), uno::makeAny(style::BreakType_COLUMN_BEFORE)); } @@ -1193,7 +1191,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl ) try { uno::Reference< beans::XPropertySet > xDocProperties; - xDocProperties = uno::Reference< beans::XPropertySet >( rDM_Impl.GetTextDocument(), uno::UNO_QUERY_THROW ); + xDocProperties.set( rDM_Impl.GetTextDocument(), uno::UNO_QUERY_THROW ); bool bSquaredPageMode = false; Insert(PROP_GRID_STANDARD_MODE, uno::makeAny( !bSquaredPageMode )); xDocProperties->setPropertyValue("DefaultPageMode", uno::makeAny( bSquaredPageMode )); diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index c062917dc8fa..31206a7cefcc 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -975,11 +975,11 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) else { bInsert = true; - xStyle = uno::Reference< style::XStyle >(xDocFactory->createInstance( - bParaStyle ? + xStyle.set(xDocFactory->createInstance( + bParaStyle ? getPropertyName( PROP_SERVICE_PARA_STYLE ) : (bListStyle ? OUString("com.sun.star.style.NumberingStyle") : getPropertyName( PROP_SERVICE_CHAR_STYLE ))), - uno::UNO_QUERY_THROW); + uno::UNO_QUERY_THROW); // Numbering styles have to be inserted early, as e.g. the NumberingRules property is only available after insertion. if (bListStyle) @@ -1493,7 +1493,7 @@ void StyleSheetTable::applyDefaults(bool bParaProperties) try{ if(!m_pImpl->m_xTextDefaults.is()) { - m_pImpl->m_xTextDefaults = uno::Reference< beans::XPropertySet>( + m_pImpl->m_xTextDefaults.set( m_pImpl->m_rDMapper.GetTextFactory()->createInstance("com.sun.star.text.Defaults"), uno::UNO_QUERY_THROW ); } |