Kaydet (Commit) f188ca44 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

std::auto_ptr is deprecated.

For this usage, boost::shared_ptr is probably an appropriate replacement.

Change-Id: I89bea80d330f362e60af4ce66a23316d0029e0d8
üst 526c2b3c
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment