diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-03 08:39:03 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-05-04 12:39:40 +0200 |
commit | 58a32075ca4f457f570af75aef368dd6c389aca7 (patch) | |
tree | e437dcbdeb248b4316cb8a9281d1543419853f6d /chart2 | |
parent | 7d47700972d267fe7c5270c5dadd45a523a2baec (diff) |
use Any constructor instead of temporaries
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx | 8 | ||||
-rw-r--r-- | chart2/source/view/main/DummyXShape.cxx | 4 | ||||
-rw-r--r-- | chart2/workbench/addin/sampleaddin.cxx | 4 |
3 files changed, 4 insertions, 12 deletions
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx index 9ffd2e862b08..7bee58d7cb0c 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -1396,9 +1396,7 @@ Any WrappedStackingProperty::getPropertyValue( const Reference< beans::XProperty if( detectInnerValue( eInnerStackMode ) ) { bool bValue = (eInnerStackMode == m_eStackMode); - Any aAny; - aAny <<= bValue; - return aAny; + return Any(bValue); } return m_aOuterValue; } @@ -2011,9 +2009,7 @@ Any WrappedIncludeHiddenCellsProperty::getPropertyValue( const Reference< beans: throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { bool bValue = ChartModelHelper::isIncludeHiddenCells( m_spChart2ModelContact->getChartModel() ); - uno::Any aAny; - aAny <<= bValue; - return aAny; + return uno::Any(bValue); } // ____ XDiagramProvider ____ diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx index 3b37fe40d000..f3cc72c2a91f 100644 --- a/chart2/source/view/main/DummyXShape.cxx +++ b/chart2/source/view/main/DummyXShape.cxx @@ -923,9 +923,7 @@ void SAL_CALL DummyText::setPosition(const awt::Point& rPosition ) void DummyText::setTransformatAsProperty(const drawing::HomogenMatrix3& rMatrix) { - uno::Any aNewTrans; - aNewTrans <<= rMatrix; - setPropertyValue("Transformation", aNewTrans); + setPropertyValue("Transformation", uno::Any(rMatrix)); } DummyGroup3D::DummyGroup3D(const OUString& rName) diff --git a/chart2/workbench/addin/sampleaddin.cxx b/chart2/workbench/addin/sampleaddin.cxx index b478193b583f..d2cce93008f9 100644 --- a/chart2/workbench/addin/sampleaddin.cxx +++ b/chart2/workbench/addin/sampleaddin.cxx @@ -350,9 +350,7 @@ void SAL_CALL SampleAddIn::refresh() throw( uno::RuntimeException ) uno::Reference< beans::XPropertySet > xShapeProp( mxMyRedLine, uno::UNO_QUERY ); if( xShapeProp.is()) { - uno::Any aAny; - aAny <<= aPtSeq; - xShapeProp->setPropertyValue( "PolyPolygon" , aAny ); + xShapeProp->setPropertyValue( "PolyPolygon" , Any(aPtSeq) ); } } if( mxMyText.is()) |