diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-29 15:48:45 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-10-30 08:10:22 +0200 |
commit | 065c8b48a604b70140862d0d02deb584626d6994 (patch) | |
tree | 578c07b470b8ec9e5908d224c2fbf33cadda5adf /chart2 | |
parent | addb63fa8ac9fa1a29a00e886e7ae177b604494c (diff) |
use uno::Reference::set method instead of assignment
Change-Id: I58410209f32f988f258a588364e0b037c2790211
Diffstat (limited to 'chart2')
24 files changed, 44 insertions, 50 deletions
diff --git a/chart2/source/controller/accessibility/AccessibleChartElement.cxx b/chart2/source/controller/accessibility/AccessibleChartElement.cxx index b92b64cd6bba..767cfba4c932 100644 --- a/chart2/source/controller/accessibility/AccessibleChartElement.cxx +++ b/chart2/source/controller/accessibility/AccessibleChartElement.cxx @@ -175,8 +175,7 @@ Reference< awt::XFont > SAL_CALL AccessibleChartElement::getFont() Reference< awt::XFont > xFont; // using assignment for broken gcc 3.3 - Reference< awt::XDevice > xDevice = Reference< awt::XDevice >( - Reference< awt::XWindow >( GetInfo().m_xWindow ), uno::UNO_QUERY ); + Reference< awt::XDevice > xDevice( Reference< awt::XWindow >( GetInfo().m_xWindow ), uno::UNO_QUERY ); if( xDevice.is()) { diff --git a/chart2/source/controller/accessibility/AccessibleChartView.cxx b/chart2/source/controller/accessibility/AccessibleChartView.cxx index 4b742f17a54c..b230b978c884 100644 --- a/chart2/source/controller/accessibility/AccessibleChartView.cxx +++ b/chart2/source/controller/accessibility/AccessibleChartView.cxx @@ -350,7 +350,7 @@ void SAL_CALL AccessibleChartView::selectionChanged( const lang::EventObject& /* Reference< view::XSelectionSupplier > xSelectionSupplier; { MutexGuard aGuard( GetMutex()); - xSelectionSupplier = Reference< view::XSelectionSupplier >(m_xSelectionSupplier); + xSelectionSupplier.set(m_xSelectionSupplier); } if( xSelectionSupplier.is() ) diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx index afdebd1db5ae..9c776ec51228 100644 --- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx +++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx @@ -80,7 +80,7 @@ void Chart2ModelContact::setModel( const ::com::sun::star::uno::Reference< void Chart2ModelContact::clear() { - m_xChartModel = uno::WeakReference< frame::XModel >(0); + m_xChartModel.clear(); m_xChartView.clear(); mpModel = NULL; } @@ -108,7 +108,7 @@ uno::Reference< lang::XUnoTunnel > Chart2ModelContact::getChartView() const Reference<frame::XModel> xModel(m_xChartModel); uno::Reference< lang::XMultiServiceFactory > xFact( xModel, uno::UNO_QUERY ); if( xFact.is() ) - m_xChartView = Reference< lang::XUnoTunnel >( xFact->createInstance( CHART_VIEW_SERVICE_NAME ), uno::UNO_QUERY ); + m_xChartView.set( xFact->createInstance( CHART_VIEW_SERVICE_NAME ), uno::UNO_QUERY ); } return m_xChartView; } diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx index 87427b2a5a91..4b6fe80edd18 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx @@ -634,11 +634,11 @@ void ChartDataWrapper::initDataAccess() if( !xChartDoc.is() ) return; if( xChartDoc->hasInternalDataProvider() ) - m_xDataAccess = Reference< XAnyDescriptionAccess >( xChartDoc->getDataProvider(), uno::UNO_QUERY_THROW ); + m_xDataAccess.set( xChartDoc->getDataProvider(), uno::UNO_QUERY_THROW ); else { //create a separate "internal data provider" that is not connected to the model - m_xDataAccess = Reference< XAnyDescriptionAccess >( ChartModelHelper::createInternalDataProvider( + m_xDataAccess.set( ChartModelHelper::createInternalDataProvider( xChartDoc, false /*bConnectToModel*/ ), uno::UNO_QUERY_THROW ); } } diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx index b93dfc547743..a6ed2f615c75 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx @@ -1088,7 +1088,7 @@ Reference< drawing::XShapes > ChartDocumentWrapper::getAdditionalShapes() const if( !aShapeVector.empty() ) { // create a shape collection - xFoundShapes = uno::Reference< drawing::XShapes >( drawing::ShapeCollection::create( + xFoundShapes.set( drawing::ShapeCollection::create( comphelper::getProcessComponentContext()), uno::UNO_QUERY ); OSL_ENSURE( xFoundShapes.is(), "Couldn't create a shape collection!" ); diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx index 840f79ddf37b..4bb26f973933 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -933,7 +933,7 @@ Reference< drawing::XShape > SAL_CALL DiagramWrapper::getZAxisTitle() Reference< drawing::XShape > xRet; Reference< XAxis > xAxis( getAxis(2) ); if( xAxis.is() ) - xRet = Reference< drawing::XShape >( xAxis->getAxisTitle(), uno::UNO_QUERY ); + xRet.set( xAxis->getAxisTitle(), uno::UNO_QUERY ); return xRet; } @@ -981,7 +981,7 @@ Reference< drawing::XShape > SAL_CALL DiagramWrapper::getXAxisTitle() Reference< drawing::XShape > xRet; Reference< XAxis > xAxis( getAxis(0) ); if( xAxis.is() ) - xRet = Reference< drawing::XShape >( xAxis->getAxisTitle(), uno::UNO_QUERY ); + xRet.set( xAxis->getAxisTitle(), uno::UNO_QUERY ); return xRet; } @@ -1029,7 +1029,7 @@ Reference< drawing::XShape > SAL_CALL DiagramWrapper::getYAxisTitle() Reference< drawing::XShape > xRet; Reference< XAxis > xAxis( getAxis(1) ); if( xAxis.is() ) - xRet = Reference< drawing::XShape >( xAxis->getAxisTitle(), uno::UNO_QUERY ); + xRet.set( xAxis->getAxisTitle(), uno::UNO_QUERY ); return xRet; } @@ -1068,7 +1068,7 @@ Reference< drawing::XShape > SAL_CALL DiagramWrapper::getSecondXAxisTitle() Reference< drawing::XShape > xRet; Reference< XAxis > xAxis( getSecondaryAxis(0) ); if( xAxis.is() ) - xRet = Reference< drawing::XShape >( xAxis->getAxisTitle(), uno::UNO_QUERY ); + xRet.set( xAxis->getAxisTitle(), uno::UNO_QUERY ); return xRet; } @@ -1078,7 +1078,7 @@ Reference< drawing::XShape > SAL_CALL DiagramWrapper::getSecondYAxisTitle() Reference< drawing::XShape > xRet; Reference< XAxis > xAxis( getSecondaryAxis(1) ); if( xAxis.is() ) - xRet = Reference< drawing::XShape >( xAxis->getAxisTitle(), uno::UNO_QUERY ); + xRet.set( xAxis->getAxisTitle(), uno::UNO_QUERY ); return xRet; } diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx index 70c7566a0f7c..72d5e79a4af1 100644 --- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx @@ -188,7 +188,7 @@ void SAL_CALL MinMaxLineWrapper::setPropertyValue( const OUString& rPropertyName Sequence< Reference< chart2::XDataSeries > > aSeriesSeq( xSeriesContainer->getDataSeries() ); if(aSeriesSeq.getLength()) { - xPropSet = Reference< beans::XPropertySet >(aSeriesSeq[0],uno::UNO_QUERY); + xPropSet.set(aSeriesSeq[0],uno::UNO_QUERY); if(xPropSet.is()) { if( rPropertyName == "LineColor" ) @@ -227,7 +227,7 @@ uno::Any SAL_CALL MinMaxLineWrapper::getPropertyValue( const OUString& rProperty Sequence< Reference< chart2::XDataSeries > > aSeriesSeq( xSeriesContainer->getDataSeries() ); if(aSeriesSeq.getLength()) { - xPropSet = Reference< beans::XPropertySet >(aSeriesSeq[0],uno::UNO_QUERY); + xPropSet.set(aSeriesSeq[0],uno::UNO_QUERY); break; } } diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index c002ef8b1dd0..3b9f86aa79a3 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -487,7 +487,7 @@ void SAL_CALL ChartController::attachFrame( SolarMutexGuard aSolarGuard; m_pChartWindow = VclPtr<ChartWindow>::Create(this,pParent,pParent?pParent->GetStyle():0); m_pChartWindow->SetBackground();//no Background - m_xViewWindow = uno::Reference< awt::XWindow >( m_pChartWindow->GetComponentInterface(), uno::UNO_QUERY ); + m_xViewWindow.set( m_pChartWindow->GetComponentInterface(), uno::UNO_QUERY ); m_pChartWindow->Show(); m_apDropTargetHelper.reset( new ChartDropTargetHelper( m_pChartWindow->GetDropTarget(), @@ -841,7 +841,7 @@ void SAL_CALL ChartController::dispose() uno::Reference< view::XSelectionChangeListener > xSelectionChangeListener; uno::Reference< chart2::data::XDataReceiver > xDataReceiver( getModel(), uno::UNO_QUERY ); if( xDataReceiver.is() ) - xSelectionChangeListener = uno::Reference< view::XSelectionChangeListener >( xDataReceiver->getRangeHighlighter(), uno::UNO_QUERY ); + xSelectionChangeListener.set( xDataReceiver->getRangeHighlighter(), uno::UNO_QUERY ); if( xSelectionChangeListener.is() ) { uno::Reference< frame::XController > xController( this ); diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index c6e01a805761..bd91f1c739eb 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -512,7 +512,7 @@ void ChartController::executeDispatch_Copy() } if ( pSelectedObj ) { - xTransferable = Reference< datatransfer::XTransferable >( new ChartTransferable( + xTransferable.set( new ChartTransferable( &m_pDrawModelWrapper->getSdrModel(), pSelectedObj, aSelOID.isAdditionalShape() ) ); } } diff --git a/chart2/source/controller/main/ChartFrameloader.cxx b/chart2/source/controller/main/ChartFrameloader.cxx index ec948277df0b..5669aa88c4fd 100644 --- a/chart2/source/controller/main/ChartFrameloader.cxx +++ b/chart2/source/controller/main/ChartFrameloader.cxx @@ -123,7 +123,7 @@ sal_Bool SAL_CALL ChartFrameLoader::load( const uno::Sequence< beans::PropertyVa uno::Reference< frame::XController > xController = NULL; uno::Reference< awt::XWindow > xComponentWindow = NULL; { - xController = uno::Reference< frame::XController >( + xController.set( m_xCC->getServiceManager()->createInstanceWithContext( CHART_CONTROLLER_SERVICE_IMPLEMENTATION_NAME,m_xCC ) , uno::UNO_QUERY ); diff --git a/chart2/source/controller/main/PositionAndSizeHelper.cxx b/chart2/source/controller/main/PositionAndSizeHelper.cxx index 5283348379cc..ea88fc22bbd4 100644 --- a/chart2/source/controller/main/PositionAndSizeHelper.cxx +++ b/chart2/source/controller/main/PositionAndSizeHelper.cxx @@ -138,7 +138,7 @@ bool PositionAndSizeHelper::moveObject( const OUString& rObjectCID ObjectType eObjectType( ObjectIdentifier::getObjectType( rObjectCID ) ); if(OBJECTTYPE_DIAGRAM==eObjectType || OBJECTTYPE_DIAGRAM_WALL==eObjectType || OBJECTTYPE_DIAGRAM_FLOOR==eObjectType) { - xObjectProp = uno::Reference< beans::XPropertySet >( ObjectIdentifier::getDiagramForCID( rObjectCID, xChartModel ), uno::UNO_QUERY ); + xObjectProp.set( ObjectIdentifier::getDiagramForCID( rObjectCID, xChartModel ), uno::UNO_QUERY ); if(!xObjectProp.is()) return false; } diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx index 162bdf67169c..c4817bf1ae46 100644 --- a/chart2/source/tools/DiagramHelper.cxx +++ b/chart2/source/tools/DiagramHelper.cxx @@ -1056,7 +1056,7 @@ void lcl_switchToDateCategories( const Reference< XChartDocument >& xChartDoc, c sal_Int32 nNumberFormat = -1; xAxisProps->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nNumberFormat; - Reference< util::XNumberFormats > xNumberFormats = Reference< util::XNumberFormats >( xNumberFormatsSupplier->getNumberFormats() ); + Reference< util::XNumberFormats > xNumberFormats( xNumberFormatsSupplier->getNumberFormats() ); if( xNumberFormats.is() ) { Reference< beans::XPropertySet > xKeyProps; diff --git a/chart2/source/tools/ExplicitCategoriesProvider.cxx b/chart2/source/tools/ExplicitCategoriesProvider.cxx index dcfdada76311..56977db55e4b 100644 --- a/chart2/source/tools/ExplicitCategoriesProvider.cxx +++ b/chart2/source/tools/ExplicitCategoriesProvider.cxx @@ -174,8 +174,7 @@ void ExplicitCategoriesProvider::convertCategoryAnysToText( uno::Sequence< OUStr if(!nCount) return; rOutTexts.realloc(nCount); - Reference< util::XNumberFormats > xNumberFormats; - xNumberFormats = Reference< util::XNumberFormats >( rModel.getNumberFormats() ); + Reference< util::XNumberFormats > xNumberFormats( rModel.getNumberFormats() ); sal_Int32 nAxisNumberFormat = 0; Reference< XCoordinateSystem > xCooSysModel( ChartModelHelper::getFirstCoordinateSystem( rModel ) ); @@ -421,8 +420,7 @@ bool lcl_fillDateCategories( const uno::Reference< data::XDataSequence >& xDataS uno::Sequence< uno::Any > aValues = xDataSequence->getData(); sal_Int32 nCount = aValues.getLength(); rDateCategories.reserve(nCount); - Reference< util::XNumberFormats > xNumberFormats; - xNumberFormats = Reference< util::XNumberFormats >( rModel.getNumberFormats() ); + Reference< util::XNumberFormats > xNumberFormats( rModel.getNumberFormats() ); bool bOwnData = false; bool bOwnDataAnddAxisHasAnyFormat = false; diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx index 9a08c904e61d..f05cae23712e 100644 --- a/chart2/source/tools/InternalDataProvider.cxx +++ b/chart2/source/tools/InternalDataProvider.cxx @@ -161,15 +161,13 @@ struct lcl_internalizeSeries : public ::std::unary_function< Reference< chart2:: comphelper::copyProperties( Reference< beans::XPropertySet >( xLabel, uno::UNO_QUERY ), Reference< beans::XPropertySet >( xNewLabel, uno::UNO_QUERY )); - aNewSeriesData[i] = Reference< chart2::data::XLabeledDataSequence >( - new LabeledDataSequence( xNewValues, xNewLabel )); + aNewSeriesData[i].set( new LabeledDataSequence( xNewValues, xNewLabel ) ); } } else { if( m_bConnectToModel ) - aNewSeriesData[i] = Reference< chart2::data::XLabeledDataSequence >( - new LabeledDataSequence( xNewValues )); + aNewSeriesData[i].set( new LabeledDataSequence( xNewValues ) ); } } if( m_bConnectToModel ) diff --git a/chart2/source/tools/LifeTime.cxx b/chart2/source/tools/LifeTime.cxx index 7d6d7249d440..3c40abf9810e 100644 --- a/chart2/source/tools/LifeTime.cxx +++ b/chart2/source/tools/LifeTime.cxx @@ -336,7 +336,7 @@ void CloseableLifeTimeManager::impl_doClose() uno::Reference< util::XCloseable > xCloseable=NULL; try { - xCloseable = uno::Reference< util::XCloseable >(m_pCloseable);; + xCloseable.set(m_pCloseable); if(xCloseable.is()) { //--call notifyClosing on all registered close listeners diff --git a/chart2/source/tools/ObjectIdentifier.cxx b/chart2/source/tools/ObjectIdentifier.cxx index 3b917ac213d5..cac87c78e4de 100644 --- a/chart2/source/tools/ObjectIdentifier.cxx +++ b/chart2/source/tools/ObjectIdentifier.cxx @@ -1330,7 +1330,7 @@ Reference< beans::XPropertySet > ObjectIdentifier::getObjectPropertySet( Reference< XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( rObjectCID, xChartModel ) ); if( xSeries.is() ) - xObjectProperties = Reference< beans::XPropertySet >( xSeries, uno::UNO_QUERY ); + xObjectProperties.set( xSeries, uno::UNO_QUERY ); break; } @@ -1368,7 +1368,7 @@ Reference< beans::XPropertySet > ObjectIdentifier::getObjectPropertySet( errorBar = "ErrorBarZ"; xSeriesProp->getPropertyValue( errorBar ) >>= xErrorBarProp; - xObjectProperties = Reference< beans::XPropertySet >( xErrorBarProp, uno::UNO_QUERY ); + xObjectProperties.set( xErrorBarProp, uno::UNO_QUERY ); } } break; diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index 5aba63ef136b..c1ee3c2c9e24 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -875,7 +875,7 @@ void GL3DBarChart::spawnRenderThread(RenderThread *pThread) Size aSize = mpWindow->GetSizePixel(); mpWindow->getContext().setWinSize(aSize); - mpRenderThread = rtl::Reference<RenderThread>(pThread); + mpRenderThread.set(pThread); mpWindow->getContext().resetCurrent(); mpRenderThread->launch(); } diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx index d8e76e868a5e..cbeac17f78b9 100644 --- a/chart2/source/view/charttypes/PieChart.cxx +++ b/chart2/source/view/charttypes/PieChart.cxx @@ -363,7 +363,7 @@ void PieChart::createTextLabelShape( ///the current label in order to simplify later label position rearrangement; uno::Reference< container::XChild > xChild( aPieLabelInfo.xTextShape, uno::UNO_QUERY ); if( xChild.is() ) - aPieLabelInfo.xLabelGroupShape = uno::Reference<drawing::XShape>( xChild->getParent(), uno::UNO_QUERY ); + aPieLabelInfo.xLabelGroupShape.set( xChild->getParent(), uno::UNO_QUERY ); aPieLabelInfo.fValue = nVal; aPieLabelInfo.bMovementAllowed = bMovementAllowed; aPieLabelInfo.bMoved= false; diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index e5370ac3ad2e..f7fae644125a 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -2417,7 +2417,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries( // set CID to symbol for selection if( xShape.is() ) { - aEntry.aSymbol = uno::Reference< drawing::XShape >( xSymbolGroup, uno::UNO_QUERY ); + aEntry.aSymbol.set( xSymbolGroup, uno::UNO_QUERY ); OUString aChildParticle( ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_DATA_POINT, nIdx ) ); aChildParticle = ObjectIdentifier::addChildParticle( aChildParticle, ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_LEGEND_ENTRY, 0 ) ); @@ -2446,7 +2446,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries( // set CID to symbol for selection if( xShape.is()) { - aEntry.aSymbol = uno::Reference< drawing::XShape >( xSymbolGroup, uno::UNO_QUERY ); + aEntry.aSymbol.set( xSymbolGroup, uno::UNO_QUERY ); OUString aChildParticle( ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_LEGEND_ENTRY, 0 ) ); OUString aCID = ObjectIdentifier::createClassifiedIdentifierForParticles( rSeries.getSeriesParticle(), aChildParticle ); @@ -2491,7 +2491,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries( // set CID to symbol for selection if( xShape.is()) { - aEntry.aSymbol = uno::Reference< drawing::XShape >( xSymbolGroup, uno::UNO_QUERY ); + aEntry.aSymbol.set( xSymbolGroup, uno::UNO_QUERY ); bool bAverageLine = RegressionCurveHelper::isMeanValueLine( aCurves[i] ); ObjectType eObjectType = bAverageLine ? OBJECTTYPE_DATA_AVERAGE_LINE : OBJECTTYPE_DATA_CURVE; diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx index a5788de99a93..3e3adef9e6ca 100644 --- a/chart2/source/view/diagram/VDiagram.cxx +++ b/chart2/source/view/diagram/VDiagram.cxx @@ -154,14 +154,14 @@ void VDiagram::createShapes_2d() //create group shape uno::Reference< drawing::XShapes > xOuterGroup_Shapes = m_pShapeFactory->createGroup2D(m_xTarget); - m_xOuterGroupShape = uno::Reference<drawing::XShape>( xOuterGroup_Shapes, uno::UNO_QUERY ); + m_xOuterGroupShape.set( xOuterGroup_Shapes, uno::UNO_QUERY ); uno::Reference< drawing::XShapes > xGroupForWall( m_pShapeFactory->createGroup2D(xOuterGroup_Shapes,"PlotAreaExcludingAxes") ); //create independent group shape as container for datapoints and such things { uno::Reference< drawing::XShapes > xShapes = m_pShapeFactory->createGroup2D(xOuterGroup_Shapes,"testonly;CooContainer=XXX_CID"); - m_xCoordinateRegionShape = uno::Reference<drawing::XShape>( xShapes, uno::UNO_QUERY ); + m_xCoordinateRegionShape.set( xShapes, uno::UNO_QUERY ); } bool bAddFloorAndWall = DiagramHelper::isSupportingFloorAndWall( m_xDiagram ); @@ -473,8 +473,7 @@ void VDiagram::createShapes_3d() return; //create shape - m_xOuterGroupShape = uno::Reference< drawing::XShape >( - m_pShapeFactory->createGroup3D( m_xTarget, "PlotAreaExcludingAxes" ), uno::UNO_QUERY); + m_xOuterGroupShape.set( m_pShapeFactory->createGroup3D( m_xTarget, "PlotAreaExcludingAxes" ), uno::UNO_QUERY); uno::Reference< drawing::XShapes > xOuterGroup_Shapes = uno::Reference<drawing::XShapes>( m_xOuterGroupShape, uno::UNO_QUERY ); @@ -482,7 +481,7 @@ void VDiagram::createShapes_3d() //create additional group to manipulate the aspect ratio of the whole diagram: xOuterGroup_Shapes = m_pShapeFactory->createGroup3D( xOuterGroup_Shapes, OUString() ); - m_xAspectRatio3D = uno::Reference< beans::XPropertySet >( xOuterGroup_Shapes, uno::UNO_QUERY ); + m_xAspectRatio3D.set( xOuterGroup_Shapes, uno::UNO_QUERY ); bool bAddFloorAndWall = DiagramHelper::isSupportingFloorAndWall( m_xDiagram ); @@ -492,7 +491,7 @@ void VDiagram::createShapes_3d() { uno::Reference< beans::XPropertySet > xWallProp( NULL ); if( m_xDiagram.is() ) - xWallProp=uno::Reference< beans::XPropertySet >( m_xDiagram->getWall()); + xWallProp.set( m_xDiagram->getWall() ); OUString aWallCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, OUString() ) );//@todo read CID from model if( !bAddFloorAndWall ) @@ -615,7 +614,7 @@ void VDiagram::createShapes_3d() { uno::Reference< beans::XPropertySet > xFloorProp( NULL ); if( m_xDiagram.is() ) - xFloorProp=uno::Reference< beans::XPropertySet >( m_xDiagram->getFloor()); + xFloorProp.set( m_xDiagram->getFloor() ); Stripe aStripe( drawing::Position3D(0,0,0) , drawing::Direction3D(0,0,FIXED_SIZE_FOR_3D_CHART_VOLUME) @@ -643,7 +642,7 @@ void VDiagram::createShapes_3d() //create an additional scene for the smaller inner coordinate region: { uno::Reference< drawing::XShapes > xShapes = m_pShapeFactory->createGroup3D( xOuterGroup_Shapes,"testonly;CooContainer=XXX_CID" ); - m_xCoordinateRegionShape = uno::Reference< drawing::XShape >( xShapes, uno::UNO_QUERY ); + m_xCoordinateRegionShape.set( xShapes, uno::UNO_QUERY ); uno::Reference< beans::XPropertySet > xShapeProp( m_xCoordinateRegionShape, uno::UNO_QUERY ); OSL_ENSURE(xShapeProp.is(), "created shape offers no XPropertySet"); diff --git a/chart2/source/view/main/AbstractShapeFactory.cxx b/chart2/source/view/main/AbstractShapeFactory.cxx index c8e229580605..63fd319b43bb 100644 --- a/chart2/source/view/main/AbstractShapeFactory.cxx +++ b/chart2/source/view/main/AbstractShapeFactory.cxx @@ -130,7 +130,7 @@ uno::Reference< drawing::XShapes > AbstractShapeFactory::getChartRootShape( { if( AbstractShapeFactory::getShapeName( xShape ) == "com.sun.star.chart2.shapes" ) { - xRet = uno::Reference< drawing::XShapes >( xShape, uno::UNO_QUERY ); + xRet.set( xShape, uno::UNO_QUERY ); break; } } diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 333f3c60c71f..975f3cfb10e2 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -1970,7 +1970,7 @@ awt::Rectangle ChartView::getRectangleOfObject( const OUString& rObjectCID, bool aShapeName = "PlotAreaIncludingAxes"; SdrObject* pShape = DrawModelWrapper::getNamedSdrObject( aShapeName, pRootList ); if( pShape ) - xShape = uno::Reference< drawing::XShape >( pShape->getUnoShape(), uno::UNO_QUERY); + xShape.set( pShape->getUnoShape(), uno::UNO_QUERY); } } } diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx index 7117fdd7b89e..0457be3ac9b5 100644 --- a/chart2/source/view/main/ShapeFactory.cxx +++ b/chart2/source/view/main/ShapeFactory.cxx @@ -79,7 +79,7 @@ uno::Reference< drawing::XShapes > ShapeFactory::getOrCreateChartRootShape( setShapeName(xShape, "com.sun.star.chart2.shapes"); xShape->setSize(awt::Size(0,0)); - xRet = uno::Reference<drawing::XShapes>(xShape, uno::UNO_QUERY); + xRet.set(xShape, uno::UNO_QUERY); return xRet; } diff --git a/chart2/workbench/addin/sampleaddin.cxx b/chart2/workbench/addin/sampleaddin.cxx index 1c964f7cf67e..6bfb8b019c80 100644 --- a/chart2/workbench/addin/sampleaddin.cxx +++ b/chart2/workbench/addin/sampleaddin.cxx @@ -263,7 +263,7 @@ void SAL_CALL SampleAddIn::refresh() throw( uno::RuntimeException ) // create line first time if( ! mxMyRedLine.is()) { - mxMyRedLine = uno::Reference< drawing::XShape >( + mxMyRedLine.set( xFactory->createInstance( "com.sun.star.drawing.LineShape" ), uno::UNO_QUERY ); xPage->add( mxMyRedLine ); @@ -287,7 +287,7 @@ void SAL_CALL SampleAddIn::refresh() throw( uno::RuntimeException ) // create text object first time if( ! mxMyText.is()) { - mxMyText = uno::Reference< drawing::XShape >( + mxMyText.set( xFactory->createInstance( "com.sun.star.drawing.TextShape" ), uno::UNO_QUERY ); xPage->add( mxMyText ); |