[Libreoffice-commits] core.git: 2 commits - chart2/inc chart2/source
Kohei Yoshida
kohei.yoshida at collabora.com
Mon Jul 21 17:31:40 PDT 2014
chart2/inc/unonames.hxx | 1
chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx | 6 -
chart2/source/controller/inc/AxisItemConverter.hxx | 43 ++-----
chart2/source/controller/inc/CharacterPropertyItemConverter.hxx | 49 ++------
chart2/source/controller/inc/DataPointItemConverter.hxx | 45 ++-----
chart2/source/controller/inc/MultipleChartConverters.hxx | 56 ++-------
chart2/source/controller/inc/RegressionEquationItemConverter.hxx | 19 ---
chart2/source/controller/inc/TitleItemConverter.hxx | 31 +----
chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx | 16 --
chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx | 34 ++---
chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx | 41 ++----
chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx | 2
chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx | 60 +++-------
chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx | 16 --
chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx | 30 +----
chart2/source/controller/main/ChartController_Properties.cxx | 34 +++--
chart2/source/controller/main/ChartController_Tools.cxx | 7 -
chart2/source/model/main/DataPointProperties.cxx | 2
chart2/source/tools/DataSeriesHelper.cxx | 22 +--
chart2/source/view/main/VDataSeries.cxx | 2
20 files changed, 192 insertions(+), 324 deletions(-)
New commits:
commit 9e970303ddcccd9e33641f8f00bbc4c739a58cd7
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Mon Jul 21 19:55:03 2014 -0400
Remove auto_ptr from CharacterPropertyItemConverter.
And adjust all that's necessary.
Change-Id: I121e5aa4d117da2e5e6b11e4fd85960a8b3aa727
diff --git a/chart2/source/controller/inc/AxisItemConverter.hxx b/chart2/source/controller/inc/AxisItemConverter.hxx
index 4559c68..cb34dd0 100644
--- a/chart2/source/controller/inc/AxisItemConverter.hxx
+++ b/chart2/source/controller/inc/AxisItemConverter.hxx
@@ -27,31 +27,22 @@
#include "ItemConverter.hxx"
#include <vector>
-#include <memory>
class SdrModel;
-namespace chart
-{
-namespace wrapper
-{
+namespace chart { namespace wrapper {
-class AxisItemConverter : public ::comphelper::ItemConverter
+class AxisItemConverter : public comphelper::ItemConverter
{
public:
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
AxisItemConverter(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySet > & rPropertySet,
- SfxItemPool& rItemPool,
- SdrModel& rDrawModel,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XChartDocument > & xChartDoc,
- 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
+ const css::uno::Reference<css::beans::XPropertySet>& rPropertySet,
+ SfxItemPool& rItemPool, SdrModel& rDrawModel,
+ const css::uno::Reference<css::chart2::XChartDocument> & xChartDoc,
+ ExplicitScaleData* pScale = NULL,
+ ExplicitIncrementData* pIncrement = NULL,
+ const css::awt::Size* pRefSize = NULL );
+
virtual ~AxisItemConverter();
virtual void FillItemSet( SfxItemSet & rOutItemSet ) const SAL_OVERRIDE;
@@ -62,26 +53,24 @@ protected:
virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const SAL_OVERRIDE;
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 )
- throw( ::com::sun::star::uno::Exception ) SAL_OVERRIDE;
+ throw( css::uno::Exception ) SAL_OVERRIDE;
private:
::std::vector< ItemConverter * > m_aConverters;
- ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XAxis > m_xAxis;
+ css::uno::Reference<
+ css::chart2::XAxis > m_xAxis;
- ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XChartDocument > m_xChartDoc;
+ css::uno::Reference<
+ css::chart2::XChartDocument > m_xChartDoc;
ExplicitScaleData* m_pExplicitScale;
ExplicitIncrementData* m_pExplicitIncrement;
};
-} // namespace wrapper
-} // namespace chart
+}}
-// INCLUDED_CHART2_SOURCE_CONTROLLER_INC_AXISITEMCONVERTER_HXX
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx b/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx
index b4e2d57..5ab9910 100644
--- a/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx
+++ b/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx
@@ -24,59 +24,44 @@
#include <com/sun/star/beans/PropertyState.hpp>
#include <com/sun/star/awt/Size.hpp>
-#include <memory>
+#include <boost/optional.hpp>
-namespace chart
-{
-namespace wrapper
-{
+namespace chart { namespace wrapper {
-class CharacterPropertyItemConverter :
- public ::comphelper::ItemConverter
+class CharacterPropertyItemConverter : public comphelper::ItemConverter
{
public:
CharacterPropertyItemConverter(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySet > & rPropertySet,
+ const css::uno::Reference<css::beans::XPropertySet>& rPropertySet,
SfxItemPool& rItemPool );
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
+
CharacterPropertyItemConverter(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySet > & rPropertySet,
+ const css::uno::Reference<css::beans::XPropertySet>& rPropertySet,
SfxItemPool& rItemPool,
- ::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize,
+ const css::awt::Size* pRefSize,
const OUString & rRefSizePropertyName,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySet > & rRefSizePropSet =
- ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >() );
- SAL_WNODEPRECATED_DECLARATIONS_POP
+ const css::uno::Reference<css::beans::XPropertySet>& rRefSizePropSet = css::uno::Reference<css::beans::XPropertySet>() );
+
virtual ~CharacterPropertyItemConverter();
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 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 )
- throw( ::com::sun::star::uno::Exception ) SAL_OVERRIDE;
+ throw (css::uno::Exception) SAL_OVERRIDE;
- ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySet > GetRefSizePropertySet() const { return m_xRefSizePropSet;}
+ css::uno::Reference<css::beans::XPropertySet> GetRefSizePropertySet() const;
private:
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
- ::std::auto_ptr< ::com::sun::star::awt::Size > m_pRefSize;
- SAL_WNODEPRECATED_DECLARATIONS_POP
- OUString m_aRefSizePropertyName;
- ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySet > m_xRefSizePropSet;
+ OUString m_aRefSizePropertyName;
+ css::uno::Reference<css::beans::XPropertySet> m_xRefSizePropSet;
+ boost::optional<css::awt::Size> m_pRefSize;
};
-} // namespace wrapper
-} // namespace chart
+}}
-// INCLUDED_CHART2_SOURCE_CONTROLLER_INC_CHARACTERPROPERTYITEMCONVERTER_HXX
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/DataPointItemConverter.hxx b/chart2/source/controller/inc/DataPointItemConverter.hxx
index e598885..4c37ca2 100644
--- a/chart2/source/controller/inc/DataPointItemConverter.hxx
+++ b/chart2/source/controller/inc/DataPointItemConverter.hxx
@@ -27,45 +27,32 @@
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <memory>
#include <vector>
class SdrModel;
-namespace chart
-{
-namespace wrapper
-{
+namespace chart { namespace wrapper {
-class DataPointItemConverter :
- public ::comphelper::ItemConverter
+class DataPointItemConverter : public comphelper::ItemConverter
{
public:
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
DataPointItemConverter(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::frame::XModel > & xChartModel,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::uno::XComponentContext > & xContext,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySet > & rPropertySet,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XDataSeries > & xSeries,
+ const css::uno::Reference<css::frame::XModel>& xChartModel,
+ const css::uno::Reference<css::uno::XComponentContext>& xContext,
+ const css::uno::Reference<css::beans::XPropertySet>& rPropertySet,
+ const css::uno::Reference<css::chart2::XDataSeries>& xSeries,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
+ const css::uno::Reference<css::lang::XMultiServiceFactory>& xNamedPropertyContainerFactory,
GraphicPropertyItemConverter::eGraphicObjectType eMapTo =
GraphicPropertyItemConverter::FILLED_DATA_POINT,
- ::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize =
- ::std::auto_ptr< ::com::sun::star::awt::Size >(),
+ const css::awt::Size* pRefSize = NULL,
bool bDataSeries = false,
bool bUseSpecialFillColor = false,
sal_Int32 nSpecialFillColor = 0,
- bool bOverwriteLabelsForAttributedDataPointsAlso=false,
- sal_Int32 nNumberFormat=0,
- sal_Int32 nPercentNumberFormat=0);
- SAL_WNODEPRECATED_DECLARATIONS_POP
+ bool bOverwriteLabelsForAttributedDataPointsAlso = false,
+ sal_Int32 nNumberFormat = 0,
+ sal_Int32 nPercentNumberFormat = 0 );
virtual ~DataPointItemConverter();
@@ -77,9 +64,9 @@ protected:
virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const SAL_OVERRIDE;
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 )
- throw( ::com::sun::star::uno::Exception ) SAL_OVERRIDE;
+ throw (css::uno::Exception) SAL_OVERRIDE;
private:
::std::vector< ItemConverter * > m_aConverters;
@@ -89,14 +76,12 @@ private:
sal_Int32 m_nSpecialFillColor;
sal_Int32 m_nNumberFormat;
sal_Int32 m_nPercentNumberFormat;
- ::com::sun::star::uno::Sequence< sal_Int32 > m_aAvailableLabelPlacements;
+ css::uno::Sequence<sal_Int32> m_aAvailableLabelPlacements;
bool m_bForbidPercentValue;
};
-} // namespace wrapper
-} // namespace chart
+}}
-// INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DATAPOINTITEMCONVERTER_HXX
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/MultipleChartConverters.hxx b/chart2/source/controller/inc/MultipleChartConverters.hxx
index 55add59..f3819b9 100644
--- a/chart2/source/controller/inc/MultipleChartConverters.hxx
+++ b/chart2/source/controller/inc/MultipleChartConverters.hxx
@@ -23,29 +23,20 @@
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <memory>
-
class SdrModel;
-namespace chart
-{
-namespace wrapper
-{
+namespace chart { namespace wrapper {
class AllAxisItemConverter : public ::comphelper::MultipleItemConverter
{
public:
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
AllAxisItemConverter(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::frame::XModel > & xChartModel,
+ const css::uno::Reference<css::frame::XModel> & xChartModel,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
- 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
+ const css::uno::Reference<css::lang::XMultiServiceFactory>& xNamedPropertyContainerFactory,
+ const css::awt::Size* pRefSize = NULL );
+
virtual ~AllAxisItemConverter();
protected:
@@ -56,12 +47,10 @@ class AllGridItemConverter : public ::comphelper::MultipleItemConverter
{
public:
AllGridItemConverter(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::frame::XModel > & xChartModel,
+ const css::uno::Reference<css::frame::XModel>& xChartModel,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory );
+ const css::uno::Reference<css::lang::XMultiServiceFactory> & xNamedPropertyContainerFactory );
virtual ~AllGridItemConverter();
protected:
@@ -71,17 +60,13 @@ protected:
class AllDataLabelItemConverter : public ::comphelper::MultipleItemConverter
{
public:
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
AllDataLabelItemConverter(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::frame::XModel > & xChartModel,
+ const css::uno::Reference<css::frame::XModel>& xChartModel,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
- 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
+ const css::uno::Reference<css::lang::XMultiServiceFactory>& xNamedPropertyContainerFactory,
+ const css::awt::Size* pRefSize = NULL );
+
virtual ~AllDataLabelItemConverter();
protected:
@@ -91,17 +76,12 @@ protected:
class AllTitleItemConverter : public ::comphelper::MultipleItemConverter
{
public:
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
AllTitleItemConverter(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::frame::XModel > & xChartModel,
- SfxItemPool& rItemPool,
- SdrModel& rDrawModel,
- 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
+ const css::uno::Reference<css::frame::XModel>& xChartModel,
+ SfxItemPool& rItemPool, SdrModel& rDrawModel,
+ const css::uno::Reference<css::lang::XMultiServiceFactory>& xNamedPropertyContainerFactory,
+ const css::awt::Size* pRefSize = NULL );
+
virtual ~AllTitleItemConverter();
protected:
@@ -112,9 +92,7 @@ class AllSeriesStatisticsConverter : public ::comphelper::MultipleItemConverter
{
public:
AllSeriesStatisticsConverter(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::frame::XModel > & xChartModel,
- SfxItemPool& rItemPool );
+ const css::uno::Reference<css::frame::XModel>& xChartModel, SfxItemPool& rItemPool );
virtual ~AllSeriesStatisticsConverter();
protected:
diff --git a/chart2/source/controller/inc/RegressionEquationItemConverter.hxx b/chart2/source/controller/inc/RegressionEquationItemConverter.hxx
index a247ad9..3201d6c 100644
--- a/chart2/source/controller/inc/RegressionEquationItemConverter.hxx
+++ b/chart2/source/controller/inc/RegressionEquationItemConverter.hxx
@@ -26,21 +26,15 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/awt/Size.hpp>
-#include <memory>
#include <vector>
class SdrModel;
-namespace chart
-{
-namespace wrapper
-{
+namespace chart { namespace wrapper {
-class RegressionEquationItemConverter :
- public ::comphelper::ItemConverter
+class RegressionEquationItemConverter : public comphelper::ItemConverter
{
public:
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
RegressionEquationItemConverter(
const ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > & rPropertySet,
@@ -48,9 +42,8 @@ public:
SdrModel& rDrawModel,
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
+ const css::awt::Size* pRefSize = NULL );
+
virtual ~RegressionEquationItemConverter();
virtual void FillItemSet( SfxItemSet & rOutItemSet ) const SAL_OVERRIDE;
@@ -69,10 +62,8 @@ private:
::std::vector< ItemConverter * > m_aConverters;
};
-} // namespace wrapper
-} // namespace chart
+}}
-// INCLUDED_CHART2_SOURCE_CONTROLLER_INC_REGRESSIONEQUATIONITEMCONVERTER_HXX
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/TitleItemConverter.hxx b/chart2/source/controller/inc/TitleItemConverter.hxx
index 71319bc..c1d78f0 100644
--- a/chart2/source/controller/inc/TitleItemConverter.hxx
+++ b/chart2/source/controller/inc/TitleItemConverter.hxx
@@ -24,30 +24,19 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <vector>
-#include <memory>
class SdrModel;
-namespace chart
-{
-namespace wrapper
-{
+namespace chart { namespace wrapper {
-class TitleItemConverter :
- public ::comphelper::ItemConverter
+class TitleItemConverter : public comphelper::ItemConverter
{
public:
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
TitleItemConverter(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySet > & rPropertySet,
- SfxItemPool& rItemPool,
- SdrModel& rDrawModel,
- 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
+ const css::uno::Reference<css::beans::XPropertySet>& rPropertySet,
+ SfxItemPool& rItemPool, SdrModel& rDrawModel,
+ const css::uno::Reference<css::lang::XMultiServiceFactory>& xNamedPropertyContainerFactory,
+ const css::awt::Size* pRefSize = NULL );
virtual ~TitleItemConverter();
@@ -59,18 +48,16 @@ protected:
virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const SAL_OVERRIDE;
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 )
- throw( ::com::sun::star::uno::Exception ) SAL_OVERRIDE;
+ throw (css::uno::Exception) SAL_OVERRIDE;
private:
::std::vector< ItemConverter * > m_aConverters;
};
-} // namespace wrapper
-} // namespace chart
+}}
-// INCLUDED_CHART2_SOURCE_CONTROLLER_INC_TITLEITEMCONVERTER_HXX
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
index e3b7175..30f014e 100644
--- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
@@ -70,12 +70,8 @@ namespace
};
} // anonymous namespace
-namespace chart
-{
-namespace wrapper
-{
+namespace chart { namespace wrapper {
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
AxisItemConverter::AxisItemConverter(
const Reference< beans::XPropertySet > & rPropertySet,
SfxItemPool& rItemPool,
@@ -83,7 +79,7 @@ AxisItemConverter::AxisItemConverter(
const Reference< chart2::XChartDocument > & xChartDoc,
::chart::ExplicitScaleData * pScale /* = NULL */,
::chart::ExplicitIncrementData * pIncrement /* = NULL */,
- ::std::auto_ptr< awt::Size > pRefSize /* = NULL */ ) :
+ const awt::Size* pRefSize ) :
ItemConverter( rPropertySet, rItemPool ),
m_xChartDoc( xChartDoc ),
m_pExplicitScale( NULL ),
@@ -100,13 +96,12 @@ AxisItemConverter::AxisItemConverter(
rPropertySet, rItemPool, rDrawModel,
xNamedPropertyContainerFactory,
GraphicPropertyItemConverter::LINE_PROPERTIES ));
- m_aConverters.push_back( new CharacterPropertyItemConverter( rPropertySet, rItemPool, pRefSize,
- "ReferencePageSize" ));
+ m_aConverters.push_back(
+ new CharacterPropertyItemConverter(rPropertySet, rItemPool, pRefSize, "ReferencePageSize"));
m_xAxis.set( Reference< chart2::XAxis >( rPropertySet, uno::UNO_QUERY ) );
OSL_ASSERT( m_xAxis.is());
}
-SAL_WNODEPRECATED_DECLARATIONS_POP
AxisItemConverter::~AxisItemConverter()
{
@@ -993,7 +988,6 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
return (bSetScale || bChangedOtherwise);
}
-} // namespace wrapper
-} // namespace chart
+}}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
index 9619f00..97bf8c8 100644
--- a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
@@ -64,10 +64,7 @@ namespace
}
} // anonymous namespace
-namespace chart
-{
-namespace wrapper
-{
+namespace chart { namespace wrapper {
CharacterPropertyItemConverter::CharacterPropertyItemConverter(
const uno::Reference< beans::XPropertySet > & rPropertySet,
@@ -75,19 +72,19 @@ CharacterPropertyItemConverter::CharacterPropertyItemConverter(
ItemConverter( rPropertySet, rItemPool )
{}
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
CharacterPropertyItemConverter::CharacterPropertyItemConverter(
const uno::Reference< beans::XPropertySet > & rPropertySet,
SfxItemPool& rItemPool,
- ::std::auto_ptr< awt::Size > pRefSize,
+ const awt::Size* pRefSize,
const OUString & rRefSizePropertyName,
const uno::Reference< beans::XPropertySet > & rRefSizePropSet ) :
ItemConverter( rPropertySet, rItemPool ),
- m_pRefSize( pRefSize ),
m_aRefSizePropertyName( rRefSizePropertyName ),
m_xRefSizePropSet( rRefSizePropSet.is() ? rRefSizePropSet : rPropertySet )
-{}
-SAL_WNODEPRECATED_DECLARATIONS_POP
+{
+ if (pRefSize)
+ m_pRefSize.reset(*pRefSize);
+}
CharacterPropertyItemConverter::~CharacterPropertyItemConverter()
{}
@@ -268,7 +265,7 @@ void CharacterPropertyItemConverter::FillSpecialItem(
float fHeight;
if( aValue >>= fHeight )
{
- if( m_pRefSize.get())
+ if (m_pRefSize)
{
awt::Size aOldRefSize;
if( GetRefSizePropertySet()->getPropertyValue( m_aRefSizePropertyName ) >>= aOldRefSize )
@@ -518,7 +515,7 @@ bool CharacterPropertyItemConverter::ApplySpecialItem(
bSetValue = true;
else
{
- if( m_pRefSize.get() )
+ if (m_pRefSize)
{
awt::Size aNewRefSize = *m_pRefSize;
awt::Size aOldRefSize;
@@ -533,11 +530,10 @@ bool CharacterPropertyItemConverter::ApplySpecialItem(
if( bSetValue )
{
// set new reference size only if there was a reference size before (auto-scaling on)
- if( m_pRefSize.get() &&
- GetRefSizePropertySet()->getPropertyValue( m_aRefSizePropertyName ).hasValue())
+ if (m_pRefSize && GetRefSizePropertySet()->getPropertyValue( m_aRefSizePropertyName ).hasValue())
{
- GetRefSizePropertySet()->setPropertyValue( m_aRefSizePropertyName,
- uno::makeAny( *m_pRefSize ));
+ GetRefSizePropertySet()->setPropertyValue(
+ m_aRefSizePropertyName, uno::makeAny(*m_pRefSize));
}
GetPropertySet()->setPropertyValue( "CharHeight" + aPostfix, aValue );
@@ -556,7 +552,11 @@ bool CharacterPropertyItemConverter::ApplySpecialItem(
return bChanged;
}
-} // namespace wrapper
-} // namespace chart
+uno::Reference<beans::XPropertySet> CharacterPropertyItemConverter::GetRefSizePropertySet() const
+{
+ return m_xRefSizePropSet;
+}
+
+}}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
index 6e8cbc3..2c126de 100644
--- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
@@ -190,12 +190,8 @@ bool lcl_UseSourceFormatFromItemToPropertySet( sal_uInt16 nWhichId, const SfxIte
} // anonymous namespace
-namespace chart
-{
-namespace wrapper
-{
+namespace chart { namespace wrapper {
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
DataPointItemConverter::DataPointItemConverter(
const uno::Reference< frame::XModel > & xChartModel,
const uno::Reference< uno::XComponentContext > & xContext,
@@ -203,16 +199,15 @@ DataPointItemConverter::DataPointItemConverter(
const uno::Reference< XDataSeries > & xSeries,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
- const uno::Reference< lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
- GraphicPropertyItemConverter::eGraphicObjectType eMapTo /* = FILL_PROPERTIES */,
- ::std::auto_ptr< awt::Size > pRefSize /* = NULL */,
- bool bDataSeries /* = false */,
- bool bUseSpecialFillColor /* = false */,
- sal_Int32 nSpecialFillColor /* =0 */,
- bool bOverwriteLabelsForAttributedDataPointsAlso /*false*/,
+ const uno::Reference<lang::XMultiServiceFactory>& xNamedPropertyContainerFactory,
+ GraphicPropertyItemConverter::eGraphicObjectType eMapTo,
+ const awt::Size* pRefSize,
+ bool bDataSeries,
+ bool bUseSpecialFillColor,
+ sal_Int32 nSpecialFillColor,
+ bool bOverwriteLabelsForAttributedDataPointsAlso,
sal_Int32 nNumberFormat,
- sal_Int32 nPercentNumberFormat
- ) :
+ sal_Int32 nPercentNumberFormat ) :
ItemConverter( rPropertySet, rItemPool ),
m_bDataSeries( bDataSeries ),
m_bOverwriteLabelsForAttributedDataPointsAlso(m_bDataSeries && bOverwriteLabelsForAttributedDataPointsAlso),
@@ -225,7 +220,7 @@ DataPointItemConverter::DataPointItemConverter(
{
m_aConverters.push_back( new GraphicPropertyItemConverter(
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 )
{
m_aConverters.push_back( new StatisticsItemConverter( xChartModel, rPropertySet, rItemPool ));
@@ -241,7 +236,6 @@ DataPointItemConverter::DataPointItemConverter(
m_bForbidPercentValue = AxisType::CATEGORY != ChartTypeHelper::getAxisType( xChartType, 0 );
}
-SAL_WNODEPRECATED_DECLARATIONS_POP
DataPointItemConverter::~DataPointItemConverter()
{
@@ -674,7 +668,6 @@ void DataPointItemConverter::FillSpecialItem(
}
}
-} // namespace wrapper
-} // namespace chart
+}}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
index 31e1e3c..a82664a 100644
--- a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
@@ -54,7 +54,7 @@ LegendItemConverter::LegendItemConverter(
rPropertySet, rItemPool, rDrawModel, xNamedPropertyContainerFactory,
GraphicPropertyItemConverter::LINE_AND_FILL_PROPERTIES ));
m_aConverters.push_back( new CharacterPropertyItemConverter(
- rPropertySet, rItemPool, pRefSize,
+ rPropertySet, rItemPool, pRefSize.get(),
"ReferencePageSize" ));
}
SAL_WNODEPRECATED_DECLARATIONS_POP
diff --git a/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx b/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
index 99ea0ee..934e961 100644
--- a/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
+++ b/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
@@ -32,23 +32,21 @@
#include "chartview/ExplicitValueProvider.hxx"
#include "DiagramHelper.hxx"
+#include <boost/scoped_ptr.hpp>
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
-namespace chart
-{
-namespace wrapper
-{
+namespace chart { namespace wrapper {
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
AllAxisItemConverter::AllAxisItemConverter(
const uno::Reference< frame::XModel > & xChartModel,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
const uno::Reference< lang::XMultiServiceFactory > & /*xNamedPropertyContainerFactory*/,
- ::std::auto_ptr< awt::Size > pRefSize )
+ const awt::Size* pRefSize )
: MultipleItemConverter( rItemPool )
{
Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( xChartModel ) );
@@ -56,18 +54,12 @@ AllAxisItemConverter::AllAxisItemConverter(
for( sal_Int32 nA = 0; nA < aElementList.getLength(); nA++ )
{
uno::Reference< beans::XPropertySet > xObjectProperties(aElementList[nA], uno::UNO_QUERY);
- if( pRefSize.get())
- m_aConverters.push_back( new ::chart::wrapper::AxisItemConverter(
- xObjectProperties, rItemPool, rDrawModel,
- uno::Reference< chart2::XChartDocument >( xChartModel, uno::UNO_QUERY ), 0, 0,
- ::std::auto_ptr< awt::Size >( new awt::Size( *pRefSize )) ));
- else
- m_aConverters.push_back( new ::chart::wrapper::AxisItemConverter(
- xObjectProperties, rItemPool, rDrawModel,
- uno::Reference< chart2::XChartDocument >( xChartModel, uno::UNO_QUERY ), 0, 0 ) );
+ m_aConverters.push_back( new ::chart::wrapper::AxisItemConverter(
+ xObjectProperties, rItemPool, rDrawModel,
+ uno::Reference< chart2::XChartDocument >( xChartModel, uno::UNO_QUERY ), 0, 0,
+ pRefSize));
}
}
-SAL_WNODEPRECATED_DECLARATIONS_POP
AllAxisItemConverter::~AllAxisItemConverter()
{
@@ -107,13 +99,12 @@ const sal_uInt16 * AllGridItemConverter::GetWhichPairs() const
return nGridWhichPairs;
}
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
AllDataLabelItemConverter::AllDataLabelItemConverter(
const uno::Reference< frame::XModel > & xChartModel,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
const uno::Reference< lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
- ::std::auto_ptr< awt::Size > pRefSize )
+ const awt::Size* pRefSize )
: MultipleItemConverter( rItemPool )
{
::std::vector< uno::Reference< chart2::XDataSeries > > aSeriesList(
@@ -129,21 +120,13 @@ AllDataLabelItemConverter::AllDataLabelItemConverter(
sal_Int32 nPercentNumberFormat=ExplicitValueProvider::getExplicitPercentageNumberFormatKeyForDataLabel(
xObjectProperties,uno::Reference< util::XNumberFormatsSupplier >(xChartModel, uno::UNO_QUERY));
- m_aConverters.push_back( new ::chart::wrapper::DataPointItemConverter(
- xChartModel, xContext,
- xObjectProperties, *aIt, rItemPool, rDrawModel,
- xNamedPropertyContainerFactory,
- GraphicPropertyItemConverter::FILLED_DATA_POINT,
- ::std::auto_ptr< awt::Size >( pRefSize.get() ? new awt::Size( *pRefSize ) : 0),
- true, /*bDataSeries*/
- false, /*bUseSpecialFillColor*/
- 0, /*nSpecialFillColor*/
- true /*bOverwriteLabelsForAttributedDataPointsAlso*/,
- nNumberFormat, nPercentNumberFormat
- ));
+ m_aConverters.push_back(
+ new ::chart::wrapper::DataPointItemConverter(
+ xChartModel, xContext, xObjectProperties, *aIt, rItemPool, rDrawModel,
+ xNamedPropertyContainerFactory, GraphicPropertyItemConverter::FILLED_DATA_POINT,
+ pRefSize, true, false, 0, true, nNumberFormat, nPercentNumberFormat));
}
}
-SAL_WNODEPRECATED_DECLARATIONS_POP
AllDataLabelItemConverter::~AllDataLabelItemConverter()
{
@@ -155,13 +138,12 @@ const sal_uInt16 * AllDataLabelItemConverter::GetWhichPairs() const
return nDataLabelWhichPairs;
}
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
AllTitleItemConverter::AllTitleItemConverter(
const uno::Reference< frame::XModel > & xChartModel,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
const uno::Reference< lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
- ::std::auto_ptr< awt::Size > pRefSize )
+ const awt::Size* pRefSize )
: MultipleItemConverter( rItemPool )
{
for(sal_Int32 nTitle = TitleHelper::TITLE_BEGIN; nTitle < TitleHelper::NORMAL_TITLE_END; nTitle++ )
@@ -170,14 +152,11 @@ AllTitleItemConverter::AllTitleItemConverter(
if(!xTitle.is())
continue;
uno::Reference< beans::XPropertySet > xObjectProperties( xTitle, uno::UNO_QUERY);
- ::std::auto_ptr< awt::Size > pSingleRefSize(0);
- if( pRefSize.get())
- pSingleRefSize = ::std::auto_ptr< awt::Size >( new awt::Size( *pRefSize ));
- m_aConverters.push_back( new ::chart::wrapper::TitleItemConverter(
- xObjectProperties, rItemPool, rDrawModel, xNamedPropertyContainerFactory, pSingleRefSize ));
+ m_aConverters.push_back(
+ new ::chart::wrapper::TitleItemConverter(
+ xObjectProperties, rItemPool, rDrawModel, xNamedPropertyContainerFactory, pRefSize));
}
}
-SAL_WNODEPRECATED_DECLARATIONS_POP
AllTitleItemConverter::~AllTitleItemConverter()
{
@@ -215,7 +194,6 @@ const sal_uInt16 * AllSeriesStatisticsConverter::GetWhichPairs() const
return nStatWhichPairs;
}
-} // namespace wrapper
-} // namespace chart
+}}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx b/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx
index 4cf5baa..d410962 100644
--- a/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx
@@ -44,19 +44,15 @@ namespace
};
} // anonymous namespace
-namespace chart
-{
-namespace wrapper
-{
+namespace chart { namespace wrapper {
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
RegressionEquationItemConverter::RegressionEquationItemConverter(
const ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > & rPropertySet,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
const uno::Reference< lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
- ::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize ) :
+ const awt::Size* pRefSize ) :
ItemConverter( rPropertySet, rItemPool )
{
m_aConverters.push_back( new GraphicPropertyItemConverter(
@@ -64,10 +60,9 @@ RegressionEquationItemConverter::RegressionEquationItemConverter(
xNamedPropertyContainerFactory,
GraphicPropertyItemConverter::LINE_AND_FILL_PROPERTIES ));
- m_aConverters.push_back( new CharacterPropertyItemConverter(
- rPropertySet, rItemPool, pRefSize, "ReferencePageSize"));
+ m_aConverters.push_back(
+ new CharacterPropertyItemConverter(rPropertySet, rItemPool, pRefSize, "ReferencePageSize"));
}
-SAL_WNODEPRECATED_DECLARATIONS_POP
RegressionEquationItemConverter::~RegressionEquationItemConverter()
{
@@ -156,7 +151,6 @@ void RegressionEquationItemConverter::FillSpecialItem(
}
}
-} // namespace wrapper
-} // namespace chart
+}}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
index 2593499..71d3230 100644
--- a/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
@@ -47,53 +47,44 @@ namespace
};
} // anonymous namespace
-namespace chart
-{
-namespace wrapper
-{
+namespace chart { namespace wrapper {
class FormattedStringsConverter : public ::comphelper::MultipleItemConverter
{
public:
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
FormattedStringsConverter(
const uno::Sequence< uno::Reference< chart2::XFormattedString > > & aStrings,
SfxItemPool & rItemPool,
- ::std::auto_ptr< awt::Size > pRefSize,
+ const awt::Size* pRefSize,
const uno::Reference< beans::XPropertySet > & xParentProp );
- SAL_WNODEPRECATED_DECLARATIONS_POP
virtual ~FormattedStringsConverter();
protected:
virtual const sal_uInt16 * GetWhichPairs() const SAL_OVERRIDE;
};
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
FormattedStringsConverter::FormattedStringsConverter(
const uno::Sequence< uno::Reference< chart2::XFormattedString > > & aStrings,
SfxItemPool & rItemPool,
- ::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize,
+ const awt::Size* pRefSize,
const uno::Reference< beans::XPropertySet > & xParentProp ) :
MultipleItemConverter( rItemPool )
{
- bool bHasRefSize = (pRefSize.get() && xParentProp.is());
+ bool bHasRefSize = (pRefSize && xParentProp.is());
for( sal_Int32 i = 0; i < aStrings.getLength(); ++i )
{
uno::Reference< beans::XPropertySet > xProp( aStrings[ i ], uno::UNO_QUERY );
if( xProp.is())
{
if( bHasRefSize )
- m_aConverters.push_back( new CharacterPropertyItemConverter(
- xProp, rItemPool,
- ::std::auto_ptr< awt::Size >( new awt::Size( *pRefSize )),
- "ReferencePageSize" ,
- xParentProp ));
+ m_aConverters.push_back(
+ new CharacterPropertyItemConverter(
+ xProp, rItemPool, pRefSize, "ReferencePageSize", xParentProp));
else
m_aConverters.push_back( new CharacterPropertyItemConverter( xProp, rItemPool ));
}
}
}
-SAL_WNODEPRECATED_DECLARATIONS_POP
FormattedStringsConverter::~FormattedStringsConverter()
{
@@ -104,14 +95,12 @@ const sal_uInt16 * FormattedStringsConverter::GetWhichPairs() const
return nCharacterPropertyWhichPairs;
}
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
TitleItemConverter::TitleItemConverter(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySet > & rPropertySet,
+ const uno::Reference<beans::XPropertySet> & rPropertySet,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
const uno::Reference< lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
- ::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize ) :
+ const awt::Size* pRefSize ) :
ItemConverter( rPropertySet, rItemPool )
{
m_aConverters.push_back( new GraphicPropertyItemConverter(
@@ -132,7 +121,6 @@ TitleItemConverter::TitleItemConverter(
}
}
}
-SAL_WNODEPRECATED_DECLARATIONS_POP
TitleItemConverter::~TitleItemConverter()
{
diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx
index 3c1bb9e..32891de 100644
--- a/chart2/source/controller/main/ChartController_Properties.cxx
+++ b/chart2/source/controller/main/ChartController_Properties.cxx
@@ -53,6 +53,7 @@
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <memory>
+#include <boost/scoped_ptr.hpp>
#include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx>
@@ -108,14 +109,14 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
break;
case OBJECTTYPE_TITLE:
{
- ::std::auto_ptr< awt::Size > pRefSize;
+ boost::scoped_ptr<awt::Size> pRefSize;
if( pRefSizeProvider.get() )
- pRefSize.reset( new awt::Size( pRefSizeProvider->getPageSize()));
+ pRefSize.reset(new awt::Size(pRefSizeProvider->getPageSize()));
- pItemConverter = new wrapper::TitleItemConverter( xObjectProperties,
- rDrawModel.GetItemPool(), rDrawModel,
- uno::Reference< lang::XMultiServiceFactory >( xChartModel, uno::UNO_QUERY ),
- pRefSize );
+ pItemConverter = new wrapper::TitleItemConverter(
+ xObjectProperties, rDrawModel.GetItemPool(), rDrawModel,
+ uno::Reference<lang::XMultiServiceFactory>(xChartModel, uno::UNO_QUERY),
+ pRefSize.get());
}
break;
case OBJECTTYPE_LEGEND:
@@ -143,7 +144,7 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
break;
case OBJECTTYPE_AXIS:
{
- ::std::auto_ptr< awt::Size > pRefSize;
+ boost::scoped_ptr<awt::Size> pRefSize;
if( pRefSizeProvider.get() )
pRefSize.reset( new awt::Size( pRefSizeProvider->getPageSize()));
@@ -166,7 +167,7 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
rDrawModel,
uno::Reference< chart2::XChartDocument >( xChartModel, uno::UNO_QUERY ),
&aExplicitScale, &aExplicitIncrement,
- pRefSize );
+ pRefSize.get() );
}
break;
case OBJECTTYPE_AXIS_UNITLABEL:
@@ -176,7 +177,7 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
case OBJECTTYPE_DATA_LABEL:
case OBJECTTYPE_DATA_POINT:
{
- ::std::auto_ptr< awt::Size > pRefSize;
+ boost::scoped_ptr<awt::Size> pRefSize;
if( pRefSizeProvider.get() )
pRefSize.reset( new awt::Size( pRefSizeProvider->getPageSize()));
@@ -223,7 +224,7 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
pItemConverter = new wrapper::DataPointItemConverter( xChartModel, xContext,
xObjectProperties, xSeries, rDrawModel.GetItemPool(), rDrawModel,
uno::Reference< lang::XMultiServiceFactory >( xChartModel, uno::UNO_QUERY ),
- eMapTo, pRefSize, bDataSeries, bUseSpecialFillColor, nSpecialFillColor, true,
+ eMapTo, pRefSize.get(), bDataSeries, bUseSpecialFillColor, nSpecialFillColor, true,
nNumberFormat, nPercentNumberFormat );
break;
}
@@ -253,14 +254,14 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
break;
case OBJECTTYPE_DATA_CURVE_EQUATION:
{
- ::std::auto_ptr< awt::Size > pRefSize;
+ boost::scoped_ptr<awt::Size> pRefSize;
if( pRefSizeProvider.get() )
- pRefSize.reset( new awt::Size( pRefSizeProvider->getPageSize()));
+ pRefSize.reset(new awt::Size(pRefSizeProvider->getPageSize()));
pItemConverter = new wrapper::RegressionEquationItemConverter(
xObjectProperties, rDrawModel.GetItemPool(), rDrawModel,
uno::Reference< lang::XMultiServiceFactory >( xChartModel, uno::UNO_QUERY ),
- pRefSize );
+ pRefSize.get());
break;
}
case OBJECTTYPE_DATA_STOCK_RANGE:
@@ -287,12 +288,13 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
break;
case OBJECTTYPE_AXIS:
{
- ::std::auto_ptr< awt::Size > pRefSize;
+ boost::scoped_ptr<awt::Size> pRefSize;
if( pRefSizeProvider.get() )
pRefSize.reset( new awt::Size( pRefSizeProvider->getPageSize()));
- pItemConverter = new wrapper::AllAxisItemConverter( xChartModel, rDrawModel.GetItemPool(),
- rDrawModel, uno::Reference< lang::XMultiServiceFactory >( xChartModel, uno::UNO_QUERY ), pRefSize );
+ pItemConverter = new wrapper::AllAxisItemConverter(
+ xChartModel, rDrawModel.GetItemPool(),
+ rDrawModel, uno::Reference< lang::XMultiServiceFactory >( xChartModel, uno::UNO_QUERY ), pRefSize.get());
}
break;
case OBJECTTYPE_GRID:
commit b2ffa40c12024886c3c6fd36d198aed2f8434fde
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Mon Jul 21 16:34:15 2014 -0400
Compiler macro in lieu of literal "Label" to make it easier to track it.
Change-Id: I6bc694fcc8f97b308747c097c4fa977d20524377
diff --git a/chart2/inc/unonames.hxx b/chart2/inc/unonames.hxx
index 4975ed4..0731ab6 100644
--- a/chart2/inc/unonames.hxx
+++ b/chart2/inc/unonames.hxx
@@ -21,6 +21,7 @@
#define CHART_UNONAME_LINK_TO_SRC_NUMFMT "LinkNumberFormatToSource"
#define CHART_UNONAME_ERRORBAR_X "ErrorBarX"
#define CHART_UNONAME_ERRORBAR_Y "ErrorBarY"
+#define CHART_UNONAME_LABEL "Label"
#endif
diff --git a/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx
index 8ea038b..1b13ca9 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx
@@ -21,6 +21,8 @@
#include "WrappedSeriesOrDiagramProperty.hxx"
#include "macros.hxx"
#include "FastPropertyIdRanges.hxx"
+#include <unonames.hxx>
+
#include <com/sun/star/chart2/DataPointLabel.hpp>
#include <com/sun/star/chart/ChartDataCaption.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
@@ -137,7 +139,7 @@ sal_Int32 WrappedDataCaptionProperty::getValueFromSeries( const Reference< beans
sal_Int32 aRet = 0;
m_aDefaultValue >>= aRet;
chart2::DataPointLabel aLabel;
- if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue("Label") >>= aLabel ) )
+ if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel ) )
aRet = lcl_LabelToCaption( aLabel );
return aRet;
}
@@ -148,7 +150,7 @@ void WrappedDataCaptionProperty::setValueToSeries( const Reference< beans::XProp
return;
chart2::DataPointLabel aLabel = lcl_CaptionToLabel( nCaption );
- xSeriesPropertySet->setPropertyValue( "Label", uno::makeAny( aLabel ) );
+ xSeriesPropertySet->setPropertyValue( CHART_UNONAME_LABEL, uno::makeAny( aLabel ) );
}
} //namespace wrapper
diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
index 213208d..6e8cbc3 100644
--- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
@@ -310,7 +310,7 @@ bool DataPointItemConverter::ApplySpecialItem(
{
const SfxBoolItem & rItem = static_cast< const SfxBoolItem & >( rItemSet.Get( nWhichId ));
- uno::Any aOldValue( GetPropertySet()->getPropertyValue( "Label" ));
+ uno::Any aOldValue = GetPropertySet()->getPropertyValue(CHART_UNONAME_LABEL);
chart2::DataPointLabel aLabel;
if( aOldValue >>= aLabel )
{
@@ -323,15 +323,15 @@ bool DataPointItemConverter::ApplySpecialItem(
{
Reference< chart2::XDataSeries > xSeries( GetPropertySet(), uno::UNO_QUERY);
if( (bOldValue ? 1 : 0) != rValue ||
- DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, "Label" , aOldValue ) )
+ DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, CHART_UNONAME_LABEL , aOldValue ) )
{
- DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "Label" , uno::makeAny( aLabel ) );
+ DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, CHART_UNONAME_LABEL , uno::makeAny( aLabel ) );
bChanged = true;
}
}
else if( (bOldValue ? 1 : 0) != rValue )
{
- GetPropertySet()->setPropertyValue( "Label" , uno::makeAny( aLabel ));
+ GetPropertySet()->setPropertyValue(CHART_UNONAME_LABEL , uno::makeAny(aLabel));
bChanged = true;
}
}
@@ -537,7 +537,7 @@ void DataPointItemConverter::FillSpecialItem(
case SCHATTR_DATADESCR_SHOW_SYMBOL:
{
chart2::DataPointLabel aLabel;
- if( GetPropertySet()->getPropertyValue( "Label" ) >>= aLabel )
+ if (GetPropertySet()->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel)
{
bool bValue = (SCHATTR_DATADESCR_SHOW_NUMBER==nWhichId) ? aLabel.ShowNumber : (
(SCHATTR_DATADESCR_SHOW_PERCENTAGE==nWhichId) ? aLabel.ShowNumberInPercent : (
@@ -548,7 +548,7 @@ void DataPointItemConverter::FillSpecialItem(
if( m_bOverwriteLabelsForAttributedDataPointsAlso )
{
if( DataSeriesHelper::hasAttributedDataPointDifferentValue(
- Reference< chart2::XDataSeries >( GetPropertySet(), uno::UNO_QUERY), "Label" , uno::makeAny(aLabel) ) )
+ Reference< chart2::XDataSeries >( GetPropertySet(), uno::UNO_QUERY), CHART_UNONAME_LABEL , uno::makeAny(aLabel) ) )
{
rOutItemSet.InvalidateItem(nWhichId);
}
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx
index cb3bcef..186ec57 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -40,6 +40,7 @@
#include "ShapeController.hxx"
#include "DiagramHelper.hxx"
#include "ObjectNameProvider.hxx"
+#include <unonames.hxx>
#include <com/sun/star/chart2/DataPointLabel.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
@@ -774,7 +775,7 @@ bool ChartController::executeDispatch_Delete()
SCH_RESSTR( aObjectType == OBJECTTYPE_DATA_LABEL ? STR_OBJECT_LABEL : STR_OBJECT_DATALABELS )),
m_xUndoManager );
chart2::DataPointLabel aLabel;
- xObjectProperties->getPropertyValue( "Label" ) >>= aLabel;
+ xObjectProperties->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel;
aLabel.ShowNumber = false;
aLabel.ShowNumberInPercent = false;
aLabel.ShowCategoryName = false;
@@ -782,10 +783,10 @@ bool ChartController::executeDispatch_Delete()
if( aObjectType == OBJECTTYPE_DATA_LABELS )
{
uno::Reference< chart2::XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( aCID, getModel() ));
- ::chart::DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "Label", uno::makeAny(aLabel) );
+ ::chart::DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, CHART_UNONAME_LABEL, uno::makeAny(aLabel) );
}
else
- xObjectProperties->setPropertyValue( "Label", uno::makeAny(aLabel) );
+ xObjectProperties->setPropertyValue( CHART_UNONAME_LABEL, uno::makeAny(aLabel) );
bReturn = true;
aUndoGuard.commit();
}
diff --git a/chart2/source/model/main/DataPointProperties.cxx b/chart2/source/model/main/DataPointProperties.cxx
index c2cb375..5c89424 100644
--- a/chart2/source/model/main/DataPointProperties.cxx
+++ b/chart2/source/model/main/DataPointProperties.cxx
@@ -264,7 +264,7 @@ void DataPointProperties::AddPropertiesToVector(
| beans::PropertyAttribute::MAYBEDEFAULT ));
rOutProperties.push_back(
- Property( "Label",
+ Property( CHART_UNONAME_LABEL,
PROP_DATAPOINT_LABEL,
cppu::UnoType<chart2::DataPointLabel>::get(),
beans::PropertyAttribute::BOUND
diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx
index 3066402..44debef 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -148,14 +148,14 @@ void lcl_insertOrDeleteDataLabelsToSeriesAndAllPoints( const Reference< chart2::
if( xSeriesProperties.is() )
{
DataPointLabel aLabelAtSeries;
- xSeriesProperties->getPropertyValue( "Label" ) >>= aLabelAtSeries;
+ xSeriesProperties->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabelAtSeries;
aLabelAtSeries.ShowNumber = bInsert;
if( !bInsert )
{
aLabelAtSeries.ShowNumberInPercent = false;
aLabelAtSeries.ShowCategoryName = false;
}
- xSeriesProperties->setPropertyValue( "Label", uno::makeAny( aLabelAtSeries ) );
+ xSeriesProperties->setPropertyValue(CHART_UNONAME_LABEL, uno::makeAny(aLabelAtSeries));
uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
if( xSeriesProperties->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList )
{
@@ -165,14 +165,14 @@ void lcl_insertOrDeleteDataLabelsToSeriesAndAllPoints( const Reference< chart2::
if( xPointProp.is() )
{
DataPointLabel aLabel;
- xPointProp->getPropertyValue( "Label" ) >>= aLabel;
+ xPointProp->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel;
aLabel.ShowNumber = bInsert;
if( !bInsert )
{
aLabel.ShowNumberInPercent = false;
aLabel.ShowCategoryName = false;
}
- xPointProp->setPropertyValue( "Label", uno::makeAny( aLabel ) );
+ xPointProp->setPropertyValue(CHART_UNONAME_LABEL, uno::makeAny(aLabel));
}
}
}
@@ -777,7 +777,7 @@ bool hasDataLabelsAtSeries( const Reference< chart2::XDataSeries >& xSeries )
if( xProp.is() )
{
DataPointLabel aLabel;
- if( (xProp->getPropertyValue( "Label" ) >>= aLabel) )
+ if( (xProp->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel) )
bRet = aLabel.ShowNumber || aLabel.ShowNumberInPercent || aLabel.ShowCategoryName;
}
}
@@ -805,7 +805,7 @@ bool hasDataLabelsAtPoints( const Reference< chart2::XDataSeries >& xSeries )
if( xPointProp.is() )
{
DataPointLabel aLabel;
- if( (xPointProp->getPropertyValue( "Label" ) >>= aLabel) )
+ if( (xPointProp->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel) )
bRet = aLabel.ShowNumber || aLabel.ShowNumberInPercent || aLabel.ShowCategoryName;
if( bRet )
break;
@@ -843,7 +843,7 @@ bool hasDataLabelAtPoint( const Reference< chart2::XDataSeries >& xSeries, sal_I
if( xProp.is() )
{
DataPointLabel aLabel;
- if( (xProp->getPropertyValue( "Label" ) >>= aLabel) )
+ if( (xProp->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel) )
bRet = aLabel.ShowNumber || aLabel.ShowNumberInPercent || aLabel.ShowCategoryName;
}
}
@@ -872,9 +872,9 @@ void insertDataLabelToPoint( const Reference< beans::XPropertySet >& xPointProp
if( xPointProp.is() )
{
DataPointLabel aLabel;
- xPointProp->getPropertyValue( "Label" ) >>= aLabel;
+ xPointProp->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel;
aLabel.ShowNumber = true;
- xPointProp->setPropertyValue( "Label", uno::makeAny( aLabel ) );
+ xPointProp->setPropertyValue(CHART_UNONAME_LABEL, uno::makeAny(aLabel));
}
}
catch(const uno::Exception &e)
@@ -890,11 +890,11 @@ void deleteDataLabelsFromPoint( const Reference< beans::XPropertySet >& xPointPr
if( xPointProp.is() )
{
DataPointLabel aLabel;
- xPointProp->getPropertyValue( "Label" ) >>= aLabel;
+ xPointProp->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel;
aLabel.ShowNumber = false;
aLabel.ShowNumberInPercent = false;
aLabel.ShowCategoryName = false;
- xPointProp->setPropertyValue( "Label", uno::makeAny( aLabel ) );
+ xPointProp->setPropertyValue(CHART_UNONAME_LABEL, uno::makeAny(aLabel));
}
}
catch(const uno::Exception &e)
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index 30a95e5..56b84e0 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -896,7 +896,7 @@ DataPointLabel* getDataPointLabelFromPropertySet( const uno::Reference< beans::X
SAL_WNODEPRECATED_DECLARATIONS_POP
try
{
- if( !(xProp->getPropertyValue("Label") >>= *apLabel) )
+ if( !(xProp->getPropertyValue(CHART_UNONAME_LABEL) >>= *apLabel) )
apLabel.reset();
}
catch(const uno::Exception &e)
More information about the Libreoffice-commits
mailing list