diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-03 08:39:03 +0200 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2016-07-20 01:26:04 -0400 |
commit | a0e8e05008e143ee5e3bbc281d1c253c7e5ed136 (patch) | |
tree | eaf5f70a067fd48704addd9f2b582624a2fb44ae /chart2 | |
parent | 9c7cae1561cfe16226b1f16dce59f08a38da3ce0 (diff) |
use Any constructor instead of temporaries
(cherry picked from commit 58a32075ca4f457f570af75aef368dd6c389aca7)
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 2ae296f4c5ce..8b81b5127e8c 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -1398,9 +1398,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; } @@ -2013,9 +2011,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 a6f9ed12c00d..6d9abc50f937 100644 --- a/chart2/source/view/main/DummyXShape.cxx +++ b/chart2/source/view/main/DummyXShape.cxx @@ -939,9 +939,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 6bfb8b019c80..a3413535c181 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()) |