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

Remove auto_ptr from CharacterPropertyItemConverter.

And adjust all that's necessary.

Change-Id: I121e5aa4d117da2e5e6b11e4fd85960a8b3aa727
üst b2ffa40c
...@@ -27,31 +27,22 @@ ...@@ -27,31 +27,22 @@
#include "ItemConverter.hxx" #include "ItemConverter.hxx"
#include <vector> #include <vector>
#include <memory>
class SdrModel; class SdrModel;
namespace chart namespace chart { namespace wrapper {
{
namespace wrapper
{
class AxisItemConverter : public ::comphelper::ItemConverter class AxisItemConverter : public comphelper::ItemConverter
{ {
public: public:
SAL_WNODEPRECATED_DECLARATIONS_PUSH
AxisItemConverter( AxisItemConverter(
const ::com::sun::star::uno::Reference< const css::uno::Reference<css::beans::XPropertySet>& rPropertySet,
::com::sun::star::beans::XPropertySet > & rPropertySet, SfxItemPool& rItemPool, SdrModel& rDrawModel,
SfxItemPool& rItemPool, const css::uno::Reference<css::chart2::XChartDocument> & xChartDoc,
SdrModel& rDrawModel, ExplicitScaleData* pScale = NULL,
const ::com::sun::star::uno::Reference< ExplicitIncrementData* pIncrement = NULL,
::com::sun::star::chart2::XChartDocument > & xChartDoc, const css::awt::Size* pRefSize = NULL );
ExplicitScaleData * pScale = NULL,
ExplicitIncrementData * pIncrement = NULL,
::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize =
::std::auto_ptr< ::com::sun::star::awt::Size >() );
SAL_WNODEPRECATED_DECLARATIONS_POP
virtual ~AxisItemConverter(); virtual ~AxisItemConverter();
virtual void FillItemSet( SfxItemSet & rOutItemSet ) const SAL_OVERRIDE; virtual void FillItemSet( SfxItemSet & rOutItemSet ) const SAL_OVERRIDE;
...@@ -62,26 +53,24 @@ protected: ...@@ -62,26 +53,24 @@ protected:
virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const SAL_OVERRIDE; virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const SAL_OVERRIDE;
virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutItemSet ) const virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutItemSet ) const
throw( ::com::sun::star::uno::Exception ) SAL_OVERRIDE; throw( css::uno::Exception ) SAL_OVERRIDE;
virtual bool ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet & rItemSet ) virtual bool ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet & rItemSet )
throw( ::com::sun::star::uno::Exception ) SAL_OVERRIDE; throw( css::uno::Exception ) SAL_OVERRIDE;
private: private:
::std::vector< ItemConverter * > m_aConverters; ::std::vector< ItemConverter * > m_aConverters;
::com::sun::star::uno::Reference< css::uno::Reference<
::com::sun::star::chart2::XAxis > m_xAxis; css::chart2::XAxis > m_xAxis;
::com::sun::star::uno::Reference< css::uno::Reference<
::com::sun::star::chart2::XChartDocument > m_xChartDoc; css::chart2::XChartDocument > m_xChartDoc;
ExplicitScaleData* m_pExplicitScale; ExplicitScaleData* m_pExplicitScale;
ExplicitIncrementData* m_pExplicitIncrement; ExplicitIncrementData* m_pExplicitIncrement;
}; };
} // namespace wrapper }}
} // namespace chart
// INCLUDED_CHART2_SOURCE_CONTROLLER_INC_AXISITEMCONVERTER_HXX
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -24,59 +24,44 @@ ...@@ -24,59 +24,44 @@
#include <com/sun/star/beans/PropertyState.hpp> #include <com/sun/star/beans/PropertyState.hpp>
#include <com/sun/star/awt/Size.hpp> #include <com/sun/star/awt/Size.hpp>
#include <memory> #include <boost/optional.hpp>
namespace chart namespace chart { namespace wrapper {
{
namespace wrapper
{
class CharacterPropertyItemConverter : class CharacterPropertyItemConverter : public comphelper::ItemConverter
public ::comphelper::ItemConverter
{ {
public: public:
CharacterPropertyItemConverter( CharacterPropertyItemConverter(
const ::com::sun::star::uno::Reference< const css::uno::Reference<css::beans::XPropertySet>& rPropertySet,
::com::sun::star::beans::XPropertySet > & rPropertySet,
SfxItemPool& rItemPool ); SfxItemPool& rItemPool );
SAL_WNODEPRECATED_DECLARATIONS_PUSH
CharacterPropertyItemConverter( CharacterPropertyItemConverter(
const ::com::sun::star::uno::Reference< const css::uno::Reference<css::beans::XPropertySet>& rPropertySet,
::com::sun::star::beans::XPropertySet > & rPropertySet,
SfxItemPool& rItemPool, SfxItemPool& rItemPool,
::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize, const css::awt::Size* pRefSize,
const OUString & rRefSizePropertyName, const OUString & rRefSizePropertyName,
const ::com::sun::star::uno::Reference< const css::uno::Reference<css::beans::XPropertySet>& rRefSizePropSet = css::uno::Reference<css::beans::XPropertySet>() );
::com::sun::star::beans::XPropertySet > & rRefSizePropSet =
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >() );
SAL_WNODEPRECATED_DECLARATIONS_POP
virtual ~CharacterPropertyItemConverter(); virtual ~CharacterPropertyItemConverter();
protected: protected:
virtual const sal_uInt16 * GetWhichPairs() const SAL_OVERRIDE; virtual const sal_uInt16* GetWhichPairs() const SAL_OVERRIDE;
virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const SAL_OVERRIDE; virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const SAL_OVERRIDE;
virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutItemSet ) const virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutItemSet ) const
throw( ::com::sun::star::uno::Exception ) SAL_OVERRIDE; throw (css::uno::Exception) SAL_OVERRIDE;
virtual bool ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet & rItemSet ) virtual bool ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet & rItemSet )
throw( ::com::sun::star::uno::Exception ) SAL_OVERRIDE; throw (css::uno::Exception) SAL_OVERRIDE;
::com::sun::star::uno::Reference< css::uno::Reference<css::beans::XPropertySet> GetRefSizePropertySet() const;
::com::sun::star::beans::XPropertySet > GetRefSizePropertySet() const { return m_xRefSizePropSet;}
private: private:
SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr< ::com::sun::star::awt::Size > m_pRefSize;
SAL_WNODEPRECATED_DECLARATIONS_POP
OUString m_aRefSizePropertyName; OUString m_aRefSizePropertyName;
::com::sun::star::uno::Reference< css::uno::Reference<css::beans::XPropertySet> m_xRefSizePropSet;
::com::sun::star::beans::XPropertySet > m_xRefSizePropSet; boost::optional<css::awt::Size> m_pRefSize;
}; };
} // namespace wrapper }}
} // namespace chart
// INCLUDED_CHART2_SOURCE_CONTROLLER_INC_CHARACTERPROPERTYITEMCONVERTER_HXX
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -27,45 +27,32 @@ ...@@ -27,45 +27,32 @@
#include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/uno/XComponentContext.hpp>
#include <memory>
#include <vector> #include <vector>
class SdrModel; class SdrModel;
namespace chart namespace chart { namespace wrapper {
{
namespace wrapper
{
class DataPointItemConverter : class DataPointItemConverter : public comphelper::ItemConverter
public ::comphelper::ItemConverter
{ {
public: public:
SAL_WNODEPRECATED_DECLARATIONS_PUSH
DataPointItemConverter( DataPointItemConverter(
const ::com::sun::star::uno::Reference< const css::uno::Reference<css::frame::XModel>& xChartModel,
::com::sun::star::frame::XModel > & xChartModel, const css::uno::Reference<css::uno::XComponentContext>& xContext,
const ::com::sun::star::uno::Reference< const css::uno::Reference<css::beans::XPropertySet>& rPropertySet,
::com::sun::star::uno::XComponentContext > & xContext, const css::uno::Reference<css::chart2::XDataSeries>& xSeries,
const ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > & rPropertySet,
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XDataSeries > & xSeries,
SfxItemPool& rItemPool, SfxItemPool& rItemPool,
SdrModel& rDrawModel, SdrModel& rDrawModel,
const ::com::sun::star::uno::Reference< const css::uno::Reference<css::lang::XMultiServiceFactory>& xNamedPropertyContainerFactory,
::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
GraphicPropertyItemConverter::eGraphicObjectType eMapTo = GraphicPropertyItemConverter::eGraphicObjectType eMapTo =
GraphicPropertyItemConverter::FILLED_DATA_POINT, GraphicPropertyItemConverter::FILLED_DATA_POINT,
::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize = const css::awt::Size* pRefSize = NULL,
::std::auto_ptr< ::com::sun::star::awt::Size >(),
bool bDataSeries = false, bool bDataSeries = false,
bool bUseSpecialFillColor = false, bool bUseSpecialFillColor = false,
sal_Int32 nSpecialFillColor = 0, sal_Int32 nSpecialFillColor = 0,
bool bOverwriteLabelsForAttributedDataPointsAlso=false, bool bOverwriteLabelsForAttributedDataPointsAlso = false,
sal_Int32 nNumberFormat=0, sal_Int32 nNumberFormat = 0,
sal_Int32 nPercentNumberFormat=0); sal_Int32 nPercentNumberFormat = 0 );
SAL_WNODEPRECATED_DECLARATIONS_POP
virtual ~DataPointItemConverter(); virtual ~DataPointItemConverter();
...@@ -77,9 +64,9 @@ protected: ...@@ -77,9 +64,9 @@ protected:
virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const SAL_OVERRIDE; virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const SAL_OVERRIDE;
virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutItemSet ) const virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutItemSet ) const
throw( ::com::sun::star::uno::Exception ) SAL_OVERRIDE; throw (css::uno::Exception) SAL_OVERRIDE;
virtual bool ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet & rItemSet ) virtual bool ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet & rItemSet )
throw( ::com::sun::star::uno::Exception ) SAL_OVERRIDE; throw (css::uno::Exception) SAL_OVERRIDE;
private: private:
::std::vector< ItemConverter * > m_aConverters; ::std::vector< ItemConverter * > m_aConverters;
...@@ -89,14 +76,12 @@ private: ...@@ -89,14 +76,12 @@ private:
sal_Int32 m_nSpecialFillColor; sal_Int32 m_nSpecialFillColor;
sal_Int32 m_nNumberFormat; sal_Int32 m_nNumberFormat;
sal_Int32 m_nPercentNumberFormat; sal_Int32 m_nPercentNumberFormat;
::com::sun::star::uno::Sequence< sal_Int32 > m_aAvailableLabelPlacements; css::uno::Sequence<sal_Int32> m_aAvailableLabelPlacements;
bool m_bForbidPercentValue; bool m_bForbidPercentValue;
}; };
} // namespace wrapper }}
} // namespace chart
// INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DATAPOINTITEMCONVERTER_HXX
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -23,29 +23,20 @@ ...@@ -23,29 +23,20 @@
#include <com/sun/star/awt/Size.hpp> #include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <memory>
class SdrModel; class SdrModel;
namespace chart namespace chart { namespace wrapper {
{
namespace wrapper
{
class AllAxisItemConverter : public ::comphelper::MultipleItemConverter class AllAxisItemConverter : public ::comphelper::MultipleItemConverter
{ {
public: public:
SAL_WNODEPRECATED_DECLARATIONS_PUSH
AllAxisItemConverter( AllAxisItemConverter(
const ::com::sun::star::uno::Reference< const css::uno::Reference<css::frame::XModel> & xChartModel,
::com::sun::star::frame::XModel > & xChartModel,
SfxItemPool& rItemPool, SfxItemPool& rItemPool,
SdrModel& rDrawModel, SdrModel& rDrawModel,
const ::com::sun::star::uno::Reference< const css::uno::Reference<css::lang::XMultiServiceFactory>& xNamedPropertyContainerFactory,
::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory, const css::awt::Size* pRefSize = NULL );
::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize =
::std::auto_ptr< ::com::sun::star::awt::Size >() );
SAL_WNODEPRECATED_DECLARATIONS_POP
virtual ~AllAxisItemConverter(); virtual ~AllAxisItemConverter();
protected: protected:
...@@ -56,12 +47,10 @@ class AllGridItemConverter : public ::comphelper::MultipleItemConverter ...@@ -56,12 +47,10 @@ class AllGridItemConverter : public ::comphelper::MultipleItemConverter
{ {
public: public:
AllGridItemConverter( AllGridItemConverter(
const ::com::sun::star::uno::Reference< const css::uno::Reference<css::frame::XModel>& xChartModel,
::com::sun::star::frame::XModel > & xChartModel,
SfxItemPool& rItemPool, SfxItemPool& rItemPool,
SdrModel& rDrawModel, SdrModel& rDrawModel,
const ::com::sun::star::uno::Reference< const css::uno::Reference<css::lang::XMultiServiceFactory> & xNamedPropertyContainerFactory );
::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory );
virtual ~AllGridItemConverter(); virtual ~AllGridItemConverter();
protected: protected:
...@@ -71,17 +60,13 @@ protected: ...@@ -71,17 +60,13 @@ protected:
class AllDataLabelItemConverter : public ::comphelper::MultipleItemConverter class AllDataLabelItemConverter : public ::comphelper::MultipleItemConverter
{ {
public: public:
SAL_WNODEPRECATED_DECLARATIONS_PUSH
AllDataLabelItemConverter( AllDataLabelItemConverter(
const ::com::sun::star::uno::Reference< const css::uno::Reference<css::frame::XModel>& xChartModel,
::com::sun::star::frame::XModel > & xChartModel,
SfxItemPool& rItemPool, SfxItemPool& rItemPool,
SdrModel& rDrawModel, SdrModel& rDrawModel,
const ::com::sun::star::uno::Reference< const css::uno::Reference<css::lang::XMultiServiceFactory>& xNamedPropertyContainerFactory,
::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory, const css::awt::Size* pRefSize = NULL );
::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize =
::std::auto_ptr< ::com::sun::star::awt::Size >() );
SAL_WNODEPRECATED_DECLARATIONS_POP
virtual ~AllDataLabelItemConverter(); virtual ~AllDataLabelItemConverter();
protected: protected:
...@@ -91,17 +76,12 @@ protected: ...@@ -91,17 +76,12 @@ protected:
class AllTitleItemConverter : public ::comphelper::MultipleItemConverter class AllTitleItemConverter : public ::comphelper::MultipleItemConverter
{ {
public: public:
SAL_WNODEPRECATED_DECLARATIONS_PUSH
AllTitleItemConverter( AllTitleItemConverter(
const ::com::sun::star::uno::Reference< const css::uno::Reference<css::frame::XModel>& xChartModel,
::com::sun::star::frame::XModel > & xChartModel, SfxItemPool& rItemPool, SdrModel& rDrawModel,
SfxItemPool& rItemPool, const css::uno::Reference<css::lang::XMultiServiceFactory>& xNamedPropertyContainerFactory,
SdrModel& rDrawModel, const css::awt::Size* pRefSize = NULL );
const ::com::sun::star::uno::Reference<
::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize =
::std::auto_ptr< ::com::sun::star::awt::Size >() );
SAL_WNODEPRECATED_DECLARATIONS_POP
virtual ~AllTitleItemConverter(); virtual ~AllTitleItemConverter();
protected: protected:
...@@ -112,9 +92,7 @@ class AllSeriesStatisticsConverter : public ::comphelper::MultipleItemConverter ...@@ -112,9 +92,7 @@ class AllSeriesStatisticsConverter : public ::comphelper::MultipleItemConverter
{ {
public: public:
AllSeriesStatisticsConverter( AllSeriesStatisticsConverter(
const ::com::sun::star::uno::Reference< const css::uno::Reference<css::frame::XModel>& xChartModel, SfxItemPool& rItemPool );
::com::sun::star::frame::XModel > & xChartModel,
SfxItemPool& rItemPool );
virtual ~AllSeriesStatisticsConverter(); virtual ~AllSeriesStatisticsConverter();
protected: protected:
......
...@@ -26,21 +26,15 @@ ...@@ -26,21 +26,15 @@
#include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/awt/Size.hpp> #include <com/sun/star/awt/Size.hpp>
#include <memory>
#include <vector> #include <vector>
class SdrModel; class SdrModel;
namespace chart namespace chart { namespace wrapper {
{
namespace wrapper
{
class RegressionEquationItemConverter : class RegressionEquationItemConverter : public comphelper::ItemConverter
public ::comphelper::ItemConverter
{ {
public: public:
SAL_WNODEPRECATED_DECLARATIONS_PUSH
RegressionEquationItemConverter( RegressionEquationItemConverter(
const ::com::sun::star::uno::Reference< const ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > & rPropertySet, ::com::sun::star::beans::XPropertySet > & rPropertySet,
...@@ -48,9 +42,8 @@ public: ...@@ -48,9 +42,8 @@ public:
SdrModel& rDrawModel, SdrModel& rDrawModel,
const ::com::sun::star::uno::Reference< const ::com::sun::star::uno::Reference<
::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory, ::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize = const css::awt::Size* pRefSize = NULL );
::std::auto_ptr< ::com::sun::star::awt::Size >() );
SAL_WNODEPRECATED_DECLARATIONS_POP
virtual ~RegressionEquationItemConverter(); virtual ~RegressionEquationItemConverter();
virtual void FillItemSet( SfxItemSet & rOutItemSet ) const SAL_OVERRIDE; virtual void FillItemSet( SfxItemSet & rOutItemSet ) const SAL_OVERRIDE;
...@@ -69,10 +62,8 @@ private: ...@@ -69,10 +62,8 @@ private:
::std::vector< ItemConverter * > m_aConverters; ::std::vector< ItemConverter * > m_aConverters;
}; };
} // namespace wrapper }}
} // namespace chart
// INCLUDED_CHART2_SOURCE_CONTROLLER_INC_REGRESSIONEQUATIONITEMCONVERTER_HXX
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -24,30 +24,19 @@ ...@@ -24,30 +24,19 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <vector> #include <vector>
#include <memory>
class SdrModel; class SdrModel;
namespace chart namespace chart { namespace wrapper {
{
namespace wrapper
{
class TitleItemConverter : class TitleItemConverter : public comphelper::ItemConverter
public ::comphelper::ItemConverter
{ {
public: public:
SAL_WNODEPRECATED_DECLARATIONS_PUSH
TitleItemConverter( TitleItemConverter(
const ::com::sun::star::uno::Reference< const css::uno::Reference<css::beans::XPropertySet>& rPropertySet,
::com::sun::star::beans::XPropertySet > & rPropertySet, SfxItemPool& rItemPool, SdrModel& rDrawModel,
SfxItemPool& rItemPool, const css::uno::Reference<css::lang::XMultiServiceFactory>& xNamedPropertyContainerFactory,
SdrModel& rDrawModel, const css::awt::Size* pRefSize = NULL );
const ::com::sun::star::uno::Reference<
::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize =
::std::auto_ptr< ::com::sun::star::awt::Size >() );
SAL_WNODEPRECATED_DECLARATIONS_POP
virtual ~TitleItemConverter(); virtual ~TitleItemConverter();
...@@ -59,18 +48,16 @@ protected: ...@@ -59,18 +48,16 @@ protected:
virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const SAL_OVERRIDE; virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const SAL_OVERRIDE;
virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutItemSet ) const virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutItemSet ) const
throw( ::com::sun::star::uno::Exception ) SAL_OVERRIDE; throw (css::uno::Exception) SAL_OVERRIDE;
virtual bool ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet & rItemSet ) virtual bool ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet & rItemSet )
throw( ::com::sun::star::uno::Exception ) SAL_OVERRIDE; throw (css::uno::Exception) SAL_OVERRIDE;
private: private:
::std::vector< ItemConverter * > m_aConverters; ::std::vector< ItemConverter * > m_aConverters;
}; };
} // namespace wrapper }}
} // namespace chart
// INCLUDED_CHART2_SOURCE_CONTROLLER_INC_TITLEITEMCONVERTER_HXX
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -70,12 +70,8 @@ namespace ...@@ -70,12 +70,8 @@ namespace
}; };
} // anonymous namespace } // anonymous namespace
namespace chart namespace chart { namespace wrapper {
{
namespace wrapper
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
AxisItemConverter::AxisItemConverter( AxisItemConverter::AxisItemConverter(
const Reference< beans::XPropertySet > & rPropertySet, const Reference< beans::XPropertySet > & rPropertySet,
SfxItemPool& rItemPool, SfxItemPool& rItemPool,
...@@ -83,7 +79,7 @@ AxisItemConverter::AxisItemConverter( ...@@ -83,7 +79,7 @@ AxisItemConverter::AxisItemConverter(
const Reference< chart2::XChartDocument > & xChartDoc, const Reference< chart2::XChartDocument > & xChartDoc,
::chart::ExplicitScaleData * pScale /* = NULL */, ::chart::ExplicitScaleData * pScale /* = NULL */,
::chart::ExplicitIncrementData * pIncrement /* = NULL */, ::chart::ExplicitIncrementData * pIncrement /* = NULL */,
::std::auto_ptr< awt::Size > pRefSize /* = NULL */ ) : const awt::Size* pRefSize ) :
ItemConverter( rPropertySet, rItemPool ), ItemConverter( rPropertySet, rItemPool ),
m_xChartDoc( xChartDoc ), m_xChartDoc( xChartDoc ),
m_pExplicitScale( NULL ), m_pExplicitScale( NULL ),
...@@ -100,13 +96,12 @@ AxisItemConverter::AxisItemConverter( ...@@ -100,13 +96,12 @@ AxisItemConverter::AxisItemConverter(
rPropertySet, rItemPool, rDrawModel, rPropertySet, rItemPool, rDrawModel,
xNamedPropertyContainerFactory, xNamedPropertyContainerFactory,
GraphicPropertyItemConverter::LINE_PROPERTIES )); GraphicPropertyItemConverter::LINE_PROPERTIES ));
m_aConverters.push_back( new CharacterPropertyItemConverter( rPropertySet, rItemPool, pRefSize, m_aConverters.push_back(
"ReferencePageSize" )); new CharacterPropertyItemConverter(rPropertySet, rItemPool, pRefSize, "ReferencePageSize"));
m_xAxis.set( Reference< chart2::XAxis >( rPropertySet, uno::UNO_QUERY ) ); m_xAxis.set( Reference< chart2::XAxis >( rPropertySet, uno::UNO_QUERY ) );
OSL_ASSERT( m_xAxis.is()); OSL_ASSERT( m_xAxis.is());
} }
SAL_WNODEPRECATED_DECLARATIONS_POP
AxisItemConverter::~AxisItemConverter() AxisItemConverter::~AxisItemConverter()
{ {
...@@ -993,7 +988,6 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet ...@@ -993,7 +988,6 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
return (bSetScale || bChangedOtherwise); return (bSetScale || bChangedOtherwise);
} }
} // namespace wrapper }}
} // namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -64,10 +64,7 @@ namespace ...@@ -64,10 +64,7 @@ namespace
} }
} // anonymous namespace } // anonymous namespace
namespace chart namespace chart { namespace wrapper {
{
namespace wrapper
{
CharacterPropertyItemConverter::CharacterPropertyItemConverter( CharacterPropertyItemConverter::CharacterPropertyItemConverter(
const uno::Reference< beans::XPropertySet > & rPropertySet, const uno::Reference< beans::XPropertySet > & rPropertySet,
...@@ -75,19 +72,19 @@ CharacterPropertyItemConverter::CharacterPropertyItemConverter( ...@@ -75,19 +72,19 @@ CharacterPropertyItemConverter::CharacterPropertyItemConverter(
ItemConverter( rPropertySet, rItemPool ) ItemConverter( rPropertySet, rItemPool )
{} {}
SAL_WNODEPRECATED_DECLARATIONS_PUSH
CharacterPropertyItemConverter::CharacterPropertyItemConverter( CharacterPropertyItemConverter::CharacterPropertyItemConverter(
const uno::Reference< beans::XPropertySet > & rPropertySet, const uno::Reference< beans::XPropertySet > & rPropertySet,
SfxItemPool& rItemPool, SfxItemPool& rItemPool,
::std::auto_ptr< awt::Size > pRefSize, const awt::Size* pRefSize,
const OUString & rRefSizePropertyName, const OUString & rRefSizePropertyName,
const uno::Reference< beans::XPropertySet > & rRefSizePropSet ) : const uno::Reference< beans::XPropertySet > & rRefSizePropSet ) :
ItemConverter( rPropertySet, rItemPool ), ItemConverter( rPropertySet, rItemPool ),
m_pRefSize( pRefSize ),
m_aRefSizePropertyName( rRefSizePropertyName ), m_aRefSizePropertyName( rRefSizePropertyName ),
m_xRefSizePropSet( rRefSizePropSet.is() ? rRefSizePropSet : rPropertySet ) m_xRefSizePropSet( rRefSizePropSet.is() ? rRefSizePropSet : rPropertySet )
{} {
SAL_WNODEPRECATED_DECLARATIONS_POP if (pRefSize)
m_pRefSize.reset(*pRefSize);
}
CharacterPropertyItemConverter::~CharacterPropertyItemConverter() CharacterPropertyItemConverter::~CharacterPropertyItemConverter()
{} {}
...@@ -268,7 +265,7 @@ void CharacterPropertyItemConverter::FillSpecialItem( ...@@ -268,7 +265,7 @@ void CharacterPropertyItemConverter::FillSpecialItem(
float fHeight; float fHeight;
if( aValue >>= fHeight ) if( aValue >>= fHeight )
{ {
if( m_pRefSize.get()) if (m_pRefSize)
{ {
awt::Size aOldRefSize; awt::Size aOldRefSize;
if( GetRefSizePropertySet()->getPropertyValue( m_aRefSizePropertyName ) >>= aOldRefSize ) if( GetRefSizePropertySet()->getPropertyValue( m_aRefSizePropertyName ) >>= aOldRefSize )
...@@ -518,7 +515,7 @@ bool CharacterPropertyItemConverter::ApplySpecialItem( ...@@ -518,7 +515,7 @@ bool CharacterPropertyItemConverter::ApplySpecialItem(
bSetValue = true; bSetValue = true;
else else
{ {
if( m_pRefSize.get() ) if (m_pRefSize)
{ {
awt::Size aNewRefSize = *m_pRefSize; awt::Size aNewRefSize = *m_pRefSize;
awt::Size aOldRefSize; awt::Size aOldRefSize;
...@@ -533,11 +530,10 @@ bool CharacterPropertyItemConverter::ApplySpecialItem( ...@@ -533,11 +530,10 @@ bool CharacterPropertyItemConverter::ApplySpecialItem(
if( bSetValue ) if( bSetValue )
{ {
// set new reference size only if there was a reference size before (auto-scaling on) // set new reference size only if there was a reference size before (auto-scaling on)
if( m_pRefSize.get() && if (m_pRefSize && GetRefSizePropertySet()->getPropertyValue( m_aRefSizePropertyName ).hasValue())
GetRefSizePropertySet()->getPropertyValue( m_aRefSizePropertyName ).hasValue())
{ {
GetRefSizePropertySet()->setPropertyValue( m_aRefSizePropertyName, GetRefSizePropertySet()->setPropertyValue(
uno::makeAny( *m_pRefSize )); m_aRefSizePropertyName, uno::makeAny(*m_pRefSize));
} }
GetPropertySet()->setPropertyValue( "CharHeight" + aPostfix, aValue ); GetPropertySet()->setPropertyValue( "CharHeight" + aPostfix, aValue );
...@@ -556,7 +552,11 @@ bool CharacterPropertyItemConverter::ApplySpecialItem( ...@@ -556,7 +552,11 @@ bool CharacterPropertyItemConverter::ApplySpecialItem(
return bChanged; return bChanged;
} }
} // namespace wrapper uno::Reference<beans::XPropertySet> CharacterPropertyItemConverter::GetRefSizePropertySet() const
} // namespace chart {
return m_xRefSizePropSet;
}
}}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -190,12 +190,8 @@ bool lcl_UseSourceFormatFromItemToPropertySet( sal_uInt16 nWhichId, const SfxIte ...@@ -190,12 +190,8 @@ bool lcl_UseSourceFormatFromItemToPropertySet( sal_uInt16 nWhichId, const SfxIte
} // anonymous namespace } // anonymous namespace
namespace chart namespace chart { namespace wrapper {
{
namespace wrapper
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
DataPointItemConverter::DataPointItemConverter( DataPointItemConverter::DataPointItemConverter(
const uno::Reference< frame::XModel > & xChartModel, const uno::Reference< frame::XModel > & xChartModel,
const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< uno::XComponentContext > & xContext,
...@@ -203,16 +199,15 @@ DataPointItemConverter::DataPointItemConverter( ...@@ -203,16 +199,15 @@ DataPointItemConverter::DataPointItemConverter(
const uno::Reference< XDataSeries > & xSeries, const uno::Reference< XDataSeries > & xSeries,
SfxItemPool& rItemPool, SfxItemPool& rItemPool,
SdrModel& rDrawModel, SdrModel& rDrawModel,
const uno::Reference< lang::XMultiServiceFactory > & xNamedPropertyContainerFactory, const uno::Reference<lang::XMultiServiceFactory>& xNamedPropertyContainerFactory,
GraphicPropertyItemConverter::eGraphicObjectType eMapTo /* = FILL_PROPERTIES */, GraphicPropertyItemConverter::eGraphicObjectType eMapTo,
::std::auto_ptr< awt::Size > pRefSize /* = NULL */, const awt::Size* pRefSize,
bool bDataSeries /* = false */, bool bDataSeries,
bool bUseSpecialFillColor /* = false */, bool bUseSpecialFillColor,
sal_Int32 nSpecialFillColor /* =0 */, sal_Int32 nSpecialFillColor,
bool bOverwriteLabelsForAttributedDataPointsAlso /*false*/, bool bOverwriteLabelsForAttributedDataPointsAlso,
sal_Int32 nNumberFormat, sal_Int32 nNumberFormat,
sal_Int32 nPercentNumberFormat sal_Int32 nPercentNumberFormat ) :
) :
ItemConverter( rPropertySet, rItemPool ), ItemConverter( rPropertySet, rItemPool ),
m_bDataSeries( bDataSeries ), m_bDataSeries( bDataSeries ),
m_bOverwriteLabelsForAttributedDataPointsAlso(m_bDataSeries && bOverwriteLabelsForAttributedDataPointsAlso), m_bOverwriteLabelsForAttributedDataPointsAlso(m_bDataSeries && bOverwriteLabelsForAttributedDataPointsAlso),
...@@ -225,7 +220,7 @@ DataPointItemConverter::DataPointItemConverter( ...@@ -225,7 +220,7 @@ DataPointItemConverter::DataPointItemConverter(
{ {
m_aConverters.push_back( new GraphicPropertyItemConverter( m_aConverters.push_back( new GraphicPropertyItemConverter(
rPropertySet, rItemPool, rDrawModel, xNamedPropertyContainerFactory, eMapTo )); rPropertySet, rItemPool, rDrawModel, xNamedPropertyContainerFactory, eMapTo ));
m_aConverters.push_back( new CharacterPropertyItemConverter( rPropertySet, rItemPool, pRefSize, "ReferencePageSize")); m_aConverters.push_back( new CharacterPropertyItemConverter(rPropertySet, rItemPool, pRefSize, "ReferencePageSize"));
if( bDataSeries ) if( bDataSeries )
{ {
m_aConverters.push_back( new StatisticsItemConverter( xChartModel, rPropertySet, rItemPool )); m_aConverters.push_back( new StatisticsItemConverter( xChartModel, rPropertySet, rItemPool ));
...@@ -241,7 +236,6 @@ DataPointItemConverter::DataPointItemConverter( ...@@ -241,7 +236,6 @@ DataPointItemConverter::DataPointItemConverter(
m_bForbidPercentValue = AxisType::CATEGORY != ChartTypeHelper::getAxisType( xChartType, 0 ); m_bForbidPercentValue = AxisType::CATEGORY != ChartTypeHelper::getAxisType( xChartType, 0 );
} }
SAL_WNODEPRECATED_DECLARATIONS_POP
DataPointItemConverter::~DataPointItemConverter() DataPointItemConverter::~DataPointItemConverter()
{ {
...@@ -674,7 +668,6 @@ void DataPointItemConverter::FillSpecialItem( ...@@ -674,7 +668,6 @@ void DataPointItemConverter::FillSpecialItem(
} }
} }
} // namespace wrapper }}
} // namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -54,7 +54,7 @@ LegendItemConverter::LegendItemConverter( ...@@ -54,7 +54,7 @@ LegendItemConverter::LegendItemConverter(
rPropertySet, rItemPool, rDrawModel, xNamedPropertyContainerFactory, rPropertySet, rItemPool, rDrawModel, xNamedPropertyContainerFactory,
GraphicPropertyItemConverter::LINE_AND_FILL_PROPERTIES )); GraphicPropertyItemConverter::LINE_AND_FILL_PROPERTIES ));
m_aConverters.push_back( new CharacterPropertyItemConverter( m_aConverters.push_back( new CharacterPropertyItemConverter(
rPropertySet, rItemPool, pRefSize, rPropertySet, rItemPool, pRefSize.get(),
"ReferencePageSize" )); "ReferencePageSize" ));
} }
SAL_WNODEPRECATED_DECLARATIONS_POP SAL_WNODEPRECATED_DECLARATIONS_POP
......
...@@ -32,23 +32,21 @@ ...@@ -32,23 +32,21 @@
#include "chartview/ExplicitValueProvider.hxx" #include "chartview/ExplicitValueProvider.hxx"
#include "DiagramHelper.hxx" #include "DiagramHelper.hxx"
#include <boost/scoped_ptr.hpp>
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2; using namespace ::com::sun::star::chart2;
using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Sequence;
namespace chart namespace chart { namespace wrapper {
{
namespace wrapper
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
AllAxisItemConverter::AllAxisItemConverter( AllAxisItemConverter::AllAxisItemConverter(
const uno::Reference< frame::XModel > & xChartModel, const uno::Reference< frame::XModel > & xChartModel,
SfxItemPool& rItemPool, SfxItemPool& rItemPool,
SdrModel& rDrawModel, SdrModel& rDrawModel,
const uno::Reference< lang::XMultiServiceFactory > & /*xNamedPropertyContainerFactory*/, const uno::Reference< lang::XMultiServiceFactory > & /*xNamedPropertyContainerFactory*/,
::std::auto_ptr< awt::Size > pRefSize ) const awt::Size* pRefSize )
: MultipleItemConverter( rItemPool ) : MultipleItemConverter( rItemPool )
{ {
Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( xChartModel ) ); Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( xChartModel ) );
...@@ -56,18 +54,12 @@ AllAxisItemConverter::AllAxisItemConverter( ...@@ -56,18 +54,12 @@ AllAxisItemConverter::AllAxisItemConverter(
for( sal_Int32 nA = 0; nA < aElementList.getLength(); nA++ ) for( sal_Int32 nA = 0; nA < aElementList.getLength(); nA++ )
{ {
uno::Reference< beans::XPropertySet > xObjectProperties(aElementList[nA], uno::UNO_QUERY); uno::Reference< beans::XPropertySet > xObjectProperties(aElementList[nA], uno::UNO_QUERY);
if( pRefSize.get())
m_aConverters.push_back( new ::chart::wrapper::AxisItemConverter( m_aConverters.push_back( new ::chart::wrapper::AxisItemConverter(
xObjectProperties, rItemPool, rDrawModel, xObjectProperties, rItemPool, rDrawModel,
uno::Reference< chart2::XChartDocument >( xChartModel, uno::UNO_QUERY ), 0, 0, uno::Reference< chart2::XChartDocument >( xChartModel, uno::UNO_QUERY ), 0, 0,
::std::auto_ptr< awt::Size >( new awt::Size( *pRefSize )) )); pRefSize));
else
m_aConverters.push_back( new ::chart::wrapper::AxisItemConverter(
xObjectProperties, rItemPool, rDrawModel,
uno::Reference< chart2::XChartDocument >( xChartModel, uno::UNO_QUERY ), 0, 0 ) );
} }
} }
SAL_WNODEPRECATED_DECLARATIONS_POP
AllAxisItemConverter::~AllAxisItemConverter() AllAxisItemConverter::~AllAxisItemConverter()
{ {
...@@ -107,13 +99,12 @@ const sal_uInt16 * AllGridItemConverter::GetWhichPairs() const ...@@ -107,13 +99,12 @@ const sal_uInt16 * AllGridItemConverter::GetWhichPairs() const
return nGridWhichPairs; return nGridWhichPairs;
} }
SAL_WNODEPRECATED_DECLARATIONS_PUSH
AllDataLabelItemConverter::AllDataLabelItemConverter( AllDataLabelItemConverter::AllDataLabelItemConverter(
const uno::Reference< frame::XModel > & xChartModel, const uno::Reference< frame::XModel > & xChartModel,
SfxItemPool& rItemPool, SfxItemPool& rItemPool,
SdrModel& rDrawModel, SdrModel& rDrawModel,
const uno::Reference< lang::XMultiServiceFactory > & xNamedPropertyContainerFactory, const uno::Reference< lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
::std::auto_ptr< awt::Size > pRefSize ) const awt::Size* pRefSize )
: MultipleItemConverter( rItemPool ) : MultipleItemConverter( rItemPool )
{ {
::std::vector< uno::Reference< chart2::XDataSeries > > aSeriesList( ::std::vector< uno::Reference< chart2::XDataSeries > > aSeriesList(
...@@ -129,21 +120,13 @@ AllDataLabelItemConverter::AllDataLabelItemConverter( ...@@ -129,21 +120,13 @@ AllDataLabelItemConverter::AllDataLabelItemConverter(
sal_Int32 nPercentNumberFormat=ExplicitValueProvider::getExplicitPercentageNumberFormatKeyForDataLabel( sal_Int32 nPercentNumberFormat=ExplicitValueProvider::getExplicitPercentageNumberFormatKeyForDataLabel(
xObjectProperties,uno::Reference< util::XNumberFormatsSupplier >(xChartModel, uno::UNO_QUERY)); xObjectProperties,uno::Reference< util::XNumberFormatsSupplier >(xChartModel, uno::UNO_QUERY));
m_aConverters.push_back( new ::chart::wrapper::DataPointItemConverter( m_aConverters.push_back(
xChartModel, xContext, new ::chart::wrapper::DataPointItemConverter(
xObjectProperties, *aIt, rItemPool, rDrawModel, xChartModel, xContext, xObjectProperties, *aIt, rItemPool, rDrawModel,
xNamedPropertyContainerFactory, xNamedPropertyContainerFactory, GraphicPropertyItemConverter::FILLED_DATA_POINT,
GraphicPropertyItemConverter::FILLED_DATA_POINT, pRefSize, true, false, 0, true, nNumberFormat, nPercentNumberFormat));
::std::auto_ptr< awt::Size >( pRefSize.get() ? new awt::Size( *pRefSize ) : 0),
true, /*bDataSeries*/
false, /*bUseSpecialFillColor*/
0, /*nSpecialFillColor*/
true /*bOverwriteLabelsForAttributedDataPointsAlso*/,
nNumberFormat, nPercentNumberFormat
));
} }
} }
SAL_WNODEPRECATED_DECLARATIONS_POP
AllDataLabelItemConverter::~AllDataLabelItemConverter() AllDataLabelItemConverter::~AllDataLabelItemConverter()
{ {
...@@ -155,13 +138,12 @@ const sal_uInt16 * AllDataLabelItemConverter::GetWhichPairs() const ...@@ -155,13 +138,12 @@ const sal_uInt16 * AllDataLabelItemConverter::GetWhichPairs() const
return nDataLabelWhichPairs; return nDataLabelWhichPairs;
} }
SAL_WNODEPRECATED_DECLARATIONS_PUSH
AllTitleItemConverter::AllTitleItemConverter( AllTitleItemConverter::AllTitleItemConverter(
const uno::Reference< frame::XModel > & xChartModel, const uno::Reference< frame::XModel > & xChartModel,
SfxItemPool& rItemPool, SfxItemPool& rItemPool,
SdrModel& rDrawModel, SdrModel& rDrawModel,
const uno::Reference< lang::XMultiServiceFactory > & xNamedPropertyContainerFactory, const uno::Reference< lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
::std::auto_ptr< awt::Size > pRefSize ) const awt::Size* pRefSize )
: MultipleItemConverter( rItemPool ) : MultipleItemConverter( rItemPool )
{ {
for(sal_Int32 nTitle = TitleHelper::TITLE_BEGIN; nTitle < TitleHelper::NORMAL_TITLE_END; nTitle++ ) for(sal_Int32 nTitle = TitleHelper::TITLE_BEGIN; nTitle < TitleHelper::NORMAL_TITLE_END; nTitle++ )
...@@ -170,14 +152,11 @@ AllTitleItemConverter::AllTitleItemConverter( ...@@ -170,14 +152,11 @@ AllTitleItemConverter::AllTitleItemConverter(
if(!xTitle.is()) if(!xTitle.is())
continue; continue;
uno::Reference< beans::XPropertySet > xObjectProperties( xTitle, uno::UNO_QUERY); uno::Reference< beans::XPropertySet > xObjectProperties( xTitle, uno::UNO_QUERY);
::std::auto_ptr< awt::Size > pSingleRefSize(0); m_aConverters.push_back(
if( pRefSize.get()) new ::chart::wrapper::TitleItemConverter(
pSingleRefSize = ::std::auto_ptr< awt::Size >( new awt::Size( *pRefSize )); xObjectProperties, rItemPool, rDrawModel, xNamedPropertyContainerFactory, pRefSize));
m_aConverters.push_back( new ::chart::wrapper::TitleItemConverter(
xObjectProperties, rItemPool, rDrawModel, xNamedPropertyContainerFactory, pSingleRefSize ));
} }
} }
SAL_WNODEPRECATED_DECLARATIONS_POP
AllTitleItemConverter::~AllTitleItemConverter() AllTitleItemConverter::~AllTitleItemConverter()
{ {
...@@ -215,7 +194,6 @@ const sal_uInt16 * AllSeriesStatisticsConverter::GetWhichPairs() const ...@@ -215,7 +194,6 @@ const sal_uInt16 * AllSeriesStatisticsConverter::GetWhichPairs() const
return nStatWhichPairs; return nStatWhichPairs;
} }
} // namespace wrapper }}
} // namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -44,19 +44,15 @@ namespace ...@@ -44,19 +44,15 @@ namespace
}; };
} // anonymous namespace } // anonymous namespace
namespace chart namespace chart { namespace wrapper {
{
namespace wrapper
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
RegressionEquationItemConverter::RegressionEquationItemConverter( RegressionEquationItemConverter::RegressionEquationItemConverter(
const ::com::sun::star::uno::Reference< const ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > & rPropertySet, ::com::sun::star::beans::XPropertySet > & rPropertySet,
SfxItemPool& rItemPool, SfxItemPool& rItemPool,
SdrModel& rDrawModel, SdrModel& rDrawModel,
const uno::Reference< lang::XMultiServiceFactory > & xNamedPropertyContainerFactory, const uno::Reference< lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize ) : const awt::Size* pRefSize ) :
ItemConverter( rPropertySet, rItemPool ) ItemConverter( rPropertySet, rItemPool )
{ {
m_aConverters.push_back( new GraphicPropertyItemConverter( m_aConverters.push_back( new GraphicPropertyItemConverter(
...@@ -64,10 +60,9 @@ RegressionEquationItemConverter::RegressionEquationItemConverter( ...@@ -64,10 +60,9 @@ RegressionEquationItemConverter::RegressionEquationItemConverter(
xNamedPropertyContainerFactory, xNamedPropertyContainerFactory,
GraphicPropertyItemConverter::LINE_AND_FILL_PROPERTIES )); GraphicPropertyItemConverter::LINE_AND_FILL_PROPERTIES ));
m_aConverters.push_back( new CharacterPropertyItemConverter( m_aConverters.push_back(
rPropertySet, rItemPool, pRefSize, "ReferencePageSize")); new CharacterPropertyItemConverter(rPropertySet, rItemPool, pRefSize, "ReferencePageSize"));
} }
SAL_WNODEPRECATED_DECLARATIONS_POP
RegressionEquationItemConverter::~RegressionEquationItemConverter() RegressionEquationItemConverter::~RegressionEquationItemConverter()
{ {
...@@ -156,7 +151,6 @@ void RegressionEquationItemConverter::FillSpecialItem( ...@@ -156,7 +151,6 @@ void RegressionEquationItemConverter::FillSpecialItem(
} }
} }
} // namespace wrapper }}
} // namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -47,53 +47,44 @@ namespace ...@@ -47,53 +47,44 @@ namespace
}; };
} // anonymous namespace } // anonymous namespace
namespace chart namespace chart { namespace wrapper {
{
namespace wrapper
{
class FormattedStringsConverter : public ::comphelper::MultipleItemConverter class FormattedStringsConverter : public ::comphelper::MultipleItemConverter
{ {
public: public:
SAL_WNODEPRECATED_DECLARATIONS_PUSH
FormattedStringsConverter( FormattedStringsConverter(
const uno::Sequence< uno::Reference< chart2::XFormattedString > > & aStrings, const uno::Sequence< uno::Reference< chart2::XFormattedString > > & aStrings,
SfxItemPool & rItemPool, SfxItemPool & rItemPool,
::std::auto_ptr< awt::Size > pRefSize, const awt::Size* pRefSize,
const uno::Reference< beans::XPropertySet > & xParentProp ); const uno::Reference< beans::XPropertySet > & xParentProp );
SAL_WNODEPRECATED_DECLARATIONS_POP
virtual ~FormattedStringsConverter(); virtual ~FormattedStringsConverter();
protected: protected:
virtual const sal_uInt16 * GetWhichPairs() const SAL_OVERRIDE; virtual const sal_uInt16 * GetWhichPairs() const SAL_OVERRIDE;
}; };
SAL_WNODEPRECATED_DECLARATIONS_PUSH
FormattedStringsConverter::FormattedStringsConverter( FormattedStringsConverter::FormattedStringsConverter(
const uno::Sequence< uno::Reference< chart2::XFormattedString > > & aStrings, const uno::Sequence< uno::Reference< chart2::XFormattedString > > & aStrings,
SfxItemPool & rItemPool, SfxItemPool & rItemPool,
::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize, const awt::Size* pRefSize,
const uno::Reference< beans::XPropertySet > & xParentProp ) : const uno::Reference< beans::XPropertySet > & xParentProp ) :
MultipleItemConverter( rItemPool ) MultipleItemConverter( rItemPool )
{ {
bool bHasRefSize = (pRefSize.get() && xParentProp.is()); bool bHasRefSize = (pRefSize && xParentProp.is());
for( sal_Int32 i = 0; i < aStrings.getLength(); ++i ) for( sal_Int32 i = 0; i < aStrings.getLength(); ++i )
{ {
uno::Reference< beans::XPropertySet > xProp( aStrings[ i ], uno::UNO_QUERY ); uno::Reference< beans::XPropertySet > xProp( aStrings[ i ], uno::UNO_QUERY );
if( xProp.is()) if( xProp.is())
{ {
if( bHasRefSize ) if( bHasRefSize )
m_aConverters.push_back( new CharacterPropertyItemConverter( m_aConverters.push_back(
xProp, rItemPool, new CharacterPropertyItemConverter(
::std::auto_ptr< awt::Size >( new awt::Size( *pRefSize )), xProp, rItemPool, pRefSize, "ReferencePageSize", xParentProp));
"ReferencePageSize" ,
xParentProp ));
else else
m_aConverters.push_back( new CharacterPropertyItemConverter( xProp, rItemPool )); m_aConverters.push_back( new CharacterPropertyItemConverter( xProp, rItemPool ));
} }
} }
} }
SAL_WNODEPRECATED_DECLARATIONS_POP
FormattedStringsConverter::~FormattedStringsConverter() FormattedStringsConverter::~FormattedStringsConverter()
{ {
...@@ -104,14 +95,12 @@ const sal_uInt16 * FormattedStringsConverter::GetWhichPairs() const ...@@ -104,14 +95,12 @@ const sal_uInt16 * FormattedStringsConverter::GetWhichPairs() const
return nCharacterPropertyWhichPairs; return nCharacterPropertyWhichPairs;
} }
SAL_WNODEPRECATED_DECLARATIONS_PUSH
TitleItemConverter::TitleItemConverter( TitleItemConverter::TitleItemConverter(
const ::com::sun::star::uno::Reference< const uno::Reference<beans::XPropertySet> & rPropertySet,
::com::sun::star::beans::XPropertySet > & rPropertySet,
SfxItemPool& rItemPool, SfxItemPool& rItemPool,
SdrModel& rDrawModel, SdrModel& rDrawModel,
const uno::Reference< lang::XMultiServiceFactory > & xNamedPropertyContainerFactory, const uno::Reference< lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize ) : const awt::Size* pRefSize ) :
ItemConverter( rPropertySet, rItemPool ) ItemConverter( rPropertySet, rItemPool )
{ {
m_aConverters.push_back( new GraphicPropertyItemConverter( m_aConverters.push_back( new GraphicPropertyItemConverter(
...@@ -132,7 +121,6 @@ TitleItemConverter::TitleItemConverter( ...@@ -132,7 +121,6 @@ TitleItemConverter::TitleItemConverter(
} }
} }
} }
SAL_WNODEPRECATED_DECLARATIONS_POP
TitleItemConverter::~TitleItemConverter() TitleItemConverter::~TitleItemConverter()
{ {
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
#include <com/sun/star/chart2/XChartDocument.hpp> #include <com/sun/star/chart2/XChartDocument.hpp>
#include <memory> #include <memory>
#include <boost/scoped_ptr.hpp>
#include <vcl/msgbox.hxx> #include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
...@@ -108,14 +109,14 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH ...@@ -108,14 +109,14 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
break; break;
case OBJECTTYPE_TITLE: case OBJECTTYPE_TITLE:
{ {
::std::auto_ptr< awt::Size > pRefSize; boost::scoped_ptr<awt::Size> pRefSize;
if( pRefSizeProvider.get() ) if( pRefSizeProvider.get() )
pRefSize.reset( new awt::Size( pRefSizeProvider->getPageSize())); pRefSize.reset(new awt::Size(pRefSizeProvider->getPageSize()));
pItemConverter = new wrapper::TitleItemConverter( xObjectProperties, pItemConverter = new wrapper::TitleItemConverter(
rDrawModel.GetItemPool(), rDrawModel, xObjectProperties, rDrawModel.GetItemPool(), rDrawModel,
uno::Reference< lang::XMultiServiceFactory >( xChartModel, uno::UNO_QUERY ), uno::Reference<lang::XMultiServiceFactory>(xChartModel, uno::UNO_QUERY),
pRefSize ); pRefSize.get());
} }
break; break;
case OBJECTTYPE_LEGEND: case OBJECTTYPE_LEGEND:
...@@ -143,7 +144,7 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH ...@@ -143,7 +144,7 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
break; break;
case OBJECTTYPE_AXIS: case OBJECTTYPE_AXIS:
{ {
::std::auto_ptr< awt::Size > pRefSize; boost::scoped_ptr<awt::Size> pRefSize;
if( pRefSizeProvider.get() ) if( pRefSizeProvider.get() )
pRefSize.reset( new awt::Size( pRefSizeProvider->getPageSize())); pRefSize.reset( new awt::Size( pRefSizeProvider->getPageSize()));
...@@ -166,7 +167,7 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH ...@@ -166,7 +167,7 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
rDrawModel, rDrawModel,
uno::Reference< chart2::XChartDocument >( xChartModel, uno::UNO_QUERY ), uno::Reference< chart2::XChartDocument >( xChartModel, uno::UNO_QUERY ),
&aExplicitScale, &aExplicitIncrement, &aExplicitScale, &aExplicitIncrement,
pRefSize ); pRefSize.get() );
} }
break; break;
case OBJECTTYPE_AXIS_UNITLABEL: case OBJECTTYPE_AXIS_UNITLABEL:
...@@ -176,7 +177,7 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH ...@@ -176,7 +177,7 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
case OBJECTTYPE_DATA_LABEL: case OBJECTTYPE_DATA_LABEL:
case OBJECTTYPE_DATA_POINT: case OBJECTTYPE_DATA_POINT:
{ {
::std::auto_ptr< awt::Size > pRefSize; boost::scoped_ptr<awt::Size> pRefSize;
if( pRefSizeProvider.get() ) if( pRefSizeProvider.get() )
pRefSize.reset( new awt::Size( pRefSizeProvider->getPageSize())); pRefSize.reset( new awt::Size( pRefSizeProvider->getPageSize()));
...@@ -223,7 +224,7 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH ...@@ -223,7 +224,7 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
pItemConverter = new wrapper::DataPointItemConverter( xChartModel, xContext, pItemConverter = new wrapper::DataPointItemConverter( xChartModel, xContext,
xObjectProperties, xSeries, rDrawModel.GetItemPool(), rDrawModel, xObjectProperties, xSeries, rDrawModel.GetItemPool(), rDrawModel,
uno::Reference< lang::XMultiServiceFactory >( xChartModel, uno::UNO_QUERY ), uno::Reference< lang::XMultiServiceFactory >( xChartModel, uno::UNO_QUERY ),
eMapTo, pRefSize, bDataSeries, bUseSpecialFillColor, nSpecialFillColor, true, eMapTo, pRefSize.get(), bDataSeries, bUseSpecialFillColor, nSpecialFillColor, true,
nNumberFormat, nPercentNumberFormat ); nNumberFormat, nPercentNumberFormat );
break; break;
} }
...@@ -253,14 +254,14 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH ...@@ -253,14 +254,14 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
break; break;
case OBJECTTYPE_DATA_CURVE_EQUATION: case OBJECTTYPE_DATA_CURVE_EQUATION:
{ {
::std::auto_ptr< awt::Size > pRefSize; boost::scoped_ptr<awt::Size> pRefSize;
if( pRefSizeProvider.get() ) if( pRefSizeProvider.get() )
pRefSize.reset( new awt::Size( pRefSizeProvider->getPageSize())); pRefSize.reset(new awt::Size(pRefSizeProvider->getPageSize()));
pItemConverter = new wrapper::RegressionEquationItemConverter( pItemConverter = new wrapper::RegressionEquationItemConverter(
xObjectProperties, rDrawModel.GetItemPool(), rDrawModel, xObjectProperties, rDrawModel.GetItemPool(), rDrawModel,
uno::Reference< lang::XMultiServiceFactory >( xChartModel, uno::UNO_QUERY ), uno::Reference< lang::XMultiServiceFactory >( xChartModel, uno::UNO_QUERY ),
pRefSize ); pRefSize.get());
break; break;
} }
case OBJECTTYPE_DATA_STOCK_RANGE: case OBJECTTYPE_DATA_STOCK_RANGE:
...@@ -287,12 +288,13 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH ...@@ -287,12 +288,13 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
break; break;
case OBJECTTYPE_AXIS: case OBJECTTYPE_AXIS:
{ {
::std::auto_ptr< awt::Size > pRefSize; boost::scoped_ptr<awt::Size> pRefSize;
if( pRefSizeProvider.get() ) if( pRefSizeProvider.get() )
pRefSize.reset( new awt::Size( pRefSizeProvider->getPageSize())); pRefSize.reset( new awt::Size( pRefSizeProvider->getPageSize()));
pItemConverter = new wrapper::AllAxisItemConverter( xChartModel, rDrawModel.GetItemPool(), pItemConverter = new wrapper::AllAxisItemConverter(
rDrawModel, uno::Reference< lang::XMultiServiceFactory >( xChartModel, uno::UNO_QUERY ), pRefSize ); xChartModel, rDrawModel.GetItemPool(),
rDrawModel, uno::Reference< lang::XMultiServiceFactory >( xChartModel, uno::UNO_QUERY ), pRefSize.get());
} }
break; break;
case OBJECTTYPE_GRID: case OBJECTTYPE_GRID:
......
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