summaryrefslogtreecommitdiff
path: root/chart2/source
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-09-20 17:39:46 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-09-20 17:39:46 -0400
commitf188ca44d8a7f7567ea76a3fd635c0fa6fcf4c4b (patch)
treebb5d7cae8e3094f05f73b7193a6be4b1225b6ef3 /chart2/source
parent526c2b3c01162dddadd09a63f45759306cfb12ba (diff)
std::auto_ptr is deprecated.
For this usage, boost::shared_ptr is probably an appropriate replacement. Change-Id: I89bea80d330f362e60af4ce66a23316d0029e0d8
Diffstat (limited to 'chart2/source')
-rw-r--r--chart2/source/view/main/ChartView.cxx35
1 files changed, 11 insertions, 24 deletions
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index f1be1064b154..763994e1a131 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -105,10 +105,9 @@
#include <rtl/strbuf.hxx>
#include <rtl/ustring.hxx>
-//.............................................................................
-namespace chart
-{
-//.............................................................................
+#include <boost/shared_ptr.hpp>
+
+namespace chart {
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
@@ -2122,8 +2121,7 @@ void changePositionOfAxisTitle( VTitle* pVTitle, TitleAlignment eAlignment
pVTitle->changePosition( aNewPosition );
}
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
-std::auto_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType
+boost::shared_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType
, const uno::Reference< drawing::XShapes>& xPageShapes
, const uno::Reference< lang::XMultiServiceFactory>& xShapeFactory
, const uno::Reference< frame::XModel >& xChartModel
@@ -2132,7 +2130,7 @@ std::auto_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType
, TitleAlignment eAlignment
, bool& rbAutoPosition )
{
- std::auto_ptr<VTitle> apVTitle;
+ boost::shared_ptr<VTitle> apVTitle;
// #i109336# Improve auto positioning in chart
double fPercentage = lcl_getPageLayoutDistancePercentage();
@@ -2159,7 +2157,7 @@ std::auto_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType
if( !aCompleteString.isEmpty() )
{
//create title
- apVTitle = std::auto_ptr<VTitle>(new VTitle(xTitle));
+ apVTitle.reset(new VTitle(xTitle));
rtl::OUString aCID( ObjectIdentifier::createClassifiedIdentifierForObject( xTitle, xChartModel ) );
apVTitle->init(xPageShapes,xShapeFactory,aCID);
apVTitle->createShapes( awt::Point(0,0), rPageSize );
@@ -2265,7 +2263,6 @@ std::auto_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType
}
return apVTitle;
}
-SAL_WNODEPRECATED_DECLARATIONS_POP
bool lcl_createLegend( const uno::Reference< XLegend > & xLegend
, const uno::Reference< drawing::XShapes>& xPageShapes
@@ -2504,9 +2501,7 @@ void ChartView::createShapes()
//------------ create x axis title
bool bAutoPosition_XTitle = true;
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
- std::auto_ptr<VTitle> apVTitle_X;
- SAL_WNODEPRECATED_DECLARATIONS_POP
+ boost::shared_ptr<VTitle> apVTitle_X;
if( ChartTypeHelper::isSupportingMainAxis( xChartType, nDimension, 0 ) )
apVTitle_X = lcl_createTitle( TitleHelper::TITLE_AT_STANDARD_X_AXIS_POSITION, xPageShapes, m_xShapeFactory, m_xChartModel
, aRemainingSpace, aPageSize, ALIGN_BOTTOM, bAutoPosition_XTitle );
@@ -2515,9 +2510,7 @@ void ChartView::createShapes()
//------------ create y axis title
bool bAutoPosition_YTitle = true;
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
- std::auto_ptr<VTitle> apVTitle_Y;
- SAL_WNODEPRECATED_DECLARATIONS_POP
+ boost::shared_ptr<VTitle> apVTitle_Y;
if( ChartTypeHelper::isSupportingMainAxis( xChartType, nDimension, 1 ) )
apVTitle_Y = lcl_createTitle( TitleHelper::TITLE_AT_STANDARD_Y_AXIS_POSITION, xPageShapes, m_xShapeFactory, m_xChartModel
, aRemainingSpace, aPageSize, ALIGN_LEFT, bAutoPosition_YTitle );
@@ -2526,9 +2519,7 @@ void ChartView::createShapes()
//------------ create z axis title
bool bAutoPosition_ZTitle = true;
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
- std::auto_ptr<VTitle> apVTitle_Z;
- SAL_WNODEPRECATED_DECLARATIONS_POP
+ boost::shared_ptr<VTitle> apVTitle_Z;
if( ChartTypeHelper::isSupportingMainAxis( xChartType, nDimension, 2 ) )
apVTitle_Z = lcl_createTitle( TitleHelper::Z_AXIS_TITLE, xPageShapes, m_xShapeFactory, m_xChartModel
, aRemainingSpace, aPageSize, ALIGN_RIGHT, bAutoPosition_ZTitle );
@@ -2540,9 +2531,7 @@ void ChartView::createShapes()
//------------ create secondary x axis title
bool bAutoPosition_SecondXTitle = true;
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
- std::auto_ptr<VTitle> apVTitle_SecondX;
- SAL_WNODEPRECATED_DECLARATIONS_POP
+ boost::shared_ptr<VTitle> apVTitle_SecondX;
if( ChartTypeHelper::isSupportingSecondaryAxis( xChartType, nDimension, 0 ) )
apVTitle_SecondX = lcl_createTitle( TitleHelper::SECONDARY_X_AXIS_TITLE, xPageShapes, m_xShapeFactory, m_xChartModel
, aRemainingSpace, aPageSize, bIsVertical? ALIGN_RIGHT : ALIGN_TOP, bAutoPosition_SecondXTitle );
@@ -2551,9 +2540,7 @@ void ChartView::createShapes()
//------------ create secondary y axis title
bool bAutoPosition_SecondYTitle = true;
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
- std::auto_ptr<VTitle> apVTitle_SecondY;
- SAL_WNODEPRECATED_DECLARATIONS_POP
+ boost::shared_ptr<VTitle> apVTitle_SecondY;
if( ChartTypeHelper::isSupportingSecondaryAxis( xChartType, nDimension, 1 ) )
apVTitle_SecondY = lcl_createTitle( TitleHelper::SECONDARY_Y_AXIS_TITLE, xPageShapes, m_xShapeFactory, m_xChartModel
, aRemainingSpace, aPageSize, bIsVertical? ALIGN_TOP : ALIGN_RIGHT, bAutoPosition_SecondYTitle );