summaryrefslogtreecommitdiff
path: root/chart2/source/view/main/VDataSeries.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-09-28 10:08:07 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-09-28 10:08:07 +0200
commitb4271a1cd18d77bfb99a1bfb52b12febdb7528a9 (patch)
tree2ca017c09af5952c6d21eab7b8b125cd4e8367b7 /chart2/source/view/main/VDataSeries.cxx
parentc762354cebd4ab70667d21c4b5613f37795c5dcb (diff)
Return the std::unique_ptr itself here, not a raw pointer
Change-Id: I25d9bc5c969d00642613971c88f864285ecdddbc
Diffstat (limited to 'chart2/source/view/main/VDataSeries.cxx')
-rw-r--r--chart2/source/view/main/VDataSeries.cxx28
1 files changed, 14 insertions, 14 deletions
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index 0f3d66d14f0b..e6bb82c182ae 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -779,7 +779,7 @@ double VDataSeries::getYMeanValue() const
return m_fYMeanValue;
}
-Symbol* getSymbolPropertiesFromPropertySet( const uno::Reference< beans::XPropertySet >& xProp )
+std::unique_ptr<Symbol> getSymbolPropertiesFromPropertySet( const uno::Reference< beans::XPropertySet >& xProp )
{
::std::unique_ptr< Symbol > apSymbolProps( new Symbol() );
try
@@ -798,7 +798,7 @@ Symbol* getSymbolPropertiesFromPropertySet( const uno::Reference< beans::XProper
{
ASSERT_EXCEPTION( e );
}
- return apSymbolProps.release();
+ return apSymbolProps;
}
Symbol* VDataSeries::getSymbolProperties( sal_Int32 index ) const
@@ -808,16 +808,16 @@ Symbol* VDataSeries::getSymbolProperties( sal_Int32 index ) const
{
adaptPointCache( index );
if (!m_apSymbolProperties_AttributedPoint)
- m_apSymbolProperties_AttributedPoint.reset(
- getSymbolPropertiesFromPropertySet(this->getPropertiesOfPoint(index)));
+ m_apSymbolProperties_AttributedPoint
+ = getSymbolPropertiesFromPropertySet(this->getPropertiesOfPoint(index));
pRet = m_apSymbolProperties_AttributedPoint.get();
//if a single data point does not have symbols but the dataseries itself has symbols
//we create an invisible symbol shape to enable selection of that point
if( !pRet || pRet->Style == SymbolStyle_NONE )
{
if (!m_apSymbolProperties_Series)
- m_apSymbolProperties_Series.reset(
- getSymbolPropertiesFromPropertySet(this->getPropertiesOfSeries()));
+ m_apSymbolProperties_Series
+ = getSymbolPropertiesFromPropertySet(this->getPropertiesOfSeries());
if( m_apSymbolProperties_Series.get() && m_apSymbolProperties_Series->Style != SymbolStyle_NONE )
{
if (!m_apSymbolProperties_InvisibleSymbolForSelection)
@@ -836,8 +836,8 @@ Symbol* VDataSeries::getSymbolProperties( sal_Int32 index ) const
else
{
if (!m_apSymbolProperties_Series)
- m_apSymbolProperties_Series.reset(
- getSymbolPropertiesFromPropertySet(this->getPropertiesOfSeries()));
+ m_apSymbolProperties_Series
+ = getSymbolPropertiesFromPropertySet(this->getPropertiesOfSeries());
pRet = m_apSymbolProperties_Series.get();
}
@@ -925,7 +925,7 @@ uno::Reference<beans::XPropertySet> VDataSeries::getPropertiesOfSeries() const
return uno::Reference<css::beans::XPropertySet>(m_xDataSeries, css::uno::UNO_QUERY);
}
-DataPointLabel* getDataPointLabelFromPropertySet( const uno::Reference< beans::XPropertySet >& xProp )
+std::unique_ptr<DataPointLabel> getDataPointLabelFromPropertySet( const uno::Reference< beans::XPropertySet >& xProp )
{
::std::unique_ptr< DataPointLabel > apLabel( new DataPointLabel() );
try
@@ -937,7 +937,7 @@ DataPointLabel* getDataPointLabelFromPropertySet( const uno::Reference< beans::X
{
ASSERT_EXCEPTION( e );
}
- return apLabel.release();
+ return apLabel;
}
void VDataSeries::adaptPointCache( sal_Int32 nNewPointIndex ) const
@@ -959,15 +959,15 @@ DataPointLabel* VDataSeries::getDataPointLabel( sal_Int32 index ) const
{
adaptPointCache( index );
if( !m_apLabel_AttributedPoint.get() )
- m_apLabel_AttributedPoint.reset(
- getDataPointLabelFromPropertySet(this->getPropertiesOfPoint(index)));
+ m_apLabel_AttributedPoint
+ = getDataPointLabelFromPropertySet(this->getPropertiesOfPoint(index));
pRet = m_apLabel_AttributedPoint.get();
}
else
{
if (!m_apLabel_Series)
- m_apLabel_Series.reset(
- getDataPointLabelFromPropertySet(this->getPropertiesOfPoint(index)));
+ m_apLabel_Series
+ = getDataPointLabelFromPropertySet(this->getPropertiesOfPoint(index));
pRet = m_apLabel_Series.get();
}
if( !m_bAllowPercentValueInDataLabel )